演示目录只保留可重建的源码。运行密钥、数据卷、依赖和带口令的本地配置不进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
144 lines
3.2 KiB
TypeScript
Generated
144 lines
3.2 KiB
TypeScript
Generated
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* ComplianceDownloadResponse
|
|
*/
|
|
export const zComplianceDownloadResponse = z.object({
|
|
url: z.string(),
|
|
})
|
|
|
|
/**
|
|
* 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(),
|
|
})
|
|
|
|
/**
|
|
* ComplianceDownloadForbiddenError
|
|
*
|
|
* Your current plan does not allow downloading this compliance document.
|
|
*/
|
|
export const zComplianceDownloadForbiddenError = zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('compliance_download_forbidden'),
|
|
status: z.literal(403),
|
|
}),
|
|
)
|
|
|
|
/**
|
|
* ComplianceDocumentNotFoundError
|
|
*
|
|
* The compliance document was not found.
|
|
*/
|
|
export const zComplianceDocumentNotFoundError = zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('compliance_document_not_found'),
|
|
status: z.literal(404),
|
|
}),
|
|
)
|
|
|
|
/**
|
|
* BillingUnprocessableEntityErrorResponse
|
|
*/
|
|
export const zBillingUnprocessableEntityErrorResponse = z.object({
|
|
code: z.literal('unprocessable_entity'),
|
|
message: z.string(),
|
|
status: z.literal(422),
|
|
})
|
|
|
|
/**
|
|
* ComplianceRateLimitErrorResponse
|
|
*/
|
|
export const zComplianceRateLimitErrorResponse = z.object({
|
|
code: z.literal('compliance_rate_limit'),
|
|
message: z.string(),
|
|
status: z.literal(429),
|
|
})
|
|
|
|
/**
|
|
* BillingRequestInProgressError
|
|
*
|
|
* A previous request is still being processed. Please try again shortly.
|
|
*/
|
|
export const zBillingRequestInProgressError = zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('billing_request_in_progress'),
|
|
status: z.literal(429),
|
|
}),
|
|
)
|
|
|
|
/**
|
|
* ComplianceRateLimitError
|
|
*
|
|
* Rate limit exceeded for downloading compliance report.
|
|
*/
|
|
export const zComplianceRateLimitError = zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('compliance_rate_limit'),
|
|
status: z.literal(429),
|
|
}),
|
|
)
|
|
|
|
/**
|
|
* BillingOperationFailedErrorResponse
|
|
*/
|
|
export const zBillingOperationFailedErrorResponse = z.object({
|
|
code: z.literal('billing_operation_failed'),
|
|
message: z.string(),
|
|
status: z.literal(502),
|
|
})
|
|
|
|
/**
|
|
* BillingOperationFailedError
|
|
*
|
|
* We couldn't complete this request. Please try again. If the problem persists, contact support.
|
|
*/
|
|
export const zBillingOperationFailedError = zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('billing_operation_failed'),
|
|
status: z.literal(502),
|
|
}),
|
|
)
|
|
|
|
/**
|
|
* BillingUnavailableErrorResponse
|
|
*/
|
|
export const zBillingUnavailableErrorResponse = z.object({
|
|
code: z.literal('billing_unavailable'),
|
|
message: z.string(),
|
|
status: z.literal(503),
|
|
})
|
|
|
|
/**
|
|
* BillingUnavailableError
|
|
*
|
|
* This operation is temporarily unavailable. Please try again later.
|
|
*/
|
|
export const zBillingUnavailableError = zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('billing_unavailable'),
|
|
status: z.literal(503),
|
|
}),
|
|
)
|
|
|
|
export const zGetComplianceDownloadQuery = z.object({
|
|
doc_name: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetComplianceDownloadResponse = zComplianceDownloadResponse
|