Files
dify/packages/contracts/generated/api/console/billing/orpc.gen.ts
2026-04-30 11:34:27 +00:00

83 lines
1.6 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetBillingInvoicesResponse,
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'],
})
.output(zGetBillingSubscriptionResponse)
export const subscription = {
get: get2,
}
export const billing = {
invoices,
partners,
subscription,
}
export const contract = {
billing,
}