演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
115 lines
2.6 KiB
TypeScript
Generated
115 lines
2.6 KiB
TypeScript
Generated
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* ErrorResponse
|
|
*
|
|
* Documented non-2xx body emitted by ``register_external_error_handlers``.
|
|
*
|
|
* ``params`` and ``details`` appear only on the errors that set them. The schema
|
|
* stays open because ``HTTPException.data`` may carry extra keys.
|
|
*/
|
|
export const zErrorResponse = z.object({
|
|
code: z.string(),
|
|
details: z.record(z.string(), z.unknown()).optional(),
|
|
message: z.string(),
|
|
params: z.string().optional(),
|
|
status: z.int(),
|
|
})
|
|
|
|
/**
|
|
* SimpleResultResponse
|
|
*/
|
|
export const zSimpleResultResponse = z.object({
|
|
result: z.string(),
|
|
})
|
|
|
|
/**
|
|
* UnsupportedDataSourceApiKeyAuthProviderError
|
|
*
|
|
* The data-source API-key authentication provider is not supported.
|
|
*/
|
|
export const zUnsupportedDataSourceApiKeyAuthProviderError = zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('unsupported_data_source_api_key_auth_provider'),
|
|
status: z.literal(400),
|
|
}),
|
|
)
|
|
|
|
/**
|
|
* DataSourceApiKeyAuthProviderUnavailableError
|
|
*
|
|
* The data-source API-key authentication provider is temporarily unavailable.
|
|
*/
|
|
export const zDataSourceApiKeyAuthProviderUnavailableError = zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('data_source_api_key_auth_provider_unavailable'),
|
|
status: z.literal(502),
|
|
}),
|
|
)
|
|
|
|
/**
|
|
* ApiKeyAuthDataSourceItem
|
|
*/
|
|
export const zApiKeyAuthDataSourceItem = z.object({
|
|
category: z.string(),
|
|
created_at: z.int(),
|
|
disabled: z.boolean(),
|
|
id: z.string(),
|
|
provider: z.string(),
|
|
updated_at: z.int(),
|
|
})
|
|
|
|
/**
|
|
* ApiKeyAuthDataSourceListResponse
|
|
*/
|
|
export const zApiKeyAuthDataSourceListResponse = z.object({
|
|
sources: z.array(zApiKeyAuthDataSourceItem),
|
|
})
|
|
|
|
/**
|
|
* ApiKeyAuthConfigPayload
|
|
*/
|
|
export const zApiKeyAuthConfigPayload = z.object({
|
|
api_key: z.string().min(1),
|
|
})
|
|
|
|
/**
|
|
* ApiKeyAuthCredentialsPayload
|
|
*/
|
|
export const zApiKeyAuthCredentialsPayload = z.object({
|
|
auth_type: z.string().min(1),
|
|
config: zApiKeyAuthConfigPayload,
|
|
})
|
|
|
|
/**
|
|
* ApiKeyAuthBindingPayload
|
|
*/
|
|
export const zApiKeyAuthBindingPayload = z.object({
|
|
category: z.string().min(1),
|
|
credentials: zApiKeyAuthCredentialsPayload,
|
|
provider: z.string().min(1),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetApiKeyAuthDataSourceResponse = zApiKeyAuthDataSourceListResponse
|
|
|
|
export const zPostApiKeyAuthDataSourceBindingBody = zApiKeyAuthBindingPayload
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostApiKeyAuthDataSourceBindingResponse = zSimpleResultResponse
|
|
|
|
export const zDeleteApiKeyAuthDataSourceByBindingIdPath = z.object({
|
|
binding_id: z.uuid(),
|
|
})
|
|
|
|
/**
|
|
* Binding deleted successfully
|
|
*/
|
|
export const zDeleteApiKeyAuthDataSourceByBindingIdResponse = z.void()
|