dify/packages/contracts/generated/api/console/billing/zod.gen.ts
非法操作 ed45016475
refactor(api): standardize console billing portal errors (#41055)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-24 01:55:48 +00:00

83 lines
1.7 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* BillingInvoiceResponse
*/
export const zBillingInvoiceResponse = z.object({
url: z.string(),
})
/**
* BillingOperationFailedErrorResponse
*/
export const zBillingOperationFailedErrorResponse = z.object({
code: z.literal('billing_operation_failed'),
message: z.string(),
status: z.literal(502),
})
/**
* BillingUnavailableErrorResponse
*/
export const zBillingUnavailableErrorResponse = z.object({
code: z.literal('billing_unavailable'),
message: z.string(),
status: z.literal(503),
})
/**
* PartnerTenantsPayload
*/
export const zPartnerTenantsPayload = z.object({
click_id: z.string(),
})
/**
* BillingResponse
*/
export const zBillingResponse = z.record(z.string(), z.unknown())
/**
* BillingSubscriptionResponse
*/
export const zBillingSubscriptionResponse = z.object({
url: z.string(),
})
/**
* BillingUnprocessableEntityErrorResponse
*/
export const zBillingUnprocessableEntityErrorResponse = z.object({
code: z.literal('unprocessable_entity'),
message: z.string(),
status: z.literal(422),
})
/**
* Success
*/
export const zGetBillingInvoicesResponse = zBillingInvoiceResponse
export const zPutBillingPartnersByPartnerKeyTenantsBody = zPartnerTenantsPayload
export const zPutBillingPartnersByPartnerKeyTenantsPath = z.object({
partner_key: z.string(),
})
/**
* Tenants synced to partner successfully
*/
export const zPutBillingPartnersByPartnerKeyTenantsResponse = zBillingResponse
export const zGetBillingSubscriptionQuery = z.object({
interval: z.enum(['month', 'year']),
plan: z.enum(['professional', 'team']),
})
/**
* Success
*/
export const zGetBillingSubscriptionResponse = zBillingSubscriptionResponse