chore: generate contact from api (#35748)

This commit is contained in:
Stephen Zhou
2026-04-30 19:34:27 +08:00
committed by GitHub
parent 458fab1c48
commit 574d5865f4
159 changed files with 52440 additions and 1378 deletions
+5 -1
View File
@@ -113,9 +113,13 @@ jobs:
find . -name "*.py.bak" -type f -delete
- name: Setup web environment
if: github.event_name != 'merge_group' && steps.web-changes.outputs.any_changed == 'true'
if: github.event_name != 'merge_group'
uses: ./.github/actions/setup-web
- name: Generate API contracts
if: github.event_name != 'merge_group' && steps.api-changes.outputs.any_changed == 'true'
run: pnpm --filter @dify/contracts gen-api-contract
- name: ESLint autofix
if: github.event_name != 'merge_group' && steps.web-changes.outputs.any_changed == 'true'
run: |
+3
View File
@@ -219,6 +219,9 @@ node_modules
# plugin migrate
plugins.jsonl
# generated API OpenAPI specs
packages/contracts/openapi/
# mise
mise.toml
@@ -0,0 +1,378 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetAccountAvatarQuery,
zGetAccountAvatarResponse,
zGetAccountDeleteVerifyResponse,
zGetAccountEducationAutocompleteQuery,
zGetAccountEducationAutocompleteResponse,
zGetAccountEducationResponse,
zGetAccountEducationVerifyResponse,
zGetAccountIntegratesResponse,
zGetAccountProfileResponse,
zPostAccountAvatarBody,
zPostAccountAvatarResponse,
zPostAccountChangeEmailBody,
zPostAccountChangeEmailCheckEmailUniqueBody,
zPostAccountChangeEmailCheckEmailUniqueResponse,
zPostAccountChangeEmailResetBody,
zPostAccountChangeEmailResetResponse,
zPostAccountChangeEmailResponse,
zPostAccountChangeEmailValidityBody,
zPostAccountChangeEmailValidityResponse,
zPostAccountDeleteBody,
zPostAccountDeleteFeedbackBody,
zPostAccountDeleteFeedbackResponse,
zPostAccountDeleteResponse,
zPostAccountEducationBody,
zPostAccountEducationResponse,
zPostAccountInitBody,
zPostAccountInitResponse,
zPostAccountInterfaceLanguageBody,
zPostAccountInterfaceLanguageResponse,
zPostAccountInterfaceThemeBody,
zPostAccountInterfaceThemeResponse,
zPostAccountNameBody,
zPostAccountNameResponse,
zPostAccountPasswordBody,
zPostAccountPasswordResponse,
zPostAccountTimezoneBody,
zPostAccountTimezoneResponse,
} from './zod.gen'
/**
* Get account avatar url
*/
export const get = oc
.route({
description: 'Get account avatar url',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountAvatar',
path: '/account/avatar',
tags: ['console'],
})
.input(z.object({ query: zGetAccountAvatarQuery }))
.output(zGetAccountAvatarResponse)
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountAvatar',
path: '/account/avatar',
tags: ['console'],
})
.input(z.object({ body: zPostAccountAvatarBody }))
.output(zPostAccountAvatarResponse)
export const avatar = {
get,
post,
}
export const post2 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountChangeEmailCheckEmailUnique',
path: '/account/change-email/check-email-unique',
tags: ['console'],
})
.input(z.object({ body: zPostAccountChangeEmailCheckEmailUniqueBody }))
.output(zPostAccountChangeEmailCheckEmailUniqueResponse)
export const checkEmailUnique = {
post: post2,
}
export const post3 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountChangeEmailReset',
path: '/account/change-email/reset',
tags: ['console'],
})
.input(z.object({ body: zPostAccountChangeEmailResetBody }))
.output(zPostAccountChangeEmailResetResponse)
export const reset = {
post: post3,
}
export const post4 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountChangeEmailValidity',
path: '/account/change-email/validity',
tags: ['console'],
})
.input(z.object({ body: zPostAccountChangeEmailValidityBody }))
.output(zPostAccountChangeEmailValidityResponse)
export const validity = {
post: post4,
}
export const post5 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountChangeEmail',
path: '/account/change-email',
tags: ['console'],
})
.input(z.object({ body: zPostAccountChangeEmailBody }))
.output(zPostAccountChangeEmailResponse)
export const changeEmail = {
post: post5,
checkEmailUnique,
reset,
validity,
}
export const post6 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountDeleteFeedback',
path: '/account/delete/feedback',
tags: ['console'],
})
.input(z.object({ body: zPostAccountDeleteFeedbackBody }))
.output(zPostAccountDeleteFeedbackResponse)
export const feedback = {
post: post6,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountDeleteVerify',
path: '/account/delete/verify',
tags: ['console'],
})
.output(zGetAccountDeleteVerifyResponse)
export const verify = {
get: get2,
}
export const post7 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountDelete',
path: '/account/delete',
tags: ['console'],
})
.input(z.object({ body: zPostAccountDeleteBody }))
.output(zPostAccountDeleteResponse)
export const delete_ = {
post: post7,
feedback,
verify,
}
export const get3 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountEducationAutocomplete',
path: '/account/education/autocomplete',
tags: ['console'],
})
.input(z.object({ query: zGetAccountEducationAutocompleteQuery }))
.output(zGetAccountEducationAutocompleteResponse)
export const autocomplete = {
get: get3,
}
export const get4 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountEducationVerify',
path: '/account/education/verify',
tags: ['console'],
})
.output(zGetAccountEducationVerifyResponse)
export const verify2 = {
get: get4,
}
export const get5 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountEducation',
path: '/account/education',
tags: ['console'],
})
.output(zGetAccountEducationResponse)
export const post8 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountEducation',
path: '/account/education',
tags: ['console'],
})
.input(z.object({ body: zPostAccountEducationBody }))
.output(zPostAccountEducationResponse)
export const education = {
get: get5,
post: post8,
autocomplete,
verify: verify2,
}
export const post9 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountInit',
path: '/account/init',
tags: ['console'],
})
.input(z.object({ body: zPostAccountInitBody }))
.output(zPostAccountInitResponse)
export const init = {
post: post9,
}
export const get6 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountIntegrates',
path: '/account/integrates',
tags: ['console'],
})
.output(zGetAccountIntegratesResponse)
export const integrates = {
get: get6,
}
export const post10 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountInterfaceLanguage',
path: '/account/interface-language',
tags: ['console'],
})
.input(z.object({ body: zPostAccountInterfaceLanguageBody }))
.output(zPostAccountInterfaceLanguageResponse)
export const interfaceLanguage = {
post: post10,
}
export const post11 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountInterfaceTheme',
path: '/account/interface-theme',
tags: ['console'],
})
.input(z.object({ body: zPostAccountInterfaceThemeBody }))
.output(zPostAccountInterfaceThemeResponse)
export const interfaceTheme = {
post: post11,
}
export const post12 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountName',
path: '/account/name',
tags: ['console'],
})
.input(z.object({ body: zPostAccountNameBody }))
.output(zPostAccountNameResponse)
export const name = {
post: post12,
}
export const post13 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountPassword',
path: '/account/password',
tags: ['console'],
})
.input(z.object({ body: zPostAccountPasswordBody }))
.output(zPostAccountPasswordResponse)
export const password = {
post: post13,
}
export const get7 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountProfile',
path: '/account/profile',
tags: ['console'],
})
.output(zGetAccountProfileResponse)
export const profile = {
get: get7,
}
export const post14 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountTimezone',
path: '/account/timezone',
tags: ['console'],
})
.input(z.object({ body: zPostAccountTimezoneBody }))
.output(zPostAccountTimezoneResponse)
export const timezone = {
post: post14,
}
export const account = {
avatar,
changeEmail,
delete: delete_,
education,
init,
integrates,
interfaceLanguage,
interfaceTheme,
name,
password,
profile,
timezone,
}
export const contract = {
account,
}
@@ -0,0 +1,429 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type AccountAvatarPayload = {
avatar: string
}
export type Account = {
avatar?: string | null
created_at?: number | null
email: string
id: string
interface_language?: string | null
interface_theme?: string | null
is_password_set: boolean
last_login_at?: number | null
last_login_ip?: string | null
name: string
timezone?: string | null
}
export type ChangeEmailSendPayload = {
email: string
language?: string | null
phase?: string | null
token?: string | null
}
export type CheckEmailUniquePayload = {
email: string
}
export type ChangeEmailResetPayload = {
new_email: string
token: string
}
export type ChangeEmailValidityPayload = {
code: string
email: string
token: string
}
export type AccountDeletePayload = {
code: string
token: string
}
export type AccountDeletionFeedbackPayload = {
email: string
feedback: string
}
export type EducationStatusResponse = {
allow_refresh?: boolean | null
expire_at?: number | null
is_student?: boolean | null
result?: boolean | null
}
export type EducationActivatePayload = {
institution: string
role: string
token: string
}
export type EducationAutocompleteResponse = {
curr_page?: number | null
data?: Array<string>
has_next?: boolean | null
}
export type EducationVerifyResponse = {
token?: string | null
}
export type AccountInitPayload = {
interface_language: string
invitation_code?: string | null
timezone: string
}
export type AccountIntegrateListResponse = {
data: Array<AccountIntegrateResponse>
}
export type AccountInterfaceLanguagePayload = {
interface_language: string
}
export type AccountInterfaceThemePayload = {
interface_theme: 'light' | 'dark'
}
export type AccountNamePayload = {
name: string
}
export type AccountPasswordPayload = {
new_password: string
password?: string | null
repeat_new_password: string
}
export type AccountTimezonePayload = {
timezone: string
}
export type AccountIntegrateResponse = {
created_at?: number | null
is_bound: boolean
link?: string | null
provider: string
}
export type GetAccountAvatarData = {
body?: never
path?: never
query: {
avatar: string
}
url: '/account/avatar'
}
export type GetAccountAvatarResponses = {
200: {
[key: string]: unknown
}
}
export type GetAccountAvatarResponse = GetAccountAvatarResponses[keyof GetAccountAvatarResponses]
export type PostAccountAvatarData = {
body: AccountAvatarPayload
path?: never
query?: never
url: '/account/avatar'
}
export type PostAccountAvatarResponses = {
200: Account
}
export type PostAccountAvatarResponse = PostAccountAvatarResponses[keyof PostAccountAvatarResponses]
export type PostAccountChangeEmailData = {
body: ChangeEmailSendPayload
path?: never
query?: never
url: '/account/change-email'
}
export type PostAccountChangeEmailResponses = {
200: {
[key: string]: unknown
}
}
export type PostAccountChangeEmailResponse
= PostAccountChangeEmailResponses[keyof PostAccountChangeEmailResponses]
export type PostAccountChangeEmailCheckEmailUniqueData = {
body: CheckEmailUniquePayload
path?: never
query?: never
url: '/account/change-email/check-email-unique'
}
export type PostAccountChangeEmailCheckEmailUniqueResponses = {
200: {
[key: string]: unknown
}
}
export type PostAccountChangeEmailCheckEmailUniqueResponse
= PostAccountChangeEmailCheckEmailUniqueResponses[keyof PostAccountChangeEmailCheckEmailUniqueResponses]
export type PostAccountChangeEmailResetData = {
body: ChangeEmailResetPayload
path?: never
query?: never
url: '/account/change-email/reset'
}
export type PostAccountChangeEmailResetResponses = {
200: Account
}
export type PostAccountChangeEmailResetResponse
= PostAccountChangeEmailResetResponses[keyof PostAccountChangeEmailResetResponses]
export type PostAccountChangeEmailValidityData = {
body: ChangeEmailValidityPayload
path?: never
query?: never
url: '/account/change-email/validity'
}
export type PostAccountChangeEmailValidityResponses = {
200: {
[key: string]: unknown
}
}
export type PostAccountChangeEmailValidityResponse
= PostAccountChangeEmailValidityResponses[keyof PostAccountChangeEmailValidityResponses]
export type PostAccountDeleteData = {
body: AccountDeletePayload
path?: never
query?: never
url: '/account/delete'
}
export type PostAccountDeleteResponses = {
200: {
[key: string]: unknown
}
}
export type PostAccountDeleteResponse = PostAccountDeleteResponses[keyof PostAccountDeleteResponses]
export type PostAccountDeleteFeedbackData = {
body: AccountDeletionFeedbackPayload
path?: never
query?: never
url: '/account/delete/feedback'
}
export type PostAccountDeleteFeedbackResponses = {
200: {
[key: string]: unknown
}
}
export type PostAccountDeleteFeedbackResponse
= PostAccountDeleteFeedbackResponses[keyof PostAccountDeleteFeedbackResponses]
export type GetAccountDeleteVerifyData = {
body?: never
path?: never
query?: never
url: '/account/delete/verify'
}
export type GetAccountDeleteVerifyResponses = {
200: {
[key: string]: unknown
}
}
export type GetAccountDeleteVerifyResponse
= GetAccountDeleteVerifyResponses[keyof GetAccountDeleteVerifyResponses]
export type GetAccountEducationData = {
body?: never
path?: never
query?: never
url: '/account/education'
}
export type GetAccountEducationResponses = {
200: EducationStatusResponse
}
export type GetAccountEducationResponse
= GetAccountEducationResponses[keyof GetAccountEducationResponses]
export type PostAccountEducationData = {
body: EducationActivatePayload
path?: never
query?: never
url: '/account/education'
}
export type PostAccountEducationResponses = {
200: {
[key: string]: unknown
}
}
export type PostAccountEducationResponse
= PostAccountEducationResponses[keyof PostAccountEducationResponses]
export type GetAccountEducationAutocompleteData = {
body?: never
path?: never
query: {
keywords: string
limit?: number
page?: number
}
url: '/account/education/autocomplete'
}
export type GetAccountEducationAutocompleteResponses = {
200: EducationAutocompleteResponse
}
export type GetAccountEducationAutocompleteResponse
= GetAccountEducationAutocompleteResponses[keyof GetAccountEducationAutocompleteResponses]
export type GetAccountEducationVerifyData = {
body?: never
path?: never
query?: never
url: '/account/education/verify'
}
export type GetAccountEducationVerifyResponses = {
200: EducationVerifyResponse
}
export type GetAccountEducationVerifyResponse
= GetAccountEducationVerifyResponses[keyof GetAccountEducationVerifyResponses]
export type PostAccountInitData = {
body: AccountInitPayload
path?: never
query?: never
url: '/account/init'
}
export type PostAccountInitResponses = {
200: {
[key: string]: unknown
}
}
export type PostAccountInitResponse = PostAccountInitResponses[keyof PostAccountInitResponses]
export type GetAccountIntegratesData = {
body?: never
path?: never
query?: never
url: '/account/integrates'
}
export type GetAccountIntegratesResponses = {
200: AccountIntegrateListResponse
}
export type GetAccountIntegratesResponse
= GetAccountIntegratesResponses[keyof GetAccountIntegratesResponses]
export type PostAccountInterfaceLanguageData = {
body: AccountInterfaceLanguagePayload
path?: never
query?: never
url: '/account/interface-language'
}
export type PostAccountInterfaceLanguageResponses = {
200: Account
}
export type PostAccountInterfaceLanguageResponse
= PostAccountInterfaceLanguageResponses[keyof PostAccountInterfaceLanguageResponses]
export type PostAccountInterfaceThemeData = {
body: AccountInterfaceThemePayload
path?: never
query?: never
url: '/account/interface-theme'
}
export type PostAccountInterfaceThemeResponses = {
200: Account
}
export type PostAccountInterfaceThemeResponse
= PostAccountInterfaceThemeResponses[keyof PostAccountInterfaceThemeResponses]
export type PostAccountNameData = {
body: AccountNamePayload
path?: never
query?: never
url: '/account/name'
}
export type PostAccountNameResponses = {
200: Account
}
export type PostAccountNameResponse = PostAccountNameResponses[keyof PostAccountNameResponses]
export type PostAccountPasswordData = {
body: AccountPasswordPayload
path?: never
query?: never
url: '/account/password'
}
export type PostAccountPasswordResponses = {
200: Account
}
export type PostAccountPasswordResponse
= PostAccountPasswordResponses[keyof PostAccountPasswordResponses]
export type GetAccountProfileData = {
body?: never
path?: never
query?: never
url: '/account/profile'
}
export type GetAccountProfileResponses = {
200: Account
}
export type GetAccountProfileResponse = GetAccountProfileResponses[keyof GetAccountProfileResponses]
export type PostAccountTimezoneData = {
body: AccountTimezonePayload
path?: never
query?: never
url: '/account/timezone'
}
export type PostAccountTimezoneResponses = {
200: Account
}
export type PostAccountTimezoneResponse
= PostAccountTimezoneResponses[keyof PostAccountTimezoneResponses]
@@ -0,0 +1,318 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* AccountAvatarPayload
*/
export const zAccountAvatarPayload = z.object({
avatar: z.string(),
})
/**
* Account
*/
export const zAccount = z.object({
avatar: z.string().nullish(),
created_at: z.int().nullish(),
email: z.string(),
id: z.string(),
interface_language: z.string().nullish(),
interface_theme: z.string().nullish(),
is_password_set: z.boolean(),
last_login_at: z.int().nullish(),
last_login_ip: z.string().nullish(),
name: z.string(),
timezone: z.string().nullish(),
})
/**
* ChangeEmailSendPayload
*/
export const zChangeEmailSendPayload = z.object({
email: z.string(),
language: z.string().nullish(),
phase: z.string().nullish(),
token: z.string().nullish(),
})
/**
* CheckEmailUniquePayload
*/
export const zCheckEmailUniquePayload = z.object({
email: z.string(),
})
/**
* ChangeEmailResetPayload
*/
export const zChangeEmailResetPayload = z.object({
new_email: z.string(),
token: z.string(),
})
/**
* ChangeEmailValidityPayload
*/
export const zChangeEmailValidityPayload = z.object({
code: z.string(),
email: z.string(),
token: z.string(),
})
/**
* AccountDeletePayload
*/
export const zAccountDeletePayload = z.object({
code: z.string(),
token: z.string(),
})
/**
* AccountDeletionFeedbackPayload
*/
export const zAccountDeletionFeedbackPayload = z.object({
email: z.string(),
feedback: z.string(),
})
/**
* EducationStatusResponse
*/
export const zEducationStatusResponse = z.object({
allow_refresh: z.boolean().nullish(),
expire_at: z.int().nullish(),
is_student: z.boolean().nullish(),
result: z.boolean().nullish(),
})
/**
* EducationActivatePayload
*/
export const zEducationActivatePayload = z.object({
institution: z.string(),
role: z.string(),
token: z.string(),
})
/**
* EducationAutocompleteResponse
*/
export const zEducationAutocompleteResponse = z.object({
curr_page: z.int().nullish(),
data: z.array(z.string()).optional(),
has_next: z.boolean().nullish(),
})
/**
* EducationVerifyResponse
*/
export const zEducationVerifyResponse = z.object({
token: z.string().nullish(),
})
/**
* AccountInitPayload
*/
export const zAccountInitPayload = z.object({
interface_language: z.string(),
invitation_code: z.string().nullish(),
timezone: z.string(),
})
/**
* AccountInterfaceLanguagePayload
*/
export const zAccountInterfaceLanguagePayload = z.object({
interface_language: z.string(),
})
/**
* AccountInterfaceThemePayload
*/
export const zAccountInterfaceThemePayload = z.object({
interface_theme: z.enum(['light', 'dark']),
})
/**
* AccountNamePayload
*/
export const zAccountNamePayload = z.object({
name: z.string().min(3).max(30),
})
/**
* AccountPasswordPayload
*/
export const zAccountPasswordPayload = z.object({
new_password: z.string(),
password: z.string().nullish(),
repeat_new_password: z.string(),
})
/**
* AccountTimezonePayload
*/
export const zAccountTimezonePayload = z.object({
timezone: z.string(),
})
/**
* AccountIntegrateResponse
*/
export const zAccountIntegrateResponse = z.object({
created_at: z.int().nullish(),
is_bound: z.boolean(),
link: z.string().nullish(),
provider: z.string(),
})
/**
* AccountIntegrateListResponse
*/
export const zAccountIntegrateListResponse = z.object({
data: z.array(zAccountIntegrateResponse),
})
export const zGetAccountAvatarQuery = z.object({
avatar: z.string(),
})
/**
* Success
*/
export const zGetAccountAvatarResponse = z.record(z.string(), z.unknown())
export const zPostAccountAvatarBody = zAccountAvatarPayload
/**
* Success
*/
export const zPostAccountAvatarResponse = zAccount
export const zPostAccountChangeEmailBody = zChangeEmailSendPayload
/**
* Success
*/
export const zPostAccountChangeEmailResponse = z.record(z.string(), z.unknown())
export const zPostAccountChangeEmailCheckEmailUniqueBody = zCheckEmailUniquePayload
/**
* Success
*/
export const zPostAccountChangeEmailCheckEmailUniqueResponse = z.record(z.string(), z.unknown())
export const zPostAccountChangeEmailResetBody = zChangeEmailResetPayload
/**
* Success
*/
export const zPostAccountChangeEmailResetResponse = zAccount
export const zPostAccountChangeEmailValidityBody = zChangeEmailValidityPayload
/**
* Success
*/
export const zPostAccountChangeEmailValidityResponse = z.record(z.string(), z.unknown())
export const zPostAccountDeleteBody = zAccountDeletePayload
/**
* Success
*/
export const zPostAccountDeleteResponse = z.record(z.string(), z.unknown())
export const zPostAccountDeleteFeedbackBody = zAccountDeletionFeedbackPayload
/**
* Success
*/
export const zPostAccountDeleteFeedbackResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetAccountDeleteVerifyResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetAccountEducationResponse = zEducationStatusResponse
export const zPostAccountEducationBody = zEducationActivatePayload
/**
* Success
*/
export const zPostAccountEducationResponse = z.record(z.string(), z.unknown())
export const zGetAccountEducationAutocompleteQuery = z.object({
keywords: z.string(),
limit: z.int().optional().default(20),
page: z.int().optional().default(0),
})
/**
* Success
*/
export const zGetAccountEducationAutocompleteResponse = zEducationAutocompleteResponse
/**
* Success
*/
export const zGetAccountEducationVerifyResponse = zEducationVerifyResponse
export const zPostAccountInitBody = zAccountInitPayload
/**
* Success
*/
export const zPostAccountInitResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetAccountIntegratesResponse = zAccountIntegrateListResponse
export const zPostAccountInterfaceLanguageBody = zAccountInterfaceLanguagePayload
/**
* Success
*/
export const zPostAccountInterfaceLanguageResponse = zAccount
export const zPostAccountInterfaceThemeBody = zAccountInterfaceThemePayload
/**
* Success
*/
export const zPostAccountInterfaceThemeResponse = zAccount
export const zPostAccountNameBody = zAccountNamePayload
/**
* Success
*/
export const zPostAccountNameResponse = zAccount
export const zPostAccountPasswordBody = zAccountPasswordPayload
/**
* Success
*/
export const zPostAccountPasswordResponse = zAccount
/**
* Success
*/
export const zGetAccountProfileResponse = zAccount
export const zPostAccountTimezoneBody = zAccountTimezonePayload
/**
* Success
*/
export const zPostAccountTimezoneResponse = zAccount
@@ -0,0 +1,54 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetActivateCheckQuery,
zGetActivateCheckResponse,
zPostActivateBody,
zPostActivateResponse,
} from './zod.gen'
/**
* Check if activation token is valid
*/
export const get = oc
.route({
description: 'Check if activation token is valid',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getActivateCheck',
path: '/activate/check',
tags: ['console'],
})
.input(z.object({ query: zGetActivateCheckQuery }))
.output(zGetActivateCheckResponse)
export const check = {
get,
}
/**
* Activate account with invitation token
*/
export const post = oc
.route({
description: 'Activate account with invitation token',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postActivate',
path: '/activate',
tags: ['console'],
})
.input(z.object({ body: zPostActivateBody }))
.output(zPostActivateResponse)
export const activate = {
post,
check,
}
export const contract = {
activate,
}
@@ -0,0 +1,63 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type ActivatePayload = {
email?: string | null
interface_language: string
name: string
timezone: string
token: string
workspace_id?: string | null
}
export type ActivationResponse = {
result: string
}
export type ActivationCheckResponse = {
data?: {
[key: string]: unknown
} | null
is_valid: boolean
}
export type PostActivateData = {
body: ActivatePayload
path?: never
query?: never
url: '/activate'
}
export type PostActivateErrors = {
400: {
[key: string]: unknown
}
}
export type PostActivateError = PostActivateErrors[keyof PostActivateErrors]
export type PostActivateResponses = {
200: ActivationResponse
}
export type PostActivateResponse = PostActivateResponses[keyof PostActivateResponses]
export type GetActivateCheckData = {
body?: never
path?: never
query: {
email?: string | null
token: string
workspace_id?: string | null
}
url: '/activate/check'
}
export type GetActivateCheckResponses = {
200: ActivationCheckResponse
}
export type GetActivateCheckResponse = GetActivateCheckResponses[keyof GetActivateCheckResponses]
@@ -0,0 +1,48 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* ActivatePayload
*/
export const zActivatePayload = z.object({
email: z.string().nullish(),
interface_language: z.string(),
name: z.string().max(30),
timezone: z.string(),
token: z.string(),
workspace_id: z.string().nullish(),
})
/**
* ActivationResponse
*/
export const zActivationResponse = z.object({
result: z.string(),
})
/**
* ActivationCheckResponse
*/
export const zActivationCheckResponse = z.object({
data: z.record(z.string(), z.unknown()).nullish(),
is_valid: z.boolean(),
})
export const zPostActivateBody = zActivatePayload
/**
* Account activated successfully
*/
export const zPostActivateResponse = zActivationResponse
export const zGetActivateCheckQuery = z.object({
email: z.string().nullish(),
token: z.string(),
workspace_id: z.string().nullish(),
})
/**
* Success
*/
export const zGetActivateCheckResponse = zActivationCheckResponse
@@ -0,0 +1,153 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zDeleteAdminDeleteExploreBannerByBannerIdPath,
zDeleteAdminDeleteExploreBannerByBannerIdResponse,
zDeleteAdminInsertExploreAppsByAppIdPath,
zDeleteAdminInsertExploreAppsByAppIdResponse,
zPostAdminBatchAddNotificationAccountsResponse,
zPostAdminInsertExploreAppsBody,
zPostAdminInsertExploreAppsResponse,
zPostAdminInsertExploreBannerBody,
zPostAdminInsertExploreBannerResponse,
zPostAdminUpsertNotificationBody,
zPostAdminUpsertNotificationResponse,
} from './zod.gen'
/**
* Register target accounts for a notification by email address. JSON body: {"notification_id": "...", "user_email": ["a@example.com", ...]}. File upload: multipart/form-data with a 'file' field (CSV or TXT, one email per line) plus a 'notification_id' field. Emails that do not match any account are silently skipped.
*/
export const post = oc
.route({
description:
'Register target accounts for a notification by email address. JSON body: {"notification_id": "...", "user_email": ["a@example.com", ...]}. File upload: multipart/form-data with a \'file\' field (CSV or TXT, one email per line) plus a \'notification_id\' field. Emails that do not match any account are silently skipped.',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAdminBatchAddNotificationAccounts',
path: '/admin/batch_add_notification_accounts',
tags: ['console'],
})
.output(zPostAdminBatchAddNotificationAccountsResponse)
export const batchAddNotificationAccounts = {
post,
}
/**
* Delete an explore banner
*/
export const delete_ = oc
.route({
description: 'Delete an explore banner',
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAdminDeleteExploreBannerByBannerId',
path: '/admin/delete-explore-banner/{banner_id}',
successStatus: 204,
tags: ['console'],
})
.input(z.object({ params: zDeleteAdminDeleteExploreBannerByBannerIdPath }))
.output(zDeleteAdminDeleteExploreBannerByBannerIdResponse)
export const byBannerId = {
delete: delete_,
}
export const deleteExploreBanner = {
byBannerId,
}
/**
* Remove an app from the explore list
*/
export const delete2 = oc
.route({
description: 'Remove an app from the explore list',
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAdminInsertExploreAppsByAppId',
path: '/admin/insert-explore-apps/{app_id}',
successStatus: 204,
tags: ['console'],
})
.input(z.object({ params: zDeleteAdminInsertExploreAppsByAppIdPath }))
.output(zDeleteAdminInsertExploreAppsByAppIdResponse)
export const byAppId = {
delete: delete2,
}
/**
* Insert or update an app in the explore list
*/
export const post2 = oc
.route({
description: 'Insert or update an app in the explore list',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAdminInsertExploreApps',
path: '/admin/insert-explore-apps',
tags: ['console'],
})
.input(z.object({ body: zPostAdminInsertExploreAppsBody }))
.output(zPostAdminInsertExploreAppsResponse)
export const insertExploreApps = {
post: post2,
byAppId,
}
/**
* Insert an explore banner
*/
export const post3 = oc
.route({
description: 'Insert an explore banner',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAdminInsertExploreBanner',
path: '/admin/insert-explore-banner',
successStatus: 201,
tags: ['console'],
})
.input(z.object({ body: zPostAdminInsertExploreBannerBody }))
.output(zPostAdminInsertExploreBannerResponse)
export const insertExploreBanner = {
post: post3,
}
/**
* Create or update an in-product notification. Supply notification_id to update an existing one; omit it to create a new one. Pass at least one language variant in contents (zh / en / jp).
*/
export const post4 = oc
.route({
description:
'Create or update an in-product notification. Supply notification_id to update an existing one; omit it to create a new one. Pass at least one language variant in contents (zh / en / jp).',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAdminUpsertNotification',
path: '/admin/upsert_notification',
tags: ['console'],
})
.input(z.object({ body: zPostAdminUpsertNotificationBody }))
.output(zPostAdminUpsertNotificationResponse)
export const upsertNotification = {
post: post4,
}
export const admin = {
batchAddNotificationAccounts,
deleteExploreBanner,
insertExploreApps,
insertExploreBanner,
upsertNotification,
}
export const contract = {
admin,
}
@@ -0,0 +1,157 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type InsertExploreAppPayload = {
app_id: string
can_trial?: boolean
category: string
copyright?: string | null
custom_disclaimer?: string | null
desc?: string | null
language: string
position: number
privacy_policy?: string | null
trial_limit?: number
}
export type InsertExploreBannerPayload = {
'category': string
'description': string
'img-src': string
'language'?: string
'link': string
'sort': number
'title': string
}
export type UpsertNotificationPayload = {
contents: Array<LangContentPayload>
end_time?: string | null
frequency?: string
notification_id?: string | null
start_time?: string | null
status?: string
}
export type LangContentPayload = {
body: string
lang: string
subtitle?: string | null
title: string
title_pic_url?: string | null
}
export type PostAdminBatchAddNotificationAccountsData = {
body?: never
path?: never
query?: never
url: '/admin/batch_add_notification_accounts'
}
export type PostAdminBatchAddNotificationAccountsResponses = {
200: {
[key: string]: unknown
}
}
export type PostAdminBatchAddNotificationAccountsResponse
= PostAdminBatchAddNotificationAccountsResponses[keyof PostAdminBatchAddNotificationAccountsResponses]
export type DeleteAdminDeleteExploreBannerByBannerIdData = {
body?: never
path: {
banner_id: string
}
query?: never
url: '/admin/delete-explore-banner/{banner_id}'
}
export type DeleteAdminDeleteExploreBannerByBannerIdResponses = {
204: {
[key: string]: unknown
}
}
export type DeleteAdminDeleteExploreBannerByBannerIdResponse
= DeleteAdminDeleteExploreBannerByBannerIdResponses[keyof DeleteAdminDeleteExploreBannerByBannerIdResponses]
export type PostAdminInsertExploreAppsData = {
body: InsertExploreAppPayload
path?: never
query?: never
url: '/admin/insert-explore-apps'
}
export type PostAdminInsertExploreAppsErrors = {
404: {
[key: string]: unknown
}
}
export type PostAdminInsertExploreAppsError
= PostAdminInsertExploreAppsErrors[keyof PostAdminInsertExploreAppsErrors]
export type PostAdminInsertExploreAppsResponses = {
200: {
[key: string]: unknown
}
201: {
[key: string]: unknown
}
}
export type PostAdminInsertExploreAppsResponse
= PostAdminInsertExploreAppsResponses[keyof PostAdminInsertExploreAppsResponses]
export type DeleteAdminInsertExploreAppsByAppIdData = {
body?: never
path: {
app_id: string
}
query?: never
url: '/admin/insert-explore-apps/{app_id}'
}
export type DeleteAdminInsertExploreAppsByAppIdResponses = {
204: {
[key: string]: unknown
}
}
export type DeleteAdminInsertExploreAppsByAppIdResponse
= DeleteAdminInsertExploreAppsByAppIdResponses[keyof DeleteAdminInsertExploreAppsByAppIdResponses]
export type PostAdminInsertExploreBannerData = {
body: InsertExploreBannerPayload
path?: never
query?: never
url: '/admin/insert-explore-banner'
}
export type PostAdminInsertExploreBannerResponses = {
201: {
[key: string]: unknown
}
}
export type PostAdminInsertExploreBannerResponse
= PostAdminInsertExploreBannerResponses[keyof PostAdminInsertExploreBannerResponses]
export type PostAdminUpsertNotificationData = {
body: UpsertNotificationPayload
path?: never
query?: never
url: '/admin/upsert_notification'
}
export type PostAdminUpsertNotificationResponses = {
200: {
[key: string]: unknown
}
}
export type PostAdminUpsertNotificationResponse
= PostAdminUpsertNotificationResponses[keyof PostAdminUpsertNotificationResponses]
@@ -0,0 +1,99 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* InsertExploreAppPayload
*/
export const zInsertExploreAppPayload = z.object({
app_id: z.string(),
can_trial: z.boolean().optional().default(false),
category: z.string(),
copyright: z.string().nullish(),
custom_disclaimer: z.string().nullish(),
desc: z.string().nullish(),
language: z.string(),
position: z.int(),
privacy_policy: z.string().nullish(),
trial_limit: z.int().optional().default(0),
})
/**
* InsertExploreBannerPayload
*/
export const zInsertExploreBannerPayload = z.object({
'category': z.string(),
'description': z.string(),
'img-src': z.string(),
'language': z.string().optional().default('en-US'),
'link': z.string(),
'sort': z.int(),
'title': z.string(),
})
/**
* LangContentPayload
*/
export const zLangContentPayload = z.object({
body: z.string(),
lang: z.string(),
subtitle: z.string().nullish(),
title: z.string(),
title_pic_url: z.string().nullish(),
})
/**
* UpsertNotificationPayload
*/
export const zUpsertNotificationPayload = z.object({
contents: z.array(zLangContentPayload).min(1),
end_time: z.string().nullish(),
frequency: z.string().optional().default('once'),
notification_id: z.string().nullish(),
start_time: z.string().nullish(),
status: z.string().optional().default('active'),
})
/**
* Accounts added successfully
*/
export const zPostAdminBatchAddNotificationAccountsResponse = z.record(z.string(), z.unknown())
export const zDeleteAdminDeleteExploreBannerByBannerIdPath = z.object({
banner_id: z.string(),
})
/**
* Banner deleted successfully
*/
export const zDeleteAdminDeleteExploreBannerByBannerIdResponse = z.record(z.string(), z.unknown())
export const zPostAdminInsertExploreAppsBody = zInsertExploreAppPayload
export const zPostAdminInsertExploreAppsResponse = z.union([
z.record(z.string(), z.unknown()),
z.record(z.string(), z.unknown()),
])
export const zDeleteAdminInsertExploreAppsByAppIdPath = z.object({
app_id: z.string(),
})
/**
* App removed successfully
*/
export const zDeleteAdminInsertExploreAppsByAppIdResponse = z.record(z.string(), z.unknown())
export const zPostAdminInsertExploreBannerBody = zInsertExploreBannerPayload
/**
* Banner inserted successfully
*/
export const zPostAdminInsertExploreBannerResponse = z.record(z.string(), z.unknown())
export const zPostAdminUpsertNotificationBody = zUpsertNotificationPayload
/**
* Notification upserted successfully
*/
export const zPostAdminUpsertNotificationResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,25 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import { zGetAllWorkspacesQuery, zGetAllWorkspacesResponse } from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAllWorkspaces',
path: '/all-workspaces',
tags: ['console'],
})
.input(z.object({ query: zGetAllWorkspacesQuery.optional() }))
.output(zGetAllWorkspacesResponse)
export const allWorkspaces = {
get,
}
export const contract = {
allWorkspaces,
}
@@ -0,0 +1,23 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type GetAllWorkspacesData = {
body?: never
path?: never
query?: {
limit?: number
page?: number
}
url: '/all-workspaces'
}
export type GetAllWorkspacesResponses = {
200: {
[key: string]: unknown
}
}
export type GetAllWorkspacesResponse = GetAllWorkspacesResponses[keyof GetAllWorkspacesResponses]
@@ -0,0 +1,13 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
export const zGetAllWorkspacesQuery = z.object({
limit: z.int().gte(1).lte(100).optional().default(20),
page: z.int().gte(1).lte(99999).optional().default(1),
})
/**
* Success
*/
export const zGetAllWorkspacesResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,109 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zDeleteApiBasedExtensionByIdPath,
zDeleteApiBasedExtensionByIdResponse,
zGetApiBasedExtensionByIdPath,
zGetApiBasedExtensionByIdResponse,
zGetApiBasedExtensionResponse,
zPostApiBasedExtensionBody,
zPostApiBasedExtensionByIdBody,
zPostApiBasedExtensionByIdPath,
zPostApiBasedExtensionByIdResponse,
zPostApiBasedExtensionResponse,
} from './zod.gen'
/**
* Delete API-based extension
*/
export const delete_ = oc
.route({
description: 'Delete API-based extension',
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteApiBasedExtensionById',
path: '/api-based-extension/{id}',
successStatus: 204,
tags: ['console'],
})
.input(z.object({ params: zDeleteApiBasedExtensionByIdPath }))
.output(zDeleteApiBasedExtensionByIdResponse)
/**
* Get API-based extension by ID
*/
export const get = oc
.route({
description: 'Get API-based extension by ID',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getApiBasedExtensionById',
path: '/api-based-extension/{id}',
tags: ['console'],
})
.input(z.object({ params: zGetApiBasedExtensionByIdPath }))
.output(zGetApiBasedExtensionByIdResponse)
/**
* Update API-based extension
*/
export const post = oc
.route({
description: 'Update API-based extension',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postApiBasedExtensionById',
path: '/api-based-extension/{id}',
tags: ['console'],
})
.input(z.object({ body: zPostApiBasedExtensionByIdBody, params: zPostApiBasedExtensionByIdPath }))
.output(zPostApiBasedExtensionByIdResponse)
export const byId = {
delete: delete_,
get,
post,
}
/**
* Get all API-based extensions for current tenant
*/
export const get2 = oc
.route({
description: 'Get all API-based extensions for current tenant',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getApiBasedExtension',
path: '/api-based-extension',
tags: ['console'],
})
.output(zGetApiBasedExtensionResponse)
/**
* Create a new API-based extension
*/
export const post2 = oc
.route({
description: 'Create a new API-based extension',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postApiBasedExtension',
path: '/api-based-extension',
successStatus: 201,
tags: ['console'],
})
.input(z.object({ body: zPostApiBasedExtensionBody }))
.output(zPostApiBasedExtensionResponse)
export const apiBasedExtension = {
get: get2,
post: post2,
byId,
}
export const contract = {
apiBasedExtension,
}
@@ -0,0 +1,99 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type ApiBasedExtensionListResponse = Array<ApiBasedExtensionResponse>
export type ApiBasedExtensionPayload = {
api_endpoint: string
api_key: string
name: string
}
export type ApiBasedExtensionResponse = {
api_endpoint: string
api_key: string
created_at?: number | null
id: string
name: string
}
export type GetApiBasedExtensionData = {
body?: never
path?: never
query?: never
url: '/api-based-extension'
}
export type GetApiBasedExtensionResponses = {
200: ApiBasedExtensionListResponse
}
export type GetApiBasedExtensionResponse
= GetApiBasedExtensionResponses[keyof GetApiBasedExtensionResponses]
export type PostApiBasedExtensionData = {
body: ApiBasedExtensionPayload
path?: never
query?: never
url: '/api-based-extension'
}
export type PostApiBasedExtensionResponses = {
201: ApiBasedExtensionResponse
}
export type PostApiBasedExtensionResponse
= PostApiBasedExtensionResponses[keyof PostApiBasedExtensionResponses]
export type DeleteApiBasedExtensionByIdData = {
body?: never
path: {
id: string
}
query?: never
url: '/api-based-extension/{id}'
}
export type DeleteApiBasedExtensionByIdResponses = {
204: {
[key: string]: unknown
}
}
export type DeleteApiBasedExtensionByIdResponse
= DeleteApiBasedExtensionByIdResponses[keyof DeleteApiBasedExtensionByIdResponses]
export type GetApiBasedExtensionByIdData = {
body?: never
path: {
id: string
}
query?: never
url: '/api-based-extension/{id}'
}
export type GetApiBasedExtensionByIdResponses = {
200: ApiBasedExtensionResponse
}
export type GetApiBasedExtensionByIdResponse
= GetApiBasedExtensionByIdResponses[keyof GetApiBasedExtensionByIdResponses]
export type PostApiBasedExtensionByIdData = {
body: ApiBasedExtensionPayload
path: {
id: string
}
query?: never
url: '/api-based-extension/{id}'
}
export type PostApiBasedExtensionByIdResponses = {
200: ApiBasedExtensionResponse
}
export type PostApiBasedExtensionByIdResponse
= PostApiBasedExtensionByIdResponses[keyof PostApiBasedExtensionByIdResponses]
@@ -0,0 +1,66 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* APIBasedExtensionPayload
*/
export const zApiBasedExtensionPayload = z.object({
api_endpoint: z.string(),
api_key: z.string(),
name: z.string(),
})
/**
* APIBasedExtensionResponse
*/
export const zApiBasedExtensionResponse = z.object({
api_endpoint: z.string(),
api_key: z.string(),
created_at: z.int().nullish(),
id: z.string(),
name: z.string(),
})
export const zApiBasedExtensionListResponse = z.array(zApiBasedExtensionResponse)
/**
* Success
*/
export const zGetApiBasedExtensionResponse = zApiBasedExtensionListResponse
export const zPostApiBasedExtensionBody = zApiBasedExtensionPayload
/**
* Extension created successfully
*/
export const zPostApiBasedExtensionResponse = zApiBasedExtensionResponse
export const zDeleteApiBasedExtensionByIdPath = z.object({
id: z.string(),
})
/**
* Extension deleted successfully
*/
export const zDeleteApiBasedExtensionByIdResponse = z.record(z.string(), z.unknown())
export const zGetApiBasedExtensionByIdPath = z.object({
id: z.string(),
})
/**
* Success
*/
export const zGetApiBasedExtensionByIdResponse = zApiBasedExtensionResponse
export const zPostApiBasedExtensionByIdBody = zApiBasedExtensionPayload
export const zPostApiBasedExtensionByIdPath = z.object({
id: z.string(),
})
/**
* Extension updated successfully
*/
export const zPostApiBasedExtensionByIdResponse = zApiBasedExtensionResponse
@@ -0,0 +1,66 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zDeleteApiKeyAuthDataSourceByBindingIdPath,
zDeleteApiKeyAuthDataSourceByBindingIdResponse,
zGetApiKeyAuthDataSourceResponse,
zPostApiKeyAuthDataSourceBindingBody,
zPostApiKeyAuthDataSourceBindingResponse,
} from './zod.gen'
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postApiKeyAuthDataSourceBinding',
path: '/api-key-auth/data-source/binding',
tags: ['console'],
})
.input(z.object({ body: zPostApiKeyAuthDataSourceBindingBody }))
.output(zPostApiKeyAuthDataSourceBindingResponse)
export const binding = {
post,
}
export const delete_ = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteApiKeyAuthDataSourceByBindingId',
path: '/api-key-auth/data-source/{binding_id}',
tags: ['console'],
})
.input(z.object({ params: zDeleteApiKeyAuthDataSourceByBindingIdPath }))
.output(zDeleteApiKeyAuthDataSourceByBindingIdResponse)
export const byBindingId = {
delete: delete_,
}
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getApiKeyAuthDataSource',
path: '/api-key-auth/data-source',
tags: ['console'],
})
.output(zGetApiKeyAuthDataSourceResponse)
export const dataSource = {
get,
binding,
byBindingId,
}
export const apiKeyAuth = {
dataSource,
}
export const contract = {
apiKeyAuth,
}
@@ -0,0 +1,63 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type ApiKeyAuthBindingPayload = {
category: string
credentials: {
[key: string]: unknown
}
provider: string
}
export type GetApiKeyAuthDataSourceData = {
body?: never
path?: never
query?: never
url: '/api-key-auth/data-source'
}
export type GetApiKeyAuthDataSourceResponses = {
200: {
[key: string]: unknown
}
}
export type GetApiKeyAuthDataSourceResponse
= GetApiKeyAuthDataSourceResponses[keyof GetApiKeyAuthDataSourceResponses]
export type PostApiKeyAuthDataSourceBindingData = {
body: ApiKeyAuthBindingPayload
path?: never
query?: never
url: '/api-key-auth/data-source/binding'
}
export type PostApiKeyAuthDataSourceBindingResponses = {
200: {
[key: string]: unknown
}
}
export type PostApiKeyAuthDataSourceBindingResponse
= PostApiKeyAuthDataSourceBindingResponses[keyof PostApiKeyAuthDataSourceBindingResponses]
export type DeleteApiKeyAuthDataSourceByBindingIdData = {
body?: never
path: {
binding_id: string
}
query?: never
url: '/api-key-auth/data-source/{binding_id}'
}
export type DeleteApiKeyAuthDataSourceByBindingIdResponses = {
200: {
[key: string]: unknown
}
}
export type DeleteApiKeyAuthDataSourceByBindingIdResponse
= DeleteApiKeyAuthDataSourceByBindingIdResponses[keyof DeleteApiKeyAuthDataSourceByBindingIdResponses]
@@ -0,0 +1,33 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* ApiKeyAuthBindingPayload
*/
export const zApiKeyAuthBindingPayload = z.object({
category: z.string(),
credentials: z.record(z.string(), z.unknown()),
provider: z.string(),
})
/**
* Success
*/
export const zGetApiKeyAuthDataSourceResponse = z.record(z.string(), z.unknown())
export const zPostApiKeyAuthDataSourceBindingBody = zApiKeyAuthBindingPayload
/**
* Success
*/
export const zPostApiKeyAuthDataSourceBindingResponse = z.record(z.string(), z.unknown())
export const zDeleteApiKeyAuthDataSourceByBindingIdPath = z.object({
binding_id: z.string(),
})
/**
* Success
*/
export const zDeleteApiKeyAuthDataSourceByBindingIdResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,33 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import { zGetAppPromptTemplatesQuery, zGetAppPromptTemplatesResponse } from './zod.gen'
/**
* Get advanced prompt templates based on app mode and model configuration
*/
export const get = oc
.route({
description: 'Get advanced prompt templates based on app mode and model configuration',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAppPromptTemplates',
path: '/app/prompt-templates',
tags: ['console'],
})
.input(z.object({ query: zGetAppPromptTemplatesQuery }))
.output(zGetAppPromptTemplatesResponse)
export const promptTemplates = {
get,
}
export const app = {
promptTemplates,
}
export const contract = {
app,
}
@@ -0,0 +1,35 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type GetAppPromptTemplatesData = {
body?: never
path?: never
query: {
app_mode: string
has_context?: string
model_mode: string
model_name: string
}
url: '/app/prompt-templates'
}
export type GetAppPromptTemplatesErrors = {
400: {
[key: string]: unknown
}
}
export type GetAppPromptTemplatesError
= GetAppPromptTemplatesErrors[keyof GetAppPromptTemplatesErrors]
export type GetAppPromptTemplatesResponses = {
200: Array<{
[key: string]: unknown
}>
}
export type GetAppPromptTemplatesResponse
= GetAppPromptTemplatesResponses[keyof GetAppPromptTemplatesResponses]
@@ -0,0 +1,15 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
export const zGetAppPromptTemplatesQuery = z.object({
app_mode: z.string(),
has_context: z.string().optional().default('true'),
model_mode: z.string(),
model_name: z.string(),
})
/**
* Prompt templates retrieved successfully
*/
export const zGetAppPromptTemplatesResponse = z.array(z.record(z.string(), z.unknown()))
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,226 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zDeleteAuthPluginDatasourceByProviderIdCustomClientPath,
zDeleteAuthPluginDatasourceByProviderIdCustomClientResponse,
zGetAuthPluginDatasourceByProviderIdPath,
zGetAuthPluginDatasourceByProviderIdResponse,
zGetAuthPluginDatasourceDefaultListResponse,
zGetAuthPluginDatasourceListResponse,
zPostAuthPluginDatasourceByProviderIdBody,
zPostAuthPluginDatasourceByProviderIdCustomClientBody,
zPostAuthPluginDatasourceByProviderIdCustomClientPath,
zPostAuthPluginDatasourceByProviderIdCustomClientResponse,
zPostAuthPluginDatasourceByProviderIdDefaultBody,
zPostAuthPluginDatasourceByProviderIdDefaultPath,
zPostAuthPluginDatasourceByProviderIdDefaultResponse,
zPostAuthPluginDatasourceByProviderIdDeleteBody,
zPostAuthPluginDatasourceByProviderIdDeletePath,
zPostAuthPluginDatasourceByProviderIdDeleteResponse,
zPostAuthPluginDatasourceByProviderIdPath,
zPostAuthPluginDatasourceByProviderIdResponse,
zPostAuthPluginDatasourceByProviderIdUpdateBody,
zPostAuthPluginDatasourceByProviderIdUpdateNameBody,
zPostAuthPluginDatasourceByProviderIdUpdateNamePath,
zPostAuthPluginDatasourceByProviderIdUpdateNameResponse,
zPostAuthPluginDatasourceByProviderIdUpdatePath,
zPostAuthPluginDatasourceByProviderIdUpdateResponse,
} from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAuthPluginDatasourceDefaultList',
path: '/auth/plugin/datasource/default-list',
tags: ['console'],
})
.output(zGetAuthPluginDatasourceDefaultListResponse)
export const defaultList = {
get,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAuthPluginDatasourceList',
path: '/auth/plugin/datasource/list',
tags: ['console'],
})
.output(zGetAuthPluginDatasourceListResponse)
export const list = {
get: get2,
}
export const delete_ = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteAuthPluginDatasourceByProviderIdCustomClient',
path: '/auth/plugin/datasource/{provider_id}/custom-client',
tags: ['console'],
})
.input(z.object({ params: zDeleteAuthPluginDatasourceByProviderIdCustomClientPath }))
.output(zDeleteAuthPluginDatasourceByProviderIdCustomClientResponse)
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAuthPluginDatasourceByProviderIdCustomClient',
path: '/auth/plugin/datasource/{provider_id}/custom-client',
tags: ['console'],
})
.input(
z.object({
body: zPostAuthPluginDatasourceByProviderIdCustomClientBody,
params: zPostAuthPluginDatasourceByProviderIdCustomClientPath,
}),
)
.output(zPostAuthPluginDatasourceByProviderIdCustomClientResponse)
export const customClient = {
delete: delete_,
post,
}
export const post2 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAuthPluginDatasourceByProviderIdDefault',
path: '/auth/plugin/datasource/{provider_id}/default',
tags: ['console'],
})
.input(
z.object({
body: zPostAuthPluginDatasourceByProviderIdDefaultBody,
params: zPostAuthPluginDatasourceByProviderIdDefaultPath,
}),
)
.output(zPostAuthPluginDatasourceByProviderIdDefaultResponse)
export const default_ = {
post: post2,
}
export const post3 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAuthPluginDatasourceByProviderIdDelete',
path: '/auth/plugin/datasource/{provider_id}/delete',
tags: ['console'],
})
.input(
z.object({
body: zPostAuthPluginDatasourceByProviderIdDeleteBody,
params: zPostAuthPluginDatasourceByProviderIdDeletePath,
}),
)
.output(zPostAuthPluginDatasourceByProviderIdDeleteResponse)
export const delete2 = {
post: post3,
}
export const post4 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAuthPluginDatasourceByProviderIdUpdate',
path: '/auth/plugin/datasource/{provider_id}/update',
tags: ['console'],
})
.input(
z.object({
body: zPostAuthPluginDatasourceByProviderIdUpdateBody,
params: zPostAuthPluginDatasourceByProviderIdUpdatePath,
}),
)
.output(zPostAuthPluginDatasourceByProviderIdUpdateResponse)
export const update = {
post: post4,
}
export const post5 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAuthPluginDatasourceByProviderIdUpdateName',
path: '/auth/plugin/datasource/{provider_id}/update-name',
tags: ['console'],
})
.input(
z.object({
body: zPostAuthPluginDatasourceByProviderIdUpdateNameBody,
params: zPostAuthPluginDatasourceByProviderIdUpdateNamePath,
}),
)
.output(zPostAuthPluginDatasourceByProviderIdUpdateNameResponse)
export const updateName = {
post: post5,
}
export const get3 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAuthPluginDatasourceByProviderId',
path: '/auth/plugin/datasource/{provider_id}',
tags: ['console'],
})
.input(z.object({ params: zGetAuthPluginDatasourceByProviderIdPath }))
.output(zGetAuthPluginDatasourceByProviderIdResponse)
export const post6 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAuthPluginDatasourceByProviderId',
path: '/auth/plugin/datasource/{provider_id}',
tags: ['console'],
})
.input(
z.object({
body: zPostAuthPluginDatasourceByProviderIdBody,
params: zPostAuthPluginDatasourceByProviderIdPath,
}),
)
.output(zPostAuthPluginDatasourceByProviderIdResponse)
export const byProviderId = {
get: get3,
post: post6,
customClient,
default: default_,
delete: delete2,
update,
updateName,
}
export const datasource = {
defaultList,
list,
byProviderId,
}
export const plugin = {
datasource,
}
export const auth = {
plugin,
}
export const contract = {
auth,
}
@@ -0,0 +1,216 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type DatasourceCredentialPayload = {
credentials: {
[key: string]: unknown
}
name?: string | null
}
export type DatasourceCustomClientPayload = {
client_params?: {
[key: string]: unknown
} | null
enable_oauth_custom_client?: boolean | null
}
export type DatasourceDefaultPayload = {
id: string
}
export type DatasourceCredentialDeletePayload = {
credential_id: string
}
export type DatasourceCredentialUpdatePayload = {
credential_id: string
credentials?: {
[key: string]: unknown
} | null
name?: string | null
}
export type DatasourceUpdateNamePayload = {
credential_id: string
name: string
}
export type GetAuthPluginDatasourceDefaultListData = {
body?: never
path?: never
query?: never
url: '/auth/plugin/datasource/default-list'
}
export type GetAuthPluginDatasourceDefaultListResponses = {
200: {
[key: string]: unknown
}
}
export type GetAuthPluginDatasourceDefaultListResponse
= GetAuthPluginDatasourceDefaultListResponses[keyof GetAuthPluginDatasourceDefaultListResponses]
export type GetAuthPluginDatasourceListData = {
body?: never
path?: never
query?: never
url: '/auth/plugin/datasource/list'
}
export type GetAuthPluginDatasourceListResponses = {
200: {
[key: string]: unknown
}
}
export type GetAuthPluginDatasourceListResponse
= GetAuthPluginDatasourceListResponses[keyof GetAuthPluginDatasourceListResponses]
export type GetAuthPluginDatasourceByProviderIdData = {
body?: never
path: {
provider_id: string
}
query?: never
url: '/auth/plugin/datasource/{provider_id}'
}
export type GetAuthPluginDatasourceByProviderIdResponses = {
200: {
[key: string]: unknown
}
}
export type GetAuthPluginDatasourceByProviderIdResponse
= GetAuthPluginDatasourceByProviderIdResponses[keyof GetAuthPluginDatasourceByProviderIdResponses]
export type PostAuthPluginDatasourceByProviderIdData = {
body: DatasourceCredentialPayload
path: {
provider_id: string
}
query?: never
url: '/auth/plugin/datasource/{provider_id}'
}
export type PostAuthPluginDatasourceByProviderIdResponses = {
200: {
[key: string]: unknown
}
}
export type PostAuthPluginDatasourceByProviderIdResponse
= PostAuthPluginDatasourceByProviderIdResponses[keyof PostAuthPluginDatasourceByProviderIdResponses]
export type DeleteAuthPluginDatasourceByProviderIdCustomClientData = {
body?: never
path: {
provider_id: string
}
query?: never
url: '/auth/plugin/datasource/{provider_id}/custom-client'
}
export type DeleteAuthPluginDatasourceByProviderIdCustomClientResponses = {
200: {
[key: string]: unknown
}
}
export type DeleteAuthPluginDatasourceByProviderIdCustomClientResponse
= DeleteAuthPluginDatasourceByProviderIdCustomClientResponses[keyof DeleteAuthPluginDatasourceByProviderIdCustomClientResponses]
export type PostAuthPluginDatasourceByProviderIdCustomClientData = {
body: DatasourceCustomClientPayload
path: {
provider_id: string
}
query?: never
url: '/auth/plugin/datasource/{provider_id}/custom-client'
}
export type PostAuthPluginDatasourceByProviderIdCustomClientResponses = {
200: {
[key: string]: unknown
}
}
export type PostAuthPluginDatasourceByProviderIdCustomClientResponse
= PostAuthPluginDatasourceByProviderIdCustomClientResponses[keyof PostAuthPluginDatasourceByProviderIdCustomClientResponses]
export type PostAuthPluginDatasourceByProviderIdDefaultData = {
body: DatasourceDefaultPayload
path: {
provider_id: string
}
query?: never
url: '/auth/plugin/datasource/{provider_id}/default'
}
export type PostAuthPluginDatasourceByProviderIdDefaultResponses = {
200: {
[key: string]: unknown
}
}
export type PostAuthPluginDatasourceByProviderIdDefaultResponse
= PostAuthPluginDatasourceByProviderIdDefaultResponses[keyof PostAuthPluginDatasourceByProviderIdDefaultResponses]
export type PostAuthPluginDatasourceByProviderIdDeleteData = {
body: DatasourceCredentialDeletePayload
path: {
provider_id: string
}
query?: never
url: '/auth/plugin/datasource/{provider_id}/delete'
}
export type PostAuthPluginDatasourceByProviderIdDeleteResponses = {
200: {
[key: string]: unknown
}
}
export type PostAuthPluginDatasourceByProviderIdDeleteResponse
= PostAuthPluginDatasourceByProviderIdDeleteResponses[keyof PostAuthPluginDatasourceByProviderIdDeleteResponses]
export type PostAuthPluginDatasourceByProviderIdUpdateData = {
body: DatasourceCredentialUpdatePayload
path: {
provider_id: string
}
query?: never
url: '/auth/plugin/datasource/{provider_id}/update'
}
export type PostAuthPluginDatasourceByProviderIdUpdateResponses = {
200: {
[key: string]: unknown
}
}
export type PostAuthPluginDatasourceByProviderIdUpdateResponse
= PostAuthPluginDatasourceByProviderIdUpdateResponses[keyof PostAuthPluginDatasourceByProviderIdUpdateResponses]
export type PostAuthPluginDatasourceByProviderIdUpdateNameData = {
body: DatasourceUpdateNamePayload
path: {
provider_id: string
}
query?: never
url: '/auth/plugin/datasource/{provider_id}/update-name'
}
export type PostAuthPluginDatasourceByProviderIdUpdateNameResponses = {
200: {
[key: string]: unknown
}
}
export type PostAuthPluginDatasourceByProviderIdUpdateNameResponse
= PostAuthPluginDatasourceByProviderIdUpdateNameResponses[keyof PostAuthPluginDatasourceByProviderIdUpdateNameResponses]
@@ -0,0 +1,156 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* DatasourceCredentialPayload
*/
export const zDatasourceCredentialPayload = z.object({
credentials: z.record(z.string(), z.unknown()),
name: z.string().max(100).nullish(),
})
/**
* DatasourceCustomClientPayload
*/
export const zDatasourceCustomClientPayload = z.object({
client_params: z.record(z.string(), z.unknown()).nullish(),
enable_oauth_custom_client: z.boolean().nullish(),
})
/**
* DatasourceDefaultPayload
*/
export const zDatasourceDefaultPayload = z.object({
id: z.string(),
})
/**
* DatasourceCredentialDeletePayload
*/
export const zDatasourceCredentialDeletePayload = z.object({
credential_id: z.string(),
})
/**
* DatasourceCredentialUpdatePayload
*/
export const zDatasourceCredentialUpdatePayload = z.object({
credential_id: z.string(),
credentials: z.record(z.string(), z.unknown()).nullish(),
name: z.string().max(100).nullish(),
})
/**
* DatasourceUpdateNamePayload
*/
export const zDatasourceUpdateNamePayload = z.object({
credential_id: z.string(),
name: z.string().max(100),
})
/**
* Success
*/
export const zGetAuthPluginDatasourceDefaultListResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetAuthPluginDatasourceListResponse = z.record(z.string(), z.unknown())
export const zGetAuthPluginDatasourceByProviderIdPath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zGetAuthPluginDatasourceByProviderIdResponse = z.record(z.string(), z.unknown())
export const zPostAuthPluginDatasourceByProviderIdBody = zDatasourceCredentialPayload
export const zPostAuthPluginDatasourceByProviderIdPath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zPostAuthPluginDatasourceByProviderIdResponse = z.record(z.string(), z.unknown())
export const zDeleteAuthPluginDatasourceByProviderIdCustomClientPath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zDeleteAuthPluginDatasourceByProviderIdCustomClientResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostAuthPluginDatasourceByProviderIdCustomClientBody = zDatasourceCustomClientPayload
export const zPostAuthPluginDatasourceByProviderIdCustomClientPath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zPostAuthPluginDatasourceByProviderIdCustomClientResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostAuthPluginDatasourceByProviderIdDefaultBody = zDatasourceDefaultPayload
export const zPostAuthPluginDatasourceByProviderIdDefaultPath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zPostAuthPluginDatasourceByProviderIdDefaultResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostAuthPluginDatasourceByProviderIdDeleteBody = zDatasourceCredentialDeletePayload
export const zPostAuthPluginDatasourceByProviderIdDeletePath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zPostAuthPluginDatasourceByProviderIdDeleteResponse = z.record(z.string(), z.unknown())
export const zPostAuthPluginDatasourceByProviderIdUpdateBody = zDatasourceCredentialUpdatePayload
export const zPostAuthPluginDatasourceByProviderIdUpdatePath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zPostAuthPluginDatasourceByProviderIdUpdateResponse = z.record(z.string(), z.unknown())
export const zPostAuthPluginDatasourceByProviderIdUpdateNameBody = zDatasourceUpdateNamePayload
export const zPostAuthPluginDatasourceByProviderIdUpdateNamePath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zPostAuthPluginDatasourceByProviderIdUpdateNameResponse = z.record(
z.string(),
z.unknown(),
)
@@ -0,0 +1,82 @@
// 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,
}
@@ -0,0 +1,68 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type PartnerTenantsPayload = {
click_id: string
}
export type GetBillingInvoicesData = {
body?: never
path?: never
query?: never
url: '/billing/invoices'
}
export type GetBillingInvoicesResponses = {
200: {
[key: string]: unknown
}
}
export type GetBillingInvoicesResponse
= GetBillingInvoicesResponses[keyof GetBillingInvoicesResponses]
export type PutBillingPartnersByPartnerKeyTenantsData = {
body: PartnerTenantsPayload
path: {
partner_key: string
}
query?: never
url: '/billing/partners/{partner_key}/tenants'
}
export type PutBillingPartnersByPartnerKeyTenantsErrors = {
400: {
[key: string]: unknown
}
}
export type PutBillingPartnersByPartnerKeyTenantsError
= PutBillingPartnersByPartnerKeyTenantsErrors[keyof PutBillingPartnersByPartnerKeyTenantsErrors]
export type PutBillingPartnersByPartnerKeyTenantsResponses = {
200: {
[key: string]: unknown
}
}
export type PutBillingPartnersByPartnerKeyTenantsResponse
= PutBillingPartnersByPartnerKeyTenantsResponses[keyof PutBillingPartnersByPartnerKeyTenantsResponses]
export type GetBillingSubscriptionData = {
body?: never
path?: never
query?: never
url: '/billing/subscription'
}
export type GetBillingSubscriptionResponses = {
200: {
[key: string]: unknown
}
}
export type GetBillingSubscriptionResponse
= GetBillingSubscriptionResponses[keyof GetBillingSubscriptionResponses]
@@ -0,0 +1,31 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* PartnerTenantsPayload
*/
export const zPartnerTenantsPayload = z.object({
click_id: z.string(),
})
/**
* Success
*/
export const zGetBillingInvoicesResponse = z.record(z.string(), z.unknown())
export const zPutBillingPartnersByPartnerKeyTenantsBody = zPartnerTenantsPayload
export const zPutBillingPartnersByPartnerKeyTenantsPath = z.object({
partner_key: z.string(),
})
/**
* Tenants synced to partner successfully
*/
export const zPutBillingPartnersByPartnerKeyTenantsResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetBillingSubscriptionResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,29 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import { zGetCodeBasedExtensionQuery, zGetCodeBasedExtensionResponse } from './zod.gen'
/**
* Get code-based extension data by module name
*/
export const get = oc
.route({
description: 'Get code-based extension data by module name',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getCodeBasedExtension',
path: '/code-based-extension',
tags: ['console'],
})
.input(z.object({ query: zGetCodeBasedExtensionQuery.optional() }))
.output(zGetCodeBasedExtensionResponse)
export const codeBasedExtension = {
get,
}
export const contract = {
codeBasedExtension,
}
@@ -0,0 +1,26 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type CodeBasedExtensionResponse = {
data: unknown
module: string
}
export type GetCodeBasedExtensionData = {
body?: never
path?: never
query?: {
module?: string
}
url: '/code-based-extension'
}
export type GetCodeBasedExtensionResponses = {
200: CodeBasedExtensionResponse
}
export type GetCodeBasedExtensionResponse
= GetCodeBasedExtensionResponses[keyof GetCodeBasedExtensionResponses]
@@ -0,0 +1,20 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* CodeBasedExtensionResponse
*/
export const zCodeBasedExtensionResponse = z.object({
data: z.unknown(),
module: z.string(),
})
export const zGetCodeBasedExtensionQuery = z.object({
module: z.string().optional(),
})
/**
* Success
*/
export const zGetCodeBasedExtensionResponse = zCodeBasedExtensionResponse
@@ -0,0 +1,33 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import { zGetComplianceDownloadQuery, zGetComplianceDownloadResponse } from './zod.gen'
/**
* Get compliance document download link
*/
export const get = oc
.route({
description: 'Get compliance document download link',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getComplianceDownload',
path: '/compliance/download',
tags: ['console'],
})
.input(z.object({ query: zGetComplianceDownloadQuery }))
.output(zGetComplianceDownloadResponse)
export const download = {
get,
}
export const compliance = {
download,
}
export const contract = {
compliance,
}
@@ -0,0 +1,23 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type GetComplianceDownloadData = {
body?: never
path?: never
query: {
doc_name: string
}
url: '/compliance/download'
}
export type GetComplianceDownloadResponses = {
200: {
[key: string]: unknown
}
}
export type GetComplianceDownloadResponse
= GetComplianceDownloadResponses[keyof GetComplianceDownloadResponses]
@@ -0,0 +1,12 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
export const zGetComplianceDownloadQuery = z.object({
doc_name: z.string(),
})
/**
* Success
*/
export const zGetComplianceDownloadResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,78 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetDataSourceIntegratesByBindingIdByActionPath,
zGetDataSourceIntegratesByBindingIdByActionResponse,
zGetDataSourceIntegratesResponse,
zPatchDataSourceIntegratesByBindingIdByActionPath,
zPatchDataSourceIntegratesByBindingIdByActionResponse,
zPatchDataSourceIntegratesResponse,
} from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getDataSourceIntegratesByBindingIdByAction',
path: '/data-source/integrates/{binding_id}/{action}',
tags: ['console'],
})
.input(z.object({ params: zGetDataSourceIntegratesByBindingIdByActionPath }))
.output(zGetDataSourceIntegratesByBindingIdByActionResponse)
export const patch = oc
.route({
inputStructure: 'detailed',
method: 'PATCH',
operationId: 'patchDataSourceIntegratesByBindingIdByAction',
path: '/data-source/integrates/{binding_id}/{action}',
tags: ['console'],
})
.input(z.object({ params: zPatchDataSourceIntegratesByBindingIdByActionPath }))
.output(zPatchDataSourceIntegratesByBindingIdByActionResponse)
export const byAction = {
get,
patch,
}
export const byBindingId = {
byAction,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getDataSourceIntegrates',
path: '/data-source/integrates',
tags: ['console'],
})
.output(zGetDataSourceIntegratesResponse)
export const patch2 = oc
.route({
inputStructure: 'detailed',
method: 'PATCH',
operationId: 'patchDataSourceIntegrates',
path: '/data-source/integrates',
tags: ['console'],
})
.output(zPatchDataSourceIntegratesResponse)
export const integrates = {
get: get2,
patch: patch2,
byBindingId,
}
export const dataSource = {
integrates,
}
export const contract = {
dataSource,
}
@@ -0,0 +1,75 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type GetDataSourceIntegratesData = {
body?: never
path?: never
query?: never
url: '/data-source/integrates'
}
export type GetDataSourceIntegratesResponses = {
200: {
[key: string]: unknown
}
}
export type GetDataSourceIntegratesResponse
= GetDataSourceIntegratesResponses[keyof GetDataSourceIntegratesResponses]
export type PatchDataSourceIntegratesData = {
body?: never
path?: never
query?: never
url: '/data-source/integrates'
}
export type PatchDataSourceIntegratesResponses = {
200: {
[key: string]: unknown
}
}
export type PatchDataSourceIntegratesResponse
= PatchDataSourceIntegratesResponses[keyof PatchDataSourceIntegratesResponses]
export type GetDataSourceIntegratesByBindingIdByActionData = {
body?: never
path: {
binding_id: string
action: string
}
query?: never
url: '/data-source/integrates/{binding_id}/{action}'
}
export type GetDataSourceIntegratesByBindingIdByActionResponses = {
200: {
[key: string]: unknown
}
}
export type GetDataSourceIntegratesByBindingIdByActionResponse
= GetDataSourceIntegratesByBindingIdByActionResponses[keyof GetDataSourceIntegratesByBindingIdByActionResponses]
export type PatchDataSourceIntegratesByBindingIdByActionData = {
body?: never
path: {
binding_id: string
action: string
}
query?: never
url: '/data-source/integrates/{binding_id}/{action}'
}
export type PatchDataSourceIntegratesByBindingIdByActionResponses = {
200: {
[key: string]: unknown
}
}
export type PatchDataSourceIntegratesByBindingIdByActionResponse
= PatchDataSourceIntegratesByBindingIdByActionResponses[keyof PatchDataSourceIntegratesByBindingIdByActionResponses]
@@ -0,0 +1,36 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* Success
*/
export const zGetDataSourceIntegratesResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zPatchDataSourceIntegratesResponse = z.record(z.string(), z.unknown())
export const zGetDataSourceIntegratesByBindingIdByActionPath = z.object({
binding_id: z.string(),
action: z.string(),
})
/**
* Success
*/
export const zGetDataSourceIntegratesByBindingIdByActionResponse = z.record(z.string(), z.unknown())
export const zPatchDataSourceIntegratesByBindingIdByActionPath = z.object({
binding_id: z.string(),
action: z.string(),
})
/**
* Success
*/
export const zPatchDataSourceIntegratesByBindingIdByActionResponse = z.record(
z.string(),
z.unknown(),
)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,46 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zPostEmailCodeLoginBody,
zPostEmailCodeLoginResponse,
zPostEmailCodeLoginValidityBody,
zPostEmailCodeLoginValidityResponse,
} from './zod.gen'
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postEmailCodeLoginValidity',
path: '/email-code-login/validity',
tags: ['console'],
})
.input(z.object({ body: zPostEmailCodeLoginValidityBody }))
.output(zPostEmailCodeLoginValidityResponse)
export const validity = {
post,
}
export const post2 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postEmailCodeLogin',
path: '/email-code-login',
tags: ['console'],
})
.input(z.object({ body: zPostEmailCodeLoginBody }))
.output(zPostEmailCodeLoginResponse)
export const emailCodeLogin = {
post: post2,
validity,
}
export const contract = {
emailCodeLogin,
}
@@ -0,0 +1,49 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type EmailPayload = {
email: string
language?: string | null
}
export type EmailCodeLoginPayload = {
code: string
email: string
language?: string | null
token: string
}
export type PostEmailCodeLoginData = {
body: EmailPayload
path?: never
query?: never
url: '/email-code-login'
}
export type PostEmailCodeLoginResponses = {
200: {
[key: string]: unknown
}
}
export type PostEmailCodeLoginResponse
= PostEmailCodeLoginResponses[keyof PostEmailCodeLoginResponses]
export type PostEmailCodeLoginValidityData = {
body: EmailCodeLoginPayload
path?: never
query?: never
url: '/email-code-login/validity'
}
export type PostEmailCodeLoginValidityResponses = {
200: {
[key: string]: unknown
}
}
export type PostEmailCodeLoginValidityResponse
= PostEmailCodeLoginValidityResponses[keyof PostEmailCodeLoginValidityResponses]
@@ -0,0 +1,35 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* EmailPayload
*/
export const zEmailPayload = z.object({
email: z.string(),
language: z.string().nullish(),
})
/**
* EmailCodeLoginPayload
*/
export const zEmailCodeLoginPayload = z.object({
code: z.string(),
email: z.string(),
language: z.string().nullish(),
token: z.string(),
})
export const zPostEmailCodeLoginBody = zEmailPayload
/**
* Success
*/
export const zPostEmailCodeLoginResponse = z.record(z.string(), z.unknown())
export const zPostEmailCodeLoginValidityBody = zEmailCodeLoginPayload
/**
* Success
*/
export const zPostEmailCodeLoginValidityResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,57 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import {
zPostEmailRegisterResponse,
zPostEmailRegisterSendEmailResponse,
zPostEmailRegisterValidityResponse,
} from './zod.gen'
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postEmailRegisterSendEmail',
path: '/email-register/send-email',
tags: ['console'],
})
.output(zPostEmailRegisterSendEmailResponse)
export const sendEmail = {
post,
}
export const post2 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postEmailRegisterValidity',
path: '/email-register/validity',
tags: ['console'],
})
.output(zPostEmailRegisterValidityResponse)
export const validity = {
post: post2,
}
export const post3 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postEmailRegister',
path: '/email-register',
tags: ['console'],
})
.output(zPostEmailRegisterResponse)
export const emailRegister = {
post: post3,
sendEmail,
validity,
}
export const contract = {
emailRegister,
}
@@ -0,0 +1,52 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type PostEmailRegisterData = {
body?: never
path?: never
query?: never
url: '/email-register'
}
export type PostEmailRegisterResponses = {
200: {
[key: string]: unknown
}
}
export type PostEmailRegisterResponse = PostEmailRegisterResponses[keyof PostEmailRegisterResponses]
export type PostEmailRegisterSendEmailData = {
body?: never
path?: never
query?: never
url: '/email-register/send-email'
}
export type PostEmailRegisterSendEmailResponses = {
200: {
[key: string]: unknown
}
}
export type PostEmailRegisterSendEmailResponse
= PostEmailRegisterSendEmailResponses[keyof PostEmailRegisterSendEmailResponses]
export type PostEmailRegisterValidityData = {
body?: never
path?: never
query?: never
url: '/email-register/validity'
}
export type PostEmailRegisterValidityResponses = {
200: {
[key: string]: unknown
}
}
export type PostEmailRegisterValidityResponse
= PostEmailRegisterValidityResponses[keyof PostEmailRegisterValidityResponses]
@@ -0,0 +1,18 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* Success
*/
export const zPostEmailRegisterResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zPostEmailRegisterSendEmailResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zPostEmailRegisterValidityResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,70 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetExploreAppsByAppIdPath,
zGetExploreAppsByAppIdResponse,
zGetExploreAppsQuery,
zGetExploreAppsResponse,
zGetExploreBannersResponse,
} from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getExploreAppsByAppId',
path: '/explore/apps/{app_id}',
tags: ['console'],
})
.input(z.object({ params: zGetExploreAppsByAppIdPath }))
.output(zGetExploreAppsByAppIdResponse)
export const byAppId = {
get,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getExploreApps',
path: '/explore/apps',
tags: ['console'],
})
.input(z.object({ query: zGetExploreAppsQuery.optional() }))
.output(zGetExploreAppsResponse)
export const apps = {
get: get2,
byAppId,
}
/**
* Get banner list
*/
export const get3 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getExploreBanners',
path: '/explore/banners',
summary: 'Get banner list',
tags: ['default'],
})
.output(zGetExploreBannersResponse)
export const banners = {
get: get3,
}
export const explore = {
apps,
banners,
}
export const contract = {
explore,
}
@@ -0,0 +1,80 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type RecommendedAppListResponse = {
categories: Array<string>
recommended_apps: Array<RecommendedAppResponse>
}
export type RecommendedAppResponse = {
app?: RecommendedAppInfoResponse
app_id: string
can_trial?: boolean | null
category?: string | null
copyright?: string | null
custom_disclaimer?: string | null
description?: string | null
is_listed?: boolean | null
position?: number | null
privacy_policy?: string | null
}
export type RecommendedAppInfoResponse = {
icon?: string | null
icon_background?: string | null
icon_type?: string | null
id: string
mode?: string | null
name?: string | null
}
export type GetExploreAppsData = {
body?: never
path?: never
query?: {
language?: string | null
}
url: '/explore/apps'
}
export type GetExploreAppsResponses = {
200: RecommendedAppListResponse
}
export type GetExploreAppsResponse = GetExploreAppsResponses[keyof GetExploreAppsResponses]
export type GetExploreAppsByAppIdData = {
body?: never
path: {
app_id: string
}
query?: never
url: '/explore/apps/{app_id}'
}
export type GetExploreAppsByAppIdResponses = {
200: {
[key: string]: unknown
}
}
export type GetExploreAppsByAppIdResponse
= GetExploreAppsByAppIdResponses[keyof GetExploreAppsByAppIdResponses]
export type GetExploreBannersData = {
body?: never
path?: never
query?: never
url: '/explore/banners'
}
export type GetExploreBannersResponses = {
200: {
[key: string]: unknown
}
}
export type GetExploreBannersResponse = GetExploreBannersResponses[keyof GetExploreBannersResponses]
@@ -0,0 +1,62 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* RecommendedAppInfoResponse
*/
export const zRecommendedAppInfoResponse = z.object({
icon: z.string().nullish(),
icon_background: z.string().nullish(),
icon_type: z.string().nullish(),
id: z.string(),
mode: z.string().nullish(),
name: z.string().nullish(),
})
/**
* RecommendedAppResponse
*/
export const zRecommendedAppResponse = z.object({
app: zRecommendedAppInfoResponse.optional(),
app_id: z.string(),
can_trial: z.boolean().nullish(),
category: z.string().nullish(),
copyright: z.string().nullish(),
custom_disclaimer: z.string().nullish(),
description: z.string().nullish(),
is_listed: z.boolean().nullish(),
position: z.int().nullish(),
privacy_policy: z.string().nullish(),
})
/**
* RecommendedAppListResponse
*/
export const zRecommendedAppListResponse = z.object({
categories: z.array(z.string()),
recommended_apps: z.array(zRecommendedAppResponse),
})
export const zGetExploreAppsQuery = z.object({
language: z.string().nullish(),
})
/**
* Success
*/
export const zGetExploreAppsResponse = zRecommendedAppListResponse
export const zGetExploreAppsByAppIdPath = z.object({
app_id: z.string(),
})
/**
* Success
*/
export const zGetExploreAppsByAppIdResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetExploreBannersResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,30 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import { zGetFeaturesResponse } from './zod.gen'
/**
* Get feature configuration for current tenant
*
* Get feature configuration for current tenant
*/
export const get = oc
.route({
description: 'Get feature configuration for current tenant',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getFeatures',
path: '/features',
summary: 'Get feature configuration for current tenant',
tags: ['console'],
})
.output(zGetFeaturesResponse)
export const features = {
get,
}
export const contract = {
features,
}
@@ -0,0 +1,22 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type FeatureResponse = {
[key: string]: unknown
}
export type GetFeaturesData = {
body?: never
path?: never
query?: never
url: '/features'
}
export type GetFeaturesResponses = {
200: FeatureResponse
}
export type GetFeaturesResponse = GetFeaturesResponses[keyof GetFeaturesResponses]
@@ -0,0 +1,10 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
export const zFeatureResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetFeaturesResponse = zFeatureResponse
@@ -0,0 +1,81 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetFilesByFileIdPreviewPath,
zGetFilesByFileIdPreviewResponse,
zGetFilesSupportTypeResponse,
zGetFilesUploadResponse,
zPostFilesUploadResponse,
} from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getFilesSupportType',
path: '/files/support-type',
tags: ['console'],
})
.output(zGetFilesSupportTypeResponse)
export const supportType = {
get,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getFilesUpload',
path: '/files/upload',
tags: ['console'],
})
.output(zGetFilesUploadResponse)
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postFilesUpload',
path: '/files/upload',
successStatus: 201,
tags: ['console'],
})
.output(zPostFilesUploadResponse)
export const upload = {
get: get2,
post,
}
export const get3 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getFilesByFileIdPreview',
path: '/files/{file_id}/preview',
tags: ['console'],
})
.input(z.object({ params: zGetFilesByFileIdPreviewPath }))
.output(zGetFilesByFileIdPreviewResponse)
export const preview = {
get: get3,
}
export const byFileId = {
preview,
}
export const files = {
supportType,
upload,
byFileId,
}
export const contract = {
files,
}
@@ -0,0 +1,95 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type UploadConfig = {
attachment_image_file_size_limit?: number | null
audio_file_size_limit: number
batch_count_limit: number
file_size_limit: number
file_upload_limit?: number | null
image_file_batch_limit: number
image_file_size_limit: number
single_chunk_attachment_limit: number
video_file_size_limit: number
workflow_file_upload_limit: number
}
export type FileResponse = {
conversation_id?: string | null
created_at?: number | null
created_by?: string | null
extension?: string | null
file_key?: string | null
id: string
mime_type?: string | null
name: string
original_url?: string | null
preview_url?: string | null
size: number
source_url?: string | null
tenant_id?: string | null
user_id?: string | null
}
export type GetFilesSupportTypeData = {
body?: never
path?: never
query?: never
url: '/files/support-type'
}
export type GetFilesSupportTypeResponses = {
200: {
[key: string]: unknown
}
}
export type GetFilesSupportTypeResponse
= GetFilesSupportTypeResponses[keyof GetFilesSupportTypeResponses]
export type GetFilesUploadData = {
body?: never
path?: never
query?: never
url: '/files/upload'
}
export type GetFilesUploadResponses = {
200: UploadConfig
}
export type GetFilesUploadResponse = GetFilesUploadResponses[keyof GetFilesUploadResponses]
export type PostFilesUploadData = {
body?: never
path?: never
query?: never
url: '/files/upload'
}
export type PostFilesUploadResponses = {
201: FileResponse
}
export type PostFilesUploadResponse = PostFilesUploadResponses[keyof PostFilesUploadResponses]
export type GetFilesByFileIdPreviewData = {
body?: never
path: {
file_id: string
}
query?: never
url: '/files/{file_id}/preview'
}
export type GetFilesByFileIdPreviewResponses = {
200: {
[key: string]: unknown
}
}
export type GetFilesByFileIdPreviewResponse
= GetFilesByFileIdPreviewResponses[keyof GetFilesByFileIdPreviewResponses]
@@ -0,0 +1,63 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* UploadConfig
*/
export const zUploadConfig = z.object({
attachment_image_file_size_limit: z.int().nullish(),
audio_file_size_limit: z.int(),
batch_count_limit: z.int(),
file_size_limit: z.int(),
file_upload_limit: z.int().nullish(),
image_file_batch_limit: z.int(),
image_file_size_limit: z.int(),
single_chunk_attachment_limit: z.int(),
video_file_size_limit: z.int(),
workflow_file_upload_limit: z.int(),
})
/**
* FileResponse
*/
export const zFileResponse = z.object({
conversation_id: z.string().nullish(),
created_at: z.int().nullish(),
created_by: z.string().nullish(),
extension: z.string().nullish(),
file_key: z.string().nullish(),
id: z.string(),
mime_type: z.string().nullish(),
name: z.string(),
original_url: z.string().nullish(),
preview_url: z.string().nullish(),
size: z.int(),
source_url: z.string().nullish(),
tenant_id: z.string().nullish(),
user_id: z.string().nullish(),
})
/**
* Success
*/
export const zGetFilesSupportTypeResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetFilesUploadResponse = zUploadConfig
/**
* File uploaded successfully
*/
export const zPostFilesUploadResponse = zFileResponse
export const zGetFilesByFileIdPreviewPath = z.object({
file_id: z.string(),
})
/**
* Success
*/
export const zGetFilesByFileIdPreviewResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,76 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zPostForgotPasswordBody,
zPostForgotPasswordResetsBody,
zPostForgotPasswordResetsResponse,
zPostForgotPasswordResponse,
zPostForgotPasswordValidityBody,
zPostForgotPasswordValidityResponse,
} from './zod.gen'
/**
* Reset password with verification token
*/
export const post = oc
.route({
description: 'Reset password with verification token',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postForgotPasswordResets',
path: '/forgot-password/resets',
tags: ['console'],
})
.input(z.object({ body: zPostForgotPasswordResetsBody }))
.output(zPostForgotPasswordResetsResponse)
export const resets = {
post,
}
/**
* Verify password reset code
*/
export const post2 = oc
.route({
description: 'Verify password reset code',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postForgotPasswordValidity',
path: '/forgot-password/validity',
tags: ['console'],
})
.input(z.object({ body: zPostForgotPasswordValidityBody }))
.output(zPostForgotPasswordValidityResponse)
export const validity = {
post: post2,
}
/**
* Send password reset email
*/
export const post3 = oc
.route({
description: 'Send password reset email',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postForgotPassword',
path: '/forgot-password',
tags: ['console'],
})
.input(z.object({ body: zPostForgotPasswordBody }))
.output(zPostForgotPasswordResponse)
export const forgotPassword = {
post: post3,
resets,
validity,
}
export const contract = {
forgotPassword,
}
@@ -0,0 +1,106 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type ForgotPasswordSendPayload = {
email: string
language?: string | null
}
export type ForgotPasswordEmailResponse = {
code?: string | null
data?: string | null
result: string
}
export type ForgotPasswordResetPayload = {
new_password: string
password_confirm: string
token: string
}
export type ForgotPasswordResetResponse = {
result: string
}
export type ForgotPasswordCheckPayload = {
code: string
email: string
token: string
}
export type ForgotPasswordCheckResponse = {
email: string
is_valid: boolean
token: string
}
export type PostForgotPasswordData = {
body: ForgotPasswordSendPayload
path?: never
query?: never
url: '/forgot-password'
}
export type PostForgotPasswordErrors = {
400: {
[key: string]: unknown
}
}
export type PostForgotPasswordError = PostForgotPasswordErrors[keyof PostForgotPasswordErrors]
export type PostForgotPasswordResponses = {
200: ForgotPasswordEmailResponse
}
export type PostForgotPasswordResponse
= PostForgotPasswordResponses[keyof PostForgotPasswordResponses]
export type PostForgotPasswordResetsData = {
body: ForgotPasswordResetPayload
path?: never
query?: never
url: '/forgot-password/resets'
}
export type PostForgotPasswordResetsErrors = {
400: {
[key: string]: unknown
}
}
export type PostForgotPasswordResetsError
= PostForgotPasswordResetsErrors[keyof PostForgotPasswordResetsErrors]
export type PostForgotPasswordResetsResponses = {
200: ForgotPasswordResetResponse
}
export type PostForgotPasswordResetsResponse
= PostForgotPasswordResetsResponses[keyof PostForgotPasswordResetsResponses]
export type PostForgotPasswordValidityData = {
body: ForgotPasswordCheckPayload
path?: never
query?: never
url: '/forgot-password/validity'
}
export type PostForgotPasswordValidityErrors = {
400: {
[key: string]: unknown
}
}
export type PostForgotPasswordValidityError
= PostForgotPasswordValidityErrors[keyof PostForgotPasswordValidityErrors]
export type PostForgotPasswordValidityResponses = {
200: ForgotPasswordCheckResponse
}
export type PostForgotPasswordValidityResponse
= PostForgotPasswordValidityResponses[keyof PostForgotPasswordValidityResponses]
@@ -0,0 +1,75 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* ForgotPasswordSendPayload
*/
export const zForgotPasswordSendPayload = z.object({
email: z.string(),
language: z.string().nullish(),
})
/**
* ForgotPasswordEmailResponse
*/
export const zForgotPasswordEmailResponse = z.object({
code: z.string().nullish(),
data: z.string().nullish(),
result: z.string(),
})
/**
* ForgotPasswordResetPayload
*/
export const zForgotPasswordResetPayload = z.object({
new_password: z.string(),
password_confirm: z.string(),
token: z.string().min(1),
})
/**
* ForgotPasswordResetResponse
*/
export const zForgotPasswordResetResponse = z.object({
result: z.string(),
})
/**
* ForgotPasswordCheckPayload
*/
export const zForgotPasswordCheckPayload = z.object({
code: z.string(),
email: z.string(),
token: z.string().min(1),
})
/**
* ForgotPasswordCheckResponse
*/
export const zForgotPasswordCheckResponse = z.object({
email: z.string(),
is_valid: z.boolean(),
token: z.string(),
})
export const zPostForgotPasswordBody = zForgotPasswordSendPayload
/**
* Email sent successfully
*/
export const zPostForgotPasswordResponse = zForgotPasswordEmailResponse
export const zPostForgotPasswordResetsBody = zForgotPasswordResetPayload
/**
* Password reset successfully
*/
export const zPostForgotPasswordResetsResponse = zForgotPasswordResetResponse
export const zPostForgotPasswordValidityBody = zForgotPasswordCheckPayload
/**
* Code verified successfully
*/
export const zPostForgotPasswordValidityResponse = zForgotPasswordCheckResponse
@@ -0,0 +1,73 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetFormHumanInputByFormTokenPath,
zGetFormHumanInputByFormTokenResponse,
zPostFormHumanInputByFormTokenPath,
zPostFormHumanInputByFormTokenResponse,
} from './zod.gen'
/**
* Get human input form definition by form token
*
* GET /console/api/form/human_input/<form_token>
*/
export const get = oc
.route({
description: 'GET /console/api/form/human_input/<form_token>',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getFormHumanInputByFormToken',
path: '/form/human_input/{form_token}',
summary: 'Get human input form definition by form token',
tags: ['console'],
})
.input(z.object({ params: zGetFormHumanInputByFormTokenPath }))
.output(zGetFormHumanInputByFormTokenResponse)
/**
* Submit human input form by form token
*
* POST /console/api/form/human_input/<form_token>
*
* Request body:
* {
* "inputs": {
* "content": "User input content"
* },
* "action": "Approve"
* }
*/
export const post = oc
.route({
description:
'POST /console/api/form/human_input/<form_token>\n\nRequest body:\n{\n "inputs": {\n "content": "User input content"\n },\n "action": "Approve"\n}',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postFormHumanInputByFormToken',
path: '/form/human_input/{form_token}',
summary: 'Submit human input form by form token',
tags: ['console'],
})
.input(z.object({ params: zPostFormHumanInputByFormTokenPath }))
.output(zPostFormHumanInputByFormTokenResponse)
export const byFormToken = {
get,
post,
}
export const humanInput = {
byFormToken,
}
export const form = {
humanInput,
}
export const contract = {
form,
}
@@ -0,0 +1,41 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type GetFormHumanInputByFormTokenData = {
body?: never
path: {
form_token: string
}
query?: never
url: '/form/human_input/{form_token}'
}
export type GetFormHumanInputByFormTokenResponses = {
200: {
[key: string]: unknown
}
}
export type GetFormHumanInputByFormTokenResponse
= GetFormHumanInputByFormTokenResponses[keyof GetFormHumanInputByFormTokenResponses]
export type PostFormHumanInputByFormTokenData = {
body?: never
path: {
form_token: string
}
query?: never
url: '/form/human_input/{form_token}'
}
export type PostFormHumanInputByFormTokenResponses = {
200: {
[key: string]: unknown
}
}
export type PostFormHumanInputByFormTokenResponse
= PostFormHumanInputByFormTokenResponses[keyof PostFormHumanInputByFormTokenResponses]
@@ -0,0 +1,21 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
export const zGetFormHumanInputByFormTokenPath = z.object({
form_token: z.string(),
})
/**
* Success
*/
export const zGetFormHumanInputByFormTokenResponse = z.record(z.string(), z.unknown())
export const zPostFormHumanInputByFormTokenPath = z.object({
form_token: z.string(),
})
/**
* Success
*/
export const zPostFormHumanInputByFormTokenResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,23 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import { zPostInfoResponse } from './zod.gen'
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInfo',
path: '/info',
tags: ['console'],
})
.output(zPostInfoResponse)
export const info = {
post,
}
export const contract = {
info,
}
@@ -0,0 +1,35 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type TenantInfoResponse = {
created_at?: number | null
custom_config?: {
[key: string]: unknown
} | null
id: string
in_trial?: boolean | null
name?: string | null
next_credit_reset_date?: number | null
plan?: string | null
role?: string | null
status?: string | null
trial_credits?: number | null
trial_credits_used?: number | null
trial_end_reason?: string | null
}
export type PostInfoData = {
body?: never
path?: never
query?: never
url: '/info'
}
export type PostInfoResponses = {
200: TenantInfoResponse
}
export type PostInfoResponse = PostInfoResponses[keyof PostInfoResponses]
@@ -0,0 +1,26 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* TenantInfoResponse
*/
export const zTenantInfoResponse = z.object({
created_at: z.int().nullish(),
custom_config: z.record(z.string(), z.unknown()).nullish(),
id: z.string(),
in_trial: z.boolean().nullish(),
name: z.string().nullish(),
next_credit_reset_date: z.int().nullish(),
plan: z.string().nullish(),
role: z.string().nullish(),
status: z.string().nullish(),
trial_credits: z.int().nullish(),
trial_credits_used: z.int().nullish(),
trial_end_reason: z.string().nullish(),
})
/**
* Success
*/
export const zPostInfoResponse = zTenantInfoResponse
@@ -0,0 +1,572 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zDeleteInstalledAppsByInstalledAppIdConversationsByCIdPath,
zDeleteInstalledAppsByInstalledAppIdConversationsByCIdResponse,
zDeleteInstalledAppsByInstalledAppIdPath,
zDeleteInstalledAppsByInstalledAppIdResponse,
zDeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdPath,
zDeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponse,
zGetInstalledAppsByInstalledAppIdConversationsPath,
zGetInstalledAppsByInstalledAppIdConversationsQuery,
zGetInstalledAppsByInstalledAppIdConversationsResponse,
zGetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisPath,
zGetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisQuery,
zGetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisResponse,
zGetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsPath,
zGetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsResponse,
zGetInstalledAppsByInstalledAppIdMessagesPath,
zGetInstalledAppsByInstalledAppIdMessagesQuery,
zGetInstalledAppsByInstalledAppIdMessagesResponse,
zGetInstalledAppsByInstalledAppIdMetaPath,
zGetInstalledAppsByInstalledAppIdMetaResponse,
zGetInstalledAppsByInstalledAppIdParametersPath,
zGetInstalledAppsByInstalledAppIdParametersResponse,
zGetInstalledAppsByInstalledAppIdSavedMessagesPath,
zGetInstalledAppsByInstalledAppIdSavedMessagesQuery,
zGetInstalledAppsByInstalledAppIdSavedMessagesResponse,
zGetInstalledAppsResponse,
zPatchInstalledAppsByInstalledAppIdConversationsByCIdPinPath,
zPatchInstalledAppsByInstalledAppIdConversationsByCIdPinResponse,
zPatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinPath,
zPatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinResponse,
zPatchInstalledAppsByInstalledAppIdPath,
zPatchInstalledAppsByInstalledAppIdResponse,
zPostInstalledAppsByInstalledAppIdAudioToTextPath,
zPostInstalledAppsByInstalledAppIdAudioToTextResponse,
zPostInstalledAppsByInstalledAppIdChatMessagesBody,
zPostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopPath,
zPostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopResponse,
zPostInstalledAppsByInstalledAppIdChatMessagesPath,
zPostInstalledAppsByInstalledAppIdChatMessagesResponse,
zPostInstalledAppsByInstalledAppIdCompletionMessagesBody,
zPostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopPath,
zPostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopResponse,
zPostInstalledAppsByInstalledAppIdCompletionMessagesPath,
zPostInstalledAppsByInstalledAppIdCompletionMessagesResponse,
zPostInstalledAppsByInstalledAppIdConversationsByCIdNameBody,
zPostInstalledAppsByInstalledAppIdConversationsByCIdNamePath,
zPostInstalledAppsByInstalledAppIdConversationsByCIdNameResponse,
zPostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksBody,
zPostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksPath,
zPostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksResponse,
zPostInstalledAppsByInstalledAppIdSavedMessagesBody,
zPostInstalledAppsByInstalledAppIdSavedMessagesPath,
zPostInstalledAppsByInstalledAppIdSavedMessagesResponse,
zPostInstalledAppsByInstalledAppIdTextToAudioBody,
zPostInstalledAppsByInstalledAppIdTextToAudioPath,
zPostInstalledAppsByInstalledAppIdTextToAudioResponse,
zPostInstalledAppsByInstalledAppIdWorkflowsRunBody,
zPostInstalledAppsByInstalledAppIdWorkflowsRunPath,
zPostInstalledAppsByInstalledAppIdWorkflowsRunResponse,
zPostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopPath,
zPostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopResponse,
zPostInstalledAppsResponse,
} from './zod.gen'
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdAudioToText',
path: '/installed-apps/{installed_app_id}/audio-to-text',
tags: ['console'],
})
.input(z.object({ params: zPostInstalledAppsByInstalledAppIdAudioToTextPath }))
.output(zPostInstalledAppsByInstalledAppIdAudioToTextResponse)
export const audioToText = {
post,
}
export const post2 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdChatMessagesByTaskIdStop',
path: '/installed-apps/{installed_app_id}/chat-messages/{task_id}/stop',
tags: ['console'],
})
.input(z.object({ params: zPostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopPath }))
.output(zPostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopResponse)
export const stop = {
post: post2,
}
export const byTaskId = {
stop,
}
export const post3 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdChatMessages',
path: '/installed-apps/{installed_app_id}/chat-messages',
tags: ['console'],
})
.input(
z.object({
body: zPostInstalledAppsByInstalledAppIdChatMessagesBody,
params: zPostInstalledAppsByInstalledAppIdChatMessagesPath,
}),
)
.output(zPostInstalledAppsByInstalledAppIdChatMessagesResponse)
export const chatMessages = {
post: post3,
byTaskId,
}
export const post4 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStop',
path: '/installed-apps/{installed_app_id}/completion-messages/{task_id}/stop',
tags: ['console'],
})
.input(z.object({ params: zPostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopPath }))
.output(zPostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopResponse)
export const stop2 = {
post: post4,
}
export const byTaskId2 = {
stop: stop2,
}
export const post5 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdCompletionMessages',
path: '/installed-apps/{installed_app_id}/completion-messages',
tags: ['console'],
})
.input(
z.object({
body: zPostInstalledAppsByInstalledAppIdCompletionMessagesBody,
params: zPostInstalledAppsByInstalledAppIdCompletionMessagesPath,
}),
)
.output(zPostInstalledAppsByInstalledAppIdCompletionMessagesResponse)
export const completionMessages = {
post: post5,
byTaskId: byTaskId2,
}
export const post6 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdConversationsByCIdName',
path: '/installed-apps/{installed_app_id}/conversations/{c_id}/name',
tags: ['console'],
})
.input(
z.object({
body: zPostInstalledAppsByInstalledAppIdConversationsByCIdNameBody,
params: zPostInstalledAppsByInstalledAppIdConversationsByCIdNamePath,
}),
)
.output(zPostInstalledAppsByInstalledAppIdConversationsByCIdNameResponse)
export const name = {
post: post6,
}
export const patch = oc
.route({
inputStructure: 'detailed',
method: 'PATCH',
operationId: 'patchInstalledAppsByInstalledAppIdConversationsByCIdPin',
path: '/installed-apps/{installed_app_id}/conversations/{c_id}/pin',
tags: ['console'],
})
.input(z.object({ params: zPatchInstalledAppsByInstalledAppIdConversationsByCIdPinPath }))
.output(zPatchInstalledAppsByInstalledAppIdConversationsByCIdPinResponse)
export const pin = {
patch,
}
export const patch2 = oc
.route({
inputStructure: 'detailed',
method: 'PATCH',
operationId: 'patchInstalledAppsByInstalledAppIdConversationsByCIdUnpin',
path: '/installed-apps/{installed_app_id}/conversations/{c_id}/unpin',
tags: ['console'],
})
.input(z.object({ params: zPatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinPath }))
.output(zPatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinResponse)
export const unpin = {
patch: patch2,
}
export const delete_ = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteInstalledAppsByInstalledAppIdConversationsByCId',
path: '/installed-apps/{installed_app_id}/conversations/{c_id}',
tags: ['console'],
})
.input(z.object({ params: zDeleteInstalledAppsByInstalledAppIdConversationsByCIdPath }))
.output(zDeleteInstalledAppsByInstalledAppIdConversationsByCIdResponse)
export const byCId = {
delete: delete_,
name,
pin,
unpin,
}
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getInstalledAppsByInstalledAppIdConversations',
path: '/installed-apps/{installed_app_id}/conversations',
tags: ['console'],
})
.input(
z.object({
params: zGetInstalledAppsByInstalledAppIdConversationsPath,
query: zGetInstalledAppsByInstalledAppIdConversationsQuery.optional(),
}),
)
.output(zGetInstalledAppsByInstalledAppIdConversationsResponse)
export const conversations = {
get,
byCId,
}
export const post7 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacks',
path: '/installed-apps/{installed_app_id}/messages/{message_id}/feedbacks',
tags: ['console'],
})
.input(
z.object({
body: zPostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksBody,
params: zPostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksPath,
}),
)
.output(zPostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksResponse)
export const feedbacks = {
post: post7,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThis',
path: '/installed-apps/{installed_app_id}/messages/{message_id}/more-like-this',
tags: ['console'],
})
.input(
z.object({
params: zGetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisPath,
query: zGetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisQuery,
}),
)
.output(zGetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisResponse)
export const moreLikeThis = {
get: get2,
}
export const get3 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestions',
path: '/installed-apps/{installed_app_id}/messages/{message_id}/suggested-questions',
tags: ['console'],
})
.input(
z.object({
params: zGetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsPath,
}),
)
.output(zGetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsResponse)
export const suggestedQuestions = {
get: get3,
}
export const byMessageId = {
feedbacks,
moreLikeThis,
suggestedQuestions,
}
export const get4 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getInstalledAppsByInstalledAppIdMessages',
path: '/installed-apps/{installed_app_id}/messages',
tags: ['console'],
})
.input(
z.object({
params: zGetInstalledAppsByInstalledAppIdMessagesPath,
query: zGetInstalledAppsByInstalledAppIdMessagesQuery,
}),
)
.output(zGetInstalledAppsByInstalledAppIdMessagesResponse)
export const messages = {
get: get4,
byMessageId,
}
/**
* Get app meta
*/
export const get5 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getInstalledAppsByInstalledAppIdMeta',
path: '/installed-apps/{installed_app_id}/meta',
summary: 'Get app meta',
tags: ['console'],
})
.input(z.object({ params: zGetInstalledAppsByInstalledAppIdMetaPath }))
.output(zGetInstalledAppsByInstalledAppIdMetaResponse)
export const meta = {
get: get5,
}
/**
* Retrieve app parameters
*/
export const get6 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getInstalledAppsByInstalledAppIdParameters',
path: '/installed-apps/{installed_app_id}/parameters',
summary: 'Retrieve app parameters',
tags: ['console'],
})
.input(z.object({ params: zGetInstalledAppsByInstalledAppIdParametersPath }))
.output(zGetInstalledAppsByInstalledAppIdParametersResponse)
export const parameters = {
get: get6,
}
export const delete2 = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteInstalledAppsByInstalledAppIdSavedMessagesByMessageId',
path: '/installed-apps/{installed_app_id}/saved-messages/{message_id}',
tags: ['console'],
})
.input(z.object({ params: zDeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdPath }))
.output(zDeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponse)
export const byMessageId2 = {
delete: delete2,
}
export const get7 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getInstalledAppsByInstalledAppIdSavedMessages',
path: '/installed-apps/{installed_app_id}/saved-messages',
tags: ['console'],
})
.input(
z.object({
params: zGetInstalledAppsByInstalledAppIdSavedMessagesPath,
query: zGetInstalledAppsByInstalledAppIdSavedMessagesQuery.optional(),
}),
)
.output(zGetInstalledAppsByInstalledAppIdSavedMessagesResponse)
export const post8 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdSavedMessages',
path: '/installed-apps/{installed_app_id}/saved-messages',
tags: ['console'],
})
.input(
z.object({
body: zPostInstalledAppsByInstalledAppIdSavedMessagesBody,
params: zPostInstalledAppsByInstalledAppIdSavedMessagesPath,
}),
)
.output(zPostInstalledAppsByInstalledAppIdSavedMessagesResponse)
export const savedMessages = {
get: get7,
post: post8,
byMessageId: byMessageId2,
}
export const post9 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdTextToAudio',
path: '/installed-apps/{installed_app_id}/text-to-audio',
tags: ['console'],
})
.input(
z.object({
body: zPostInstalledAppsByInstalledAppIdTextToAudioBody,
params: zPostInstalledAppsByInstalledAppIdTextToAudioPath,
}),
)
.output(zPostInstalledAppsByInstalledAppIdTextToAudioResponse)
export const textToAudio = {
post: post9,
}
/**
* Run workflow
*/
export const post10 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdWorkflowsRun',
path: '/installed-apps/{installed_app_id}/workflows/run',
summary: 'Run workflow',
tags: ['console'],
})
.input(
z.object({
body: zPostInstalledAppsByInstalledAppIdWorkflowsRunBody,
params: zPostInstalledAppsByInstalledAppIdWorkflowsRunPath,
}),
)
.output(zPostInstalledAppsByInstalledAppIdWorkflowsRunResponse)
export const run = {
post: post10,
}
/**
* Stop workflow task
*/
export const post11 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStop',
path: '/installed-apps/{installed_app_id}/workflows/tasks/{task_id}/stop',
summary: 'Stop workflow task',
tags: ['console'],
})
.input(z.object({ params: zPostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopPath }))
.output(zPostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopResponse)
export const stop3 = {
post: post11,
}
export const byTaskId3 = {
stop: stop3,
}
export const tasks = {
byTaskId: byTaskId3,
}
export const workflows = {
run,
tasks,
}
export const delete3 = oc
.route({
inputStructure: 'detailed',
method: 'DELETE',
operationId: 'deleteInstalledAppsByInstalledAppId',
path: '/installed-apps/{installed_app_id}',
tags: ['console'],
})
.input(z.object({ params: zDeleteInstalledAppsByInstalledAppIdPath }))
.output(zDeleteInstalledAppsByInstalledAppIdResponse)
export const patch3 = oc
.route({
inputStructure: 'detailed',
method: 'PATCH',
operationId: 'patchInstalledAppsByInstalledAppId',
path: '/installed-apps/{installed_app_id}',
tags: ['console'],
})
.input(z.object({ params: zPatchInstalledAppsByInstalledAppIdPath }))
.output(zPatchInstalledAppsByInstalledAppIdResponse)
export const byInstalledAppId = {
delete: delete3,
patch: patch3,
audioToText,
chatMessages,
completionMessages,
conversations,
messages,
meta,
parameters,
savedMessages,
textToAudio,
workflows,
}
export const get8 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getInstalledApps',
path: '/installed-apps',
tags: ['console'],
})
.output(zGetInstalledAppsResponse)
export const post12 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstalledApps',
path: '/installed-apps',
tags: ['console'],
})
.output(zPostInstalledAppsResponse)
export const installedApps = {
get: get8,
post: post12,
byInstalledAppId,
}
export const contract = {
installedApps,
}
@@ -0,0 +1,571 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type InstalledAppListResponse = {
installed_apps: Array<InstalledAppResponse>
}
export type ChatMessagePayload = {
conversation_id?: string | null
files?: Array<unknown> | null
inputs: {
[key: string]: unknown
}
model_config: {
[key: string]: unknown
}
parent_message_id?: string | null
query: string
response_mode?: 'blocking' | 'streaming'
retriever_from?: string
}
export type CompletionMessageExplorePayload = {
files?: Array<{
[key: string]: unknown
}> | null
inputs: {
[key: string]: unknown
}
query?: string
response_mode?: 'blocking' | 'streaming' | null
retriever_from?: string
}
export type ConversationRenamePayload = {
auto_generate?: boolean
name?: string | null
}
export type MessageFeedbackPayload = {
content?: string | null
message_id: string
rating?: 'like' | 'dislike' | null
}
export type SavedMessageCreatePayload = {
message_id: string
}
export type TextToAudioPayload = {
message_id?: string | null
streaming?: boolean | null
text?: string | null
voice?: string | null
}
export type WorkflowRunPayload = {
files?: Array<{
[key: string]: unknown
}> | null
inputs: {
[key: string]: unknown
}
}
export type InstalledAppResponse = {
app: InstalledAppInfoResponse
app_owner_tenant_id: string
editable: boolean
id: string
is_pinned: boolean
last_used_at?: number | null
uninstallable: boolean
}
export type InstalledAppInfoResponse = {
icon?: string | null
icon_background?: string | null
icon_type?: string | null
id: string
mode?: string | null
name?: string | null
use_icon_as_answer_icon?: boolean | null
}
export type GetInstalledAppsData = {
body?: never
path?: never
query?: never
url: '/installed-apps'
}
export type GetInstalledAppsResponses = {
200: InstalledAppListResponse
}
export type GetInstalledAppsResponse = GetInstalledAppsResponses[keyof GetInstalledAppsResponses]
export type PostInstalledAppsData = {
body?: never
path?: never
query?: never
url: '/installed-apps'
}
export type PostInstalledAppsResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsResponse = PostInstalledAppsResponses[keyof PostInstalledAppsResponses]
export type DeleteInstalledAppsByInstalledAppIdData = {
body?: never
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}'
}
export type DeleteInstalledAppsByInstalledAppIdResponses = {
200: {
[key: string]: unknown
}
}
export type DeleteInstalledAppsByInstalledAppIdResponse
= DeleteInstalledAppsByInstalledAppIdResponses[keyof DeleteInstalledAppsByInstalledAppIdResponses]
export type PatchInstalledAppsByInstalledAppIdData = {
body?: never
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}'
}
export type PatchInstalledAppsByInstalledAppIdResponses = {
200: {
[key: string]: unknown
}
}
export type PatchInstalledAppsByInstalledAppIdResponse
= PatchInstalledAppsByInstalledAppIdResponses[keyof PatchInstalledAppsByInstalledAppIdResponses]
export type PostInstalledAppsByInstalledAppIdAudioToTextData = {
body?: never
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/audio-to-text'
}
export type PostInstalledAppsByInstalledAppIdAudioToTextResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdAudioToTextResponse
= PostInstalledAppsByInstalledAppIdAudioToTextResponses[keyof PostInstalledAppsByInstalledAppIdAudioToTextResponses]
export type PostInstalledAppsByInstalledAppIdChatMessagesData = {
body: ChatMessagePayload
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/chat-messages'
}
export type PostInstalledAppsByInstalledAppIdChatMessagesResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdChatMessagesResponse
= PostInstalledAppsByInstalledAppIdChatMessagesResponses[keyof PostInstalledAppsByInstalledAppIdChatMessagesResponses]
export type PostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopData = {
body?: never
path: {
installed_app_id: string
task_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/chat-messages/{task_id}/stop'
}
export type PostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopResponse
= PostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopResponses[keyof PostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopResponses]
export type PostInstalledAppsByInstalledAppIdCompletionMessagesData = {
body: CompletionMessageExplorePayload
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/completion-messages'
}
export type PostInstalledAppsByInstalledAppIdCompletionMessagesResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdCompletionMessagesResponse
= PostInstalledAppsByInstalledAppIdCompletionMessagesResponses[keyof PostInstalledAppsByInstalledAppIdCompletionMessagesResponses]
export type PostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopData = {
body?: never
path: {
installed_app_id: string
task_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/completion-messages/{task_id}/stop'
}
export type PostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopResponse
= PostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopResponses[keyof PostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopResponses]
export type GetInstalledAppsByInstalledAppIdConversationsData = {
body?: never
path: {
installed_app_id: string
}
query?: {
last_id?: string | null
limit?: number
pinned?: boolean | null
}
url: '/installed-apps/{installed_app_id}/conversations'
}
export type GetInstalledAppsByInstalledAppIdConversationsResponses = {
200: {
[key: string]: unknown
}
}
export type GetInstalledAppsByInstalledAppIdConversationsResponse
= GetInstalledAppsByInstalledAppIdConversationsResponses[keyof GetInstalledAppsByInstalledAppIdConversationsResponses]
export type DeleteInstalledAppsByInstalledAppIdConversationsByCIdData = {
body?: never
path: {
installed_app_id: string
c_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/conversations/{c_id}'
}
export type DeleteInstalledAppsByInstalledAppIdConversationsByCIdResponses = {
200: {
[key: string]: unknown
}
}
export type DeleteInstalledAppsByInstalledAppIdConversationsByCIdResponse
= DeleteInstalledAppsByInstalledAppIdConversationsByCIdResponses[keyof DeleteInstalledAppsByInstalledAppIdConversationsByCIdResponses]
export type PostInstalledAppsByInstalledAppIdConversationsByCIdNameData = {
body: ConversationRenamePayload
path: {
installed_app_id: string
c_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/conversations/{c_id}/name'
}
export type PostInstalledAppsByInstalledAppIdConversationsByCIdNameResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdConversationsByCIdNameResponse
= PostInstalledAppsByInstalledAppIdConversationsByCIdNameResponses[keyof PostInstalledAppsByInstalledAppIdConversationsByCIdNameResponses]
export type PatchInstalledAppsByInstalledAppIdConversationsByCIdPinData = {
body?: never
path: {
installed_app_id: string
c_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/conversations/{c_id}/pin'
}
export type PatchInstalledAppsByInstalledAppIdConversationsByCIdPinResponses = {
200: {
[key: string]: unknown
}
}
export type PatchInstalledAppsByInstalledAppIdConversationsByCIdPinResponse
= PatchInstalledAppsByInstalledAppIdConversationsByCIdPinResponses[keyof PatchInstalledAppsByInstalledAppIdConversationsByCIdPinResponses]
export type PatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinData = {
body?: never
path: {
installed_app_id: string
c_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/conversations/{c_id}/unpin'
}
export type PatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinResponses = {
200: {
[key: string]: unknown
}
}
export type PatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinResponse
= PatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinResponses[keyof PatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinResponses]
export type GetInstalledAppsByInstalledAppIdMessagesData = {
body?: never
path: {
installed_app_id: string
}
query: {
conversation_id: string
first_id?: string | null
limit?: number
}
url: '/installed-apps/{installed_app_id}/messages'
}
export type GetInstalledAppsByInstalledAppIdMessagesResponses = {
200: {
[key: string]: unknown
}
}
export type GetInstalledAppsByInstalledAppIdMessagesResponse
= GetInstalledAppsByInstalledAppIdMessagesResponses[keyof GetInstalledAppsByInstalledAppIdMessagesResponses]
export type PostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksData = {
body: MessageFeedbackPayload
path: {
installed_app_id: string
message_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/messages/{message_id}/feedbacks'
}
export type PostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksResponse
= PostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksResponses[keyof PostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksResponses]
export type GetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisData = {
body?: never
path: {
installed_app_id: string
message_id: string
}
query: {
response_mode: 'blocking' | 'streaming'
}
url: '/installed-apps/{installed_app_id}/messages/{message_id}/more-like-this'
}
export type GetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisResponses = {
200: {
[key: string]: unknown
}
}
export type GetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisResponse
= GetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisResponses[keyof GetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisResponses]
export type GetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsData = {
body?: never
path: {
installed_app_id: string
message_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/messages/{message_id}/suggested-questions'
}
export type GetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsResponses = {
200: {
[key: string]: unknown
}
}
export type GetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsResponse
= GetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsResponses[keyof GetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsResponses]
export type GetInstalledAppsByInstalledAppIdMetaData = {
body?: never
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/meta'
}
export type GetInstalledAppsByInstalledAppIdMetaResponses = {
200: {
[key: string]: unknown
}
}
export type GetInstalledAppsByInstalledAppIdMetaResponse
= GetInstalledAppsByInstalledAppIdMetaResponses[keyof GetInstalledAppsByInstalledAppIdMetaResponses]
export type GetInstalledAppsByInstalledAppIdParametersData = {
body?: never
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/parameters'
}
export type GetInstalledAppsByInstalledAppIdParametersResponses = {
200: {
[key: string]: unknown
}
}
export type GetInstalledAppsByInstalledAppIdParametersResponse
= GetInstalledAppsByInstalledAppIdParametersResponses[keyof GetInstalledAppsByInstalledAppIdParametersResponses]
export type GetInstalledAppsByInstalledAppIdSavedMessagesData = {
body?: never
path: {
installed_app_id: string
}
query?: {
last_id?: string | null
limit?: number
}
url: '/installed-apps/{installed_app_id}/saved-messages'
}
export type GetInstalledAppsByInstalledAppIdSavedMessagesResponses = {
200: {
[key: string]: unknown
}
}
export type GetInstalledAppsByInstalledAppIdSavedMessagesResponse
= GetInstalledAppsByInstalledAppIdSavedMessagesResponses[keyof GetInstalledAppsByInstalledAppIdSavedMessagesResponses]
export type PostInstalledAppsByInstalledAppIdSavedMessagesData = {
body: SavedMessageCreatePayload
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/saved-messages'
}
export type PostInstalledAppsByInstalledAppIdSavedMessagesResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdSavedMessagesResponse
= PostInstalledAppsByInstalledAppIdSavedMessagesResponses[keyof PostInstalledAppsByInstalledAppIdSavedMessagesResponses]
export type DeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdData = {
body?: never
path: {
installed_app_id: string
message_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/saved-messages/{message_id}'
}
export type DeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponses = {
200: {
[key: string]: unknown
}
}
export type DeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponse
= DeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponses[keyof DeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponses]
export type PostInstalledAppsByInstalledAppIdTextToAudioData = {
body: TextToAudioPayload
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/text-to-audio'
}
export type PostInstalledAppsByInstalledAppIdTextToAudioResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdTextToAudioResponse
= PostInstalledAppsByInstalledAppIdTextToAudioResponses[keyof PostInstalledAppsByInstalledAppIdTextToAudioResponses]
export type PostInstalledAppsByInstalledAppIdWorkflowsRunData = {
body: WorkflowRunPayload
path: {
installed_app_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/workflows/run'
}
export type PostInstalledAppsByInstalledAppIdWorkflowsRunResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdWorkflowsRunResponse
= PostInstalledAppsByInstalledAppIdWorkflowsRunResponses[keyof PostInstalledAppsByInstalledAppIdWorkflowsRunResponses]
export type PostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopData = {
body?: never
path: {
installed_app_id: string
task_id: string
}
query?: never
url: '/installed-apps/{installed_app_id}/workflows/tasks/{task_id}/stop'
}
export type PostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopResponse
= PostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopResponses[keyof PostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopResponses]
@@ -0,0 +1,433 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* ChatMessagePayload
*/
export const zChatMessagePayload = z.object({
conversation_id: z.string().nullish(),
files: z.array(z.unknown()).nullish(),
inputs: z.record(z.string(), z.unknown()),
model_config: z.record(z.string(), z.unknown()),
parent_message_id: z.string().nullish(),
query: z.string(),
response_mode: z.enum(['blocking', 'streaming']).optional().default('blocking'),
retriever_from: z.string().optional().default('dev'),
})
/**
* CompletionMessageExplorePayload
*/
export const zCompletionMessageExplorePayload = z.object({
files: z.array(z.record(z.string(), z.unknown())).nullish(),
inputs: z.record(z.string(), z.unknown()),
query: z.string().optional().default(''),
response_mode: z.enum(['blocking', 'streaming']).nullish(),
retriever_from: z.string().optional().default('explore_app'),
})
/**
* ConversationRenamePayload
*/
export const zConversationRenamePayload = z.object({
auto_generate: z.boolean().optional().default(false),
name: z.string().nullish(),
})
/**
* MessageFeedbackPayload
*/
export const zMessageFeedbackPayload = z.object({
content: z.string().nullish(),
message_id: z.string(),
rating: z.enum(['like', 'dislike']).nullish(),
})
/**
* SavedMessageCreatePayload
*/
export const zSavedMessageCreatePayload = z.object({
message_id: z.string(),
})
/**
* TextToAudioPayload
*/
export const zTextToAudioPayload = z.object({
message_id: z.string().nullish(),
streaming: z.boolean().nullish(),
text: z.string().nullish(),
voice: z.string().nullish(),
})
/**
* WorkflowRunPayload
*/
export const zWorkflowRunPayload = z.object({
files: z.array(z.record(z.string(), z.unknown())).nullish(),
inputs: z.record(z.string(), z.unknown()),
})
/**
* InstalledAppInfoResponse
*/
export const zInstalledAppInfoResponse = z.object({
icon: z.string().nullish(),
icon_background: z.string().nullish(),
icon_type: z.string().nullish(),
id: z.string(),
mode: z.string().nullish(),
name: z.string().nullish(),
use_icon_as_answer_icon: z.boolean().nullish(),
})
/**
* InstalledAppResponse
*/
export const zInstalledAppResponse = z.object({
app: zInstalledAppInfoResponse,
app_owner_tenant_id: z.string(),
editable: z.boolean(),
id: z.string(),
is_pinned: z.boolean(),
last_used_at: z.int().nullish(),
uninstallable: z.boolean(),
})
/**
* InstalledAppListResponse
*/
export const zInstalledAppListResponse = z.object({
installed_apps: z.array(zInstalledAppResponse),
})
/**
* Success
*/
export const zGetInstalledAppsResponse = zInstalledAppListResponse
/**
* Success
*/
export const zPostInstalledAppsResponse = z.record(z.string(), z.unknown())
export const zDeleteInstalledAppsByInstalledAppIdPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zDeleteInstalledAppsByInstalledAppIdResponse = z.record(z.string(), z.unknown())
export const zPatchInstalledAppsByInstalledAppIdPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zPatchInstalledAppsByInstalledAppIdResponse = z.record(z.string(), z.unknown())
export const zPostInstalledAppsByInstalledAppIdAudioToTextPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdAudioToTextResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostInstalledAppsByInstalledAppIdChatMessagesBody = zChatMessagePayload
export const zPostInstalledAppsByInstalledAppIdChatMessagesPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdChatMessagesResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopPath = z.object({
installed_app_id: z.string(),
task_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdChatMessagesByTaskIdStopResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostInstalledAppsByInstalledAppIdCompletionMessagesBody
= zCompletionMessageExplorePayload
export const zPostInstalledAppsByInstalledAppIdCompletionMessagesPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdCompletionMessagesResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopPath = z.object({
installed_app_id: z.string(),
task_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdCompletionMessagesByTaskIdStopResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetInstalledAppsByInstalledAppIdConversationsPath = z.object({
installed_app_id: z.string(),
})
export const zGetInstalledAppsByInstalledAppIdConversationsQuery = z.object({
last_id: z.string().nullish(),
limit: z.int().gte(1).lte(100).optional().default(20),
pinned: z.boolean().nullish(),
})
/**
* Success
*/
export const zGetInstalledAppsByInstalledAppIdConversationsResponse = z.record(
z.string(),
z.unknown(),
)
export const zDeleteInstalledAppsByInstalledAppIdConversationsByCIdPath = z.object({
installed_app_id: z.string(),
c_id: z.string(),
})
/**
* Success
*/
export const zDeleteInstalledAppsByInstalledAppIdConversationsByCIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostInstalledAppsByInstalledAppIdConversationsByCIdNameBody
= zConversationRenamePayload
export const zPostInstalledAppsByInstalledAppIdConversationsByCIdNamePath = z.object({
installed_app_id: z.string(),
c_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdConversationsByCIdNameResponse = z.record(
z.string(),
z.unknown(),
)
export const zPatchInstalledAppsByInstalledAppIdConversationsByCIdPinPath = z.object({
installed_app_id: z.string(),
c_id: z.string(),
})
/**
* Success
*/
export const zPatchInstalledAppsByInstalledAppIdConversationsByCIdPinResponse = z.record(
z.string(),
z.unknown(),
)
export const zPatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinPath = z.object({
installed_app_id: z.string(),
c_id: z.string(),
})
/**
* Success
*/
export const zPatchInstalledAppsByInstalledAppIdConversationsByCIdUnpinResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetInstalledAppsByInstalledAppIdMessagesPath = z.object({
installed_app_id: z.string(),
})
export const zGetInstalledAppsByInstalledAppIdMessagesQuery = z.object({
conversation_id: z.string(),
first_id: z.string().nullish(),
limit: z.int().gte(1).lte(100).optional().default(20),
})
/**
* Success
*/
export const zGetInstalledAppsByInstalledAppIdMessagesResponse = z.record(z.string(), z.unknown())
export const zPostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksBody
= zMessageFeedbackPayload
export const zPostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksPath = z.object({
installed_app_id: z.string(),
message_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdMessagesByMessageIdFeedbacksResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisPath = z.object({
installed_app_id: z.string(),
message_id: z.string(),
})
export const zGetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisQuery = z.object({
response_mode: z.enum(['blocking', 'streaming']),
})
/**
* Success
*/
export const zGetInstalledAppsByInstalledAppIdMessagesByMessageIdMoreLikeThisResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsPath = z.object({
installed_app_id: z.string(),
message_id: z.string(),
})
/**
* Success
*/
export const zGetInstalledAppsByInstalledAppIdMessagesByMessageIdSuggestedQuestionsResponse
= z.record(z.string(), z.unknown())
export const zGetInstalledAppsByInstalledAppIdMetaPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zGetInstalledAppsByInstalledAppIdMetaResponse = z.record(z.string(), z.unknown())
export const zGetInstalledAppsByInstalledAppIdParametersPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zGetInstalledAppsByInstalledAppIdParametersResponse = z.record(z.string(), z.unknown())
export const zGetInstalledAppsByInstalledAppIdSavedMessagesPath = z.object({
installed_app_id: z.string(),
})
export const zGetInstalledAppsByInstalledAppIdSavedMessagesQuery = z.object({
last_id: z.string().nullish(),
limit: z.int().gte(1).lte(100).optional().default(20),
})
/**
* Success
*/
export const zGetInstalledAppsByInstalledAppIdSavedMessagesResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostInstalledAppsByInstalledAppIdSavedMessagesBody = zSavedMessageCreatePayload
export const zPostInstalledAppsByInstalledAppIdSavedMessagesPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdSavedMessagesResponse = z.record(
z.string(),
z.unknown(),
)
export const zDeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdPath = z.object({
installed_app_id: z.string(),
message_id: z.string(),
})
/**
* Success
*/
export const zDeleteInstalledAppsByInstalledAppIdSavedMessagesByMessageIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostInstalledAppsByInstalledAppIdTextToAudioBody = zTextToAudioPayload
export const zPostInstalledAppsByInstalledAppIdTextToAudioPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdTextToAudioResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostInstalledAppsByInstalledAppIdWorkflowsRunBody = zWorkflowRunPayload
export const zPostInstalledAppsByInstalledAppIdWorkflowsRunPath = z.object({
installed_app_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdWorkflowsRunResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopPath = z.object({
installed_app_id: z.string(),
task_id: z.string(),
})
/**
* Success
*/
export const zPostInstalledAppsByInstalledAppIdWorkflowsTasksByTaskIdStopResponse = z.record(
z.string(),
z.unknown(),
)
@@ -0,0 +1,54 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zPostInstructionGenerateBody,
zPostInstructionGenerateResponse,
zPostInstructionGenerateTemplateBody,
zPostInstructionGenerateTemplateResponse,
} from './zod.gen'
/**
* Get instruction generation template
*/
export const post = oc
.route({
description: 'Get instruction generation template',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstructionGenerateTemplate',
path: '/instruction-generate/template',
tags: ['console'],
})
.input(z.object({ body: zPostInstructionGenerateTemplateBody }))
.output(zPostInstructionGenerateTemplateResponse)
export const template = {
post,
}
/**
* Generate instruction for workflow nodes or general use
*/
export const post2 = oc
.route({
description: 'Generate instruction for workflow nodes or general use',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postInstructionGenerate',
path: '/instruction-generate',
tags: ['console'],
})
.input(z.object({ body: zPostInstructionGenerateBody }))
.output(zPostInstructionGenerateResponse)
export const instructionGenerate = {
post: post2,
template,
}
export const contract = {
instructionGenerate,
}
@@ -0,0 +1,101 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type InstructionGeneratePayload = {
current?: string
flow_id: string
ideal_output?: string
instruction: string
language?: string
model_config: ModelConfig
node_id?: string
}
export type InstructionTemplatePayload = {
type: string
}
export type ModelConfig = {
agent_mode_dict?: JsonValue
annotation_reply_dict?: JsonValue
chat_prompt_config_dict?: JsonValue
completion_prompt_config_dict?: JsonValue
created_at?: number | null
created_by?: string | null
dataset_configs_dict?: JsonValue
dataset_query_variable?: string | null
external_data_tools_list?: JsonValue
file_upload_dict?: JsonValue
model_dict?: JsonValue
more_like_this_dict?: JsonValue
opening_statement?: string | null
pre_prompt?: string | null
prompt_type?: string | null
retriever_resource_dict?: JsonValue
sensitive_word_avoidance_dict?: JsonValue
speech_to_text_dict?: JsonValue
suggested_questions_after_answer_dict?: JsonValue
suggested_questions_list?: JsonValue
text_to_speech_dict?: JsonValue
updated_at?: number | null
updated_by?: string | null
user_input_form_list?: JsonValue
}
export type JsonValue = unknown
export type PostInstructionGenerateData = {
body: InstructionGeneratePayload
path?: never
query?: never
url: '/instruction-generate'
}
export type PostInstructionGenerateErrors = {
400: {
[key: string]: unknown
}
402: {
[key: string]: unknown
}
}
export type PostInstructionGenerateError
= PostInstructionGenerateErrors[keyof PostInstructionGenerateErrors]
export type PostInstructionGenerateResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstructionGenerateResponse
= PostInstructionGenerateResponses[keyof PostInstructionGenerateResponses]
export type PostInstructionGenerateTemplateData = {
body: InstructionTemplatePayload
path?: never
query?: never
url: '/instruction-generate/template'
}
export type PostInstructionGenerateTemplateErrors = {
400: {
[key: string]: unknown
}
}
export type PostInstructionGenerateTemplateError
= PostInstructionGenerateTemplateErrors[keyof PostInstructionGenerateTemplateErrors]
export type PostInstructionGenerateTemplateResponses = {
200: {
[key: string]: unknown
}
}
export type PostInstructionGenerateTemplateResponse
= PostInstructionGenerateTemplateResponses[keyof PostInstructionGenerateTemplateResponses]
@@ -0,0 +1,69 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* InstructionTemplatePayload
*/
export const zInstructionTemplatePayload = z.object({
type: z.string(),
})
export const zJsonValue = z.unknown()
/**
* ModelConfig
*/
export const zModelConfig = z.object({
agent_mode_dict: zJsonValue.optional(),
annotation_reply_dict: zJsonValue.optional(),
chat_prompt_config_dict: zJsonValue.optional(),
completion_prompt_config_dict: zJsonValue.optional(),
created_at: z.int().nullish(),
created_by: z.string().nullish(),
dataset_configs_dict: zJsonValue.optional(),
dataset_query_variable: z.string().nullish(),
external_data_tools_list: zJsonValue.optional(),
file_upload_dict: zJsonValue.optional(),
model_dict: zJsonValue.optional(),
more_like_this_dict: zJsonValue.optional(),
opening_statement: z.string().nullish(),
pre_prompt: z.string().nullish(),
prompt_type: z.string().nullish(),
retriever_resource_dict: zJsonValue.optional(),
sensitive_word_avoidance_dict: zJsonValue.optional(),
speech_to_text_dict: zJsonValue.optional(),
suggested_questions_after_answer_dict: zJsonValue.optional(),
suggested_questions_list: zJsonValue.optional(),
text_to_speech_dict: zJsonValue.optional(),
updated_at: z.int().nullish(),
updated_by: z.string().nullish(),
user_input_form_list: zJsonValue.optional(),
})
/**
* InstructionGeneratePayload
*/
export const zInstructionGeneratePayload = z.object({
current: z.string().optional().default(''),
flow_id: z.string(),
ideal_output: z.string().optional().default(''),
instruction: z.string(),
language: z.string().optional().default('javascript'),
model_config: zModelConfig,
node_id: z.string().optional().default(''),
})
export const zPostInstructionGenerateBody = zInstructionGeneratePayload
/**
* Instruction generated successfully
*/
export const zPostInstructionGenerateResponse = z.record(z.string(), z.unknown())
export const zPostInstructionGenerateTemplateBody = zInstructionTemplatePayload
/**
* Template retrieved successfully
*/
export const zPostInstructionGenerateTemplateResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,29 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import { zPostLoginBody, zPostLoginResponse } from './zod.gen'
/**
* Authenticate user and login
*/
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postLogin',
path: '/login',
summary: 'Authenticate user and login',
tags: ['console'],
})
.input(z.object({ body: zPostLoginBody }))
.output(zPostLoginResponse)
export const login = {
post,
}
export const contract = {
login,
}
@@ -0,0 +1,27 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type LoginPayload = {
email: string
invite_token?: string | null
password: string
remember_me?: boolean
}
export type PostLoginData = {
body: LoginPayload
path?: never
query?: never
url: '/login'
}
export type PostLoginResponses = {
200: {
[key: string]: unknown
}
}
export type PostLoginResponse = PostLoginResponses[keyof PostLoginResponses]
@@ -0,0 +1,20 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* LoginPayload
*/
export const zLoginPayload = z.object({
email: z.string(),
invite_token: z.string().nullish(),
password: z.string(),
remember_me: z.boolean().optional().default(false),
})
export const zPostLoginBody = zLoginPayload
/**
* Success
*/
export const zPostLoginResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,23 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import { zPostLogoutResponse } from './zod.gen'
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postLogout',
path: '/logout',
tags: ['console'],
})
.output(zPostLogoutResponse)
export const logout = {
post,
}
export const contract = {
logout,
}
@@ -0,0 +1,20 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type PostLogoutData = {
body?: never
path?: never
query?: never
url: '/logout'
}
export type PostLogoutResponses = {
200: {
[key: string]: unknown
}
}
export type PostLogoutResponse = PostLogoutResponses[keyof PostLogoutResponses]
@@ -0,0 +1,8 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* Success
*/
export const zPostLogoutResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,31 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import { zGetMcpOauthCallbackResponse } from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getMcpOauthCallback',
path: '/mcp/oauth/callback',
tags: ['console'],
})
.output(zGetMcpOauthCallbackResponse)
export const callback = {
get,
}
export const oauth = {
callback,
}
export const mcp = {
oauth,
}
export const contract = {
mcp,
}
@@ -0,0 +1,21 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type GetMcpOauthCallbackData = {
body?: never
path?: never
query?: never
url: '/mcp/oauth/callback'
}
export type GetMcpOauthCallbackResponses = {
200: {
[key: string]: unknown
}
}
export type GetMcpOauthCallbackResponse
= GetMcpOauthCallbackResponses[keyof GetMcpOauthCallbackResponses]
@@ -0,0 +1,8 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* Success
*/
export const zGetMcpOauthCallbackResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,47 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import { zGetNotificationResponse, zPostNotificationDismissResponse } from './zod.gen'
/**
* Mark a notification as dismissed for the current user.
*/
export const post = oc
.route({
description: 'Mark a notification as dismissed for the current user.',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postNotificationDismiss',
path: '/notification/dismiss',
tags: ['console'],
})
.output(zPostNotificationDismissResponse)
export const dismiss = {
post,
}
/**
* Return the active in-product notification for the current user in their interface language (falls back to English if unavailable). The notification is NOT marked as seen here; call POST /notification/dismiss when the user explicitly closes the modal.
*/
export const get = oc
.route({
description:
'Return the active in-product notification for the current user in their interface language (falls back to English if unavailable). The notification is NOT marked as seen here; call POST /notification/dismiss when the user explicitly closes the modal.',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getNotification',
path: '/notification',
tags: ['console'],
})
.output(zGetNotificationResponse)
export const notification = {
get,
dismiss,
}
export const contract = {
notification,
}
@@ -0,0 +1,53 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type GetNotificationData = {
body?: never
path?: never
query?: never
url: '/notification'
}
export type GetNotificationErrors = {
401: {
[key: string]: unknown
}
}
export type GetNotificationError = GetNotificationErrors[keyof GetNotificationErrors]
export type GetNotificationResponses = {
200: {
[key: string]: unknown
}
}
export type GetNotificationResponse = GetNotificationResponses[keyof GetNotificationResponses]
export type PostNotificationDismissData = {
body?: never
path?: never
query?: never
url: '/notification/dismiss'
}
export type PostNotificationDismissErrors = {
401: {
[key: string]: unknown
}
}
export type PostNotificationDismissError
= PostNotificationDismissErrors[keyof PostNotificationDismissErrors]
export type PostNotificationDismissResponses = {
200: {
[key: string]: unknown
}
}
export type PostNotificationDismissResponse
= PostNotificationDismissResponses[keyof PostNotificationDismissResponses]
@@ -0,0 +1,13 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* Success — inspect should_show to decide whether to render the modal
*/
export const zGetNotificationResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zPostNotificationDismissResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,84 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetNotionPagesByPageIdByPageTypePreviewPath,
zGetNotionPagesByPageIdByPageTypePreviewResponse,
zGetNotionPreImportPagesResponse,
zPostNotionPagesByPageIdByPageTypePreviewBody,
zPostNotionPagesByPageIdByPageTypePreviewPath,
zPostNotionPagesByPageIdByPageTypePreviewResponse,
} from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getNotionPagesByPageIdByPageTypePreview',
path: '/notion/pages/{page_id}/{page_type}/preview',
tags: ['console'],
})
.input(z.object({ params: zGetNotionPagesByPageIdByPageTypePreviewPath }))
.output(zGetNotionPagesByPageIdByPageTypePreviewResponse)
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postNotionPagesByPageIdByPageTypePreview',
path: '/notion/pages/{page_id}/{page_type}/preview',
tags: ['console'],
})
.input(
z.object({
body: zPostNotionPagesByPageIdByPageTypePreviewBody,
params: zPostNotionPagesByPageIdByPageTypePreviewPath,
}),
)
.output(zPostNotionPagesByPageIdByPageTypePreviewResponse)
export const preview = {
get,
post,
}
export const byPageType = {
preview,
}
export const byPageId = {
byPageType,
}
export const pages = {
byPageId,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getNotionPreImportPages',
path: '/notion/pre-import/pages',
tags: ['console'],
})
.output(zGetNotionPreImportPagesResponse)
export const pages2 = {
get: get2,
}
export const preImport = {
pages: pages2,
}
export const notion = {
pages,
preImport,
}
export const contract = {
notion,
}
@@ -0,0 +1,70 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type NotionEstimatePayload = {
doc_form?: string
doc_language?: string
notion_info_list: Array<{
[key: string]: unknown
}>
process_rule: {
[key: string]: unknown
}
}
export type GetNotionPagesByPageIdByPageTypePreviewData = {
body?: never
path: {
page_id: string
page_type: string
}
query?: never
url: '/notion/pages/{page_id}/{page_type}/preview'
}
export type GetNotionPagesByPageIdByPageTypePreviewResponses = {
200: {
[key: string]: unknown
}
}
export type GetNotionPagesByPageIdByPageTypePreviewResponse
= GetNotionPagesByPageIdByPageTypePreviewResponses[keyof GetNotionPagesByPageIdByPageTypePreviewResponses]
export type PostNotionPagesByPageIdByPageTypePreviewData = {
body: NotionEstimatePayload
path: {
page_id: string
page_type: string
}
query?: never
url: '/notion/pages/{page_id}/{page_type}/preview'
}
export type PostNotionPagesByPageIdByPageTypePreviewResponses = {
200: {
[key: string]: unknown
}
}
export type PostNotionPagesByPageIdByPageTypePreviewResponse
= PostNotionPagesByPageIdByPageTypePreviewResponses[keyof PostNotionPagesByPageIdByPageTypePreviewResponses]
export type GetNotionPreImportPagesData = {
body?: never
path?: never
query?: never
url: '/notion/pre-import/pages'
}
export type GetNotionPreImportPagesResponses = {
200: {
[key: string]: unknown
}
}
export type GetNotionPreImportPagesResponse
= GetNotionPreImportPagesResponses[keyof GetNotionPreImportPagesResponses]
@@ -0,0 +1,40 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* NotionEstimatePayload
*/
export const zNotionEstimatePayload = z.object({
doc_form: z.string().optional().default('text_model'),
doc_language: z.string().optional().default('English'),
notion_info_list: z.array(z.record(z.string(), z.unknown())),
process_rule: z.record(z.string(), z.unknown()),
})
export const zGetNotionPagesByPageIdByPageTypePreviewPath = z.object({
page_id: z.string(),
page_type: z.string(),
})
/**
* Success
*/
export const zGetNotionPagesByPageIdByPageTypePreviewResponse = z.record(z.string(), z.unknown())
export const zPostNotionPagesByPageIdByPageTypePreviewBody = zNotionEstimatePayload
export const zPostNotionPagesByPageIdByPageTypePreviewPath = z.object({
page_id: z.string(),
page_type: z.string(),
})
/**
* Success
*/
export const zPostNotionPagesByPageIdByPageTypePreviewResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetNotionPreImportPagesResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,376 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetOauthAuthorizeByProviderPath,
zGetOauthAuthorizeByProviderQuery,
zGetOauthAuthorizeByProviderResponse,
zGetOauthDataSourceBindingByProviderPath,
zGetOauthDataSourceBindingByProviderQuery,
zGetOauthDataSourceBindingByProviderResponse,
zGetOauthDataSourceByProviderByBindingIdSyncPath,
zGetOauthDataSourceByProviderByBindingIdSyncResponse,
zGetOauthDataSourceByProviderPath,
zGetOauthDataSourceByProviderResponse,
zGetOauthDataSourceCallbackByProviderPath,
zGetOauthDataSourceCallbackByProviderQuery,
zGetOauthDataSourceCallbackByProviderResponse,
zGetOauthLoginByProviderPath,
zGetOauthLoginByProviderQuery,
zGetOauthLoginByProviderResponse,
zGetOauthPluginByProviderIdDatasourceCallbackPath,
zGetOauthPluginByProviderIdDatasourceCallbackResponse,
zGetOauthPluginByProviderIdDatasourceGetAuthorizationUrlPath,
zGetOauthPluginByProviderIdDatasourceGetAuthorizationUrlResponse,
zGetOauthPluginByProviderToolAuthorizationUrlPath,
zGetOauthPluginByProviderToolAuthorizationUrlResponse,
zGetOauthPluginByProviderToolCallbackPath,
zGetOauthPluginByProviderToolCallbackResponse,
zGetOauthPluginByProviderTriggerCallbackPath,
zGetOauthPluginByProviderTriggerCallbackResponse,
zPostOauthProviderAccountResponse,
zPostOauthProviderAuthorizeResponse,
zPostOauthProviderResponse,
zPostOauthProviderTokenResponse,
} from './zod.gen'
/**
* Handle OAuth callback and complete login process
*/
export const get = oc
.route({
description: 'Handle OAuth callback and complete login process',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthAuthorizeByProvider',
path: '/oauth/authorize/{provider}',
tags: ['console'],
})
.input(
z.object({
params: zGetOauthAuthorizeByProviderPath,
query: zGetOauthAuthorizeByProviderQuery.optional(),
}),
)
.output(zGetOauthAuthorizeByProviderResponse)
export const byProvider = {
get,
}
export const authorize = {
byProvider,
}
/**
* Bind OAuth data source with authorization code
*/
export const get2 = oc
.route({
description: 'Bind OAuth data source with authorization code',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthDataSourceBindingByProvider',
path: '/oauth/data-source/binding/{provider}',
tags: ['console'],
})
.input(
z.object({
params: zGetOauthDataSourceBindingByProviderPath,
query: zGetOauthDataSourceBindingByProviderQuery.optional(),
}),
)
.output(zGetOauthDataSourceBindingByProviderResponse)
export const byProvider2 = {
get: get2,
}
export const binding = {
byProvider: byProvider2,
}
/**
* Handle OAuth callback from data source provider
*/
export const get3 = oc
.route({
description: 'Handle OAuth callback from data source provider',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthDataSourceCallbackByProvider',
path: '/oauth/data-source/callback/{provider}',
tags: ['console'],
})
.input(
z.object({
params: zGetOauthDataSourceCallbackByProviderPath,
query: zGetOauthDataSourceCallbackByProviderQuery.optional(),
}),
)
.output(zGetOauthDataSourceCallbackByProviderResponse)
export const byProvider3 = {
get: get3,
}
export const callback = {
byProvider: byProvider3,
}
/**
* Sync data from OAuth data source
*/
export const get4 = oc
.route({
description: 'Sync data from OAuth data source',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthDataSourceByProviderByBindingIdSync',
path: '/oauth/data-source/{provider}/{binding_id}/sync',
tags: ['console'],
})
.input(z.object({ params: zGetOauthDataSourceByProviderByBindingIdSyncPath }))
.output(zGetOauthDataSourceByProviderByBindingIdSyncResponse)
export const sync = {
get: get4,
}
export const byBindingId = {
sync,
}
/**
* Get OAuth authorization URL for data source provider
*/
export const get5 = oc
.route({
description: 'Get OAuth authorization URL for data source provider',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthDataSourceByProvider',
path: '/oauth/data-source/{provider}',
tags: ['console'],
})
.input(z.object({ params: zGetOauthDataSourceByProviderPath }))
.output(zGetOauthDataSourceByProviderResponse)
export const byProvider4 = {
get: get5,
byBindingId,
}
export const dataSource = {
binding,
callback,
byProvider: byProvider4,
}
/**
* Initiate OAuth login process
*/
export const get6 = oc
.route({
description: 'Initiate OAuth login process',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthLoginByProvider',
path: '/oauth/login/{provider}',
tags: ['console'],
})
.input(
z.object({
params: zGetOauthLoginByProviderPath,
query: zGetOauthLoginByProviderQuery.optional(),
}),
)
.output(zGetOauthLoginByProviderResponse)
export const byProvider5 = {
get: get6,
}
export const login = {
byProvider: byProvider5,
}
export const get7 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthPluginByProviderIdDatasourceCallback',
path: '/oauth/plugin/{provider_id}/datasource/callback',
tags: ['console'],
})
.input(z.object({ params: zGetOauthPluginByProviderIdDatasourceCallbackPath }))
.output(zGetOauthPluginByProviderIdDatasourceCallbackResponse)
export const callback2 = {
get: get7,
}
export const get8 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthPluginByProviderIdDatasourceGetAuthorizationUrl',
path: '/oauth/plugin/{provider_id}/datasource/get-authorization-url',
tags: ['console'],
})
.input(z.object({ params: zGetOauthPluginByProviderIdDatasourceGetAuthorizationUrlPath }))
.output(zGetOauthPluginByProviderIdDatasourceGetAuthorizationUrlResponse)
export const getAuthorizationUrl = {
get: get8,
}
export const datasource = {
callback: callback2,
getAuthorizationUrl,
}
export const byProviderId = {
datasource,
}
export const get9 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthPluginByProviderToolAuthorizationUrl',
path: '/oauth/plugin/{provider}/tool/authorization-url',
tags: ['console'],
})
.input(z.object({ params: zGetOauthPluginByProviderToolAuthorizationUrlPath }))
.output(zGetOauthPluginByProviderToolAuthorizationUrlResponse)
export const authorizationUrl = {
get: get9,
}
export const get10 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthPluginByProviderToolCallback',
path: '/oauth/plugin/{provider}/tool/callback',
tags: ['console'],
})
.input(z.object({ params: zGetOauthPluginByProviderToolCallbackPath }))
.output(zGetOauthPluginByProviderToolCallbackResponse)
export const callback3 = {
get: get10,
}
export const tool = {
authorizationUrl,
callback: callback3,
}
/**
* Handle OAuth callback for trigger provider
*/
export const get11 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getOauthPluginByProviderTriggerCallback',
path: '/oauth/plugin/{provider}/trigger/callback',
summary: 'Handle OAuth callback for trigger provider',
tags: ['console'],
})
.input(z.object({ params: zGetOauthPluginByProviderTriggerCallbackPath }))
.output(zGetOauthPluginByProviderTriggerCallbackResponse)
export const callback4 = {
get: get11,
}
export const trigger = {
callback: callback4,
}
export const byProvider6 = {
tool,
trigger,
}
export const plugin = {
byProviderId,
byProvider: byProvider6,
}
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postOauthProviderAccount',
path: '/oauth/provider/account',
tags: ['console'],
})
.output(zPostOauthProviderAccountResponse)
export const account = {
post,
}
export const post2 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postOauthProviderAuthorize',
path: '/oauth/provider/authorize',
tags: ['console'],
})
.output(zPostOauthProviderAuthorizeResponse)
export const authorize2 = {
post: post2,
}
export const post3 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postOauthProviderToken',
path: '/oauth/provider/token',
tags: ['console'],
})
.output(zPostOauthProviderTokenResponse)
export const token = {
post: post3,
}
export const post4 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postOauthProvider',
path: '/oauth/provider',
tags: ['console'],
})
.output(zPostOauthProviderResponse)
export const provider = {
post: post4,
account,
authorize: authorize2,
token,
}
export const oauth = {
authorize,
dataSource,
login,
plugin,
provider,
}
export const contract = {
oauth,
}
@@ -0,0 +1,340 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type OAuthDataSourceBindingResponse = {
result: string
}
export type OAuthDataSourceResponse = {
data: string
}
export type OAuthDataSourceSyncResponse = {
result: string
}
export type GetOauthAuthorizeByProviderData = {
body?: never
path: {
provider: string
}
query?: {
code?: string
state?: string
}
url: '/oauth/authorize/{provider}'
}
export type GetOauthAuthorizeByProviderErrors = {
400: {
[key: string]: unknown
}
}
export type GetOauthAuthorizeByProviderError
= GetOauthAuthorizeByProviderErrors[keyof GetOauthAuthorizeByProviderErrors]
export type GetOauthAuthorizeByProviderResponses = {
200: {
[key: string]: unknown
}
}
export type GetOauthAuthorizeByProviderResponse
= GetOauthAuthorizeByProviderResponses[keyof GetOauthAuthorizeByProviderResponses]
export type GetOauthDataSourceBindingByProviderData = {
body?: never
path: {
provider: string
}
query?: {
code?: string
}
url: '/oauth/data-source/binding/{provider}'
}
export type GetOauthDataSourceBindingByProviderErrors = {
400: {
[key: string]: unknown
}
}
export type GetOauthDataSourceBindingByProviderError
= GetOauthDataSourceBindingByProviderErrors[keyof GetOauthDataSourceBindingByProviderErrors]
export type GetOauthDataSourceBindingByProviderResponses = {
200: OAuthDataSourceBindingResponse
}
export type GetOauthDataSourceBindingByProviderResponse
= GetOauthDataSourceBindingByProviderResponses[keyof GetOauthDataSourceBindingByProviderResponses]
export type GetOauthDataSourceCallbackByProviderData = {
body?: never
path: {
provider: string
}
query?: {
code?: string
error?: string
}
url: '/oauth/data-source/callback/{provider}'
}
export type GetOauthDataSourceCallbackByProviderErrors = {
400: {
[key: string]: unknown
}
}
export type GetOauthDataSourceCallbackByProviderError
= GetOauthDataSourceCallbackByProviderErrors[keyof GetOauthDataSourceCallbackByProviderErrors]
export type GetOauthDataSourceCallbackByProviderResponses = {
200: {
[key: string]: unknown
}
}
export type GetOauthDataSourceCallbackByProviderResponse
= GetOauthDataSourceCallbackByProviderResponses[keyof GetOauthDataSourceCallbackByProviderResponses]
export type GetOauthDataSourceByProviderData = {
body?: never
path: {
provider: string
}
query?: never
url: '/oauth/data-source/{provider}'
}
export type GetOauthDataSourceByProviderErrors = {
400: {
[key: string]: unknown
}
403: {
[key: string]: unknown
}
}
export type GetOauthDataSourceByProviderError
= GetOauthDataSourceByProviderErrors[keyof GetOauthDataSourceByProviderErrors]
export type GetOauthDataSourceByProviderResponses = {
200: OAuthDataSourceResponse
}
export type GetOauthDataSourceByProviderResponse
= GetOauthDataSourceByProviderResponses[keyof GetOauthDataSourceByProviderResponses]
export type GetOauthDataSourceByProviderByBindingIdSyncData = {
body?: never
path: {
provider: string
binding_id: string
}
query?: never
url: '/oauth/data-source/{provider}/{binding_id}/sync'
}
export type GetOauthDataSourceByProviderByBindingIdSyncErrors = {
400: {
[key: string]: unknown
}
}
export type GetOauthDataSourceByProviderByBindingIdSyncError
= GetOauthDataSourceByProviderByBindingIdSyncErrors[keyof GetOauthDataSourceByProviderByBindingIdSyncErrors]
export type GetOauthDataSourceByProviderByBindingIdSyncResponses = {
200: OAuthDataSourceSyncResponse
}
export type GetOauthDataSourceByProviderByBindingIdSyncResponse
= GetOauthDataSourceByProviderByBindingIdSyncResponses[keyof GetOauthDataSourceByProviderByBindingIdSyncResponses]
export type GetOauthLoginByProviderData = {
body?: never
path: {
provider: string
}
query?: {
invite_token?: string
}
url: '/oauth/login/{provider}'
}
export type GetOauthLoginByProviderErrors = {
400: {
[key: string]: unknown
}
}
export type GetOauthLoginByProviderError
= GetOauthLoginByProviderErrors[keyof GetOauthLoginByProviderErrors]
export type GetOauthLoginByProviderResponses = {
200: {
[key: string]: unknown
}
}
export type GetOauthLoginByProviderResponse
= GetOauthLoginByProviderResponses[keyof GetOauthLoginByProviderResponses]
export type GetOauthPluginByProviderIdDatasourceCallbackData = {
body?: never
path: {
provider_id: string
}
query?: never
url: '/oauth/plugin/{provider_id}/datasource/callback'
}
export type GetOauthPluginByProviderIdDatasourceCallbackResponses = {
200: {
[key: string]: unknown
}
}
export type GetOauthPluginByProviderIdDatasourceCallbackResponse
= GetOauthPluginByProviderIdDatasourceCallbackResponses[keyof GetOauthPluginByProviderIdDatasourceCallbackResponses]
export type GetOauthPluginByProviderIdDatasourceGetAuthorizationUrlData = {
body?: never
path: {
provider_id: string
}
query?: never
url: '/oauth/plugin/{provider_id}/datasource/get-authorization-url'
}
export type GetOauthPluginByProviderIdDatasourceGetAuthorizationUrlResponses = {
200: {
[key: string]: unknown
}
}
export type GetOauthPluginByProviderIdDatasourceGetAuthorizationUrlResponse
= GetOauthPluginByProviderIdDatasourceGetAuthorizationUrlResponses[keyof GetOauthPluginByProviderIdDatasourceGetAuthorizationUrlResponses]
export type GetOauthPluginByProviderToolAuthorizationUrlData = {
body?: never
path: {
provider: string
}
query?: never
url: '/oauth/plugin/{provider}/tool/authorization-url'
}
export type GetOauthPluginByProviderToolAuthorizationUrlResponses = {
200: {
[key: string]: unknown
}
}
export type GetOauthPluginByProviderToolAuthorizationUrlResponse
= GetOauthPluginByProviderToolAuthorizationUrlResponses[keyof GetOauthPluginByProviderToolAuthorizationUrlResponses]
export type GetOauthPluginByProviderToolCallbackData = {
body?: never
path: {
provider: string
}
query?: never
url: '/oauth/plugin/{provider}/tool/callback'
}
export type GetOauthPluginByProviderToolCallbackResponses = {
200: {
[key: string]: unknown
}
}
export type GetOauthPluginByProviderToolCallbackResponse
= GetOauthPluginByProviderToolCallbackResponses[keyof GetOauthPluginByProviderToolCallbackResponses]
export type GetOauthPluginByProviderTriggerCallbackData = {
body?: never
path: {
provider: string
}
query?: never
url: '/oauth/plugin/{provider}/trigger/callback'
}
export type GetOauthPluginByProviderTriggerCallbackResponses = {
200: {
[key: string]: unknown
}
}
export type GetOauthPluginByProviderTriggerCallbackResponse
= GetOauthPluginByProviderTriggerCallbackResponses[keyof GetOauthPluginByProviderTriggerCallbackResponses]
export type PostOauthProviderData = {
body?: never
path?: never
query?: never
url: '/oauth/provider'
}
export type PostOauthProviderResponses = {
200: {
[key: string]: unknown
}
}
export type PostOauthProviderResponse = PostOauthProviderResponses[keyof PostOauthProviderResponses]
export type PostOauthProviderAccountData = {
body?: never
path?: never
query?: never
url: '/oauth/provider/account'
}
export type PostOauthProviderAccountResponses = {
200: {
[key: string]: unknown
}
}
export type PostOauthProviderAccountResponse
= PostOauthProviderAccountResponses[keyof PostOauthProviderAccountResponses]
export type PostOauthProviderAuthorizeData = {
body?: never
path?: never
query?: never
url: '/oauth/provider/authorize'
}
export type PostOauthProviderAuthorizeResponses = {
200: {
[key: string]: unknown
}
}
export type PostOauthProviderAuthorizeResponse
= PostOauthProviderAuthorizeResponses[keyof PostOauthProviderAuthorizeResponses]
export type PostOauthProviderTokenData = {
body?: never
path?: never
query?: never
url: '/oauth/provider/token'
}
export type PostOauthProviderTokenResponses = {
200: {
[key: string]: unknown
}
}
export type PostOauthProviderTokenResponse
= PostOauthProviderTokenResponses[keyof PostOauthProviderTokenResponses]
@@ -0,0 +1,171 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* OAuthDataSourceBindingResponse
*/
export const zOAuthDataSourceBindingResponse = z.object({
result: z.string(),
})
/**
* OAuthDataSourceResponse
*/
export const zOAuthDataSourceResponse = z.object({
data: z.string(),
})
/**
* OAuthDataSourceSyncResponse
*/
export const zOAuthDataSourceSyncResponse = z.object({
result: z.string(),
})
export const zGetOauthAuthorizeByProviderPath = z.object({
provider: z.string(),
})
export const zGetOauthAuthorizeByProviderQuery = z.object({
code: z.string().optional(),
state: z.string().optional(),
})
/**
* Success
*/
export const zGetOauthAuthorizeByProviderResponse = z.record(z.string(), z.unknown())
export const zGetOauthDataSourceBindingByProviderPath = z.object({
provider: z.string(),
})
export const zGetOauthDataSourceBindingByProviderQuery = z.object({
code: z.string().optional(),
})
/**
* Data source binding success
*/
export const zGetOauthDataSourceBindingByProviderResponse = zOAuthDataSourceBindingResponse
export const zGetOauthDataSourceCallbackByProviderPath = z.object({
provider: z.string(),
})
export const zGetOauthDataSourceCallbackByProviderQuery = z.object({
code: z.string().optional(),
error: z.string().optional(),
})
/**
* Success
*/
export const zGetOauthDataSourceCallbackByProviderResponse = z.record(z.string(), z.unknown())
export const zGetOauthDataSourceByProviderPath = z.object({
provider: z.string(),
})
/**
* Authorization URL or internal setup success
*/
export const zGetOauthDataSourceByProviderResponse = zOAuthDataSourceResponse
export const zGetOauthDataSourceByProviderByBindingIdSyncPath = z.object({
provider: z.string(),
binding_id: z.string(),
})
/**
* Data source sync success
*/
export const zGetOauthDataSourceByProviderByBindingIdSyncResponse = zOAuthDataSourceSyncResponse
export const zGetOauthLoginByProviderPath = z.object({
provider: z.string(),
})
export const zGetOauthLoginByProviderQuery = z.object({
invite_token: z.string().optional(),
})
/**
* Success
*/
export const zGetOauthLoginByProviderResponse = z.record(z.string(), z.unknown())
export const zGetOauthPluginByProviderIdDatasourceCallbackPath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zGetOauthPluginByProviderIdDatasourceCallbackResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetOauthPluginByProviderIdDatasourceGetAuthorizationUrlPath = z.object({
provider_id: z.string(),
})
/**
* Success
*/
export const zGetOauthPluginByProviderIdDatasourceGetAuthorizationUrlResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetOauthPluginByProviderToolAuthorizationUrlPath = z.object({
provider: z.string(),
})
/**
* Success
*/
export const zGetOauthPluginByProviderToolAuthorizationUrlResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetOauthPluginByProviderToolCallbackPath = z.object({
provider: z.string(),
})
/**
* Success
*/
export const zGetOauthPluginByProviderToolCallbackResponse = z.record(z.string(), z.unknown())
export const zGetOauthPluginByProviderTriggerCallbackPath = z.object({
provider: z.string(),
})
/**
* Success
*/
export const zGetOauthPluginByProviderTriggerCallbackResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zPostOauthProviderResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zPostOauthProviderAccountResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zPostOauthProviderAuthorizeResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zPostOauthProviderTokenResponse = z.record(z.string(), z.unknown())
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,709 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* RagPipelineDatasetImportPayload
*/
export const zRagPipelineDatasetImportPayload = z.object({
yaml_content: z.string(),
})
/**
* RagPipelineImportPayload
*/
export const zRagPipelineImportPayload = z.object({
description: z.string().nullish(),
icon: z.string().nullish(),
icon_background: z.string().nullish(),
icon_type: z.string().nullish(),
mode: z.string(),
name: z.string().nullish(),
pipeline_id: z.string().nullish(),
yaml_content: z.string().nullish(),
yaml_url: z.string().nullish(),
})
/**
* Payload
*/
export const zPayload = z.object({
description: z.string().max(400).optional().default(''),
icon_info: z.record(z.string(), z.unknown()).nullish(),
name: z.string().min(1).max(40),
})
/**
* DatasourceNodeRunPayload
*/
export const zDatasourceNodeRunPayload = z.object({
credential_id: z.string().nullish(),
datasource_type: z.string(),
inputs: z.record(z.string(), z.unknown()),
})
/**
* DatasourceVariablesPayload
*/
export const zDatasourceVariablesPayload = z.object({
datasource_info: z.record(z.string(), z.unknown()),
datasource_type: z.string(),
start_node_id: z.string(),
start_node_title: z.string(),
})
/**
* NodeRunPayload
*/
export const zNodeRunPayload = z.object({
inputs: z.record(z.string(), z.unknown()).nullish(),
})
/**
* NodeRunRequiredPayload
*/
export const zNodeRunRequiredPayload = z.object({
inputs: z.record(z.string(), z.unknown()),
})
/**
* DraftWorkflowRunPayload
*/
export const zDraftWorkflowRunPayload = z.object({
datasource_info_list: z.array(z.record(z.string(), z.unknown())),
datasource_type: z.string(),
inputs: z.record(z.string(), z.unknown()),
start_node_id: z.string(),
})
/**
* Parser
*/
export const zParser = z.object({
credential_id: z.string().nullish(),
datasource_type: z.string(),
inputs: z.record(z.string(), z.unknown()),
})
/**
* PublishedWorkflowRunPayload
*/
export const zPublishedWorkflowRunPayload = z.object({
datasource_info_list: z.array(z.record(z.string(), z.unknown())),
datasource_type: z.string(),
inputs: z.record(z.string(), z.unknown()),
is_preview: z.boolean().optional().default(false),
original_document_id: z.string().nullish(),
response_mode: z.enum(['streaming', 'blocking']).optional().default('streaming'),
start_node_id: z.string(),
})
export const zDeleteRagPipelineCustomizedTemplatesByTemplateIdPath = z.object({
template_id: z.string(),
})
/**
* Success
*/
export const zDeleteRagPipelineCustomizedTemplatesByTemplateIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPatchRagPipelineCustomizedTemplatesByTemplateIdPath = z.object({
template_id: z.string(),
})
/**
* Success
*/
export const zPatchRagPipelineCustomizedTemplatesByTemplateIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelineCustomizedTemplatesByTemplateIdPath = z.object({
template_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelineCustomizedTemplatesByTemplateIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelineDatasetBody = zRagPipelineDatasetImportPayload
/**
* Success
*/
export const zPostRagPipelineDatasetResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zPostRagPipelineEmptyDatasetResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetRagPipelineTemplatesResponse = z.record(z.string(), z.unknown())
export const zGetRagPipelineTemplatesByTemplateIdPath = z.object({
template_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelineTemplatesByTemplateIdResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetRagPipelinesDatasourcePluginsResponse = z.record(z.string(), z.unknown())
export const zPostRagPipelinesImportsBody = zRagPipelineImportPayload
/**
* Success
*/
export const zPostRagPipelinesImportsResponse = z.record(z.string(), z.unknown())
export const zPostRagPipelinesImportsByImportIdConfirmPath = z.object({
import_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesImportsByImportIdConfirmResponse = z.record(z.string(), z.unknown())
export const zGetRagPipelinesImportsByPipelineIdCheckDependenciesPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesImportsByPipelineIdCheckDependenciesResponse = z.record(
z.string(),
z.unknown(),
)
/**
* Success
*/
export const zGetRagPipelinesRecommendedPluginsResponse = z.record(z.string(), z.unknown())
export const zPostRagPipelinesTransformDatasetsByDatasetIdPath = z.object({
dataset_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesTransformDatasetsByDatasetIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelinesByPipelineIdCustomizedPublishBody = zPayload
export const zPostRagPipelinesByPipelineIdCustomizedPublishPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdCustomizedPublishResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdExportsPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdExportsResponse = z.record(z.string(), z.unknown())
export const zGetRagPipelinesByPipelineIdWorkflowRunsPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowRunsResponse = z.record(z.string(), z.unknown())
export const zPostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopPath = z.object({
pipeline_id: z.string(),
task_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdPath = z.object({
pipeline_id: z.string(),
run_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsPath = z.object({
pipeline_id: z.string(),
run_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowsPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsResponse = z.record(z.string(), z.unknown())
export const zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypePath
= z.object({
pipeline_id: z.string(),
block_type: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse
= z.record(z.string(), z.unknown())
export const zGetRagPipelinesByPipelineIdWorkflowsDraftPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDraftResponse = z.record(z.string(), z.unknown())
export const zPostRagPipelinesByPipelineIdWorkflowsDraftPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsDraftResponse = z.record(z.string(), z.unknown())
export const zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunBody
= zDatasourceNodeRunPayload
export const zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunPath = z.object({
pipeline_id: z.string(),
node_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunResponse
= z.record(z.string(), z.unknown())
export const zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectBody
= zDatasourceVariablesPayload
export const zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectResponse
= z.record(z.string(), z.unknown())
export const zGetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunBody
= zNodeRunPayload
export const zPostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunPath = z.object({
pipeline_id: z.string(),
node_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunResponse
= z.record(z.string(), z.unknown())
export const zPostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunBody = zNodeRunPayload
export const zPostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunPath = z.object({
pipeline_id: z.string(),
node_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunPath = z.object({
pipeline_id: z.string(),
node_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunBody
= zNodeRunRequiredPayload
export const zPostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunPath = z.object({
pipeline_id: z.string(),
node_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunResponse = z.record(
z.string(),
z.unknown(),
)
export const zDeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({
pipeline_id: z.string(),
node_id: z.string(),
})
/**
* Success
*/
export const zDeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({
pipeline_id: z.string(),
node_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelinesByPipelineIdWorkflowsDraftRunBody = zDraftWorkflowRunPayload
export const zPostRagPipelinesByPipelineIdWorkflowsDraftRunPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsDraftRunResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesResponse = z.record(
z.string(),
z.unknown(),
)
export const zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesResponse = z.record(
z.string(),
z.unknown(),
)
export const zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdPath = z.object({
pipeline_id: z.string(),
variable_id: z.string(),
})
/**
* Success
*/
export const zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdPath = z.object({
pipeline_id: z.string(),
variable_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdPath = z.object({
pipeline_id: z.string(),
variable_id: z.string(),
})
/**
* Success
*/
export const zPatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetPath = z.object({
pipeline_id: z.string(),
variable_id: z.string(),
})
/**
* Success
*/
export const zPutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetResponse
= z.record(z.string(), z.unknown())
export const zGetRagPipelinesByPipelineIdWorkflowsPublishPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsPublishResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelinesByPipelineIdWorkflowsPublishPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsPublishResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewBody
= zParser
export const zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewPath
= z.object({
pipeline_id: z.string(),
node_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewResponse
= z.record(z.string(), z.unknown())
export const zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunBody
= zDatasourceNodeRunPayload
export const zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunPath
= z.object({
pipeline_id: z.string(),
node_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunResponse
= z.record(z.string(), z.unknown())
export const zGetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersResponse
= z.record(z.string(), z.unknown())
export const zGetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zGetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelinesByPipelineIdWorkflowsPublishedRunBody = zPublishedWorkflowRunPayload
export const zPostRagPipelinesByPipelineIdWorkflowsPublishedRunPath = z.object({
pipeline_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsPublishedRunResponse = z.record(
z.string(),
z.unknown(),
)
export const zDeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdPath = z.object({
pipeline_id: z.string(),
workflow_id: z.string(),
})
/**
* Success
*/
export const zDeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdPath = z.object({
pipeline_id: z.string(),
workflow_id: z.string(),
})
/**
* Success
*/
export const zPatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse = z.record(
z.string(),
z.unknown(),
)
export const zPostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestorePath = z.object({
pipeline_id: z.string(),
workflow_id: z.string(),
})
/**
* Success
*/
export const zPostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestoreResponse = z.record(
z.string(),
z.unknown(),
)
@@ -0,0 +1,23 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import { zPostRefreshTokenResponse } from './zod.gen'
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postRefreshToken',
path: '/refresh-token',
tags: ['console'],
})
.output(zPostRefreshTokenResponse)
export const refreshToken = {
post,
}
export const contract = {
refreshToken,
}
@@ -0,0 +1,20 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type PostRefreshTokenData = {
body?: never
path?: never
query?: never
url: '/refresh-token'
}
export type PostRefreshTokenResponses = {
200: {
[key: string]: unknown
}
}
export type PostRefreshTokenResponse = PostRefreshTokenResponses[keyof PostRefreshTokenResponses]
@@ -0,0 +1,8 @@
// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* Success
*/
export const zPostRefreshTokenResponse = z.record(z.string(), z.unknown())
@@ -0,0 +1,48 @@
// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetRemoteFilesByUrlPath,
zGetRemoteFilesByUrlResponse,
zPostRemoteFilesUploadResponse,
} from './zod.gen'
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postRemoteFilesUpload',
path: '/remote-files/upload',
tags: ['console'],
})
.output(zPostRemoteFilesUploadResponse)
export const upload = {
post,
}
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getRemoteFilesByUrl',
path: '/remote-files/{url}',
tags: ['console'],
})
.input(z.object({ params: zGetRemoteFilesByUrlPath }))
.output(zGetRemoteFilesByUrlResponse)
export const byUrl = {
get,
}
export const remoteFiles = {
upload,
byUrl,
}
export const contract = {
remoteFiles,
}
@@ -0,0 +1,39 @@
// This file is auto-generated by @hey-api/openapi-ts
export type ClientOptions = {
baseUrl: `${string}://${string}/console/api` | (string & {})
}
export type PostRemoteFilesUploadData = {
body?: never
path?: never
query?: never
url: '/remote-files/upload'
}
export type PostRemoteFilesUploadResponses = {
200: {
[key: string]: unknown
}
}
export type PostRemoteFilesUploadResponse
= PostRemoteFilesUploadResponses[keyof PostRemoteFilesUploadResponses]
export type GetRemoteFilesByUrlData = {
body?: never
path: {
url: string
}
query?: never
url: '/remote-files/{url}'
}
export type GetRemoteFilesByUrlResponses = {
200: {
[key: string]: unknown
}
}
export type GetRemoteFilesByUrlResponse
= GetRemoteFilesByUrlResponses[keyof GetRemoteFilesByUrlResponses]

Some files were not shown because too many files have changed in this diff Show More