dify/packages/contracts/generated/api/console/billing/orpc.gen.ts
Stephen Zhou 5d77c0af08
refactor: fix OpenAPI contract generation schemas (#37387)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-06-12 14:25:53 +00:00

85 lines
1.7 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetBillingInvoicesResponse,
zGetBillingSubscriptionQuery,
zGetBillingSubscriptionResponse,
zPutBillingPartnersByPartnerKeyTenantsBody,
zPutBillingPartnersByPartnerKeyTenantsPath,
zPutBillingPartnersByPartnerKeyTenantsResponse,
} from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getBillingInvoices',
path: '/billing/invoices',
tags: ['console'],
})
.output(zGetBillingInvoicesResponse)
export const invoices = {
get,
}
/**
* Sync partner tenants bindings
*/
export const put = oc
.route({
description: 'Sync partner tenants bindings',
inputStructure: 'detailed',
method: 'PUT',
operationId: 'putBillingPartnersByPartnerKeyTenants',
path: '/billing/partners/{partner_key}/tenants',
tags: ['console'],
})
.input(
z.object({
body: zPutBillingPartnersByPartnerKeyTenantsBody,
params: zPutBillingPartnersByPartnerKeyTenantsPath,
}),
)
.output(zPutBillingPartnersByPartnerKeyTenantsResponse)
export const tenants = {
put,
}
export const byPartnerKey = {
tenants,
}
export const partners = {
byPartnerKey,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getBillingSubscription',
path: '/billing/subscription',
tags: ['console'],
})
.input(z.object({ query: zGetBillingSubscriptionQuery }))
.output(zGetBillingSubscriptionResponse)
export const subscription = {
get: get2,
}
export const billing = {
invoices,
partners,
subscription,
}
export const contract = {
billing,
}