Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore: generate contact from api (#35748)

Stephen Zhou574d5865f479
diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml
index 96425b47ac2..e042272bcac 100644
--- a/.github/workflows/autofix.yml
+++ b/.github/workflows/autofix.yml
@@ -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: |
diff --git a/.gitignore b/.gitignore
index 836bddbb498..dc3b3f284f1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -219,6 +219,9 @@ node_modules
# plugin migrate
plugins.jsonl
+# generated API OpenAPI specs
+packages/contracts/openapi/
+
# mise
mise.toml
diff --git a/packages/contracts/generated/api/console/account/orpc.gen.ts b/packages/contracts/generated/api/console/account/orpc.gen.ts
new file mode 100644
index 00000000000..a9261036675
--- /dev/null
+++ b/packages/contracts/generated/api/console/account/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/account/types.gen.ts b/packages/contracts/generated/api/console/account/types.gen.ts
new file mode 100644
index 00000000000..9021d4c8fb8
--- /dev/null
+++ b/packages/contracts/generated/api/console/account/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/account/zod.gen.ts b/packages/contracts/generated/api/console/account/zod.gen.ts
new file mode 100644
index 00000000000..befa7c27c6e
--- /dev/null
+++ b/packages/contracts/generated/api/console/account/zod.gen.ts
@@ -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
diff --git a/packages/contracts/generated/api/console/activate/orpc.gen.ts b/packages/contracts/generated/api/console/activate/orpc.gen.ts
new file mode 100644
index 00000000000..870f45bd2e5
--- /dev/null
+++ b/packages/contracts/generated/api/console/activate/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/activate/types.gen.ts b/packages/contracts/generated/api/console/activate/types.gen.ts
new file mode 100644
index 00000000000..97a16c68611
--- /dev/null
+++ b/packages/contracts/generated/api/console/activate/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/activate/zod.gen.ts b/packages/contracts/generated/api/console/activate/zod.gen.ts
new file mode 100644
index 00000000000..30897b66663
--- /dev/null
+++ b/packages/contracts/generated/api/console/activate/zod.gen.ts
@@ -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
diff --git a/packages/contracts/generated/api/console/admin/orpc.gen.ts b/packages/contracts/generated/api/console/admin/orpc.gen.ts
new file mode 100644
index 00000000000..93f012405a3
--- /dev/null
+++ b/packages/contracts/generated/api/console/admin/orpc.gen.ts
@@ -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": ["[email protected]", ...]}. 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": ["[email protected]", ...]}. 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,
+}
diff --git a/packages/contracts/generated/api/console/admin/types.gen.ts b/packages/contracts/generated/api/console/admin/types.gen.ts
new file mode 100644
index 00000000000..d3fef017912
--- /dev/null
+++ b/packages/contracts/generated/api/console/admin/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/admin/zod.gen.ts b/packages/contracts/generated/api/console/admin/zod.gen.ts
new file mode 100644
index 00000000000..9ebed93e1ec
--- /dev/null
+++ b/packages/contracts/generated/api/console/admin/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/all-workspaces/orpc.gen.ts b/packages/contracts/generated/api/console/all-workspaces/orpc.gen.ts
new file mode 100644
index 00000000000..91ccdbc408f
--- /dev/null
+++ b/packages/contracts/generated/api/console/all-workspaces/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/all-workspaces/types.gen.ts b/packages/contracts/generated/api/console/all-workspaces/types.gen.ts
new file mode 100644
index 00000000000..2c30287835c
--- /dev/null
+++ b/packages/contracts/generated/api/console/all-workspaces/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/all-workspaces/zod.gen.ts b/packages/contracts/generated/api/console/all-workspaces/zod.gen.ts
new file mode 100644
index 00000000000..bdb5f0d1322
--- /dev/null
+++ b/packages/contracts/generated/api/console/all-workspaces/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/api-based-extension/orpc.gen.ts b/packages/contracts/generated/api/console/api-based-extension/orpc.gen.ts
new file mode 100644
index 00000000000..b47ed17f342
--- /dev/null
+++ b/packages/contracts/generated/api/console/api-based-extension/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/api-based-extension/types.gen.ts b/packages/contracts/generated/api/console/api-based-extension/types.gen.ts
new file mode 100644
index 00000000000..f7b12f5b3fd
--- /dev/null
+++ b/packages/contracts/generated/api/console/api-based-extension/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/api-based-extension/zod.gen.ts b/packages/contracts/generated/api/console/api-based-extension/zod.gen.ts
new file mode 100644
index 00000000000..43f38a5214e
--- /dev/null
+++ b/packages/contracts/generated/api/console/api-based-extension/zod.gen.ts
@@ -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
diff --git a/packages/contracts/generated/api/console/api-key-auth/orpc.gen.ts b/packages/contracts/generated/api/console/api-key-auth/orpc.gen.ts
new file mode 100644
index 00000000000..a113e39c15d
--- /dev/null
+++ b/packages/contracts/generated/api/console/api-key-auth/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/api-key-auth/types.gen.ts b/packages/contracts/generated/api/console/api-key-auth/types.gen.ts
new file mode 100644
index 00000000000..970b3a44e9a
--- /dev/null
+++ b/packages/contracts/generated/api/console/api-key-auth/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/api-key-auth/zod.gen.ts b/packages/contracts/generated/api/console/api-key-auth/zod.gen.ts
new file mode 100644
index 00000000000..6c7f5ad19b1
--- /dev/null
+++ b/packages/contracts/generated/api/console/api-key-auth/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/app/orpc.gen.ts b/packages/contracts/generated/api/console/app/orpc.gen.ts
new file mode 100644
index 00000000000..7ccb9338664
--- /dev/null
+++ b/packages/contracts/generated/api/console/app/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/app/types.gen.ts b/packages/contracts/generated/api/console/app/types.gen.ts
new file mode 100644
index 00000000000..ad8334ad6d5
--- /dev/null
+++ b/packages/contracts/generated/api/console/app/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/app/zod.gen.ts b/packages/contracts/generated/api/console/app/zod.gen.ts
new file mode 100644
index 00000000000..df13f62825c
--- /dev/null
+++ b/packages/contracts/generated/api/console/app/zod.gen.ts
@@ -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()))
diff --git a/packages/contracts/generated/api/console/apps/orpc.gen.ts b/packages/contracts/generated/api/console/apps/orpc.gen.ts
new file mode 100644
index 00000000000..069976904db
--- /dev/null
+++ b/packages/contracts/generated/api/console/apps/orpc.gen.ts
@@ -0,0 +1,3775 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zDeleteAppsByAppIdAnnotationsByAnnotationIdPath,
+ zDeleteAppsByAppIdAnnotationsByAnnotationIdResponse,
+ zDeleteAppsByAppIdAnnotationsPath,
+ zDeleteAppsByAppIdAnnotationsResponse,
+ zDeleteAppsByAppIdChatConversationsByConversationIdPath,
+ zDeleteAppsByAppIdChatConversationsByConversationIdResponse,
+ zDeleteAppsByAppIdCompletionConversationsByConversationIdPath,
+ zDeleteAppsByAppIdCompletionConversationsByConversationIdResponse,
+ zDeleteAppsByAppIdPath,
+ zDeleteAppsByAppIdResponse,
+ zDeleteAppsByAppIdTraceConfigBody,
+ zDeleteAppsByAppIdTraceConfigPath,
+ zDeleteAppsByAppIdTraceConfigResponse,
+ zDeleteAppsByAppIdWorkflowCommentsByCommentIdPath,
+ zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath,
+ zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse,
+ zDeleteAppsByAppIdWorkflowCommentsByCommentIdResponse,
+ zDeleteAppsByAppIdWorkflowsByWorkflowIdPath,
+ zDeleteAppsByAppIdWorkflowsByWorkflowIdResponse,
+ zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath,
+ zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse,
+ zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdPath,
+ zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse,
+ zDeleteAppsByAppIdWorkflowsDraftVariablesPath,
+ zDeleteAppsByAppIdWorkflowsDraftVariablesResponse,
+ zDeleteAppsByResourceIdApiKeysByApiKeyIdPath,
+ zDeleteAppsByResourceIdApiKeysByApiKeyIdResponse,
+ zGetAppsByAppIdAdvancedChatWorkflowRunsCountPath,
+ zGetAppsByAppIdAdvancedChatWorkflowRunsCountQuery,
+ zGetAppsByAppIdAdvancedChatWorkflowRunsCountResponse,
+ zGetAppsByAppIdAdvancedChatWorkflowRunsPath,
+ zGetAppsByAppIdAdvancedChatWorkflowRunsQuery,
+ zGetAppsByAppIdAdvancedChatWorkflowRunsResponse,
+ zGetAppsByAppIdAgentLogsPath,
+ zGetAppsByAppIdAgentLogsQuery,
+ zGetAppsByAppIdAgentLogsResponse,
+ zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdPath,
+ zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponse,
+ zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdPath,
+ zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponse,
+ zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesPath,
+ zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesQuery,
+ zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponse,
+ zGetAppsByAppIdAnnotationsCountPath,
+ zGetAppsByAppIdAnnotationsCountResponse,
+ zGetAppsByAppIdAnnotationSettingPath,
+ zGetAppsByAppIdAnnotationSettingResponse,
+ zGetAppsByAppIdAnnotationsExportPath,
+ zGetAppsByAppIdAnnotationsExportResponse,
+ zGetAppsByAppIdAnnotationsPath,
+ zGetAppsByAppIdAnnotationsQuery,
+ zGetAppsByAppIdAnnotationsResponse,
+ zGetAppsByAppIdChatConversationsByConversationIdPath,
+ zGetAppsByAppIdChatConversationsByConversationIdResponse,
+ zGetAppsByAppIdChatConversationsPath,
+ zGetAppsByAppIdChatConversationsQuery,
+ zGetAppsByAppIdChatConversationsResponse,
+ zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsPath,
+ zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponse,
+ zGetAppsByAppIdChatMessagesPath,
+ zGetAppsByAppIdChatMessagesQuery,
+ zGetAppsByAppIdChatMessagesResponse,
+ zGetAppsByAppIdCompletionConversationsByConversationIdPath,
+ zGetAppsByAppIdCompletionConversationsByConversationIdResponse,
+ zGetAppsByAppIdCompletionConversationsPath,
+ zGetAppsByAppIdCompletionConversationsQuery,
+ zGetAppsByAppIdCompletionConversationsResponse,
+ zGetAppsByAppIdConversationVariablesPath,
+ zGetAppsByAppIdConversationVariablesQuery,
+ zGetAppsByAppIdConversationVariablesResponse,
+ zGetAppsByAppIdExportPath,
+ zGetAppsByAppIdExportQuery,
+ zGetAppsByAppIdExportResponse,
+ zGetAppsByAppIdFeedbacksExportPath,
+ zGetAppsByAppIdFeedbacksExportQuery,
+ zGetAppsByAppIdFeedbacksExportResponse,
+ zGetAppsByAppIdMessagesByMessageIdPath,
+ zGetAppsByAppIdMessagesByMessageIdResponse,
+ zGetAppsByAppIdPath,
+ zGetAppsByAppIdResponse,
+ zGetAppsByAppIdServerPath,
+ zGetAppsByAppIdServerResponse,
+ zGetAppsByAppIdStatisticsAverageResponseTimePath,
+ zGetAppsByAppIdStatisticsAverageResponseTimeQuery,
+ zGetAppsByAppIdStatisticsAverageResponseTimeResponse,
+ zGetAppsByAppIdStatisticsAverageSessionInteractionsPath,
+ zGetAppsByAppIdStatisticsAverageSessionInteractionsQuery,
+ zGetAppsByAppIdStatisticsAverageSessionInteractionsResponse,
+ zGetAppsByAppIdStatisticsDailyConversationsPath,
+ zGetAppsByAppIdStatisticsDailyConversationsQuery,
+ zGetAppsByAppIdStatisticsDailyConversationsResponse,
+ zGetAppsByAppIdStatisticsDailyEndUsersPath,
+ zGetAppsByAppIdStatisticsDailyEndUsersQuery,
+ zGetAppsByAppIdStatisticsDailyEndUsersResponse,
+ zGetAppsByAppIdStatisticsDailyMessagesPath,
+ zGetAppsByAppIdStatisticsDailyMessagesQuery,
+ zGetAppsByAppIdStatisticsDailyMessagesResponse,
+ zGetAppsByAppIdStatisticsTokenCostsPath,
+ zGetAppsByAppIdStatisticsTokenCostsQuery,
+ zGetAppsByAppIdStatisticsTokenCostsResponse,
+ zGetAppsByAppIdStatisticsTokensPerSecondPath,
+ zGetAppsByAppIdStatisticsTokensPerSecondQuery,
+ zGetAppsByAppIdStatisticsTokensPerSecondResponse,
+ zGetAppsByAppIdStatisticsUserSatisfactionRatePath,
+ zGetAppsByAppIdStatisticsUserSatisfactionRateQuery,
+ zGetAppsByAppIdStatisticsUserSatisfactionRateResponse,
+ zGetAppsByAppIdTextToAudioVoicesPath,
+ zGetAppsByAppIdTextToAudioVoicesQuery,
+ zGetAppsByAppIdTextToAudioVoicesResponse,
+ zGetAppsByAppIdTraceConfigPath,
+ zGetAppsByAppIdTraceConfigQuery,
+ zGetAppsByAppIdTraceConfigResponse,
+ zGetAppsByAppIdTracePath,
+ zGetAppsByAppIdTraceResponse,
+ zGetAppsByAppIdTriggersPath,
+ zGetAppsByAppIdTriggersResponse,
+ zGetAppsByAppIdWorkflowAppLogsPath,
+ zGetAppsByAppIdWorkflowAppLogsQuery,
+ zGetAppsByAppIdWorkflowAppLogsResponse,
+ zGetAppsByAppIdWorkflowArchivedLogsPath,
+ zGetAppsByAppIdWorkflowArchivedLogsQuery,
+ zGetAppsByAppIdWorkflowArchivedLogsResponse,
+ zGetAppsByAppIdWorkflowCommentsByCommentIdPath,
+ zGetAppsByAppIdWorkflowCommentsByCommentIdResponse,
+ zGetAppsByAppIdWorkflowCommentsMentionUsersPath,
+ zGetAppsByAppIdWorkflowCommentsMentionUsersResponse,
+ zGetAppsByAppIdWorkflowCommentsPath,
+ zGetAppsByAppIdWorkflowCommentsResponse,
+ zGetAppsByAppIdWorkflowRunsByRunIdExportPath,
+ zGetAppsByAppIdWorkflowRunsByRunIdExportResponse,
+ zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsPath,
+ zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponse,
+ zGetAppsByAppIdWorkflowRunsByRunIdPath,
+ zGetAppsByAppIdWorkflowRunsByRunIdResponse,
+ zGetAppsByAppIdWorkflowRunsCountPath,
+ zGetAppsByAppIdWorkflowRunsCountQuery,
+ zGetAppsByAppIdWorkflowRunsCountResponse,
+ zGetAppsByAppIdWorkflowRunsPath,
+ zGetAppsByAppIdWorkflowRunsQuery,
+ zGetAppsByAppIdWorkflowRunsResponse,
+ zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypePath,
+ zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeQuery,
+ zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse,
+ zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsPath,
+ zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponse,
+ zGetAppsByAppIdWorkflowsDraftConversationVariablesPath,
+ zGetAppsByAppIdWorkflowsDraftConversationVariablesResponse,
+ zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesPath,
+ zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse,
+ zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunPath,
+ zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponse,
+ zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath,
+ zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse,
+ zGetAppsByAppIdWorkflowsDraftPath,
+ zGetAppsByAppIdWorkflowsDraftResponse,
+ zGetAppsByAppIdWorkflowsDraftSystemVariablesPath,
+ zGetAppsByAppIdWorkflowsDraftSystemVariablesResponse,
+ zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdPath,
+ zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse,
+ zGetAppsByAppIdWorkflowsDraftVariablesPath,
+ zGetAppsByAppIdWorkflowsDraftVariablesQuery,
+ zGetAppsByAppIdWorkflowsDraftVariablesResponse,
+ zGetAppsByAppIdWorkflowsPath,
+ zGetAppsByAppIdWorkflowsPublishPath,
+ zGetAppsByAppIdWorkflowsPublishResponse,
+ zGetAppsByAppIdWorkflowsQuery,
+ zGetAppsByAppIdWorkflowsResponse,
+ zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsPath,
+ zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsQuery,
+ zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponse,
+ zGetAppsByAppIdWorkflowStatisticsDailyConversationsPath,
+ zGetAppsByAppIdWorkflowStatisticsDailyConversationsQuery,
+ zGetAppsByAppIdWorkflowStatisticsDailyConversationsResponse,
+ zGetAppsByAppIdWorkflowStatisticsDailyTerminalsPath,
+ zGetAppsByAppIdWorkflowStatisticsDailyTerminalsQuery,
+ zGetAppsByAppIdWorkflowStatisticsDailyTerminalsResponse,
+ zGetAppsByAppIdWorkflowStatisticsTokenCostsPath,
+ zGetAppsByAppIdWorkflowStatisticsTokenCostsQuery,
+ zGetAppsByAppIdWorkflowStatisticsTokenCostsResponse,
+ zGetAppsByAppIdWorkflowsTriggersWebhookPath,
+ zGetAppsByAppIdWorkflowsTriggersWebhookQuery,
+ zGetAppsByAppIdWorkflowsTriggersWebhookResponse,
+ zGetAppsByResourceIdApiKeysPath,
+ zGetAppsByResourceIdApiKeysResponse,
+ zGetAppsByServerIdServerRefreshPath,
+ zGetAppsByServerIdServerRefreshResponse,
+ zGetAppsImportsByAppIdCheckDependenciesPath,
+ zGetAppsImportsByAppIdCheckDependenciesResponse,
+ zGetAppsQuery,
+ zGetAppsResponse,
+ zGetAppsWorkflowsOnlineUsersQuery,
+ zGetAppsWorkflowsOnlineUsersResponse,
+ zPatchAppsByAppIdTraceConfigBody,
+ zPatchAppsByAppIdTraceConfigPath,
+ zPatchAppsByAppIdTraceConfigResponse,
+ zPatchAppsByAppIdWorkflowsByWorkflowIdBody,
+ zPatchAppsByAppIdWorkflowsByWorkflowIdPath,
+ zPatchAppsByAppIdWorkflowsByWorkflowIdResponse,
+ zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdBody,
+ zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdPath,
+ zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse,
+ zPostAppsBody,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunBody,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunPath,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunBody,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunPath,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponse,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunBody,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunPath,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponse,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftRunBody,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftRunPath,
+ zPostAppsByAppIdAdvancedChatWorkflowsDraftRunResponse,
+ zPostAppsByAppIdAnnotationReplyByActionBody,
+ zPostAppsByAppIdAnnotationReplyByActionPath,
+ zPostAppsByAppIdAnnotationReplyByActionResponse,
+ zPostAppsByAppIdAnnotationsBatchImportPath,
+ zPostAppsByAppIdAnnotationsBatchImportResponse,
+ zPostAppsByAppIdAnnotationsBody,
+ zPostAppsByAppIdAnnotationsByAnnotationIdBody,
+ zPostAppsByAppIdAnnotationsByAnnotationIdPath,
+ zPostAppsByAppIdAnnotationsByAnnotationIdResponse,
+ zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdBody,
+ zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdPath,
+ zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponse,
+ zPostAppsByAppIdAnnotationsPath,
+ zPostAppsByAppIdAnnotationsResponse,
+ zPostAppsByAppIdApiEnableBody,
+ zPostAppsByAppIdApiEnablePath,
+ zPostAppsByAppIdApiEnableResponse,
+ zPostAppsByAppIdAudioToTextPath,
+ zPostAppsByAppIdAudioToTextResponse,
+ zPostAppsByAppIdChatMessagesByTaskIdStopPath,
+ zPostAppsByAppIdChatMessagesByTaskIdStopResponse,
+ zPostAppsByAppIdCompletionMessagesBody,
+ zPostAppsByAppIdCompletionMessagesByTaskIdStopPath,
+ zPostAppsByAppIdCompletionMessagesByTaskIdStopResponse,
+ zPostAppsByAppIdCompletionMessagesPath,
+ zPostAppsByAppIdCompletionMessagesResponse,
+ zPostAppsByAppIdConvertToWorkflowBody,
+ zPostAppsByAppIdConvertToWorkflowPath,
+ zPostAppsByAppIdConvertToWorkflowResponse,
+ zPostAppsByAppIdCopyBody,
+ zPostAppsByAppIdCopyPath,
+ zPostAppsByAppIdCopyResponse,
+ zPostAppsByAppIdFeedbacksBody,
+ zPostAppsByAppIdFeedbacksPath,
+ zPostAppsByAppIdFeedbacksResponse,
+ zPostAppsByAppIdIconBody,
+ zPostAppsByAppIdIconPath,
+ zPostAppsByAppIdIconResponse,
+ zPostAppsByAppIdModelConfigBody,
+ zPostAppsByAppIdModelConfigPath,
+ zPostAppsByAppIdModelConfigResponse,
+ zPostAppsByAppIdNameBody,
+ zPostAppsByAppIdNamePath,
+ zPostAppsByAppIdNameResponse,
+ zPostAppsByAppIdPublishToCreatorsPlatformPath,
+ zPostAppsByAppIdPublishToCreatorsPlatformResponse,
+ zPostAppsByAppIdServerBody,
+ zPostAppsByAppIdServerPath,
+ zPostAppsByAppIdServerResponse,
+ zPostAppsByAppIdSiteAccessTokenResetPath,
+ zPostAppsByAppIdSiteAccessTokenResetResponse,
+ zPostAppsByAppIdSiteBody,
+ zPostAppsByAppIdSiteEnableBody,
+ zPostAppsByAppIdSiteEnablePath,
+ zPostAppsByAppIdSiteEnableResponse,
+ zPostAppsByAppIdSitePath,
+ zPostAppsByAppIdSiteResponse,
+ zPostAppsByAppIdTextToAudioBody,
+ zPostAppsByAppIdTextToAudioPath,
+ zPostAppsByAppIdTextToAudioResponse,
+ zPostAppsByAppIdTraceBody,
+ zPostAppsByAppIdTraceConfigBody,
+ zPostAppsByAppIdTraceConfigPath,
+ zPostAppsByAppIdTraceConfigResponse,
+ zPostAppsByAppIdTracePath,
+ zPostAppsByAppIdTraceResponse,
+ zPostAppsByAppIdTriggerEnableBody,
+ zPostAppsByAppIdTriggerEnablePath,
+ zPostAppsByAppIdTriggerEnableResponse,
+ zPostAppsByAppIdWorkflowCommentsBody,
+ zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesBody,
+ zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesPath,
+ zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponse,
+ zPostAppsByAppIdWorkflowCommentsByCommentIdResolvePath,
+ zPostAppsByAppIdWorkflowCommentsByCommentIdResolveResponse,
+ zPostAppsByAppIdWorkflowCommentsPath,
+ zPostAppsByAppIdWorkflowCommentsResponse,
+ zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopPath,
+ zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponse,
+ zPostAppsByAppIdWorkflowsByWorkflowIdRestorePath,
+ zPostAppsByAppIdWorkflowsByWorkflowIdRestoreResponse,
+ zPostAppsByAppIdWorkflowsDraftBody,
+ zPostAppsByAppIdWorkflowsDraftConversationVariablesBody,
+ zPostAppsByAppIdWorkflowsDraftConversationVariablesPath,
+ zPostAppsByAppIdWorkflowsDraftConversationVariablesResponse,
+ zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesBody,
+ zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesPath,
+ zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse,
+ zPostAppsByAppIdWorkflowsDraftFeaturesBody,
+ zPostAppsByAppIdWorkflowsDraftFeaturesPath,
+ zPostAppsByAppIdWorkflowsDraftFeaturesResponse,
+ zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestBody,
+ zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestPath,
+ zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponse,
+ zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody,
+ zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath,
+ zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse,
+ zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunBody,
+ zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunPath,
+ zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse,
+ zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunBody,
+ zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunPath,
+ zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponse,
+ zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunBody,
+ zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunPath,
+ zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponse,
+ zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunBody,
+ zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunPath,
+ zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponse,
+ zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunPath,
+ zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponse,
+ zPostAppsByAppIdWorkflowsDraftPath,
+ zPostAppsByAppIdWorkflowsDraftResponse,
+ zPostAppsByAppIdWorkflowsDraftRunBody,
+ zPostAppsByAppIdWorkflowsDraftRunPath,
+ zPostAppsByAppIdWorkflowsDraftRunResponse,
+ zPostAppsByAppIdWorkflowsDraftTriggerRunAllBody,
+ zPostAppsByAppIdWorkflowsDraftTriggerRunAllPath,
+ zPostAppsByAppIdWorkflowsDraftTriggerRunAllResponse,
+ zPostAppsByAppIdWorkflowsDraftTriggerRunBody,
+ zPostAppsByAppIdWorkflowsDraftTriggerRunPath,
+ zPostAppsByAppIdWorkflowsDraftTriggerRunResponse,
+ zPostAppsByAppIdWorkflowsPublishBody,
+ zPostAppsByAppIdWorkflowsPublishPath,
+ zPostAppsByAppIdWorkflowsPublishResponse,
+ zPostAppsByResourceIdApiKeysPath,
+ zPostAppsByResourceIdApiKeysResponse,
+ zPostAppsImportsBody,
+ zPostAppsImportsByImportIdConfirmPath,
+ zPostAppsImportsByImportIdConfirmResponse,
+ zPostAppsImportsResponse,
+ zPostAppsResponse,
+ zPutAppsByAppIdBody,
+ zPutAppsByAppIdPath,
+ zPutAppsByAppIdResponse,
+ zPutAppsByAppIdServerBody,
+ zPutAppsByAppIdServerPath,
+ zPutAppsByAppIdServerResponse,
+ zPutAppsByAppIdWorkflowCommentsByCommentIdBody,
+ zPutAppsByAppIdWorkflowCommentsByCommentIdPath,
+ zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdBody,
+ zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath,
+ zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse,
+ zPutAppsByAppIdWorkflowCommentsByCommentIdResponse,
+ zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetPath,
+ zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse,
+} from './zod.gen'
+
+export const get = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsImportsByAppIdCheckDependencies',
+ path: '/apps/imports/{app_id}/check-dependencies',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsImportsByAppIdCheckDependenciesPath }))
+ .output(zGetAppsImportsByAppIdCheckDependenciesResponse)
+
+export const checkDependencies = {
+ get,
+}
+
+export const byAppId = {
+ checkDependencies,
+}
+
+export const post = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsImportsByImportIdConfirm',
+ path: '/apps/imports/{import_id}/confirm',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsImportsByImportIdConfirmPath }))
+ .output(zPostAppsImportsByImportIdConfirmResponse)
+
+export const confirm = {
+ post,
+}
+
+export const byImportId = {
+ confirm,
+}
+
+export const post2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsImports',
+ path: '/apps/imports',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsImportsBody }))
+ .output(zPostAppsImportsResponse)
+
+export const imports = {
+ post: post2,
+ byAppId,
+ byImportId,
+}
+
+/**
+ * Get workflow online users
+ */
+export const get2 = oc
+ .route({
+ description: 'Get workflow online users',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsWorkflowsOnlineUsers',
+ path: '/apps/workflows/online-users',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetAppsWorkflowsOnlineUsersQuery }))
+ .output(zGetAppsWorkflowsOnlineUsersResponse)
+
+export const onlineUsers = {
+ get: get2,
+}
+
+export const workflows = {
+ onlineUsers,
+}
+
+/**
+ * Get advanced chat workflow runs count statistics
+ *
+ * Get advanced chat workflow runs count statistics
+ */
+export const get3 = oc
+ .route({
+ description: 'Get advanced chat workflow runs count statistics',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAdvancedChatWorkflowRunsCount',
+ path: '/apps/{app_id}/advanced-chat/workflow-runs/count',
+ summary: 'Get advanced chat workflow runs count statistics',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdAdvancedChatWorkflowRunsCountPath,
+ query: zGetAppsByAppIdAdvancedChatWorkflowRunsCountQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdAdvancedChatWorkflowRunsCountResponse)
+
+export const count = {
+ get: get3,
+}
+
+/**
+ * Get advanced chat app workflow run list
+ *
+ * Get advanced chat workflow run list
+ */
+export const get4 = oc
+ .route({
+ description: 'Get advanced chat workflow run list',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAdvancedChatWorkflowRuns',
+ path: '/apps/{app_id}/advanced-chat/workflow-runs',
+ summary: 'Get advanced chat app workflow run list',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdAdvancedChatWorkflowRunsPath,
+ query: zGetAppsByAppIdAdvancedChatWorkflowRunsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdAdvancedChatWorkflowRunsResponse)
+
+export const workflowRuns = {
+ get: get4,
+ count,
+}
+
+/**
+ * Preview human input form content and placeholders
+ *
+ * Get human input form preview for advanced chat workflow
+ */
+export const post3 = oc
+ .route({
+ description: 'Get human input form preview for advanced chat workflow',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreview',
+ path: '/apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/preview',
+ summary: 'Preview human input form content and placeholders',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody,
+ params: zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath,
+ }),
+ )
+ .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse)
+
+export const preview = {
+ post: post3,
+}
+
+/**
+ * Submit human input form preview
+ *
+ * Submit human input form preview for advanced chat workflow
+ */
+export const post4 = oc
+ .route({
+ description: 'Submit human input form preview for advanced chat workflow',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRun',
+ path: '/apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/run',
+ summary: 'Submit human input form preview',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunBody,
+ params: zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse)
+
+export const run = {
+ post: post4,
+}
+
+export const form = {
+ preview,
+ run,
+}
+
+export const byNodeId = {
+ form,
+}
+
+export const nodes = {
+ byNodeId,
+}
+
+export const humanInput = {
+ nodes,
+}
+
+/**
+ * Run draft workflow iteration node
+ *
+ * Run draft workflow iteration node for advanced chat
+ */
+export const post5 = oc
+ .route({
+ description: 'Run draft workflow iteration node for advanced chat',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRun',
+ path: '/apps/{app_id}/advanced-chat/workflows/draft/iteration/nodes/{node_id}/run',
+ summary: 'Run draft workflow iteration node',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunBody,
+ params: zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponse)
+
+export const run2 = {
+ post: post5,
+}
+
+export const byNodeId2 = {
+ run: run2,
+}
+
+export const nodes2 = {
+ byNodeId: byNodeId2,
+}
+
+export const iteration = {
+ nodes: nodes2,
+}
+
+/**
+ * Run draft workflow loop node
+ *
+ * Run draft workflow loop node for advanced chat
+ */
+export const post6 = oc
+ .route({
+ description: 'Run draft workflow loop node for advanced chat',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRun',
+ path: '/apps/{app_id}/advanced-chat/workflows/draft/loop/nodes/{node_id}/run',
+ summary: 'Run draft workflow loop node',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunBody,
+ params: zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponse)
+
+export const run3 = {
+ post: post6,
+}
+
+export const byNodeId3 = {
+ run: run3,
+}
+
+export const nodes3 = {
+ byNodeId: byNodeId3,
+}
+
+export const loop = {
+ nodes: nodes3,
+}
+
+/**
+ * Run draft workflow
+ *
+ * Run draft workflow for advanced chat application
+ */
+export const post7 = oc
+ .route({
+ description: 'Run draft workflow for advanced chat application',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAdvancedChatWorkflowsDraftRun',
+ path: '/apps/{app_id}/advanced-chat/workflows/draft/run',
+ summary: 'Run draft workflow',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdAdvancedChatWorkflowsDraftRunBody,
+ params: zPostAppsByAppIdAdvancedChatWorkflowsDraftRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdAdvancedChatWorkflowsDraftRunResponse)
+
+export const run4 = {
+ post: post7,
+}
+
+export const draft = {
+ humanInput,
+ iteration,
+ loop,
+ run: run4,
+}
+
+export const workflows2 = {
+ draft,
+}
+
+export const advancedChat = {
+ workflowRuns,
+ workflows: workflows2,
+}
+
+/**
+ * Get agent logs
+ *
+ * Get agent execution logs for an application
+ */
+export const get5 = oc
+ .route({
+ description: 'Get agent execution logs for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAgentLogs',
+ path: '/apps/{app_id}/agent/logs',
+ summary: 'Get agent logs',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdAgentLogsPath, query: zGetAppsByAppIdAgentLogsQuery }))
+ .output(zGetAppsByAppIdAgentLogsResponse)
+
+export const logs = {
+ get: get5,
+}
+
+export const agent = {
+ logs,
+}
+
+/**
+ * Get status of annotation reply action job
+ */
+export const get6 = oc
+ .route({
+ description: 'Get status of annotation reply action job',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAnnotationReplyByActionStatusByJobId',
+ path: '/apps/{app_id}/annotation-reply/{action}/status/{job_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdPath }))
+ .output(zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponse)
+
+export const byJobId = {
+ get: get6,
+}
+
+export const status = {
+ byJobId,
+}
+
+/**
+ * Enable or disable annotation reply for an app
+ */
+export const post8 = oc
+ .route({
+ description: 'Enable or disable annotation reply for an app',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAnnotationReplyByAction',
+ path: '/apps/{app_id}/annotation-reply/{action}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdAnnotationReplyByActionBody,
+ params: zPostAppsByAppIdAnnotationReplyByActionPath,
+ }),
+ )
+ .output(zPostAppsByAppIdAnnotationReplyByActionResponse)
+
+export const byAction = {
+ post: post8,
+ status,
+}
+
+export const annotationReply = {
+ byAction,
+}
+
+/**
+ * Get annotation settings for an app
+ */
+export const get7 = oc
+ .route({
+ description: 'Get annotation settings for an app',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAnnotationSetting',
+ path: '/apps/{app_id}/annotation-setting',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdAnnotationSettingPath }))
+ .output(zGetAppsByAppIdAnnotationSettingResponse)
+
+export const annotationSetting = {
+ get: get7,
+}
+
+/**
+ * Update annotation settings for an app
+ */
+export const post9 = oc
+ .route({
+ description: 'Update annotation settings for an app',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAnnotationSettingsByAnnotationSettingId',
+ path: '/apps/{app_id}/annotation-settings/{annotation_setting_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdBody,
+ params: zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdPath,
+ }),
+ )
+ .output(zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponse)
+
+export const byAnnotationSettingId = {
+ post: post9,
+}
+
+export const annotationSettings = {
+ byAnnotationSettingId,
+}
+
+/**
+ * Batch import annotations from CSV file with rate limiting and security checks
+ */
+export const post10 = oc
+ .route({
+ description: 'Batch import annotations from CSV file with rate limiting and security checks',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAnnotationsBatchImport',
+ path: '/apps/{app_id}/annotations/batch-import',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdAnnotationsBatchImportPath }))
+ .output(zPostAppsByAppIdAnnotationsBatchImportResponse)
+
+export const batchImport = {
+ post: post10,
+}
+
+/**
+ * Get status of batch import job
+ */
+export const get8 = oc
+ .route({
+ description: 'Get status of batch import job',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAnnotationsBatchImportStatusByJobId',
+ path: '/apps/{app_id}/annotations/batch-import-status/{job_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdPath }))
+ .output(zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponse)
+
+export const byJobId2 = {
+ get: get8,
+}
+
+export const batchImportStatus = {
+ byJobId: byJobId2,
+}
+
+/**
+ * Get count of message annotations for the app
+ */
+export const get9 = oc
+ .route({
+ description: 'Get count of message annotations for the app',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAnnotationsCount',
+ path: '/apps/{app_id}/annotations/count',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdAnnotationsCountPath }))
+ .output(zGetAppsByAppIdAnnotationsCountResponse)
+
+export const count2 = {
+ get: get9,
+}
+
+/**
+ * Export all annotations for an app with CSV injection protection
+ */
+export const get10 = oc
+ .route({
+ description: 'Export all annotations for an app with CSV injection protection',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAnnotationsExport',
+ path: '/apps/{app_id}/annotations/export',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdAnnotationsExportPath }))
+ .output(zGetAppsByAppIdAnnotationsExportResponse)
+
+export const export_ = {
+ get: get10,
+}
+
+/**
+ * Get hit histories for an annotation
+ */
+export const get11 = oc
+ .route({
+ description: 'Get hit histories for an annotation',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAnnotationsByAnnotationIdHitHistories',
+ path: '/apps/{app_id}/annotations/{annotation_id}/hit-histories',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesPath,
+ query: zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponse)
+
+export const hitHistories = {
+ get: get11,
+}
+
+export const delete_ = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdAnnotationsByAnnotationId',
+ path: '/apps/{app_id}/annotations/{annotation_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdAnnotationsByAnnotationIdPath }))
+ .output(zDeleteAppsByAppIdAnnotationsByAnnotationIdResponse)
+
+/**
+ * Update or delete an annotation
+ */
+export const post11 = oc
+ .route({
+ description: 'Update or delete an annotation',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAnnotationsByAnnotationId',
+ path: '/apps/{app_id}/annotations/{annotation_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdAnnotationsByAnnotationIdBody,
+ params: zPostAppsByAppIdAnnotationsByAnnotationIdPath,
+ }),
+ )
+ .output(zPostAppsByAppIdAnnotationsByAnnotationIdResponse)
+
+export const byAnnotationId = {
+ delete: delete_,
+ post: post11,
+ hitHistories,
+}
+
+export const delete2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdAnnotations',
+ path: '/apps/{app_id}/annotations',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdAnnotationsPath }))
+ .output(zDeleteAppsByAppIdAnnotationsResponse)
+
+/**
+ * Get annotations for an app with pagination
+ */
+export const get12 = oc
+ .route({
+ description: 'Get annotations for an app with pagination',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdAnnotations',
+ path: '/apps/{app_id}/annotations',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdAnnotationsPath,
+ query: zGetAppsByAppIdAnnotationsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdAnnotationsResponse)
+
+/**
+ * Create a new annotation for an app
+ */
+export const post12 = oc
+ .route({
+ description: 'Create a new annotation for an app',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAnnotations',
+ path: '/apps/{app_id}/annotations',
+ successStatus: 201,
+ tags: ['console'],
+ })
+ .input(
+ z.object({ body: zPostAppsByAppIdAnnotationsBody, params: zPostAppsByAppIdAnnotationsPath }),
+ )
+ .output(zPostAppsByAppIdAnnotationsResponse)
+
+export const annotations = {
+ delete: delete2,
+ get: get12,
+ post: post12,
+ batchImport,
+ batchImportStatus,
+ count: count2,
+ export: export_,
+ byAnnotationId,
+}
+
+/**
+ * Enable or disable app API
+ */
+export const post13 = oc
+ .route({
+ description: 'Enable or disable app API',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdApiEnable',
+ path: '/apps/{app_id}/api-enable',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsByAppIdApiEnableBody, params: zPostAppsByAppIdApiEnablePath }))
+ .output(zPostAppsByAppIdApiEnableResponse)
+
+export const apiEnable = {
+ post: post13,
+}
+
+/**
+ * Transcript audio to text for chat messages
+ */
+export const post14 = oc
+ .route({
+ description: 'Transcript audio to text for chat messages',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdAudioToText',
+ path: '/apps/{app_id}/audio-to-text',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdAudioToTextPath }))
+ .output(zPostAppsByAppIdAudioToTextResponse)
+
+export const audioToText = {
+ post: post14,
+}
+
+/**
+ * Delete a chat conversation
+ */
+export const delete3 = oc
+ .route({
+ description: 'Delete a chat conversation',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdChatConversationsByConversationId',
+ path: '/apps/{app_id}/chat-conversations/{conversation_id}',
+ successStatus: 204,
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdChatConversationsByConversationIdPath }))
+ .output(zDeleteAppsByAppIdChatConversationsByConversationIdResponse)
+
+/**
+ * Get chat conversation details
+ */
+export const get13 = oc
+ .route({
+ description: 'Get chat conversation details',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdChatConversationsByConversationId',
+ path: '/apps/{app_id}/chat-conversations/{conversation_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdChatConversationsByConversationIdPath }))
+ .output(zGetAppsByAppIdChatConversationsByConversationIdResponse)
+
+export const byConversationId = {
+ delete: delete3,
+ get: get13,
+}
+
+/**
+ * Get chat conversations with pagination, filtering and summary
+ */
+export const get14 = oc
+ .route({
+ description: 'Get chat conversations with pagination, filtering and summary',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdChatConversations',
+ path: '/apps/{app_id}/chat-conversations',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdChatConversationsPath,
+ query: zGetAppsByAppIdChatConversationsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdChatConversationsResponse)
+
+export const chatConversations = {
+ get: get14,
+ byConversationId,
+}
+
+/**
+ * Get suggested questions for a message
+ */
+export const get15 = oc
+ .route({
+ description: 'Get suggested questions for a message',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdChatMessagesByMessageIdSuggestedQuestions',
+ path: '/apps/{app_id}/chat-messages/{message_id}/suggested-questions',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsPath }))
+ .output(zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponse)
+
+export const suggestedQuestions = {
+ get: get15,
+}
+
+export const byMessageId = {
+ suggestedQuestions,
+}
+
+/**
+ * Stop a running chat message generation
+ */
+export const post15 = oc
+ .route({
+ description: 'Stop a running chat message generation',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdChatMessagesByTaskIdStop',
+ path: '/apps/{app_id}/chat-messages/{task_id}/stop',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdChatMessagesByTaskIdStopPath }))
+ .output(zPostAppsByAppIdChatMessagesByTaskIdStopResponse)
+
+export const stop = {
+ post: post15,
+}
+
+export const byTaskId = {
+ stop,
+}
+
+/**
+ * Get chat messages for a conversation with pagination
+ */
+export const get16 = oc
+ .route({
+ description: 'Get chat messages for a conversation with pagination',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdChatMessages',
+ path: '/apps/{app_id}/chat-messages',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zGetAppsByAppIdChatMessagesPath, query: zGetAppsByAppIdChatMessagesQuery }),
+ )
+ .output(zGetAppsByAppIdChatMessagesResponse)
+
+export const chatMessages = {
+ get: get16,
+ byMessageId,
+ byTaskId,
+}
+
+/**
+ * Delete a completion conversation
+ */
+export const delete4 = oc
+ .route({
+ description: 'Delete a completion conversation',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdCompletionConversationsByConversationId',
+ path: '/apps/{app_id}/completion-conversations/{conversation_id}',
+ successStatus: 204,
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdCompletionConversationsByConversationIdPath }))
+ .output(zDeleteAppsByAppIdCompletionConversationsByConversationIdResponse)
+
+/**
+ * Get completion conversation details with messages
+ */
+export const get17 = oc
+ .route({
+ description: 'Get completion conversation details with messages',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdCompletionConversationsByConversationId',
+ path: '/apps/{app_id}/completion-conversations/{conversation_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdCompletionConversationsByConversationIdPath }))
+ .output(zGetAppsByAppIdCompletionConversationsByConversationIdResponse)
+
+export const byConversationId2 = {
+ delete: delete4,
+ get: get17,
+}
+
+/**
+ * Get completion conversations with pagination and filtering
+ */
+export const get18 = oc
+ .route({
+ description: 'Get completion conversations with pagination and filtering',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdCompletionConversations',
+ path: '/apps/{app_id}/completion-conversations',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdCompletionConversationsPath,
+ query: zGetAppsByAppIdCompletionConversationsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdCompletionConversationsResponse)
+
+export const completionConversations = {
+ get: get18,
+ byConversationId: byConversationId2,
+}
+
+/**
+ * Stop a running completion message generation
+ */
+export const post16 = oc
+ .route({
+ description: 'Stop a running completion message generation',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdCompletionMessagesByTaskIdStop',
+ path: '/apps/{app_id}/completion-messages/{task_id}/stop',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdCompletionMessagesByTaskIdStopPath }))
+ .output(zPostAppsByAppIdCompletionMessagesByTaskIdStopResponse)
+
+export const stop2 = {
+ post: post16,
+}
+
+export const byTaskId2 = {
+ stop: stop2,
+}
+
+/**
+ * Generate completion message for debugging
+ */
+export const post17 = oc
+ .route({
+ description: 'Generate completion message for debugging',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdCompletionMessages',
+ path: '/apps/{app_id}/completion-messages',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdCompletionMessagesBody,
+ params: zPostAppsByAppIdCompletionMessagesPath,
+ }),
+ )
+ .output(zPostAppsByAppIdCompletionMessagesResponse)
+
+export const completionMessages = {
+ post: post17,
+ byTaskId: byTaskId2,
+}
+
+/**
+ * Get conversation variables for an application
+ */
+export const get19 = oc
+ .route({
+ description: 'Get conversation variables for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdConversationVariables',
+ path: '/apps/{app_id}/conversation-variables',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdConversationVariablesPath,
+ query: zGetAppsByAppIdConversationVariablesQuery,
+ }),
+ )
+ .output(zGetAppsByAppIdConversationVariablesResponse)
+
+export const conversationVariables = {
+ get: get19,
+}
+
+/**
+ * Convert basic mode of chatbot app to workflow mode
+ *
+ * Convert application to workflow mode
+ * Convert expert mode of chatbot app to workflow mode
+ * Convert Completion App to Workflow App
+ */
+export const post18 = oc
+ .route({
+ description:
+ 'Convert application to workflow mode\nConvert expert mode of chatbot app to workflow mode\nConvert Completion App to Workflow App',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdConvertToWorkflow',
+ path: '/apps/{app_id}/convert-to-workflow',
+ summary: 'Convert basic mode of chatbot app to workflow mode',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdConvertToWorkflowBody,
+ params: zPostAppsByAppIdConvertToWorkflowPath,
+ }),
+ )
+ .output(zPostAppsByAppIdConvertToWorkflowResponse)
+
+export const convertToWorkflow = {
+ post: post18,
+}
+
+/**
+ * Copy app
+ *
+ * Create a copy of an existing application
+ */
+export const post19 = oc
+ .route({
+ description: 'Create a copy of an existing application',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdCopy',
+ path: '/apps/{app_id}/copy',
+ successStatus: 201,
+ summary: 'Copy app',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsByAppIdCopyBody, params: zPostAppsByAppIdCopyPath }))
+ .output(zPostAppsByAppIdCopyResponse)
+
+export const copy = {
+ post: post19,
+}
+
+/**
+ * Export app
+ *
+ * Export application configuration as DSL
+ */
+export const get20 = oc
+ .route({
+ description: 'Export application configuration as DSL',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdExport',
+ path: '/apps/{app_id}/export',
+ summary: 'Export app',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zGetAppsByAppIdExportPath, query: zGetAppsByAppIdExportQuery.optional() }),
+ )
+ .output(zGetAppsByAppIdExportResponse)
+
+export const export2 = {
+ get: get20,
+}
+
+/**
+ * Export user feedback data for Google Sheets
+ */
+export const get21 = oc
+ .route({
+ description: 'Export user feedback data for Google Sheets',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdFeedbacksExport',
+ path: '/apps/{app_id}/feedbacks/export',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdFeedbacksExportPath,
+ query: zGetAppsByAppIdFeedbacksExportQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdFeedbacksExportResponse)
+
+export const export3 = {
+ get: get21,
+}
+
+/**
+ * Create or update message feedback (like/dislike)
+ */
+export const post20 = oc
+ .route({
+ description: 'Create or update message feedback (like/dislike)',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdFeedbacks',
+ path: '/apps/{app_id}/feedbacks',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsByAppIdFeedbacksBody, params: zPostAppsByAppIdFeedbacksPath }))
+ .output(zPostAppsByAppIdFeedbacksResponse)
+
+export const feedbacks = {
+ post: post20,
+ export: export3,
+}
+
+/**
+ * Update application icon
+ */
+export const post21 = oc
+ .route({
+ description: 'Update application icon',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdIcon',
+ path: '/apps/{app_id}/icon',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsByAppIdIconBody, params: zPostAppsByAppIdIconPath }))
+ .output(zPostAppsByAppIdIconResponse)
+
+export const icon = {
+ post: post21,
+}
+
+/**
+ * Get message details by ID
+ */
+export const get22 = oc
+ .route({
+ description: 'Get message details by ID',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdMessagesByMessageId',
+ path: '/apps/{app_id}/messages/{message_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdMessagesByMessageIdPath }))
+ .output(zGetAppsByAppIdMessagesByMessageIdResponse)
+
+export const byMessageId2 = {
+ get: get22,
+}
+
+export const messages = {
+ byMessageId: byMessageId2,
+}
+
+/**
+ * Modify app model config
+ *
+ * Update application model configuration
+ */
+export const post22 = oc
+ .route({
+ description: 'Update application model configuration',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdModelConfig',
+ path: '/apps/{app_id}/model-config',
+ summary: 'Modify app model config',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ body: zPostAppsByAppIdModelConfigBody, params: zPostAppsByAppIdModelConfigPath }),
+ )
+ .output(zPostAppsByAppIdModelConfigResponse)
+
+export const modelConfig = {
+ post: post22,
+}
+
+/**
+ * Check if app name is available
+ */
+export const post23 = oc
+ .route({
+ description: 'Check if app name is available',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdName',
+ path: '/apps/{app_id}/name',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsByAppIdNameBody, params: zPostAppsByAppIdNamePath }))
+ .output(zPostAppsByAppIdNameResponse)
+
+export const name = {
+ post: post23,
+}
+
+/**
+ * Publish app to Creators Platform
+ */
+export const post24 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdPublishToCreatorsPlatform',
+ path: '/apps/{app_id}/publish-to-creators-platform',
+ summary: 'Publish app to Creators Platform',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdPublishToCreatorsPlatformPath }))
+ .output(zPostAppsByAppIdPublishToCreatorsPlatformResponse)
+
+export const publishToCreatorsPlatform = {
+ post: post24,
+}
+
+/**
+ * Get MCP server configuration for an application
+ */
+export const get23 = oc
+ .route({
+ description: 'Get MCP server configuration for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdServer',
+ path: '/apps/{app_id}/server',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdServerPath }))
+ .output(zGetAppsByAppIdServerResponse)
+
+/**
+ * Create MCP server configuration for an application
+ */
+export const post25 = oc
+ .route({
+ description: 'Create MCP server configuration for an application',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdServer',
+ path: '/apps/{app_id}/server',
+ successStatus: 201,
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsByAppIdServerBody, params: zPostAppsByAppIdServerPath }))
+ .output(zPostAppsByAppIdServerResponse)
+
+/**
+ * Update MCP server configuration for an application
+ */
+export const put = oc
+ .route({
+ description: 'Update MCP server configuration for an application',
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putAppsByAppIdServer',
+ path: '/apps/{app_id}/server',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPutAppsByAppIdServerBody, params: zPutAppsByAppIdServerPath }))
+ .output(zPutAppsByAppIdServerResponse)
+
+export const server = {
+ get: get23,
+ post: post25,
+ put,
+}
+
+/**
+ * Reset access token for application site
+ */
+export const post26 = oc
+ .route({
+ description: 'Reset access token for application site',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdSiteAccessTokenReset',
+ path: '/apps/{app_id}/site/access-token-reset',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdSiteAccessTokenResetPath }))
+ .output(zPostAppsByAppIdSiteAccessTokenResetResponse)
+
+export const accessTokenReset = {
+ post: post26,
+}
+
+/**
+ * Update application site configuration
+ */
+export const post27 = oc
+ .route({
+ description: 'Update application site configuration',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdSite',
+ path: '/apps/{app_id}/site',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsByAppIdSiteBody, params: zPostAppsByAppIdSitePath }))
+ .output(zPostAppsByAppIdSiteResponse)
+
+export const site = {
+ post: post27,
+ accessTokenReset,
+}
+
+/**
+ * Enable or disable app site
+ */
+export const post28 = oc
+ .route({
+ description: 'Enable or disable app site',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdSiteEnable',
+ path: '/apps/{app_id}/site-enable',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsByAppIdSiteEnableBody, params: zPostAppsByAppIdSiteEnablePath }))
+ .output(zPostAppsByAppIdSiteEnableResponse)
+
+export const siteEnable = {
+ post: post28,
+}
+
+/**
+ * Get average response time statistics for an application
+ */
+export const get24 = oc
+ .route({
+ description: 'Get average response time statistics for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdStatisticsAverageResponseTime',
+ path: '/apps/{app_id}/statistics/average-response-time',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdStatisticsAverageResponseTimePath,
+ query: zGetAppsByAppIdStatisticsAverageResponseTimeQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdStatisticsAverageResponseTimeResponse)
+
+export const averageResponseTime = {
+ get: get24,
+}
+
+/**
+ * Get average session interaction statistics for an application
+ */
+export const get25 = oc
+ .route({
+ description: 'Get average session interaction statistics for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdStatisticsAverageSessionInteractions',
+ path: '/apps/{app_id}/statistics/average-session-interactions',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdStatisticsAverageSessionInteractionsPath,
+ query: zGetAppsByAppIdStatisticsAverageSessionInteractionsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdStatisticsAverageSessionInteractionsResponse)
+
+export const averageSessionInteractions = {
+ get: get25,
+}
+
+/**
+ * Get daily conversation statistics for an application
+ */
+export const get26 = oc
+ .route({
+ description: 'Get daily conversation statistics for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdStatisticsDailyConversations',
+ path: '/apps/{app_id}/statistics/daily-conversations',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdStatisticsDailyConversationsPath,
+ query: zGetAppsByAppIdStatisticsDailyConversationsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdStatisticsDailyConversationsResponse)
+
+export const dailyConversations = {
+ get: get26,
+}
+
+/**
+ * Get daily terminal/end-user statistics for an application
+ */
+export const get27 = oc
+ .route({
+ description: 'Get daily terminal/end-user statistics for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdStatisticsDailyEndUsers',
+ path: '/apps/{app_id}/statistics/daily-end-users',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdStatisticsDailyEndUsersPath,
+ query: zGetAppsByAppIdStatisticsDailyEndUsersQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdStatisticsDailyEndUsersResponse)
+
+export const dailyEndUsers = {
+ get: get27,
+}
+
+/**
+ * Get daily message statistics for an application
+ */
+export const get28 = oc
+ .route({
+ description: 'Get daily message statistics for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdStatisticsDailyMessages',
+ path: '/apps/{app_id}/statistics/daily-messages',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdStatisticsDailyMessagesPath,
+ query: zGetAppsByAppIdStatisticsDailyMessagesQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdStatisticsDailyMessagesResponse)
+
+export const dailyMessages = {
+ get: get28,
+}
+
+/**
+ * Get daily token cost statistics for an application
+ */
+export const get29 = oc
+ .route({
+ description: 'Get daily token cost statistics for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdStatisticsTokenCosts',
+ path: '/apps/{app_id}/statistics/token-costs',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdStatisticsTokenCostsPath,
+ query: zGetAppsByAppIdStatisticsTokenCostsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdStatisticsTokenCostsResponse)
+
+export const tokenCosts = {
+ get: get29,
+}
+
+/**
+ * Get tokens per second statistics for an application
+ */
+export const get30 = oc
+ .route({
+ description: 'Get tokens per second statistics for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdStatisticsTokensPerSecond',
+ path: '/apps/{app_id}/statistics/tokens-per-second',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdStatisticsTokensPerSecondPath,
+ query: zGetAppsByAppIdStatisticsTokensPerSecondQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdStatisticsTokensPerSecondResponse)
+
+export const tokensPerSecond = {
+ get: get30,
+}
+
+/**
+ * Get user satisfaction rate statistics for an application
+ */
+export const get31 = oc
+ .route({
+ description: 'Get user satisfaction rate statistics for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdStatisticsUserSatisfactionRate',
+ path: '/apps/{app_id}/statistics/user-satisfaction-rate',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdStatisticsUserSatisfactionRatePath,
+ query: zGetAppsByAppIdStatisticsUserSatisfactionRateQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdStatisticsUserSatisfactionRateResponse)
+
+export const userSatisfactionRate = {
+ get: get31,
+}
+
+export const statistics = {
+ averageResponseTime,
+ averageSessionInteractions,
+ dailyConversations,
+ dailyEndUsers,
+ dailyMessages,
+ tokenCosts,
+ tokensPerSecond,
+ userSatisfactionRate,
+}
+
+/**
+ * Get available TTS voices for a specific language
+ */
+export const get32 = oc
+ .route({
+ description: 'Get available TTS voices for a specific language',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdTextToAudioVoices',
+ path: '/apps/{app_id}/text-to-audio/voices',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdTextToAudioVoicesPath,
+ query: zGetAppsByAppIdTextToAudioVoicesQuery,
+ }),
+ )
+ .output(zGetAppsByAppIdTextToAudioVoicesResponse)
+
+export const voices = {
+ get: get32,
+}
+
+/**
+ * Convert text to speech for chat messages
+ */
+export const post29 = oc
+ .route({
+ description: 'Convert text to speech for chat messages',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdTextToAudio',
+ path: '/apps/{app_id}/text-to-audio',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ body: zPostAppsByAppIdTextToAudioBody, params: zPostAppsByAppIdTextToAudioPath }),
+ )
+ .output(zPostAppsByAppIdTextToAudioResponse)
+
+export const textToAudio = {
+ post: post29,
+ voices,
+}
+
+/**
+ * Get app trace
+ *
+ * Get app tracing configuration
+ */
+export const get33 = oc
+ .route({
+ description: 'Get app tracing configuration',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdTrace',
+ path: '/apps/{app_id}/trace',
+ summary: 'Get app trace',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdTracePath }))
+ .output(zGetAppsByAppIdTraceResponse)
+
+/**
+ * Update app tracing configuration
+ */
+export const post30 = oc
+ .route({
+ description: 'Update app tracing configuration',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdTrace',
+ path: '/apps/{app_id}/trace',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsByAppIdTraceBody, params: zPostAppsByAppIdTracePath }))
+ .output(zPostAppsByAppIdTraceResponse)
+
+export const trace = {
+ get: get33,
+ post: post30,
+}
+
+/**
+ * Delete an existing trace app configuration
+ *
+ * Delete an existing tracing configuration for an application
+ */
+export const delete5 = oc
+ .route({
+ description: 'Delete an existing tracing configuration for an application',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdTraceConfig',
+ path: '/apps/{app_id}/trace-config',
+ successStatus: 204,
+ summary: 'Delete an existing trace app configuration',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zDeleteAppsByAppIdTraceConfigBody,
+ params: zDeleteAppsByAppIdTraceConfigPath,
+ }),
+ )
+ .output(zDeleteAppsByAppIdTraceConfigResponse)
+
+/**
+ * Get tracing configuration for an application
+ */
+export const get34 = oc
+ .route({
+ description: 'Get tracing configuration for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdTraceConfig',
+ path: '/apps/{app_id}/trace-config',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zGetAppsByAppIdTraceConfigPath, query: zGetAppsByAppIdTraceConfigQuery }),
+ )
+ .output(zGetAppsByAppIdTraceConfigResponse)
+
+/**
+ * Update an existing trace app configuration
+ *
+ * Update an existing tracing configuration for an application
+ */
+export const patch = oc
+ .route({
+ description: 'Update an existing tracing configuration for an application',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchAppsByAppIdTraceConfig',
+ path: '/apps/{app_id}/trace-config',
+ summary: 'Update an existing trace app configuration',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ body: zPatchAppsByAppIdTraceConfigBody, params: zPatchAppsByAppIdTraceConfigPath }),
+ )
+ .output(zPatchAppsByAppIdTraceConfigResponse)
+
+/**
+ * Create a new trace app configuration
+ *
+ * Create a new tracing configuration for an application
+ */
+export const post31 = oc
+ .route({
+ description: 'Create a new tracing configuration for an application',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdTraceConfig',
+ path: '/apps/{app_id}/trace-config',
+ successStatus: 201,
+ summary: 'Create a new trace app configuration',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ body: zPostAppsByAppIdTraceConfigBody, params: zPostAppsByAppIdTraceConfigPath }),
+ )
+ .output(zPostAppsByAppIdTraceConfigResponse)
+
+export const traceConfig = {
+ delete: delete5,
+ get: get34,
+ patch,
+ post: post31,
+}
+
+/**
+ * Update app trigger (enable/disable)
+ */
+export const post32 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdTriggerEnable',
+ path: '/apps/{app_id}/trigger-enable',
+ summary: 'Update app trigger (enable/disable)',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdTriggerEnableBody,
+ params: zPostAppsByAppIdTriggerEnablePath,
+ }),
+ )
+ .output(zPostAppsByAppIdTriggerEnableResponse)
+
+export const triggerEnable = {
+ post: post32,
+}
+
+/**
+ * Get app triggers list
+ */
+export const get35 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdTriggers',
+ path: '/apps/{app_id}/triggers',
+ summary: 'Get app triggers list',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdTriggersPath }))
+ .output(zGetAppsByAppIdTriggersResponse)
+
+export const triggers = {
+ get: get35,
+}
+
+/**
+ * Get workflow app logs
+ *
+ * Get workflow application execution logs
+ */
+export const get36 = oc
+ .route({
+ description: 'Get workflow application execution logs',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowAppLogs',
+ path: '/apps/{app_id}/workflow-app-logs',
+ summary: 'Get workflow app logs',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowAppLogsPath,
+ query: zGetAppsByAppIdWorkflowAppLogsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowAppLogsResponse)
+
+export const workflowAppLogs = {
+ get: get36,
+}
+
+/**
+ * Get workflow archived logs
+ *
+ * Get workflow archived execution logs
+ */
+export const get37 = oc
+ .route({
+ description: 'Get workflow archived execution logs',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowArchivedLogs',
+ path: '/apps/{app_id}/workflow-archived-logs',
+ summary: 'Get workflow archived logs',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowArchivedLogsPath,
+ query: zGetAppsByAppIdWorkflowArchivedLogsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowArchivedLogsResponse)
+
+export const workflowArchivedLogs = {
+ get: get37,
+}
+
+/**
+ * Get workflow runs count statistics
+ *
+ * Get workflow runs count statistics
+ */
+export const get38 = oc
+ .route({
+ description: 'Get workflow runs count statistics',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowRunsCount',
+ path: '/apps/{app_id}/workflow-runs/count',
+ summary: 'Get workflow runs count statistics',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowRunsCountPath,
+ query: zGetAppsByAppIdWorkflowRunsCountQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowRunsCountResponse)
+
+export const count3 = {
+ get: get38,
+}
+
+/**
+ * Stop workflow task
+ *
+ * Stop running workflow task
+ */
+export const post33 = oc
+ .route({
+ description: 'Stop running workflow task',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowRunsTasksByTaskIdStop',
+ path: '/apps/{app_id}/workflow-runs/tasks/{task_id}/stop',
+ summary: 'Stop workflow task',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopPath }))
+ .output(zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponse)
+
+export const stop3 = {
+ post: post33,
+}
+
+export const byTaskId3 = {
+ stop: stop3,
+}
+
+export const tasks = {
+ byTaskId: byTaskId3,
+}
+
+/**
+ * Generate a download URL for an archived workflow run.
+ */
+export const get39 = oc
+ .route({
+ description: 'Generate a download URL for an archived workflow run.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowRunsByRunIdExport',
+ path: '/apps/{app_id}/workflow-runs/{run_id}/export',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowRunsByRunIdExportPath }))
+ .output(zGetAppsByAppIdWorkflowRunsByRunIdExportResponse)
+
+export const export4 = {
+ get: get39,
+}
+
+/**
+ * Get workflow run node execution list
+ *
+ * Get workflow run node execution list
+ */
+export const get40 = oc
+ .route({
+ description: 'Get workflow run node execution list',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowRunsByRunIdNodeExecutions',
+ path: '/apps/{app_id}/workflow-runs/{run_id}/node-executions',
+ summary: 'Get workflow run node execution list',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsPath }))
+ .output(zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponse)
+
+export const nodeExecutions = {
+ get: get40,
+}
+
+/**
+ * Get workflow run detail
+ *
+ * Get workflow run detail
+ */
+export const get41 = oc
+ .route({
+ description: 'Get workflow run detail',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowRunsByRunId',
+ path: '/apps/{app_id}/workflow-runs/{run_id}',
+ summary: 'Get workflow run detail',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowRunsByRunIdPath }))
+ .output(zGetAppsByAppIdWorkflowRunsByRunIdResponse)
+
+export const byRunId = {
+ get: get41,
+ export: export4,
+ nodeExecutions,
+}
+
+/**
+ * Get workflow run list
+ *
+ * Get workflow run list
+ */
+export const get42 = oc
+ .route({
+ description: 'Get workflow run list',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowRuns',
+ path: '/apps/{app_id}/workflow-runs',
+ summary: 'Get workflow run list',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowRunsPath,
+ query: zGetAppsByAppIdWorkflowRunsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowRunsResponse)
+
+export const workflowRuns2 = {
+ get: get42,
+ count: count3,
+ tasks,
+ byRunId,
+}
+
+/**
+ * Get all users in current tenant for mentions
+ *
+ * Get all users in current tenant for mentions
+ */
+export const get43 = oc
+ .route({
+ description: 'Get all users in current tenant for mentions',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowCommentsMentionUsers',
+ path: '/apps/{app_id}/workflow/comments/mention-users',
+ summary: 'Get all users in current tenant for mentions',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowCommentsMentionUsersPath }))
+ .output(zGetAppsByAppIdWorkflowCommentsMentionUsersResponse)
+
+export const mentionUsers = {
+ get: get43,
+}
+
+/**
+ * Delete a comment reply
+ *
+ * Delete a comment reply
+ */
+export const delete6 = oc
+ .route({
+ description: 'Delete a comment reply',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyId',
+ path: '/apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}',
+ successStatus: 204,
+ summary: 'Delete a comment reply',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath }))
+ .output(zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse)
+
+/**
+ * Update a comment reply
+ *
+ * Update a comment reply
+ */
+export const put2 = oc
+ .route({
+ description: 'Update a comment reply',
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyId',
+ path: '/apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}',
+ summary: 'Update a comment reply',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdBody,
+ params: zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath,
+ }),
+ )
+ .output(zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse)
+
+export const byReplyId = {
+ delete: delete6,
+ put: put2,
+}
+
+/**
+ * Add a reply to a workflow comment
+ *
+ * Add a reply to a workflow comment
+ */
+export const post34 = oc
+ .route({
+ description: 'Add a reply to a workflow comment',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowCommentsByCommentIdReplies',
+ path: '/apps/{app_id}/workflow/comments/{comment_id}/replies',
+ successStatus: 201,
+ summary: 'Add a reply to a workflow comment',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesBody,
+ params: zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponse)
+
+export const replies = {
+ post: post34,
+ byReplyId,
+}
+
+/**
+ * Resolve a workflow comment
+ *
+ * Resolve a workflow comment
+ */
+export const post35 = oc
+ .route({
+ description: 'Resolve a workflow comment',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowCommentsByCommentIdResolve',
+ path: '/apps/{app_id}/workflow/comments/{comment_id}/resolve',
+ summary: 'Resolve a workflow comment',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdWorkflowCommentsByCommentIdResolvePath }))
+ .output(zPostAppsByAppIdWorkflowCommentsByCommentIdResolveResponse)
+
+export const resolve = {
+ post: post35,
+}
+
+/**
+ * Delete a workflow comment
+ *
+ * Delete a workflow comment
+ */
+export const delete7 = oc
+ .route({
+ description: 'Delete a workflow comment',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdWorkflowCommentsByCommentId',
+ path: '/apps/{app_id}/workflow/comments/{comment_id}',
+ successStatus: 204,
+ summary: 'Delete a workflow comment',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdWorkflowCommentsByCommentIdPath }))
+ .output(zDeleteAppsByAppIdWorkflowCommentsByCommentIdResponse)
+
+/**
+ * Get a specific workflow comment
+ *
+ * Get a specific workflow comment
+ */
+export const get44 = oc
+ .route({
+ description: 'Get a specific workflow comment',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowCommentsByCommentId',
+ path: '/apps/{app_id}/workflow/comments/{comment_id}',
+ summary: 'Get a specific workflow comment',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowCommentsByCommentIdPath }))
+ .output(zGetAppsByAppIdWorkflowCommentsByCommentIdResponse)
+
+/**
+ * Update a workflow comment
+ *
+ * Update a workflow comment
+ */
+export const put3 = oc
+ .route({
+ description: 'Update a workflow comment',
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putAppsByAppIdWorkflowCommentsByCommentId',
+ path: '/apps/{app_id}/workflow/comments/{comment_id}',
+ summary: 'Update a workflow comment',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPutAppsByAppIdWorkflowCommentsByCommentIdBody,
+ params: zPutAppsByAppIdWorkflowCommentsByCommentIdPath,
+ }),
+ )
+ .output(zPutAppsByAppIdWorkflowCommentsByCommentIdResponse)
+
+export const byCommentId = {
+ delete: delete7,
+ get: get44,
+ put: put3,
+ replies,
+ resolve,
+}
+
+/**
+ * Get all comments for a workflow
+ *
+ * Get all comments for a workflow
+ */
+export const get45 = oc
+ .route({
+ description: 'Get all comments for a workflow',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowComments',
+ path: '/apps/{app_id}/workflow/comments',
+ summary: 'Get all comments for a workflow',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowCommentsPath }))
+ .output(zGetAppsByAppIdWorkflowCommentsResponse)
+
+/**
+ * Create a new workflow comment
+ *
+ * Create a new workflow comment
+ */
+export const post36 = oc
+ .route({
+ description: 'Create a new workflow comment',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowComments',
+ path: '/apps/{app_id}/workflow/comments',
+ successStatus: 201,
+ summary: 'Create a new workflow comment',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowCommentsBody,
+ params: zPostAppsByAppIdWorkflowCommentsPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowCommentsResponse)
+
+export const comments = {
+ get: get45,
+ post: post36,
+ mentionUsers,
+ byCommentId,
+}
+
+/**
+ * Get workflow average app interaction statistics
+ */
+export const get46 = oc
+ .route({
+ description: 'Get workflow average app interaction statistics',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowStatisticsAverageAppInteractions',
+ path: '/apps/{app_id}/workflow/statistics/average-app-interactions',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsPath,
+ query: zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponse)
+
+export const averageAppInteractions = {
+ get: get46,
+}
+
+/**
+ * Get workflow daily runs statistics
+ */
+export const get47 = oc
+ .route({
+ description: 'Get workflow daily runs statistics',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowStatisticsDailyConversations',
+ path: '/apps/{app_id}/workflow/statistics/daily-conversations',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowStatisticsDailyConversationsPath,
+ query: zGetAppsByAppIdWorkflowStatisticsDailyConversationsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowStatisticsDailyConversationsResponse)
+
+export const dailyConversations2 = {
+ get: get47,
+}
+
+/**
+ * Get workflow daily terminals statistics
+ */
+export const get48 = oc
+ .route({
+ description: 'Get workflow daily terminals statistics',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowStatisticsDailyTerminals',
+ path: '/apps/{app_id}/workflow/statistics/daily-terminals',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowStatisticsDailyTerminalsPath,
+ query: zGetAppsByAppIdWorkflowStatisticsDailyTerminalsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowStatisticsDailyTerminalsResponse)
+
+export const dailyTerminals = {
+ get: get48,
+}
+
+/**
+ * Get workflow daily token cost statistics
+ */
+export const get49 = oc
+ .route({
+ description: 'Get workflow daily token cost statistics',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowStatisticsTokenCosts',
+ path: '/apps/{app_id}/workflow/statistics/token-costs',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowStatisticsTokenCostsPath,
+ query: zGetAppsByAppIdWorkflowStatisticsTokenCostsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowStatisticsTokenCostsResponse)
+
+export const tokenCosts2 = {
+ get: get49,
+}
+
+export const statistics2 = {
+ averageAppInteractions,
+ dailyConversations: dailyConversations2,
+ dailyTerminals,
+ tokenCosts: tokenCosts2,
+}
+
+export const workflow = {
+ comments,
+ statistics: statistics2,
+}
+
+/**
+ * Get default block config
+ *
+ * Get default block configuration by type
+ */
+export const get50 = oc
+ .route({
+ description: 'Get default block configuration by type',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockType',
+ path: '/apps/{app_id}/workflows/default-workflow-block-configs/{block_type}',
+ summary: 'Get default block config',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypePath,
+ query: zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse)
+
+export const byBlockType = {
+ get: get50,
+}
+
+/**
+ * Get default block config
+ *
+ * Get default block configurations for workflow
+ */
+export const get51 = oc
+ .route({
+ description: 'Get default block configurations for workflow',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDefaultWorkflowBlockConfigs',
+ path: '/apps/{app_id}/workflows/default-workflow-block-configs',
+ summary: 'Get default block config',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsPath }))
+ .output(zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponse)
+
+export const defaultWorkflowBlockConfigs = {
+ get: get51,
+ byBlockType,
+}
+
+/**
+ * Get conversation variables for workflow
+ */
+export const get52 = oc
+ .route({
+ description: 'Get conversation variables for workflow',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDraftConversationVariables',
+ path: '/apps/{app_id}/workflows/draft/conversation-variables',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftConversationVariablesPath }))
+ .output(zGetAppsByAppIdWorkflowsDraftConversationVariablesResponse)
+
+/**
+ * Update conversation variables for workflow draft
+ */
+export const post37 = oc
+ .route({
+ description: 'Update conversation variables for workflow draft',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftConversationVariables',
+ path: '/apps/{app_id}/workflows/draft/conversation-variables',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftConversationVariablesBody,
+ params: zPostAppsByAppIdWorkflowsDraftConversationVariablesPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftConversationVariablesResponse)
+
+export const conversationVariables2 = {
+ get: get52,
+ post: post37,
+}
+
+/**
+ * Get draft workflow
+ *
+ * Get environment variables for workflow
+ */
+export const get53 = oc
+ .route({
+ description: 'Get environment variables for workflow',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDraftEnvironmentVariables',
+ path: '/apps/{app_id}/workflows/draft/environment-variables',
+ summary: 'Get draft workflow',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesPath }))
+ .output(zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse)
+
+/**
+ * Update environment variables for workflow draft
+ */
+export const post38 = oc
+ .route({
+ description: 'Update environment variables for workflow draft',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftEnvironmentVariables',
+ path: '/apps/{app_id}/workflows/draft/environment-variables',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesBody,
+ params: zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse)
+
+export const environmentVariables = {
+ get: get53,
+ post: post38,
+}
+
+/**
+ * Update draft workflow features
+ */
+export const post39 = oc
+ .route({
+ description: 'Update draft workflow features',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftFeatures',
+ path: '/apps/{app_id}/workflows/draft/features',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftFeaturesBody,
+ params: zPostAppsByAppIdWorkflowsDraftFeaturesPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftFeaturesResponse)
+
+export const features = {
+ post: post39,
+}
+
+/**
+ * Test human input delivery
+ *
+ * Test human input delivery for workflow
+ */
+export const post40 = oc
+ .route({
+ description: 'Test human input delivery for workflow',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTest',
+ path: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/delivery-test',
+ summary: 'Test human input delivery',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestBody,
+ params: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponse)
+
+export const deliveryTest = {
+ post: post40,
+}
+
+/**
+ * Preview human input form content and placeholders
+ *
+ * Get human input form preview for workflow
+ */
+export const post41 = oc
+ .route({
+ description: 'Get human input form preview for workflow',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreview',
+ path: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/preview',
+ summary: 'Preview human input form content and placeholders',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody,
+ params: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse)
+
+export const preview2 = {
+ post: post41,
+}
+
+/**
+ * Submit human input form preview
+ *
+ * Submit human input form preview for workflow
+ */
+export const post42 = oc
+ .route({
+ description: 'Submit human input form preview for workflow',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRun',
+ path: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/run',
+ summary: 'Submit human input form preview',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunBody,
+ params: zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse)
+
+export const run5 = {
+ post: post42,
+}
+
+export const form2 = {
+ preview: preview2,
+ run: run5,
+}
+
+export const byNodeId4 = {
+ deliveryTest,
+ form: form2,
+}
+
+export const nodes4 = {
+ byNodeId: byNodeId4,
+}
+
+export const humanInput2 = {
+ nodes: nodes4,
+}
+
+/**
+ * Run draft workflow iteration node
+ *
+ * Run draft workflow iteration node
+ */
+export const post43 = oc
+ .route({
+ description: 'Run draft workflow iteration node',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRun',
+ path: '/apps/{app_id}/workflows/draft/iteration/nodes/{node_id}/run',
+ summary: 'Run draft workflow iteration node',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunBody,
+ params: zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponse)
+
+export const run6 = {
+ post: post43,
+}
+
+export const byNodeId5 = {
+ run: run6,
+}
+
+export const nodes5 = {
+ byNodeId: byNodeId5,
+}
+
+export const iteration2 = {
+ nodes: nodes5,
+}
+
+/**
+ * Run draft workflow loop node
+ *
+ * Run draft workflow loop node
+ */
+export const post44 = oc
+ .route({
+ description: 'Run draft workflow loop node',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRun',
+ path: '/apps/{app_id}/workflows/draft/loop/nodes/{node_id}/run',
+ summary: 'Run draft workflow loop node',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunBody,
+ params: zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponse)
+
+export const run7 = {
+ post: post44,
+}
+
+export const byNodeId6 = {
+ run: run7,
+}
+
+export const nodes6 = {
+ byNodeId: byNodeId6,
+}
+
+export const loop2 = {
+ nodes: nodes6,
+}
+
+/**
+ * Get last run result for draft workflow node
+ */
+export const get54 = oc
+ .route({
+ description: 'Get last run result for draft workflow node',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDraftNodesByNodeIdLastRun',
+ path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/last-run',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunPath }))
+ .output(zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponse)
+
+export const lastRun = {
+ get: get54,
+}
+
+/**
+ * Run draft workflow node
+ *
+ * Run draft workflow node
+ */
+export const post45 = oc
+ .route({
+ description: 'Run draft workflow node',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftNodesByNodeIdRun',
+ path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/run',
+ summary: 'Run draft workflow node',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunBody,
+ params: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponse)
+
+export const run8 = {
+ post: post45,
+}
+
+/**
+ * Poll for trigger events and execute single node when event arrives
+ *
+ * Poll for trigger events and execute single node when event arrives
+ */
+export const post46 = oc
+ .route({
+ description: 'Poll for trigger events and execute single node when event arrives',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRun',
+ path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/trigger/run',
+ summary: 'Poll for trigger events and execute single node when event arrives',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunPath }))
+ .output(zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponse)
+
+export const run9 = {
+ post: post46,
+}
+
+export const trigger = {
+ run: run9,
+}
+
+/**
+ * Delete all variables for a specific node
+ */
+export const delete8 = oc
+ .route({
+ description: 'Delete all variables for a specific node',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariables',
+ path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/variables',
+ successStatus: 204,
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath }))
+ .output(zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse)
+
+/**
+ * Get variables for a specific node
+ */
+export const get55 = oc
+ .route({
+ description: 'Get variables for a specific node',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDraftNodesByNodeIdVariables',
+ path: '/apps/{app_id}/workflows/draft/nodes/{node_id}/variables',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath }))
+ .output(zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse)
+
+export const variables = {
+ delete: delete8,
+ get: get55,
+}
+
+export const byNodeId7 = {
+ lastRun,
+ run: run8,
+ trigger,
+ variables,
+}
+
+export const nodes7 = {
+ byNodeId: byNodeId7,
+}
+
+/**
+ * Run draft workflow
+ *
+ * Run draft workflow
+ */
+export const post47 = oc
+ .route({
+ description: 'Run draft workflow',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftRun',
+ path: '/apps/{app_id}/workflows/draft/run',
+ summary: 'Run draft workflow',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftRunBody,
+ params: zPostAppsByAppIdWorkflowsDraftRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftRunResponse)
+
+export const run10 = {
+ post: post47,
+}
+
+/**
+ * Get system variables for workflow
+ */
+export const get56 = oc
+ .route({
+ description: 'Get system variables for workflow',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDraftSystemVariables',
+ path: '/apps/{app_id}/workflows/draft/system-variables',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftSystemVariablesPath }))
+ .output(zGetAppsByAppIdWorkflowsDraftSystemVariablesResponse)
+
+export const systemVariables = {
+ get: get56,
+}
+
+/**
+ * Poll for trigger events and execute full workflow when event arrives
+ *
+ * Poll for trigger events and execute full workflow when event arrives
+ */
+export const post48 = oc
+ .route({
+ description: 'Poll for trigger events and execute full workflow when event arrives',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftTriggerRun',
+ path: '/apps/{app_id}/workflows/draft/trigger/run',
+ summary: 'Poll for trigger events and execute full workflow when event arrives',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftTriggerRunBody,
+ params: zPostAppsByAppIdWorkflowsDraftTriggerRunPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftTriggerRunResponse)
+
+export const run11 = {
+ post: post48,
+}
+
+/**
+ * Full workflow debug when the start node is a trigger
+ *
+ * Full workflow debug when the start node is a trigger
+ */
+export const post49 = oc
+ .route({
+ description: 'Full workflow debug when the start node is a trigger',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraftTriggerRunAll',
+ path: '/apps/{app_id}/workflows/draft/trigger/run-all',
+ summary: 'Full workflow debug when the start node is a trigger',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftTriggerRunAllBody,
+ params: zPostAppsByAppIdWorkflowsDraftTriggerRunAllPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftTriggerRunAllResponse)
+
+export const runAll = {
+ post: post49,
+}
+
+export const trigger2 = {
+ run: run11,
+ runAll,
+}
+
+/**
+ * Reset a workflow variable to its default value
+ */
+export const put4 = oc
+ .route({
+ description: 'Reset a workflow variable to its default value',
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putAppsByAppIdWorkflowsDraftVariablesByVariableIdReset',
+ path: '/apps/{app_id}/workflows/draft/variables/{variable_id}/reset',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetPath }))
+ .output(zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse)
+
+export const reset = {
+ put: put4,
+}
+
+/**
+ * Delete a workflow variable
+ */
+export const delete9 = oc
+ .route({
+ description: 'Delete a workflow variable',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdWorkflowsDraftVariablesByVariableId',
+ path: '/apps/{app_id}/workflows/draft/variables/{variable_id}',
+ successStatus: 204,
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdPath }))
+ .output(zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse)
+
+/**
+ * Get a specific workflow variable
+ */
+export const get57 = oc
+ .route({
+ description: 'Get a specific workflow variable',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDraftVariablesByVariableId',
+ path: '/apps/{app_id}/workflows/draft/variables/{variable_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdPath }))
+ .output(zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse)
+
+/**
+ * Update a workflow variable
+ */
+export const patch2 = oc
+ .route({
+ description: 'Update a workflow variable',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchAppsByAppIdWorkflowsDraftVariablesByVariableId',
+ path: '/apps/{app_id}/workflows/draft/variables/{variable_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdBody,
+ params: zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdPath,
+ }),
+ )
+ .output(zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse)
+
+export const byVariableId = {
+ delete: delete9,
+ get: get57,
+ patch: patch2,
+ reset,
+}
+
+/**
+ * Delete all draft workflow variables
+ */
+export const delete10 = oc
+ .route({
+ description: 'Delete all draft workflow variables',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdWorkflowsDraftVariables',
+ path: '/apps/{app_id}/workflows/draft/variables',
+ successStatus: 204,
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdWorkflowsDraftVariablesPath }))
+ .output(zDeleteAppsByAppIdWorkflowsDraftVariablesResponse)
+
+/**
+ * Get draft workflow
+ *
+ * Get draft workflow variables
+ */
+export const get58 = oc
+ .route({
+ description: 'Get draft workflow variables',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDraftVariables',
+ path: '/apps/{app_id}/workflows/draft/variables',
+ summary: 'Get draft workflow',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowsDraftVariablesPath,
+ query: zGetAppsByAppIdWorkflowsDraftVariablesQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowsDraftVariablesResponse)
+
+export const variables2 = {
+ delete: delete10,
+ get: get58,
+ byVariableId,
+}
+
+/**
+ * Get draft workflow
+ *
+ * Get draft workflow for an application
+ */
+export const get59 = oc
+ .route({
+ description: 'Get draft workflow for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsDraft',
+ path: '/apps/{app_id}/workflows/draft',
+ summary: 'Get draft workflow',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowsDraftPath }))
+ .output(zGetAppsByAppIdWorkflowsDraftResponse)
+
+/**
+ * Sync draft workflow
+ *
+ * Sync draft workflow configuration
+ */
+export const post50 = oc
+ .route({
+ description: 'Sync draft workflow configuration',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsDraft',
+ path: '/apps/{app_id}/workflows/draft',
+ summary: 'Sync draft workflow',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsDraftBody,
+ params: zPostAppsByAppIdWorkflowsDraftPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsDraftResponse)
+
+export const draft2 = {
+ get: get59,
+ post: post50,
+ conversationVariables: conversationVariables2,
+ environmentVariables,
+ features,
+ humanInput: humanInput2,
+ iteration: iteration2,
+ loop: loop2,
+ nodes: nodes7,
+ run: run10,
+ systemVariables,
+ trigger: trigger2,
+ variables: variables2,
+}
+
+/**
+ * Get published workflow
+ *
+ * Get published workflow for an application
+ */
+export const get60 = oc
+ .route({
+ description: 'Get published workflow for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsPublish',
+ path: '/apps/{app_id}/workflows/publish',
+ summary: 'Get published workflow',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdWorkflowsPublishPath }))
+ .output(zGetAppsByAppIdWorkflowsPublishResponse)
+
+/**
+ * Publish workflow
+ */
+export const post51 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsPublish',
+ path: '/apps/{app_id}/workflows/publish',
+ summary: 'Publish workflow',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsByAppIdWorkflowsPublishBody,
+ params: zPostAppsByAppIdWorkflowsPublishPath,
+ }),
+ )
+ .output(zPostAppsByAppIdWorkflowsPublishResponse)
+
+export const publish = {
+ get: get60,
+ post: post51,
+}
+
+/**
+ * Get webhook trigger for a node
+ */
+export const get61 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflowsTriggersWebhook',
+ path: '/apps/{app_id}/workflows/triggers/webhook',
+ summary: 'Get webhook trigger for a node',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowsTriggersWebhookPath,
+ query: zGetAppsByAppIdWorkflowsTriggersWebhookQuery,
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowsTriggersWebhookResponse)
+
+export const webhook = {
+ get: get61,
+}
+
+export const triggers2 = {
+ webhook,
+}
+
+/**
+ * Restore a published workflow version into the draft workflow
+ */
+export const post52 = oc
+ .route({
+ description: 'Restore a published workflow version into the draft workflow',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByAppIdWorkflowsByWorkflowIdRestore',
+ path: '/apps/{app_id}/workflows/{workflow_id}/restore',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByAppIdWorkflowsByWorkflowIdRestorePath }))
+ .output(zPostAppsByAppIdWorkflowsByWorkflowIdRestoreResponse)
+
+export const restore = {
+ post: post52,
+}
+
+/**
+ * Delete workflow
+ */
+export const delete11 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppIdWorkflowsByWorkflowId',
+ path: '/apps/{app_id}/workflows/{workflow_id}',
+ summary: 'Delete workflow',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdWorkflowsByWorkflowIdPath }))
+ .output(zDeleteAppsByAppIdWorkflowsByWorkflowIdResponse)
+
+/**
+ * Update workflow attributes
+ *
+ * Update workflow by ID
+ */
+export const patch3 = oc
+ .route({
+ description: 'Update workflow by ID',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchAppsByAppIdWorkflowsByWorkflowId',
+ path: '/apps/{app_id}/workflows/{workflow_id}',
+ summary: 'Update workflow attributes',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPatchAppsByAppIdWorkflowsByWorkflowIdBody,
+ params: zPatchAppsByAppIdWorkflowsByWorkflowIdPath,
+ }),
+ )
+ .output(zPatchAppsByAppIdWorkflowsByWorkflowIdResponse)
+
+export const byWorkflowId = {
+ delete: delete11,
+ patch: patch3,
+ restore,
+}
+
+/**
+ * Get published workflows
+ *
+ * Get all published workflows for an application
+ */
+export const get62 = oc
+ .route({
+ description: 'Get all published workflows for an application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppIdWorkflows',
+ path: '/apps/{app_id}/workflows',
+ summary: 'Get published workflows',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetAppsByAppIdWorkflowsPath,
+ query: zGetAppsByAppIdWorkflowsQuery.optional(),
+ }),
+ )
+ .output(zGetAppsByAppIdWorkflowsResponse)
+
+export const workflows3 = {
+ get: get62,
+ defaultWorkflowBlockConfigs,
+ draft: draft2,
+ publish,
+ triggers: triggers2,
+ byWorkflowId,
+}
+
+/**
+ * Delete app
+ *
+ * Delete application
+ */
+export const delete12 = oc
+ .route({
+ description: 'Delete application',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByAppId',
+ path: '/apps/{app_id}',
+ successStatus: 204,
+ summary: 'Delete app',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByAppIdPath }))
+ .output(zDeleteAppsByAppIdResponse)
+
+/**
+ * Get app detail
+ *
+ * Get application details
+ */
+export const get63 = oc
+ .route({
+ description: 'Get application details',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByAppId',
+ path: '/apps/{app_id}',
+ summary: 'Get app detail',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByAppIdPath }))
+ .output(zGetAppsByAppIdResponse)
+
+/**
+ * Update app
+ *
+ * Update application details
+ */
+export const put5 = oc
+ .route({
+ description: 'Update application details',
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putAppsByAppId',
+ path: '/apps/{app_id}',
+ summary: 'Update app',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPutAppsByAppIdBody, params: zPutAppsByAppIdPath }))
+ .output(zPutAppsByAppIdResponse)
+
+export const byAppId2 = {
+ delete: delete12,
+ get: get63,
+ put: put5,
+ advancedChat,
+ agent,
+ annotationReply,
+ annotationSetting,
+ annotationSettings,
+ annotations,
+ apiEnable,
+ audioToText,
+ chatConversations,
+ chatMessages,
+ completionConversations,
+ completionMessages,
+ conversationVariables,
+ convertToWorkflow,
+ copy,
+ export: export2,
+ feedbacks,
+ icon,
+ messages,
+ modelConfig,
+ name,
+ publishToCreatorsPlatform,
+ server,
+ site,
+ siteEnable,
+ statistics,
+ textToAudio,
+ trace,
+ traceConfig,
+ triggerEnable,
+ triggers,
+ workflowAppLogs,
+ workflowArchivedLogs,
+ workflowRuns: workflowRuns2,
+ workflow,
+ workflows: workflows3,
+}
+
+/**
+ * Delete an API key for an app
+ *
+ * Delete an API key for an app
+ */
+export const delete13 = oc
+ .route({
+ description: 'Delete an API key for an app',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsByResourceIdApiKeysByApiKeyId',
+ path: '/apps/{resource_id}/api-keys/{api_key_id}',
+ successStatus: 204,
+ summary: 'Delete an API key for an app',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteAppsByResourceIdApiKeysByApiKeyIdPath }))
+ .output(zDeleteAppsByResourceIdApiKeysByApiKeyIdResponse)
+
+export const byApiKeyId = {
+ delete: delete13,
+}
+
+/**
+ * Get all API keys for an app
+ *
+ * Get all API keys for an app
+ */
+export const get64 = oc
+ .route({
+ description: 'Get all API keys for an app',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByResourceIdApiKeys',
+ path: '/apps/{resource_id}/api-keys',
+ summary: 'Get all API keys for an app',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByResourceIdApiKeysPath }))
+ .output(zGetAppsByResourceIdApiKeysResponse)
+
+/**
+ * Create a new API key for an app
+ *
+ * Create a new API key for an app
+ */
+export const post53 = oc
+ .route({
+ description: 'Create a new API key for an app',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsByResourceIdApiKeys',
+ path: '/apps/{resource_id}/api-keys',
+ successStatus: 201,
+ summary: 'Create a new API key for an app',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostAppsByResourceIdApiKeysPath }))
+ .output(zPostAppsByResourceIdApiKeysResponse)
+
+export const apiKeys = {
+ get: get64,
+ post: post53,
+ byApiKeyId,
+}
+
+export const byResourceId = {
+ apiKeys,
+}
+
+/**
+ * Refresh MCP server configuration and regenerate server code
+ */
+export const get65 = oc
+ .route({
+ description: 'Refresh MCP server configuration and regenerate server code',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsByServerIdServerRefresh',
+ path: '/apps/{server_id}/server/refresh',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetAppsByServerIdServerRefreshPath }))
+ .output(zGetAppsByServerIdServerRefreshResponse)
+
+export const refresh = {
+ get: get65,
+}
+
+export const server2 = {
+ refresh,
+}
+
+export const byServerId = {
+ server: server2,
+}
+
+/**
+ * Get app list
+ *
+ * Get list of applications with pagination and filtering
+ */
+export const get66 = oc
+ .route({
+ description: 'Get list of applications with pagination and filtering',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getApps',
+ path: '/apps',
+ summary: 'Get app list',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetAppsQuery.optional() }))
+ .output(zGetAppsResponse)
+
+/**
+ * Create app
+ *
+ * Create a new application
+ */
+export const post54 = oc
+ .route({
+ description: 'Create a new application',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postApps',
+ path: '/apps',
+ successStatus: 201,
+ summary: 'Create app',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostAppsBody }))
+ .output(zPostAppsResponse)
+
+export const apps = {
+ get: get66,
+ post: post54,
+ imports,
+ workflows,
+ byAppId: byAppId2,
+ byResourceId,
+ byServerId,
+}
+
+export const contract = {
+ apps,
+}
diff --git a/packages/contracts/generated/api/console/apps/types.gen.ts b/packages/contracts/generated/api/console/apps/types.gen.ts
new file mode 100644
index 00000000000..fe4c10329ee
--- /dev/null
+++ b/packages/contracts/generated/api/console/apps/types.gen.ts
@@ -0,0 +1,4493 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/console/api` | (string & {})
+}
+
+export type AppPagination = {
+ has_next: boolean
+ items: Array<AppPartial>
+ page: number
+ per_page: number
+ total: number
+}
+
+export type CreateAppPayload = {
+ description?: string | null
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: IconType
+ mode: 'chat' | 'agent-chat' | 'advanced-chat' | 'workflow' | 'completion'
+ name: string
+}
+
+export type AppDetail = {
+ access_mode?: string | null
+ app_model_config?: ModelConfig
+ created_at?: number | null
+ created_by?: string | null
+ description?: string | null
+ enable_api: boolean
+ enable_site: boolean
+ icon?: string | null
+ icon_background?: string | null
+ id: string
+ mode_compatible_with_agent: string
+ name: string
+ tags?: Array<Tag>
+ tracing?: JsonValue
+ updated_at?: number | null
+ updated_by?: string | null
+ use_icon_as_answer_icon?: boolean | null
+ workflow?: WorkflowPartial
+}
+
+export type AppImportPayload = {
+ app_id?: string | null
+ description?: string | null
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: string | null
+ mode: string
+ name?: string | null
+ yaml_content?: string | null
+ yaml_url?: string | null
+}
+
+export type Import = {
+ app_id?: string | null
+ app_mode?: string | null
+ current_dsl_version?: string
+ error?: string
+ id: string
+ imported_dsl_version?: string
+ status: ImportStatus
+}
+
+export type CheckDependenciesResult = {
+ leaked_dependencies?: Array<PluginDependency>
+}
+
+export type AppDetailWithSite = {
+ access_mode?: string | null
+ api_base_url?: string | null
+ app_model_config?: ModelConfig
+ created_at?: number | null
+ created_by?: string | null
+ deleted_tools?: Array<DeletedTool>
+ description?: string | null
+ enable_api: boolean
+ enable_site: boolean
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: string | null
+ id: string
+ max_active_requests?: number | null
+ mode_compatible_with_agent: string
+ name: string
+ site?: Site
+ tags?: Array<Tag>
+ tracing?: JsonValue
+ updated_at?: number | null
+ updated_by?: string | null
+ use_icon_as_answer_icon?: boolean | null
+ workflow?: WorkflowPartial
+}
+
+export type UpdateAppPayload = {
+ description?: string | null
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: IconType
+ max_active_requests?: number | null
+ name: string
+ use_icon_as_answer_icon?: boolean | null
+}
+
+export type AdvancedChatWorkflowRunPagination = {
+ [key: string]: unknown
+}
+
+export type WorkflowRunCount = {
+ [key: string]: unknown
+}
+
+export type HumanInputFormPreviewPayload = {
+ inputs?: {
+ [key: string]: unknown
+ }
+}
+
+export type HumanInputFormSubmitPayload = {
+ action: string
+ form_inputs: {
+ [key: string]: unknown
+ }
+ inputs: {
+ [key: string]: unknown
+ }
+}
+
+export type IterationNodeRunPayload = {
+ inputs?: {
+ [key: string]: unknown
+ } | null
+}
+
+export type LoopNodeRunPayload = {
+ inputs?: {
+ [key: string]: unknown
+ } | null
+}
+
+export type AdvancedChatWorkflowRunPayload = {
+ conversation_id?: string | null
+ files?: Array<{
+ [key: string]: unknown
+ }> | null
+ inputs?: {
+ [key: string]: unknown
+ } | null
+ parent_message_id?: string | null
+ query?: string
+}
+
+export type AnnotationReplyPayload = {
+ embedding_model_name: string
+ embedding_provider_name: string
+ score_threshold: number
+}
+
+export type AnnotationSettingUpdatePayload = {
+ score_threshold: number
+}
+
+export type CreateAnnotationPayload = {
+ annotation_reply?: {
+ [key: string]: unknown
+ } | null
+ answer?: string | null
+ content?: string | null
+ message_id?: string | null
+ question?: string | null
+}
+
+export type Annotation = {
+ content?: string | null
+ created_at?: number | null
+ hit_count?: number | null
+ id: string
+ question?: string | null
+}
+
+export type AnnotationCountResponse = {
+ count: number
+}
+
+export type AnnotationExportList = {
+ data: Array<Annotation>
+}
+
+export type UpdateAnnotationPayload = {
+ annotation_reply?: {
+ [key: string]: unknown
+ } | null
+ answer?: string | null
+ content?: string | null
+ question?: string | null
+}
+
+export type AnnotationHitHistoryList = {
+ data: Array<AnnotationHitHistory>
+ has_more: boolean
+ limit: number
+ page: number
+ total: number
+}
+
+export type AppApiStatusPayload = {
+ enable_api: boolean
+}
+
+export type AudioTranscriptResponse = {
+ text: string
+}
+
+export type ConversationWithSummaryPagination = {
+ has_next: boolean
+ items: Array<ConversationWithSummary>
+ page: number
+ per_page: number
+ total: number
+}
+
+export type ConversationDetail = {
+ admin_feedback_stats?: FeedbackStat
+ annotated: boolean
+ created_at?: number | null
+ from_account_id?: string | null
+ from_end_user_id?: string | null
+ from_source: string
+ id: string
+ introduction?: string | null
+ message_count: number
+ model_config?: ModelConfig
+ status: string
+ updated_at?: number | null
+ user_feedback_stats?: FeedbackStat
+}
+
+export type MessageInfiniteScrollPaginationResponse = {
+ data: Array<MessageDetailResponse>
+ has_more: boolean
+ limit: number
+}
+
+export type SuggestedQuestionsResponse = {
+ data: Array<string>
+}
+
+export type ConversationPagination = {
+ has_next: boolean
+ items: Array<Conversation>
+ page: number
+ per_page: number
+ total: number
+}
+
+export type ConversationMessageDetail = {
+ created_at?: number | null
+ first_message?: MessageDetail
+ from_account_id?: string | null
+ from_end_user_id?: string | null
+ from_source: string
+ id: string
+ model_config?: ModelConfig
+ status: string
+}
+
+export type CompletionMessagePayload = {
+ files?: Array<unknown> | null
+ inputs: {
+ [key: string]: unknown
+ }
+ model_config: {
+ [key: string]: unknown
+ }
+ query?: string
+ response_mode?: 'blocking' | 'streaming'
+ retriever_from?: string
+}
+
+export type PaginatedConversationVariableResponse = {
+ data: Array<ConversationVariableResponse>
+ has_more: boolean
+ limit: number
+ page: number
+ total: number
+}
+
+export type ConvertToWorkflowPayload = {
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: string | null
+ name?: string | null
+}
+
+export type CopyAppPayload = {
+ description?: string | null
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: IconType
+ name?: string | null
+}
+
+export type AppExportResponse = {
+ data: string
+}
+
+export type MessageFeedbackPayload = {
+ content?: string | null
+ message_id: string
+ rating?: 'like' | 'dislike' | null
+}
+
+export type AppIconPayload = {
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: IconType
+}
+
+export type MessageDetailResponse = {
+ agent_thoughts?: Array<AgentThought>
+ annotation?: ConversationAnnotation
+ annotation_hit_history?: ConversationAnnotationHitHistory
+ answer_tokens?: number | null
+ conversation_id: string
+ created_at?: number | null
+ error?: string | null
+ extra_contents?: Array<HumanInputContent>
+ feedbacks?: Array<Feedback>
+ from_account_id?: string | null
+ from_end_user_id?: string | null
+ from_source: string
+ id: string
+ inputs: {
+ [key: string]: JsonValue
+ }
+ message?: JsonValue
+ message_files?: Array<MessageFile>
+ message_metadata_dict?: JsonValue
+ message_tokens?: number | null
+ parent_message_id?: string | null
+ provider_response_latency?: number | null
+ query: string
+ re_sign_file_url_answer: string
+ status: string
+ workflow_run_id?: string | null
+}
+
+export type ModelConfigRequest = {
+ agent_mode?: {
+ [key: string]: unknown
+ } | null
+ configs?: {
+ [key: string]: unknown
+ } | null
+ dataset_configs?: {
+ [key: string]: unknown
+ } | null
+ model?: string | null
+ more_like_this?: {
+ [key: string]: unknown
+ } | null
+ opening_statement?: string | null
+ provider?: string | null
+ retrieval_model?: {
+ [key: string]: unknown
+ } | null
+ speech_to_text?: {
+ [key: string]: unknown
+ } | null
+ suggested_questions?: Array<string> | null
+ text_to_speech?: {
+ [key: string]: unknown
+ } | null
+ tools?: Array<{
+ [key: string]: unknown
+ }> | null
+}
+
+export type AppNamePayload = {
+ name: string
+}
+
+export type AppMcpServerResponse = {
+ created_at?: number | null
+ description: string
+ id: string
+ name: string
+ parameters: unknown
+ server_code: string
+ status: AppMcpServerStatus
+ updated_at?: number | null
+}
+
+export type McpServerCreatePayload = {
+ description?: string | null
+ parameters: {
+ [key: string]: unknown
+ }
+}
+
+export type McpServerUpdatePayload = {
+ description?: string | null
+ id: string
+ parameters: {
+ [key: string]: unknown
+ }
+ status?: string | null
+}
+
+export type AppSiteUpdatePayload = {
+ chat_color_theme?: string | null
+ chat_color_theme_inverted?: boolean | null
+ copyright?: string | null
+ custom_disclaimer?: string | null
+ customize_domain?: string | null
+ customize_token_strategy?: 'must' | 'allow' | 'not_allow' | null
+ default_language?: string | null
+ description?: string | null
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: string | null
+ privacy_policy?: string | null
+ prompt_public?: boolean | null
+ show_workflow_steps?: boolean | null
+ title?: string | null
+ use_icon_as_answer_icon?: boolean | null
+}
+
+export type AppSiteResponse = {
+ app_id: string
+ code?: string | null
+ copyright?: string | null
+ custom_disclaimer?: string | null
+ customize_domain?: string | null
+ customize_token_strategy: string
+ default_language: string
+ description?: string | null
+ icon?: string | null
+ icon_background?: string | null
+ privacy_policy?: string | null
+ prompt_public: boolean
+ show_workflow_steps: boolean
+ title: string
+ use_icon_as_answer_icon: boolean
+}
+
+export type AppSiteStatusPayload = {
+ enable_site: boolean
+}
+
+export type TextToSpeechPayload = {
+ message_id?: string | null
+ streaming?: boolean | null
+ text: string
+ voice?: string | null
+}
+
+export type AppTracePayload = {
+ enabled: boolean
+ tracing_provider?: string | null
+}
+
+export type TraceProviderQuery = {
+ tracing_provider: string
+}
+
+export type TraceConfigPayload = {
+ tracing_config: {
+ [key: string]: unknown
+ }
+ tracing_provider: string
+}
+
+export type ParserEnable = {
+ enable_trigger: boolean
+ trigger_id: string
+}
+
+export type WorkflowTriggerResponse = {
+ created_at?: string | null
+ icon: string
+ id: string
+ node_id: string
+ provider_name: string
+ status: string
+ title: string
+ trigger_type: string
+ updated_at?: string | null
+}
+
+export type WorkflowTriggerListResponse = {
+ data: Array<WorkflowTriggerResponse>
+}
+
+export type WorkflowAppLogPaginationResponse = {
+ data: Array<WorkflowAppLogPartialResponse>
+ has_more: boolean
+ limit: number
+ page: number
+ total: number
+}
+
+export type WorkflowArchivedLogPaginationResponse = {
+ data: Array<WorkflowArchivedLogPartialResponse>
+ has_more: boolean
+ limit: number
+ page: number
+ total: number
+}
+
+export type WorkflowRunPagination = {
+ [key: string]: unknown
+}
+
+export type WorkflowRunDetail = {
+ [key: string]: unknown
+}
+
+export type WorkflowRunExport = {
+ [key: string]: unknown
+}
+
+export type WorkflowRunNodeExecutionList = {
+ [key: string]: unknown
+}
+
+export type WorkflowCommentBasic = {
+ [key: string]: unknown
+}
+
+export type WorkflowCommentCreatePayload = {
+ content: string
+ mentioned_user_ids?: Array<string>
+ position_x: number
+ position_y: number
+}
+
+export type WorkflowCommentCreate = {
+ [key: string]: unknown
+}
+
+export type WorkflowCommentMentionUsersPayload = {
+ users: Array<AccountWithRole>
+}
+
+export type WorkflowCommentDetail = {
+ [key: string]: unknown
+}
+
+export type WorkflowCommentUpdatePayload = {
+ content: string
+ mentioned_user_ids?: Array<string> | null
+ position_x?: number | null
+ position_y?: number | null
+}
+
+export type WorkflowCommentUpdate = {
+ [key: string]: unknown
+}
+
+export type WorkflowCommentReplyPayload = {
+ content: string
+ mentioned_user_ids?: Array<string>
+}
+
+export type WorkflowCommentReplyCreate = {
+ [key: string]: unknown
+}
+
+export type WorkflowCommentReplyUpdate = {
+ [key: string]: unknown
+}
+
+export type WorkflowCommentResolve = {
+ [key: string]: unknown
+}
+
+export type WorkflowPagination = {
+ [key: string]: unknown
+}
+
+export type Workflow = {
+ [key: string]: unknown
+}
+
+export type SyncDraftWorkflowPayload = {
+ conversation_variables?: Array<{
+ [key: string]: unknown
+ }>
+ environment_variables?: Array<{
+ [key: string]: unknown
+ }>
+ features: {
+ [key: string]: unknown
+ }
+ graph: {
+ [key: string]: unknown
+ }
+ hash?: string | null
+}
+
+export type SyncDraftWorkflowResponse = {
+ [key: string]: unknown
+}
+
+export type WorkflowDraftVariableList = {
+ [key: string]: unknown
+}
+
+export type ConversationVariableUpdatePayload = {
+ conversation_variables: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type EnvironmentVariableUpdatePayload = {
+ environment_variables: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type WorkflowFeaturesPayload = {
+ features: {
+ [key: string]: unknown
+ }
+}
+
+export type HumanInputDeliveryTestPayload = {
+ delivery_method_id: string
+ inputs?: {
+ [key: string]: unknown
+ }
+}
+
+export type WorkflowRunNodeExecution = {
+ [key: string]: unknown
+}
+
+export type DraftWorkflowNodeRunPayload = {
+ files?: Array<{
+ [key: string]: unknown
+ }> | null
+ inputs: {
+ [key: string]: unknown
+ }
+ query?: string
+}
+
+export type DraftWorkflowRunPayload = {
+ datasource_info_list: Array<{
+ [key: string]: unknown
+ }>
+ datasource_type: string
+ inputs: {
+ [key: string]: unknown
+ }
+ start_node_id: string
+}
+
+export type DraftWorkflowTriggerRunRequest = {
+ [key: string]: unknown
+}
+
+export type DraftWorkflowTriggerRunAllPayload = {
+ node_ids: Array<string>
+}
+
+export type WorkflowDraftVariableListWithoutValue = {
+ [key: string]: unknown
+}
+
+export type WorkflowDraftVariable = {
+ [key: string]: unknown
+}
+
+export type WorkflowDraftVariableUpdatePayload = {
+ name?: string | null
+ value?: unknown
+}
+
+export type PublishWorkflowPayload = {
+ marked_comment?: string | null
+ marked_name?: string | null
+}
+
+export type WebhookTriggerResponse = {
+ created_at?: string | null
+ id: string
+ node_id: string
+ webhook_debug_url: string
+ webhook_id: string
+ webhook_url: string
+}
+
+export type WorkflowUpdatePayload = {
+ marked_comment?: string | null
+ marked_name?: string | null
+}
+
+export type ApiKeyList = {
+ data: Array<ApiKeyItem>
+}
+
+export type ApiKeyItem = {
+ created_at?: number | null
+ id: string
+ last_used_at?: number | null
+ token: string
+ type: string
+}
+
+export type AppPartial = {
+ access_mode?: string | null
+ app_model_config?: ModelConfigPartial
+ author_name?: string | null
+ create_user_name?: string | null
+ created_at?: number | null
+ created_by?: string | null
+ desc_or_prompt?: string | null
+ has_draft_trigger?: boolean | null
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: string | null
+ id: string
+ max_active_requests?: number | null
+ mode_compatible_with_agent: string
+ name: string
+ tags?: Array<Tag>
+ updated_at?: number | null
+ updated_by?: string | null
+ use_icon_as_answer_icon?: boolean | null
+ workflow?: WorkflowPartial
+}
+
+export type IconType = 'image' | 'emoji' | 'link'
+
+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 Tag = {
+ id: string
+ name: string
+ type: string
+}
+
+export type JsonValue = unknown
+
+export type WorkflowPartial = {
+ created_at?: number | null
+ created_by?: string | null
+ id: string
+ updated_at?: number | null
+ updated_by?: string | null
+}
+
+export type ImportStatus = 'completed' | 'completed-with-warnings' | 'pending' | 'failed'
+
+export type PluginDependency = {
+ current_identifier?: string | null
+ type: Type
+ value: unknown
+}
+
+export type DeletedTool = {
+ provider_id: string
+ tool_name: string
+ type: string
+}
+
+export type Site = {
+ app_base_url?: string | null
+ chat_color_theme?: string | null
+ chat_color_theme_inverted?: boolean | null
+ code?: string | null
+ copyright?: string | null
+ created_at?: number | null
+ created_by?: string | null
+ custom_disclaimer?: string | null
+ customize_domain?: string | null
+ customize_token_strategy?: string | null
+ default_language?: string | null
+ description?: string | null
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: unknown
+ privacy_policy?: string | null
+ prompt_public?: boolean | null
+ show_workflow_steps?: boolean | null
+ title?: string | null
+ updated_at?: number | null
+ updated_by?: string | null
+ use_icon_as_answer_icon?: boolean | null
+}
+
+export type AnnotationHitHistory = {
+ annotation_content?: string | null
+ annotation_question?: string | null
+ created_at?: number | null
+ id: string
+ question?: string | null
+ score?: number | null
+ source?: string | null
+}
+
+export type ConversationWithSummary = {
+ admin_feedback_stats?: FeedbackStat
+ annotated: boolean
+ created_at?: number | null
+ from_account_id?: string | null
+ from_account_name?: string | null
+ from_end_user_id?: string | null
+ from_end_user_session_id?: string | null
+ from_source: string
+ id: string
+ message_count: number
+ model_config?: SimpleModelConfig
+ name: string
+ read_at?: number | null
+ status: string
+ status_count?: StatusCount
+ summary_or_query: string
+ updated_at?: number | null
+ user_feedback_stats?: FeedbackStat
+}
+
+export type FeedbackStat = {
+ dislike: number
+ like: number
+}
+
+export type Conversation = {
+ admin_feedback_stats?: FeedbackStat
+ annotation?: ConversationAnnotation
+ created_at?: number | null
+ first_message?: SimpleMessageDetail
+ from_account_id?: string | null
+ from_account_name?: string | null
+ from_end_user_id?: string | null
+ from_end_user_session_id?: string | null
+ from_source: string
+ id: string
+ model_config?: SimpleModelConfig
+ read_at?: number | null
+ status: string
+ updated_at?: number | null
+ user_feedback_stats?: FeedbackStat
+}
+
+export type MessageDetail = {
+ agent_thoughts: Array<AgentThought>
+ annotation?: ConversationAnnotation
+ annotation_hit_history?: ConversationAnnotationHitHistory
+ answer_tokens: number
+ conversation_id: string
+ created_at?: number | null
+ error?: string | null
+ feedbacks: Array<Feedback>
+ from_account_id?: string | null
+ from_end_user_id?: string | null
+ from_source: string
+ id: string
+ inputs: {
+ [key: string]: JsonValue
+ }
+ message: JsonValue
+ message_files: Array<MessageFile>
+ message_metadata_dict: JsonValue
+ message_tokens: number
+ parent_message_id?: string | null
+ provider_response_latency: number
+ query: string
+ re_sign_file_url_answer: string
+ status: string
+ workflow_run_id?: string | null
+}
+
+export type ConversationVariableResponse = {
+ created_at?: number | null
+ description?: string | null
+ id: string
+ name: string
+ updated_at?: number | null
+ value?: string | null
+ value_type: string
+}
+
+export type AgentThought = {
+ chain_id?: string | null
+ created_at?: number | null
+ files: Array<string>
+ id: string
+ message_chain_id?: string | null
+ message_id: string
+ observation?: string | null
+ position: number
+ thought?: string | null
+ tool?: string | null
+ tool_input?: string | null
+ tool_labels: JsonValue
+}
+
+export type ConversationAnnotation = {
+ account?: SimpleAccount
+ content: string
+ created_at?: number | null
+ id: string
+ question?: string | null
+}
+
+export type ConversationAnnotationHitHistory = {
+ annotation_create_account?: SimpleAccount
+ created_at?: number | null
+ id: string
+}
+
+export type HumanInputContent = {
+ form_definition?: HumanInputFormDefinition
+ form_submission_data?: HumanInputFormSubmissionData
+ submitted: boolean
+ type?: ExecutionContentType
+ workflow_run_id: string
+}
+
+export type Feedback = {
+ content?: string | null
+ from_account?: SimpleAccount
+ from_end_user_id?: string | null
+ from_source: string
+ rating: string
+}
+
+export type MessageFile = {
+ belongs_to?: string | null
+ filename: string
+ id: string
+ mime_type?: string | null
+ size?: number | null
+ transfer_method: string
+ type: string
+ upload_file_id?: string | null
+ url?: string | null
+}
+
+export type AppMcpServerStatus = 'normal' | 'active' | 'inactive'
+
+export type WorkflowAppLogPartialResponse = {
+ created_at?: number | null
+ created_by_account?: SimpleAccount
+ created_by_end_user?: SimpleEndUser
+ created_by_role?: string | null
+ created_from?: string | null
+ details?: unknown
+ id: string
+ workflow_run?: WorkflowRunForLogResponse
+}
+
+export type WorkflowArchivedLogPartialResponse = {
+ created_at?: number | null
+ created_by_account?: SimpleAccount
+ created_by_end_user?: SimpleEndUser
+ id: string
+ trigger_metadata?: unknown
+ workflow_run?: WorkflowRunForArchivedLogResponse
+}
+
+export type AccountWithRole = {
+ avatar?: string | null
+ created_at?: number | null
+ email: string
+ id: string
+ last_active_at?: number | null
+ last_login_at?: number | null
+ name: string
+ role: string
+ status: string
+}
+
+export type ModelConfigPartial = {
+ created_at?: number | null
+ created_by?: string | null
+ model_dict?: JsonValue
+ pre_prompt?: string | null
+ updated_at?: number | null
+ updated_by?: string | null
+}
+
+export type Type = 'github' | 'marketplace' | 'package'
+
+export type Github = {
+ github_plugin_unique_identifier: string
+ package: string
+ repo: string
+ version: string
+}
+
+export type Marketplace = {
+ marketplace_plugin_unique_identifier: string
+ version?: string | null
+}
+
+export type Package = {
+ plugin_unique_identifier: string
+ version?: string | null
+}
+
+export type SimpleModelConfig = {
+ model_dict?: JsonValue
+ pre_prompt?: string | null
+}
+
+export type StatusCount = {
+ failed: number
+ partial_success: number
+ paused: number
+ success: number
+}
+
+export type SimpleMessageDetail = {
+ answer: string
+ inputs: {
+ [key: string]: JsonValue
+ }
+ message: string
+ query: string
+}
+
+export type SimpleAccount = {
+ email: string
+ id: string
+ name: string
+}
+
+export type HumanInputFormDefinition = {
+ actions?: Array<UserAction>
+ display_in_ui?: boolean
+ expiration_time: number
+ form_content: string
+ form_id: string
+ form_token?: string | null
+ inputs?: Array<FormInput>
+ node_id: string
+ node_title: string
+ resolved_default_values?: {
+ [key: string]: unknown
+ }
+}
+
+export type HumanInputFormSubmissionData = {
+ action_id: string
+ action_text: string
+ node_id: string
+ node_title: string
+ rendered_content: string
+}
+
+export type ExecutionContentType = 'human_input'
+
+export type SimpleEndUser = {
+ id: string
+ is_anonymous: boolean
+ session_id?: string | null
+ type: string
+}
+
+export type WorkflowRunForLogResponse = {
+ created_at?: number | null
+ elapsed_time?: number | null
+ error?: string | null
+ exceptions_count?: number | null
+ finished_at?: number | null
+ id: string
+ status?: string | null
+ total_steps?: number | null
+ total_tokens?: number | null
+ triggered_from?: string | null
+ version?: string | null
+}
+
+export type WorkflowRunForArchivedLogResponse = {
+ elapsed_time?: number | null
+ id: string
+ status?: string | null
+ total_tokens?: number | null
+ triggered_from?: string | null
+}
+
+export type UserAction = {
+ button_style?: ButtonStyle
+ id: string
+ title: string
+}
+
+export type FormInput = {
+ default?: FormInputDefault
+ output_variable_name: string
+ type: FormInputType
+}
+
+export type ButtonStyle = 'primary' | 'default' | 'accent' | 'ghost'
+
+export type FormInputDefault = {
+ selector?: Array<string>
+ type: PlaceholderType
+ value?: string
+}
+
+export type FormInputType = 'text_input' | 'paragraph'
+
+export type PlaceholderType = 'variable' | 'constant'
+
+export type GetAppsData = {
+ body?: never
+ path?: never
+ query?: {
+ is_created_by_me?: boolean | null
+ limit?: number
+ mode?: 'completion' | 'chat' | 'advanced-chat' | 'workflow' | 'agent-chat' | 'channel' | 'all'
+ name?: string | null
+ page?: number
+ tag_ids?: Array<string> | null
+ }
+ url: '/apps'
+}
+
+export type GetAppsResponses = {
+ 200: AppPagination
+}
+
+export type GetAppsResponse = GetAppsResponses[keyof GetAppsResponses]
+
+export type PostAppsData = {
+ body: CreateAppPayload
+ path?: never
+ query?: never
+ url: '/apps'
+}
+
+export type PostAppsErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsError = PostAppsErrors[keyof PostAppsErrors]
+
+export type PostAppsResponses = {
+ 201: AppDetail
+}
+
+export type PostAppsResponse = PostAppsResponses[keyof PostAppsResponses]
+
+export type PostAppsImportsData = {
+ body: AppImportPayload
+ path?: never
+ query?: never
+ url: '/apps/imports'
+}
+
+export type PostAppsImportsErrors = {
+ 400: Import
+}
+
+export type PostAppsImportsError = PostAppsImportsErrors[keyof PostAppsImportsErrors]
+
+export type PostAppsImportsResponses = {
+ 200: Import
+ 202: Import
+}
+
+export type PostAppsImportsResponse = PostAppsImportsResponses[keyof PostAppsImportsResponses]
+
+export type GetAppsImportsByAppIdCheckDependenciesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/imports/{app_id}/check-dependencies'
+}
+
+export type GetAppsImportsByAppIdCheckDependenciesResponses = {
+ 200: CheckDependenciesResult
+}
+
+export type GetAppsImportsByAppIdCheckDependenciesResponse
+ = GetAppsImportsByAppIdCheckDependenciesResponses[keyof GetAppsImportsByAppIdCheckDependenciesResponses]
+
+export type PostAppsImportsByImportIdConfirmData = {
+ body?: never
+ path: {
+ import_id: string
+ }
+ query?: never
+ url: '/apps/imports/{import_id}/confirm'
+}
+
+export type PostAppsImportsByImportIdConfirmErrors = {
+ 400: Import
+}
+
+export type PostAppsImportsByImportIdConfirmError
+ = PostAppsImportsByImportIdConfirmErrors[keyof PostAppsImportsByImportIdConfirmErrors]
+
+export type PostAppsImportsByImportIdConfirmResponses = {
+ 200: Import
+}
+
+export type PostAppsImportsByImportIdConfirmResponse
+ = PostAppsImportsByImportIdConfirmResponses[keyof PostAppsImportsByImportIdConfirmResponses]
+
+export type GetAppsWorkflowsOnlineUsersData = {
+ body?: never
+ path?: never
+ query: {
+ app_ids: string
+ }
+ url: '/apps/workflows/online-users'
+}
+
+export type GetAppsWorkflowsOnlineUsersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsWorkflowsOnlineUsersResponse
+ = GetAppsWorkflowsOnlineUsersResponses[keyof GetAppsWorkflowsOnlineUsersResponses]
+
+export type DeleteAppsByAppIdData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}'
+}
+
+export type DeleteAppsByAppIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdError = DeleteAppsByAppIdErrors[keyof DeleteAppsByAppIdErrors]
+
+export type DeleteAppsByAppIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdResponse = DeleteAppsByAppIdResponses[keyof DeleteAppsByAppIdResponses]
+
+export type GetAppsByAppIdData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}'
+}
+
+export type GetAppsByAppIdResponses = {
+ 200: AppDetailWithSite
+}
+
+export type GetAppsByAppIdResponse = GetAppsByAppIdResponses[keyof GetAppsByAppIdResponses]
+
+export type PutAppsByAppIdData = {
+ body: UpdateAppPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}'
+}
+
+export type PutAppsByAppIdErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PutAppsByAppIdError = PutAppsByAppIdErrors[keyof PutAppsByAppIdErrors]
+
+export type PutAppsByAppIdResponses = {
+ 200: AppDetailWithSite
+}
+
+export type PutAppsByAppIdResponse = PutAppsByAppIdResponses[keyof PutAppsByAppIdResponses]
+
+export type GetAppsByAppIdAdvancedChatWorkflowRunsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ triggered_from?: 'debugging' | 'app-run' | null
+ status?: 'running' | 'succeeded' | 'failed' | 'stopped' | 'partial-succeeded' | null
+ last_id?: string | null
+ limit?: number
+ }
+ url: '/apps/{app_id}/advanced-chat/workflow-runs'
+}
+
+export type GetAppsByAppIdAdvancedChatWorkflowRunsResponses = {
+ 200: AdvancedChatWorkflowRunPagination
+}
+
+export type GetAppsByAppIdAdvancedChatWorkflowRunsResponse
+ = GetAppsByAppIdAdvancedChatWorkflowRunsResponses[keyof GetAppsByAppIdAdvancedChatWorkflowRunsResponses]
+
+export type GetAppsByAppIdAdvancedChatWorkflowRunsCountData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ triggered_from?: 'debugging' | 'app-run' | null
+ time_range?: string | null
+ status?: 'running' | 'succeeded' | 'failed' | 'stopped' | 'partial-succeeded' | null
+ }
+ url: '/apps/{app_id}/advanced-chat/workflow-runs/count'
+}
+
+export type GetAppsByAppIdAdvancedChatWorkflowRunsCountResponses = {
+ 200: WorkflowRunCount
+}
+
+export type GetAppsByAppIdAdvancedChatWorkflowRunsCountResponse
+ = GetAppsByAppIdAdvancedChatWorkflowRunsCountResponses[keyof GetAppsByAppIdAdvancedChatWorkflowRunsCountResponses]
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewData = {
+ body: HumanInputFormPreviewPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/preview'
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse
+ = PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses]
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunData = {
+ body: HumanInputFormSubmitPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/advanced-chat/workflows/draft/human-input/nodes/{node_id}/form/run'
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse
+ = PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses]
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunData = {
+ body: IterationNodeRunPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/advanced-chat/workflows/draft/iteration/nodes/{node_id}/run'
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunError
+ = PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunErrors[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunErrors]
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponse
+ = PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponses]
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunData = {
+ body: LoopNodeRunPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/advanced-chat/workflows/draft/loop/nodes/{node_id}/run'
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunError
+ = PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunErrors[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunErrors]
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponse
+ = PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponses]
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftRunData = {
+ body: AdvancedChatWorkflowRunPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/advanced-chat/workflows/draft/run'
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftRunErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftRunError
+ = PostAppsByAppIdAdvancedChatWorkflowsDraftRunErrors[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftRunErrors]
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAdvancedChatWorkflowsDraftRunResponse
+ = PostAppsByAppIdAdvancedChatWorkflowsDraftRunResponses[keyof PostAppsByAppIdAdvancedChatWorkflowsDraftRunResponses]
+
+export type GetAppsByAppIdAgentLogsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query: {
+ conversation_id: string
+ message_id: string
+ }
+ url: '/apps/{app_id}/agent/logs'
+}
+
+export type GetAppsByAppIdAgentLogsErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAgentLogsError
+ = GetAppsByAppIdAgentLogsErrors[keyof GetAppsByAppIdAgentLogsErrors]
+
+export type GetAppsByAppIdAgentLogsResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdAgentLogsResponse
+ = GetAppsByAppIdAgentLogsResponses[keyof GetAppsByAppIdAgentLogsResponses]
+
+export type PostAppsByAppIdAnnotationReplyByActionData = {
+ body: AnnotationReplyPayload
+ path: {
+ app_id: string
+ action: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotation-reply/{action}'
+}
+
+export type PostAppsByAppIdAnnotationReplyByActionErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAnnotationReplyByActionError
+ = PostAppsByAppIdAnnotationReplyByActionErrors[keyof PostAppsByAppIdAnnotationReplyByActionErrors]
+
+export type PostAppsByAppIdAnnotationReplyByActionResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAnnotationReplyByActionResponse
+ = PostAppsByAppIdAnnotationReplyByActionResponses[keyof PostAppsByAppIdAnnotationReplyByActionResponses]
+
+export type GetAppsByAppIdAnnotationReplyByActionStatusByJobIdData = {
+ body?: never
+ path: {
+ app_id: string
+ action: string
+ job_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotation-reply/{action}/status/{job_id}'
+}
+
+export type GetAppsByAppIdAnnotationReplyByActionStatusByJobIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationReplyByActionStatusByJobIdError
+ = GetAppsByAppIdAnnotationReplyByActionStatusByJobIdErrors[keyof GetAppsByAppIdAnnotationReplyByActionStatusByJobIdErrors]
+
+export type GetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponse
+ = GetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponses[keyof GetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponses]
+
+export type GetAppsByAppIdAnnotationSettingData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotation-setting'
+}
+
+export type GetAppsByAppIdAnnotationSettingErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationSettingError
+ = GetAppsByAppIdAnnotationSettingErrors[keyof GetAppsByAppIdAnnotationSettingErrors]
+
+export type GetAppsByAppIdAnnotationSettingResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationSettingResponse
+ = GetAppsByAppIdAnnotationSettingResponses[keyof GetAppsByAppIdAnnotationSettingResponses]
+
+export type PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdData = {
+ body: AnnotationSettingUpdatePayload
+ path: {
+ app_id: string
+ annotation_setting_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotation-settings/{annotation_setting_id}'
+}
+
+export type PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdError
+ = PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdErrors[keyof PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdErrors]
+
+export type PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponse
+ = PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponses[keyof PostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponses]
+
+export type DeleteAppsByAppIdAnnotationsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotations'
+}
+
+export type DeleteAppsByAppIdAnnotationsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdAnnotationsResponse
+ = DeleteAppsByAppIdAnnotationsResponses[keyof DeleteAppsByAppIdAnnotationsResponses]
+
+export type GetAppsByAppIdAnnotationsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ keyword?: string
+ limit?: number
+ page?: number
+ }
+ url: '/apps/{app_id}/annotations'
+}
+
+export type GetAppsByAppIdAnnotationsErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationsError
+ = GetAppsByAppIdAnnotationsErrors[keyof GetAppsByAppIdAnnotationsErrors]
+
+export type GetAppsByAppIdAnnotationsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationsResponse
+ = GetAppsByAppIdAnnotationsResponses[keyof GetAppsByAppIdAnnotationsResponses]
+
+export type PostAppsByAppIdAnnotationsData = {
+ body: CreateAnnotationPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotations'
+}
+
+export type PostAppsByAppIdAnnotationsErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAnnotationsError
+ = PostAppsByAppIdAnnotationsErrors[keyof PostAppsByAppIdAnnotationsErrors]
+
+export type PostAppsByAppIdAnnotationsResponses = {
+ 201: Annotation
+}
+
+export type PostAppsByAppIdAnnotationsResponse
+ = PostAppsByAppIdAnnotationsResponses[keyof PostAppsByAppIdAnnotationsResponses]
+
+export type PostAppsByAppIdAnnotationsBatchImportData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotations/batch-import'
+}
+
+export type PostAppsByAppIdAnnotationsBatchImportErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 413: {
+ [key: string]: unknown
+ }
+ 429: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAnnotationsBatchImportError
+ = PostAppsByAppIdAnnotationsBatchImportErrors[keyof PostAppsByAppIdAnnotationsBatchImportErrors]
+
+export type PostAppsByAppIdAnnotationsBatchImportResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAnnotationsBatchImportResponse
+ = PostAppsByAppIdAnnotationsBatchImportResponses[keyof PostAppsByAppIdAnnotationsBatchImportResponses]
+
+export type GetAppsByAppIdAnnotationsBatchImportStatusByJobIdData = {
+ body?: never
+ path: {
+ app_id: string
+ job_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotations/batch-import-status/{job_id}'
+}
+
+export type GetAppsByAppIdAnnotationsBatchImportStatusByJobIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationsBatchImportStatusByJobIdError
+ = GetAppsByAppIdAnnotationsBatchImportStatusByJobIdErrors[keyof GetAppsByAppIdAnnotationsBatchImportStatusByJobIdErrors]
+
+export type GetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponse
+ = GetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponses[keyof GetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponses]
+
+export type GetAppsByAppIdAnnotationsCountData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotations/count'
+}
+
+export type GetAppsByAppIdAnnotationsCountResponses = {
+ 200: AnnotationCountResponse
+}
+
+export type GetAppsByAppIdAnnotationsCountResponse
+ = GetAppsByAppIdAnnotationsCountResponses[keyof GetAppsByAppIdAnnotationsCountResponses]
+
+export type GetAppsByAppIdAnnotationsExportData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotations/export'
+}
+
+export type GetAppsByAppIdAnnotationsExportErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationsExportError
+ = GetAppsByAppIdAnnotationsExportErrors[keyof GetAppsByAppIdAnnotationsExportErrors]
+
+export type GetAppsByAppIdAnnotationsExportResponses = {
+ 200: AnnotationExportList
+}
+
+export type GetAppsByAppIdAnnotationsExportResponse
+ = GetAppsByAppIdAnnotationsExportResponses[keyof GetAppsByAppIdAnnotationsExportResponses]
+
+export type DeleteAppsByAppIdAnnotationsByAnnotationIdData = {
+ body?: never
+ path: {
+ annotation_id: string
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotations/{annotation_id}'
+}
+
+export type DeleteAppsByAppIdAnnotationsByAnnotationIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdAnnotationsByAnnotationIdResponse
+ = DeleteAppsByAppIdAnnotationsByAnnotationIdResponses[keyof DeleteAppsByAppIdAnnotationsByAnnotationIdResponses]
+
+export type PostAppsByAppIdAnnotationsByAnnotationIdData = {
+ body: UpdateAnnotationPayload
+ path: {
+ app_id: string
+ annotation_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/annotations/{annotation_id}'
+}
+
+export type PostAppsByAppIdAnnotationsByAnnotationIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAnnotationsByAnnotationIdError
+ = PostAppsByAppIdAnnotationsByAnnotationIdErrors[keyof PostAppsByAppIdAnnotationsByAnnotationIdErrors]
+
+export type PostAppsByAppIdAnnotationsByAnnotationIdResponses = {
+ 200: Annotation
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAnnotationsByAnnotationIdResponse
+ = PostAppsByAppIdAnnotationsByAnnotationIdResponses[keyof PostAppsByAppIdAnnotationsByAnnotationIdResponses]
+
+export type GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesData = {
+ body?: never
+ path: {
+ app_id: string
+ annotation_id: string
+ }
+ query?: {
+ page?: number
+ limit?: number
+ }
+ url: '/apps/{app_id}/annotations/{annotation_id}/hit-histories'
+}
+
+export type GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesError
+ = GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesErrors[keyof GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesErrors]
+
+export type GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponses = {
+ 200: AnnotationHitHistoryList
+}
+
+export type GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponse
+ = GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponses[keyof GetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponses]
+
+export type PostAppsByAppIdApiEnableData = {
+ body: AppApiStatusPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/api-enable'
+}
+
+export type PostAppsByAppIdApiEnableErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdApiEnableError
+ = PostAppsByAppIdApiEnableErrors[keyof PostAppsByAppIdApiEnableErrors]
+
+export type PostAppsByAppIdApiEnableResponses = {
+ 200: AppDetail
+}
+
+export type PostAppsByAppIdApiEnableResponse
+ = PostAppsByAppIdApiEnableResponses[keyof PostAppsByAppIdApiEnableResponses]
+
+export type PostAppsByAppIdAudioToTextData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/audio-to-text'
+}
+
+export type PostAppsByAppIdAudioToTextErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 413: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdAudioToTextError
+ = PostAppsByAppIdAudioToTextErrors[keyof PostAppsByAppIdAudioToTextErrors]
+
+export type PostAppsByAppIdAudioToTextResponses = {
+ 200: AudioTranscriptResponse
+}
+
+export type PostAppsByAppIdAudioToTextResponse
+ = PostAppsByAppIdAudioToTextResponses[keyof PostAppsByAppIdAudioToTextResponses]
+
+export type GetAppsByAppIdChatConversationsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ annotation_status?: 'annotated' | 'not_annotated' | 'all'
+ end?: string | null
+ keyword?: string | null
+ limit?: number
+ page?: number
+ sort_by?: 'created_at' | '-created_at' | 'updated_at' | '-updated_at'
+ start?: string | null
+ }
+ url: '/apps/{app_id}/chat-conversations'
+}
+
+export type GetAppsByAppIdChatConversationsErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdChatConversationsError
+ = GetAppsByAppIdChatConversationsErrors[keyof GetAppsByAppIdChatConversationsErrors]
+
+export type GetAppsByAppIdChatConversationsResponses = {
+ 200: ConversationWithSummaryPagination
+}
+
+export type GetAppsByAppIdChatConversationsResponse
+ = GetAppsByAppIdChatConversationsResponses[keyof GetAppsByAppIdChatConversationsResponses]
+
+export type DeleteAppsByAppIdChatConversationsByConversationIdData = {
+ body?: never
+ path: {
+ app_id: string
+ conversation_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/chat-conversations/{conversation_id}'
+}
+
+export type DeleteAppsByAppIdChatConversationsByConversationIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdChatConversationsByConversationIdError
+ = DeleteAppsByAppIdChatConversationsByConversationIdErrors[keyof DeleteAppsByAppIdChatConversationsByConversationIdErrors]
+
+export type DeleteAppsByAppIdChatConversationsByConversationIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdChatConversationsByConversationIdResponse
+ = DeleteAppsByAppIdChatConversationsByConversationIdResponses[keyof DeleteAppsByAppIdChatConversationsByConversationIdResponses]
+
+export type GetAppsByAppIdChatConversationsByConversationIdData = {
+ body?: never
+ path: {
+ app_id: string
+ conversation_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/chat-conversations/{conversation_id}'
+}
+
+export type GetAppsByAppIdChatConversationsByConversationIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdChatConversationsByConversationIdError
+ = GetAppsByAppIdChatConversationsByConversationIdErrors[keyof GetAppsByAppIdChatConversationsByConversationIdErrors]
+
+export type GetAppsByAppIdChatConversationsByConversationIdResponses = {
+ 200: ConversationDetail
+}
+
+export type GetAppsByAppIdChatConversationsByConversationIdResponse
+ = GetAppsByAppIdChatConversationsByConversationIdResponses[keyof GetAppsByAppIdChatConversationsByConversationIdResponses]
+
+export type GetAppsByAppIdChatMessagesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query: {
+ conversation_id: string
+ first_id?: string | null
+ limit?: number
+ }
+ url: '/apps/{app_id}/chat-messages'
+}
+
+export type GetAppsByAppIdChatMessagesErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdChatMessagesError
+ = GetAppsByAppIdChatMessagesErrors[keyof GetAppsByAppIdChatMessagesErrors]
+
+export type GetAppsByAppIdChatMessagesResponses = {
+ 200: MessageInfiniteScrollPaginationResponse
+}
+
+export type GetAppsByAppIdChatMessagesResponse
+ = GetAppsByAppIdChatMessagesResponses[keyof GetAppsByAppIdChatMessagesResponses]
+
+export type GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsData = {
+ body?: never
+ path: {
+ app_id: string
+ message_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/chat-messages/{message_id}/suggested-questions'
+}
+
+export type GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsError
+ = GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsErrors[keyof GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsErrors]
+
+export type GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponses = {
+ 200: SuggestedQuestionsResponse
+}
+
+export type GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponse
+ = GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponses[keyof GetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponses]
+
+export type PostAppsByAppIdChatMessagesByTaskIdStopData = {
+ body?: never
+ path: {
+ app_id: string
+ task_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/chat-messages/{task_id}/stop'
+}
+
+export type PostAppsByAppIdChatMessagesByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdChatMessagesByTaskIdStopResponse
+ = PostAppsByAppIdChatMessagesByTaskIdStopResponses[keyof PostAppsByAppIdChatMessagesByTaskIdStopResponses]
+
+export type GetAppsByAppIdCompletionConversationsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ annotation_status?: 'annotated' | 'not_annotated' | 'all'
+ end?: string | null
+ keyword?: string | null
+ limit?: number
+ page?: number
+ start?: string | null
+ }
+ url: '/apps/{app_id}/completion-conversations'
+}
+
+export type GetAppsByAppIdCompletionConversationsErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdCompletionConversationsError
+ = GetAppsByAppIdCompletionConversationsErrors[keyof GetAppsByAppIdCompletionConversationsErrors]
+
+export type GetAppsByAppIdCompletionConversationsResponses = {
+ 200: ConversationPagination
+}
+
+export type GetAppsByAppIdCompletionConversationsResponse
+ = GetAppsByAppIdCompletionConversationsResponses[keyof GetAppsByAppIdCompletionConversationsResponses]
+
+export type DeleteAppsByAppIdCompletionConversationsByConversationIdData = {
+ body?: never
+ path: {
+ app_id: string
+ conversation_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/completion-conversations/{conversation_id}'
+}
+
+export type DeleteAppsByAppIdCompletionConversationsByConversationIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdCompletionConversationsByConversationIdError
+ = DeleteAppsByAppIdCompletionConversationsByConversationIdErrors[keyof DeleteAppsByAppIdCompletionConversationsByConversationIdErrors]
+
+export type DeleteAppsByAppIdCompletionConversationsByConversationIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdCompletionConversationsByConversationIdResponse
+ = DeleteAppsByAppIdCompletionConversationsByConversationIdResponses[keyof DeleteAppsByAppIdCompletionConversationsByConversationIdResponses]
+
+export type GetAppsByAppIdCompletionConversationsByConversationIdData = {
+ body?: never
+ path: {
+ app_id: string
+ conversation_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/completion-conversations/{conversation_id}'
+}
+
+export type GetAppsByAppIdCompletionConversationsByConversationIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdCompletionConversationsByConversationIdError
+ = GetAppsByAppIdCompletionConversationsByConversationIdErrors[keyof GetAppsByAppIdCompletionConversationsByConversationIdErrors]
+
+export type GetAppsByAppIdCompletionConversationsByConversationIdResponses = {
+ 200: ConversationMessageDetail
+}
+
+export type GetAppsByAppIdCompletionConversationsByConversationIdResponse
+ = GetAppsByAppIdCompletionConversationsByConversationIdResponses[keyof GetAppsByAppIdCompletionConversationsByConversationIdResponses]
+
+export type PostAppsByAppIdCompletionMessagesData = {
+ body: CompletionMessagePayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/completion-messages'
+}
+
+export type PostAppsByAppIdCompletionMessagesErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdCompletionMessagesError
+ = PostAppsByAppIdCompletionMessagesErrors[keyof PostAppsByAppIdCompletionMessagesErrors]
+
+export type PostAppsByAppIdCompletionMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdCompletionMessagesResponse
+ = PostAppsByAppIdCompletionMessagesResponses[keyof PostAppsByAppIdCompletionMessagesResponses]
+
+export type PostAppsByAppIdCompletionMessagesByTaskIdStopData = {
+ body?: never
+ path: {
+ app_id: string
+ task_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/completion-messages/{task_id}/stop'
+}
+
+export type PostAppsByAppIdCompletionMessagesByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdCompletionMessagesByTaskIdStopResponse
+ = PostAppsByAppIdCompletionMessagesByTaskIdStopResponses[keyof PostAppsByAppIdCompletionMessagesByTaskIdStopResponses]
+
+export type GetAppsByAppIdConversationVariablesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query: {
+ conversation_id: string
+ }
+ url: '/apps/{app_id}/conversation-variables'
+}
+
+export type GetAppsByAppIdConversationVariablesResponses = {
+ 200: PaginatedConversationVariableResponse
+}
+
+export type GetAppsByAppIdConversationVariablesResponse
+ = GetAppsByAppIdConversationVariablesResponses[keyof GetAppsByAppIdConversationVariablesResponses]
+
+export type PostAppsByAppIdConvertToWorkflowData = {
+ body: ConvertToWorkflowPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/convert-to-workflow'
+}
+
+export type PostAppsByAppIdConvertToWorkflowErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdConvertToWorkflowError
+ = PostAppsByAppIdConvertToWorkflowErrors[keyof PostAppsByAppIdConvertToWorkflowErrors]
+
+export type PostAppsByAppIdConvertToWorkflowResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdConvertToWorkflowResponse
+ = PostAppsByAppIdConvertToWorkflowResponses[keyof PostAppsByAppIdConvertToWorkflowResponses]
+
+export type PostAppsByAppIdCopyData = {
+ body: CopyAppPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/copy'
+}
+
+export type PostAppsByAppIdCopyErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdCopyError = PostAppsByAppIdCopyErrors[keyof PostAppsByAppIdCopyErrors]
+
+export type PostAppsByAppIdCopyResponses = {
+ 201: AppDetailWithSite
+}
+
+export type PostAppsByAppIdCopyResponse
+ = PostAppsByAppIdCopyResponses[keyof PostAppsByAppIdCopyResponses]
+
+export type GetAppsByAppIdExportData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ include_secret?: boolean
+ workflow_id?: string | null
+ }
+ url: '/apps/{app_id}/export'
+}
+
+export type GetAppsByAppIdExportErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdExportError = GetAppsByAppIdExportErrors[keyof GetAppsByAppIdExportErrors]
+
+export type GetAppsByAppIdExportResponses = {
+ 200: AppExportResponse
+}
+
+export type GetAppsByAppIdExportResponse
+ = GetAppsByAppIdExportResponses[keyof GetAppsByAppIdExportResponses]
+
+export type PostAppsByAppIdFeedbacksData = {
+ body: MessageFeedbackPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/feedbacks'
+}
+
+export type PostAppsByAppIdFeedbacksErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdFeedbacksError
+ = PostAppsByAppIdFeedbacksErrors[keyof PostAppsByAppIdFeedbacksErrors]
+
+export type PostAppsByAppIdFeedbacksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdFeedbacksResponse
+ = PostAppsByAppIdFeedbacksResponses[keyof PostAppsByAppIdFeedbacksResponses]
+
+export type GetAppsByAppIdFeedbacksExportData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end_date?: string | null
+ format?: 'csv' | 'json'
+ from_source?: 'user' | 'admin' | null
+ has_comment?: boolean | null
+ rating?: 'like' | 'dislike' | null
+ start_date?: string | null
+ }
+ url: '/apps/{app_id}/feedbacks/export'
+}
+
+export type GetAppsByAppIdFeedbacksExportErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdFeedbacksExportError
+ = GetAppsByAppIdFeedbacksExportErrors[keyof GetAppsByAppIdFeedbacksExportErrors]
+
+export type GetAppsByAppIdFeedbacksExportResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdFeedbacksExportResponse
+ = GetAppsByAppIdFeedbacksExportResponses[keyof GetAppsByAppIdFeedbacksExportResponses]
+
+export type PostAppsByAppIdIconData = {
+ body: AppIconPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/icon'
+}
+
+export type PostAppsByAppIdIconErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdIconError = PostAppsByAppIdIconErrors[keyof PostAppsByAppIdIconErrors]
+
+export type PostAppsByAppIdIconResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdIconResponse
+ = PostAppsByAppIdIconResponses[keyof PostAppsByAppIdIconResponses]
+
+export type GetAppsByAppIdMessagesByMessageIdData = {
+ body?: never
+ path: {
+ app_id: string
+ message_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/messages/{message_id}'
+}
+
+export type GetAppsByAppIdMessagesByMessageIdErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdMessagesByMessageIdError
+ = GetAppsByAppIdMessagesByMessageIdErrors[keyof GetAppsByAppIdMessagesByMessageIdErrors]
+
+export type GetAppsByAppIdMessagesByMessageIdResponses = {
+ 200: MessageDetailResponse
+}
+
+export type GetAppsByAppIdMessagesByMessageIdResponse
+ = GetAppsByAppIdMessagesByMessageIdResponses[keyof GetAppsByAppIdMessagesByMessageIdResponses]
+
+export type PostAppsByAppIdModelConfigData = {
+ body: ModelConfigRequest
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/model-config'
+}
+
+export type PostAppsByAppIdModelConfigErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdModelConfigError
+ = PostAppsByAppIdModelConfigErrors[keyof PostAppsByAppIdModelConfigErrors]
+
+export type PostAppsByAppIdModelConfigResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdModelConfigResponse
+ = PostAppsByAppIdModelConfigResponses[keyof PostAppsByAppIdModelConfigResponses]
+
+export type PostAppsByAppIdNameData = {
+ body: AppNamePayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/name'
+}
+
+export type PostAppsByAppIdNameResponses = {
+ 200: AppDetail
+}
+
+export type PostAppsByAppIdNameResponse
+ = PostAppsByAppIdNameResponses[keyof PostAppsByAppIdNameResponses]
+
+export type PostAppsByAppIdPublishToCreatorsPlatformData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/publish-to-creators-platform'
+}
+
+export type PostAppsByAppIdPublishToCreatorsPlatformResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdPublishToCreatorsPlatformResponse
+ = PostAppsByAppIdPublishToCreatorsPlatformResponses[keyof PostAppsByAppIdPublishToCreatorsPlatformResponses]
+
+export type GetAppsByAppIdServerData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/server'
+}
+
+export type GetAppsByAppIdServerResponses = {
+ 200: AppMcpServerResponse
+}
+
+export type GetAppsByAppIdServerResponse
+ = GetAppsByAppIdServerResponses[keyof GetAppsByAppIdServerResponses]
+
+export type PostAppsByAppIdServerData = {
+ body: McpServerCreatePayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/server'
+}
+
+export type PostAppsByAppIdServerErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdServerError
+ = PostAppsByAppIdServerErrors[keyof PostAppsByAppIdServerErrors]
+
+export type PostAppsByAppIdServerResponses = {
+ 201: AppMcpServerResponse
+}
+
+export type PostAppsByAppIdServerResponse
+ = PostAppsByAppIdServerResponses[keyof PostAppsByAppIdServerResponses]
+
+export type PutAppsByAppIdServerData = {
+ body: McpServerUpdatePayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/server'
+}
+
+export type PutAppsByAppIdServerErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PutAppsByAppIdServerError = PutAppsByAppIdServerErrors[keyof PutAppsByAppIdServerErrors]
+
+export type PutAppsByAppIdServerResponses = {
+ 200: AppMcpServerResponse
+}
+
+export type PutAppsByAppIdServerResponse
+ = PutAppsByAppIdServerResponses[keyof PutAppsByAppIdServerResponses]
+
+export type PostAppsByAppIdSiteData = {
+ body: AppSiteUpdatePayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/site'
+}
+
+export type PostAppsByAppIdSiteErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdSiteError = PostAppsByAppIdSiteErrors[keyof PostAppsByAppIdSiteErrors]
+
+export type PostAppsByAppIdSiteResponses = {
+ 200: AppSiteResponse
+}
+
+export type PostAppsByAppIdSiteResponse
+ = PostAppsByAppIdSiteResponses[keyof PostAppsByAppIdSiteResponses]
+
+export type PostAppsByAppIdSiteEnableData = {
+ body: AppSiteStatusPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/site-enable'
+}
+
+export type PostAppsByAppIdSiteEnableErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdSiteEnableError
+ = PostAppsByAppIdSiteEnableErrors[keyof PostAppsByAppIdSiteEnableErrors]
+
+export type PostAppsByAppIdSiteEnableResponses = {
+ 200: AppDetail
+}
+
+export type PostAppsByAppIdSiteEnableResponse
+ = PostAppsByAppIdSiteEnableResponses[keyof PostAppsByAppIdSiteEnableResponses]
+
+export type PostAppsByAppIdSiteAccessTokenResetData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/site/access-token-reset'
+}
+
+export type PostAppsByAppIdSiteAccessTokenResetErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdSiteAccessTokenResetError
+ = PostAppsByAppIdSiteAccessTokenResetErrors[keyof PostAppsByAppIdSiteAccessTokenResetErrors]
+
+export type PostAppsByAppIdSiteAccessTokenResetResponses = {
+ 200: AppSiteResponse
+}
+
+export type PostAppsByAppIdSiteAccessTokenResetResponse
+ = PostAppsByAppIdSiteAccessTokenResetResponses[keyof PostAppsByAppIdSiteAccessTokenResetResponses]
+
+export type GetAppsByAppIdStatisticsAverageResponseTimeData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/statistics/average-response-time'
+}
+
+export type GetAppsByAppIdStatisticsAverageResponseTimeResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdStatisticsAverageResponseTimeResponse
+ = GetAppsByAppIdStatisticsAverageResponseTimeResponses[keyof GetAppsByAppIdStatisticsAverageResponseTimeResponses]
+
+export type GetAppsByAppIdStatisticsAverageSessionInteractionsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/statistics/average-session-interactions'
+}
+
+export type GetAppsByAppIdStatisticsAverageSessionInteractionsResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdStatisticsAverageSessionInteractionsResponse
+ = GetAppsByAppIdStatisticsAverageSessionInteractionsResponses[keyof GetAppsByAppIdStatisticsAverageSessionInteractionsResponses]
+
+export type GetAppsByAppIdStatisticsDailyConversationsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/statistics/daily-conversations'
+}
+
+export type GetAppsByAppIdStatisticsDailyConversationsResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdStatisticsDailyConversationsResponse
+ = GetAppsByAppIdStatisticsDailyConversationsResponses[keyof GetAppsByAppIdStatisticsDailyConversationsResponses]
+
+export type GetAppsByAppIdStatisticsDailyEndUsersData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/statistics/daily-end-users'
+}
+
+export type GetAppsByAppIdStatisticsDailyEndUsersResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdStatisticsDailyEndUsersResponse
+ = GetAppsByAppIdStatisticsDailyEndUsersResponses[keyof GetAppsByAppIdStatisticsDailyEndUsersResponses]
+
+export type GetAppsByAppIdStatisticsDailyMessagesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/statistics/daily-messages'
+}
+
+export type GetAppsByAppIdStatisticsDailyMessagesResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdStatisticsDailyMessagesResponse
+ = GetAppsByAppIdStatisticsDailyMessagesResponses[keyof GetAppsByAppIdStatisticsDailyMessagesResponses]
+
+export type GetAppsByAppIdStatisticsTokenCostsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/statistics/token-costs'
+}
+
+export type GetAppsByAppIdStatisticsTokenCostsResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdStatisticsTokenCostsResponse
+ = GetAppsByAppIdStatisticsTokenCostsResponses[keyof GetAppsByAppIdStatisticsTokenCostsResponses]
+
+export type GetAppsByAppIdStatisticsTokensPerSecondData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/statistics/tokens-per-second'
+}
+
+export type GetAppsByAppIdStatisticsTokensPerSecondResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdStatisticsTokensPerSecondResponse
+ = GetAppsByAppIdStatisticsTokensPerSecondResponses[keyof GetAppsByAppIdStatisticsTokensPerSecondResponses]
+
+export type GetAppsByAppIdStatisticsUserSatisfactionRateData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/statistics/user-satisfaction-rate'
+}
+
+export type GetAppsByAppIdStatisticsUserSatisfactionRateResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdStatisticsUserSatisfactionRateResponse
+ = GetAppsByAppIdStatisticsUserSatisfactionRateResponses[keyof GetAppsByAppIdStatisticsUserSatisfactionRateResponses]
+
+export type PostAppsByAppIdTextToAudioData = {
+ body: TextToSpeechPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/text-to-audio'
+}
+
+export type PostAppsByAppIdTextToAudioErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdTextToAudioError
+ = PostAppsByAppIdTextToAudioErrors[keyof PostAppsByAppIdTextToAudioErrors]
+
+export type PostAppsByAppIdTextToAudioResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdTextToAudioResponse
+ = PostAppsByAppIdTextToAudioResponses[keyof PostAppsByAppIdTextToAudioResponses]
+
+export type GetAppsByAppIdTextToAudioVoicesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query: {
+ language: string
+ }
+ url: '/apps/{app_id}/text-to-audio/voices'
+}
+
+export type GetAppsByAppIdTextToAudioVoicesErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdTextToAudioVoicesError
+ = GetAppsByAppIdTextToAudioVoicesErrors[keyof GetAppsByAppIdTextToAudioVoicesErrors]
+
+export type GetAppsByAppIdTextToAudioVoicesResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetAppsByAppIdTextToAudioVoicesResponse
+ = GetAppsByAppIdTextToAudioVoicesResponses[keyof GetAppsByAppIdTextToAudioVoicesResponses]
+
+export type GetAppsByAppIdTraceData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/trace'
+}
+
+export type GetAppsByAppIdTraceResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdTraceResponse
+ = GetAppsByAppIdTraceResponses[keyof GetAppsByAppIdTraceResponses]
+
+export type PostAppsByAppIdTraceData = {
+ body: AppTracePayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/trace'
+}
+
+export type PostAppsByAppIdTraceErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdTraceError = PostAppsByAppIdTraceErrors[keyof PostAppsByAppIdTraceErrors]
+
+export type PostAppsByAppIdTraceResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdTraceResponse
+ = PostAppsByAppIdTraceResponses[keyof PostAppsByAppIdTraceResponses]
+
+export type DeleteAppsByAppIdTraceConfigData = {
+ body: TraceProviderQuery
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/trace-config'
+}
+
+export type DeleteAppsByAppIdTraceConfigErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdTraceConfigError
+ = DeleteAppsByAppIdTraceConfigErrors[keyof DeleteAppsByAppIdTraceConfigErrors]
+
+export type DeleteAppsByAppIdTraceConfigResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdTraceConfigResponse
+ = DeleteAppsByAppIdTraceConfigResponses[keyof DeleteAppsByAppIdTraceConfigResponses]
+
+export type GetAppsByAppIdTraceConfigData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query: {
+ tracing_provider: string
+ }
+ url: '/apps/{app_id}/trace-config'
+}
+
+export type GetAppsByAppIdTraceConfigErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdTraceConfigError
+ = GetAppsByAppIdTraceConfigErrors[keyof GetAppsByAppIdTraceConfigErrors]
+
+export type GetAppsByAppIdTraceConfigResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdTraceConfigResponse
+ = GetAppsByAppIdTraceConfigResponses[keyof GetAppsByAppIdTraceConfigResponses]
+
+export type PatchAppsByAppIdTraceConfigData = {
+ body: TraceConfigPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/trace-config'
+}
+
+export type PatchAppsByAppIdTraceConfigErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchAppsByAppIdTraceConfigError
+ = PatchAppsByAppIdTraceConfigErrors[keyof PatchAppsByAppIdTraceConfigErrors]
+
+export type PatchAppsByAppIdTraceConfigResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchAppsByAppIdTraceConfigResponse
+ = PatchAppsByAppIdTraceConfigResponses[keyof PatchAppsByAppIdTraceConfigResponses]
+
+export type PostAppsByAppIdTraceConfigData = {
+ body: TraceConfigPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/trace-config'
+}
+
+export type PostAppsByAppIdTraceConfigErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdTraceConfigError
+ = PostAppsByAppIdTraceConfigErrors[keyof PostAppsByAppIdTraceConfigErrors]
+
+export type PostAppsByAppIdTraceConfigResponses = {
+ 201: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdTraceConfigResponse
+ = PostAppsByAppIdTraceConfigResponses[keyof PostAppsByAppIdTraceConfigResponses]
+
+export type PostAppsByAppIdTriggerEnableData = {
+ body: ParserEnable
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/trigger-enable'
+}
+
+export type PostAppsByAppIdTriggerEnableResponses = {
+ 200: WorkflowTriggerResponse
+}
+
+export type PostAppsByAppIdTriggerEnableResponse
+ = PostAppsByAppIdTriggerEnableResponses[keyof PostAppsByAppIdTriggerEnableResponses]
+
+export type GetAppsByAppIdTriggersData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/triggers'
+}
+
+export type GetAppsByAppIdTriggersResponses = {
+ 200: WorkflowTriggerListResponse
+}
+
+export type GetAppsByAppIdTriggersResponse
+ = GetAppsByAppIdTriggersResponses[keyof GetAppsByAppIdTriggersResponses]
+
+export type GetAppsByAppIdWorkflowAppLogsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ created_at__after?: string | null
+ created_at__before?: string | null
+ created_by_account?: string | null
+ created_by_end_user_session_id?: string | null
+ detail?: boolean
+ keyword?: string | null
+ limit?: number
+ page?: number
+ status?: string | null
+ }
+ url: '/apps/{app_id}/workflow-app-logs'
+}
+
+export type GetAppsByAppIdWorkflowAppLogsResponses = {
+ 200: WorkflowAppLogPaginationResponse
+}
+
+export type GetAppsByAppIdWorkflowAppLogsResponse
+ = GetAppsByAppIdWorkflowAppLogsResponses[keyof GetAppsByAppIdWorkflowAppLogsResponses]
+
+export type GetAppsByAppIdWorkflowArchivedLogsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ created_at__after?: string | null
+ created_at__before?: string | null
+ created_by_account?: string | null
+ created_by_end_user_session_id?: string | null
+ detail?: boolean
+ keyword?: string | null
+ limit?: number
+ page?: number
+ status?: string | null
+ }
+ url: '/apps/{app_id}/workflow-archived-logs'
+}
+
+export type GetAppsByAppIdWorkflowArchivedLogsResponses = {
+ 200: WorkflowArchivedLogPaginationResponse
+}
+
+export type GetAppsByAppIdWorkflowArchivedLogsResponse
+ = GetAppsByAppIdWorkflowArchivedLogsResponses[keyof GetAppsByAppIdWorkflowArchivedLogsResponses]
+
+export type GetAppsByAppIdWorkflowRunsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ triggered_from?: 'debugging' | 'app-run' | null
+ status?: 'running' | 'succeeded' | 'failed' | 'stopped' | 'partial-succeeded' | null
+ last_id?: string | null
+ limit?: number
+ }
+ url: '/apps/{app_id}/workflow-runs'
+}
+
+export type GetAppsByAppIdWorkflowRunsResponses = {
+ 200: WorkflowRunPagination
+}
+
+export type GetAppsByAppIdWorkflowRunsResponse
+ = GetAppsByAppIdWorkflowRunsResponses[keyof GetAppsByAppIdWorkflowRunsResponses]
+
+export type GetAppsByAppIdWorkflowRunsCountData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ triggered_from?: 'debugging' | 'app-run' | null
+ time_range?: string | null
+ status?: 'running' | 'succeeded' | 'failed' | 'stopped' | 'partial-succeeded' | null
+ }
+ url: '/apps/{app_id}/workflow-runs/count'
+}
+
+export type GetAppsByAppIdWorkflowRunsCountResponses = {
+ 200: WorkflowRunCount
+}
+
+export type GetAppsByAppIdWorkflowRunsCountResponse
+ = GetAppsByAppIdWorkflowRunsCountResponses[keyof GetAppsByAppIdWorkflowRunsCountResponses]
+
+export type PostAppsByAppIdWorkflowRunsTasksByTaskIdStopData = {
+ body?: never
+ path: {
+ app_id: string
+ task_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow-runs/tasks/{task_id}/stop'
+}
+
+export type PostAppsByAppIdWorkflowRunsTasksByTaskIdStopErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowRunsTasksByTaskIdStopError
+ = PostAppsByAppIdWorkflowRunsTasksByTaskIdStopErrors[keyof PostAppsByAppIdWorkflowRunsTasksByTaskIdStopErrors]
+
+export type PostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponse
+ = PostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponses[keyof PostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponses]
+
+export type GetAppsByAppIdWorkflowRunsByRunIdData = {
+ body?: never
+ path: {
+ app_id: string
+ run_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow-runs/{run_id}'
+}
+
+export type GetAppsByAppIdWorkflowRunsByRunIdErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowRunsByRunIdError
+ = GetAppsByAppIdWorkflowRunsByRunIdErrors[keyof GetAppsByAppIdWorkflowRunsByRunIdErrors]
+
+export type GetAppsByAppIdWorkflowRunsByRunIdResponses = {
+ 200: WorkflowRunDetail
+}
+
+export type GetAppsByAppIdWorkflowRunsByRunIdResponse
+ = GetAppsByAppIdWorkflowRunsByRunIdResponses[keyof GetAppsByAppIdWorkflowRunsByRunIdResponses]
+
+export type GetAppsByAppIdWorkflowRunsByRunIdExportData = {
+ body?: never
+ path: {
+ app_id: string
+ run_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow-runs/{run_id}/export'
+}
+
+export type GetAppsByAppIdWorkflowRunsByRunIdExportResponses = {
+ 200: WorkflowRunExport
+}
+
+export type GetAppsByAppIdWorkflowRunsByRunIdExportResponse
+ = GetAppsByAppIdWorkflowRunsByRunIdExportResponses[keyof GetAppsByAppIdWorkflowRunsByRunIdExportResponses]
+
+export type GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsData = {
+ body?: never
+ path: {
+ app_id: string
+ run_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow-runs/{run_id}/node-executions'
+}
+
+export type GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsError
+ = GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsErrors[keyof GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsErrors]
+
+export type GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponses = {
+ 200: WorkflowRunNodeExecutionList
+}
+
+export type GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponse
+ = GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponses[keyof GetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponses]
+
+export type GetAppsByAppIdWorkflowCommentsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments'
+}
+
+export type GetAppsByAppIdWorkflowCommentsResponses = {
+ 200: WorkflowCommentBasic
+}
+
+export type GetAppsByAppIdWorkflowCommentsResponse
+ = GetAppsByAppIdWorkflowCommentsResponses[keyof GetAppsByAppIdWorkflowCommentsResponses]
+
+export type PostAppsByAppIdWorkflowCommentsData = {
+ body: WorkflowCommentCreatePayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments'
+}
+
+export type PostAppsByAppIdWorkflowCommentsResponses = {
+ 201: WorkflowCommentCreate
+}
+
+export type PostAppsByAppIdWorkflowCommentsResponse
+ = PostAppsByAppIdWorkflowCommentsResponses[keyof PostAppsByAppIdWorkflowCommentsResponses]
+
+export type GetAppsByAppIdWorkflowCommentsMentionUsersData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments/mention-users'
+}
+
+export type GetAppsByAppIdWorkflowCommentsMentionUsersResponses = {
+ 200: WorkflowCommentMentionUsersPayload
+}
+
+export type GetAppsByAppIdWorkflowCommentsMentionUsersResponse
+ = GetAppsByAppIdWorkflowCommentsMentionUsersResponses[keyof GetAppsByAppIdWorkflowCommentsMentionUsersResponses]
+
+export type DeleteAppsByAppIdWorkflowCommentsByCommentIdData = {
+ body?: never
+ path: {
+ app_id: string
+ comment_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments/{comment_id}'
+}
+
+export type DeleteAppsByAppIdWorkflowCommentsByCommentIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdWorkflowCommentsByCommentIdResponse
+ = DeleteAppsByAppIdWorkflowCommentsByCommentIdResponses[keyof DeleteAppsByAppIdWorkflowCommentsByCommentIdResponses]
+
+export type GetAppsByAppIdWorkflowCommentsByCommentIdData = {
+ body?: never
+ path: {
+ app_id: string
+ comment_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments/{comment_id}'
+}
+
+export type GetAppsByAppIdWorkflowCommentsByCommentIdResponses = {
+ 200: WorkflowCommentDetail
+}
+
+export type GetAppsByAppIdWorkflowCommentsByCommentIdResponse
+ = GetAppsByAppIdWorkflowCommentsByCommentIdResponses[keyof GetAppsByAppIdWorkflowCommentsByCommentIdResponses]
+
+export type PutAppsByAppIdWorkflowCommentsByCommentIdData = {
+ body: WorkflowCommentUpdatePayload
+ path: {
+ app_id: string
+ comment_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments/{comment_id}'
+}
+
+export type PutAppsByAppIdWorkflowCommentsByCommentIdResponses = {
+ 200: WorkflowCommentUpdate
+}
+
+export type PutAppsByAppIdWorkflowCommentsByCommentIdResponse
+ = PutAppsByAppIdWorkflowCommentsByCommentIdResponses[keyof PutAppsByAppIdWorkflowCommentsByCommentIdResponses]
+
+export type PostAppsByAppIdWorkflowCommentsByCommentIdRepliesData = {
+ body: WorkflowCommentReplyPayload
+ path: {
+ app_id: string
+ comment_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments/{comment_id}/replies'
+}
+
+export type PostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponses = {
+ 201: WorkflowCommentReplyCreate
+}
+
+export type PostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponse
+ = PostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponses[keyof PostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponses]
+
+export type DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdData = {
+ body?: never
+ path: {
+ app_id: string
+ comment_id: string
+ reply_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}'
+}
+
+export type DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse
+ = DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses[keyof DeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses]
+
+export type PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdData = {
+ body: WorkflowCommentReplyPayload
+ path: {
+ app_id: string
+ comment_id: string
+ reply_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments/{comment_id}/replies/{reply_id}'
+}
+
+export type PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses = {
+ 200: WorkflowCommentReplyUpdate
+}
+
+export type PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse
+ = PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses[keyof PutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponses]
+
+export type PostAppsByAppIdWorkflowCommentsByCommentIdResolveData = {
+ body?: never
+ path: {
+ app_id: string
+ comment_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflow/comments/{comment_id}/resolve'
+}
+
+export type PostAppsByAppIdWorkflowCommentsByCommentIdResolveResponses = {
+ 200: WorkflowCommentResolve
+}
+
+export type PostAppsByAppIdWorkflowCommentsByCommentIdResolveResponse
+ = PostAppsByAppIdWorkflowCommentsByCommentIdResolveResponses[keyof PostAppsByAppIdWorkflowCommentsByCommentIdResolveResponses]
+
+export type GetAppsByAppIdWorkflowStatisticsAverageAppInteractionsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/workflow/statistics/average-app-interactions'
+}
+
+export type GetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponse
+ = GetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponses[keyof GetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponses]
+
+export type GetAppsByAppIdWorkflowStatisticsDailyConversationsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/workflow/statistics/daily-conversations'
+}
+
+export type GetAppsByAppIdWorkflowStatisticsDailyConversationsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowStatisticsDailyConversationsResponse
+ = GetAppsByAppIdWorkflowStatisticsDailyConversationsResponses[keyof GetAppsByAppIdWorkflowStatisticsDailyConversationsResponses]
+
+export type GetAppsByAppIdWorkflowStatisticsDailyTerminalsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/workflow/statistics/daily-terminals'
+}
+
+export type GetAppsByAppIdWorkflowStatisticsDailyTerminalsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowStatisticsDailyTerminalsResponse
+ = GetAppsByAppIdWorkflowStatisticsDailyTerminalsResponses[keyof GetAppsByAppIdWorkflowStatisticsDailyTerminalsResponses]
+
+export type GetAppsByAppIdWorkflowStatisticsTokenCostsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ end?: string | null
+ start?: string | null
+ }
+ url: '/apps/{app_id}/workflow/statistics/token-costs'
+}
+
+export type GetAppsByAppIdWorkflowStatisticsTokenCostsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowStatisticsTokenCostsResponse
+ = GetAppsByAppIdWorkflowStatisticsTokenCostsResponses[keyof GetAppsByAppIdWorkflowStatisticsTokenCostsResponses]
+
+export type GetAppsByAppIdWorkflowsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ limit?: number
+ named_only?: boolean
+ page?: number
+ user_id?: string | null
+ }
+ url: '/apps/{app_id}/workflows'
+}
+
+export type GetAppsByAppIdWorkflowsResponses = {
+ 200: WorkflowPagination
+}
+
+export type GetAppsByAppIdWorkflowsResponse
+ = GetAppsByAppIdWorkflowsResponses[keyof GetAppsByAppIdWorkflowsResponses]
+
+export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/default-workflow-block-configs'
+}
+
+export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponse
+ = GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponses[keyof GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponses]
+
+export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeData = {
+ body?: never
+ path: {
+ app_id: string
+ block_type: string
+ }
+ query?: {
+ q?: string | null
+ }
+ url: '/apps/{app_id}/workflows/default-workflow-block-configs/{block_type}'
+}
+
+export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeError
+ = GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeErrors[keyof GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeErrors]
+
+export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse
+ = GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponses[keyof GetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponses]
+
+export type GetAppsByAppIdWorkflowsDraftData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft'
+}
+
+export type GetAppsByAppIdWorkflowsDraftErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsDraftError
+ = GetAppsByAppIdWorkflowsDraftErrors[keyof GetAppsByAppIdWorkflowsDraftErrors]
+
+export type GetAppsByAppIdWorkflowsDraftResponses = {
+ 200: Workflow
+}
+
+export type GetAppsByAppIdWorkflowsDraftResponse
+ = GetAppsByAppIdWorkflowsDraftResponses[keyof GetAppsByAppIdWorkflowsDraftResponses]
+
+export type PostAppsByAppIdWorkflowsDraftData = {
+ body: SyncDraftWorkflowPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft'
+}
+
+export type PostAppsByAppIdWorkflowsDraftErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftError
+ = PostAppsByAppIdWorkflowsDraftErrors[keyof PostAppsByAppIdWorkflowsDraftErrors]
+
+export type PostAppsByAppIdWorkflowsDraftResponses = {
+ 200: SyncDraftWorkflowResponse
+}
+
+export type PostAppsByAppIdWorkflowsDraftResponse
+ = PostAppsByAppIdWorkflowsDraftResponses[keyof PostAppsByAppIdWorkflowsDraftResponses]
+
+export type GetAppsByAppIdWorkflowsDraftConversationVariablesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/conversation-variables'
+}
+
+export type GetAppsByAppIdWorkflowsDraftConversationVariablesErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsDraftConversationVariablesError
+ = GetAppsByAppIdWorkflowsDraftConversationVariablesErrors[keyof GetAppsByAppIdWorkflowsDraftConversationVariablesErrors]
+
+export type GetAppsByAppIdWorkflowsDraftConversationVariablesResponses = {
+ 200: WorkflowDraftVariableList
+}
+
+export type GetAppsByAppIdWorkflowsDraftConversationVariablesResponse
+ = GetAppsByAppIdWorkflowsDraftConversationVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftConversationVariablesResponses]
+
+export type PostAppsByAppIdWorkflowsDraftConversationVariablesData = {
+ body: ConversationVariableUpdatePayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/conversation-variables'
+}
+
+export type PostAppsByAppIdWorkflowsDraftConversationVariablesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftConversationVariablesResponse
+ = PostAppsByAppIdWorkflowsDraftConversationVariablesResponses[keyof PostAppsByAppIdWorkflowsDraftConversationVariablesResponses]
+
+export type GetAppsByAppIdWorkflowsDraftEnvironmentVariablesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/environment-variables'
+}
+
+export type GetAppsByAppIdWorkflowsDraftEnvironmentVariablesErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsDraftEnvironmentVariablesError
+ = GetAppsByAppIdWorkflowsDraftEnvironmentVariablesErrors[keyof GetAppsByAppIdWorkflowsDraftEnvironmentVariablesErrors]
+
+export type GetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse
+ = GetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses]
+
+export type PostAppsByAppIdWorkflowsDraftEnvironmentVariablesData = {
+ body: EnvironmentVariableUpdatePayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/environment-variables'
+}
+
+export type PostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse
+ = PostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses[keyof PostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponses]
+
+export type PostAppsByAppIdWorkflowsDraftFeaturesData = {
+ body: WorkflowFeaturesPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/features'
+}
+
+export type PostAppsByAppIdWorkflowsDraftFeaturesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftFeaturesResponse
+ = PostAppsByAppIdWorkflowsDraftFeaturesResponses[keyof PostAppsByAppIdWorkflowsDraftFeaturesResponses]
+
+export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestData = {
+ body: HumanInputDeliveryTestPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/delivery-test'
+}
+
+export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponse
+ = PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponses[keyof PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponses]
+
+export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewData = {
+ body: HumanInputFormPreviewPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/preview'
+}
+
+export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse
+ = PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses[keyof PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponses]
+
+export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunData = {
+ body: HumanInputFormSubmitPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/human-input/nodes/{node_id}/form/run'
+}
+
+export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse
+ = PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses[keyof PostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponses]
+
+export type PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunData = {
+ body: IterationNodeRunPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/iteration/nodes/{node_id}/run'
+}
+
+export type PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunError
+ = PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunErrors[keyof PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunErrors]
+
+export type PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponse
+ = PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponses[keyof PostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponses]
+
+export type PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunData = {
+ body: LoopNodeRunPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/loop/nodes/{node_id}/run'
+}
+
+export type PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunError
+ = PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunErrors[keyof PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunErrors]
+
+export type PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponse
+ = PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponses[keyof PostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponses]
+
+export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunData = {
+ body?: never
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/last-run'
+}
+
+export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunError
+ = GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunErrors[keyof GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunErrors]
+
+export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponses = {
+ 200: WorkflowRunNodeExecution
+}
+
+export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponse
+ = GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponses[keyof GetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponses]
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunData = {
+ body: DraftWorkflowNodeRunPayload
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/run'
+}
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunError
+ = PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunErrors[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunErrors]
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponses = {
+ 200: WorkflowRunNodeExecution
+}
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponse
+ = PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponses[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponses]
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunData = {
+ body?: never
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/trigger/run'
+}
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunError
+ = PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunErrors[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunErrors]
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponse
+ = PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponses[keyof PostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponses]
+
+export type DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesData = {
+ body?: never
+ path: {
+ node_id: string
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/variables'
+}
+
+export type DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse
+ = DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses[keyof DeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses]
+
+export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesData = {
+ body?: never
+ path: {
+ app_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/nodes/{node_id}/variables'
+}
+
+export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses = {
+ 200: WorkflowDraftVariableList
+}
+
+export type GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse
+ = GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponses]
+
+export type PostAppsByAppIdWorkflowsDraftRunData = {
+ body: DraftWorkflowRunPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/run'
+}
+
+export type PostAppsByAppIdWorkflowsDraftRunErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftRunError
+ = PostAppsByAppIdWorkflowsDraftRunErrors[keyof PostAppsByAppIdWorkflowsDraftRunErrors]
+
+export type PostAppsByAppIdWorkflowsDraftRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftRunResponse
+ = PostAppsByAppIdWorkflowsDraftRunResponses[keyof PostAppsByAppIdWorkflowsDraftRunResponses]
+
+export type GetAppsByAppIdWorkflowsDraftSystemVariablesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/system-variables'
+}
+
+export type GetAppsByAppIdWorkflowsDraftSystemVariablesResponses = {
+ 200: WorkflowDraftVariableList
+}
+
+export type GetAppsByAppIdWorkflowsDraftSystemVariablesResponse
+ = GetAppsByAppIdWorkflowsDraftSystemVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftSystemVariablesResponses]
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunData = {
+ body: DraftWorkflowTriggerRunRequest
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/trigger/run'
+}
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunError
+ = PostAppsByAppIdWorkflowsDraftTriggerRunErrors[keyof PostAppsByAppIdWorkflowsDraftTriggerRunErrors]
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunResponse
+ = PostAppsByAppIdWorkflowsDraftTriggerRunResponses[keyof PostAppsByAppIdWorkflowsDraftTriggerRunResponses]
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunAllData = {
+ body: DraftWorkflowTriggerRunAllPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/trigger/run-all'
+}
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunAllErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunAllError
+ = PostAppsByAppIdWorkflowsDraftTriggerRunAllErrors[keyof PostAppsByAppIdWorkflowsDraftTriggerRunAllErrors]
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunAllResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsDraftTriggerRunAllResponse
+ = PostAppsByAppIdWorkflowsDraftTriggerRunAllResponses[keyof PostAppsByAppIdWorkflowsDraftTriggerRunAllResponses]
+
+export type DeleteAppsByAppIdWorkflowsDraftVariablesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/variables'
+}
+
+export type DeleteAppsByAppIdWorkflowsDraftVariablesResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdWorkflowsDraftVariablesResponse
+ = DeleteAppsByAppIdWorkflowsDraftVariablesResponses[keyof DeleteAppsByAppIdWorkflowsDraftVariablesResponses]
+
+export type GetAppsByAppIdWorkflowsDraftVariablesData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: {
+ page?: number
+ limit?: number
+ }
+ url: '/apps/{app_id}/workflows/draft/variables'
+}
+
+export type GetAppsByAppIdWorkflowsDraftVariablesResponses = {
+ 200: WorkflowDraftVariableListWithoutValue
+}
+
+export type GetAppsByAppIdWorkflowsDraftVariablesResponse
+ = GetAppsByAppIdWorkflowsDraftVariablesResponses[keyof GetAppsByAppIdWorkflowsDraftVariablesResponses]
+
+export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdData = {
+ body?: never
+ path: {
+ app_id: string
+ variable_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/variables/{variable_id}'
+}
+
+export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdError
+ = DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors[keyof DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors]
+
+export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse
+ = DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses[keyof DeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses]
+
+export type GetAppsByAppIdWorkflowsDraftVariablesByVariableIdData = {
+ body?: never
+ path: {
+ app_id: string
+ variable_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/variables/{variable_id}'
+}
+
+export type GetAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsDraftVariablesByVariableIdError
+ = GetAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors[keyof GetAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors]
+
+export type GetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses = {
+ 200: WorkflowDraftVariable
+}
+
+export type GetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse
+ = GetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses[keyof GetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses]
+
+export type PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdData = {
+ body: WorkflowDraftVariableUpdatePayload
+ path: {
+ app_id: string
+ variable_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/variables/{variable_id}'
+}
+
+export type PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdError
+ = PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors[keyof PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdErrors]
+
+export type PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses = {
+ 200: WorkflowDraftVariable
+}
+
+export type PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse
+ = PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses[keyof PatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponses]
+
+export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetData = {
+ body?: never
+ path: {
+ app_id: string
+ variable_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/draft/variables/{variable_id}/reset'
+}
+
+export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetError
+ = PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetErrors[keyof PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetErrors]
+
+export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponses = {
+ 200: WorkflowDraftVariable
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse
+ = PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponses[keyof PutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponses]
+
+export type GetAppsByAppIdWorkflowsPublishData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/publish'
+}
+
+export type GetAppsByAppIdWorkflowsPublishErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByAppIdWorkflowsPublishError
+ = GetAppsByAppIdWorkflowsPublishErrors[keyof GetAppsByAppIdWorkflowsPublishErrors]
+
+export type GetAppsByAppIdWorkflowsPublishResponses = {
+ 200: Workflow
+}
+
+export type GetAppsByAppIdWorkflowsPublishResponse
+ = GetAppsByAppIdWorkflowsPublishResponses[keyof GetAppsByAppIdWorkflowsPublishResponses]
+
+export type PostAppsByAppIdWorkflowsPublishData = {
+ body: PublishWorkflowPayload
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/publish'
+}
+
+export type PostAppsByAppIdWorkflowsPublishResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsPublishResponse
+ = PostAppsByAppIdWorkflowsPublishResponses[keyof PostAppsByAppIdWorkflowsPublishResponses]
+
+export type GetAppsByAppIdWorkflowsTriggersWebhookData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query: {
+ credential_id?: string | null
+ datasource_type: string
+ inputs: string
+ }
+ url: '/apps/{app_id}/workflows/triggers/webhook'
+}
+
+export type GetAppsByAppIdWorkflowsTriggersWebhookResponses = {
+ 200: WebhookTriggerResponse
+}
+
+export type GetAppsByAppIdWorkflowsTriggersWebhookResponse
+ = GetAppsByAppIdWorkflowsTriggersWebhookResponses[keyof GetAppsByAppIdWorkflowsTriggersWebhookResponses]
+
+export type DeleteAppsByAppIdWorkflowsByWorkflowIdData = {
+ body?: never
+ path: {
+ workflow_id: string
+ app_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/{workflow_id}'
+}
+
+export type DeleteAppsByAppIdWorkflowsByWorkflowIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByAppIdWorkflowsByWorkflowIdResponse
+ = DeleteAppsByAppIdWorkflowsByWorkflowIdResponses[keyof DeleteAppsByAppIdWorkflowsByWorkflowIdResponses]
+
+export type PatchAppsByAppIdWorkflowsByWorkflowIdData = {
+ body: WorkflowUpdatePayload
+ path: {
+ app_id: string
+ workflow_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/{workflow_id}'
+}
+
+export type PatchAppsByAppIdWorkflowsByWorkflowIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchAppsByAppIdWorkflowsByWorkflowIdError
+ = PatchAppsByAppIdWorkflowsByWorkflowIdErrors[keyof PatchAppsByAppIdWorkflowsByWorkflowIdErrors]
+
+export type PatchAppsByAppIdWorkflowsByWorkflowIdResponses = {
+ 200: Workflow
+}
+
+export type PatchAppsByAppIdWorkflowsByWorkflowIdResponse
+ = PatchAppsByAppIdWorkflowsByWorkflowIdResponses[keyof PatchAppsByAppIdWorkflowsByWorkflowIdResponses]
+
+export type PostAppsByAppIdWorkflowsByWorkflowIdRestoreData = {
+ body?: never
+ path: {
+ app_id: string
+ workflow_id: string
+ }
+ query?: never
+ url: '/apps/{app_id}/workflows/{workflow_id}/restore'
+}
+
+export type PostAppsByAppIdWorkflowsByWorkflowIdRestoreErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsByWorkflowIdRestoreError
+ = PostAppsByAppIdWorkflowsByWorkflowIdRestoreErrors[keyof PostAppsByAppIdWorkflowsByWorkflowIdRestoreErrors]
+
+export type PostAppsByAppIdWorkflowsByWorkflowIdRestoreResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByAppIdWorkflowsByWorkflowIdRestoreResponse
+ = PostAppsByAppIdWorkflowsByWorkflowIdRestoreResponses[keyof PostAppsByAppIdWorkflowsByWorkflowIdRestoreResponses]
+
+export type GetAppsByResourceIdApiKeysData = {
+ body?: never
+ path: {
+ resource_id: string
+ }
+ query?: never
+ url: '/apps/{resource_id}/api-keys'
+}
+
+export type GetAppsByResourceIdApiKeysResponses = {
+ 200: ApiKeyList
+}
+
+export type GetAppsByResourceIdApiKeysResponse
+ = GetAppsByResourceIdApiKeysResponses[keyof GetAppsByResourceIdApiKeysResponses]
+
+export type PostAppsByResourceIdApiKeysData = {
+ body?: never
+ path: {
+ resource_id: string
+ }
+ query?: never
+ url: '/apps/{resource_id}/api-keys'
+}
+
+export type PostAppsByResourceIdApiKeysErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsByResourceIdApiKeysError
+ = PostAppsByResourceIdApiKeysErrors[keyof PostAppsByResourceIdApiKeysErrors]
+
+export type PostAppsByResourceIdApiKeysResponses = {
+ 201: ApiKeyItem
+}
+
+export type PostAppsByResourceIdApiKeysResponse
+ = PostAppsByResourceIdApiKeysResponses[keyof PostAppsByResourceIdApiKeysResponses]
+
+export type DeleteAppsByResourceIdApiKeysByApiKeyIdData = {
+ body?: never
+ path: {
+ resource_id: string
+ api_key_id: string
+ }
+ query?: never
+ url: '/apps/{resource_id}/api-keys/{api_key_id}'
+}
+
+export type DeleteAppsByResourceIdApiKeysByApiKeyIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsByResourceIdApiKeysByApiKeyIdResponse
+ = DeleteAppsByResourceIdApiKeysByApiKeyIdResponses[keyof DeleteAppsByResourceIdApiKeysByApiKeyIdResponses]
+
+export type GetAppsByServerIdServerRefreshData = {
+ body?: never
+ path: {
+ server_id: string
+ }
+ query?: never
+ url: '/apps/{server_id}/server/refresh'
+}
+
+export type GetAppsByServerIdServerRefreshErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsByServerIdServerRefreshError
+ = GetAppsByServerIdServerRefreshErrors[keyof GetAppsByServerIdServerRefreshErrors]
+
+export type GetAppsByServerIdServerRefreshResponses = {
+ 200: AppMcpServerResponse
+}
+
+export type GetAppsByServerIdServerRefreshResponse
+ = GetAppsByServerIdServerRefreshResponses[keyof GetAppsByServerIdServerRefreshResponses]
diff --git a/packages/contracts/generated/api/console/apps/zod.gen.ts b/packages/contracts/generated/api/console/apps/zod.gen.ts
new file mode 100644
index 00000000000..dcaeaed246a
--- /dev/null
+++ b/packages/contracts/generated/api/console/apps/zod.gen.ts
@@ -0,0 +1,3133 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * AppImportPayload
+ */
+export const zAppImportPayload = z.object({
+ app_id: z.string().nullish(),
+ 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(),
+ yaml_content: z.string().nullish(),
+ yaml_url: z.string().nullish(),
+})
+
+export const zAdvancedChatWorkflowRunPagination = z.record(z.string(), z.unknown())
+
+export const zWorkflowRunCount = z.record(z.string(), z.unknown())
+
+/**
+ * HumanInputFormPreviewPayload
+ */
+export const zHumanInputFormPreviewPayload = z.object({
+ inputs: z.record(z.string(), z.unknown()).optional(),
+})
+
+/**
+ * HumanInputFormSubmitPayload
+ */
+export const zHumanInputFormSubmitPayload = z.object({
+ action: z.string(),
+ form_inputs: z.record(z.string(), z.unknown()),
+ inputs: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * IterationNodeRunPayload
+ */
+export const zIterationNodeRunPayload = z.object({
+ inputs: z.record(z.string(), z.unknown()).nullish(),
+})
+
+/**
+ * LoopNodeRunPayload
+ */
+export const zLoopNodeRunPayload = z.object({
+ inputs: z.record(z.string(), z.unknown()).nullish(),
+})
+
+/**
+ * AdvancedChatWorkflowRunPayload
+ */
+export const zAdvancedChatWorkflowRunPayload = z.object({
+ conversation_id: z.string().nullish(),
+ files: z.array(z.record(z.string(), z.unknown())).nullish(),
+ inputs: z.record(z.string(), z.unknown()).nullish(),
+ parent_message_id: z.string().nullish(),
+ query: z.string().optional().default(''),
+})
+
+/**
+ * AnnotationReplyPayload
+ */
+export const zAnnotationReplyPayload = z.object({
+ embedding_model_name: z.string(),
+ embedding_provider_name: z.string(),
+ score_threshold: z.number(),
+})
+
+/**
+ * AnnotationSettingUpdatePayload
+ */
+export const zAnnotationSettingUpdatePayload = z.object({
+ score_threshold: z.number(),
+})
+
+/**
+ * CreateAnnotationPayload
+ */
+export const zCreateAnnotationPayload = z.object({
+ annotation_reply: z.record(z.string(), z.unknown()).nullish(),
+ answer: z.string().nullish(),
+ content: z.string().nullish(),
+ message_id: z.string().nullish(),
+ question: z.string().nullish(),
+})
+
+/**
+ * Annotation
+ */
+export const zAnnotation = z.object({
+ content: z.string().nullish(),
+ created_at: z.int().nullish(),
+ hit_count: z.int().nullish(),
+ id: z.string(),
+ question: z.string().nullish(),
+})
+
+/**
+ * AnnotationCountResponse
+ */
+export const zAnnotationCountResponse = z.object({
+ count: z.int(),
+})
+
+/**
+ * AnnotationExportList
+ */
+export const zAnnotationExportList = z.object({
+ data: z.array(zAnnotation),
+})
+
+/**
+ * UpdateAnnotationPayload
+ */
+export const zUpdateAnnotationPayload = z.object({
+ annotation_reply: z.record(z.string(), z.unknown()).nullish(),
+ answer: z.string().nullish(),
+ content: z.string().nullish(),
+ question: z.string().nullish(),
+})
+
+/**
+ * AppApiStatusPayload
+ */
+export const zAppApiStatusPayload = z.object({
+ enable_api: z.boolean(),
+})
+
+/**
+ * AudioTranscriptResponse
+ */
+export const zAudioTranscriptResponse = z.object({
+ text: z.string(),
+})
+
+/**
+ * SuggestedQuestionsResponse
+ */
+export const zSuggestedQuestionsResponse = z.object({
+ data: z.array(z.string()),
+})
+
+/**
+ * CompletionMessagePayload
+ */
+export const zCompletionMessagePayload = z.object({
+ files: z.array(z.unknown()).nullish(),
+ inputs: z.record(z.string(), z.unknown()),
+ model_config: z.record(z.string(), z.unknown()),
+ query: z.string().optional().default(''),
+ response_mode: z.enum(['blocking', 'streaming']).optional().default('blocking'),
+ retriever_from: z.string().optional().default('dev'),
+})
+
+/**
+ * ConvertToWorkflowPayload
+ */
+export const zConvertToWorkflowPayload = z.object({
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ icon_type: z.string().nullish(),
+ name: z.string().nullish(),
+})
+
+/**
+ * AppExportResponse
+ */
+export const zAppExportResponse = z.object({
+ data: z.string(),
+})
+
+/**
+ * MessageFeedbackPayload
+ */
+export const zMessageFeedbackPayload = z.object({
+ content: z.string().nullish(),
+ message_id: z.string(),
+ rating: z.enum(['like', 'dislike']).nullish(),
+})
+
+/**
+ * ModelConfigRequest
+ */
+export const zModelConfigRequest = z.object({
+ agent_mode: z.record(z.string(), z.unknown()).nullish(),
+ configs: z.record(z.string(), z.unknown()).nullish(),
+ dataset_configs: z.record(z.string(), z.unknown()).nullish(),
+ model: z.string().nullish(),
+ more_like_this: z.record(z.string(), z.unknown()).nullish(),
+ opening_statement: z.string().nullish(),
+ provider: z.string().nullish(),
+ retrieval_model: z.record(z.string(), z.unknown()).nullish(),
+ speech_to_text: z.record(z.string(), z.unknown()).nullish(),
+ suggested_questions: z.array(z.string()).nullish(),
+ text_to_speech: z.record(z.string(), z.unknown()).nullish(),
+ tools: z.array(z.record(z.string(), z.unknown())).nullish(),
+})
+
+/**
+ * AppNamePayload
+ */
+export const zAppNamePayload = z.object({
+ name: z.string().min(1),
+})
+
+/**
+ * MCPServerCreatePayload
+ */
+export const zMcpServerCreatePayload = z.object({
+ description: z.string().nullish(),
+ parameters: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * MCPServerUpdatePayload
+ */
+export const zMcpServerUpdatePayload = z.object({
+ description: z.string().nullish(),
+ id: z.string(),
+ parameters: z.record(z.string(), z.unknown()),
+ status: z.string().nullish(),
+})
+
+/**
+ * AppSiteUpdatePayload
+ */
+export const zAppSiteUpdatePayload = z.object({
+ chat_color_theme: z.string().nullish(),
+ chat_color_theme_inverted: z.boolean().nullish(),
+ copyright: z.string().nullish(),
+ custom_disclaimer: z.string().nullish(),
+ customize_domain: z.string().nullish(),
+ customize_token_strategy: z.enum(['must', 'allow', 'not_allow']).nullish(),
+ default_language: z.string().nullish(),
+ description: z.string().nullish(),
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ icon_type: z.string().nullish(),
+ privacy_policy: z.string().nullish(),
+ prompt_public: z.boolean().nullish(),
+ show_workflow_steps: z.boolean().nullish(),
+ title: z.string().nullish(),
+ use_icon_as_answer_icon: z.boolean().nullish(),
+})
+
+/**
+ * AppSiteResponse
+ */
+export const zAppSiteResponse = z.object({
+ app_id: z.string(),
+ code: z.string().nullish(),
+ copyright: z.string().nullish(),
+ custom_disclaimer: z.string().nullish(),
+ customize_domain: z.string().nullish(),
+ customize_token_strategy: z.string(),
+ default_language: z.string(),
+ description: z.string().nullish(),
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ privacy_policy: z.string().nullish(),
+ prompt_public: z.boolean(),
+ show_workflow_steps: z.boolean(),
+ title: z.string(),
+ use_icon_as_answer_icon: z.boolean(),
+})
+
+/**
+ * AppSiteStatusPayload
+ */
+export const zAppSiteStatusPayload = z.object({
+ enable_site: z.boolean(),
+})
+
+/**
+ * TextToSpeechPayload
+ */
+export const zTextToSpeechPayload = z.object({
+ message_id: z.string().nullish(),
+ streaming: z.boolean().nullish(),
+ text: z.string(),
+ voice: z.string().nullish(),
+})
+
+/**
+ * AppTracePayload
+ */
+export const zAppTracePayload = z.object({
+ enabled: z.boolean(),
+ tracing_provider: z.string().nullish(),
+})
+
+/**
+ * TraceProviderQuery
+ */
+export const zTraceProviderQuery = z.object({
+ tracing_provider: z.string(),
+})
+
+/**
+ * TraceConfigPayload
+ */
+export const zTraceConfigPayload = z.object({
+ tracing_config: z.record(z.string(), z.unknown()),
+ tracing_provider: z.string(),
+})
+
+/**
+ * ParserEnable
+ */
+export const zParserEnable = z.object({
+ enable_trigger: z.boolean(),
+ trigger_id: z.string(),
+})
+
+/**
+ * WorkflowTriggerResponse
+ */
+export const zWorkflowTriggerResponse = z.object({
+ created_at: z.iso.datetime().nullish(),
+ icon: z.string(),
+ id: z.string(),
+ node_id: z.string(),
+ provider_name: z.string(),
+ status: z.string(),
+ title: z.string(),
+ trigger_type: z.string(),
+ updated_at: z.iso.datetime().nullish(),
+})
+
+/**
+ * WorkflowTriggerListResponse
+ */
+export const zWorkflowTriggerListResponse = z.object({
+ data: z.array(zWorkflowTriggerResponse),
+})
+
+export const zWorkflowRunPagination = z.record(z.string(), z.unknown())
+
+export const zWorkflowRunDetail = z.record(z.string(), z.unknown())
+
+export const zWorkflowRunExport = z.record(z.string(), z.unknown())
+
+export const zWorkflowRunNodeExecutionList = z.record(z.string(), z.unknown())
+
+export const zWorkflowCommentBasic = z.record(z.string(), z.unknown())
+
+/**
+ * WorkflowCommentCreatePayload
+ */
+export const zWorkflowCommentCreatePayload = z.object({
+ content: z.string(),
+ mentioned_user_ids: z.array(z.string()).optional(),
+ position_x: z.number(),
+ position_y: z.number(),
+})
+
+export const zWorkflowCommentCreate = z.record(z.string(), z.unknown())
+
+export const zWorkflowCommentDetail = z.record(z.string(), z.unknown())
+
+/**
+ * WorkflowCommentUpdatePayload
+ */
+export const zWorkflowCommentUpdatePayload = z.object({
+ content: z.string(),
+ mentioned_user_ids: z.array(z.string()).nullish(),
+ position_x: z.number().nullish(),
+ position_y: z.number().nullish(),
+})
+
+export const zWorkflowCommentUpdate = z.record(z.string(), z.unknown())
+
+/**
+ * WorkflowCommentReplyPayload
+ */
+export const zWorkflowCommentReplyPayload = z.object({
+ content: z.string(),
+ mentioned_user_ids: z.array(z.string()).optional(),
+})
+
+export const zWorkflowCommentReplyCreate = z.record(z.string(), z.unknown())
+
+export const zWorkflowCommentReplyUpdate = z.record(z.string(), z.unknown())
+
+export const zWorkflowCommentResolve = z.record(z.string(), z.unknown())
+
+export const zWorkflowPagination = z.record(z.string(), z.unknown())
+
+export const zWorkflow = z.record(z.string(), z.unknown())
+
+/**
+ * SyncDraftWorkflowPayload
+ */
+export const zSyncDraftWorkflowPayload = z.object({
+ conversation_variables: z.array(z.record(z.string(), z.unknown())).optional(),
+ environment_variables: z.array(z.record(z.string(), z.unknown())).optional(),
+ features: z.record(z.string(), z.unknown()),
+ graph: z.record(z.string(), z.unknown()),
+ hash: z.string().nullish(),
+})
+
+export const zSyncDraftWorkflowResponse = z.record(z.string(), z.unknown())
+
+export const zWorkflowDraftVariableList = z.record(z.string(), z.unknown())
+
+/**
+ * ConversationVariableUpdatePayload
+ */
+export const zConversationVariableUpdatePayload = z.object({
+ conversation_variables: z.array(z.record(z.string(), z.unknown())),
+})
+
+/**
+ * EnvironmentVariableUpdatePayload
+ */
+export const zEnvironmentVariableUpdatePayload = z.object({
+ environment_variables: z.array(z.record(z.string(), z.unknown())),
+})
+
+/**
+ * WorkflowFeaturesPayload
+ */
+export const zWorkflowFeaturesPayload = z.object({
+ features: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * HumanInputDeliveryTestPayload
+ */
+export const zHumanInputDeliveryTestPayload = z.object({
+ delivery_method_id: z.string(),
+ inputs: z.record(z.string(), z.unknown()).optional(),
+})
+
+export const zWorkflowRunNodeExecution = z.record(z.string(), z.unknown())
+
+/**
+ * DraftWorkflowNodeRunPayload
+ */
+export const zDraftWorkflowNodeRunPayload = z.object({
+ files: z.array(z.record(z.string(), z.unknown())).nullish(),
+ inputs: z.record(z.string(), z.unknown()),
+ query: z.string().optional().default(''),
+})
+
+/**
+ * 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(),
+})
+
+export const zDraftWorkflowTriggerRunRequest = z.record(z.string(), z.unknown())
+
+/**
+ * DraftWorkflowTriggerRunAllPayload
+ */
+export const zDraftWorkflowTriggerRunAllPayload = z.object({
+ node_ids: z.array(z.string()),
+})
+
+export const zWorkflowDraftVariableListWithoutValue = z.record(z.string(), z.unknown())
+
+export const zWorkflowDraftVariable = z.record(z.string(), z.unknown())
+
+/**
+ * WorkflowDraftVariableUpdatePayload
+ */
+export const zWorkflowDraftVariableUpdatePayload = z.object({
+ name: z.string().nullish(),
+ value: z.unknown().optional(),
+})
+
+/**
+ * PublishWorkflowPayload
+ */
+export const zPublishWorkflowPayload = z.object({
+ marked_comment: z.string().max(100).nullish(),
+ marked_name: z.string().max(20).nullish(),
+})
+
+/**
+ * WebhookTriggerResponse
+ */
+export const zWebhookTriggerResponse = z.object({
+ created_at: z.iso.datetime().nullish(),
+ id: z.string(),
+ node_id: z.string(),
+ webhook_debug_url: z.string(),
+ webhook_id: z.string(),
+ webhook_url: z.string(),
+})
+
+/**
+ * WorkflowUpdatePayload
+ */
+export const zWorkflowUpdatePayload = z.object({
+ marked_comment: z.string().max(100).nullish(),
+ marked_name: z.string().max(20).nullish(),
+})
+
+/**
+ * ApiKeyItem
+ */
+export const zApiKeyItem = z.object({
+ created_at: z.int().nullish(),
+ id: z.string(),
+ last_used_at: z.int().nullish(),
+ token: z.string(),
+ type: z.string(),
+})
+
+/**
+ * ApiKeyList
+ */
+export const zApiKeyList = z.object({
+ data: z.array(zApiKeyItem),
+})
+
+/**
+ * IconType
+ */
+export const zIconType = z.enum(['image', 'emoji', 'link'])
+
+/**
+ * CreateAppPayload
+ */
+export const zCreateAppPayload = z.object({
+ description: z.string().max(400).nullish(),
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ icon_type: zIconType.optional(),
+ mode: z.enum(['chat', 'agent-chat', 'advanced-chat', 'workflow', 'completion']),
+ name: z.string().min(1),
+})
+
+/**
+ * UpdateAppPayload
+ */
+export const zUpdateAppPayload = z.object({
+ description: z.string().max(400).nullish(),
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ icon_type: zIconType.optional(),
+ max_active_requests: z.int().nullish(),
+ name: z.string().min(1),
+ use_icon_as_answer_icon: z.boolean().nullish(),
+})
+
+/**
+ * CopyAppPayload
+ */
+export const zCopyAppPayload = z.object({
+ description: z.string().max(400).nullish(),
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ icon_type: zIconType.optional(),
+ name: z.string().nullish(),
+})
+
+/**
+ * AppIconPayload
+ */
+export const zAppIconPayload = z.object({
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ icon_type: zIconType.optional(),
+})
+
+/**
+ * Tag
+ */
+export const zTag = z.object({
+ id: z.string(),
+ name: z.string(),
+ 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(),
+})
+
+/**
+ * WorkflowPartial
+ */
+export const zWorkflowPartial = z.object({
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ id: z.string(),
+ updated_at: z.int().nullish(),
+ updated_by: z.string().nullish(),
+})
+
+/**
+ * AppDetail
+ */
+export const zAppDetail = z.object({
+ access_mode: z.string().nullish(),
+ app_model_config: zModelConfig.optional(),
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ description: z.string().nullish(),
+ enable_api: z.boolean(),
+ enable_site: z.boolean(),
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ id: z.string(),
+ mode_compatible_with_agent: z.string(),
+ name: z.string(),
+ tags: z.array(zTag).optional(),
+ tracing: zJsonValue.optional(),
+ updated_at: z.int().nullish(),
+ updated_by: z.string().nullish(),
+ use_icon_as_answer_icon: z.boolean().nullish(),
+ workflow: zWorkflowPartial.optional(),
+})
+
+/**
+ * ImportStatus
+ */
+export const zImportStatus = z.enum(['completed', 'completed-with-warnings', 'pending', 'failed'])
+
+/**
+ * Import
+ */
+export const zImport = z.object({
+ app_id: z.string().nullish(),
+ app_mode: z.string().nullish(),
+ current_dsl_version: z.string().optional().default('0.6.0'),
+ error: z.string().optional().default(''),
+ id: z.string(),
+ imported_dsl_version: z.string().optional().default(''),
+ status: zImportStatus,
+})
+
+/**
+ * DeletedTool
+ */
+export const zDeletedTool = z.object({
+ provider_id: z.string(),
+ tool_name: z.string(),
+ type: z.string(),
+})
+
+/**
+ * Site
+ */
+export const zSite = z.object({
+ app_base_url: z.string().nullish(),
+ chat_color_theme: z.string().nullish(),
+ chat_color_theme_inverted: z.boolean().nullish(),
+ code: z.string().nullish(),
+ copyright: z.string().nullish(),
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ custom_disclaimer: z.string().nullish(),
+ customize_domain: z.string().nullish(),
+ customize_token_strategy: z.string().nullish(),
+ default_language: z.string().nullish(),
+ description: z.string().nullish(),
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ icon_type: z.unknown().optional(),
+ privacy_policy: z.string().nullish(),
+ prompt_public: z.boolean().nullish(),
+ show_workflow_steps: z.boolean().nullish(),
+ title: z.string().nullish(),
+ updated_at: z.int().nullish(),
+ updated_by: z.string().nullish(),
+ use_icon_as_answer_icon: z.boolean().nullish(),
+})
+
+/**
+ * AppDetailWithSite
+ */
+export const zAppDetailWithSite = z.object({
+ access_mode: z.string().nullish(),
+ api_base_url: z.string().nullish(),
+ app_model_config: zModelConfig.optional(),
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ deleted_tools: z.array(zDeletedTool).optional(),
+ description: z.string().nullish(),
+ enable_api: z.boolean(),
+ enable_site: z.boolean(),
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ icon_type: z.string().nullish(),
+ id: z.string(),
+ max_active_requests: z.int().nullish(),
+ mode_compatible_with_agent: z.string(),
+ name: z.string(),
+ site: zSite.optional(),
+ tags: z.array(zTag).optional(),
+ tracing: zJsonValue.optional(),
+ updated_at: z.int().nullish(),
+ updated_by: z.string().nullish(),
+ use_icon_as_answer_icon: z.boolean().nullish(),
+ workflow: zWorkflowPartial.optional(),
+})
+
+/**
+ * AnnotationHitHistory
+ */
+export const zAnnotationHitHistory = z.object({
+ annotation_content: z.string().nullish(),
+ annotation_question: z.string().nullish(),
+ created_at: z.int().nullish(),
+ id: z.string(),
+ question: z.string().nullish(),
+ score: z.number().nullish(),
+ source: z.string().nullish(),
+})
+
+/**
+ * AnnotationHitHistoryList
+ */
+export const zAnnotationHitHistoryList = z.object({
+ data: z.array(zAnnotationHitHistory),
+ has_more: z.boolean(),
+ limit: z.int(),
+ page: z.int(),
+ total: z.int(),
+})
+
+/**
+ * FeedbackStat
+ */
+export const zFeedbackStat = z.object({
+ dislike: z.int(),
+ like: z.int(),
+})
+
+/**
+ * ConversationDetail
+ */
+export const zConversationDetail = z.object({
+ admin_feedback_stats: zFeedbackStat.optional(),
+ annotated: z.boolean(),
+ created_at: z.int().nullish(),
+ from_account_id: z.string().nullish(),
+ from_end_user_id: z.string().nullish(),
+ from_source: z.string(),
+ id: z.string(),
+ introduction: z.string().nullish(),
+ message_count: z.int(),
+ model_config: zModelConfig.optional(),
+ status: z.string(),
+ updated_at: z.int().nullish(),
+ user_feedback_stats: zFeedbackStat.optional(),
+})
+
+/**
+ * ConversationVariableResponse
+ */
+export const zConversationVariableResponse = z.object({
+ created_at: z.int().nullish(),
+ description: z.string().nullish(),
+ id: z.string(),
+ name: z.string(),
+ updated_at: z.int().nullish(),
+ value: z.string().nullish(),
+ value_type: z.string(),
+})
+
+/**
+ * PaginatedConversationVariableResponse
+ */
+export const zPaginatedConversationVariableResponse = z.object({
+ data: z.array(zConversationVariableResponse),
+ has_more: z.boolean(),
+ limit: z.int(),
+ page: z.int(),
+ total: z.int(),
+})
+
+/**
+ * AgentThought
+ */
+export const zAgentThought = z.object({
+ chain_id: z.string().nullish(),
+ created_at: z.int().nullish(),
+ files: z.array(z.string()),
+ id: z.string(),
+ message_chain_id: z.string().nullish(),
+ message_id: z.string(),
+ observation: z.string().nullish(),
+ position: z.int(),
+ thought: z.string().nullish(),
+ tool: z.string().nullish(),
+ tool_input: z.string().nullish(),
+ tool_labels: zJsonValue,
+})
+
+/**
+ * MessageFile
+ */
+export const zMessageFile = z.object({
+ belongs_to: z.string().nullish(),
+ filename: z.string(),
+ id: z.string(),
+ mime_type: z.string().nullish(),
+ size: z.int().nullish(),
+ transfer_method: z.string(),
+ type: z.string(),
+ upload_file_id: z.string().nullish(),
+ url: z.string().nullish(),
+})
+
+/**
+ * AppMCPServerStatus
+ *
+ * AppMCPServer Status Enum
+ */
+export const zAppMcpServerStatus = z.enum(['normal', 'active', 'inactive'])
+
+/**
+ * AppMCPServerResponse
+ */
+export const zAppMcpServerResponse = z.object({
+ created_at: z.int().nullish(),
+ description: z.string(),
+ id: z.string(),
+ name: z.string(),
+ parameters: z.unknown(),
+ server_code: z.string(),
+ status: zAppMcpServerStatus,
+ updated_at: z.int().nullish(),
+})
+
+/**
+ * AccountWithRole
+ */
+export const zAccountWithRole = z.object({
+ avatar: z.string().nullish(),
+ created_at: z.int().nullish(),
+ email: z.string(),
+ id: z.string(),
+ last_active_at: z.int().nullish(),
+ last_login_at: z.int().nullish(),
+ name: z.string(),
+ role: z.string(),
+ status: z.string(),
+})
+
+/**
+ * WorkflowCommentMentionUsersPayload
+ */
+export const zWorkflowCommentMentionUsersPayload = z.object({
+ users: z.array(zAccountWithRole),
+})
+
+/**
+ * ModelConfigPartial
+ */
+export const zModelConfigPartial = z.object({
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ model_dict: zJsonValue.optional(),
+ pre_prompt: z.string().nullish(),
+ updated_at: z.int().nullish(),
+ updated_by: z.string().nullish(),
+})
+
+/**
+ * AppPartial
+ */
+export const zAppPartial = z.object({
+ access_mode: z.string().nullish(),
+ app_model_config: zModelConfigPartial.optional(),
+ author_name: z.string().nullish(),
+ create_user_name: z.string().nullish(),
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ desc_or_prompt: z.string().nullish(),
+ has_draft_trigger: z.boolean().nullish(),
+ icon: z.string().nullish(),
+ icon_background: z.string().nullish(),
+ icon_type: z.string().nullish(),
+ id: z.string(),
+ max_active_requests: z.int().nullish(),
+ mode_compatible_with_agent: z.string(),
+ name: z.string(),
+ tags: z.array(zTag).optional(),
+ updated_at: z.int().nullish(),
+ updated_by: z.string().nullish(),
+ use_icon_as_answer_icon: z.boolean().nullish(),
+ workflow: zWorkflowPartial.optional(),
+})
+
+/**
+ * AppPagination
+ */
+export const zAppPagination = z.object({
+ has_next: z.boolean(),
+ items: z.array(zAppPartial),
+ page: z.int(),
+ per_page: z.int(),
+ total: z.int(),
+})
+
+/**
+ * Type
+ */
+export const zType = z.enum(['github', 'marketplace', 'package'])
+
+/**
+ * PluginDependency
+ */
+export const zPluginDependency = z.object({
+ current_identifier: z.string().nullish(),
+ type: zType,
+ value: z.unknown(),
+})
+
+/**
+ * CheckDependenciesResult
+ */
+export const zCheckDependenciesResult = z.object({
+ leaked_dependencies: z.array(zPluginDependency).optional(),
+})
+
+/**
+ * Github
+ */
+export const zGithub = z.object({
+ github_plugin_unique_identifier: z.string(),
+ package: z.string(),
+ repo: z.string(),
+ version: z.string(),
+})
+
+/**
+ * Marketplace
+ */
+export const zMarketplace = z.object({
+ marketplace_plugin_unique_identifier: z.string(),
+ version: z.string().nullish(),
+})
+
+/**
+ * Package
+ */
+export const zPackage = z.object({
+ plugin_unique_identifier: z.string(),
+ version: z.string().nullish(),
+})
+
+/**
+ * SimpleModelConfig
+ */
+export const zSimpleModelConfig = z.object({
+ model_dict: zJsonValue.optional(),
+ pre_prompt: z.string().nullish(),
+})
+
+/**
+ * StatusCount
+ */
+export const zStatusCount = z.object({
+ failed: z.int(),
+ partial_success: z.int(),
+ paused: z.int(),
+ success: z.int(),
+})
+
+/**
+ * ConversationWithSummary
+ */
+export const zConversationWithSummary = z.object({
+ admin_feedback_stats: zFeedbackStat.optional(),
+ annotated: z.boolean(),
+ created_at: z.int().nullish(),
+ from_account_id: z.string().nullish(),
+ from_account_name: z.string().nullish(),
+ from_end_user_id: z.string().nullish(),
+ from_end_user_session_id: z.string().nullish(),
+ from_source: z.string(),
+ id: z.string(),
+ message_count: z.int(),
+ model_config: zSimpleModelConfig.optional(),
+ name: z.string(),
+ read_at: z.int().nullish(),
+ status: z.string(),
+ status_count: zStatusCount.optional(),
+ summary_or_query: z.string(),
+ updated_at: z.int().nullish(),
+ user_feedback_stats: zFeedbackStat.optional(),
+})
+
+/**
+ * ConversationWithSummaryPagination
+ */
+export const zConversationWithSummaryPagination = z.object({
+ has_next: z.boolean(),
+ items: z.array(zConversationWithSummary),
+ page: z.int(),
+ per_page: z.int(),
+ total: z.int(),
+})
+
+/**
+ * SimpleMessageDetail
+ */
+export const zSimpleMessageDetail = z.object({
+ answer: z.string(),
+ inputs: z.record(z.string(), zJsonValue),
+ message: z.string(),
+ query: z.string(),
+})
+
+/**
+ * SimpleAccount
+ */
+export const zSimpleAccount = z.object({
+ email: z.string(),
+ id: z.string(),
+ name: z.string(),
+})
+
+/**
+ * ConversationAnnotation
+ */
+export const zConversationAnnotation = z.object({
+ account: zSimpleAccount.optional(),
+ content: z.string(),
+ created_at: z.int().nullish(),
+ id: z.string(),
+ question: z.string().nullish(),
+})
+
+/**
+ * Conversation
+ */
+export const zConversation = z.object({
+ admin_feedback_stats: zFeedbackStat.optional(),
+ annotation: zConversationAnnotation.optional(),
+ created_at: z.int().nullish(),
+ first_message: zSimpleMessageDetail.optional(),
+ from_account_id: z.string().nullish(),
+ from_account_name: z.string().nullish(),
+ from_end_user_id: z.string().nullish(),
+ from_end_user_session_id: z.string().nullish(),
+ from_source: z.string(),
+ id: z.string(),
+ model_config: zSimpleModelConfig.optional(),
+ read_at: z.int().nullish(),
+ status: z.string(),
+ updated_at: z.int().nullish(),
+ user_feedback_stats: zFeedbackStat.optional(),
+})
+
+/**
+ * ConversationPagination
+ */
+export const zConversationPagination = z.object({
+ has_next: z.boolean(),
+ items: z.array(zConversation),
+ page: z.int(),
+ per_page: z.int(),
+ total: z.int(),
+})
+
+/**
+ * ConversationAnnotationHitHistory
+ */
+export const zConversationAnnotationHitHistory = z.object({
+ annotation_create_account: zSimpleAccount.optional(),
+ created_at: z.int().nullish(),
+ id: z.string(),
+})
+
+/**
+ * Feedback
+ */
+export const zFeedback = z.object({
+ content: z.string().nullish(),
+ from_account: zSimpleAccount.optional(),
+ from_end_user_id: z.string().nullish(),
+ from_source: z.string(),
+ rating: z.string(),
+})
+
+/**
+ * MessageDetail
+ */
+export const zMessageDetail = z.object({
+ agent_thoughts: z.array(zAgentThought),
+ annotation: zConversationAnnotation.optional(),
+ annotation_hit_history: zConversationAnnotationHitHistory.optional(),
+ answer_tokens: z.int(),
+ conversation_id: z.string(),
+ created_at: z.int().nullish(),
+ error: z.string().nullish(),
+ feedbacks: z.array(zFeedback),
+ from_account_id: z.string().nullish(),
+ from_end_user_id: z.string().nullish(),
+ from_source: z.string(),
+ id: z.string(),
+ inputs: z.record(z.string(), zJsonValue),
+ message: zJsonValue,
+ message_files: z.array(zMessageFile),
+ message_metadata_dict: zJsonValue,
+ message_tokens: z.int(),
+ parent_message_id: z.string().nullish(),
+ provider_response_latency: z.number(),
+ query: z.string(),
+ re_sign_file_url_answer: z.string(),
+ status: z.string(),
+ workflow_run_id: z.string().nullish(),
+})
+
+/**
+ * ConversationMessageDetail
+ */
+export const zConversationMessageDetail = z.object({
+ created_at: z.int().nullish(),
+ first_message: zMessageDetail.optional(),
+ from_account_id: z.string().nullish(),
+ from_end_user_id: z.string().nullish(),
+ from_source: z.string(),
+ id: z.string(),
+ model_config: zModelConfig.optional(),
+ status: z.string(),
+})
+
+/**
+ * HumanInputFormSubmissionData
+ */
+export const zHumanInputFormSubmissionData = z.object({
+ action_id: z.string(),
+ action_text: z.string(),
+ node_id: z.string(),
+ node_title: z.string(),
+ rendered_content: z.string(),
+})
+
+/**
+ * ExecutionContentType
+ */
+export const zExecutionContentType = z.enum(['human_input'])
+
+/**
+ * SimpleEndUser
+ */
+export const zSimpleEndUser = z.object({
+ id: z.string(),
+ is_anonymous: z.boolean(),
+ session_id: z.string().nullish(),
+ type: z.string(),
+})
+
+/**
+ * WorkflowRunForLogResponse
+ */
+export const zWorkflowRunForLogResponse = z.object({
+ created_at: z.int().nullish(),
+ elapsed_time: z.number().nullish(),
+ error: z.string().nullish(),
+ exceptions_count: z.int().nullish(),
+ finished_at: z.int().nullish(),
+ id: z.string(),
+ status: z.string().nullish(),
+ total_steps: z.int().nullish(),
+ total_tokens: z.int().nullish(),
+ triggered_from: z.string().nullish(),
+ version: z.string().nullish(),
+})
+
+/**
+ * WorkflowAppLogPartialResponse
+ */
+export const zWorkflowAppLogPartialResponse = z.object({
+ created_at: z.int().nullish(),
+ created_by_account: zSimpleAccount.optional(),
+ created_by_end_user: zSimpleEndUser.optional(),
+ created_by_role: z.string().nullish(),
+ created_from: z.string().nullish(),
+ details: z.unknown().optional(),
+ id: z.string(),
+ workflow_run: zWorkflowRunForLogResponse.optional(),
+})
+
+/**
+ * WorkflowAppLogPaginationResponse
+ */
+export const zWorkflowAppLogPaginationResponse = z.object({
+ data: z.array(zWorkflowAppLogPartialResponse),
+ has_more: z.boolean(),
+ limit: z.int(),
+ page: z.int(),
+ total: z.int(),
+})
+
+/**
+ * WorkflowRunForArchivedLogResponse
+ */
+export const zWorkflowRunForArchivedLogResponse = z.object({
+ elapsed_time: z.number().nullish(),
+ id: z.string(),
+ status: z.string().nullish(),
+ total_tokens: z.int().nullish(),
+ triggered_from: z.string().nullish(),
+})
+
+/**
+ * WorkflowArchivedLogPartialResponse
+ */
+export const zWorkflowArchivedLogPartialResponse = z.object({
+ created_at: z.int().nullish(),
+ created_by_account: zSimpleAccount.optional(),
+ created_by_end_user: zSimpleEndUser.optional(),
+ id: z.string(),
+ trigger_metadata: z.unknown().optional(),
+ workflow_run: zWorkflowRunForArchivedLogResponse.optional(),
+})
+
+/**
+ * WorkflowArchivedLogPaginationResponse
+ */
+export const zWorkflowArchivedLogPaginationResponse = z.object({
+ data: z.array(zWorkflowArchivedLogPartialResponse),
+ has_more: z.boolean(),
+ limit: z.int(),
+ page: z.int(),
+ total: z.int(),
+})
+
+/**
+ * ButtonStyle
+ *
+ * Button styles for user actions.
+ */
+export const zButtonStyle = z.enum(['primary', 'default', 'accent', 'ghost'])
+
+/**
+ * UserAction
+ *
+ * User action configuration.
+ */
+export const zUserAction = z.object({
+ button_style: zButtonStyle.optional(),
+ id: z.string().max(20),
+ title: z.string().max(20),
+})
+
+/**
+ * FormInputType
+ *
+ * Form input types.
+ */
+export const zFormInputType = z.enum(['text_input', 'paragraph'])
+
+/**
+ * PlaceholderType
+ *
+ * Default value types for form inputs.
+ */
+export const zPlaceholderType = z.enum(['variable', 'constant'])
+
+/**
+ * FormInputDefault
+ *
+ * Default configuration for form inputs.
+ */
+export const zFormInputDefault = z.object({
+ selector: z.array(z.string()).optional(),
+ type: zPlaceholderType,
+ value: z.string().optional().default(''),
+})
+
+/**
+ * FormInput
+ *
+ * Form input definition.
+ */
+export const zFormInput = z.object({
+ default: zFormInputDefault.optional(),
+ output_variable_name: z.string(),
+ type: zFormInputType,
+})
+
+/**
+ * HumanInputFormDefinition
+ */
+export const zHumanInputFormDefinition = z.object({
+ actions: z.array(zUserAction).optional(),
+ display_in_ui: z.boolean().optional().default(false),
+ expiration_time: z.int(),
+ form_content: z.string(),
+ form_id: z.string(),
+ form_token: z.string().nullish(),
+ inputs: z.array(zFormInput).optional(),
+ node_id: z.string(),
+ node_title: z.string(),
+ resolved_default_values: z.record(z.string(), z.unknown()).optional(),
+})
+
+/**
+ * HumanInputContent
+ */
+export const zHumanInputContent = z.object({
+ form_definition: zHumanInputFormDefinition.optional(),
+ form_submission_data: zHumanInputFormSubmissionData.optional(),
+ submitted: z.boolean(),
+ type: zExecutionContentType.optional(),
+ workflow_run_id: z.string(),
+})
+
+/**
+ * MessageDetailResponse
+ */
+export const zMessageDetailResponse = z.object({
+ agent_thoughts: z.array(zAgentThought).optional(),
+ annotation: zConversationAnnotation.optional(),
+ annotation_hit_history: zConversationAnnotationHitHistory.optional(),
+ answer_tokens: z.int().nullish(),
+ conversation_id: z.string(),
+ created_at: z.int().nullish(),
+ error: z.string().nullish(),
+ extra_contents: z.array(zHumanInputContent).optional(),
+ feedbacks: z.array(zFeedback).optional(),
+ from_account_id: z.string().nullish(),
+ from_end_user_id: z.string().nullish(),
+ from_source: z.string(),
+ id: z.string(),
+ inputs: z.record(z.string(), zJsonValue),
+ message: zJsonValue.optional(),
+ message_files: z.array(zMessageFile).optional(),
+ message_metadata_dict: zJsonValue.optional(),
+ message_tokens: z.int().nullish(),
+ parent_message_id: z.string().nullish(),
+ provider_response_latency: z.number().nullish(),
+ query: z.string(),
+ re_sign_file_url_answer: z.string(),
+ status: z.string(),
+ workflow_run_id: z.string().nullish(),
+})
+
+/**
+ * MessageInfiniteScrollPaginationResponse
+ */
+export const zMessageInfiniteScrollPaginationResponse = z.object({
+ data: z.array(zMessageDetailResponse),
+ has_more: z.boolean(),
+ limit: z.int(),
+})
+
+export const zGetAppsQuery = z.object({
+ is_created_by_me: z.boolean().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ mode: z
+ .enum(['completion', 'chat', 'advanced-chat', 'workflow', 'agent-chat', 'channel', 'all'])
+ .optional()
+ .default('all'),
+ name: z.string().nullish(),
+ page: z.int().gte(1).lte(99999).optional().default(1),
+ tag_ids: z.array(z.string()).nullish(),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsResponse = zAppPagination
+
+export const zPostAppsBody = zCreateAppPayload
+
+/**
+ * App created successfully
+ */
+export const zPostAppsResponse = zAppDetail
+
+export const zPostAppsImportsBody = zAppImportPayload
+
+/**
+ * Import completed
+ */
+export const zPostAppsImportsResponse = zImport
+
+export const zGetAppsImportsByAppIdCheckDependenciesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Dependencies checked
+ */
+export const zGetAppsImportsByAppIdCheckDependenciesResponse = zCheckDependenciesResult
+
+export const zPostAppsImportsByImportIdConfirmPath = z.object({
+ import_id: z.string(),
+})
+
+/**
+ * Import confirmed
+ */
+export const zPostAppsImportsByImportIdConfirmResponse = zImport
+
+export const zGetAppsWorkflowsOnlineUsersQuery = z.object({
+ app_ids: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsWorkflowsOnlineUsersResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteAppsByAppIdPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * App deleted successfully
+ */
+export const zDeleteAppsByAppIdResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsByAppIdResponse = zAppDetailWithSite
+
+export const zPutAppsByAppIdBody = zUpdateAppPayload
+
+export const zPutAppsByAppIdPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * App updated successfully
+ */
+export const zPutAppsByAppIdResponse = zAppDetailWithSite
+
+export const zGetAppsByAppIdAdvancedChatWorkflowRunsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdAdvancedChatWorkflowRunsQuery = z.object({
+ triggered_from: z.enum(['debugging', 'app-run']).nullish(),
+ status: z.enum(['running', 'succeeded', 'failed', 'stopped', 'partial-succeeded']).nullish(),
+ last_id: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+})
+
+/**
+ * Workflow runs retrieved successfully
+ */
+export const zGetAppsByAppIdAdvancedChatWorkflowRunsResponse = zAdvancedChatWorkflowRunPagination
+
+export const zGetAppsByAppIdAdvancedChatWorkflowRunsCountPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdAdvancedChatWorkflowRunsCountQuery = z.object({
+ triggered_from: z.enum(['debugging', 'app-run']).nullish(),
+ time_range: z.string().nullish(),
+ status: z.enum(['running', 'succeeded', 'failed', 'stopped', 'partial-succeeded']).nullish(),
+})
+
+/**
+ * Workflow runs count retrieved successfully
+ */
+export const zGetAppsByAppIdAdvancedChatWorkflowRunsCountResponse = zWorkflowRunCount
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody
+ = zHumanInputFormPreviewPayload
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath
+ = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunBody
+ = zHumanInputFormSubmitPayload
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunPath
+ = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunBody
+ = zIterationNodeRunPayload
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Iteration node run started successfully
+ */
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunBody
+ = zLoopNodeRunPayload
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Loop node run started successfully
+ */
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftRunBody = zAdvancedChatWorkflowRunPayload
+
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftRunPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Workflow run started successfully
+ */
+export const zPostAppsByAppIdAdvancedChatWorkflowsDraftRunResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdAgentLogsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdAgentLogsQuery = z.object({
+ conversation_id: z.string(),
+ message_id: z.string(),
+})
+
+/**
+ * Agent logs retrieved successfully
+ */
+export const zGetAppsByAppIdAgentLogsResponse = z.array(z.record(z.string(), z.unknown()))
+
+export const zPostAppsByAppIdAnnotationReplyByActionBody = zAnnotationReplyPayload
+
+export const zPostAppsByAppIdAnnotationReplyByActionPath = z.object({
+ app_id: z.string(),
+ action: z.string(),
+})
+
+/**
+ * Action completed successfully
+ */
+export const zPostAppsByAppIdAnnotationReplyByActionResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdPath = z.object({
+ app_id: z.string(),
+ action: z.string(),
+ job_id: z.string(),
+})
+
+/**
+ * Job status retrieved successfully
+ */
+export const zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdAnnotationSettingPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Annotation settings retrieved successfully
+ */
+export const zGetAppsByAppIdAnnotationSettingResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdBody
+ = zAnnotationSettingUpdatePayload
+
+export const zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdPath = z.object({
+ app_id: z.string(),
+ annotation_setting_id: z.string(),
+})
+
+/**
+ * Settings updated successfully
+ */
+export const zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteAppsByAppIdAnnotationsPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteAppsByAppIdAnnotationsResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdAnnotationsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdAnnotationsQuery = z.object({
+ keyword: z.string().optional().default(''),
+ limit: z.int().gte(1).optional().default(20),
+ page: z.int().gte(1).optional().default(1),
+})
+
+/**
+ * Annotations retrieved successfully
+ */
+export const zGetAppsByAppIdAnnotationsResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdAnnotationsBody = zCreateAnnotationPayload
+
+export const zPostAppsByAppIdAnnotationsPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Annotation created successfully
+ */
+export const zPostAppsByAppIdAnnotationsResponse = zAnnotation
+
+export const zPostAppsByAppIdAnnotationsBatchImportPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Batch import started successfully
+ */
+export const zPostAppsByAppIdAnnotationsBatchImportResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdPath = z.object({
+ app_id: z.string(),
+ job_id: z.string(),
+})
+
+/**
+ * Job status retrieved successfully
+ */
+export const zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdAnnotationsCountPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Annotation count retrieved successfully
+ */
+export const zGetAppsByAppIdAnnotationsCountResponse = zAnnotationCountResponse
+
+export const zGetAppsByAppIdAnnotationsExportPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Annotations exported successfully
+ */
+export const zGetAppsByAppIdAnnotationsExportResponse = zAnnotationExportList
+
+export const zDeleteAppsByAppIdAnnotationsByAnnotationIdPath = z.object({
+ annotation_id: z.string(),
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteAppsByAppIdAnnotationsByAnnotationIdResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdAnnotationsByAnnotationIdBody = zUpdateAnnotationPayload
+
+export const zPostAppsByAppIdAnnotationsByAnnotationIdPath = z.object({
+ app_id: z.string(),
+ annotation_id: z.string(),
+})
+
+export const zPostAppsByAppIdAnnotationsByAnnotationIdResponse = z.union([
+ zAnnotation,
+ z.record(z.string(), z.unknown()),
+])
+
+export const zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesPath = z.object({
+ app_id: z.string(),
+ annotation_id: z.string(),
+})
+
+export const zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesQuery = z.object({
+ page: z.int().optional().default(1),
+ limit: z.int().optional().default(20),
+})
+
+/**
+ * Hit histories retrieved successfully
+ */
+export const zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponse
+ = zAnnotationHitHistoryList
+
+export const zPostAppsByAppIdApiEnableBody = zAppApiStatusPayload
+
+export const zPostAppsByAppIdApiEnablePath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * API status updated successfully
+ */
+export const zPostAppsByAppIdApiEnableResponse = zAppDetail
+
+export const zPostAppsByAppIdAudioToTextPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Audio transcription successful
+ */
+export const zPostAppsByAppIdAudioToTextResponse = zAudioTranscriptResponse
+
+export const zGetAppsByAppIdChatConversationsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdChatConversationsQuery = z.object({
+ annotation_status: z.enum(['annotated', 'not_annotated', 'all']).optional().default('all'),
+ end: z.string().nullish(),
+ keyword: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ page: z.int().gte(1).lte(99999).optional().default(1),
+ sort_by: z
+ .enum(['created_at', '-created_at', 'updated_at', '-updated_at'])
+ .optional()
+ .default('-updated_at'),
+ start: z.string().nullish(),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsByAppIdChatConversationsResponse = zConversationWithSummaryPagination
+
+export const zDeleteAppsByAppIdChatConversationsByConversationIdPath = z.object({
+ app_id: z.string(),
+ conversation_id: z.string(),
+})
+
+/**
+ * Conversation deleted successfully
+ */
+export const zDeleteAppsByAppIdChatConversationsByConversationIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdChatConversationsByConversationIdPath = z.object({
+ app_id: z.string(),
+ conversation_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsByAppIdChatConversationsByConversationIdResponse = zConversationDetail
+
+export const zGetAppsByAppIdChatMessagesPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdChatMessagesQuery = z.object({
+ conversation_id: z.string(),
+ first_id: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsByAppIdChatMessagesResponse = zMessageInfiniteScrollPaginationResponse
+
+export const zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsPath = z.object({
+ app_id: z.string(),
+ message_id: z.string(),
+})
+
+/**
+ * Suggested questions retrieved successfully
+ */
+export const zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponse
+ = zSuggestedQuestionsResponse
+
+export const zPostAppsByAppIdChatMessagesByTaskIdStopPath = z.object({
+ app_id: z.string(),
+ task_id: z.string(),
+})
+
+/**
+ * Task stopped successfully
+ */
+export const zPostAppsByAppIdChatMessagesByTaskIdStopResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdCompletionConversationsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdCompletionConversationsQuery = z.object({
+ annotation_status: z.enum(['annotated', 'not_annotated', 'all']).optional().default('all'),
+ end: z.string().nullish(),
+ keyword: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ page: z.int().gte(1).lte(99999).optional().default(1),
+ start: z.string().nullish(),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsByAppIdCompletionConversationsResponse = zConversationPagination
+
+export const zDeleteAppsByAppIdCompletionConversationsByConversationIdPath = z.object({
+ app_id: z.string(),
+ conversation_id: z.string(),
+})
+
+/**
+ * Conversation deleted successfully
+ */
+export const zDeleteAppsByAppIdCompletionConversationsByConversationIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdCompletionConversationsByConversationIdPath = z.object({
+ app_id: z.string(),
+ conversation_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsByAppIdCompletionConversationsByConversationIdResponse
+ = zConversationMessageDetail
+
+export const zPostAppsByAppIdCompletionMessagesBody = zCompletionMessagePayload
+
+export const zPostAppsByAppIdCompletionMessagesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Completion generated successfully
+ */
+export const zPostAppsByAppIdCompletionMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdCompletionMessagesByTaskIdStopPath = z.object({
+ app_id: z.string(),
+ task_id: z.string(),
+})
+
+/**
+ * Task stopped successfully
+ */
+export const zPostAppsByAppIdCompletionMessagesByTaskIdStopResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdConversationVariablesPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdConversationVariablesQuery = z.object({
+ conversation_id: z.string(),
+})
+
+/**
+ * Conversation variables retrieved successfully
+ */
+export const zGetAppsByAppIdConversationVariablesResponse = zPaginatedConversationVariableResponse
+
+export const zPostAppsByAppIdConvertToWorkflowBody = zConvertToWorkflowPayload
+
+export const zPostAppsByAppIdConvertToWorkflowPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Application converted to workflow successfully
+ */
+export const zPostAppsByAppIdConvertToWorkflowResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdCopyBody = zCopyAppPayload
+
+export const zPostAppsByAppIdCopyPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * App copied successfully
+ */
+export const zPostAppsByAppIdCopyResponse = zAppDetailWithSite
+
+export const zGetAppsByAppIdExportPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdExportQuery = z.object({
+ include_secret: z.boolean().optional().default(false),
+ workflow_id: z.string().nullish(),
+})
+
+/**
+ * App exported successfully
+ */
+export const zGetAppsByAppIdExportResponse = zAppExportResponse
+
+export const zPostAppsByAppIdFeedbacksBody = zMessageFeedbackPayload
+
+export const zPostAppsByAppIdFeedbacksPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Feedback updated successfully
+ */
+export const zPostAppsByAppIdFeedbacksResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdFeedbacksExportPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdFeedbacksExportQuery = z.object({
+ end_date: z.string().nullish(),
+ format: z.enum(['csv', 'json']).optional().default('csv'),
+ from_source: z.enum(['user', 'admin']).nullish(),
+ has_comment: z.boolean().nullish(),
+ rating: z.enum(['like', 'dislike']).nullish(),
+ start_date: z.string().nullish(),
+})
+
+/**
+ * Feedback data exported successfully
+ */
+export const zGetAppsByAppIdFeedbacksExportResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdIconBody = zAppIconPayload
+
+export const zPostAppsByAppIdIconPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Icon updated successfully
+ */
+export const zPostAppsByAppIdIconResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdMessagesByMessageIdPath = z.object({
+ app_id: z.string(),
+ message_id: z.string(),
+})
+
+/**
+ * Message retrieved successfully
+ */
+export const zGetAppsByAppIdMessagesByMessageIdResponse = zMessageDetailResponse
+
+export const zPostAppsByAppIdModelConfigBody = zModelConfigRequest
+
+export const zPostAppsByAppIdModelConfigPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Model configuration updated successfully
+ */
+export const zPostAppsByAppIdModelConfigResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdNameBody = zAppNamePayload
+
+export const zPostAppsByAppIdNamePath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Name availability checked
+ */
+export const zPostAppsByAppIdNameResponse = zAppDetail
+
+export const zPostAppsByAppIdPublishToCreatorsPlatformPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostAppsByAppIdPublishToCreatorsPlatformResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdServerPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * MCP server configuration retrieved successfully
+ */
+export const zGetAppsByAppIdServerResponse = zAppMcpServerResponse
+
+export const zPostAppsByAppIdServerBody = zMcpServerCreatePayload
+
+export const zPostAppsByAppIdServerPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * MCP server configuration created successfully
+ */
+export const zPostAppsByAppIdServerResponse = zAppMcpServerResponse
+
+export const zPutAppsByAppIdServerBody = zMcpServerUpdatePayload
+
+export const zPutAppsByAppIdServerPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * MCP server configuration updated successfully
+ */
+export const zPutAppsByAppIdServerResponse = zAppMcpServerResponse
+
+export const zPostAppsByAppIdSiteBody = zAppSiteUpdatePayload
+
+export const zPostAppsByAppIdSitePath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Site configuration updated successfully
+ */
+export const zPostAppsByAppIdSiteResponse = zAppSiteResponse
+
+export const zPostAppsByAppIdSiteEnableBody = zAppSiteStatusPayload
+
+export const zPostAppsByAppIdSiteEnablePath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Site status updated successfully
+ */
+export const zPostAppsByAppIdSiteEnableResponse = zAppDetail
+
+export const zPostAppsByAppIdSiteAccessTokenResetPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Access token reset successfully
+ */
+export const zPostAppsByAppIdSiteAccessTokenResetResponse = zAppSiteResponse
+
+export const zGetAppsByAppIdStatisticsAverageResponseTimePath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdStatisticsAverageResponseTimeQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Average response time statistics retrieved successfully
+ */
+export const zGetAppsByAppIdStatisticsAverageResponseTimeResponse = z.array(
+ z.record(z.string(), z.unknown()),
+)
+
+export const zGetAppsByAppIdStatisticsAverageSessionInteractionsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdStatisticsAverageSessionInteractionsQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Average session interaction statistics retrieved successfully
+ */
+export const zGetAppsByAppIdStatisticsAverageSessionInteractionsResponse = z.array(
+ z.record(z.string(), z.unknown()),
+)
+
+export const zGetAppsByAppIdStatisticsDailyConversationsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdStatisticsDailyConversationsQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Daily conversation statistics retrieved successfully
+ */
+export const zGetAppsByAppIdStatisticsDailyConversationsResponse = z.array(
+ z.record(z.string(), z.unknown()),
+)
+
+export const zGetAppsByAppIdStatisticsDailyEndUsersPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdStatisticsDailyEndUsersQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Daily terminal statistics retrieved successfully
+ */
+export const zGetAppsByAppIdStatisticsDailyEndUsersResponse = z.array(
+ z.record(z.string(), z.unknown()),
+)
+
+export const zGetAppsByAppIdStatisticsDailyMessagesPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdStatisticsDailyMessagesQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Daily message statistics retrieved successfully
+ */
+export const zGetAppsByAppIdStatisticsDailyMessagesResponse = z.array(
+ z.record(z.string(), z.unknown()),
+)
+
+export const zGetAppsByAppIdStatisticsTokenCostsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdStatisticsTokenCostsQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Daily token cost statistics retrieved successfully
+ */
+export const zGetAppsByAppIdStatisticsTokenCostsResponse = z.array(
+ z.record(z.string(), z.unknown()),
+)
+
+export const zGetAppsByAppIdStatisticsTokensPerSecondPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdStatisticsTokensPerSecondQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Tokens per second statistics retrieved successfully
+ */
+export const zGetAppsByAppIdStatisticsTokensPerSecondResponse = z.array(
+ z.record(z.string(), z.unknown()),
+)
+
+export const zGetAppsByAppIdStatisticsUserSatisfactionRatePath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdStatisticsUserSatisfactionRateQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * User satisfaction rate statistics retrieved successfully
+ */
+export const zGetAppsByAppIdStatisticsUserSatisfactionRateResponse = z.array(
+ z.record(z.string(), z.unknown()),
+)
+
+export const zPostAppsByAppIdTextToAudioBody = zTextToSpeechPayload
+
+export const zPostAppsByAppIdTextToAudioPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Text to speech conversion successful
+ */
+export const zPostAppsByAppIdTextToAudioResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdTextToAudioVoicesPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdTextToAudioVoicesQuery = z.object({
+ language: z.string(),
+})
+
+/**
+ * TTS voices retrieved successfully
+ */
+export const zGetAppsByAppIdTextToAudioVoicesResponse = z.array(z.record(z.string(), z.unknown()))
+
+export const zGetAppsByAppIdTracePath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Trace configuration retrieved successfully
+ */
+export const zGetAppsByAppIdTraceResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdTraceBody = zAppTracePayload
+
+export const zPostAppsByAppIdTracePath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Trace configuration updated successfully
+ */
+export const zPostAppsByAppIdTraceResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteAppsByAppIdTraceConfigBody = zTraceProviderQuery
+
+export const zDeleteAppsByAppIdTraceConfigPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Tracing configuration deleted successfully
+ */
+export const zDeleteAppsByAppIdTraceConfigResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdTraceConfigPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdTraceConfigQuery = z.object({
+ tracing_provider: z.string(),
+})
+
+/**
+ * Tracing configuration data
+ */
+export const zGetAppsByAppIdTraceConfigResponse = z.record(z.string(), z.unknown())
+
+export const zPatchAppsByAppIdTraceConfigBody = zTraceConfigPayload
+
+export const zPatchAppsByAppIdTraceConfigPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success response
+ */
+export const zPatchAppsByAppIdTraceConfigResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdTraceConfigBody = zTraceConfigPayload
+
+export const zPostAppsByAppIdTraceConfigPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Created configuration data
+ */
+export const zPostAppsByAppIdTraceConfigResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdTriggerEnableBody = zParserEnable
+
+export const zPostAppsByAppIdTriggerEnablePath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostAppsByAppIdTriggerEnableResponse = zWorkflowTriggerResponse
+
+export const zGetAppsByAppIdTriggersPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsByAppIdTriggersResponse = zWorkflowTriggerListResponse
+
+export const zGetAppsByAppIdWorkflowAppLogsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowAppLogsQuery = z.object({
+ created_at__after: z.iso.datetime().nullish(),
+ created_at__before: z.iso.datetime().nullish(),
+ created_by_account: z.string().nullish(),
+ created_by_end_user_session_id: z.string().nullish(),
+ detail: z.boolean().optional().default(false),
+ keyword: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ page: z.int().gte(1).lte(99999).optional().default(1),
+ status: z.string().nullish(),
+})
+
+/**
+ * Workflow app logs retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowAppLogsResponse = zWorkflowAppLogPaginationResponse
+
+export const zGetAppsByAppIdWorkflowArchivedLogsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowArchivedLogsQuery = z.object({
+ created_at__after: z.iso.datetime().nullish(),
+ created_at__before: z.iso.datetime().nullish(),
+ created_by_account: z.string().nullish(),
+ created_by_end_user_session_id: z.string().nullish(),
+ detail: z.boolean().optional().default(false),
+ keyword: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ page: z.int().gte(1).lte(99999).optional().default(1),
+ status: z.string().nullish(),
+})
+
+/**
+ * Workflow archived logs retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowArchivedLogsResponse = zWorkflowArchivedLogPaginationResponse
+
+export const zGetAppsByAppIdWorkflowRunsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowRunsQuery = z.object({
+ triggered_from: z.enum(['debugging', 'app-run']).nullish(),
+ status: z.enum(['running', 'succeeded', 'failed', 'stopped', 'partial-succeeded']).nullish(),
+ last_id: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+})
+
+/**
+ * Workflow runs retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowRunsResponse = zWorkflowRunPagination
+
+export const zGetAppsByAppIdWorkflowRunsCountPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowRunsCountQuery = z.object({
+ triggered_from: z.enum(['debugging', 'app-run']).nullish(),
+ time_range: z.string().nullish(),
+ status: z.enum(['running', 'succeeded', 'failed', 'stopped', 'partial-succeeded']).nullish(),
+})
+
+/**
+ * Workflow runs count retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowRunsCountResponse = zWorkflowRunCount
+
+export const zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopPath = z.object({
+ app_id: z.string(),
+ task_id: z.string(),
+})
+
+/**
+ * Task stopped successfully
+ */
+export const zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowRunsByRunIdPath = z.object({
+ app_id: z.string(),
+ run_id: z.string(),
+})
+
+/**
+ * Workflow run detail retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowRunsByRunIdResponse = zWorkflowRunDetail
+
+export const zGetAppsByAppIdWorkflowRunsByRunIdExportPath = z.object({
+ app_id: z.string(),
+ run_id: z.string(),
+})
+
+/**
+ * Export URL generated
+ */
+export const zGetAppsByAppIdWorkflowRunsByRunIdExportResponse = zWorkflowRunExport
+
+export const zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsPath = z.object({
+ app_id: z.string(),
+ run_id: z.string(),
+})
+
+/**
+ * Node executions retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponse
+ = zWorkflowRunNodeExecutionList
+
+export const zGetAppsByAppIdWorkflowCommentsPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Comments retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowCommentsResponse = zWorkflowCommentBasic
+
+export const zPostAppsByAppIdWorkflowCommentsBody = zWorkflowCommentCreatePayload
+
+export const zPostAppsByAppIdWorkflowCommentsPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Comment created successfully
+ */
+export const zPostAppsByAppIdWorkflowCommentsResponse = zWorkflowCommentCreate
+
+export const zGetAppsByAppIdWorkflowCommentsMentionUsersPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Mentionable users retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowCommentsMentionUsersResponse
+ = zWorkflowCommentMentionUsersPayload
+
+export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdPath = z.object({
+ app_id: z.string(),
+ comment_id: z.string(),
+})
+
+/**
+ * Comment deleted successfully
+ */
+export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowCommentsByCommentIdPath = z.object({
+ app_id: z.string(),
+ comment_id: z.string(),
+})
+
+/**
+ * Comment retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowCommentsByCommentIdResponse = zWorkflowCommentDetail
+
+export const zPutAppsByAppIdWorkflowCommentsByCommentIdBody = zWorkflowCommentUpdatePayload
+
+export const zPutAppsByAppIdWorkflowCommentsByCommentIdPath = z.object({
+ app_id: z.string(),
+ comment_id: z.string(),
+})
+
+/**
+ * Comment updated successfully
+ */
+export const zPutAppsByAppIdWorkflowCommentsByCommentIdResponse = zWorkflowCommentUpdate
+
+export const zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesBody = zWorkflowCommentReplyPayload
+
+export const zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesPath = z.object({
+ app_id: z.string(),
+ comment_id: z.string(),
+})
+
+/**
+ * Reply created successfully
+ */
+export const zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponse
+ = zWorkflowCommentReplyCreate
+
+export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath = z.object({
+ app_id: z.string(),
+ comment_id: z.string(),
+ reply_id: z.string(),
+})
+
+/**
+ * Reply deleted successfully
+ */
+export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdBody
+ = zWorkflowCommentReplyPayload
+
+export const zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath = z.object({
+ app_id: z.string(),
+ comment_id: z.string(),
+ reply_id: z.string(),
+})
+
+/**
+ * Reply updated successfully
+ */
+export const zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse
+ = zWorkflowCommentReplyUpdate
+
+export const zPostAppsByAppIdWorkflowCommentsByCommentIdResolvePath = z.object({
+ app_id: z.string(),
+ comment_id: z.string(),
+})
+
+/**
+ * Comment resolved successfully
+ */
+export const zPostAppsByAppIdWorkflowCommentsByCommentIdResolveResponse = zWorkflowCommentResolve
+
+export const zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Average app interaction statistics retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowStatisticsDailyConversationsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowStatisticsDailyConversationsQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Daily runs statistics retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowStatisticsDailyConversationsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowStatisticsDailyTerminalsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowStatisticsDailyTerminalsQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Daily terminals statistics retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowStatisticsDailyTerminalsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowStatisticsTokenCostsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowStatisticsTokenCostsQuery = z.object({
+ end: z.string().nullish(),
+ start: z.string().nullish(),
+})
+
+/**
+ * Daily token cost statistics retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowStatisticsTokenCostsResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdWorkflowsPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowsQuery = z.object({
+ limit: z.int().gte(1).lte(100).optional().default(10),
+ named_only: z.boolean().optional().default(false),
+ page: z.int().gte(1).lte(99999).optional().default(1),
+ user_id: z.string().nullish(),
+})
+
+/**
+ * Published workflows retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsResponse = zWorkflowPagination
+
+export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Default block configurations retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypePath = z.object({
+ app_id: z.string(),
+ block_type: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeQuery = z.object({
+ q: z.string().nullish(),
+})
+
+/**
+ * Default block configuration retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowsDraftPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Draft workflow retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDraftResponse = zWorkflow
+
+export const zPostAppsByAppIdWorkflowsDraftBody = zSyncDraftWorkflowPayload
+
+export const zPostAppsByAppIdWorkflowsDraftPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Draft workflow synced successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftResponse = zSyncDraftWorkflowResponse
+
+export const zGetAppsByAppIdWorkflowsDraftConversationVariablesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Conversation variables retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDraftConversationVariablesResponse = zWorkflowDraftVariableList
+
+export const zPostAppsByAppIdWorkflowsDraftConversationVariablesBody
+ = zConversationVariableUpdatePayload
+
+export const zPostAppsByAppIdWorkflowsDraftConversationVariablesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Conversation variables updated successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftConversationVariablesResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Environment variables retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesBody
+ = zEnvironmentVariableUpdatePayload
+
+export const zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Environment variables updated successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostAppsByAppIdWorkflowsDraftFeaturesBody = zWorkflowFeaturesPayload
+
+export const zPostAppsByAppIdWorkflowsDraftFeaturesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Workflow features updated successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftFeaturesResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestBody
+ = zHumanInputDeliveryTestPayload
+
+export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody
+ = zHumanInputFormPreviewPayload
+
+export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunBody
+ = zHumanInputFormSubmitPayload
+
+export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunBody = zIterationNodeRunPayload
+
+export const zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Workflow iteration node run started successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunBody = zLoopNodeRunPayload
+
+export const zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Workflow loop node run started successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Node last run retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponse = zWorkflowRunNodeExecution
+
+export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunBody = zDraftWorkflowNodeRunPayload
+
+export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Node run started successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponse = zWorkflowRunNodeExecution
+
+export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Trigger event received and node executed successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({
+ node_id: z.string(),
+ app_id: z.string(),
+})
+
+/**
+ * Node variables deleted successfully
+ */
+export const zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({
+ app_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Node variables retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse
+ = zWorkflowDraftVariableList
+
+export const zPostAppsByAppIdWorkflowsDraftRunBody = zDraftWorkflowRunPayload
+
+export const zPostAppsByAppIdWorkflowsDraftRunPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Draft workflow run started successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftRunResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdWorkflowsDraftSystemVariablesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * System variables retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDraftSystemVariablesResponse = zWorkflowDraftVariableList
+
+export const zPostAppsByAppIdWorkflowsDraftTriggerRunBody = zDraftWorkflowTriggerRunRequest
+
+export const zPostAppsByAppIdWorkflowsDraftTriggerRunPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Trigger event received and workflow executed successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftTriggerRunResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsByAppIdWorkflowsDraftTriggerRunAllBody = zDraftWorkflowTriggerRunAllPayload
+
+export const zPostAppsByAppIdWorkflowsDraftTriggerRunAllPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Workflow executed successfully
+ */
+export const zPostAppsByAppIdWorkflowsDraftTriggerRunAllResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteAppsByAppIdWorkflowsDraftVariablesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Workflow variables deleted successfully
+ */
+export const zDeleteAppsByAppIdWorkflowsDraftVariablesResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdWorkflowsDraftVariablesPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowsDraftVariablesQuery = z.object({
+ page: z.int().gte(1).lte(100000).optional().default(1),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+})
+
+/**
+ * Workflow variables retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDraftVariablesResponse = zWorkflowDraftVariableListWithoutValue
+
+export const zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdPath = z.object({
+ app_id: z.string(),
+ variable_id: z.string(),
+})
+
+/**
+ * Variable deleted successfully
+ */
+export const zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdPath = z.object({
+ app_id: z.string(),
+ variable_id: z.string(),
+})
+
+/**
+ * Variable retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse = zWorkflowDraftVariable
+
+export const zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdBody
+ = zWorkflowDraftVariableUpdatePayload
+
+export const zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdPath = z.object({
+ app_id: z.string(),
+ variable_id: z.string(),
+})
+
+/**
+ * Variable updated successfully
+ */
+export const zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse = zWorkflowDraftVariable
+
+export const zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetPath = z.object({
+ app_id: z.string(),
+ variable_id: z.string(),
+})
+
+export const zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse = z.union([
+ zWorkflowDraftVariable,
+ z.record(z.string(), z.unknown()),
+])
+
+export const zGetAppsByAppIdWorkflowsPublishPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Published workflow retrieved successfully
+ */
+export const zGetAppsByAppIdWorkflowsPublishResponse = zWorkflow
+
+export const zPostAppsByAppIdWorkflowsPublishBody = zPublishWorkflowPayload
+
+export const zPostAppsByAppIdWorkflowsPublishPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostAppsByAppIdWorkflowsPublishResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByAppIdWorkflowsTriggersWebhookPath = z.object({
+ app_id: z.string(),
+})
+
+export const zGetAppsByAppIdWorkflowsTriggersWebhookQuery = z.object({
+ credential_id: z.string().nullish(),
+ datasource_type: z.string(),
+ inputs: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetAppsByAppIdWorkflowsTriggersWebhookResponse = zWebhookTriggerResponse
+
+export const zDeleteAppsByAppIdWorkflowsByWorkflowIdPath = z.object({
+ workflow_id: z.string(),
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteAppsByAppIdWorkflowsByWorkflowIdResponse = z.record(z.string(), z.unknown())
+
+export const zPatchAppsByAppIdWorkflowsByWorkflowIdBody = zWorkflowUpdatePayload
+
+export const zPatchAppsByAppIdWorkflowsByWorkflowIdPath = z.object({
+ app_id: z.string(),
+ workflow_id: z.string(),
+})
+
+/**
+ * Workflow updated successfully
+ */
+export const zPatchAppsByAppIdWorkflowsByWorkflowIdResponse = zWorkflow
+
+export const zPostAppsByAppIdWorkflowsByWorkflowIdRestorePath = z.object({
+ app_id: z.string(),
+ workflow_id: z.string(),
+})
+
+/**
+ * Workflow restored successfully
+ */
+export const zPostAppsByAppIdWorkflowsByWorkflowIdRestoreResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetAppsByResourceIdApiKeysPath = z.object({
+ resource_id: z.string(),
+})
+
+/**
+ * API keys retrieved successfully
+ */
+export const zGetAppsByResourceIdApiKeysResponse = zApiKeyList
+
+export const zPostAppsByResourceIdApiKeysPath = z.object({
+ resource_id: z.string(),
+})
+
+/**
+ * API key created successfully
+ */
+export const zPostAppsByResourceIdApiKeysResponse = zApiKeyItem
+
+export const zDeleteAppsByResourceIdApiKeysByApiKeyIdPath = z.object({
+ resource_id: z.string(),
+ api_key_id: z.string(),
+})
+
+/**
+ * API key deleted successfully
+ */
+export const zDeleteAppsByResourceIdApiKeysByApiKeyIdResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsByServerIdServerRefreshPath = z.object({
+ server_id: z.string(),
+})
+
+/**
+ * MCP server refreshed successfully
+ */
+export const zGetAppsByServerIdServerRefreshResponse = zAppMcpServerResponse
diff --git a/packages/contracts/generated/api/console/auth/orpc.gen.ts b/packages/contracts/generated/api/console/auth/orpc.gen.ts
new file mode 100644
index 00000000000..7a95a96f106
--- /dev/null
+++ b/packages/contracts/generated/api/console/auth/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/auth/types.gen.ts b/packages/contracts/generated/api/console/auth/types.gen.ts
new file mode 100644
index 00000000000..1a974f626bb
--- /dev/null
+++ b/packages/contracts/generated/api/console/auth/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/auth/zod.gen.ts b/packages/contracts/generated/api/console/auth/zod.gen.ts
new file mode 100644
index 00000000000..3d183e09cd2
--- /dev/null
+++ b/packages/contracts/generated/api/console/auth/zod.gen.ts
@@ -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(),
+)
diff --git a/packages/contracts/generated/api/console/billing/orpc.gen.ts b/packages/contracts/generated/api/console/billing/orpc.gen.ts
new file mode 100644
index 00000000000..09d25c072e6
--- /dev/null
+++ b/packages/contracts/generated/api/console/billing/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/billing/types.gen.ts b/packages/contracts/generated/api/console/billing/types.gen.ts
new file mode 100644
index 00000000000..7a9880c03e2
--- /dev/null
+++ b/packages/contracts/generated/api/console/billing/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/billing/zod.gen.ts b/packages/contracts/generated/api/console/billing/zod.gen.ts
new file mode 100644
index 00000000000..7b5412c7f4e
--- /dev/null
+++ b/packages/contracts/generated/api/console/billing/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/code-based-extension/orpc.gen.ts b/packages/contracts/generated/api/console/code-based-extension/orpc.gen.ts
new file mode 100644
index 00000000000..b3baddafd4e
--- /dev/null
+++ b/packages/contracts/generated/api/console/code-based-extension/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/code-based-extension/types.gen.ts b/packages/contracts/generated/api/console/code-based-extension/types.gen.ts
new file mode 100644
index 00000000000..85d224f8d1f
--- /dev/null
+++ b/packages/contracts/generated/api/console/code-based-extension/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/code-based-extension/zod.gen.ts b/packages/contracts/generated/api/console/code-based-extension/zod.gen.ts
new file mode 100644
index 00000000000..3cd520cb97d
--- /dev/null
+++ b/packages/contracts/generated/api/console/code-based-extension/zod.gen.ts
@@ -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
diff --git a/packages/contracts/generated/api/console/compliance/orpc.gen.ts b/packages/contracts/generated/api/console/compliance/orpc.gen.ts
new file mode 100644
index 00000000000..e68c87e7eba
--- /dev/null
+++ b/packages/contracts/generated/api/console/compliance/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/compliance/types.gen.ts b/packages/contracts/generated/api/console/compliance/types.gen.ts
new file mode 100644
index 00000000000..12ab2a82a8a
--- /dev/null
+++ b/packages/contracts/generated/api/console/compliance/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/compliance/zod.gen.ts b/packages/contracts/generated/api/console/compliance/zod.gen.ts
new file mode 100644
index 00000000000..2d42e75fbcf
--- /dev/null
+++ b/packages/contracts/generated/api/console/compliance/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/data-source/orpc.gen.ts b/packages/contracts/generated/api/console/data-source/orpc.gen.ts
new file mode 100644
index 00000000000..209447236a1
--- /dev/null
+++ b/packages/contracts/generated/api/console/data-source/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/data-source/types.gen.ts b/packages/contracts/generated/api/console/data-source/types.gen.ts
new file mode 100644
index 00000000000..db83d81ec1b
--- /dev/null
+++ b/packages/contracts/generated/api/console/data-source/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/data-source/zod.gen.ts b/packages/contracts/generated/api/console/data-source/zod.gen.ts
new file mode 100644
index 00000000000..1684b7e637c
--- /dev/null
+++ b/packages/contracts/generated/api/console/data-source/zod.gen.ts
@@ -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(),
+)
diff --git a/packages/contracts/generated/api/console/datasets/orpc.gen.ts b/packages/contracts/generated/api/console/datasets/orpc.gen.ts
new file mode 100644
index 00000000000..37a0b7cb8cf
--- /dev/null
+++ b/packages/contracts/generated/api/console/datasets/orpc.gen.ts
@@ -0,0 +1,1786 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zDeleteDatasetsApiKeysByApiKeyIdPath,
+ zDeleteDatasetsApiKeysByApiKeyIdResponse,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdPath,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse,
+ zDeleteDatasetsByDatasetIdDocumentsPath,
+ zDeleteDatasetsByDatasetIdDocumentsResponse,
+ zDeleteDatasetsByDatasetIdMetadataByMetadataIdPath,
+ zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse,
+ zDeleteDatasetsByDatasetIdPath,
+ zDeleteDatasetsByDatasetIdResponse,
+ zDeleteDatasetsByResourceIdApiKeysByApiKeyIdPath,
+ zDeleteDatasetsByResourceIdApiKeysByApiKeyIdResponse,
+ zDeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath,
+ zDeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse,
+ zGetDatasetsApiBaseInfoResponse,
+ zGetDatasetsApiKeysResponse,
+ zGetDatasetsBatchImportStatusByJobIdPath,
+ zGetDatasetsBatchImportStatusByJobIdResponse,
+ zGetDatasetsByDatasetIdAutoDisableLogsPath,
+ zGetDatasetsByDatasetIdAutoDisableLogsResponse,
+ zGetDatasetsByDatasetIdBatchByBatchIndexingEstimatePath,
+ zGetDatasetsByDatasetIdBatchByBatchIndexingEstimateResponse,
+ zGetDatasetsByDatasetIdBatchByBatchIndexingStatusPath,
+ zGetDatasetsByDatasetIdBatchByBatchIndexingStatusResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimatePath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdQuery,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncResponse,
+ zGetDatasetsByDatasetIdDocumentsPath,
+ zGetDatasetsByDatasetIdDocumentsQuery,
+ zGetDatasetsByDatasetIdDocumentsResponse,
+ zGetDatasetsByDatasetIdErrorDocsPath,
+ zGetDatasetsByDatasetIdErrorDocsResponse,
+ zGetDatasetsByDatasetIdIndexingStatusPath,
+ zGetDatasetsByDatasetIdIndexingStatusResponse,
+ zGetDatasetsByDatasetIdMetadataPath,
+ zGetDatasetsByDatasetIdMetadataResponse,
+ zGetDatasetsByDatasetIdNotionSyncPath,
+ zGetDatasetsByDatasetIdNotionSyncResponse,
+ zGetDatasetsByDatasetIdPath,
+ zGetDatasetsByDatasetIdPermissionPartUsersPath,
+ zGetDatasetsByDatasetIdPermissionPartUsersResponse,
+ zGetDatasetsByDatasetIdQueriesPath,
+ zGetDatasetsByDatasetIdQueriesResponse,
+ zGetDatasetsByDatasetIdRelatedAppsPath,
+ zGetDatasetsByDatasetIdRelatedAppsResponse,
+ zGetDatasetsByDatasetIdResponse,
+ zGetDatasetsByDatasetIdUseCheckPath,
+ zGetDatasetsByDatasetIdUseCheckResponse,
+ zGetDatasetsByResourceIdApiKeysPath,
+ zGetDatasetsByResourceIdApiKeysResponse,
+ zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath,
+ zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse,
+ zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckPath,
+ zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckResponse,
+ zGetDatasetsExternalKnowledgeApiQuery,
+ zGetDatasetsExternalKnowledgeApiResponse,
+ zGetDatasetsMetadataBuiltInResponse,
+ zGetDatasetsNotionIndexingEstimateResponse,
+ zGetDatasetsProcessRuleQuery,
+ zGetDatasetsProcessRuleResponse,
+ zGetDatasetsQuery,
+ zGetDatasetsResponse,
+ zGetDatasetsRetrievalSettingByVectorTypePath,
+ zGetDatasetsRetrievalSettingByVectorTypeResponse,
+ zGetDatasetsRetrievalSettingResponse,
+ zPatchDatasetsByDatasetIdBody,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionPath,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionResponse,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPausePath,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponse,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumePath,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponse,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionPath,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionResponse,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdBody,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdBody,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse,
+ zPatchDatasetsByDatasetIdDocumentsStatusByActionBatchPath,
+ zPatchDatasetsByDatasetIdDocumentsStatusByActionBatchResponse,
+ zPatchDatasetsByDatasetIdMetadataByMetadataIdBody,
+ zPatchDatasetsByDatasetIdMetadataByMetadataIdPath,
+ zPatchDatasetsByDatasetIdMetadataByMetadataIdResponse,
+ zPatchDatasetsByDatasetIdPath,
+ zPatchDatasetsByDatasetIdResponse,
+ zPatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdBody,
+ zPatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath,
+ zPatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse,
+ zPostDatasetsApiKeysResponse,
+ zPostDatasetsBatchImportStatusByJobIdBody,
+ zPostDatasetsBatchImportStatusByJobIdPath,
+ zPostDatasetsBatchImportStatusByJobIdResponse,
+ zPostDatasetsBody,
+ zPostDatasetsByDatasetIdApiKeysByStatusPath,
+ zPostDatasetsByDatasetIdApiKeysByStatusResponse,
+ zPostDatasetsByDatasetIdDocumentsBody,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdRenameBody,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdRenamePath,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdRenameResponse,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentBody,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentPath,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentResponse,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportBody,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportPath,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponse,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksBody,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse,
+ zPostDatasetsByDatasetIdDocumentsDownloadZipBody,
+ zPostDatasetsByDatasetIdDocumentsDownloadZipPath,
+ zPostDatasetsByDatasetIdDocumentsDownloadZipResponse,
+ zPostDatasetsByDatasetIdDocumentsGenerateSummaryBody,
+ zPostDatasetsByDatasetIdDocumentsGenerateSummaryPath,
+ zPostDatasetsByDatasetIdDocumentsGenerateSummaryResponse,
+ zPostDatasetsByDatasetIdDocumentsMetadataBody,
+ zPostDatasetsByDatasetIdDocumentsMetadataPath,
+ zPostDatasetsByDatasetIdDocumentsMetadataResponse,
+ zPostDatasetsByDatasetIdDocumentsPath,
+ zPostDatasetsByDatasetIdDocumentsResponse,
+ zPostDatasetsByDatasetIdExternalHitTestingBody,
+ zPostDatasetsByDatasetIdExternalHitTestingPath,
+ zPostDatasetsByDatasetIdExternalHitTestingResponse,
+ zPostDatasetsByDatasetIdHitTestingBody,
+ zPostDatasetsByDatasetIdHitTestingPath,
+ zPostDatasetsByDatasetIdHitTestingResponse,
+ zPostDatasetsByDatasetIdMetadataBody,
+ zPostDatasetsByDatasetIdMetadataBuiltInByActionPath,
+ zPostDatasetsByDatasetIdMetadataBuiltInByActionResponse,
+ zPostDatasetsByDatasetIdMetadataPath,
+ zPostDatasetsByDatasetIdMetadataResponse,
+ zPostDatasetsByDatasetIdRetryBody,
+ zPostDatasetsByDatasetIdRetryPath,
+ zPostDatasetsByDatasetIdRetryResponse,
+ zPostDatasetsByResourceIdApiKeysPath,
+ zPostDatasetsByResourceIdApiKeysResponse,
+ zPostDatasetsExternalBody,
+ zPostDatasetsExternalKnowledgeApiBody,
+ zPostDatasetsExternalKnowledgeApiResponse,
+ zPostDatasetsExternalResponse,
+ zPostDatasetsIndexingEstimateBody,
+ zPostDatasetsIndexingEstimateResponse,
+ zPostDatasetsInitBody,
+ zPostDatasetsInitResponse,
+ zPostDatasetsNotionIndexingEstimateBody,
+ zPostDatasetsNotionIndexingEstimateResponse,
+ zPostDatasetsResponse,
+ zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataBody,
+ zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataPath,
+ zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataResponse,
+} from './zod.gen'
+
+/**
+ * Get dataset API base information
+ */
+export const get = oc
+ .route({
+ description: 'Get dataset API base information',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsApiBaseInfo',
+ path: '/datasets/api-base-info',
+ tags: ['console'],
+ })
+ .output(zGetDatasetsApiBaseInfoResponse)
+
+export const apiBaseInfo = {
+ get,
+}
+
+/**
+ * Delete dataset API key
+ */
+export const delete_ = oc
+ .route({
+ description: 'Delete dataset API key',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsApiKeysByApiKeyId',
+ path: '/datasets/api-keys/{api_key_id}',
+ successStatus: 204,
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteDatasetsApiKeysByApiKeyIdPath }))
+ .output(zDeleteDatasetsApiKeysByApiKeyIdResponse)
+
+export const byApiKeyId = {
+ delete: delete_,
+}
+
+/**
+ * Get dataset API keys
+ */
+export const get2 = oc
+ .route({
+ description: 'Get dataset API keys',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsApiKeys',
+ path: '/datasets/api-keys',
+ tags: ['console'],
+ })
+ .output(zGetDatasetsApiKeysResponse)
+
+export const post = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsApiKeys',
+ path: '/datasets/api-keys',
+ tags: ['console'],
+ })
+ .output(zPostDatasetsApiKeysResponse)
+
+export const apiKeys = {
+ get: get2,
+ post,
+ byApiKeyId,
+}
+
+export const get3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsBatchImportStatusByJobId',
+ path: '/datasets/batch_import_status/{job_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsBatchImportStatusByJobIdPath }))
+ .output(zGetDatasetsBatchImportStatusByJobIdResponse)
+
+export const post2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsBatchImportStatusByJobId',
+ path: '/datasets/batch_import_status/{job_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsBatchImportStatusByJobIdBody,
+ params: zPostDatasetsBatchImportStatusByJobIdPath,
+ }),
+ )
+ .output(zPostDatasetsBatchImportStatusByJobIdResponse)
+
+export const byJobId = {
+ get: get3,
+ post: post2,
+}
+
+export const batchImportStatus = {
+ byJobId,
+}
+
+/**
+ * Create external knowledge dataset
+ */
+export const post3 = oc
+ .route({
+ description: 'Create external knowledge dataset',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsExternal',
+ path: '/datasets/external',
+ successStatus: 201,
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostDatasetsExternalBody }))
+ .output(zPostDatasetsExternalResponse)
+
+export const external = {
+ post: post3,
+}
+
+/**
+ * Check if external knowledge API is being used
+ */
+export const get4 = oc
+ .route({
+ description: 'Check if external knowledge API is being used',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheck',
+ path: '/datasets/external-knowledge-api/{external_knowledge_api_id}/use-check',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckPath }))
+ .output(zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckResponse)
+
+export const useCheck = {
+ get: get4,
+}
+
+export const delete2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiId',
+ path: '/datasets/external-knowledge-api/{external_knowledge_api_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath }))
+ .output(zDeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse)
+
+/**
+ * Get external knowledge API template details
+ */
+export const get5 = oc
+ .route({
+ description: 'Get external knowledge API template details',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsExternalKnowledgeApiByExternalKnowledgeApiId',
+ path: '/datasets/external-knowledge-api/{external_knowledge_api_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath }))
+ .output(zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse)
+
+export const patch = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsExternalKnowledgeApiByExternalKnowledgeApiId',
+ path: '/datasets/external-knowledge-api/{external_knowledge_api_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdBody,
+ params: zPatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath,
+ }),
+ )
+ .output(zPatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse)
+
+export const byExternalKnowledgeApiId = {
+ delete: delete2,
+ get: get5,
+ patch,
+ useCheck,
+}
+
+/**
+ * Get external knowledge API templates
+ */
+export const get6 = oc
+ .route({
+ description: 'Get external knowledge API templates',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsExternalKnowledgeApi',
+ path: '/datasets/external-knowledge-api',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetDatasetsExternalKnowledgeApiQuery.optional() }))
+ .output(zGetDatasetsExternalKnowledgeApiResponse)
+
+export const post4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsExternalKnowledgeApi',
+ path: '/datasets/external-knowledge-api',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostDatasetsExternalKnowledgeApiBody }))
+ .output(zPostDatasetsExternalKnowledgeApiResponse)
+
+export const externalKnowledgeApi = {
+ get: get6,
+ post: post4,
+ byExternalKnowledgeApiId,
+}
+
+/**
+ * Estimate dataset indexing cost
+ */
+export const post5 = oc
+ .route({
+ description: 'Estimate dataset indexing cost',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsIndexingEstimate',
+ path: '/datasets/indexing-estimate',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostDatasetsIndexingEstimateBody }))
+ .output(zPostDatasetsIndexingEstimateResponse)
+
+export const indexingEstimate = {
+ post: post5,
+}
+
+/**
+ * Initialize dataset with documents
+ */
+export const post6 = oc
+ .route({
+ description: 'Initialize dataset with documents',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsInit',
+ path: '/datasets/init',
+ successStatus: 201,
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostDatasetsInitBody }))
+ .output(zPostDatasetsInitResponse)
+
+export const init = {
+ post: post6,
+}
+
+export const get7 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsMetadataBuiltIn',
+ path: '/datasets/metadata/built-in',
+ tags: ['console'],
+ })
+ .output(zGetDatasetsMetadataBuiltInResponse)
+
+export const builtIn = {
+ get: get7,
+}
+
+export const metadata = {
+ builtIn,
+}
+
+export const get8 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsNotionIndexingEstimate',
+ path: '/datasets/notion-indexing-estimate',
+ tags: ['console'],
+ })
+ .output(zGetDatasetsNotionIndexingEstimateResponse)
+
+export const post7 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsNotionIndexingEstimate',
+ path: '/datasets/notion-indexing-estimate',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostDatasetsNotionIndexingEstimateBody }))
+ .output(zPostDatasetsNotionIndexingEstimateResponse)
+
+export const notionIndexingEstimate = {
+ get: get8,
+ post: post7,
+}
+
+/**
+ * Get dataset document processing rules
+ */
+export const get9 = oc
+ .route({
+ description: 'Get dataset document processing rules',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsProcessRule',
+ path: '/datasets/process-rule',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetDatasetsProcessRuleQuery.optional() }))
+ .output(zGetDatasetsProcessRuleResponse)
+
+export const processRule = {
+ get: get9,
+}
+
+/**
+ * Get mock dataset retrieval settings by vector type
+ */
+export const get10 = oc
+ .route({
+ description: 'Get mock dataset retrieval settings by vector type',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsRetrievalSettingByVectorType',
+ path: '/datasets/retrieval-setting/{vector_type}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsRetrievalSettingByVectorTypePath }))
+ .output(zGetDatasetsRetrievalSettingByVectorTypeResponse)
+
+export const byVectorType = {
+ get: get10,
+}
+
+/**
+ * Get dataset retrieval settings
+ */
+export const get11 = oc
+ .route({
+ description: 'Get dataset retrieval settings',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsRetrievalSetting',
+ path: '/datasets/retrieval-setting',
+ tags: ['console'],
+ })
+ .output(zGetDatasetsRetrievalSettingResponse)
+
+export const retrievalSetting = {
+ get: get11,
+ byVectorType,
+}
+
+export const post8 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdApiKeysByStatus',
+ path: '/datasets/{dataset_id}/api-keys/{status}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostDatasetsByDatasetIdApiKeysByStatusPath }))
+ .output(zPostDatasetsByDatasetIdApiKeysByStatusResponse)
+
+export const byStatus = {
+ post: post8,
+}
+
+export const apiKeys2 = {
+ byStatus,
+}
+
+/**
+ * Get dataset auto disable logs
+ */
+export const get12 = oc
+ .route({
+ description: 'Get dataset auto disable logs',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdAutoDisableLogs',
+ path: '/datasets/{dataset_id}/auto-disable-logs',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdAutoDisableLogsPath }))
+ .output(zGetDatasetsByDatasetIdAutoDisableLogsResponse)
+
+export const autoDisableLogs = {
+ get: get12,
+}
+
+export const get13 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdBatchByBatchIndexingEstimate',
+ path: '/datasets/{dataset_id}/batch/{batch}/indexing-estimate',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdBatchByBatchIndexingEstimatePath }))
+ .output(zGetDatasetsByDatasetIdBatchByBatchIndexingEstimateResponse)
+
+export const indexingEstimate2 = {
+ get: get13,
+}
+
+export const get14 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdBatchByBatchIndexingStatus',
+ path: '/datasets/{dataset_id}/batch/{batch}/indexing-status',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdBatchByBatchIndexingStatusPath }))
+ .output(zGetDatasetsByDatasetIdBatchByBatchIndexingStatusResponse)
+
+export const indexingStatus = {
+ get: get14,
+}
+
+export const byBatch = {
+ indexingEstimate: indexingEstimate2,
+ indexingStatus,
+}
+
+export const batch = {
+ byBatch,
+}
+
+/**
+ * Stream a ZIP archive containing the requested uploaded documents
+ *
+ * Download selected dataset documents as a single ZIP archive (upload-file only)
+ */
+export const post9 = oc
+ .route({
+ description: 'Download selected dataset documents as a single ZIP archive (upload-file only)',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsDownloadZip',
+ path: '/datasets/{dataset_id}/documents/download-zip',
+ summary: 'Stream a ZIP archive containing the requested uploaded documents',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsDownloadZipBody,
+ params: zPostDatasetsByDatasetIdDocumentsDownloadZipPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsDownloadZipResponse)
+
+export const downloadZip = {
+ post: post9,
+}
+
+/**
+ * Generate summary index for specified documents
+ *
+ * Generate summary index for documents
+ * This endpoint checks if the dataset configuration supports summary generation
+ * (indexing_technique must be 'high_quality' and summary_index_setting.enable must be true),
+ * then asynchronously generates summary indexes for the provided documents.
+ */
+export const post10 = oc
+ .route({
+ description:
+ 'Generate summary index for documents\nThis endpoint checks if the dataset configuration supports summary generation\n(indexing_technique must be \'high_quality\' and summary_index_setting.enable must be true),\nthen asynchronously generates summary indexes for the provided documents.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsGenerateSummary',
+ path: '/datasets/{dataset_id}/documents/generate-summary',
+ summary: 'Generate summary index for specified documents',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsGenerateSummaryBody,
+ params: zPostDatasetsByDatasetIdDocumentsGenerateSummaryPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsGenerateSummaryResponse)
+
+export const generateSummary = {
+ post: post10,
+}
+
+export const post11 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsMetadata',
+ path: '/datasets/{dataset_id}/documents/metadata',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsMetadataBody,
+ params: zPostDatasetsByDatasetIdDocumentsMetadataPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsMetadataResponse)
+
+export const metadata2 = {
+ post: post11,
+}
+
+export const patch2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdDocumentsStatusByActionBatch',
+ path: '/datasets/{dataset_id}/documents/status/{action}/batch',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPatchDatasetsByDatasetIdDocumentsStatusByActionBatchPath }))
+ .output(zPatchDatasetsByDatasetIdDocumentsStatusByActionBatchResponse)
+
+export const batch2 = {
+ patch: patch2,
+}
+
+export const byAction = {
+ batch: batch2,
+}
+
+export const status = {
+ byAction,
+}
+
+/**
+ * Get a signed download URL for a dataset document's original uploaded file
+ */
+export const get15 = oc
+ .route({
+ description: 'Get a signed download URL for a dataset document\'s original uploaded file',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdDownload',
+ path: '/datasets/{dataset_id}/documents/{document_id}/download',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponse)
+
+export const download = {
+ get: get15,
+}
+
+/**
+ * Estimate document indexing cost
+ */
+export const get16 = oc
+ .route({
+ description: 'Estimate document indexing cost',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimate',
+ path: '/datasets/{dataset_id}/documents/{document_id}/indexing-estimate',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimatePath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateResponse)
+
+export const indexingEstimate3 = {
+ get: get16,
+}
+
+/**
+ * Get document indexing status
+ */
+export const get17 = oc
+ .route({
+ description: 'Get document indexing status',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatus',
+ path: '/datasets/{dataset_id}/documents/{document_id}/indexing-status',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusResponse)
+
+export const indexingStatus2 = {
+ get: get17,
+}
+
+/**
+ * Update document metadata
+ */
+export const put = oc
+ .route({
+ description: 'Update document metadata',
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putDatasetsByDatasetIdDocumentsByDocumentIdMetadata',
+ path: '/datasets/{dataset_id}/documents/{document_id}/metadata',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataBody,
+ params: zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataPath,
+ }),
+ )
+ .output(zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataResponse)
+
+export const metadata3 = {
+ put,
+}
+
+export const get18 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdNotionSync',
+ path: '/datasets/{dataset_id}/documents/{document_id}/notion/sync',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncResponse)
+
+export const sync = {
+ get: get18,
+}
+
+export const notion = {
+ sync,
+}
+
+export const get19 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLog',
+ path: '/datasets/{dataset_id}/documents/{document_id}/pipeline-execution-log',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogResponse)
+
+export const pipelineExecutionLog = {
+ get: get19,
+}
+
+/**
+ * pause document
+ */
+export const patch3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPause',
+ path: '/datasets/{dataset_id}/documents/{document_id}/processing/pause',
+ summary: 'pause document',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPausePath }))
+ .output(zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponse)
+
+export const pause = {
+ patch: patch3,
+}
+
+/**
+ * recover document
+ */
+export const patch4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResume',
+ path: '/datasets/{dataset_id}/documents/{document_id}/processing/resume',
+ summary: 'recover document',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumePath }))
+ .output(zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponse)
+
+export const resume = {
+ patch: patch4,
+}
+
+/**
+ * Update document processing status (pause/resume)
+ */
+export const patch5 = oc
+ .route({
+ description: 'Update document processing status (pause/resume)',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByAction',
+ path: '/datasets/{dataset_id}/documents/{document_id}/processing/{action}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionPath }))
+ .output(zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionResponse)
+
+export const byAction2 = {
+ patch: patch5,
+}
+
+export const processing = {
+ pause,
+ resume,
+ byAction: byAction2,
+}
+
+export const post12 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdRename',
+ path: '/datasets/{dataset_id}/documents/{document_id}/rename',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsByDocumentIdRenameBody,
+ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdRenamePath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdRenameResponse)
+
+export const rename = {
+ post: post12,
+}
+
+export const patch6 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByAction',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segment/{action}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionPath }))
+ .output(zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionResponse)
+
+export const byAction3 = {
+ patch: patch6,
+}
+
+export const post13 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdSegment',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segment',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentBody,
+ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentResponse)
+
+export const segment = {
+ post: post13,
+ byAction: byAction3,
+}
+
+export const get20 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImport',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/batch_import',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponse)
+
+export const post14 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImport',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/batch_import',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportBody,
+ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponse)
+
+export const batchImport = {
+ get: get20,
+ post: post14,
+}
+
+export const delete3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId:
+ 'deleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkId',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params:
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath,
+ }),
+ )
+ .output(
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse,
+ )
+
+export const patch7 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId:
+ 'patchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkId',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdBody,
+ params:
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath,
+ }),
+ )
+ .output(
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse,
+ )
+
+export const byChildChunkId = {
+ delete: delete3,
+ patch: patch7,
+}
+
+export const get21 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunks',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ }),
+ )
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse)
+
+export const patch8 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunks',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ }),
+ )
+ .output(zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse)
+
+export const post15 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunks',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksBody,
+ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse)
+
+export const childChunks = {
+ get: get21,
+ patch: patch8,
+ post: post15,
+ byChildChunkId,
+}
+
+export const delete4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath }),
+ )
+ .output(zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse)
+
+export const patch9 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdBody,
+ params: zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath,
+ }),
+ )
+ .output(zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse)
+
+export const bySegmentId = {
+ delete: delete4,
+ patch: patch9,
+ childChunks,
+}
+
+export const delete5 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetIdDocumentsByDocumentIdSegments',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath }))
+ .output(zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse)
+
+export const get22 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdSegments',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse)
+
+export const segments = {
+ delete: delete5,
+ get: get22,
+ batchImport,
+ bySegmentId,
+}
+
+/**
+ * Get summary index generation status for a document
+ *
+ * Get summary index generation status for a document
+ * Returns:
+ * - total_segments: Total number of segments in the document
+ * - summary_status: Dictionary with status counts
+ * - completed: Number of summaries completed
+ * - generating: Number of summaries being generated
+ * - error: Number of summaries with errors
+ * - not_started: Number of segments without summary records
+ * - summaries: List of summary records with status and content preview
+ */
+export const get23 = oc
+ .route({
+ description:
+ 'Get summary index generation status for a document\nReturns:\n- total_segments: Total number of segments in the document\n- summary_status: Dictionary with status counts\n - completed: Number of summaries completed\n - generating: Number of summaries being generated\n - error: Number of summaries with errors\n - not_started: Number of segments without summary records\n- summaries: List of summary records with status and content preview',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatus',
+ path: '/datasets/{dataset_id}/documents/{document_id}/summary-status',
+ summary: 'Get summary index generation status for a document',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusResponse)
+
+export const summaryStatus = {
+ get: get23,
+}
+
+/**
+ * sync website document
+ */
+export const get24 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSync',
+ path: '/datasets/{dataset_id}/documents/{document_id}/website-sync',
+ summary: 'sync website document',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncResponse)
+
+export const websiteSync = {
+ get: get24,
+}
+
+export const delete6 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetIdDocumentsByDocumentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteDatasetsByDatasetIdDocumentsByDocumentIdPath }))
+ .output(zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse)
+
+/**
+ * Get document details
+ */
+export const get25 = oc
+ .route({
+ description: 'Get document details',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdPath,
+ query: zGetDatasetsByDatasetIdDocumentsByDocumentIdQuery.optional(),
+ }),
+ )
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdResponse)
+
+export const byDocumentId = {
+ delete: delete6,
+ get: get25,
+ download,
+ indexingEstimate: indexingEstimate3,
+ indexingStatus: indexingStatus2,
+ metadata: metadata3,
+ notion,
+ pipelineExecutionLog,
+ processing,
+ rename,
+ segment,
+ segments,
+ summaryStatus,
+ websiteSync,
+}
+
+export const delete7 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetIdDocuments',
+ path: '/datasets/{dataset_id}/documents',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteDatasetsByDatasetIdDocumentsPath }))
+ .output(zDeleteDatasetsByDatasetIdDocumentsResponse)
+
+/**
+ * Get documents in a dataset
+ */
+export const get26 = oc
+ .route({
+ description: 'Get documents in a dataset',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocuments',
+ path: '/datasets/{dataset_id}/documents',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetDatasetsByDatasetIdDocumentsPath,
+ query: zGetDatasetsByDatasetIdDocumentsQuery.optional(),
+ }),
+ )
+ .output(zGetDatasetsByDatasetIdDocumentsResponse)
+
+export const post16 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocuments',
+ path: '/datasets/{dataset_id}/documents',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsBody,
+ params: zPostDatasetsByDatasetIdDocumentsPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsResponse)
+
+export const documents = {
+ delete: delete7,
+ get: get26,
+ post: post16,
+ downloadZip,
+ generateSummary,
+ metadata: metadata2,
+ status,
+ byDocumentId,
+}
+
+/**
+ * Get dataset error documents
+ */
+export const get27 = oc
+ .route({
+ description: 'Get dataset error documents',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdErrorDocs',
+ path: '/datasets/{dataset_id}/error-docs',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdErrorDocsPath }))
+ .output(zGetDatasetsByDatasetIdErrorDocsResponse)
+
+export const errorDocs = {
+ get: get27,
+}
+
+/**
+ * Test external knowledge retrieval for dataset
+ */
+export const post17 = oc
+ .route({
+ description: 'Test external knowledge retrieval for dataset',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdExternalHitTesting',
+ path: '/datasets/{dataset_id}/external-hit-testing',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdExternalHitTestingBody,
+ params: zPostDatasetsByDatasetIdExternalHitTestingPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdExternalHitTestingResponse)
+
+export const externalHitTesting = {
+ post: post17,
+}
+
+/**
+ * Test dataset knowledge retrieval
+ */
+export const post18 = oc
+ .route({
+ description: 'Test dataset knowledge retrieval',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdHitTesting',
+ path: '/datasets/{dataset_id}/hit-testing',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdHitTestingBody,
+ params: zPostDatasetsByDatasetIdHitTestingPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdHitTestingResponse)
+
+export const hitTesting = {
+ post: post18,
+}
+
+/**
+ * Get dataset indexing status
+ */
+export const get28 = oc
+ .route({
+ description: 'Get dataset indexing status',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdIndexingStatus',
+ path: '/datasets/{dataset_id}/indexing-status',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdIndexingStatusPath }))
+ .output(zGetDatasetsByDatasetIdIndexingStatusResponse)
+
+export const indexingStatus3 = {
+ get: get28,
+}
+
+export const post19 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdMetadataBuiltInByAction',
+ path: '/datasets/{dataset_id}/metadata/built-in/{action}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostDatasetsByDatasetIdMetadataBuiltInByActionPath }))
+ .output(zPostDatasetsByDatasetIdMetadataBuiltInByActionResponse)
+
+export const byAction4 = {
+ post: post19,
+}
+
+export const builtIn2 = {
+ byAction: byAction4,
+}
+
+export const delete8 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetIdMetadataByMetadataId',
+ path: '/datasets/{dataset_id}/metadata/{metadata_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteDatasetsByDatasetIdMetadataByMetadataIdPath }))
+ .output(zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse)
+
+export const patch10 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdMetadataByMetadataId',
+ path: '/datasets/{dataset_id}/metadata/{metadata_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPatchDatasetsByDatasetIdMetadataByMetadataIdBody,
+ params: zPatchDatasetsByDatasetIdMetadataByMetadataIdPath,
+ }),
+ )
+ .output(zPatchDatasetsByDatasetIdMetadataByMetadataIdResponse)
+
+export const byMetadataId = {
+ delete: delete8,
+ patch: patch10,
+}
+
+export const get29 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdMetadata',
+ path: '/datasets/{dataset_id}/metadata',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdMetadataPath }))
+ .output(zGetDatasetsByDatasetIdMetadataResponse)
+
+export const post20 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdMetadata',
+ path: '/datasets/{dataset_id}/metadata',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdMetadataBody,
+ params: zPostDatasetsByDatasetIdMetadataPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdMetadataResponse)
+
+export const metadata4 = {
+ get: get29,
+ post: post20,
+ builtIn: builtIn2,
+ byMetadataId,
+}
+
+export const get30 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdNotionSync',
+ path: '/datasets/{dataset_id}/notion/sync',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdNotionSyncPath }))
+ .output(zGetDatasetsByDatasetIdNotionSyncResponse)
+
+export const sync2 = {
+ get: get30,
+}
+
+export const notion2 = {
+ sync: sync2,
+}
+
+/**
+ * Get dataset permission user list
+ */
+export const get31 = oc
+ .route({
+ description: 'Get dataset permission user list',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdPermissionPartUsers',
+ path: '/datasets/{dataset_id}/permission-part-users',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdPermissionPartUsersPath }))
+ .output(zGetDatasetsByDatasetIdPermissionPartUsersResponse)
+
+export const permissionPartUsers = {
+ get: get31,
+}
+
+/**
+ * Get dataset query history
+ */
+export const get32 = oc
+ .route({
+ description: 'Get dataset query history',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdQueries',
+ path: '/datasets/{dataset_id}/queries',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdQueriesPath }))
+ .output(zGetDatasetsByDatasetIdQueriesResponse)
+
+export const queries = {
+ get: get32,
+}
+
+/**
+ * Get applications related to dataset
+ */
+export const get33 = oc
+ .route({
+ description: 'Get applications related to dataset',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdRelatedApps',
+ path: '/datasets/{dataset_id}/related-apps',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdRelatedAppsPath }))
+ .output(zGetDatasetsByDatasetIdRelatedAppsResponse)
+
+export const relatedApps = {
+ get: get33,
+}
+
+/**
+ * retry document
+ */
+export const post21 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdRetry',
+ path: '/datasets/{dataset_id}/retry',
+ summary: 'retry document',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdRetryBody,
+ params: zPostDatasetsByDatasetIdRetryPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdRetryResponse)
+
+export const retry = {
+ post: post21,
+}
+
+/**
+ * Check if dataset is in use
+ */
+export const get34 = oc
+ .route({
+ description: 'Check if dataset is in use',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdUseCheck',
+ path: '/datasets/{dataset_id}/use-check',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdUseCheckPath }))
+ .output(zGetDatasetsByDatasetIdUseCheckResponse)
+
+export const useCheck2 = {
+ get: get34,
+}
+
+export const delete9 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetId',
+ path: '/datasets/{dataset_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteDatasetsByDatasetIdPath }))
+ .output(zDeleteDatasetsByDatasetIdResponse)
+
+/**
+ * Get dataset details
+ */
+export const get35 = oc
+ .route({
+ description: 'Get dataset details',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetId',
+ path: '/datasets/{dataset_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdPath }))
+ .output(zGetDatasetsByDatasetIdResponse)
+
+/**
+ * Update dataset details
+ */
+export const patch11 = oc
+ .route({
+ description: 'Update dataset details',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetId',
+ path: '/datasets/{dataset_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPatchDatasetsByDatasetIdBody, params: zPatchDatasetsByDatasetIdPath }))
+ .output(zPatchDatasetsByDatasetIdResponse)
+
+export const byDatasetId = {
+ delete: delete9,
+ get: get35,
+ patch: patch11,
+ apiKeys: apiKeys2,
+ autoDisableLogs,
+ batch,
+ documents,
+ errorDocs,
+ externalHitTesting,
+ hitTesting,
+ indexingStatus: indexingStatus3,
+ metadata: metadata4,
+ notion: notion2,
+ permissionPartUsers,
+ queries,
+ relatedApps,
+ retry,
+ useCheck: useCheck2,
+}
+
+/**
+ * Delete an API key for a dataset
+ *
+ * Delete an API key for a dataset
+ */
+export const delete10 = oc
+ .route({
+ description: 'Delete an API key for a dataset',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByResourceIdApiKeysByApiKeyId',
+ path: '/datasets/{resource_id}/api-keys/{api_key_id}',
+ successStatus: 204,
+ summary: 'Delete an API key for a dataset',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteDatasetsByResourceIdApiKeysByApiKeyIdPath }))
+ .output(zDeleteDatasetsByResourceIdApiKeysByApiKeyIdResponse)
+
+export const byApiKeyId2 = {
+ delete: delete10,
+}
+
+/**
+ * Get all API keys for a dataset
+ *
+ * Get all API keys for a dataset
+ */
+export const get36 = oc
+ .route({
+ description: 'Get all API keys for a dataset',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByResourceIdApiKeys',
+ path: '/datasets/{resource_id}/api-keys',
+ summary: 'Get all API keys for a dataset',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetDatasetsByResourceIdApiKeysPath }))
+ .output(zGetDatasetsByResourceIdApiKeysResponse)
+
+/**
+ * Create a new API key for a dataset
+ *
+ * Create a new API key for a dataset
+ */
+export const post22 = oc
+ .route({
+ description: 'Create a new API key for a dataset',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByResourceIdApiKeys',
+ path: '/datasets/{resource_id}/api-keys',
+ successStatus: 201,
+ summary: 'Create a new API key for a dataset',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostDatasetsByResourceIdApiKeysPath }))
+ .output(zPostDatasetsByResourceIdApiKeysResponse)
+
+export const apiKeys3 = {
+ get: get36,
+ post: post22,
+ byApiKeyId: byApiKeyId2,
+}
+
+export const byResourceId = {
+ apiKeys: apiKeys3,
+}
+
+/**
+ * Get list of datasets
+ */
+export const get37 = oc
+ .route({
+ description: 'Get list of datasets',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasets',
+ path: '/datasets',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetDatasetsQuery.optional() }))
+ .output(zGetDatasetsResponse)
+
+/**
+ * Create a new dataset
+ */
+export const post23 = oc
+ .route({
+ description: 'Create a new dataset',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasets',
+ path: '/datasets',
+ successStatus: 201,
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostDatasetsBody }))
+ .output(zPostDatasetsResponse)
+
+export const datasets = {
+ get: get37,
+ post: post23,
+ apiBaseInfo,
+ apiKeys,
+ batchImportStatus,
+ external,
+ externalKnowledgeApi,
+ indexingEstimate,
+ init,
+ metadata,
+ notionIndexingEstimate,
+ processRule,
+ retrievalSetting,
+ byDatasetId,
+ byResourceId,
+}
+
+export const contract = {
+ datasets,
+}
diff --git a/packages/contracts/generated/api/console/datasets/types.gen.ts b/packages/contracts/generated/api/console/datasets/types.gen.ts
new file mode 100644
index 00000000000..89a68593b77
--- /dev/null
+++ b/packages/contracts/generated/api/console/datasets/types.gen.ts
@@ -0,0 +1,2135 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/console/api` | (string & {})
+}
+
+export type DatasetCreatePayload = {
+ description?: string
+ external_knowledge_api_id?: string | null
+ external_knowledge_id?: string | null
+ indexing_technique?: string | null
+ name: string
+ permission?: DatasetPermissionEnum
+ provider?: string
+}
+
+export type ApiKeyList = {
+ data: Array<ApiKeyItem>
+}
+
+export type ApiKeyItem = {
+ created_at?: number | null
+ id: string
+ last_used_at?: number | null
+ token: string
+ type: string
+}
+
+export type BatchImportPayload = {
+ upload_file_id: string
+}
+
+export type ExternalDatasetCreatePayload = {
+ description?: string | null
+ external_knowledge_api_id: string
+ external_knowledge_id: string
+ external_retrieval_model?: {
+ [key: string]: unknown
+ } | null
+ name: string
+}
+
+export type DatasetDetail = {
+ [key: string]: unknown
+}
+
+export type ExternalKnowledgeApiPayload = {
+ name: string
+ settings: {
+ [key: string]: unknown
+ }
+}
+
+export type IndexingEstimatePayload = {
+ dataset_id?: string | null
+ doc_form?: string
+ doc_language?: string
+ indexing_technique: string
+ info_list: {
+ [key: string]: unknown
+ }
+ process_rule: {
+ [key: string]: unknown
+ }
+}
+
+export type KnowledgeConfig = {
+ data_source?: DataSource
+ doc_form?: string
+ doc_language?: string
+ duplicate?: boolean
+ embedding_model?: string | null
+ embedding_model_provider?: string | null
+ indexing_technique: 'high_quality' | 'economy'
+ is_multimodal?: boolean
+ name?: string | null
+ original_document_id?: string | null
+ process_rule?: ProcessRule
+ retrieval_model?: RetrievalModel
+ summary_index_setting?: {
+ [key: string]: unknown
+ } | null
+}
+
+export type DatasetAndDocumentResponse = {
+ batch: string
+ dataset: DatasetResponse
+ documents: Array<DocumentResponse>
+}
+
+export type NotionEstimatePayload = {
+ doc_form?: string
+ doc_language?: string
+ notion_info_list: Array<{
+ [key: string]: unknown
+ }>
+ process_rule: {
+ [key: string]: unknown
+ }
+}
+
+export type DatasetUpdatePayload = {
+ description?: string | null
+ embedding_model?: string | null
+ embedding_model_provider?: string | null
+ external_knowledge_api_id?: string | null
+ external_knowledge_id?: string | null
+ external_retrieval_model?: {
+ [key: string]: unknown
+ } | null
+ icon_info?: {
+ [key: string]: unknown
+ } | null
+ indexing_technique?: string | null
+ is_multimodal?: boolean | null
+ name?: string | null
+ partial_member_list?: Array<{
+ [key: string]: string
+ }> | null
+ permission?: DatasetPermissionEnum
+ retrieval_model?: {
+ [key: string]: unknown
+ } | null
+ summary_index_setting?: {
+ [key: string]: unknown
+ } | null
+}
+
+export type DocumentBatchDownloadZipPayload = {
+ document_ids: Array<string>
+}
+
+export type GenerateSummaryPayload = {
+ document_list: Array<string>
+}
+
+export type MetadataOperationData = {
+ operation_data: Array<DocumentMetadataOperation>
+}
+
+export type DocumentMetadataUpdatePayload = {
+ doc_metadata?: unknown
+ doc_type?: string | null
+}
+
+export type DocumentRenamePayload = {
+ name: string
+}
+
+export type DocumentResponse = {
+ archived?: boolean | null
+ created_at?: number | null
+ created_by?: string | null
+ created_from?: string | null
+ data_source_detail_dict?: unknown
+ data_source_info_dict?: unknown
+ data_source_type?: string | null
+ dataset_process_rule_id?: string | null
+ disabled_at?: number | null
+ disabled_by?: string | null
+ display_status?: string | null
+ doc_form?: string | null
+ doc_metadata_details?: Array<DocumentMetadataResponse>
+ enabled?: boolean | null
+ error?: string | null
+ hit_count?: number | null
+ id: string
+ indexing_status?: string | null
+ name: string
+ need_summary?: boolean | null
+ position?: number | null
+ summary_index_status?: string | null
+ tokens?: number | null
+ word_count?: number | null
+}
+
+export type SegmentCreatePayload = {
+ answer?: string | null
+ attachment_ids?: Array<string> | null
+ content: string
+ keywords?: Array<string> | null
+}
+
+export type SegmentUpdatePayload = {
+ answer?: string | null
+ attachment_ids?: Array<string> | null
+ content: string
+ keywords?: Array<string> | null
+ regenerate_child_chunks?: boolean
+ summary?: string | null
+}
+
+export type ChildChunkCreatePayload = {
+ content: string
+}
+
+export type ChildChunkUpdatePayload = {
+ content: string
+}
+
+export type ExternalHitTestingPayload = {
+ external_retrieval_model?: {
+ [key: string]: unknown
+ } | null
+ metadata_filtering_conditions?: {
+ [key: string]: unknown
+ } | null
+ query: string
+}
+
+export type HitTestingPayload = {
+ attachment_ids?: Array<string> | null
+ external_retrieval_model?: {
+ [key: string]: unknown
+ } | null
+ query: string
+ retrieval_model?: RetrievalModel
+}
+
+export type HitTestingResponse = {
+ query: string
+ records?: Array<HitTestingRecord>
+}
+
+export type MetadataArgs = {
+ name: string
+ type: 'string' | 'number' | 'time'
+}
+
+export type MetadataUpdatePayload = {
+ name: string
+}
+
+export type DatasetQueryDetail = {
+ [key: string]: unknown
+}
+
+export type RelatedAppList = {
+ [key: string]: unknown
+}
+
+export type DocumentRetryPayload = {
+ document_ids: Array<string>
+}
+
+export type DatasetPermissionEnum = 'only_me' | 'all_team_members' | 'partial_members'
+
+export type DataSource = {
+ info_list: InfoList
+}
+
+export type ProcessRule = {
+ mode: 'automatic' | 'custom' | 'hierarchical'
+ rules?: Rule
+}
+
+export type RetrievalModel = {
+ reranking_enable: boolean
+ reranking_mode?: string | null
+ reranking_model?: RerankingModel
+ score_threshold?: number | null
+ score_threshold_enabled: boolean
+ search_method: RetrievalMethod
+ top_k: number
+ weights?: WeightModel
+}
+
+export type DatasetResponse = {
+ created_at?: number | null
+ created_by?: string | null
+ data_source_type?: string | null
+ description?: string | null
+ id: string
+ indexing_technique?: string | null
+ name: string
+ permission?: string | null
+}
+
+export type DocumentMetadataOperation = {
+ document_id: string
+ metadata_list: Array<MetadataDetail>
+ partial_update?: boolean
+}
+
+export type DocumentMetadataResponse = {
+ id: string
+ name: string
+ type: string
+ value?: string | null
+}
+
+export type HitTestingRecord = {
+ child_chunks?: Array<HitTestingChildChunk>
+ files?: Array<HitTestingFile>
+ score?: number | null
+ segment?: HitTestingSegment
+ summary?: string | null
+ tsne_position?: unknown
+}
+
+export type InfoList = {
+ data_source_type: 'upload_file' | 'notion_import' | 'website_crawl'
+ file_info_list?: FileInfo
+ notion_info_list?: Array<NotionInfo> | null
+ website_info_list?: WebsiteInfo
+}
+
+export type Rule = {
+ parent_mode?: 'full-doc' | 'paragraph' | null
+ pre_processing_rules?: Array<PreProcessingRule> | null
+ segmentation?: Segmentation
+ subchunk_segmentation?: Segmentation
+}
+
+export type RerankingModel = {
+ reranking_model_name?: string | null
+ reranking_provider_name?: string | null
+}
+
+export type RetrievalMethod
+ = | 'semantic_search'
+ | 'full_text_search'
+ | 'hybrid_search'
+ | 'keyword_search'
+
+export type WeightModel = {
+ keyword_setting?: WeightKeywordSetting
+ vector_setting?: WeightVectorSetting
+ weight_type?: 'semantic_first' | 'keyword_first' | 'customized' | null
+}
+
+export type MetadataDetail = {
+ id: string
+ name: string
+ value?: unknown
+}
+
+export type HitTestingChildChunk = {
+ content?: string | null
+ id?: string | null
+ position?: number | null
+ score?: number | null
+}
+
+export type HitTestingFile = {
+ extension?: string | null
+ id?: string | null
+ mime_type?: string | null
+ name?: string | null
+ size?: number | null
+ source_url?: string | null
+}
+
+export type HitTestingSegment = {
+ answer?: string | null
+ completed_at?: number | null
+ content?: string | null
+ created_at?: number | null
+ created_by?: string | null
+ disabled_at?: number | null
+ disabled_by?: string | null
+ document?: HitTestingDocument
+ document_id?: string | null
+ enabled?: boolean | null
+ error?: string | null
+ hit_count?: number | null
+ id?: string | null
+ index_node_hash?: string | null
+ index_node_id?: string | null
+ indexing_at?: number | null
+ keywords?: Array<string>
+ position?: number | null
+ sign_content?: string | null
+ status?: string | null
+ stopped_at?: number | null
+ tokens?: number | null
+ word_count?: number | null
+}
+
+export type FileInfo = {
+ file_ids: Array<string>
+}
+
+export type NotionInfo = {
+ credential_id: string
+ pages: Array<NotionPage>
+ workspace_id: string
+}
+
+export type WebsiteInfo = {
+ job_id: string
+ only_main_content?: boolean
+ provider: string
+ urls: Array<string>
+}
+
+export type PreProcessingRule = {
+ enabled: boolean
+ id: string
+}
+
+export type Segmentation = {
+ chunk_overlap?: number
+ max_tokens: number
+ separator?: string
+}
+
+export type WeightKeywordSetting = {
+ keyword_weight: number
+}
+
+export type WeightVectorSetting = {
+ embedding_model_name: string
+ embedding_provider_name: string
+ vector_weight: number
+}
+
+export type HitTestingDocument = {
+ data_source_type?: string | null
+ doc_metadata?: unknown
+ doc_type?: string | null
+ id?: string | null
+ name?: string | null
+}
+
+export type NotionPage = {
+ page_icon?: NotionIcon
+ page_id: string
+ page_name: string
+ type: string
+}
+
+export type NotionIcon = {
+ emoji?: string | null
+ type: string
+ url?: string | null
+}
+
+export type GetDatasetsData = {
+ body?: never
+ path?: never
+ query?: {
+ page?: string
+ limit?: string
+ ids?: string
+ keyword?: string
+ tag_ids?: string
+ include_all?: string
+ }
+ url: '/datasets'
+}
+
+export type GetDatasetsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsResponse = GetDatasetsResponses[keyof GetDatasetsResponses]
+
+export type PostDatasetsData = {
+ body: DatasetCreatePayload
+ path?: never
+ query?: never
+ url: '/datasets'
+}
+
+export type PostDatasetsErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsError = PostDatasetsErrors[keyof PostDatasetsErrors]
+
+export type PostDatasetsResponses = {
+ 201: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsResponse = PostDatasetsResponses[keyof PostDatasetsResponses]
+
+export type GetDatasetsApiBaseInfoData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/datasets/api-base-info'
+}
+
+export type GetDatasetsApiBaseInfoResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsApiBaseInfoResponse
+ = GetDatasetsApiBaseInfoResponses[keyof GetDatasetsApiBaseInfoResponses]
+
+export type GetDatasetsApiKeysData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/datasets/api-keys'
+}
+
+export type GetDatasetsApiKeysResponses = {
+ 200: ApiKeyList
+}
+
+export type GetDatasetsApiKeysResponse
+ = GetDatasetsApiKeysResponses[keyof GetDatasetsApiKeysResponses]
+
+export type PostDatasetsApiKeysData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/datasets/api-keys'
+}
+
+export type PostDatasetsApiKeysErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsApiKeysError = PostDatasetsApiKeysErrors[keyof PostDatasetsApiKeysErrors]
+
+export type PostDatasetsApiKeysResponses = {
+ 200: ApiKeyItem
+}
+
+export type PostDatasetsApiKeysResponse
+ = PostDatasetsApiKeysResponses[keyof PostDatasetsApiKeysResponses]
+
+export type DeleteDatasetsApiKeysByApiKeyIdData = {
+ body?: never
+ path: {
+ api_key_id: string
+ }
+ query?: never
+ url: '/datasets/api-keys/{api_key_id}'
+}
+
+export type DeleteDatasetsApiKeysByApiKeyIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsApiKeysByApiKeyIdResponse
+ = DeleteDatasetsApiKeysByApiKeyIdResponses[keyof DeleteDatasetsApiKeysByApiKeyIdResponses]
+
+export type GetDatasetsBatchImportStatusByJobIdData = {
+ body?: never
+ path: {
+ job_id: string
+ }
+ query?: never
+ url: '/datasets/batch_import_status/{job_id}'
+}
+
+export type GetDatasetsBatchImportStatusByJobIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsBatchImportStatusByJobIdResponse
+ = GetDatasetsBatchImportStatusByJobIdResponses[keyof GetDatasetsBatchImportStatusByJobIdResponses]
+
+export type PostDatasetsBatchImportStatusByJobIdData = {
+ body: BatchImportPayload
+ path: {
+ job_id: string
+ }
+ query?: never
+ url: '/datasets/batch_import_status/{job_id}'
+}
+
+export type PostDatasetsBatchImportStatusByJobIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsBatchImportStatusByJobIdResponse
+ = PostDatasetsBatchImportStatusByJobIdResponses[keyof PostDatasetsBatchImportStatusByJobIdResponses]
+
+export type PostDatasetsExternalData = {
+ body: ExternalDatasetCreatePayload
+ path?: never
+ query?: never
+ url: '/datasets/external'
+}
+
+export type PostDatasetsExternalErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsExternalError = PostDatasetsExternalErrors[keyof PostDatasetsExternalErrors]
+
+export type PostDatasetsExternalResponses = {
+ 201: DatasetDetail
+}
+
+export type PostDatasetsExternalResponse
+ = PostDatasetsExternalResponses[keyof PostDatasetsExternalResponses]
+
+export type GetDatasetsExternalKnowledgeApiData = {
+ body?: never
+ path?: never
+ query?: {
+ page?: string
+ limit?: string
+ keyword?: string
+ }
+ url: '/datasets/external-knowledge-api'
+}
+
+export type GetDatasetsExternalKnowledgeApiResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsExternalKnowledgeApiResponse
+ = GetDatasetsExternalKnowledgeApiResponses[keyof GetDatasetsExternalKnowledgeApiResponses]
+
+export type PostDatasetsExternalKnowledgeApiData = {
+ body: ExternalKnowledgeApiPayload
+ path?: never
+ query?: never
+ url: '/datasets/external-knowledge-api'
+}
+
+export type PostDatasetsExternalKnowledgeApiResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsExternalKnowledgeApiResponse
+ = PostDatasetsExternalKnowledgeApiResponses[keyof PostDatasetsExternalKnowledgeApiResponses]
+
+export type DeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdData = {
+ body?: never
+ path: {
+ external_knowledge_api_id: string
+ }
+ query?: never
+ url: '/datasets/external-knowledge-api/{external_knowledge_api_id}'
+}
+
+export type DeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse
+ = DeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses[keyof DeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses]
+
+export type GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdData = {
+ body?: never
+ path: {
+ external_knowledge_api_id: string
+ }
+ query?: never
+ url: '/datasets/external-knowledge-api/{external_knowledge_api_id}'
+}
+
+export type GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdError
+ = GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdErrors[keyof GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdErrors]
+
+export type GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse
+ = GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses[keyof GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses]
+
+export type PatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdData = {
+ body: ExternalKnowledgeApiPayload
+ path: {
+ external_knowledge_api_id: string
+ }
+ query?: never
+ url: '/datasets/external-knowledge-api/{external_knowledge_api_id}'
+}
+
+export type PatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse
+ = PatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses[keyof PatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponses]
+
+export type GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckData = {
+ body?: never
+ path: {
+ external_knowledge_api_id: string
+ }
+ query?: never
+ url: '/datasets/external-knowledge-api/{external_knowledge_api_id}/use-check'
+}
+
+export type GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckResponse
+ = GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckResponses[keyof GetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckResponses]
+
+export type PostDatasetsIndexingEstimateData = {
+ body: IndexingEstimatePayload
+ path?: never
+ query?: never
+ url: '/datasets/indexing-estimate'
+}
+
+export type PostDatasetsIndexingEstimateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsIndexingEstimateResponse
+ = PostDatasetsIndexingEstimateResponses[keyof PostDatasetsIndexingEstimateResponses]
+
+export type PostDatasetsInitData = {
+ body: KnowledgeConfig
+ path?: never
+ query?: never
+ url: '/datasets/init'
+}
+
+export type PostDatasetsInitErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsInitError = PostDatasetsInitErrors[keyof PostDatasetsInitErrors]
+
+export type PostDatasetsInitResponses = {
+ 201: DatasetAndDocumentResponse
+}
+
+export type PostDatasetsInitResponse = PostDatasetsInitResponses[keyof PostDatasetsInitResponses]
+
+export type GetDatasetsMetadataBuiltInData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/datasets/metadata/built-in'
+}
+
+export type GetDatasetsMetadataBuiltInResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsMetadataBuiltInResponse
+ = GetDatasetsMetadataBuiltInResponses[keyof GetDatasetsMetadataBuiltInResponses]
+
+export type GetDatasetsNotionIndexingEstimateData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/datasets/notion-indexing-estimate'
+}
+
+export type GetDatasetsNotionIndexingEstimateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsNotionIndexingEstimateResponse
+ = GetDatasetsNotionIndexingEstimateResponses[keyof GetDatasetsNotionIndexingEstimateResponses]
+
+export type PostDatasetsNotionIndexingEstimateData = {
+ body: NotionEstimatePayload
+ path?: never
+ query?: never
+ url: '/datasets/notion-indexing-estimate'
+}
+
+export type PostDatasetsNotionIndexingEstimateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsNotionIndexingEstimateResponse
+ = PostDatasetsNotionIndexingEstimateResponses[keyof PostDatasetsNotionIndexingEstimateResponses]
+
+export type GetDatasetsProcessRuleData = {
+ body?: never
+ path?: never
+ query?: {
+ document_id?: string
+ }
+ url: '/datasets/process-rule'
+}
+
+export type GetDatasetsProcessRuleResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsProcessRuleResponse
+ = GetDatasetsProcessRuleResponses[keyof GetDatasetsProcessRuleResponses]
+
+export type GetDatasetsRetrievalSettingData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/datasets/retrieval-setting'
+}
+
+export type GetDatasetsRetrievalSettingResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsRetrievalSettingResponse
+ = GetDatasetsRetrievalSettingResponses[keyof GetDatasetsRetrievalSettingResponses]
+
+export type GetDatasetsRetrievalSettingByVectorTypeData = {
+ body?: never
+ path: {
+ vector_type: string
+ }
+ query?: never
+ url: '/datasets/retrieval-setting/{vector_type}'
+}
+
+export type GetDatasetsRetrievalSettingByVectorTypeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsRetrievalSettingByVectorTypeResponse
+ = GetDatasetsRetrievalSettingByVectorTypeResponses[keyof GetDatasetsRetrievalSettingByVectorTypeResponses]
+
+export type DeleteDatasetsByDatasetIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}'
+}
+
+export type DeleteDatasetsByDatasetIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdResponse
+ = DeleteDatasetsByDatasetIdResponses[keyof DeleteDatasetsByDatasetIdResponses]
+
+export type GetDatasetsByDatasetIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}'
+}
+
+export type GetDatasetsByDatasetIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdError
+ = GetDatasetsByDatasetIdErrors[keyof GetDatasetsByDatasetIdErrors]
+
+export type GetDatasetsByDatasetIdResponses = {
+ 200: DatasetDetail
+}
+
+export type GetDatasetsByDatasetIdResponse
+ = GetDatasetsByDatasetIdResponses[keyof GetDatasetsByDatasetIdResponses]
+
+export type PatchDatasetsByDatasetIdData = {
+ body: DatasetUpdatePayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}'
+}
+
+export type PatchDatasetsByDatasetIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdError
+ = PatchDatasetsByDatasetIdErrors[keyof PatchDatasetsByDatasetIdErrors]
+
+export type PatchDatasetsByDatasetIdResponses = {
+ 200: DatasetDetail
+}
+
+export type PatchDatasetsByDatasetIdResponse
+ = PatchDatasetsByDatasetIdResponses[keyof PatchDatasetsByDatasetIdResponses]
+
+export type PostDatasetsByDatasetIdApiKeysByStatusData = {
+ body?: never
+ path: {
+ dataset_id: string
+ status: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/api-keys/{status}'
+}
+
+export type PostDatasetsByDatasetIdApiKeysByStatusResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdApiKeysByStatusResponse
+ = PostDatasetsByDatasetIdApiKeysByStatusResponses[keyof PostDatasetsByDatasetIdApiKeysByStatusResponses]
+
+export type GetDatasetsByDatasetIdAutoDisableLogsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/auto-disable-logs'
+}
+
+export type GetDatasetsByDatasetIdAutoDisableLogsErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdAutoDisableLogsError
+ = GetDatasetsByDatasetIdAutoDisableLogsErrors[keyof GetDatasetsByDatasetIdAutoDisableLogsErrors]
+
+export type GetDatasetsByDatasetIdAutoDisableLogsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdAutoDisableLogsResponse
+ = GetDatasetsByDatasetIdAutoDisableLogsResponses[keyof GetDatasetsByDatasetIdAutoDisableLogsResponses]
+
+export type GetDatasetsByDatasetIdBatchByBatchIndexingEstimateData = {
+ body?: never
+ path: {
+ dataset_id: string
+ batch: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/batch/{batch}/indexing-estimate'
+}
+
+export type GetDatasetsByDatasetIdBatchByBatchIndexingEstimateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdBatchByBatchIndexingEstimateResponse
+ = GetDatasetsByDatasetIdBatchByBatchIndexingEstimateResponses[keyof GetDatasetsByDatasetIdBatchByBatchIndexingEstimateResponses]
+
+export type GetDatasetsByDatasetIdBatchByBatchIndexingStatusData = {
+ body?: never
+ path: {
+ dataset_id: string
+ batch: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/batch/{batch}/indexing-status'
+}
+
+export type GetDatasetsByDatasetIdBatchByBatchIndexingStatusResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdBatchByBatchIndexingStatusResponse
+ = GetDatasetsByDatasetIdBatchByBatchIndexingStatusResponses[keyof GetDatasetsByDatasetIdBatchByBatchIndexingStatusResponses]
+
+export type DeleteDatasetsByDatasetIdDocumentsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents'
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsResponse
+ = DeleteDatasetsByDatasetIdDocumentsResponses[keyof DeleteDatasetsByDatasetIdDocumentsResponses]
+
+export type GetDatasetsByDatasetIdDocumentsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: {
+ page?: string
+ limit?: string
+ keyword?: string
+ sort?: string
+ fetch?: string
+ status?: string
+ }
+ url: '/datasets/{dataset_id}/documents'
+}
+
+export type GetDatasetsByDatasetIdDocumentsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsResponse
+ = GetDatasetsByDatasetIdDocumentsResponses[keyof GetDatasetsByDatasetIdDocumentsResponses]
+
+export type PostDatasetsByDatasetIdDocumentsData = {
+ body: KnowledgeConfig
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents'
+}
+
+export type PostDatasetsByDatasetIdDocumentsResponses = {
+ 200: DatasetAndDocumentResponse
+}
+
+export type PostDatasetsByDatasetIdDocumentsResponse
+ = PostDatasetsByDatasetIdDocumentsResponses[keyof PostDatasetsByDatasetIdDocumentsResponses]
+
+export type PostDatasetsByDatasetIdDocumentsDownloadZipData = {
+ body: DocumentBatchDownloadZipPayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/download-zip'
+}
+
+export type PostDatasetsByDatasetIdDocumentsDownloadZipResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsDownloadZipResponse
+ = PostDatasetsByDatasetIdDocumentsDownloadZipResponses[keyof PostDatasetsByDatasetIdDocumentsDownloadZipResponses]
+
+export type PostDatasetsByDatasetIdDocumentsGenerateSummaryData = {
+ body: GenerateSummaryPayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/generate-summary'
+}
+
+export type PostDatasetsByDatasetIdDocumentsGenerateSummaryErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsGenerateSummaryError
+ = PostDatasetsByDatasetIdDocumentsGenerateSummaryErrors[keyof PostDatasetsByDatasetIdDocumentsGenerateSummaryErrors]
+
+export type PostDatasetsByDatasetIdDocumentsGenerateSummaryResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsGenerateSummaryResponse
+ = PostDatasetsByDatasetIdDocumentsGenerateSummaryResponses[keyof PostDatasetsByDatasetIdDocumentsGenerateSummaryResponses]
+
+export type PostDatasetsByDatasetIdDocumentsMetadataData = {
+ body: MetadataOperationData
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/metadata'
+}
+
+export type PostDatasetsByDatasetIdDocumentsMetadataResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsMetadataResponse
+ = PostDatasetsByDatasetIdDocumentsMetadataResponses[keyof PostDatasetsByDatasetIdDocumentsMetadataResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsStatusByActionBatchData = {
+ body?: never
+ path: {
+ dataset_id: string
+ action: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/status/{action}/batch'
+}
+
+export type PatchDatasetsByDatasetIdDocumentsStatusByActionBatchResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsStatusByActionBatchResponse
+ = PatchDatasetsByDatasetIdDocumentsStatusByActionBatchResponses[keyof PatchDatasetsByDatasetIdDocumentsStatusByActionBatchResponses]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}'
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: {
+ metadata?: string
+ }
+ url: '/datasets/{dataset_id}/documents/{document_id}'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdError
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/download'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/indexing-estimate'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateError
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/indexing-status'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusError
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusResponses]
+
+export type PutDatasetsByDatasetIdDocumentsByDocumentIdMetadataData = {
+ body: DocumentMetadataUpdatePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/metadata'
+}
+
+export type PutDatasetsByDatasetIdDocumentsByDocumentIdMetadataErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PutDatasetsByDatasetIdDocumentsByDocumentIdMetadataError
+ = PutDatasetsByDatasetIdDocumentsByDocumentIdMetadataErrors[keyof PutDatasetsByDatasetIdDocumentsByDocumentIdMetadataErrors]
+
+export type PutDatasetsByDatasetIdDocumentsByDocumentIdMetadataResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PutDatasetsByDatasetIdDocumentsByDocumentIdMetadataResponse
+ = PutDatasetsByDatasetIdDocumentsByDocumentIdMetadataResponses[keyof PutDatasetsByDatasetIdDocumentsByDocumentIdMetadataResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/notion/sync'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/pipeline-execution-log'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/processing/pause'
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponse
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/processing/resume'
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponse
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ action: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/processing/{action}'
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionError
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionErrors[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionErrors]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionResponse
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdRenameData = {
+ body: DocumentRenamePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/rename'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdRenameResponses = {
+ 200: DocumentResponse
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdRenameResponse
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdRenameResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdRenameResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentData = {
+ body: SegmentCreatePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segment'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentResponse
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ action: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segment/{action}'
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionResponse
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionResponses]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments'
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/batch_import'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportData = {
+ body: BatchImportPayload
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/batch_import'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponse
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponses]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdData = {
+ body: SegmentUpdatePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks'
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksData = {
+ body: ChildChunkCreatePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdData
+ = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ child_chunk_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}'
+ }
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdData
+ = {
+ body: ChildChunkUpdatePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ child_chunk_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}'
+ }
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/summary-status'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusError
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/website-sync'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncResponses]
+
+export type GetDatasetsByDatasetIdErrorDocsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/error-docs'
+}
+
+export type GetDatasetsByDatasetIdErrorDocsErrors = {
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdErrorDocsError
+ = GetDatasetsByDatasetIdErrorDocsErrors[keyof GetDatasetsByDatasetIdErrorDocsErrors]
+
+export type GetDatasetsByDatasetIdErrorDocsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdErrorDocsResponse
+ = GetDatasetsByDatasetIdErrorDocsResponses[keyof GetDatasetsByDatasetIdErrorDocsResponses]
+
+export type PostDatasetsByDatasetIdExternalHitTestingData = {
+ body: ExternalHitTestingPayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/external-hit-testing'
+}
+
+export type PostDatasetsByDatasetIdExternalHitTestingErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdExternalHitTestingError
+ = PostDatasetsByDatasetIdExternalHitTestingErrors[keyof PostDatasetsByDatasetIdExternalHitTestingErrors]
+
+export type PostDatasetsByDatasetIdExternalHitTestingResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdExternalHitTestingResponse
+ = PostDatasetsByDatasetIdExternalHitTestingResponses[keyof PostDatasetsByDatasetIdExternalHitTestingResponses]
+
+export type PostDatasetsByDatasetIdHitTestingData = {
+ body: HitTestingPayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/hit-testing'
+}
+
+export type PostDatasetsByDatasetIdHitTestingErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdHitTestingError
+ = PostDatasetsByDatasetIdHitTestingErrors[keyof PostDatasetsByDatasetIdHitTestingErrors]
+
+export type PostDatasetsByDatasetIdHitTestingResponses = {
+ 200: HitTestingResponse
+}
+
+export type PostDatasetsByDatasetIdHitTestingResponse
+ = PostDatasetsByDatasetIdHitTestingResponses[keyof PostDatasetsByDatasetIdHitTestingResponses]
+
+export type GetDatasetsByDatasetIdIndexingStatusData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/indexing-status'
+}
+
+export type GetDatasetsByDatasetIdIndexingStatusResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdIndexingStatusResponse
+ = GetDatasetsByDatasetIdIndexingStatusResponses[keyof GetDatasetsByDatasetIdIndexingStatusResponses]
+
+export type GetDatasetsByDatasetIdMetadataData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata'
+}
+
+export type GetDatasetsByDatasetIdMetadataResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdMetadataResponse
+ = GetDatasetsByDatasetIdMetadataResponses[keyof GetDatasetsByDatasetIdMetadataResponses]
+
+export type PostDatasetsByDatasetIdMetadataData = {
+ body: MetadataArgs
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata'
+}
+
+export type PostDatasetsByDatasetIdMetadataResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdMetadataResponse
+ = PostDatasetsByDatasetIdMetadataResponses[keyof PostDatasetsByDatasetIdMetadataResponses]
+
+export type PostDatasetsByDatasetIdMetadataBuiltInByActionData = {
+ body?: never
+ path: {
+ dataset_id: string
+ action: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata/built-in/{action}'
+}
+
+export type PostDatasetsByDatasetIdMetadataBuiltInByActionResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdMetadataBuiltInByActionResponse
+ = PostDatasetsByDatasetIdMetadataBuiltInByActionResponses[keyof PostDatasetsByDatasetIdMetadataBuiltInByActionResponses]
+
+export type DeleteDatasetsByDatasetIdMetadataByMetadataIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ metadata_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata/{metadata_id}'
+}
+
+export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponse
+ = DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses[keyof DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses]
+
+export type PatchDatasetsByDatasetIdMetadataByMetadataIdData = {
+ body: MetadataUpdatePayload
+ path: {
+ dataset_id: string
+ metadata_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata/{metadata_id}'
+}
+
+export type PatchDatasetsByDatasetIdMetadataByMetadataIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdMetadataByMetadataIdResponse
+ = PatchDatasetsByDatasetIdMetadataByMetadataIdResponses[keyof PatchDatasetsByDatasetIdMetadataByMetadataIdResponses]
+
+export type GetDatasetsByDatasetIdNotionSyncData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/notion/sync'
+}
+
+export type GetDatasetsByDatasetIdNotionSyncResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdNotionSyncResponse
+ = GetDatasetsByDatasetIdNotionSyncResponses[keyof GetDatasetsByDatasetIdNotionSyncResponses]
+
+export type GetDatasetsByDatasetIdPermissionPartUsersData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/permission-part-users'
+}
+
+export type GetDatasetsByDatasetIdPermissionPartUsersErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdPermissionPartUsersError
+ = GetDatasetsByDatasetIdPermissionPartUsersErrors[keyof GetDatasetsByDatasetIdPermissionPartUsersErrors]
+
+export type GetDatasetsByDatasetIdPermissionPartUsersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdPermissionPartUsersResponse
+ = GetDatasetsByDatasetIdPermissionPartUsersResponses[keyof GetDatasetsByDatasetIdPermissionPartUsersResponses]
+
+export type GetDatasetsByDatasetIdQueriesData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/queries'
+}
+
+export type GetDatasetsByDatasetIdQueriesResponses = {
+ 200: DatasetQueryDetail
+}
+
+export type GetDatasetsByDatasetIdQueriesResponse
+ = GetDatasetsByDatasetIdQueriesResponses[keyof GetDatasetsByDatasetIdQueriesResponses]
+
+export type GetDatasetsByDatasetIdRelatedAppsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/related-apps'
+}
+
+export type GetDatasetsByDatasetIdRelatedAppsResponses = {
+ 200: RelatedAppList
+}
+
+export type GetDatasetsByDatasetIdRelatedAppsResponse
+ = GetDatasetsByDatasetIdRelatedAppsResponses[keyof GetDatasetsByDatasetIdRelatedAppsResponses]
+
+export type PostDatasetsByDatasetIdRetryData = {
+ body: DocumentRetryPayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/retry'
+}
+
+export type PostDatasetsByDatasetIdRetryResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdRetryResponse
+ = PostDatasetsByDatasetIdRetryResponses[keyof PostDatasetsByDatasetIdRetryResponses]
+
+export type GetDatasetsByDatasetIdUseCheckData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/use-check'
+}
+
+export type GetDatasetsByDatasetIdUseCheckResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdUseCheckResponse
+ = GetDatasetsByDatasetIdUseCheckResponses[keyof GetDatasetsByDatasetIdUseCheckResponses]
+
+export type GetDatasetsByResourceIdApiKeysData = {
+ body?: never
+ path: {
+ resource_id: string
+ }
+ query?: never
+ url: '/datasets/{resource_id}/api-keys'
+}
+
+export type GetDatasetsByResourceIdApiKeysResponses = {
+ 200: ApiKeyList
+}
+
+export type GetDatasetsByResourceIdApiKeysResponse
+ = GetDatasetsByResourceIdApiKeysResponses[keyof GetDatasetsByResourceIdApiKeysResponses]
+
+export type PostDatasetsByResourceIdApiKeysData = {
+ body?: never
+ path: {
+ resource_id: string
+ }
+ query?: never
+ url: '/datasets/{resource_id}/api-keys'
+}
+
+export type PostDatasetsByResourceIdApiKeysErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByResourceIdApiKeysError
+ = PostDatasetsByResourceIdApiKeysErrors[keyof PostDatasetsByResourceIdApiKeysErrors]
+
+export type PostDatasetsByResourceIdApiKeysResponses = {
+ 201: ApiKeyItem
+}
+
+export type PostDatasetsByResourceIdApiKeysResponse
+ = PostDatasetsByResourceIdApiKeysResponses[keyof PostDatasetsByResourceIdApiKeysResponses]
+
+export type DeleteDatasetsByResourceIdApiKeysByApiKeyIdData = {
+ body?: never
+ path: {
+ resource_id: string
+ api_key_id: string
+ }
+ query?: never
+ url: '/datasets/{resource_id}/api-keys/{api_key_id}'
+}
+
+export type DeleteDatasetsByResourceIdApiKeysByApiKeyIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByResourceIdApiKeysByApiKeyIdResponse
+ = DeleteDatasetsByResourceIdApiKeysByApiKeyIdResponses[keyof DeleteDatasetsByResourceIdApiKeysByApiKeyIdResponses]
diff --git a/packages/contracts/generated/api/console/datasets/zod.gen.ts b/packages/contracts/generated/api/console/datasets/zod.gen.ts
new file mode 100644
index 00000000000..2ac2cbfd1ff
--- /dev/null
+++ b/packages/contracts/generated/api/console/datasets/zod.gen.ts
@@ -0,0 +1,1490 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * ApiKeyItem
+ */
+export const zApiKeyItem = z.object({
+ created_at: z.int().nullish(),
+ id: z.string(),
+ last_used_at: z.int().nullish(),
+ token: z.string(),
+ type: z.string(),
+})
+
+/**
+ * ApiKeyList
+ */
+export const zApiKeyList = z.object({
+ data: z.array(zApiKeyItem),
+})
+
+/**
+ * BatchImportPayload
+ */
+export const zBatchImportPayload = z.object({
+ upload_file_id: z.string(),
+})
+
+/**
+ * ExternalDatasetCreatePayload
+ */
+export const zExternalDatasetCreatePayload = z.object({
+ description: z.string().max(400).nullish(),
+ external_knowledge_api_id: z.string(),
+ external_knowledge_id: z.string(),
+ external_retrieval_model: z.record(z.string(), z.unknown()).nullish(),
+ name: z.string().min(1).max(100),
+})
+
+export const zDatasetDetail = z.record(z.string(), z.unknown())
+
+/**
+ * ExternalKnowledgeApiPayload
+ */
+export const zExternalKnowledgeApiPayload = z.object({
+ name: z.string().min(1).max(40),
+ settings: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * IndexingEstimatePayload
+ */
+export const zIndexingEstimatePayload = z.object({
+ dataset_id: z.string().nullish(),
+ doc_form: z.string().optional().default('text_model'),
+ doc_language: z.string().optional().default('English'),
+ indexing_technique: z.string(),
+ info_list: z.record(z.string(), z.unknown()),
+ process_rule: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * 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()),
+})
+
+/**
+ * DocumentBatchDownloadZipPayload
+ *
+ * Request payload for bulk downloading documents as a zip archive.
+ */
+export const zDocumentBatchDownloadZipPayload = z.object({
+ document_ids: z.array(z.uuid()).min(1).max(100),
+})
+
+/**
+ * GenerateSummaryPayload
+ */
+export const zGenerateSummaryPayload = z.object({
+ document_list: z.array(z.string()),
+})
+
+/**
+ * DocumentMetadataUpdatePayload
+ */
+export const zDocumentMetadataUpdatePayload = z.object({
+ doc_metadata: z.unknown().optional(),
+ doc_type: z.string().nullish(),
+})
+
+/**
+ * DocumentRenamePayload
+ */
+export const zDocumentRenamePayload = z.object({
+ name: z.string(),
+})
+
+/**
+ * SegmentCreatePayload
+ */
+export const zSegmentCreatePayload = z.object({
+ answer: z.string().nullish(),
+ attachment_ids: z.array(z.string()).nullish(),
+ content: z.string(),
+ keywords: z.array(z.string()).nullish(),
+})
+
+/**
+ * SegmentUpdatePayload
+ */
+export const zSegmentUpdatePayload = z.object({
+ answer: z.string().nullish(),
+ attachment_ids: z.array(z.string()).nullish(),
+ content: z.string(),
+ keywords: z.array(z.string()).nullish(),
+ regenerate_child_chunks: z.boolean().optional().default(false),
+ summary: z.string().nullish(),
+})
+
+/**
+ * ChildChunkCreatePayload
+ */
+export const zChildChunkCreatePayload = z.object({
+ content: z.string(),
+})
+
+/**
+ * ChildChunkUpdatePayload
+ */
+export const zChildChunkUpdatePayload = z.object({
+ content: z.string(),
+})
+
+/**
+ * ExternalHitTestingPayload
+ */
+export const zExternalHitTestingPayload = z.object({
+ external_retrieval_model: z.record(z.string(), z.unknown()).nullish(),
+ metadata_filtering_conditions: z.record(z.string(), z.unknown()).nullish(),
+ query: z.string(),
+})
+
+/**
+ * MetadataArgs
+ */
+export const zMetadataArgs = z.object({
+ name: z.string(),
+ type: z.enum(['string', 'number', 'time']),
+})
+
+/**
+ * MetadataUpdatePayload
+ */
+export const zMetadataUpdatePayload = z.object({
+ name: z.string(),
+})
+
+export const zDatasetQueryDetail = z.record(z.string(), z.unknown())
+
+export const zRelatedAppList = z.record(z.string(), z.unknown())
+
+/**
+ * DocumentRetryPayload
+ */
+export const zDocumentRetryPayload = z.object({
+ document_ids: z.array(z.string()),
+})
+
+/**
+ * DatasetPermissionEnum
+ */
+export const zDatasetPermissionEnum = z.enum(['only_me', 'all_team_members', 'partial_members'])
+
+/**
+ * DatasetCreatePayload
+ */
+export const zDatasetCreatePayload = z.object({
+ description: z.string().max(400).optional().default(''),
+ external_knowledge_api_id: z.string().nullish(),
+ external_knowledge_id: z.string().nullish(),
+ indexing_technique: z.string().nullish(),
+ name: z.string().min(1).max(40),
+ permission: zDatasetPermissionEnum.optional(),
+ provider: z.string().optional().default('vendor'),
+})
+
+/**
+ * DatasetUpdatePayload
+ */
+export const zDatasetUpdatePayload = z.object({
+ description: z.string().max(400).nullish(),
+ embedding_model: z.string().nullish(),
+ embedding_model_provider: z.string().nullish(),
+ external_knowledge_api_id: z.string().nullish(),
+ external_knowledge_id: z.string().nullish(),
+ external_retrieval_model: z.record(z.string(), z.unknown()).nullish(),
+ icon_info: z.record(z.string(), z.unknown()).nullish(),
+ indexing_technique: z.string().nullish(),
+ is_multimodal: z.boolean().nullish().default(false),
+ name: z.string().min(1).max(40).nullish(),
+ partial_member_list: z.array(z.record(z.string(), z.string())).nullish(),
+ permission: zDatasetPermissionEnum.optional(),
+ retrieval_model: z.record(z.string(), z.unknown()).nullish(),
+ summary_index_setting: z.record(z.string(), z.unknown()).nullish(),
+})
+
+/**
+ * DatasetResponse
+ */
+export const zDatasetResponse = z.object({
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ data_source_type: z.string().nullish(),
+ description: z.string().nullish(),
+ id: z.string(),
+ indexing_technique: z.string().nullish(),
+ name: z.string(),
+ permission: z.string().nullish(),
+})
+
+/**
+ * DocumentMetadataResponse
+ */
+export const zDocumentMetadataResponse = z.object({
+ id: z.string(),
+ name: z.string(),
+ type: z.string(),
+ value: z.string().nullish(),
+})
+
+/**
+ * DocumentResponse
+ */
+export const zDocumentResponse = z.object({
+ archived: z.boolean().nullish(),
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ created_from: z.string().nullish(),
+ data_source_detail_dict: z.unknown().optional(),
+ data_source_info_dict: z.unknown().optional(),
+ data_source_type: z.string().nullish(),
+ dataset_process_rule_id: z.string().nullish(),
+ disabled_at: z.int().nullish(),
+ disabled_by: z.string().nullish(),
+ display_status: z.string().nullish(),
+ doc_form: z.string().nullish(),
+ doc_metadata_details: z.array(zDocumentMetadataResponse).optional(),
+ enabled: z.boolean().nullish(),
+ error: z.string().nullish(),
+ hit_count: z.int().nullish(),
+ id: z.string(),
+ indexing_status: z.string().nullish(),
+ name: z.string(),
+ need_summary: z.boolean().nullish(),
+ position: z.int().nullish(),
+ summary_index_status: z.string().nullish(),
+ tokens: z.int().nullish(),
+ word_count: z.int().nullish(),
+})
+
+/**
+ * DatasetAndDocumentResponse
+ */
+export const zDatasetAndDocumentResponse = z.object({
+ batch: z.string(),
+ dataset: zDatasetResponse,
+ documents: z.array(zDocumentResponse),
+})
+
+/**
+ * RerankingModel
+ */
+export const zRerankingModel = z.object({
+ reranking_model_name: z.string().nullish(),
+ reranking_provider_name: z.string().nullish(),
+})
+
+/**
+ * RetrievalMethod
+ */
+export const zRetrievalMethod = z.enum([
+ 'semantic_search',
+ 'full_text_search',
+ 'hybrid_search',
+ 'keyword_search',
+])
+
+/**
+ * MetadataDetail
+ */
+export const zMetadataDetail = z.object({
+ id: z.string(),
+ name: z.string(),
+ value: z.unknown().optional(),
+})
+
+/**
+ * DocumentMetadataOperation
+ */
+export const zDocumentMetadataOperation = z.object({
+ document_id: z.string(),
+ metadata_list: z.array(zMetadataDetail),
+ partial_update: z.boolean().optional().default(false),
+})
+
+/**
+ * MetadataOperationData
+ *
+ * Metadata operation data
+ */
+export const zMetadataOperationData = z.object({
+ operation_data: z.array(zDocumentMetadataOperation),
+})
+
+/**
+ * HitTestingChildChunk
+ */
+export const zHitTestingChildChunk = z.object({
+ content: z.string().nullish(),
+ id: z.string().nullish(),
+ position: z.int().nullish(),
+ score: z.number().nullish(),
+})
+
+/**
+ * HitTestingFile
+ */
+export const zHitTestingFile = z.object({
+ extension: z.string().nullish(),
+ id: z.string().nullish(),
+ mime_type: z.string().nullish(),
+ name: z.string().nullish(),
+ size: z.int().nullish(),
+ source_url: z.string().nullish(),
+})
+
+/**
+ * FileInfo
+ */
+export const zFileInfo = z.object({
+ file_ids: z.array(z.string()),
+})
+
+/**
+ * WebsiteInfo
+ */
+export const zWebsiteInfo = z.object({
+ job_id: z.string(),
+ only_main_content: z.boolean().optional().default(true),
+ provider: z.string(),
+ urls: z.array(z.string()),
+})
+
+/**
+ * PreProcessingRule
+ */
+export const zPreProcessingRule = z.object({
+ enabled: z.boolean(),
+ id: z.string(),
+})
+
+/**
+ * Segmentation
+ */
+export const zSegmentation = z.object({
+ chunk_overlap: z.int().optional().default(0),
+ max_tokens: z.int(),
+ separator: z.string().optional().default('\n'),
+})
+
+/**
+ * Rule
+ */
+export const zRule = z.object({
+ parent_mode: z.enum(['full-doc', 'paragraph']).nullish(),
+ pre_processing_rules: z.array(zPreProcessingRule).nullish(),
+ segmentation: zSegmentation.optional(),
+ subchunk_segmentation: zSegmentation.optional(),
+})
+
+/**
+ * ProcessRule
+ */
+export const zProcessRule = z.object({
+ mode: z.enum(['automatic', 'custom', 'hierarchical']),
+ rules: zRule.optional(),
+})
+
+/**
+ * WeightKeywordSetting
+ */
+export const zWeightKeywordSetting = z.object({
+ keyword_weight: z.number(),
+})
+
+/**
+ * WeightVectorSetting
+ */
+export const zWeightVectorSetting = z.object({
+ embedding_model_name: z.string(),
+ embedding_provider_name: z.string(),
+ vector_weight: z.number(),
+})
+
+/**
+ * WeightModel
+ */
+export const zWeightModel = z.object({
+ keyword_setting: zWeightKeywordSetting.optional(),
+ vector_setting: zWeightVectorSetting.optional(),
+ weight_type: z.enum(['semantic_first', 'keyword_first', 'customized']).nullish(),
+})
+
+/**
+ * RetrievalModel
+ */
+export const zRetrievalModel = z.object({
+ reranking_enable: z.boolean(),
+ reranking_mode: z.string().nullish(),
+ reranking_model: zRerankingModel.optional(),
+ score_threshold: z.number().nullish(),
+ score_threshold_enabled: z.boolean(),
+ search_method: zRetrievalMethod,
+ top_k: z.int(),
+ weights: zWeightModel.optional(),
+})
+
+/**
+ * HitTestingPayload
+ */
+export const zHitTestingPayload = z.object({
+ attachment_ids: z.array(z.string()).nullish(),
+ external_retrieval_model: z.record(z.string(), z.unknown()).nullish(),
+ query: z.string().max(250),
+ retrieval_model: zRetrievalModel.optional(),
+})
+
+/**
+ * HitTestingDocument
+ */
+export const zHitTestingDocument = z.object({
+ data_source_type: z.string().nullish(),
+ doc_metadata: z.unknown().optional(),
+ doc_type: z.string().nullish(),
+ id: z.string().nullish(),
+ name: z.string().nullish(),
+})
+
+/**
+ * HitTestingSegment
+ */
+export const zHitTestingSegment = z.object({
+ answer: z.string().nullish(),
+ completed_at: z.int().nullish(),
+ content: z.string().nullish(),
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ disabled_at: z.int().nullish(),
+ disabled_by: z.string().nullish(),
+ document: zHitTestingDocument.optional(),
+ document_id: z.string().nullish(),
+ enabled: z.boolean().nullish(),
+ error: z.string().nullish(),
+ hit_count: z.int().nullish(),
+ id: z.string().nullish(),
+ index_node_hash: z.string().nullish(),
+ index_node_id: z.string().nullish(),
+ indexing_at: z.int().nullish(),
+ keywords: z.array(z.string()).optional(),
+ position: z.int().nullish(),
+ sign_content: z.string().nullish(),
+ status: z.string().nullish(),
+ stopped_at: z.int().nullish(),
+ tokens: z.int().nullish(),
+ word_count: z.int().nullish(),
+})
+
+/**
+ * HitTestingRecord
+ */
+export const zHitTestingRecord = z.object({
+ child_chunks: z.array(zHitTestingChildChunk).optional(),
+ files: z.array(zHitTestingFile).optional(),
+ score: z.number().nullish(),
+ segment: zHitTestingSegment.optional(),
+ summary: z.string().nullish(),
+ tsne_position: z.unknown().optional(),
+})
+
+/**
+ * HitTestingResponse
+ */
+export const zHitTestingResponse = z.object({
+ query: z.string(),
+ records: z.array(zHitTestingRecord).optional(),
+})
+
+/**
+ * NotionIcon
+ */
+export const zNotionIcon = z.object({
+ emoji: z.string().nullish(),
+ type: z.string(),
+ url: z.string().nullish(),
+})
+
+/**
+ * NotionPage
+ */
+export const zNotionPage = z.object({
+ page_icon: zNotionIcon.optional(),
+ page_id: z.string(),
+ page_name: z.string(),
+ type: z.string(),
+})
+
+/**
+ * NotionInfo
+ */
+export const zNotionInfo = z.object({
+ credential_id: z.string(),
+ pages: z.array(zNotionPage),
+ workspace_id: z.string(),
+})
+
+/**
+ * InfoList
+ */
+export const zInfoList = z.object({
+ data_source_type: z.enum(['upload_file', 'notion_import', 'website_crawl']),
+ file_info_list: zFileInfo.optional(),
+ notion_info_list: z.array(zNotionInfo).nullish(),
+ website_info_list: zWebsiteInfo.optional(),
+})
+
+/**
+ * DataSource
+ */
+export const zDataSource = z.object({
+ info_list: zInfoList,
+})
+
+/**
+ * KnowledgeConfig
+ */
+export const zKnowledgeConfig = z.object({
+ data_source: zDataSource.optional(),
+ doc_form: z.string().optional().default('text_model'),
+ doc_language: z.string().optional().default('English'),
+ duplicate: z.boolean().optional().default(true),
+ embedding_model: z.string().nullish(),
+ embedding_model_provider: z.string().nullish(),
+ indexing_technique: z.enum(['high_quality', 'economy']),
+ is_multimodal: z.boolean().optional().default(false),
+ name: z.string().nullish(),
+ original_document_id: z.string().nullish(),
+ process_rule: zProcessRule.optional(),
+ retrieval_model: zRetrievalModel.optional(),
+ summary_index_setting: z.record(z.string(), z.unknown()).nullish(),
+})
+
+export const zGetDatasetsQuery = z.object({
+ page: z.string().optional(),
+ limit: z.string().optional(),
+ ids: z.string().optional(),
+ keyword: z.string().optional(),
+ tag_ids: z.string().optional(),
+ include_all: z.string().optional(),
+})
+
+/**
+ * Datasets retrieved successfully
+ */
+export const zGetDatasetsResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsBody = zDatasetCreatePayload
+
+/**
+ * Dataset created successfully
+ */
+export const zPostDatasetsResponse = z.record(z.string(), z.unknown())
+
+/**
+ * API base info retrieved successfully
+ */
+export const zGetDatasetsApiBaseInfoResponse = z.record(z.string(), z.unknown())
+
+/**
+ * API keys retrieved successfully
+ */
+export const zGetDatasetsApiKeysResponse = zApiKeyList
+
+/**
+ * API key created successfully
+ */
+export const zPostDatasetsApiKeysResponse = zApiKeyItem
+
+export const zDeleteDatasetsApiKeysByApiKeyIdPath = z.object({
+ api_key_id: z.string(),
+})
+
+/**
+ * API key deleted successfully
+ */
+export const zDeleteDatasetsApiKeysByApiKeyIdResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsBatchImportStatusByJobIdPath = z.object({
+ job_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsBatchImportStatusByJobIdResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsBatchImportStatusByJobIdBody = zBatchImportPayload
+
+export const zPostDatasetsBatchImportStatusByJobIdPath = z.object({
+ job_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostDatasetsBatchImportStatusByJobIdResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsExternalBody = zExternalDatasetCreatePayload
+
+/**
+ * External dataset created successfully
+ */
+export const zPostDatasetsExternalResponse = zDatasetDetail
+
+export const zGetDatasetsExternalKnowledgeApiQuery = z.object({
+ page: z.string().optional(),
+ limit: z.string().optional(),
+ keyword: z.string().optional(),
+})
+
+/**
+ * External API templates retrieved successfully
+ */
+export const zGetDatasetsExternalKnowledgeApiResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsExternalKnowledgeApiBody = zExternalKnowledgeApiPayload
+
+/**
+ * Success
+ */
+export const zPostDatasetsExternalKnowledgeApiResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath = z.object({
+ external_knowledge_api_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath = z.object({
+ external_knowledge_api_id: z.string(),
+})
+
+/**
+ * External API template retrieved successfully
+ */
+export const zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdBody
+ = zExternalKnowledgeApiPayload
+
+export const zPatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdPath = z.object({
+ external_knowledge_api_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckPath = z.object({
+ external_knowledge_api_id: z.string(),
+})
+
+/**
+ * Usage check completed successfully
+ */
+export const zGetDatasetsExternalKnowledgeApiByExternalKnowledgeApiIdUseCheckResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsIndexingEstimateBody = zIndexingEstimatePayload
+
+/**
+ * Indexing estimate calculated successfully
+ */
+export const zPostDatasetsIndexingEstimateResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsInitBody = zKnowledgeConfig
+
+/**
+ * Dataset initialized successfully
+ */
+export const zPostDatasetsInitResponse = zDatasetAndDocumentResponse
+
+/**
+ * Success
+ */
+export const zGetDatasetsMetadataBuiltInResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetDatasetsNotionIndexingEstimateResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsNotionIndexingEstimateBody = zNotionEstimatePayload
+
+/**
+ * Success
+ */
+export const zPostDatasetsNotionIndexingEstimateResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsProcessRuleQuery = z.object({
+ document_id: z.string().optional(),
+})
+
+/**
+ * Process rules retrieved successfully
+ */
+export const zGetDatasetsProcessRuleResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Retrieval settings retrieved successfully
+ */
+export const zGetDatasetsRetrievalSettingResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsRetrievalSettingByVectorTypePath = z.object({
+ vector_type: z.string(),
+})
+
+/**
+ * Mock retrieval settings retrieved successfully
+ */
+export const zGetDatasetsRetrievalSettingByVectorTypeResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteDatasetsByDatasetIdPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteDatasetsByDatasetIdResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Dataset retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdResponse = zDatasetDetail
+
+export const zPatchDatasetsByDatasetIdBody = zDatasetUpdatePayload
+
+export const zPatchDatasetsByDatasetIdPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Dataset updated successfully
+ */
+export const zPatchDatasetsByDatasetIdResponse = zDatasetDetail
+
+export const zPostDatasetsByDatasetIdApiKeysByStatusPath = z.object({
+ dataset_id: z.string(),
+ status: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostDatasetsByDatasetIdApiKeysByStatusResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdAutoDisableLogsPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Auto disable logs retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdAutoDisableLogsResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdBatchByBatchIndexingEstimatePath = z.object({
+ dataset_id: z.string(),
+ batch: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdBatchByBatchIndexingEstimateResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdBatchByBatchIndexingStatusPath = z.object({
+ dataset_id: z.string(),
+ batch: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdBatchByBatchIndexingStatusResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteDatasetsByDatasetIdDocumentsPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteDatasetsByDatasetIdDocumentsResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdDocumentsPath = z.object({
+ dataset_id: z.string(),
+})
+
+export const zGetDatasetsByDatasetIdDocumentsQuery = z.object({
+ page: z.string().optional(),
+ limit: z.string().optional(),
+ keyword: z.string().optional(),
+ sort: z.string().optional(),
+ fetch: z.string().optional(),
+ status: z.string().optional(),
+})
+
+/**
+ * Documents retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdDocumentsBody = zKnowledgeConfig
+
+export const zPostDatasetsByDatasetIdDocumentsPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Documents created successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsResponse = zDatasetAndDocumentResponse
+
+export const zPostDatasetsByDatasetIdDocumentsDownloadZipBody = zDocumentBatchDownloadZipPayload
+
+export const zPostDatasetsByDatasetIdDocumentsDownloadZipPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostDatasetsByDatasetIdDocumentsDownloadZipResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsGenerateSummaryBody = zGenerateSummaryPayload
+
+export const zPostDatasetsByDatasetIdDocumentsGenerateSummaryPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Summary generation started successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsGenerateSummaryResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsMetadataBody = zMetadataOperationData
+
+export const zPostDatasetsByDatasetIdDocumentsMetadataPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostDatasetsByDatasetIdDocumentsMetadataResponse = z.record(z.string(), z.unknown())
+
+export const zPatchDatasetsByDatasetIdDocumentsStatusByActionBatchPath = z.object({
+ dataset_id: z.string(),
+ action: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchDatasetsByDatasetIdDocumentsStatusByActionBatchResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdQuery = z.object({
+ metadata: z.string().optional(),
+})
+
+/**
+ * Document retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimatePath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Indexing estimate calculated successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingEstimateResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Indexing status retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdIndexingStatusResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataBody
+ = zDocumentMetadataUpdatePayload
+
+export const zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Document metadata updated successfully
+ */
+export const zPutDatasetsByDatasetIdDocumentsByDocumentIdMetadataResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdNotionSyncResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdPipelineExecutionLogResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPausePath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingPauseResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumePath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingResumeResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ action: z.string(),
+})
+
+/**
+ * Processing status updated successfully
+ */
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdProcessingByActionResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdRenameBody = zDocumentRenamePayload
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdRenamePath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Document renamed successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdRenameResponse = zDocumentResponse
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentBody = zSegmentCreatePayload
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ action: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentByActionResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportBody
+ = zBatchImportPayload
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBatchImportResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdBody
+ = zSegmentUpdatePayload
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath
+ = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath
+ = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksBody
+ = zChildChunkCreatePayload
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath
+ = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = z.record(z.string(), z.unknown())
+
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath
+ = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+ child_chunk_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdBody
+ = zChildChunkUpdatePayload
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath
+ = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+ child_chunk_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Summary status retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSummaryStatusResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdWebsiteSyncResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdErrorDocsPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Error documents retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdErrorDocsResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdExternalHitTestingBody = zExternalHitTestingPayload
+
+export const zPostDatasetsByDatasetIdExternalHitTestingPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * External hit testing completed successfully
+ */
+export const zPostDatasetsByDatasetIdExternalHitTestingResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdHitTestingBody = zHitTestingPayload
+
+export const zPostDatasetsByDatasetIdHitTestingPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Hit testing completed successfully
+ */
+export const zPostDatasetsByDatasetIdHitTestingResponse = zHitTestingResponse
+
+export const zGetDatasetsByDatasetIdIndexingStatusPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Indexing status retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdIndexingStatusResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdMetadataPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdMetadataResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdMetadataBody = zMetadataArgs
+
+export const zPostDatasetsByDatasetIdMetadataPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostDatasetsByDatasetIdMetadataResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdMetadataBuiltInByActionPath = z.object({
+ dataset_id: z.string(),
+ action: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostDatasetsByDatasetIdMetadataBuiltInByActionResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdPath = z.object({
+ dataset_id: z.string(),
+ metadata_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchDatasetsByDatasetIdMetadataByMetadataIdBody = zMetadataUpdatePayload
+
+export const zPatchDatasetsByDatasetIdMetadataByMetadataIdPath = z.object({
+ dataset_id: z.string(),
+ metadata_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchDatasetsByDatasetIdMetadataByMetadataIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdNotionSyncPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetDatasetsByDatasetIdNotionSyncResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdPermissionPartUsersPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Permission users retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdPermissionPartUsersResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdQueriesPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Query history retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdQueriesResponse = zDatasetQueryDetail
+
+export const zGetDatasetsByDatasetIdRelatedAppsPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Related apps retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdRelatedAppsResponse = zRelatedAppList
+
+export const zPostDatasetsByDatasetIdRetryBody = zDocumentRetryPayload
+
+export const zPostDatasetsByDatasetIdRetryPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostDatasetsByDatasetIdRetryResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdUseCheckPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Dataset use status retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdUseCheckResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByResourceIdApiKeysPath = z.object({
+ resource_id: z.string(),
+})
+
+/**
+ * API keys retrieved successfully
+ */
+export const zGetDatasetsByResourceIdApiKeysResponse = zApiKeyList
+
+export const zPostDatasetsByResourceIdApiKeysPath = z.object({
+ resource_id: z.string(),
+})
+
+/**
+ * API key created successfully
+ */
+export const zPostDatasetsByResourceIdApiKeysResponse = zApiKeyItem
+
+export const zDeleteDatasetsByResourceIdApiKeysByApiKeyIdPath = z.object({
+ resource_id: z.string(),
+ api_key_id: z.string(),
+})
+
+/**
+ * API key deleted successfully
+ */
+export const zDeleteDatasetsByResourceIdApiKeysByApiKeyIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
diff --git a/packages/contracts/generated/api/console/email-code-login/orpc.gen.ts b/packages/contracts/generated/api/console/email-code-login/orpc.gen.ts
new file mode 100644
index 00000000000..54edabc29f9
--- /dev/null
+++ b/packages/contracts/generated/api/console/email-code-login/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/email-code-login/types.gen.ts b/packages/contracts/generated/api/console/email-code-login/types.gen.ts
new file mode 100644
index 00000000000..851a8d568d5
--- /dev/null
+++ b/packages/contracts/generated/api/console/email-code-login/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/email-code-login/zod.gen.ts b/packages/contracts/generated/api/console/email-code-login/zod.gen.ts
new file mode 100644
index 00000000000..0ff511c7220
--- /dev/null
+++ b/packages/contracts/generated/api/console/email-code-login/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/email-register/orpc.gen.ts b/packages/contracts/generated/api/console/email-register/orpc.gen.ts
new file mode 100644
index 00000000000..0bd724aba99
--- /dev/null
+++ b/packages/contracts/generated/api/console/email-register/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/email-register/types.gen.ts b/packages/contracts/generated/api/console/email-register/types.gen.ts
new file mode 100644
index 00000000000..3fe5129fbf3
--- /dev/null
+++ b/packages/contracts/generated/api/console/email-register/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/email-register/zod.gen.ts b/packages/contracts/generated/api/console/email-register/zod.gen.ts
new file mode 100644
index 00000000000..11720317f23
--- /dev/null
+++ b/packages/contracts/generated/api/console/email-register/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/explore/orpc.gen.ts b/packages/contracts/generated/api/console/explore/orpc.gen.ts
new file mode 100644
index 00000000000..4b37a0a4fdd
--- /dev/null
+++ b/packages/contracts/generated/api/console/explore/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/explore/types.gen.ts b/packages/contracts/generated/api/console/explore/types.gen.ts
new file mode 100644
index 00000000000..db56dbdac0c
--- /dev/null
+++ b/packages/contracts/generated/api/console/explore/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/explore/zod.gen.ts b/packages/contracts/generated/api/console/explore/zod.gen.ts
new file mode 100644
index 00000000000..2ceb54e7bd4
--- /dev/null
+++ b/packages/contracts/generated/api/console/explore/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/features/orpc.gen.ts b/packages/contracts/generated/api/console/features/orpc.gen.ts
new file mode 100644
index 00000000000..e24ec3d9642
--- /dev/null
+++ b/packages/contracts/generated/api/console/features/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/features/types.gen.ts b/packages/contracts/generated/api/console/features/types.gen.ts
new file mode 100644
index 00000000000..eed18d53446
--- /dev/null
+++ b/packages/contracts/generated/api/console/features/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/features/zod.gen.ts b/packages/contracts/generated/api/console/features/zod.gen.ts
new file mode 100644
index 00000000000..1e967fb8793
--- /dev/null
+++ b/packages/contracts/generated/api/console/features/zod.gen.ts
@@ -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
diff --git a/packages/contracts/generated/api/console/files/orpc.gen.ts b/packages/contracts/generated/api/console/files/orpc.gen.ts
new file mode 100644
index 00000000000..2ee949edc20
--- /dev/null
+++ b/packages/contracts/generated/api/console/files/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/files/types.gen.ts b/packages/contracts/generated/api/console/files/types.gen.ts
new file mode 100644
index 00000000000..5620235461b
--- /dev/null
+++ b/packages/contracts/generated/api/console/files/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/files/zod.gen.ts b/packages/contracts/generated/api/console/files/zod.gen.ts
new file mode 100644
index 00000000000..d61e7795ce3
--- /dev/null
+++ b/packages/contracts/generated/api/console/files/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/forgot-password/orpc.gen.ts b/packages/contracts/generated/api/console/forgot-password/orpc.gen.ts
new file mode 100644
index 00000000000..a5a33f407b6
--- /dev/null
+++ b/packages/contracts/generated/api/console/forgot-password/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/forgot-password/types.gen.ts b/packages/contracts/generated/api/console/forgot-password/types.gen.ts
new file mode 100644
index 00000000000..b58165c8eb1
--- /dev/null
+++ b/packages/contracts/generated/api/console/forgot-password/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/forgot-password/zod.gen.ts b/packages/contracts/generated/api/console/forgot-password/zod.gen.ts
new file mode 100644
index 00000000000..fdbb7b033d2
--- /dev/null
+++ b/packages/contracts/generated/api/console/forgot-password/zod.gen.ts
@@ -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
diff --git a/packages/contracts/generated/api/console/form/orpc.gen.ts b/packages/contracts/generated/api/console/form/orpc.gen.ts
new file mode 100644
index 00000000000..f6d76b28c06
--- /dev/null
+++ b/packages/contracts/generated/api/console/form/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/form/types.gen.ts b/packages/contracts/generated/api/console/form/types.gen.ts
new file mode 100644
index 00000000000..80c0c1a474b
--- /dev/null
+++ b/packages/contracts/generated/api/console/form/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/form/zod.gen.ts b/packages/contracts/generated/api/console/form/zod.gen.ts
new file mode 100644
index 00000000000..840b04383e9
--- /dev/null
+++ b/packages/contracts/generated/api/console/form/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/info/orpc.gen.ts b/packages/contracts/generated/api/console/info/orpc.gen.ts
new file mode 100644
index 00000000000..4eb342e9cf7
--- /dev/null
+++ b/packages/contracts/generated/api/console/info/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/info/types.gen.ts b/packages/contracts/generated/api/console/info/types.gen.ts
new file mode 100644
index 00000000000..975f887a995
--- /dev/null
+++ b/packages/contracts/generated/api/console/info/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/info/zod.gen.ts b/packages/contracts/generated/api/console/info/zod.gen.ts
new file mode 100644
index 00000000000..adb1ea23f22
--- /dev/null
+++ b/packages/contracts/generated/api/console/info/zod.gen.ts
@@ -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
diff --git a/packages/contracts/generated/api/console/installed-apps/orpc.gen.ts b/packages/contracts/generated/api/console/installed-apps/orpc.gen.ts
new file mode 100644
index 00000000000..c2b0b2eb37c
--- /dev/null
+++ b/packages/contracts/generated/api/console/installed-apps/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/installed-apps/types.gen.ts b/packages/contracts/generated/api/console/installed-apps/types.gen.ts
new file mode 100644
index 00000000000..897fc29b8bc
--- /dev/null
+++ b/packages/contracts/generated/api/console/installed-apps/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/installed-apps/zod.gen.ts b/packages/contracts/generated/api/console/installed-apps/zod.gen.ts
new file mode 100644
index 00000000000..c8683e092c0
--- /dev/null
+++ b/packages/contracts/generated/api/console/installed-apps/zod.gen.ts
@@ -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(),
+)
diff --git a/packages/contracts/generated/api/console/instruction-generate/orpc.gen.ts b/packages/contracts/generated/api/console/instruction-generate/orpc.gen.ts
new file mode 100644
index 00000000000..3aff6a9a3b6
--- /dev/null
+++ b/packages/contracts/generated/api/console/instruction-generate/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/instruction-generate/types.gen.ts b/packages/contracts/generated/api/console/instruction-generate/types.gen.ts
new file mode 100644
index 00000000000..1dd3530d44d
--- /dev/null
+++ b/packages/contracts/generated/api/console/instruction-generate/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/instruction-generate/zod.gen.ts b/packages/contracts/generated/api/console/instruction-generate/zod.gen.ts
new file mode 100644
index 00000000000..35135fdcf70
--- /dev/null
+++ b/packages/contracts/generated/api/console/instruction-generate/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/login/orpc.gen.ts b/packages/contracts/generated/api/console/login/orpc.gen.ts
new file mode 100644
index 00000000000..b8e647a11d8
--- /dev/null
+++ b/packages/contracts/generated/api/console/login/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/login/types.gen.ts b/packages/contracts/generated/api/console/login/types.gen.ts
new file mode 100644
index 00000000000..8646c56c2a5
--- /dev/null
+++ b/packages/contracts/generated/api/console/login/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/login/zod.gen.ts b/packages/contracts/generated/api/console/login/zod.gen.ts
new file mode 100644
index 00000000000..612ab8d3bef
--- /dev/null
+++ b/packages/contracts/generated/api/console/login/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/logout/orpc.gen.ts b/packages/contracts/generated/api/console/logout/orpc.gen.ts
new file mode 100644
index 00000000000..02ecd2c82d2
--- /dev/null
+++ b/packages/contracts/generated/api/console/logout/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/logout/types.gen.ts b/packages/contracts/generated/api/console/logout/types.gen.ts
new file mode 100644
index 00000000000..9834d78dc16
--- /dev/null
+++ b/packages/contracts/generated/api/console/logout/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/logout/zod.gen.ts b/packages/contracts/generated/api/console/logout/zod.gen.ts
new file mode 100644
index 00000000000..2e2be212647
--- /dev/null
+++ b/packages/contracts/generated/api/console/logout/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/mcp/orpc.gen.ts b/packages/contracts/generated/api/console/mcp/orpc.gen.ts
new file mode 100644
index 00000000000..211e8cb2f27
--- /dev/null
+++ b/packages/contracts/generated/api/console/mcp/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/mcp/types.gen.ts b/packages/contracts/generated/api/console/mcp/types.gen.ts
new file mode 100644
index 00000000000..4e96a663934
--- /dev/null
+++ b/packages/contracts/generated/api/console/mcp/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/mcp/zod.gen.ts b/packages/contracts/generated/api/console/mcp/zod.gen.ts
new file mode 100644
index 00000000000..ade0c01f7ac
--- /dev/null
+++ b/packages/contracts/generated/api/console/mcp/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/notification/orpc.gen.ts b/packages/contracts/generated/api/console/notification/orpc.gen.ts
new file mode 100644
index 00000000000..f7125346cfb
--- /dev/null
+++ b/packages/contracts/generated/api/console/notification/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/notification/types.gen.ts b/packages/contracts/generated/api/console/notification/types.gen.ts
new file mode 100644
index 00000000000..8fe661016bf
--- /dev/null
+++ b/packages/contracts/generated/api/console/notification/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/notification/zod.gen.ts b/packages/contracts/generated/api/console/notification/zod.gen.ts
new file mode 100644
index 00000000000..c17e436ed91
--- /dev/null
+++ b/packages/contracts/generated/api/console/notification/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/notion/orpc.gen.ts b/packages/contracts/generated/api/console/notion/orpc.gen.ts
new file mode 100644
index 00000000000..b8de9e89f21
--- /dev/null
+++ b/packages/contracts/generated/api/console/notion/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/notion/types.gen.ts b/packages/contracts/generated/api/console/notion/types.gen.ts
new file mode 100644
index 00000000000..c616a222861
--- /dev/null
+++ b/packages/contracts/generated/api/console/notion/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/notion/zod.gen.ts b/packages/contracts/generated/api/console/notion/zod.gen.ts
new file mode 100644
index 00000000000..0aad7b682c1
--- /dev/null
+++ b/packages/contracts/generated/api/console/notion/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/oauth/orpc.gen.ts b/packages/contracts/generated/api/console/oauth/orpc.gen.ts
new file mode 100644
index 00000000000..b9a57e3e88d
--- /dev/null
+++ b/packages/contracts/generated/api/console/oauth/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/oauth/types.gen.ts b/packages/contracts/generated/api/console/oauth/types.gen.ts
new file mode 100644
index 00000000000..7091cdab7c1
--- /dev/null
+++ b/packages/contracts/generated/api/console/oauth/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/oauth/zod.gen.ts b/packages/contracts/generated/api/console/oauth/zod.gen.ts
new file mode 100644
index 00000000000..22f2c4bd769
--- /dev/null
+++ b/packages/contracts/generated/api/console/oauth/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/rag/orpc.gen.ts b/packages/contracts/generated/api/console/rag/orpc.gen.ts
new file mode 100644
index 00000000000..a642a91ba17
--- /dev/null
+++ b/packages/contracts/generated/api/console/rag/orpc.gen.ts
@@ -0,0 +1,1230 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zDeleteRagPipelineCustomizedTemplatesByTemplateIdPath,
+ zDeleteRagPipelineCustomizedTemplatesByTemplateIdResponse,
+ zDeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdPath,
+ zDeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse,
+ zDeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesPath,
+ zDeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponse,
+ zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdPath,
+ zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse,
+ zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesPath,
+ zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesResponse,
+ zGetRagPipelinesByPipelineIdExportsPath,
+ zGetRagPipelinesByPipelineIdExportsResponse,
+ zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsPath,
+ zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsResponse,
+ zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdPath,
+ zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdResponse,
+ zGetRagPipelinesByPipelineIdWorkflowRunsPath,
+ zGetRagPipelinesByPipelineIdWorkflowRunsResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypePath,
+ zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesPath,
+ zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsPath,
+ zGetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersPath,
+ zGetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersPath,
+ zGetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsPublishPath,
+ zGetRagPipelinesByPipelineIdWorkflowsPublishResponse,
+ zGetRagPipelinesByPipelineIdWorkflowsResponse,
+ zGetRagPipelinesDatasourcePluginsResponse,
+ zGetRagPipelinesImportsByPipelineIdCheckDependenciesPath,
+ zGetRagPipelinesImportsByPipelineIdCheckDependenciesResponse,
+ zGetRagPipelinesRecommendedPluginsResponse,
+ zGetRagPipelineTemplatesByTemplateIdPath,
+ zGetRagPipelineTemplatesByTemplateIdResponse,
+ zGetRagPipelineTemplatesResponse,
+ zPatchRagPipelineCustomizedTemplatesByTemplateIdPath,
+ zPatchRagPipelineCustomizedTemplatesByTemplateIdResponse,
+ zPatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdPath,
+ zPatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse,
+ zPatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdPath,
+ zPatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse,
+ zPostRagPipelineCustomizedTemplatesByTemplateIdPath,
+ zPostRagPipelineCustomizedTemplatesByTemplateIdResponse,
+ zPostRagPipelineDatasetBody,
+ zPostRagPipelineDatasetResponse,
+ zPostRagPipelineEmptyDatasetResponse,
+ zPostRagPipelinesByPipelineIdCustomizedPublishBody,
+ zPostRagPipelinesByPipelineIdCustomizedPublishPath,
+ zPostRagPipelinesByPipelineIdCustomizedPublishResponse,
+ zPostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopPath,
+ zPostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestorePath,
+ zPostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestoreResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunBody,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunPath,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectBody,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectPath,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunBody,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunPath,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunBody,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunPath,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunBody,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunPath,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftPath,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftRunBody,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftRunPath,
+ zPostRagPipelinesByPipelineIdWorkflowsDraftRunResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewBody,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewPath,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunBody,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunPath,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishedRunBody,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishedRunPath,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishedRunResponse,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishPath,
+ zPostRagPipelinesByPipelineIdWorkflowsPublishResponse,
+ zPostRagPipelinesImportsBody,
+ zPostRagPipelinesImportsByImportIdConfirmPath,
+ zPostRagPipelinesImportsByImportIdConfirmResponse,
+ zPostRagPipelinesImportsResponse,
+ zPostRagPipelinesTransformDatasetsByDatasetIdPath,
+ zPostRagPipelinesTransformDatasetsByDatasetIdResponse,
+ zPutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetPath,
+ zPutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetResponse,
+} from './zod.gen'
+
+export const delete_ = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteRagPipelineCustomizedTemplatesByTemplateId',
+ path: '/rag/pipeline/customized/templates/{template_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteRagPipelineCustomizedTemplatesByTemplateIdPath }))
+ .output(zDeleteRagPipelineCustomizedTemplatesByTemplateIdResponse)
+
+export const patch = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchRagPipelineCustomizedTemplatesByTemplateId',
+ path: '/rag/pipeline/customized/templates/{template_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPatchRagPipelineCustomizedTemplatesByTemplateIdPath }))
+ .output(zPatchRagPipelineCustomizedTemplatesByTemplateIdResponse)
+
+export const post = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelineCustomizedTemplatesByTemplateId',
+ path: '/rag/pipeline/customized/templates/{template_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostRagPipelineCustomizedTemplatesByTemplateIdPath }))
+ .output(zPostRagPipelineCustomizedTemplatesByTemplateIdResponse)
+
+export const byTemplateId = {
+ delete: delete_,
+ patch,
+ post,
+}
+
+export const templates = {
+ byTemplateId,
+}
+
+export const customized = {
+ templates,
+}
+
+export const post2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelineDataset',
+ path: '/rag/pipeline/dataset',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostRagPipelineDatasetBody }))
+ .output(zPostRagPipelineDatasetResponse)
+
+export const dataset = {
+ post: post2,
+}
+
+export const post3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelineEmptyDataset',
+ path: '/rag/pipeline/empty-dataset',
+ tags: ['console'],
+ })
+ .output(zPostRagPipelineEmptyDatasetResponse)
+
+export const emptyDataset = {
+ post: post3,
+}
+
+export const get = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelineTemplatesByTemplateId',
+ path: '/rag/pipeline/templates/{template_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelineTemplatesByTemplateIdPath }))
+ .output(zGetRagPipelineTemplatesByTemplateIdResponse)
+
+export const byTemplateId2 = {
+ get,
+}
+
+export const get2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelineTemplates',
+ path: '/rag/pipeline/templates',
+ tags: ['console'],
+ })
+ .output(zGetRagPipelineTemplatesResponse)
+
+export const templates2 = {
+ get: get2,
+ byTemplateId: byTemplateId2,
+}
+
+export const pipeline = {
+ customized,
+ dataset,
+ emptyDataset,
+ templates: templates2,
+}
+
+export const get3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesDatasourcePlugins',
+ path: '/rag/pipelines/datasource-plugins',
+ tags: ['console'],
+ })
+ .output(zGetRagPipelinesDatasourcePluginsResponse)
+
+export const datasourcePlugins = {
+ get: get3,
+}
+
+export const post4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesImportsByImportIdConfirm',
+ path: '/rag/pipelines/imports/{import_id}/confirm',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostRagPipelinesImportsByImportIdConfirmPath }))
+ .output(zPostRagPipelinesImportsByImportIdConfirmResponse)
+
+export const confirm = {
+ post: post4,
+}
+
+export const byImportId = {
+ confirm,
+}
+
+export const get4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesImportsByPipelineIdCheckDependencies',
+ path: '/rag/pipelines/imports/{pipeline_id}/check-dependencies',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesImportsByPipelineIdCheckDependenciesPath }))
+ .output(zGetRagPipelinesImportsByPipelineIdCheckDependenciesResponse)
+
+export const checkDependencies = {
+ get: get4,
+}
+
+export const byPipelineId = {
+ checkDependencies,
+}
+
+export const post5 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesImports',
+ path: '/rag/pipelines/imports',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostRagPipelinesImportsBody }))
+ .output(zPostRagPipelinesImportsResponse)
+
+export const imports = {
+ post: post5,
+ byImportId,
+ byPipelineId,
+}
+
+export const get5 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesRecommendedPlugins',
+ path: '/rag/pipelines/recommended-plugins',
+ tags: ['console'],
+ })
+ .output(zGetRagPipelinesRecommendedPluginsResponse)
+
+export const recommendedPlugins = {
+ get: get5,
+}
+
+export const post6 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesTransformDatasetsByDatasetId',
+ path: '/rag/pipelines/transform/datasets/{dataset_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostRagPipelinesTransformDatasetsByDatasetIdPath }))
+ .output(zPostRagPipelinesTransformDatasetsByDatasetIdResponse)
+
+export const byDatasetId = {
+ post: post6,
+}
+
+export const datasets = {
+ byDatasetId,
+}
+
+export const transform = {
+ datasets,
+}
+
+export const post7 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdCustomizedPublish',
+ path: '/rag/pipelines/{pipeline_id}/customized/publish',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdCustomizedPublishBody,
+ params: zPostRagPipelinesByPipelineIdCustomizedPublishPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdCustomizedPublishResponse)
+
+export const publish = {
+ post: post7,
+}
+
+export const customized2 = {
+ publish,
+}
+
+export const get6 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdExports',
+ path: '/rag/pipelines/{pipeline_id}/exports',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdExportsPath }))
+ .output(zGetRagPipelinesByPipelineIdExportsResponse)
+
+export const exports_ = {
+ get: get6,
+}
+
+/**
+ * Stop workflow task
+ */
+export const post8 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStop',
+ path: '/rag/pipelines/{pipeline_id}/workflow-runs/tasks/{task_id}/stop',
+ summary: 'Stop workflow task',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopPath }))
+ .output(zPostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopResponse)
+
+export const stop = {
+ post: post8,
+}
+
+export const byTaskId = {
+ stop,
+}
+
+export const tasks = {
+ byTaskId,
+}
+
+/**
+ * Get workflow run node execution list
+ */
+export const get7 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutions',
+ path: '/rag/pipelines/{pipeline_id}/workflow-runs/{run_id}/node-executions',
+ summary: 'Get workflow run node execution list',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsResponse)
+
+export const nodeExecutions = {
+ get: get7,
+}
+
+/**
+ * Get workflow run detail
+ */
+export const get8 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowRunsByRunId',
+ path: '/rag/pipelines/{pipeline_id}/workflow-runs/{run_id}',
+ summary: 'Get workflow run detail',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowRunsByRunIdResponse)
+
+export const byRunId = {
+ get: get8,
+ nodeExecutions,
+}
+
+/**
+ * Get workflow run list
+ */
+export const get9 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowRuns',
+ path: '/rag/pipelines/{pipeline_id}/workflow-runs',
+ summary: 'Get workflow run list',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowRunsPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowRunsResponse)
+
+export const workflowRuns = {
+ get: get9,
+ tasks,
+ byRunId,
+}
+
+/**
+ * Get default block config
+ */
+export const get10 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockType',
+ path: '/rag/pipelines/{pipeline_id}/workflows/default-workflow-block-configs/{block_type}',
+ summary: 'Get default block config',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypePath,
+ }),
+ )
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse)
+
+export const byBlockType = {
+ get: get10,
+}
+
+/**
+ * Get default block config
+ */
+export const get11 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigs',
+ path: '/rag/pipelines/{pipeline_id}/workflows/default-workflow-block-configs',
+ summary: 'Get default block config',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsResponse)
+
+export const defaultWorkflowBlockConfigs = {
+ get: get11,
+ byBlockType,
+}
+
+/**
+ * Run rag pipeline datasource
+ */
+export const post9 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRun',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/datasource/nodes/{node_id}/run',
+ summary: 'Run rag pipeline datasource',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunBody,
+ params: zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunResponse)
+
+export const run = {
+ post: post9,
+}
+
+export const byNodeId = {
+ run,
+}
+
+export const nodes = {
+ byNodeId,
+}
+
+/**
+ * Set datasource variables
+ */
+export const post10 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspect',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/datasource/variables-inspect',
+ summary: 'Set datasource variables',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectBody,
+ params: zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectResponse)
+
+export const variablesInspect = {
+ post: post10,
+}
+
+export const datasource = {
+ nodes,
+ variablesInspect,
+}
+
+export const get12 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariables',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/environment-variables',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesResponse)
+
+export const environmentVariables = {
+ get: get12,
+}
+
+/**
+ * Run draft workflow iteration node
+ */
+export const post11 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRun',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/iteration/nodes/{node_id}/run',
+ summary: 'Run draft workflow iteration node',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunBody,
+ params: zPostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunResponse)
+
+export const run2 = {
+ post: post11,
+}
+
+export const byNodeId2 = {
+ run: run2,
+}
+
+export const nodes2 = {
+ byNodeId: byNodeId2,
+}
+
+export const iteration = {
+ nodes: nodes2,
+}
+
+/**
+ * Run draft workflow loop node
+ */
+export const post12 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRun',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/loop/nodes/{node_id}/run',
+ summary: 'Run draft workflow loop node',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunBody,
+ params: zPostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunResponse)
+
+export const run3 = {
+ post: post12,
+}
+
+export const byNodeId3 = {
+ run: run3,
+}
+
+export const nodes3 = {
+ byNodeId: byNodeId3,
+}
+
+export const loop = {
+ nodes: nodes3,
+}
+
+export const get13 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRun',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/last-run',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunResponse)
+
+export const lastRun = {
+ get: get13,
+}
+
+/**
+ * Run draft workflow node
+ */
+export const post13 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRun',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/run',
+ summary: 'Run draft workflow node',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunBody,
+ params: zPostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunResponse)
+
+export const run4 = {
+ post: post13,
+}
+
+export const delete2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariables',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/variables',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zDeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesPath }),
+ )
+ .output(zDeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponse)
+
+export const get14 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariables',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/variables',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponse)
+
+export const variables = {
+ delete: delete2,
+ get: get14,
+}
+
+export const byNodeId4 = {
+ lastRun,
+ run: run4,
+ variables,
+}
+
+export const nodes4 = {
+ byNodeId: byNodeId4,
+}
+
+/**
+ * Get first step parameters of rag pipeline
+ */
+export const get15 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParameters',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/pre-processing/parameters',
+ summary: 'Get first step parameters of rag pipeline',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersPath }),
+ )
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersResponse)
+
+export const parameters = {
+ get: get15,
+}
+
+export const preProcessing = {
+ parameters,
+}
+
+/**
+ * Get second step parameters of rag pipeline
+ */
+export const get16 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDraftProcessingParameters',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/processing/parameters',
+ summary: 'Get second step parameters of rag pipeline',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersResponse)
+
+export const parameters2 = {
+ get: get16,
+}
+
+export const processing = {
+ parameters: parameters2,
+}
+
+/**
+ * Run draft workflow
+ */
+export const post14 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsDraftRun',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/run',
+ summary: 'Run draft workflow',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdWorkflowsDraftRunBody,
+ params: zPostRagPipelinesByPipelineIdWorkflowsDraftRunPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdWorkflowsDraftRunResponse)
+
+export const run5 = {
+ post: post14,
+}
+
+export const get17 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDraftSystemVariables',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/system-variables',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesResponse)
+
+export const systemVariables = {
+ get: get17,
+}
+
+export const put = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdReset',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}/reset',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zPutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetPath }),
+ )
+ .output(zPutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetResponse)
+
+export const reset = {
+ put,
+}
+
+export const delete3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableId',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdPath }),
+ )
+ .output(zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse)
+
+export const get18 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableId',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse)
+
+export const patch2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableId',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zPatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdPath }),
+ )
+ .output(zPatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse)
+
+export const byVariableId = {
+ delete: delete3,
+ get: get18,
+ patch: patch2,
+ reset,
+}
+
+export const delete4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteRagPipelinesByPipelineIdWorkflowsDraftVariables',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/variables',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesPath }))
+ .output(zDeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesResponse)
+
+export const get19 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDraftVariables',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft/variables',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDraftVariablesResponse)
+
+export const variables2 = {
+ delete: delete4,
+ get: get19,
+ byVariableId,
+}
+
+/**
+ * Get draft rag pipeline's workflow
+ */
+export const get20 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsDraft',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft',
+ summary: 'Get draft rag pipeline\'s workflow',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsDraftPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsDraftResponse)
+
+/**
+ * Sync draft workflow
+ */
+export const post15 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsDraft',
+ path: '/rag/pipelines/{pipeline_id}/workflows/draft',
+ summary: 'Sync draft workflow',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostRagPipelinesByPipelineIdWorkflowsDraftPath }))
+ .output(zPostRagPipelinesByPipelineIdWorkflowsDraftResponse)
+
+export const draft = {
+ get: get20,
+ post: post15,
+ datasource,
+ environmentVariables,
+ iteration,
+ loop,
+ nodes: nodes4,
+ preProcessing,
+ processing,
+ run: run5,
+ systemVariables,
+ variables: variables2,
+}
+
+/**
+ * Get published pipeline
+ */
+export const get21 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsPublish',
+ path: '/rag/pipelines/{pipeline_id}/workflows/publish',
+ summary: 'Get published pipeline',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsPublishPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsPublishResponse)
+
+/**
+ * Publish workflow
+ */
+export const post16 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsPublish',
+ path: '/rag/pipelines/{pipeline_id}/workflows/publish',
+ summary: 'Publish workflow',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostRagPipelinesByPipelineIdWorkflowsPublishPath }))
+ .output(zPostRagPipelinesByPipelineIdWorkflowsPublishResponse)
+
+export const publish2 = {
+ get: get21,
+ post: post16,
+}
+
+/**
+ * Run datasource content preview
+ */
+export const post17 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreview',
+ path: '/rag/pipelines/{pipeline_id}/workflows/published/datasource/nodes/{node_id}/preview',
+ summary: 'Run datasource content preview',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewBody,
+ params: zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewResponse)
+
+export const preview = {
+ post: post17,
+}
+
+/**
+ * Run rag pipeline datasource
+ */
+export const post18 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRun',
+ path: '/rag/pipelines/{pipeline_id}/workflows/published/datasource/nodes/{node_id}/run',
+ summary: 'Run rag pipeline datasource',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunBody,
+ params: zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunResponse)
+
+export const run6 = {
+ post: post18,
+}
+
+export const byNodeId5 = {
+ preview,
+ run: run6,
+}
+
+export const nodes5 = {
+ byNodeId: byNodeId5,
+}
+
+export const datasource2 = {
+ nodes: nodes5,
+}
+
+/**
+ * Get first step parameters of rag pipeline
+ */
+export const get22 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParameters',
+ path: '/rag/pipelines/{pipeline_id}/workflows/published/pre-processing/parameters',
+ summary: 'Get first step parameters of rag pipeline',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersPath }),
+ )
+ .output(zGetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersResponse)
+
+export const parameters3 = {
+ get: get22,
+}
+
+export const preProcessing2 = {
+ parameters: parameters3,
+}
+
+/**
+ * Get second step parameters of rag pipeline
+ */
+export const get23 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflowsPublishedProcessingParameters',
+ path: '/rag/pipelines/{pipeline_id}/workflows/published/processing/parameters',
+ summary: 'Get second step parameters of rag pipeline',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersPath }),
+ )
+ .output(zGetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersResponse)
+
+export const parameters4 = {
+ get: get23,
+}
+
+export const processing2 = {
+ parameters: parameters4,
+}
+
+/**
+ * Run published workflow
+ */
+export const post19 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsPublishedRun',
+ path: '/rag/pipelines/{pipeline_id}/workflows/published/run',
+ summary: 'Run published workflow',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostRagPipelinesByPipelineIdWorkflowsPublishedRunBody,
+ params: zPostRagPipelinesByPipelineIdWorkflowsPublishedRunPath,
+ }),
+ )
+ .output(zPostRagPipelinesByPipelineIdWorkflowsPublishedRunResponse)
+
+export const run7 = {
+ post: post19,
+}
+
+export const published = {
+ datasource: datasource2,
+ preProcessing: preProcessing2,
+ processing: processing2,
+ run: run7,
+}
+
+export const post20 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestore',
+ path: '/rag/pipelines/{pipeline_id}/workflows/{workflow_id}/restore',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestorePath }))
+ .output(zPostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestoreResponse)
+
+export const restore = {
+ post: post20,
+}
+
+/**
+ * Delete a published workflow version that is not currently active on the pipeline
+ */
+export const delete5 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteRagPipelinesByPipelineIdWorkflowsByWorkflowId',
+ path: '/rag/pipelines/{pipeline_id}/workflows/{workflow_id}',
+ summary: 'Delete a published workflow version that is not currently active on the pipeline',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdPath }))
+ .output(zDeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse)
+
+/**
+ * Update workflow attributes
+ */
+export const patch3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchRagPipelinesByPipelineIdWorkflowsByWorkflowId',
+ path: '/rag/pipelines/{pipeline_id}/workflows/{workflow_id}',
+ summary: 'Update workflow attributes',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdPath }))
+ .output(zPatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse)
+
+export const byWorkflowId = {
+ delete: delete5,
+ patch: patch3,
+ restore,
+}
+
+/**
+ * Get published workflows
+ */
+export const get24 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRagPipelinesByPipelineIdWorkflows',
+ path: '/rag/pipelines/{pipeline_id}/workflows',
+ summary: 'Get published workflows',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetRagPipelinesByPipelineIdWorkflowsPath }))
+ .output(zGetRagPipelinesByPipelineIdWorkflowsResponse)
+
+export const workflows = {
+ get: get24,
+ defaultWorkflowBlockConfigs,
+ draft,
+ publish: publish2,
+ published,
+ byWorkflowId,
+}
+
+export const byPipelineId2 = {
+ customized: customized2,
+ exports: exports_,
+ workflowRuns,
+ workflows,
+}
+
+export const pipelines = {
+ datasourcePlugins,
+ imports,
+ recommendedPlugins,
+ transform,
+ byPipelineId: byPipelineId2,
+}
+
+export const rag = {
+ pipeline,
+ pipelines,
+}
+
+export const contract = {
+ rag,
+}
diff --git a/packages/contracts/generated/api/console/rag/types.gen.ts b/packages/contracts/generated/api/console/rag/types.gen.ts
new file mode 100644
index 00000000000..e300ff443cb
--- /dev/null
+++ b/packages/contracts/generated/api/console/rag/types.gen.ts
@@ -0,0 +1,1054 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/console/api` | (string & {})
+}
+
+export type RagPipelineDatasetImportPayload = {
+ yaml_content: string
+}
+
+export type RagPipelineImportPayload = {
+ description?: string | null
+ icon?: string | null
+ icon_background?: string | null
+ icon_type?: string | null
+ mode: string
+ name?: string | null
+ pipeline_id?: string | null
+ yaml_content?: string | null
+ yaml_url?: string | null
+}
+
+export type Payload = {
+ description?: string
+ icon_info?: {
+ [key: string]: unknown
+ } | null
+ name: string
+}
+
+export type DatasourceNodeRunPayload = {
+ credential_id?: string | null
+ datasource_type: string
+ inputs: {
+ [key: string]: unknown
+ }
+}
+
+export type DatasourceVariablesPayload = {
+ datasource_info: {
+ [key: string]: unknown
+ }
+ datasource_type: string
+ start_node_id: string
+ start_node_title: string
+}
+
+export type NodeRunPayload = {
+ inputs?: {
+ [key: string]: unknown
+ } | null
+}
+
+export type NodeRunRequiredPayload = {
+ inputs: {
+ [key: string]: unknown
+ }
+}
+
+export type DraftWorkflowRunPayload = {
+ datasource_info_list: Array<{
+ [key: string]: unknown
+ }>
+ datasource_type: string
+ inputs: {
+ [key: string]: unknown
+ }
+ start_node_id: string
+}
+
+export type Parser = {
+ credential_id?: string | null
+ datasource_type: string
+ inputs: {
+ [key: string]: unknown
+ }
+}
+
+export type PublishedWorkflowRunPayload = {
+ datasource_info_list: Array<{
+ [key: string]: unknown
+ }>
+ datasource_type: string
+ inputs: {
+ [key: string]: unknown
+ }
+ is_preview?: boolean
+ original_document_id?: string | null
+ response_mode?: 'streaming' | 'blocking'
+ start_node_id: string
+}
+
+export type DeleteRagPipelineCustomizedTemplatesByTemplateIdData = {
+ body?: never
+ path: {
+ template_id: string
+ }
+ query?: never
+ url: '/rag/pipeline/customized/templates/{template_id}'
+}
+
+export type DeleteRagPipelineCustomizedTemplatesByTemplateIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteRagPipelineCustomizedTemplatesByTemplateIdResponse
+ = DeleteRagPipelineCustomizedTemplatesByTemplateIdResponses[keyof DeleteRagPipelineCustomizedTemplatesByTemplateIdResponses]
+
+export type PatchRagPipelineCustomizedTemplatesByTemplateIdData = {
+ body?: never
+ path: {
+ template_id: string
+ }
+ query?: never
+ url: '/rag/pipeline/customized/templates/{template_id}'
+}
+
+export type PatchRagPipelineCustomizedTemplatesByTemplateIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchRagPipelineCustomizedTemplatesByTemplateIdResponse
+ = PatchRagPipelineCustomizedTemplatesByTemplateIdResponses[keyof PatchRagPipelineCustomizedTemplatesByTemplateIdResponses]
+
+export type PostRagPipelineCustomizedTemplatesByTemplateIdData = {
+ body?: never
+ path: {
+ template_id: string
+ }
+ query?: never
+ url: '/rag/pipeline/customized/templates/{template_id}'
+}
+
+export type PostRagPipelineCustomizedTemplatesByTemplateIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelineCustomizedTemplatesByTemplateIdResponse
+ = PostRagPipelineCustomizedTemplatesByTemplateIdResponses[keyof PostRagPipelineCustomizedTemplatesByTemplateIdResponses]
+
+export type PostRagPipelineDatasetData = {
+ body: RagPipelineDatasetImportPayload
+ path?: never
+ query?: never
+ url: '/rag/pipeline/dataset'
+}
+
+export type PostRagPipelineDatasetResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelineDatasetResponse
+ = PostRagPipelineDatasetResponses[keyof PostRagPipelineDatasetResponses]
+
+export type PostRagPipelineEmptyDatasetData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/rag/pipeline/empty-dataset'
+}
+
+export type PostRagPipelineEmptyDatasetResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelineEmptyDatasetResponse
+ = PostRagPipelineEmptyDatasetResponses[keyof PostRagPipelineEmptyDatasetResponses]
+
+export type GetRagPipelineTemplatesData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/rag/pipeline/templates'
+}
+
+export type GetRagPipelineTemplatesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelineTemplatesResponse
+ = GetRagPipelineTemplatesResponses[keyof GetRagPipelineTemplatesResponses]
+
+export type GetRagPipelineTemplatesByTemplateIdData = {
+ body?: never
+ path: {
+ template_id: string
+ }
+ query?: never
+ url: '/rag/pipeline/templates/{template_id}'
+}
+
+export type GetRagPipelineTemplatesByTemplateIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelineTemplatesByTemplateIdResponse
+ = GetRagPipelineTemplatesByTemplateIdResponses[keyof GetRagPipelineTemplatesByTemplateIdResponses]
+
+export type GetRagPipelinesDatasourcePluginsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/rag/pipelines/datasource-plugins'
+}
+
+export type GetRagPipelinesDatasourcePluginsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesDatasourcePluginsResponse
+ = GetRagPipelinesDatasourcePluginsResponses[keyof GetRagPipelinesDatasourcePluginsResponses]
+
+export type PostRagPipelinesImportsData = {
+ body: RagPipelineImportPayload
+ path?: never
+ query?: never
+ url: '/rag/pipelines/imports'
+}
+
+export type PostRagPipelinesImportsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesImportsResponse
+ = PostRagPipelinesImportsResponses[keyof PostRagPipelinesImportsResponses]
+
+export type PostRagPipelinesImportsByImportIdConfirmData = {
+ body?: never
+ path: {
+ import_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/imports/{import_id}/confirm'
+}
+
+export type PostRagPipelinesImportsByImportIdConfirmResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesImportsByImportIdConfirmResponse
+ = PostRagPipelinesImportsByImportIdConfirmResponses[keyof PostRagPipelinesImportsByImportIdConfirmResponses]
+
+export type GetRagPipelinesImportsByPipelineIdCheckDependenciesData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/imports/{pipeline_id}/check-dependencies'
+}
+
+export type GetRagPipelinesImportsByPipelineIdCheckDependenciesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesImportsByPipelineIdCheckDependenciesResponse
+ = GetRagPipelinesImportsByPipelineIdCheckDependenciesResponses[keyof GetRagPipelinesImportsByPipelineIdCheckDependenciesResponses]
+
+export type GetRagPipelinesRecommendedPluginsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/rag/pipelines/recommended-plugins'
+}
+
+export type GetRagPipelinesRecommendedPluginsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesRecommendedPluginsResponse
+ = GetRagPipelinesRecommendedPluginsResponses[keyof GetRagPipelinesRecommendedPluginsResponses]
+
+export type PostRagPipelinesTransformDatasetsByDatasetIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/transform/datasets/{dataset_id}'
+}
+
+export type PostRagPipelinesTransformDatasetsByDatasetIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesTransformDatasetsByDatasetIdResponse
+ = PostRagPipelinesTransformDatasetsByDatasetIdResponses[keyof PostRagPipelinesTransformDatasetsByDatasetIdResponses]
+
+export type PostRagPipelinesByPipelineIdCustomizedPublishData = {
+ body: Payload
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/customized/publish'
+}
+
+export type PostRagPipelinesByPipelineIdCustomizedPublishResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdCustomizedPublishResponse
+ = PostRagPipelinesByPipelineIdCustomizedPublishResponses[keyof PostRagPipelinesByPipelineIdCustomizedPublishResponses]
+
+export type GetRagPipelinesByPipelineIdExportsData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/exports'
+}
+
+export type GetRagPipelinesByPipelineIdExportsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdExportsResponse
+ = GetRagPipelinesByPipelineIdExportsResponses[keyof GetRagPipelinesByPipelineIdExportsResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowRunsData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflow-runs'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowRunsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowRunsResponse
+ = GetRagPipelinesByPipelineIdWorkflowRunsResponses[keyof GetRagPipelinesByPipelineIdWorkflowRunsResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ task_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflow-runs/tasks/{task_id}/stop'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopResponse
+ = PostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopResponses[keyof PostRagPipelinesByPipelineIdWorkflowRunsTasksByTaskIdStopResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowRunsByRunIdData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ run_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflow-runs/{run_id}'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowRunsByRunIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowRunsByRunIdResponse
+ = GetRagPipelinesByPipelineIdWorkflowRunsByRunIdResponses[keyof GetRagPipelinesByPipelineIdWorkflowRunsByRunIdResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ run_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflow-runs/{run_id}/node-executions'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsResponse
+ = GetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsResponses[keyof GetRagPipelinesByPipelineIdWorkflowRunsByRunIdNodeExecutionsResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsResponse
+ = GetRagPipelinesByPipelineIdWorkflowsResponses[keyof GetRagPipelinesByPipelineIdWorkflowsResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/default-workflow-block-configs'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ block_type: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/default-workflow-block-configs/{block_type}'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDraftResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDraftResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftResponse
+ = PostRagPipelinesByPipelineIdWorkflowsDraftResponses[keyof PostRagPipelinesByPipelineIdWorkflowsDraftResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunData = {
+ body: DatasourceNodeRunPayload
+ path: {
+ pipeline_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/datasource/nodes/{node_id}/run'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunResponse
+ = PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunResponses[keyof PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceNodesByNodeIdRunResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectData = {
+ body: DatasourceVariablesPayload
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/datasource/variables-inspect'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectResponse
+ = PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectResponses[keyof PostRagPipelinesByPipelineIdWorkflowsDraftDatasourceVariablesInspectResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/environment-variables'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDraftEnvironmentVariablesResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunData = {
+ body: NodeRunPayload
+ path: {
+ pipeline_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/iteration/nodes/{node_id}/run'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunResponse
+ = PostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunResponses[keyof PostRagPipelinesByPipelineIdWorkflowsDraftIterationNodesByNodeIdRunResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunData = {
+ body: NodeRunPayload
+ path: {
+ pipeline_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/loop/nodes/{node_id}/run'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunResponse
+ = PostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunResponses[keyof PostRagPipelinesByPipelineIdWorkflowsDraftLoopNodesByNodeIdRunResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/last-run'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdLastRunResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunData = {
+ body: NodeRunRequiredPayload
+ path: {
+ pipeline_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/run'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunResponse
+ = PostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunResponses[keyof PostRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdRunResponses]
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/variables'
+}
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponse
+ = DeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponses[keyof DeleteRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/nodes/{node_id}/variables'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDraftNodesByNodeIdVariablesResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/pre-processing/parameters'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDraftPreProcessingParametersResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/processing/parameters'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDraftProcessingParametersResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftRunData = {
+ body: DraftWorkflowRunPayload
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/run'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsDraftRunResponse
+ = PostRagPipelinesByPipelineIdWorkflowsDraftRunResponses[keyof PostRagPipelinesByPipelineIdWorkflowsDraftRunResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/system-variables'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDraftSystemVariablesResponses]
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/variables'
+}
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesResponse
+ = DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesResponses[keyof DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftVariablesData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/variables'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftVariablesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftVariablesResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDraftVariablesResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDraftVariablesResponses]
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ variable_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}'
+}
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse
+ = DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponses[keyof DeleteRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ variable_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse
+ = GetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponses[keyof GetRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponses]
+
+export type PatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ variable_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}'
+}
+
+export type PatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponse
+ = PatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponses[keyof PatchRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResponses]
+
+export type PutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ variable_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/draft/variables/{variable_id}/reset'
+}
+
+export type PutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetResponse
+ = PutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetResponses[keyof PutRagPipelinesByPipelineIdWorkflowsDraftVariablesByVariableIdResetResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsPublishData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/publish'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsPublishResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsPublishResponse
+ = GetRagPipelinesByPipelineIdWorkflowsPublishResponses[keyof GetRagPipelinesByPipelineIdWorkflowsPublishResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/publish'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishResponse
+ = PostRagPipelinesByPipelineIdWorkflowsPublishResponses[keyof PostRagPipelinesByPipelineIdWorkflowsPublishResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewData = {
+ body: Parser
+ path: {
+ pipeline_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/published/datasource/nodes/{node_id}/preview'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewResponse
+ = PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewResponses[keyof PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdPreviewResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunData = {
+ body: DatasourceNodeRunPayload
+ path: {
+ pipeline_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/published/datasource/nodes/{node_id}/run'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunResponse
+ = PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunResponses[keyof PostRagPipelinesByPipelineIdWorkflowsPublishedDatasourceNodesByNodeIdRunResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/published/pre-processing/parameters'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersResponse
+ = GetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersResponses[keyof GetRagPipelinesByPipelineIdWorkflowsPublishedPreProcessingParametersResponses]
+
+export type GetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/published/processing/parameters'
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersResponse
+ = GetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersResponses[keyof GetRagPipelinesByPipelineIdWorkflowsPublishedProcessingParametersResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishedRunData = {
+ body: PublishedWorkflowRunPayload
+ path: {
+ pipeline_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/published/run'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishedRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsPublishedRunResponse
+ = PostRagPipelinesByPipelineIdWorkflowsPublishedRunResponses[keyof PostRagPipelinesByPipelineIdWorkflowsPublishedRunResponses]
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ workflow_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/{workflow_id}'
+}
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse
+ = DeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponses[keyof DeleteRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponses]
+
+export type PatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ workflow_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/{workflow_id}'
+}
+
+export type PatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponse
+ = PatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponses[keyof PatchRagPipelinesByPipelineIdWorkflowsByWorkflowIdResponses]
+
+export type PostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestoreData = {
+ body?: never
+ path: {
+ pipeline_id: string
+ workflow_id: string
+ }
+ query?: never
+ url: '/rag/pipelines/{pipeline_id}/workflows/{workflow_id}/restore'
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestoreResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestoreResponse
+ = PostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestoreResponses[keyof PostRagPipelinesByPipelineIdWorkflowsByWorkflowIdRestoreResponses]
diff --git a/packages/contracts/generated/api/console/rag/zod.gen.ts b/packages/contracts/generated/api/console/rag/zod.gen.ts
new file mode 100644
index 00000000000..b28d7fafc71
--- /dev/null
+++ b/packages/contracts/generated/api/console/rag/zod.gen.ts
@@ -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(),
+)
diff --git a/packages/contracts/generated/api/console/refresh-token/orpc.gen.ts b/packages/contracts/generated/api/console/refresh-token/orpc.gen.ts
new file mode 100644
index 00000000000..4faa4d7d234
--- /dev/null
+++ b/packages/contracts/generated/api/console/refresh-token/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/refresh-token/types.gen.ts b/packages/contracts/generated/api/console/refresh-token/types.gen.ts
new file mode 100644
index 00000000000..15c939b947f
--- /dev/null
+++ b/packages/contracts/generated/api/console/refresh-token/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/refresh-token/zod.gen.ts b/packages/contracts/generated/api/console/refresh-token/zod.gen.ts
new file mode 100644
index 00000000000..d76067552c9
--- /dev/null
+++ b/packages/contracts/generated/api/console/refresh-token/zod.gen.ts
@@ -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())
diff --git a/packages/contracts/generated/api/console/remote-files/orpc.gen.ts b/packages/contracts/generated/api/console/remote-files/orpc.gen.ts
new file mode 100644
index 00000000000..977af4a09cb
--- /dev/null
+++ b/packages/contracts/generated/api/console/remote-files/orpc.gen.ts
@@ -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,
+}
diff --git a/packages/contracts/generated/api/console/remote-files/types.gen.ts b/packages/contracts/generated/api/console/remote-files/types.gen.ts
new file mode 100644
index 00000000000..ea61592a762
--- /dev/null
+++ b/packages/contracts/generated/api/console/remote-files/types.gen.ts
@@ -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]
diff --git a/packages/contracts/generated/api/console/remote-files/zod.gen.ts b/packages/contracts/generated/api/console/remote-files/zod.gen.ts
new file mode 100644
index 00000000000..cee96cf65fa
--- /dev/null
+++ b/packages/contracts/generated/api/console/remote-files/zod.gen.ts
@@ -0,0 +1,17 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * Success
+ */
+export const zPostRemoteFilesUploadResponse = z.record(z.string(), z.unknown())
+
+export const zGetRemoteFilesByUrlPath = z.object({
+ url: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetRemoteFilesByUrlResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/reset-password/orpc.gen.ts b/packages/contracts/generated/api/console/reset-password/orpc.gen.ts
new file mode 100644
index 00000000000..93701280db1
--- /dev/null
+++ b/packages/contracts/generated/api/console/reset-password/orpc.gen.ts
@@ -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 { zPostResetPasswordBody, zPostResetPasswordResponse } from './zod.gen'
+
+export const post = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postResetPassword',
+ path: '/reset-password',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostResetPasswordBody }))
+ .output(zPostResetPasswordResponse)
+
+export const resetPassword = {
+ post,
+}
+
+export const contract = {
+ resetPassword,
+}
diff --git a/packages/contracts/generated/api/console/reset-password/types.gen.ts b/packages/contracts/generated/api/console/reset-password/types.gen.ts
new file mode 100644
index 00000000000..6c2467aab40
--- /dev/null
+++ b/packages/contracts/generated/api/console/reset-password/types.gen.ts
@@ -0,0 +1,25 @@
+// 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 PostResetPasswordData = {
+ body: EmailPayload
+ path?: never
+ query?: never
+ url: '/reset-password'
+}
+
+export type PostResetPasswordResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostResetPasswordResponse = PostResetPasswordResponses[keyof PostResetPasswordResponses]
diff --git a/packages/contracts/generated/api/console/reset-password/zod.gen.ts b/packages/contracts/generated/api/console/reset-password/zod.gen.ts
new file mode 100644
index 00000000000..055ed9e1279
--- /dev/null
+++ b/packages/contracts/generated/api/console/reset-password/zod.gen.ts
@@ -0,0 +1,18 @@
+// 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(),
+})
+
+export const zPostResetPasswordBody = zEmailPayload
+
+/**
+ * Success
+ */
+export const zPostResetPasswordResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/rule-code-generate/orpc.gen.ts b/packages/contracts/generated/api/console/rule-code-generate/orpc.gen.ts
new file mode 100644
index 00000000000..1c5252525c5
--- /dev/null
+++ b/packages/contracts/generated/api/console/rule-code-generate/orpc.gen.ts
@@ -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 { zPostRuleCodeGenerateBody, zPostRuleCodeGenerateResponse } from './zod.gen'
+
+/**
+ * Generate code rules using LLM
+ */
+export const post = oc
+ .route({
+ description: 'Generate code rules using LLM',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRuleCodeGenerate',
+ path: '/rule-code-generate',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostRuleCodeGenerateBody }))
+ .output(zPostRuleCodeGenerateResponse)
+
+export const ruleCodeGenerate = {
+ post,
+}
+
+export const contract = {
+ ruleCodeGenerate,
+}
diff --git a/packages/contracts/generated/api/console/rule-code-generate/types.gen.ts b/packages/contracts/generated/api/console/rule-code-generate/types.gen.ts
new file mode 100644
index 00000000000..dc1b045285c
--- /dev/null
+++ b/packages/contracts/generated/api/console/rule-code-generate/types.gen.ts
@@ -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 RuleCodeGeneratePayload = {
+ code_language?: string
+ instruction: string
+ model_config: ModelConfig
+ no_variable?: boolean
+}
+
+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 PostRuleCodeGenerateData = {
+ body: RuleCodeGeneratePayload
+ path?: never
+ query?: never
+ url: '/rule-code-generate'
+}
+
+export type PostRuleCodeGenerateErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 402: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRuleCodeGenerateError = PostRuleCodeGenerateErrors[keyof PostRuleCodeGenerateErrors]
+
+export type PostRuleCodeGenerateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRuleCodeGenerateResponse
+ = PostRuleCodeGenerateResponses[keyof PostRuleCodeGenerateResponses]
diff --git a/packages/contracts/generated/api/console/rule-code-generate/zod.gen.ts b/packages/contracts/generated/api/console/rule-code-generate/zod.gen.ts
new file mode 100644
index 00000000000..40b840dc8ac
--- /dev/null
+++ b/packages/contracts/generated/api/console/rule-code-generate/zod.gen.ts
@@ -0,0 +1,52 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+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(),
+})
+
+/**
+ * RuleCodeGeneratePayload
+ */
+export const zRuleCodeGeneratePayload = z.object({
+ code_language: z.string().optional().default('javascript'),
+ instruction: z.string(),
+ model_config: zModelConfig,
+ no_variable: z.boolean().optional().default(false),
+})
+
+export const zPostRuleCodeGenerateBody = zRuleCodeGeneratePayload
+
+/**
+ * Code rules generated successfully
+ */
+export const zPostRuleCodeGenerateResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/rule-generate/orpc.gen.ts b/packages/contracts/generated/api/console/rule-generate/orpc.gen.ts
new file mode 100644
index 00000000000..7bd233de2bc
--- /dev/null
+++ b/packages/contracts/generated/api/console/rule-generate/orpc.gen.ts
@@ -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 { zPostRuleGenerateBody, zPostRuleGenerateResponse } from './zod.gen'
+
+/**
+ * Generate rule configuration using LLM
+ */
+export const post = oc
+ .route({
+ description: 'Generate rule configuration using LLM',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRuleGenerate',
+ path: '/rule-generate',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostRuleGenerateBody }))
+ .output(zPostRuleGenerateResponse)
+
+export const ruleGenerate = {
+ post,
+}
+
+export const contract = {
+ ruleGenerate,
+}
diff --git a/packages/contracts/generated/api/console/rule-generate/types.gen.ts b/packages/contracts/generated/api/console/rule-generate/types.gen.ts
new file mode 100644
index 00000000000..265ca5013da
--- /dev/null
+++ b/packages/contracts/generated/api/console/rule-generate/types.gen.ts
@@ -0,0 +1,66 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/console/api` | (string & {})
+}
+
+export type RuleGeneratePayload = {
+ instruction: string
+ model_config: ModelConfig
+ no_variable?: boolean
+}
+
+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 PostRuleGenerateData = {
+ body: RuleGeneratePayload
+ path?: never
+ query?: never
+ url: '/rule-generate'
+}
+
+export type PostRuleGenerateErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 402: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRuleGenerateError = PostRuleGenerateErrors[keyof PostRuleGenerateErrors]
+
+export type PostRuleGenerateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRuleGenerateResponse = PostRuleGenerateResponses[keyof PostRuleGenerateResponses]
diff --git a/packages/contracts/generated/api/console/rule-generate/zod.gen.ts b/packages/contracts/generated/api/console/rule-generate/zod.gen.ts
new file mode 100644
index 00000000000..7a346a58fc9
--- /dev/null
+++ b/packages/contracts/generated/api/console/rule-generate/zod.gen.ts
@@ -0,0 +1,51 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+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(),
+})
+
+/**
+ * RuleGeneratePayload
+ */
+export const zRuleGeneratePayload = z.object({
+ instruction: z.string(),
+ model_config: zModelConfig,
+ no_variable: z.boolean().optional().default(false),
+})
+
+export const zPostRuleGenerateBody = zRuleGeneratePayload
+
+/**
+ * Rule configuration generated successfully
+ */
+export const zPostRuleGenerateResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/rule-structured-output-generate/orpc.gen.ts b/packages/contracts/generated/api/console/rule-structured-output-generate/orpc.gen.ts
new file mode 100644
index 00000000000..276442f1c91
--- /dev/null
+++ b/packages/contracts/generated/api/console/rule-structured-output-generate/orpc.gen.ts
@@ -0,0 +1,32 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zPostRuleStructuredOutputGenerateBody,
+ zPostRuleStructuredOutputGenerateResponse,
+} from './zod.gen'
+
+/**
+ * Generate structured output rules using LLM
+ */
+export const post = oc
+ .route({
+ description: 'Generate structured output rules using LLM',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRuleStructuredOutputGenerate',
+ path: '/rule-structured-output-generate',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostRuleStructuredOutputGenerateBody }))
+ .output(zPostRuleStructuredOutputGenerateResponse)
+
+export const ruleStructuredOutputGenerate = {
+ post,
+}
+
+export const contract = {
+ ruleStructuredOutputGenerate,
+}
diff --git a/packages/contracts/generated/api/console/rule-structured-output-generate/types.gen.ts b/packages/contracts/generated/api/console/rule-structured-output-generate/types.gen.ts
new file mode 100644
index 00000000000..f6124c6956a
--- /dev/null
+++ b/packages/contracts/generated/api/console/rule-structured-output-generate/types.gen.ts
@@ -0,0 +1,67 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/console/api` | (string & {})
+}
+
+export type RuleStructuredOutputPayload = {
+ instruction: string
+ model_config: ModelConfig
+}
+
+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 PostRuleStructuredOutputGenerateData = {
+ body: RuleStructuredOutputPayload
+ path?: never
+ query?: never
+ url: '/rule-structured-output-generate'
+}
+
+export type PostRuleStructuredOutputGenerateErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 402: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRuleStructuredOutputGenerateError
+ = PostRuleStructuredOutputGenerateErrors[keyof PostRuleStructuredOutputGenerateErrors]
+
+export type PostRuleStructuredOutputGenerateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRuleStructuredOutputGenerateResponse
+ = PostRuleStructuredOutputGenerateResponses[keyof PostRuleStructuredOutputGenerateResponses]
diff --git a/packages/contracts/generated/api/console/rule-structured-output-generate/zod.gen.ts b/packages/contracts/generated/api/console/rule-structured-output-generate/zod.gen.ts
new file mode 100644
index 00000000000..231b5a072ce
--- /dev/null
+++ b/packages/contracts/generated/api/console/rule-structured-output-generate/zod.gen.ts
@@ -0,0 +1,50 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+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(),
+})
+
+/**
+ * RuleStructuredOutputPayload
+ */
+export const zRuleStructuredOutputPayload = z.object({
+ instruction: z.string(),
+ model_config: zModelConfig,
+})
+
+export const zPostRuleStructuredOutputGenerateBody = zRuleStructuredOutputPayload
+
+/**
+ * Structured output generated successfully
+ */
+export const zPostRuleStructuredOutputGenerateResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/spec/orpc.gen.ts b/packages/contracts/generated/api/console/spec/orpc.gen.ts
new file mode 100644
index 00000000000..bd2e750e6d6
--- /dev/null
+++ b/packages/contracts/generated/api/console/spec/orpc.gen.ts
@@ -0,0 +1,34 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+
+import { zGetSpecSchemaDefinitionsResponse } from './zod.gen'
+
+/**
+ * Get system JSON Schema definitions specification
+ *
+ * Used for frontend component type mapping
+ */
+export const get = oc
+ .route({
+ description: 'Used for frontend component type mapping',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getSpecSchemaDefinitions',
+ path: '/spec/schema-definitions',
+ summary: 'Get system JSON Schema definitions specification',
+ tags: ['console'],
+ })
+ .output(zGetSpecSchemaDefinitionsResponse)
+
+export const schemaDefinitions = {
+ get,
+}
+
+export const spec = {
+ schemaDefinitions,
+}
+
+export const contract = {
+ spec,
+}
diff --git a/packages/contracts/generated/api/console/spec/types.gen.ts b/packages/contracts/generated/api/console/spec/types.gen.ts
new file mode 100644
index 00000000000..eaad80aa9a6
--- /dev/null
+++ b/packages/contracts/generated/api/console/spec/types.gen.ts
@@ -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 GetSpecSchemaDefinitionsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/spec/schema-definitions'
+}
+
+export type GetSpecSchemaDefinitionsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetSpecSchemaDefinitionsResponse
+ = GetSpecSchemaDefinitionsResponses[keyof GetSpecSchemaDefinitionsResponses]
diff --git a/packages/contracts/generated/api/console/spec/zod.gen.ts b/packages/contracts/generated/api/console/spec/zod.gen.ts
new file mode 100644
index 00000000000..fa057bc2692
--- /dev/null
+++ b/packages/contracts/generated/api/console/spec/zod.gen.ts
@@ -0,0 +1,8 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * Success
+ */
+export const zGetSpecSchemaDefinitionsResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/system-features/orpc.gen.ts b/packages/contracts/generated/api/console/system-features/orpc.gen.ts
new file mode 100644
index 00000000000..5c0a4755852
--- /dev/null
+++ b/packages/contracts/generated/api/console/system-features/orpc.gen.ts
@@ -0,0 +1,37 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+
+import { zGetSystemFeaturesResponse } from './zod.gen'
+
+/**
+ * Get system-wide feature configuration
+ *
+ * Get system-wide feature configuration
+ * NOTE: This endpoint is unauthenticated by design, as it provides system features
+ * data required for dashboard initialization.
+ *
+ * Authentication would create circular dependency (can't login without dashboard loading).
+ *
+ * Only non-sensitive configuration data should be returned by this endpoint.
+ */
+export const get = oc
+ .route({
+ description:
+ 'Get system-wide feature configuration\nNOTE: This endpoint is unauthenticated by design, as it provides system features\ndata required for dashboard initialization.\n\nAuthentication would create circular dependency (can\'t login without dashboard loading).\n\nOnly non-sensitive configuration data should be returned by this endpoint.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getSystemFeatures',
+ path: '/system-features',
+ summary: 'Get system-wide feature configuration',
+ tags: ['console'],
+ })
+ .output(zGetSystemFeaturesResponse)
+
+export const systemFeatures = {
+ get,
+}
+
+export const contract = {
+ systemFeatures,
+}
diff --git a/packages/contracts/generated/api/console/system-features/types.gen.ts b/packages/contracts/generated/api/console/system-features/types.gen.ts
new file mode 100644
index 00000000000..0fbea39beb1
--- /dev/null
+++ b/packages/contracts/generated/api/console/system-features/types.gen.ts
@@ -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 SystemFeatureResponse = {
+ [key: string]: unknown
+}
+
+export type GetSystemFeaturesData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/system-features'
+}
+
+export type GetSystemFeaturesResponses = {
+ 200: SystemFeatureResponse
+}
+
+export type GetSystemFeaturesResponse = GetSystemFeaturesResponses[keyof GetSystemFeaturesResponses]
diff --git a/packages/contracts/generated/api/console/system-features/zod.gen.ts b/packages/contracts/generated/api/console/system-features/zod.gen.ts
new file mode 100644
index 00000000000..affb2a10a3e
--- /dev/null
+++ b/packages/contracts/generated/api/console/system-features/zod.gen.ts
@@ -0,0 +1,10 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+export const zSystemFeatureResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetSystemFeaturesResponse = zSystemFeatureResponse
diff --git a/packages/contracts/generated/api/console/tag-bindings/orpc.gen.ts b/packages/contracts/generated/api/console/tag-bindings/orpc.gen.ts
new file mode 100644
index 00000000000..8b58d2c47d0
--- /dev/null
+++ b/packages/contracts/generated/api/console/tag-bindings/orpc.gen.ts
@@ -0,0 +1,97 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zDeleteTagBindingsByIdBody,
+ zDeleteTagBindingsByIdPath,
+ zDeleteTagBindingsByIdResponse,
+ zPostTagBindingsBody,
+ zPostTagBindingsCreateBody,
+ zPostTagBindingsCreateResponse,
+ zPostTagBindingsRemoveBody,
+ zPostTagBindingsRemoveResponse,
+ zPostTagBindingsResponse,
+} from './zod.gen'
+
+/**
+ * Deprecated legacy alias. Use POST /tag-bindings instead.
+ *
+ * @deprecated
+ */
+export const post = oc
+ .route({
+ deprecated: true,
+ description: 'Deprecated legacy alias. Use POST /tag-bindings instead.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTagBindingsCreate',
+ path: '/tag-bindings/create',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostTagBindingsCreateBody }))
+ .output(zPostTagBindingsCreateResponse)
+
+export const create = {
+ post,
+}
+
+/**
+ * Deprecated legacy alias. Use DELETE /tag-bindings/{id} instead.
+ *
+ * @deprecated
+ */
+export const post2 = oc
+ .route({
+ deprecated: true,
+ description: 'Deprecated legacy alias. Use DELETE /tag-bindings/{id} instead.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTagBindingsRemove',
+ path: '/tag-bindings/remove',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostTagBindingsRemoveBody }))
+ .output(zPostTagBindingsRemoveResponse)
+
+export const remove = {
+ post: post2,
+}
+
+export const delete_ = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteTagBindingsById',
+ path: '/tag-bindings/{id}',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zDeleteTagBindingsByIdBody, params: zDeleteTagBindingsByIdPath }))
+ .output(zDeleteTagBindingsByIdResponse)
+
+export const byId = {
+ delete: delete_,
+}
+
+export const post3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTagBindings',
+ path: '/tag-bindings',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostTagBindingsBody }))
+ .output(zPostTagBindingsResponse)
+
+export const tagBindings = {
+ post: post3,
+ create,
+ remove,
+ byId,
+}
+
+export const contract = {
+ tagBindings,
+}
diff --git a/packages/contracts/generated/api/console/tag-bindings/types.gen.ts b/packages/contracts/generated/api/console/tag-bindings/types.gen.ts
new file mode 100644
index 00000000000..e9426766ed2
--- /dev/null
+++ b/packages/contracts/generated/api/console/tag-bindings/types.gen.ts
@@ -0,0 +1,89 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/console/api` | (string & {})
+}
+
+export type TagBindingPayload = {
+ tag_ids: Array<string>
+ target_id: string
+ type: TagType
+}
+
+export type TagBindingRemovePayload = {
+ tag_id: string
+ target_id: string
+ type: TagType
+}
+
+export type TagBindingItemDeletePayload = {
+ target_id: string
+ type: TagType
+}
+
+export type TagType = 'knowledge' | 'app'
+
+export type PostTagBindingsData = {
+ body: TagBindingPayload
+ path?: never
+ query?: never
+ url: '/tag-bindings'
+}
+
+export type PostTagBindingsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTagBindingsResponse = PostTagBindingsResponses[keyof PostTagBindingsResponses]
+
+export type PostTagBindingsCreateData = {
+ body: TagBindingPayload
+ path?: never
+ query?: never
+ url: '/tag-bindings/create'
+}
+
+export type PostTagBindingsCreateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTagBindingsCreateResponse
+ = PostTagBindingsCreateResponses[keyof PostTagBindingsCreateResponses]
+
+export type PostTagBindingsRemoveData = {
+ body: TagBindingRemovePayload
+ path?: never
+ query?: never
+ url: '/tag-bindings/remove'
+}
+
+export type PostTagBindingsRemoveResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTagBindingsRemoveResponse
+ = PostTagBindingsRemoveResponses[keyof PostTagBindingsRemoveResponses]
+
+export type DeleteTagBindingsByIdData = {
+ body: TagBindingItemDeletePayload
+ path: {
+ id: string
+ }
+ query?: never
+ url: '/tag-bindings/{id}'
+}
+
+export type DeleteTagBindingsByIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteTagBindingsByIdResponse
+ = DeleteTagBindingsByIdResponses[keyof DeleteTagBindingsByIdResponses]
diff --git a/packages/contracts/generated/api/console/tag-bindings/zod.gen.ts b/packages/contracts/generated/api/console/tag-bindings/zod.gen.ts
new file mode 100644
index 00000000000..3dead1ec1b1
--- /dev/null
+++ b/packages/contracts/generated/api/console/tag-bindings/zod.gen.ts
@@ -0,0 +1,68 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * TagType
+ *
+ * Tag type
+ */
+export const zTagType = z.enum(['knowledge', 'app'])
+
+/**
+ * TagBindingPayload
+ */
+export const zTagBindingPayload = z.object({
+ tag_ids: z.array(z.string()),
+ target_id: z.string(),
+ type: zTagType,
+})
+
+/**
+ * TagBindingRemovePayload
+ */
+export const zTagBindingRemovePayload = z.object({
+ tag_id: z.string(),
+ target_id: z.string(),
+ type: zTagType,
+})
+
+/**
+ * TagBindingItemDeletePayload
+ */
+export const zTagBindingItemDeletePayload = z.object({
+ target_id: z.string(),
+ type: zTagType,
+})
+
+export const zPostTagBindingsBody = zTagBindingPayload
+
+/**
+ * Success
+ */
+export const zPostTagBindingsResponse = z.record(z.string(), z.unknown())
+
+export const zPostTagBindingsCreateBody = zTagBindingPayload
+
+/**
+ * Success
+ */
+export const zPostTagBindingsCreateResponse = z.record(z.string(), z.unknown())
+
+export const zPostTagBindingsRemoveBody = zTagBindingRemovePayload
+
+/**
+ * Success
+ */
+export const zPostTagBindingsRemoveResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteTagBindingsByIdBody = zTagBindingItemDeletePayload
+
+export const zDeleteTagBindingsByIdPath = z.object({
+ id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteTagBindingsByIdResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/tags/orpc.gen.ts b/packages/contracts/generated/api/console/tags/orpc.gen.ts
new file mode 100644
index 00000000000..937ccce6340
--- /dev/null
+++ b/packages/contracts/generated/api/console/tags/orpc.gen.ts
@@ -0,0 +1,75 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zDeleteTagsByTagIdPath,
+ zDeleteTagsByTagIdResponse,
+ zGetTagsQuery,
+ zGetTagsResponse,
+ zPatchTagsByTagIdBody,
+ zPatchTagsByTagIdPath,
+ zPatchTagsByTagIdResponse,
+ zPostTagsBody,
+ zPostTagsResponse,
+} from './zod.gen'
+
+export const delete_ = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteTagsByTagId',
+ path: '/tags/{tag_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteTagsByTagIdPath }))
+ .output(zDeleteTagsByTagIdResponse)
+
+export const patch = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchTagsByTagId',
+ path: '/tags/{tag_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPatchTagsByTagIdBody, params: zPatchTagsByTagIdPath }))
+ .output(zPatchTagsByTagIdResponse)
+
+export const byTagId = {
+ delete: delete_,
+ patch,
+}
+
+export const get = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getTags',
+ path: '/tags',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetTagsQuery.optional() }))
+ .output(zGetTagsResponse)
+
+export const post = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTags',
+ path: '/tags',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostTagsBody }))
+ .output(zPostTagsResponse)
+
+export const tags = {
+ get,
+ post,
+ byTagId,
+}
+
+export const contract = {
+ tags,
+}
diff --git a/packages/contracts/generated/api/console/tags/types.gen.ts b/packages/contracts/generated/api/console/tags/types.gen.ts
new file mode 100644
index 00000000000..f3c3b1eb3f8
--- /dev/null
+++ b/packages/contracts/generated/api/console/tags/types.gen.ts
@@ -0,0 +1,84 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/console/api` | (string & {})
+}
+
+export type TagResponse = {
+ binding_count?: string | null
+ id: string
+ name: string
+ type?: string | null
+}
+
+export type TagBasePayload = {
+ name: string
+ type: TagType
+}
+
+export type TagType = 'knowledge' | 'app'
+
+export type GetTagsData = {
+ body?: never
+ path?: never
+ query?: {
+ type?: string
+ keyword?: string
+ }
+ url: '/tags'
+}
+
+export type GetTagsResponses = {
+ 200: Array<TagResponse>
+}
+
+export type GetTagsResponse = GetTagsResponses[keyof GetTagsResponses]
+
+export type PostTagsData = {
+ body: TagBasePayload
+ path?: never
+ query?: never
+ url: '/tags'
+}
+
+export type PostTagsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTagsResponse = PostTagsResponses[keyof PostTagsResponses]
+
+export type DeleteTagsByTagIdData = {
+ body?: never
+ path: {
+ tag_id: string
+ }
+ query?: never
+ url: '/tags/{tag_id}'
+}
+
+export type DeleteTagsByTagIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteTagsByTagIdResponse = DeleteTagsByTagIdResponses[keyof DeleteTagsByTagIdResponses]
+
+export type PatchTagsByTagIdData = {
+ body: TagBasePayload
+ path: {
+ tag_id: string
+ }
+ query?: never
+ url: '/tags/{tag_id}'
+}
+
+export type PatchTagsByTagIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchTagsByTagIdResponse = PatchTagsByTagIdResponses[keyof PatchTagsByTagIdResponses]
diff --git a/packages/contracts/generated/api/console/tags/zod.gen.ts b/packages/contracts/generated/api/console/tags/zod.gen.ts
new file mode 100644
index 00000000000..4bb8e1783ca
--- /dev/null
+++ b/packages/contracts/generated/api/console/tags/zod.gen.ts
@@ -0,0 +1,65 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * TagResponse
+ */
+export const zTagResponse = z.object({
+ binding_count: z.string().nullish(),
+ id: z.string(),
+ name: z.string(),
+ type: z.string().nullish(),
+})
+
+/**
+ * TagType
+ *
+ * Tag type
+ */
+export const zTagType = z.enum(['knowledge', 'app'])
+
+/**
+ * TagBasePayload
+ */
+export const zTagBasePayload = z.object({
+ name: z.string().min(1).max(50),
+ type: zTagType,
+})
+
+export const zGetTagsQuery = z.object({
+ type: z.string().optional(),
+ keyword: z.string().optional(),
+})
+
+/**
+ * Success
+ */
+export const zGetTagsResponse = z.array(zTagResponse)
+
+export const zPostTagsBody = zTagBasePayload
+
+/**
+ * Success
+ */
+export const zPostTagsResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteTagsByTagIdPath = z.object({
+ tag_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteTagsByTagIdResponse = z.record(z.string(), z.unknown())
+
+export const zPatchTagsByTagIdBody = zTagBasePayload
+
+export const zPatchTagsByTagIdPath = z.object({
+ tag_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchTagsByTagIdResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/test/orpc.gen.ts b/packages/contracts/generated/api/console/test/orpc.gen.ts
new file mode 100644
index 00000000000..1bdf526b70c
--- /dev/null
+++ b/packages/contracts/generated/api/console/test/orpc.gen.ts
@@ -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 { zPostTestRetrievalBody, zPostTestRetrievalResponse } from './zod.gen'
+
+/**
+ * Bedrock retrieval test (internal use only)
+ */
+export const post = oc
+ .route({
+ description: 'Bedrock retrieval test (internal use only)',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTestRetrieval',
+ path: '/test/retrieval',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostTestRetrievalBody }))
+ .output(zPostTestRetrievalResponse)
+
+export const retrieval = {
+ post,
+}
+
+export const test = {
+ retrieval,
+}
+
+export const contract = {
+ test,
+}
diff --git a/packages/contracts/generated/api/console/test/types.gen.ts b/packages/contracts/generated/api/console/test/types.gen.ts
new file mode 100644
index 00000000000..3e04b732eee
--- /dev/null
+++ b/packages/contracts/generated/api/console/test/types.gen.ts
@@ -0,0 +1,31 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/console/api` | (string & {})
+}
+
+export type BedrockRetrievalPayload = {
+ knowledge_id: string
+ query: string
+ retrieval_setting: BedrockRetrievalSetting
+}
+
+export type BedrockRetrievalSetting = {
+ score_threshold?: number
+ top_k?: number | null
+}
+
+export type PostTestRetrievalData = {
+ body: BedrockRetrievalPayload
+ path?: never
+ query?: never
+ url: '/test/retrieval'
+}
+
+export type PostTestRetrievalResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTestRetrievalResponse = PostTestRetrievalResponses[keyof PostTestRetrievalResponses]
diff --git a/packages/contracts/generated/api/console/test/zod.gen.ts b/packages/contracts/generated/api/console/test/zod.gen.ts
new file mode 100644
index 00000000000..9421c6c03f0
--- /dev/null
+++ b/packages/contracts/generated/api/console/test/zod.gen.ts
@@ -0,0 +1,29 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * BedrockRetrievalSetting
+ *
+ * Retrieval settings for Amazon Bedrock knowledge base queries.
+ */
+export const zBedrockRetrievalSetting = z.object({
+ score_threshold: z.number().optional().default(0),
+ top_k: z.int().nullish(),
+})
+
+/**
+ * BedrockRetrievalPayload
+ */
+export const zBedrockRetrievalPayload = z.object({
+ knowledge_id: z.string(),
+ query: z.string(),
+ retrieval_setting: zBedrockRetrievalSetting,
+})
+
+export const zPostTestRetrievalBody = zBedrockRetrievalPayload
+
+/**
+ * Bedrock retrieval test completed
+ */
+export const zPostTestRetrievalResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/trial-apps/orpc.gen.ts b/packages/contracts/generated/api/console/trial-apps/orpc.gen.ts
new file mode 100644
index 00000000000..eca85c206fc
--- /dev/null
+++ b/packages/contracts/generated/api/console/trial-apps/orpc.gen.ts
@@ -0,0 +1,298 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zGetTrialAppsByAppIdDatasetsPath,
+ zGetTrialAppsByAppIdDatasetsResponse,
+ zGetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsPath,
+ zGetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsResponse,
+ zGetTrialAppsByAppIdParametersPath,
+ zGetTrialAppsByAppIdParametersResponse,
+ zGetTrialAppsByAppIdPath,
+ zGetTrialAppsByAppIdResponse,
+ zGetTrialAppsByAppIdSitePath,
+ zGetTrialAppsByAppIdSiteResponse,
+ zGetTrialAppsByAppIdWorkflowsPath,
+ zGetTrialAppsByAppIdWorkflowsResponse,
+ zPostTrialAppsByAppIdAudioToTextPath,
+ zPostTrialAppsByAppIdAudioToTextResponse,
+ zPostTrialAppsByAppIdChatMessagesBody,
+ zPostTrialAppsByAppIdChatMessagesPath,
+ zPostTrialAppsByAppIdChatMessagesResponse,
+ zPostTrialAppsByAppIdCompletionMessagesBody,
+ zPostTrialAppsByAppIdCompletionMessagesPath,
+ zPostTrialAppsByAppIdCompletionMessagesResponse,
+ zPostTrialAppsByAppIdTextToAudioBody,
+ zPostTrialAppsByAppIdTextToAudioPath,
+ zPostTrialAppsByAppIdTextToAudioResponse,
+ zPostTrialAppsByAppIdWorkflowsRunBody,
+ zPostTrialAppsByAppIdWorkflowsRunPath,
+ zPostTrialAppsByAppIdWorkflowsRunResponse,
+ zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopPath,
+ zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopResponse,
+} from './zod.gen'
+
+export const post = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTrialAppsByAppIdAudioToText',
+ path: '/trial-apps/{app_id}/audio-to-text',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostTrialAppsByAppIdAudioToTextPath }))
+ .output(zPostTrialAppsByAppIdAudioToTextResponse)
+
+export const audioToText = {
+ post,
+}
+
+export const post2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTrialAppsByAppIdChatMessages',
+ path: '/trial-apps/{app_id}/chat-messages',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostTrialAppsByAppIdChatMessagesBody,
+ params: zPostTrialAppsByAppIdChatMessagesPath,
+ }),
+ )
+ .output(zPostTrialAppsByAppIdChatMessagesResponse)
+
+export const chatMessages = {
+ post: post2,
+}
+
+export const post3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTrialAppsByAppIdCompletionMessages',
+ path: '/trial-apps/{app_id}/completion-messages',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostTrialAppsByAppIdCompletionMessagesBody,
+ params: zPostTrialAppsByAppIdCompletionMessagesPath,
+ }),
+ )
+ .output(zPostTrialAppsByAppIdCompletionMessagesResponse)
+
+export const completionMessages = {
+ post: post3,
+}
+
+export const get = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getTrialAppsByAppIdDatasets',
+ path: '/trial-apps/{app_id}/datasets',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetTrialAppsByAppIdDatasetsPath }))
+ .output(zGetTrialAppsByAppIdDatasetsResponse)
+
+export const datasets = {
+ get,
+}
+
+export const get2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getTrialAppsByAppIdMessagesByMessageIdSuggestedQuestions',
+ path: '/trial-apps/{app_id}/messages/{message_id}/suggested-questions',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsPath }))
+ .output(zGetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsResponse)
+
+export const suggestedQuestions = {
+ get: get2,
+}
+
+export const byMessageId = {
+ suggestedQuestions,
+}
+
+export const messages = {
+ byMessageId,
+}
+
+/**
+ * Retrieve app parameters
+ */
+export const get3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getTrialAppsByAppIdParameters',
+ path: '/trial-apps/{app_id}/parameters',
+ summary: 'Retrieve app parameters',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetTrialAppsByAppIdParametersPath }))
+ .output(zGetTrialAppsByAppIdParametersResponse)
+
+export const parameters = {
+ get: get3,
+}
+
+/**
+ * Retrieve app site info
+ *
+ * Returns the site configuration for the application including theme, icons, and text.
+ */
+export const get4 = oc
+ .route({
+ description:
+ 'Returns the site configuration for the application including theme, icons, and text.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getTrialAppsByAppIdSite',
+ path: '/trial-apps/{app_id}/site',
+ summary: 'Retrieve app site info',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetTrialAppsByAppIdSitePath }))
+ .output(zGetTrialAppsByAppIdSiteResponse)
+
+export const site = {
+ get: get4,
+}
+
+export const post4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTrialAppsByAppIdTextToAudio',
+ path: '/trial-apps/{app_id}/text-to-audio',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostTrialAppsByAppIdTextToAudioBody,
+ params: zPostTrialAppsByAppIdTextToAudioPath,
+ }),
+ )
+ .output(zPostTrialAppsByAppIdTextToAudioResponse)
+
+export const textToAudio = {
+ post: post4,
+}
+
+/**
+ * Run workflow
+ */
+export const post5 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTrialAppsByAppIdWorkflowsRun',
+ path: '/trial-apps/{app_id}/workflows/run',
+ summary: 'Run workflow',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostTrialAppsByAppIdWorkflowsRunBody,
+ params: zPostTrialAppsByAppIdWorkflowsRunPath,
+ }),
+ )
+ .output(zPostTrialAppsByAppIdWorkflowsRunResponse)
+
+export const run = {
+ post: post5,
+}
+
+/**
+ * Stop workflow task
+ */
+export const post6 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTrialAppsByAppIdWorkflowsTasksByTaskIdStop',
+ path: '/trial-apps/{app_id}/workflows/tasks/{task_id}/stop',
+ summary: 'Stop workflow task',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopPath }))
+ .output(zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopResponse)
+
+export const stop = {
+ post: post6,
+}
+
+export const byTaskId = {
+ stop,
+}
+
+export const tasks = {
+ byTaskId,
+}
+
+/**
+ * Get workflow detail
+ */
+export const get5 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getTrialAppsByAppIdWorkflows',
+ path: '/trial-apps/{app_id}/workflows',
+ summary: 'Get workflow detail',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetTrialAppsByAppIdWorkflowsPath }))
+ .output(zGetTrialAppsByAppIdWorkflowsResponse)
+
+export const workflows = {
+ get: get5,
+ run,
+ tasks,
+}
+
+/**
+ * Get app detail
+ */
+export const get6 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getTrialAppsByAppId',
+ path: '/trial-apps/{app_id}',
+ summary: 'Get app detail',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetTrialAppsByAppIdPath }))
+ .output(zGetTrialAppsByAppIdResponse)
+
+export const byAppId = {
+ get: get6,
+ audioToText,
+ chatMessages,
+ completionMessages,
+ datasets,
+ messages,
+ parameters,
+ site,
+ textToAudio,
+ workflows,
+}
+
+export const trialApps = {
+ byAppId,
+}
+
+export const contract = {
+ trialApps,
+}
diff --git a/packages/contracts/generated/api/console/trial-apps/types.gen.ts b/packages/contracts/generated/api/console/trial-apps/types.gen.ts
new file mode 100644
index 00000000000..2965aafebf6
--- /dev/null
+++ b/packages/contracts/generated/api/console/trial-apps/types.gen.ts
@@ -0,0 +1,258 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/console/api` | (string & {})
+}
+
+export type ChatRequest = {
+ conversation_id?: string | null
+ files?: Array<unknown> | null
+ inputs: {
+ [key: string]: unknown
+ }
+ parent_message_id?: string | null
+ query: string
+ retriever_from?: string
+}
+
+export type CompletionRequest = {
+ files?: Array<unknown> | null
+ inputs: {
+ [key: string]: unknown
+ }
+ query?: string
+ response_mode?: 'blocking' | 'streaming' | null
+ retriever_from?: string
+}
+
+export type TextToSpeechRequest = {
+ message_id?: string | null
+ streaming?: boolean | null
+ text?: string | null
+ voice?: string | null
+}
+
+export type WorkflowRunRequest = {
+ files?: Array<unknown> | null
+ inputs: {
+ [key: string]: unknown
+ }
+}
+
+export type GetTrialAppsByAppIdData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}'
+}
+
+export type GetTrialAppsByAppIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetTrialAppsByAppIdResponse
+ = GetTrialAppsByAppIdResponses[keyof GetTrialAppsByAppIdResponses]
+
+export type PostTrialAppsByAppIdAudioToTextData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/audio-to-text'
+}
+
+export type PostTrialAppsByAppIdAudioToTextResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTrialAppsByAppIdAudioToTextResponse
+ = PostTrialAppsByAppIdAudioToTextResponses[keyof PostTrialAppsByAppIdAudioToTextResponses]
+
+export type PostTrialAppsByAppIdChatMessagesData = {
+ body: ChatRequest
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/chat-messages'
+}
+
+export type PostTrialAppsByAppIdChatMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTrialAppsByAppIdChatMessagesResponse
+ = PostTrialAppsByAppIdChatMessagesResponses[keyof PostTrialAppsByAppIdChatMessagesResponses]
+
+export type PostTrialAppsByAppIdCompletionMessagesData = {
+ body: CompletionRequest
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/completion-messages'
+}
+
+export type PostTrialAppsByAppIdCompletionMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTrialAppsByAppIdCompletionMessagesResponse
+ = PostTrialAppsByAppIdCompletionMessagesResponses[keyof PostTrialAppsByAppIdCompletionMessagesResponses]
+
+export type GetTrialAppsByAppIdDatasetsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/datasets'
+}
+
+export type GetTrialAppsByAppIdDatasetsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetTrialAppsByAppIdDatasetsResponse
+ = GetTrialAppsByAppIdDatasetsResponses[keyof GetTrialAppsByAppIdDatasetsResponses]
+
+export type GetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsData = {
+ body?: never
+ path: {
+ app_id: string
+ message_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/messages/{message_id}/suggested-questions'
+}
+
+export type GetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsResponse
+ = GetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsResponses[keyof GetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsResponses]
+
+export type GetTrialAppsByAppIdParametersData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/parameters'
+}
+
+export type GetTrialAppsByAppIdParametersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetTrialAppsByAppIdParametersResponse
+ = GetTrialAppsByAppIdParametersResponses[keyof GetTrialAppsByAppIdParametersResponses]
+
+export type GetTrialAppsByAppIdSiteData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/site'
+}
+
+export type GetTrialAppsByAppIdSiteResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetTrialAppsByAppIdSiteResponse
+ = GetTrialAppsByAppIdSiteResponses[keyof GetTrialAppsByAppIdSiteResponses]
+
+export type PostTrialAppsByAppIdTextToAudioData = {
+ body: TextToSpeechRequest
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/text-to-audio'
+}
+
+export type PostTrialAppsByAppIdTextToAudioResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTrialAppsByAppIdTextToAudioResponse
+ = PostTrialAppsByAppIdTextToAudioResponses[keyof PostTrialAppsByAppIdTextToAudioResponses]
+
+export type GetTrialAppsByAppIdWorkflowsData = {
+ body?: never
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/workflows'
+}
+
+export type GetTrialAppsByAppIdWorkflowsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetTrialAppsByAppIdWorkflowsResponse
+ = GetTrialAppsByAppIdWorkflowsResponses[keyof GetTrialAppsByAppIdWorkflowsResponses]
+
+export type PostTrialAppsByAppIdWorkflowsRunData = {
+ body: WorkflowRunRequest
+ path: {
+ app_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/workflows/run'
+}
+
+export type PostTrialAppsByAppIdWorkflowsRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTrialAppsByAppIdWorkflowsRunResponse
+ = PostTrialAppsByAppIdWorkflowsRunResponses[keyof PostTrialAppsByAppIdWorkflowsRunResponses]
+
+export type PostTrialAppsByAppIdWorkflowsTasksByTaskIdStopData = {
+ body?: never
+ path: {
+ app_id: string
+ task_id: string
+ }
+ query?: never
+ url: '/trial-apps/{app_id}/workflows/tasks/{task_id}/stop'
+}
+
+export type PostTrialAppsByAppIdWorkflowsTasksByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTrialAppsByAppIdWorkflowsTasksByTaskIdStopResponse
+ = PostTrialAppsByAppIdWorkflowsTasksByTaskIdStopResponses[keyof PostTrialAppsByAppIdWorkflowsTasksByTaskIdStopResponses]
diff --git a/packages/contracts/generated/api/console/trial-apps/zod.gen.ts b/packages/contracts/generated/api/console/trial-apps/zod.gen.ts
new file mode 100644
index 00000000000..f7a52425a2c
--- /dev/null
+++ b/packages/contracts/generated/api/console/trial-apps/zod.gen.ts
@@ -0,0 +1,168 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * ChatRequest
+ */
+export const zChatRequest = z.object({
+ conversation_id: z.string().nullish(),
+ files: z.array(z.unknown()).nullish(),
+ inputs: z.record(z.string(), z.unknown()),
+ parent_message_id: z.string().nullish(),
+ query: z.string(),
+ retriever_from: z.string().optional().default('explore_app'),
+})
+
+/**
+ * CompletionRequest
+ */
+export const zCompletionRequest = z.object({
+ files: z.array(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'),
+})
+
+/**
+ * TextToSpeechRequest
+ */
+export const zTextToSpeechRequest = z.object({
+ message_id: z.string().nullish(),
+ streaming: z.boolean().nullish(),
+ text: z.string().nullish(),
+ voice: z.string().nullish(),
+})
+
+/**
+ * WorkflowRunRequest
+ */
+export const zWorkflowRunRequest = z.object({
+ files: z.array(z.unknown()).nullish(),
+ inputs: z.record(z.string(), z.unknown()),
+})
+
+export const zGetTrialAppsByAppIdPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetTrialAppsByAppIdResponse = z.record(z.string(), z.unknown())
+
+export const zPostTrialAppsByAppIdAudioToTextPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostTrialAppsByAppIdAudioToTextResponse = z.record(z.string(), z.unknown())
+
+export const zPostTrialAppsByAppIdChatMessagesBody = zChatRequest
+
+export const zPostTrialAppsByAppIdChatMessagesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostTrialAppsByAppIdChatMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zPostTrialAppsByAppIdCompletionMessagesBody = zCompletionRequest
+
+export const zPostTrialAppsByAppIdCompletionMessagesPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostTrialAppsByAppIdCompletionMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zGetTrialAppsByAppIdDatasetsPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetTrialAppsByAppIdDatasetsResponse = z.record(z.string(), z.unknown())
+
+export const zGetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsPath = z.object({
+ app_id: z.string(),
+ message_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetTrialAppsByAppIdMessagesByMessageIdSuggestedQuestionsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetTrialAppsByAppIdParametersPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetTrialAppsByAppIdParametersResponse = z.record(z.string(), z.unknown())
+
+export const zGetTrialAppsByAppIdSitePath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetTrialAppsByAppIdSiteResponse = z.record(z.string(), z.unknown())
+
+export const zPostTrialAppsByAppIdTextToAudioBody = zTextToSpeechRequest
+
+export const zPostTrialAppsByAppIdTextToAudioPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostTrialAppsByAppIdTextToAudioResponse = z.record(z.string(), z.unknown())
+
+export const zGetTrialAppsByAppIdWorkflowsPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetTrialAppsByAppIdWorkflowsResponse = z.record(z.string(), z.unknown())
+
+export const zPostTrialAppsByAppIdWorkflowsRunBody = zWorkflowRunRequest
+
+export const zPostTrialAppsByAppIdWorkflowsRunPath = z.object({
+ app_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostTrialAppsByAppIdWorkflowsRunResponse = z.record(z.string(), z.unknown())
+
+export const zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopPath = z.object({
+ app_id: z.string(),
+ task_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostTrialAppsByAppIdWorkflowsTasksByTaskIdStopResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
diff --git a/packages/contracts/generated/api/console/website/orpc.gen.ts b/packages/contracts/generated/api/console/website/orpc.gen.ts
new file mode 100644
index 00000000000..698f6569678
--- /dev/null
+++ b/packages/contracts/generated/api/console/website/orpc.gen.ts
@@ -0,0 +1,68 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zGetWebsiteCrawlStatusByJobIdPath,
+ zGetWebsiteCrawlStatusByJobIdQuery,
+ zGetWebsiteCrawlStatusByJobIdResponse,
+ zPostWebsiteCrawlBody,
+ zPostWebsiteCrawlResponse,
+} from './zod.gen'
+
+/**
+ * Get website crawl status
+ */
+export const get = oc
+ .route({
+ description: 'Get website crawl status',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWebsiteCrawlStatusByJobId',
+ path: '/website/crawl/status/{job_id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetWebsiteCrawlStatusByJobIdPath,
+ query: zGetWebsiteCrawlStatusByJobIdQuery,
+ }),
+ )
+ .output(zGetWebsiteCrawlStatusByJobIdResponse)
+
+export const byJobId = {
+ get,
+}
+
+export const status = {
+ byJobId,
+}
+
+/**
+ * Crawl website content
+ */
+export const post = oc
+ .route({
+ description: 'Crawl website content',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWebsiteCrawl',
+ path: '/website/crawl',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWebsiteCrawlBody }))
+ .output(zPostWebsiteCrawlResponse)
+
+export const crawl = {
+ post,
+ status,
+}
+
+export const website = {
+ crawl,
+}
+
+export const contract = {
+ website,
+}
diff --git a/packages/contracts/generated/api/console/website/types.gen.ts b/packages/contracts/generated/api/console/website/types.gen.ts
new file mode 100644
index 00000000000..e47b11a8195
--- /dev/null
+++ b/packages/contracts/generated/api/console/website/types.gen.ts
@@ -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 WebsiteCrawlPayload = {
+ options: {
+ [key: string]: unknown
+ }
+ provider: 'firecrawl' | 'watercrawl' | 'jinareader'
+ url: string
+}
+
+export type PostWebsiteCrawlData = {
+ body: WebsiteCrawlPayload
+ path?: never
+ query?: never
+ url: '/website/crawl'
+}
+
+export type PostWebsiteCrawlErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWebsiteCrawlError = PostWebsiteCrawlErrors[keyof PostWebsiteCrawlErrors]
+
+export type PostWebsiteCrawlResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWebsiteCrawlResponse = PostWebsiteCrawlResponses[keyof PostWebsiteCrawlResponses]
+
+export type GetWebsiteCrawlStatusByJobIdData = {
+ body?: never
+ path: {
+ job_id: string
+ }
+ query: {
+ provider: 'firecrawl' | 'watercrawl' | 'jinareader'
+ }
+ url: '/website/crawl/status/{job_id}'
+}
+
+export type GetWebsiteCrawlStatusByJobIdErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWebsiteCrawlStatusByJobIdError
+ = GetWebsiteCrawlStatusByJobIdErrors[keyof GetWebsiteCrawlStatusByJobIdErrors]
+
+export type GetWebsiteCrawlStatusByJobIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWebsiteCrawlStatusByJobIdResponse
+ = GetWebsiteCrawlStatusByJobIdResponses[keyof GetWebsiteCrawlStatusByJobIdResponses]
diff --git a/packages/contracts/generated/api/console/website/zod.gen.ts b/packages/contracts/generated/api/console/website/zod.gen.ts
new file mode 100644
index 00000000000..a7590ec9ee3
--- /dev/null
+++ b/packages/contracts/generated/api/console/website/zod.gen.ts
@@ -0,0 +1,32 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * WebsiteCrawlPayload
+ */
+export const zWebsiteCrawlPayload = z.object({
+ options: z.record(z.string(), z.unknown()),
+ provider: z.enum(['firecrawl', 'watercrawl', 'jinareader']),
+ url: z.string(),
+})
+
+export const zPostWebsiteCrawlBody = zWebsiteCrawlPayload
+
+/**
+ * Website crawl initiated successfully
+ */
+export const zPostWebsiteCrawlResponse = z.record(z.string(), z.unknown())
+
+export const zGetWebsiteCrawlStatusByJobIdPath = z.object({
+ job_id: z.string(),
+})
+
+export const zGetWebsiteCrawlStatusByJobIdQuery = z.object({
+ provider: z.enum(['firecrawl', 'watercrawl', 'jinareader']),
+})
+
+/**
+ * Crawl status retrieved successfully
+ */
+export const zGetWebsiteCrawlStatusByJobIdResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/workflow/orpc.gen.ts b/packages/contracts/generated/api/console/workflow/orpc.gen.ts
new file mode 100644
index 00000000000..bf139e6ac12
--- /dev/null
+++ b/packages/contracts/generated/api/console/workflow/orpc.gen.ts
@@ -0,0 +1,74 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zGetWorkflowByWorkflowRunIdEventsPath,
+ zGetWorkflowByWorkflowRunIdEventsResponse,
+ zGetWorkflowByWorkflowRunIdPauseDetailsPath,
+ zGetWorkflowByWorkflowRunIdPauseDetailsResponse,
+} from './zod.gen'
+
+/**
+ * Get workflow execution events stream after resume
+ *
+ * GET /console/api/workflow/<workflow_run_id>/events
+ *
+ * Returns Server-Sent Events stream.
+ */
+export const get = oc
+ .route({
+ description:
+ 'GET /console/api/workflow/<workflow_run_id>/events\n\nReturns Server-Sent Events stream.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkflowByWorkflowRunIdEvents',
+ path: '/workflow/{workflow_run_id}/events',
+ summary: 'Get workflow execution events stream after resume',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkflowByWorkflowRunIdEventsPath }))
+ .output(zGetWorkflowByWorkflowRunIdEventsResponse)
+
+export const events = {
+ get,
+}
+
+/**
+ * Get workflow pause details
+ *
+ * GET /console/api/workflow/<workflow_run_id>/pause-details
+ *
+ * Returns information about why and where the workflow is paused.
+ */
+export const get2 = oc
+ .route({
+ description:
+ 'GET /console/api/workflow/<workflow_run_id>/pause-details\n\nReturns information about why and where the workflow is paused.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkflowByWorkflowRunIdPauseDetails',
+ path: '/workflow/{workflow_run_id}/pause-details',
+ summary: 'Get workflow pause details',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkflowByWorkflowRunIdPauseDetailsPath }))
+ .output(zGetWorkflowByWorkflowRunIdPauseDetailsResponse)
+
+export const pauseDetails = {
+ get: get2,
+}
+
+export const byWorkflowRunId = {
+ events,
+ pauseDetails,
+}
+
+export const workflow = {
+ byWorkflowRunId,
+}
+
+export const contract = {
+ workflow,
+}
diff --git a/packages/contracts/generated/api/console/workflow/types.gen.ts b/packages/contracts/generated/api/console/workflow/types.gen.ts
new file mode 100644
index 00000000000..a3fae60eae0
--- /dev/null
+++ b/packages/contracts/generated/api/console/workflow/types.gen.ts
@@ -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 GetWorkflowByWorkflowRunIdEventsData = {
+ body?: never
+ path: {
+ workflow_run_id: string
+ }
+ query?: never
+ url: '/workflow/{workflow_run_id}/events'
+}
+
+export type GetWorkflowByWorkflowRunIdEventsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkflowByWorkflowRunIdEventsResponse
+ = GetWorkflowByWorkflowRunIdEventsResponses[keyof GetWorkflowByWorkflowRunIdEventsResponses]
+
+export type GetWorkflowByWorkflowRunIdPauseDetailsData = {
+ body?: never
+ path: {
+ workflow_run_id: string
+ }
+ query?: never
+ url: '/workflow/{workflow_run_id}/pause-details'
+}
+
+export type GetWorkflowByWorkflowRunIdPauseDetailsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkflowByWorkflowRunIdPauseDetailsResponse
+ = GetWorkflowByWorkflowRunIdPauseDetailsResponses[keyof GetWorkflowByWorkflowRunIdPauseDetailsResponses]
diff --git a/packages/contracts/generated/api/console/workflow/zod.gen.ts b/packages/contracts/generated/api/console/workflow/zod.gen.ts
new file mode 100644
index 00000000000..315085f60fe
--- /dev/null
+++ b/packages/contracts/generated/api/console/workflow/zod.gen.ts
@@ -0,0 +1,21 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+export const zGetWorkflowByWorkflowRunIdEventsPath = z.object({
+ workflow_run_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkflowByWorkflowRunIdEventsResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkflowByWorkflowRunIdPauseDetailsPath = z.object({
+ workflow_run_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkflowByWorkflowRunIdPauseDetailsResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/api/console/workspaces/orpc.gen.ts b/packages/contracts/generated/api/console/workspaces/orpc.gen.ts
new file mode 100644
index 00000000000..4d16e3120ff
--- /dev/null
+++ b/packages/contracts/generated/api/console/workspaces/orpc.gen.ts
@@ -0,0 +1,3012 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zDeleteWorkspacesCurrentEndpointsByIdPath,
+ zDeleteWorkspacesCurrentEndpointsByIdResponse,
+ zDeleteWorkspacesCurrentMembersByMemberIdPath,
+ zDeleteWorkspacesCurrentMembersByMemberIdResponse,
+ zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsBody,
+ zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsPath,
+ zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
+ zDeleteWorkspacesCurrentModelProvidersByProviderModelsBody,
+ zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
+ zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
+ zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
+ zDeleteWorkspacesCurrentModelProvidersByProviderModelsPath,
+ zDeleteWorkspacesCurrentModelProvidersByProviderModelsResponse,
+ zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
+ zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
+ zDeleteWorkspacesCurrentToolProviderMcpBody,
+ zDeleteWorkspacesCurrentToolProviderMcpResponse,
+ zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
+ zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
+ zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangPath,
+ zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse,
+ zGetWorkspacesCurrentAgentProviderByProviderNamePath,
+ zGetWorkspacesCurrentAgentProviderByProviderNameResponse,
+ zGetWorkspacesCurrentAgentProvidersResponse,
+ zGetWorkspacesCurrentDatasetOperatorsResponse,
+ zGetWorkspacesCurrentDefaultModelQuery,
+ zGetWorkspacesCurrentDefaultModelResponse,
+ zGetWorkspacesCurrentEndpointsListPluginQuery,
+ zGetWorkspacesCurrentEndpointsListPluginResponse,
+ zGetWorkspacesCurrentEndpointsListQuery,
+ zGetWorkspacesCurrentEndpointsListResponse,
+ zGetWorkspacesCurrentMembersResponse,
+ zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlPath,
+ zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponse,
+ zGetWorkspacesCurrentModelProvidersByProviderCredentialsPath,
+ zGetWorkspacesCurrentModelProvidersByProviderCredentialsQuery,
+ zGetWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
+ zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
+ zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsQuery,
+ zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
+ zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesPath,
+ zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesQuery,
+ zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponse,
+ zGetWorkspacesCurrentModelProvidersByProviderModelsPath,
+ zGetWorkspacesCurrentModelProvidersByProviderModelsResponse,
+ zGetWorkspacesCurrentModelProvidersQuery,
+ zGetWorkspacesCurrentModelProvidersResponse,
+ zGetWorkspacesCurrentModelsModelTypesByModelTypePath,
+ zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse,
+ zGetWorkspacesCurrentPermissionResponse,
+ zGetWorkspacesCurrentPluginAssetQuery,
+ zGetWorkspacesCurrentPluginAssetResponse,
+ zGetWorkspacesCurrentPluginDebuggingKeyResponse,
+ zGetWorkspacesCurrentPluginFetchManifestQuery,
+ zGetWorkspacesCurrentPluginFetchManifestResponse,
+ zGetWorkspacesCurrentPluginIconQuery,
+ zGetWorkspacesCurrentPluginIconResponse,
+ zGetWorkspacesCurrentPluginListQuery,
+ zGetWorkspacesCurrentPluginListResponse,
+ zGetWorkspacesCurrentPluginMarketplacePkgQuery,
+ zGetWorkspacesCurrentPluginMarketplacePkgResponse,
+ zGetWorkspacesCurrentPluginParametersDynamicOptionsQuery,
+ zGetWorkspacesCurrentPluginParametersDynamicOptionsResponse,
+ zGetWorkspacesCurrentPluginPermissionFetchResponse,
+ zGetWorkspacesCurrentPluginPreferencesFetchResponse,
+ zGetWorkspacesCurrentPluginReadmeQuery,
+ zGetWorkspacesCurrentPluginReadmeResponse,
+ zGetWorkspacesCurrentPluginTasksByTaskIdPath,
+ zGetWorkspacesCurrentPluginTasksByTaskIdResponse,
+ zGetWorkspacesCurrentPluginTasksQuery,
+ zGetWorkspacesCurrentPluginTasksResponse,
+ zGetWorkspacesCurrentToolLabelsResponse,
+ zGetWorkspacesCurrentToolProviderApiGetResponse,
+ zGetWorkspacesCurrentToolProviderApiRemoteResponse,
+ zGetWorkspacesCurrentToolProviderApiToolsResponse,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoPath,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypePath,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponse,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsPath,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderIconPath,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoPath,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaPath,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsPath,
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse,
+ zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdPath,
+ zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse,
+ zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdPath,
+ zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse,
+ zGetWorkspacesCurrentToolProvidersResponse,
+ zGetWorkspacesCurrentToolProviderWorkflowGetResponse,
+ zGetWorkspacesCurrentToolProviderWorkflowToolsResponse,
+ zGetWorkspacesCurrentToolsApiResponse,
+ zGetWorkspacesCurrentToolsBuiltinResponse,
+ zGetWorkspacesCurrentToolsMcpResponse,
+ zGetWorkspacesCurrentToolsWorkflowResponse,
+ zGetWorkspacesCurrentTriggerProviderByProviderIconPath,
+ zGetWorkspacesCurrentTriggerProviderByProviderIconResponse,
+ zGetWorkspacesCurrentTriggerProviderByProviderInfoPath,
+ zGetWorkspacesCurrentTriggerProviderByProviderInfoResponse,
+ zGetWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
+ zGetWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdPath,
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponse,
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdPath,
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponse,
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListPath,
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse,
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizePath,
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse,
+ zGetWorkspacesCurrentTriggersResponse,
+ zGetWorkspacesResponse,
+ zPatchWorkspacesCurrentEndpointsByIdBody,
+ zPatchWorkspacesCurrentEndpointsByIdPath,
+ zPatchWorkspacesCurrentEndpointsByIdResponse,
+ zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableBody,
+ zPatchWorkspacesCurrentModelProvidersByProviderModelsDisablePath,
+ zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse,
+ zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableBody,
+ zPatchWorkspacesCurrentModelProvidersByProviderModelsEnablePath,
+ zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse,
+ zPostWorkspacesCurrentDefaultModelBody,
+ zPostWorkspacesCurrentDefaultModelResponse,
+ zPostWorkspacesCurrentEndpointsBody,
+ zPostWorkspacesCurrentEndpointsCreateBody,
+ zPostWorkspacesCurrentEndpointsCreateResponse,
+ zPostWorkspacesCurrentEndpointsDeleteBody,
+ zPostWorkspacesCurrentEndpointsDeleteResponse,
+ zPostWorkspacesCurrentEndpointsDisableBody,
+ zPostWorkspacesCurrentEndpointsDisableResponse,
+ zPostWorkspacesCurrentEndpointsEnableBody,
+ zPostWorkspacesCurrentEndpointsEnableResponse,
+ zPostWorkspacesCurrentEndpointsResponse,
+ zPostWorkspacesCurrentEndpointsUpdateBody,
+ zPostWorkspacesCurrentEndpointsUpdateResponse,
+ zPostWorkspacesCurrentMembersByMemberIdOwnerTransferBody,
+ zPostWorkspacesCurrentMembersByMemberIdOwnerTransferPath,
+ zPostWorkspacesCurrentMembersByMemberIdOwnerTransferResponse,
+ zPostWorkspacesCurrentMembersInviteEmailBody,
+ zPostWorkspacesCurrentMembersInviteEmailResponse,
+ zPostWorkspacesCurrentMembersOwnerTransferCheckBody,
+ zPostWorkspacesCurrentMembersOwnerTransferCheckResponse,
+ zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailBody,
+ zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderCredentialsBody,
+ zPostWorkspacesCurrentModelProvidersByProviderCredentialsPath,
+ zPostWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchBody,
+ zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchPath,
+ zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateBody,
+ zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidatePath,
+ zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsBody,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchBody,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchPath,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateBody,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidatePath,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateBody,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidatePath,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateBody,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidatePath,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsPath,
+ zPostWorkspacesCurrentModelProvidersByProviderModelsResponse,
+ zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeBody,
+ zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypePath,
+ zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponse,
+ zPostWorkspacesCurrentPluginInstallGithubBody,
+ zPostWorkspacesCurrentPluginInstallGithubResponse,
+ zPostWorkspacesCurrentPluginInstallMarketplaceBody,
+ zPostWorkspacesCurrentPluginInstallMarketplaceResponse,
+ zPostWorkspacesCurrentPluginInstallPkgBody,
+ zPostWorkspacesCurrentPluginInstallPkgResponse,
+ zPostWorkspacesCurrentPluginListInstallationsIdsBody,
+ zPostWorkspacesCurrentPluginListInstallationsIdsResponse,
+ zPostWorkspacesCurrentPluginListLatestVersionsBody,
+ zPostWorkspacesCurrentPluginListLatestVersionsResponse,
+ zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsBody,
+ zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponse,
+ zPostWorkspacesCurrentPluginPermissionChangeBody,
+ zPostWorkspacesCurrentPluginPermissionChangeResponse,
+ zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeBody,
+ zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponse,
+ zPostWorkspacesCurrentPluginPreferencesChangeBody,
+ zPostWorkspacesCurrentPluginPreferencesChangeResponse,
+ zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierPath,
+ zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse,
+ zPostWorkspacesCurrentPluginTasksByTaskIdDeletePath,
+ zPostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse,
+ zPostWorkspacesCurrentPluginTasksDeleteAllResponse,
+ zPostWorkspacesCurrentPluginUninstallBody,
+ zPostWorkspacesCurrentPluginUninstallResponse,
+ zPostWorkspacesCurrentPluginUpgradeGithubBody,
+ zPostWorkspacesCurrentPluginUpgradeGithubResponse,
+ zPostWorkspacesCurrentPluginUpgradeMarketplaceBody,
+ zPostWorkspacesCurrentPluginUpgradeMarketplaceResponse,
+ zPostWorkspacesCurrentPluginUploadBundleResponse,
+ zPostWorkspacesCurrentPluginUploadGithubBody,
+ zPostWorkspacesCurrentPluginUploadGithubResponse,
+ zPostWorkspacesCurrentPluginUploadPkgResponse,
+ zPostWorkspacesCurrentResponse,
+ zPostWorkspacesCurrentToolProviderApiAddBody,
+ zPostWorkspacesCurrentToolProviderApiAddResponse,
+ zPostWorkspacesCurrentToolProviderApiDeleteBody,
+ zPostWorkspacesCurrentToolProviderApiDeleteResponse,
+ zPostWorkspacesCurrentToolProviderApiSchemaBody,
+ zPostWorkspacesCurrentToolProviderApiSchemaResponse,
+ zPostWorkspacesCurrentToolProviderApiTestPreBody,
+ zPostWorkspacesCurrentToolProviderApiTestPreResponse,
+ zPostWorkspacesCurrentToolProviderApiUpdateBody,
+ zPostWorkspacesCurrentToolProviderApiUpdateResponse,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderAddBody,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderAddPath,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderAddResponse,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialBody,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialPath,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponse,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteBody,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderDeletePath,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponse,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientBody,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateBody,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdatePath,
+ zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponse,
+ zPostWorkspacesCurrentToolProviderMcpAuthBody,
+ zPostWorkspacesCurrentToolProviderMcpAuthResponse,
+ zPostWorkspacesCurrentToolProviderMcpBody,
+ zPostWorkspacesCurrentToolProviderMcpResponse,
+ zPostWorkspacesCurrentToolProviderWorkflowCreateBody,
+ zPostWorkspacesCurrentToolProviderWorkflowCreateResponse,
+ zPostWorkspacesCurrentToolProviderWorkflowDeleteBody,
+ zPostWorkspacesCurrentToolProviderWorkflowDeleteResponse,
+ zPostWorkspacesCurrentToolProviderWorkflowUpdateBody,
+ zPostWorkspacesCurrentToolProviderWorkflowUpdateResponse,
+ zPostWorkspacesCurrentTriggerProviderByProviderOauthClientBody,
+ zPostWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
+ zPostWorkspacesCurrentTriggerProviderByProviderOauthClientResponse,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdBody,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdPath,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponse,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateBody,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreatePath,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponse,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdBody,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdPath,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponse,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdBody,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdPath,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponse,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdBody,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdPath,
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponse,
+ zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeletePath,
+ zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponse,
+ zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateBody,
+ zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdatePath,
+ zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponse,
+ zPostWorkspacesCustomConfigBody,
+ zPostWorkspacesCustomConfigResponse,
+ zPostWorkspacesCustomConfigWebappLogoUploadResponse,
+ zPostWorkspacesInfoBody,
+ zPostWorkspacesInfoResponse,
+ zPostWorkspacesSwitchBody,
+ zPostWorkspacesSwitchResponse,
+ zPutWorkspacesCurrentMembersByMemberIdUpdateRoleBody,
+ zPutWorkspacesCurrentMembersByMemberIdUpdateRolePath,
+ zPutWorkspacesCurrentMembersByMemberIdUpdateRoleResponse,
+ zPutWorkspacesCurrentModelProvidersByProviderCredentialsBody,
+ zPutWorkspacesCurrentModelProvidersByProviderCredentialsPath,
+ zPutWorkspacesCurrentModelProvidersByProviderCredentialsResponse,
+ zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
+ zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
+ zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse,
+ zPutWorkspacesCurrentToolProviderMcpBody,
+ zPutWorkspacesCurrentToolProviderMcpResponse,
+} from './zod.gen'
+
+/**
+ * Get specific agent provider details
+ */
+export const get = oc
+ .route({
+ description: 'Get specific agent provider details',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentAgentProviderByProviderName',
+ path: '/workspaces/current/agent-provider/{provider_name}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentAgentProviderByProviderNamePath }))
+ .output(zGetWorkspacesCurrentAgentProviderByProviderNameResponse)
+
+export const byProviderName = {
+ get,
+}
+
+export const agentProvider = {
+ byProviderName,
+}
+
+/**
+ * Get list of available agent providers
+ */
+export const get2 = oc
+ .route({
+ description: 'Get list of available agent providers',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentAgentProviders',
+ path: '/workspaces/current/agent-providers',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentAgentProvidersResponse)
+
+export const agentProviders = {
+ get: get2,
+}
+
+export const get3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentDatasetOperators',
+ path: '/workspaces/current/dataset-operators',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentDatasetOperatorsResponse)
+
+export const datasetOperators = {
+ get: get3,
+}
+
+export const get4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentDefaultModel',
+ path: '/workspaces/current/default-model',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentDefaultModelQuery }))
+ .output(zGetWorkspacesCurrentDefaultModelResponse)
+
+export const post = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentDefaultModel',
+ path: '/workspaces/current/default-model',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentDefaultModelBody }))
+ .output(zPostWorkspacesCurrentDefaultModelResponse)
+
+export const defaultModel = {
+ get: get4,
+ post,
+}
+
+/**
+ * Deprecated legacy alias for creating a plugin endpoint. Use POST /workspaces/current/endpoints instead.
+ *
+ * @deprecated
+ */
+export const post2 = oc
+ .route({
+ deprecated: true,
+ description:
+ 'Deprecated legacy alias for creating a plugin endpoint. Use POST /workspaces/current/endpoints instead.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentEndpointsCreate',
+ path: '/workspaces/current/endpoints/create',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentEndpointsCreateBody }))
+ .output(zPostWorkspacesCurrentEndpointsCreateResponse)
+
+export const create = {
+ post: post2,
+}
+
+/**
+ * Deprecated legacy alias for deleting a plugin endpoint. Use DELETE /workspaces/current/endpoints/{id} instead.
+ *
+ * @deprecated
+ */
+export const post3 = oc
+ .route({
+ deprecated: true,
+ description:
+ 'Deprecated legacy alias for deleting a plugin endpoint. Use DELETE /workspaces/current/endpoints/{id} instead.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentEndpointsDelete',
+ path: '/workspaces/current/endpoints/delete',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentEndpointsDeleteBody }))
+ .output(zPostWorkspacesCurrentEndpointsDeleteResponse)
+
+export const delete_ = {
+ post: post3,
+}
+
+/**
+ * Disable a plugin endpoint
+ */
+export const post4 = oc
+ .route({
+ description: 'Disable a plugin endpoint',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentEndpointsDisable',
+ path: '/workspaces/current/endpoints/disable',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentEndpointsDisableBody }))
+ .output(zPostWorkspacesCurrentEndpointsDisableResponse)
+
+export const disable = {
+ post: post4,
+}
+
+/**
+ * Enable a plugin endpoint
+ */
+export const post5 = oc
+ .route({
+ description: 'Enable a plugin endpoint',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentEndpointsEnable',
+ path: '/workspaces/current/endpoints/enable',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentEndpointsEnableBody }))
+ .output(zPostWorkspacesCurrentEndpointsEnableResponse)
+
+export const enable = {
+ post: post5,
+}
+
+/**
+ * List endpoints for a specific plugin
+ */
+export const get5 = oc
+ .route({
+ description: 'List endpoints for a specific plugin',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentEndpointsListPlugin',
+ path: '/workspaces/current/endpoints/list/plugin',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentEndpointsListPluginQuery }))
+ .output(zGetWorkspacesCurrentEndpointsListPluginResponse)
+
+export const plugin = {
+ get: get5,
+}
+
+/**
+ * List plugin endpoints with pagination
+ */
+export const get6 = oc
+ .route({
+ description: 'List plugin endpoints with pagination',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentEndpointsList',
+ path: '/workspaces/current/endpoints/list',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentEndpointsListQuery }))
+ .output(zGetWorkspacesCurrentEndpointsListResponse)
+
+export const list = {
+ get: get6,
+ plugin,
+}
+
+/**
+ * Deprecated legacy alias for updating a plugin endpoint. Use PATCH /workspaces/current/endpoints/{id} instead.
+ *
+ * @deprecated
+ */
+export const post6 = oc
+ .route({
+ deprecated: true,
+ description:
+ 'Deprecated legacy alias for updating a plugin endpoint. Use PATCH /workspaces/current/endpoints/{id} instead.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentEndpointsUpdate',
+ path: '/workspaces/current/endpoints/update',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentEndpointsUpdateBody }))
+ .output(zPostWorkspacesCurrentEndpointsUpdateResponse)
+
+export const update = {
+ post: post6,
+}
+
+/**
+ * Delete a plugin endpoint
+ */
+export const delete2 = oc
+ .route({
+ description: 'Delete a plugin endpoint',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteWorkspacesCurrentEndpointsById',
+ path: '/workspaces/current/endpoints/{id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteWorkspacesCurrentEndpointsByIdPath }))
+ .output(zDeleteWorkspacesCurrentEndpointsByIdResponse)
+
+/**
+ * Update a plugin endpoint
+ */
+export const patch = oc
+ .route({
+ description: 'Update a plugin endpoint',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchWorkspacesCurrentEndpointsById',
+ path: '/workspaces/current/endpoints/{id}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPatchWorkspacesCurrentEndpointsByIdBody,
+ params: zPatchWorkspacesCurrentEndpointsByIdPath,
+ }),
+ )
+ .output(zPatchWorkspacesCurrentEndpointsByIdResponse)
+
+export const byId = {
+ delete: delete2,
+ patch,
+}
+
+/**
+ * Create a new plugin endpoint
+ */
+export const post7 = oc
+ .route({
+ description: 'Create a new plugin endpoint',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentEndpoints',
+ path: '/workspaces/current/endpoints',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentEndpointsBody }))
+ .output(zPostWorkspacesCurrentEndpointsResponse)
+
+export const endpoints = {
+ post: post7,
+ create,
+ delete: delete_,
+ disable,
+ enable,
+ list,
+ update,
+ byId,
+}
+
+export const post8 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentMembersInviteEmail',
+ path: '/workspaces/current/members/invite-email',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentMembersInviteEmailBody }))
+ .output(zPostWorkspacesCurrentMembersInviteEmailResponse)
+
+export const inviteEmail = {
+ post: post8,
+}
+
+export const post9 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentMembersOwnerTransferCheck',
+ path: '/workspaces/current/members/owner-transfer-check',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentMembersOwnerTransferCheckBody }))
+ .output(zPostWorkspacesCurrentMembersOwnerTransferCheckResponse)
+
+export const ownerTransferCheck = {
+ post: post9,
+}
+
+export const post10 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentMembersSendOwnerTransferConfirmEmail',
+ path: '/workspaces/current/members/send-owner-transfer-confirm-email',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailBody }))
+ .output(zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponse)
+
+export const sendOwnerTransferConfirmEmail = {
+ post: post10,
+}
+
+export const post11 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentMembersByMemberIdOwnerTransfer',
+ path: '/workspaces/current/members/{member_id}/owner-transfer',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentMembersByMemberIdOwnerTransferBody,
+ params: zPostWorkspacesCurrentMembersByMemberIdOwnerTransferPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentMembersByMemberIdOwnerTransferResponse)
+
+export const ownerTransfer = {
+ post: post11,
+}
+
+export const put = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putWorkspacesCurrentMembersByMemberIdUpdateRole',
+ path: '/workspaces/current/members/{member_id}/update-role',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPutWorkspacesCurrentMembersByMemberIdUpdateRoleBody,
+ params: zPutWorkspacesCurrentMembersByMemberIdUpdateRolePath,
+ }),
+ )
+ .output(zPutWorkspacesCurrentMembersByMemberIdUpdateRoleResponse)
+
+export const updateRole = {
+ put,
+}
+
+export const delete3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteWorkspacesCurrentMembersByMemberId',
+ path: '/workspaces/current/members/{member_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteWorkspacesCurrentMembersByMemberIdPath }))
+ .output(zDeleteWorkspacesCurrentMembersByMemberIdResponse)
+
+export const byMemberId = {
+ delete: delete3,
+ ownerTransfer,
+ updateRole,
+}
+
+export const get7 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentMembers',
+ path: '/workspaces/current/members',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentMembersResponse)
+
+export const members = {
+ get: get7,
+ inviteEmail,
+ ownerTransferCheck,
+ sendOwnerTransferConfirmEmail,
+ byMemberId,
+}
+
+export const get8 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentModelProvidersByProviderCheckoutUrl',
+ path: '/workspaces/current/model-providers/{provider}/checkout-url',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlPath }))
+ .output(zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponse)
+
+export const checkoutUrl = {
+ get: get8,
+}
+
+export const post12 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentModelProvidersByProviderCredentialsSwitch',
+ path: '/workspaces/current/model-providers/{provider}/credentials/switch',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchBody,
+ params: zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponse)
+
+export const switch_ = {
+ post: post12,
+}
+
+export const post13 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentModelProvidersByProviderCredentialsValidate',
+ path: '/workspaces/current/model-providers/{provider}/credentials/validate',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateBody,
+ params: zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidatePath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponse)
+
+export const validate = {
+ post: post13,
+}
+
+export const delete4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteWorkspacesCurrentModelProvidersByProviderCredentials',
+ path: '/workspaces/current/model-providers/{provider}/credentials',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsBody,
+ params: zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsPath,
+ }),
+ )
+ .output(zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse)
+
+export const get9 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentModelProvidersByProviderCredentials',
+ path: '/workspaces/current/model-providers/{provider}/credentials',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetWorkspacesCurrentModelProvidersByProviderCredentialsPath,
+ query: zGetWorkspacesCurrentModelProvidersByProviderCredentialsQuery.optional(),
+ }),
+ )
+ .output(zGetWorkspacesCurrentModelProvidersByProviderCredentialsResponse)
+
+export const post14 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentModelProvidersByProviderCredentials',
+ path: '/workspaces/current/model-providers/{provider}/credentials',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderCredentialsBody,
+ params: zPostWorkspacesCurrentModelProvidersByProviderCredentialsPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentModelProvidersByProviderCredentialsResponse)
+
+export const put2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putWorkspacesCurrentModelProvidersByProviderCredentials',
+ path: '/workspaces/current/model-providers/{provider}/credentials',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPutWorkspacesCurrentModelProvidersByProviderCredentialsBody,
+ params: zPutWorkspacesCurrentModelProvidersByProviderCredentialsPath,
+ }),
+ )
+ .output(zPutWorkspacesCurrentModelProvidersByProviderCredentialsResponse)
+
+export const credentials = {
+ delete: delete4,
+ get: get9,
+ post: post14,
+ put: put2,
+ switch: switch_,
+ validate,
+}
+
+export const post15 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitch',
+ path: '/workspaces/current/model-providers/{provider}/models/credentials/switch',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchBody,
+ params: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponse)
+
+export const switch2 = {
+ post: post15,
+}
+
+export const post16 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidate',
+ path: '/workspaces/current/model-providers/{provider}/models/credentials/validate',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateBody,
+ params: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidatePath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponse)
+
+export const validate2 = {
+ post: post16,
+}
+
+export const delete5 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteWorkspacesCurrentModelProvidersByProviderModelsCredentials',
+ path: '/workspaces/current/model-providers/{provider}/models/credentials',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
+ params: zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
+ }),
+ )
+ .output(zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse)
+
+export const get10 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentModelProvidersByProviderModelsCredentials',
+ path: '/workspaces/current/model-providers/{provider}/models/credentials',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
+ query: zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsQuery,
+ }),
+ )
+ .output(zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse)
+
+export const post17 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentModelProvidersByProviderModelsCredentials',
+ path: '/workspaces/current/model-providers/{provider}/models/credentials',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
+ params: zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse)
+
+export const put3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putWorkspacesCurrentModelProvidersByProviderModelsCredentials',
+ path: '/workspaces/current/model-providers/{provider}/models/credentials',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody,
+ params: zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath,
+ }),
+ )
+ .output(zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse)
+
+export const credentials2 = {
+ delete: delete5,
+ get: get10,
+ post: post17,
+ put: put3,
+ switch: switch2,
+ validate: validate2,
+}
+
+export const patch2 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchWorkspacesCurrentModelProvidersByProviderModelsDisable',
+ path: '/workspaces/current/model-providers/{provider}/models/disable',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableBody,
+ params: zPatchWorkspacesCurrentModelProvidersByProviderModelsDisablePath,
+ }),
+ )
+ .output(zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse)
+
+export const disable2 = {
+ patch: patch2,
+}
+
+export const patch3 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchWorkspacesCurrentModelProvidersByProviderModelsEnable',
+ path: '/workspaces/current/model-providers/{provider}/models/enable',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableBody,
+ params: zPatchWorkspacesCurrentModelProvidersByProviderModelsEnablePath,
+ }),
+ )
+ .output(zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse)
+
+export const enable2 = {
+ patch: patch3,
+}
+
+export const post18 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId:
+ 'postWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidate',
+ path: '/workspaces/current/model-providers/{provider}/models/load-balancing-configs/credentials-validate',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateBody,
+ params:
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidatePath,
+ }),
+ )
+ .output(
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponse,
+ )
+
+export const credentialsValidate = {
+ post: post18,
+}
+
+export const post19 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId:
+ 'postWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidate',
+ path: '/workspaces/current/model-providers/{provider}/models/load-balancing-configs/{config_id}/credentials-validate',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateBody,
+ params:
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidatePath,
+ }),
+ )
+ .output(
+ zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponse,
+ )
+
+export const credentialsValidate2 = {
+ post: post19,
+}
+
+export const byConfigId = {
+ credentialsValidate: credentialsValidate2,
+}
+
+export const loadBalancingConfigs = {
+ credentialsValidate,
+ byConfigId,
+}
+
+export const get11 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentModelProvidersByProviderModelsParameterRules',
+ path: '/workspaces/current/model-providers/{provider}/models/parameter-rules',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesPath,
+ query: zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesQuery,
+ }),
+ )
+ .output(zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponse)
+
+export const parameterRules = {
+ get: get11,
+}
+
+export const delete6 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteWorkspacesCurrentModelProvidersByProviderModels',
+ path: '/workspaces/current/model-providers/{provider}/models',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zDeleteWorkspacesCurrentModelProvidersByProviderModelsBody,
+ params: zDeleteWorkspacesCurrentModelProvidersByProviderModelsPath,
+ }),
+ )
+ .output(zDeleteWorkspacesCurrentModelProvidersByProviderModelsResponse)
+
+export const get12 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentModelProvidersByProviderModels',
+ path: '/workspaces/current/model-providers/{provider}/models',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentModelProvidersByProviderModelsPath }))
+ .output(zGetWorkspacesCurrentModelProvidersByProviderModelsResponse)
+
+export const post20 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentModelProvidersByProviderModels',
+ path: '/workspaces/current/model-providers/{provider}/models',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderModelsBody,
+ params: zPostWorkspacesCurrentModelProvidersByProviderModelsPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentModelProvidersByProviderModelsResponse)
+
+export const models = {
+ delete: delete6,
+ get: get12,
+ post: post20,
+ credentials: credentials2,
+ disable: disable2,
+ enable: enable2,
+ loadBalancingConfigs,
+ parameterRules,
+}
+
+export const post21 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentModelProvidersByProviderPreferredProviderType',
+ path: '/workspaces/current/model-providers/{provider}/preferred-provider-type',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeBody,
+ params: zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypePath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponse)
+
+export const preferredProviderType = {
+ post: post21,
+}
+
+export const byProvider = {
+ checkoutUrl,
+ credentials,
+ models,
+ preferredProviderType,
+}
+
+export const get13 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentModelProviders',
+ path: '/workspaces/current/model-providers',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentModelProvidersQuery.optional() }))
+ .output(zGetWorkspacesCurrentModelProvidersResponse)
+
+export const modelProviders = {
+ get: get13,
+ byProvider,
+}
+
+export const get14 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentModelsModelTypesByModelType',
+ path: '/workspaces/current/models/model-types/{model_type}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentModelsModelTypesByModelTypePath }))
+ .output(zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse)
+
+export const byModelType = {
+ get: get14,
+}
+
+export const modelTypes = {
+ byModelType,
+}
+
+export const models2 = {
+ modelTypes,
+}
+
+/**
+ * Get workspace permission settings
+ *
+ * Returns permission flags that control workspace features like member invitations and owner transfer.
+ */
+export const get15 = oc
+ .route({
+ description:
+ 'Returns permission flags that control workspace features like member invitations and owner transfer.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPermission',
+ path: '/workspaces/current/permission',
+ summary: 'Get workspace permission settings',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentPermissionResponse)
+
+export const permission = {
+ get: get15,
+}
+
+export const get16 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginAsset',
+ path: '/workspaces/current/plugin/asset',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentPluginAssetQuery }))
+ .output(zGetWorkspacesCurrentPluginAssetResponse)
+
+export const asset = {
+ get: get16,
+}
+
+export const get17 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginDebuggingKey',
+ path: '/workspaces/current/plugin/debugging-key',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentPluginDebuggingKeyResponse)
+
+export const debuggingKey = {
+ get: get17,
+}
+
+export const get18 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginFetchManifest',
+ path: '/workspaces/current/plugin/fetch-manifest',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentPluginFetchManifestQuery }))
+ .output(zGetWorkspacesCurrentPluginFetchManifestResponse)
+
+export const fetchManifest = {
+ get: get18,
+}
+
+export const get19 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginIcon',
+ path: '/workspaces/current/plugin/icon',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentPluginIconQuery }))
+ .output(zGetWorkspacesCurrentPluginIconResponse)
+
+export const icon = {
+ get: get19,
+}
+
+export const post22 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginInstallGithub',
+ path: '/workspaces/current/plugin/install/github',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginInstallGithubBody }))
+ .output(zPostWorkspacesCurrentPluginInstallGithubResponse)
+
+export const github = {
+ post: post22,
+}
+
+export const post23 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginInstallMarketplace',
+ path: '/workspaces/current/plugin/install/marketplace',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginInstallMarketplaceBody }))
+ .output(zPostWorkspacesCurrentPluginInstallMarketplaceResponse)
+
+export const marketplace = {
+ post: post23,
+}
+
+export const post24 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginInstallPkg',
+ path: '/workspaces/current/plugin/install/pkg',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginInstallPkgBody }))
+ .output(zPostWorkspacesCurrentPluginInstallPkgResponse)
+
+export const pkg = {
+ post: post24,
+}
+
+export const install = {
+ github,
+ marketplace,
+ pkg,
+}
+
+export const post25 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginListInstallationsIds',
+ path: '/workspaces/current/plugin/list/installations/ids',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginListInstallationsIdsBody }))
+ .output(zPostWorkspacesCurrentPluginListInstallationsIdsResponse)
+
+export const ids = {
+ post: post25,
+}
+
+export const installations = {
+ ids,
+}
+
+export const post26 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginListLatestVersions',
+ path: '/workspaces/current/plugin/list/latest-versions',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginListLatestVersionsBody }))
+ .output(zPostWorkspacesCurrentPluginListLatestVersionsResponse)
+
+export const latestVersions = {
+ post: post26,
+}
+
+export const get20 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginList',
+ path: '/workspaces/current/plugin/list',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentPluginListQuery.optional() }))
+ .output(zGetWorkspacesCurrentPluginListResponse)
+
+export const list2 = {
+ get: get20,
+ installations,
+ latestVersions,
+}
+
+export const get21 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginMarketplacePkg',
+ path: '/workspaces/current/plugin/marketplace/pkg',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentPluginMarketplacePkgQuery }))
+ .output(zGetWorkspacesCurrentPluginMarketplacePkgResponse)
+
+export const pkg2 = {
+ get: get21,
+}
+
+export const marketplace2 = {
+ pkg: pkg2,
+}
+
+export const get22 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginParametersDynamicOptions',
+ path: '/workspaces/current/plugin/parameters/dynamic-options',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentPluginParametersDynamicOptionsQuery }))
+ .output(zGetWorkspacesCurrentPluginParametersDynamicOptionsResponse)
+
+export const dynamicOptions = {
+ get: get22,
+}
+
+/**
+ * Fetch dynamic options using credentials directly (for edit mode)
+ */
+export const post27 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginParametersDynamicOptionsWithCredentials',
+ path: '/workspaces/current/plugin/parameters/dynamic-options-with-credentials',
+ summary: 'Fetch dynamic options using credentials directly (for edit mode)',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ body: zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsBody }),
+ )
+ .output(zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponse)
+
+export const dynamicOptionsWithCredentials = {
+ post: post27,
+}
+
+export const parameters = {
+ dynamicOptions,
+ dynamicOptionsWithCredentials,
+}
+
+export const post28 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginPermissionChange',
+ path: '/workspaces/current/plugin/permission/change',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginPermissionChangeBody }))
+ .output(zPostWorkspacesCurrentPluginPermissionChangeResponse)
+
+export const change = {
+ post: post28,
+}
+
+export const get23 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginPermissionFetch',
+ path: '/workspaces/current/plugin/permission/fetch',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentPluginPermissionFetchResponse)
+
+export const fetch_ = {
+ get: get23,
+}
+
+export const permission2 = {
+ change,
+ fetch: fetch_,
+}
+
+export const post29 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginPreferencesAutoupgradeExclude',
+ path: '/workspaces/current/plugin/preferences/autoupgrade/exclude',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeBody }))
+ .output(zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponse)
+
+export const exclude = {
+ post: post29,
+}
+
+export const autoupgrade = {
+ exclude,
+}
+
+export const post30 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginPreferencesChange',
+ path: '/workspaces/current/plugin/preferences/change',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginPreferencesChangeBody }))
+ .output(zPostWorkspacesCurrentPluginPreferencesChangeResponse)
+
+export const change2 = {
+ post: post30,
+}
+
+export const get24 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginPreferencesFetch',
+ path: '/workspaces/current/plugin/preferences/fetch',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentPluginPreferencesFetchResponse)
+
+export const fetch2 = {
+ get: get24,
+}
+
+export const preferences = {
+ autoupgrade,
+ change: change2,
+ fetch: fetch2,
+}
+
+export const get25 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginReadme',
+ path: '/workspaces/current/plugin/readme',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentPluginReadmeQuery }))
+ .output(zGetWorkspacesCurrentPluginReadmeResponse)
+
+export const readme = {
+ get: get25,
+}
+
+export const post31 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginTasksDeleteAll',
+ path: '/workspaces/current/plugin/tasks/delete_all',
+ tags: ['console'],
+ })
+ .output(zPostWorkspacesCurrentPluginTasksDeleteAllResponse)
+
+export const deleteAll = {
+ post: post31,
+}
+
+export const post32 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifier',
+ path: '/workspaces/current/plugin/tasks/{task_id}/delete/{identifier}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierPath }))
+ .output(zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse)
+
+export const byIdentifier = {
+ post: post32,
+}
+
+export const post33 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginTasksByTaskIdDelete',
+ path: '/workspaces/current/plugin/tasks/{task_id}/delete',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zPostWorkspacesCurrentPluginTasksByTaskIdDeletePath }))
+ .output(zPostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse)
+
+export const delete7 = {
+ post: post33,
+ byIdentifier,
+}
+
+export const get26 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginTasksByTaskId',
+ path: '/workspaces/current/plugin/tasks/{task_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentPluginTasksByTaskIdPath }))
+ .output(zGetWorkspacesCurrentPluginTasksByTaskIdResponse)
+
+export const byTaskId = {
+ get: get26,
+ delete: delete7,
+}
+
+export const get27 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentPluginTasks',
+ path: '/workspaces/current/plugin/tasks',
+ tags: ['console'],
+ })
+ .input(z.object({ query: zGetWorkspacesCurrentPluginTasksQuery.optional() }))
+ .output(zGetWorkspacesCurrentPluginTasksResponse)
+
+export const tasks = {
+ get: get27,
+ deleteAll,
+ byTaskId,
+}
+
+export const post34 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginUninstall',
+ path: '/workspaces/current/plugin/uninstall',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginUninstallBody }))
+ .output(zPostWorkspacesCurrentPluginUninstallResponse)
+
+export const uninstall = {
+ post: post34,
+}
+
+export const post35 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginUpgradeGithub',
+ path: '/workspaces/current/plugin/upgrade/github',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginUpgradeGithubBody }))
+ .output(zPostWorkspacesCurrentPluginUpgradeGithubResponse)
+
+export const github2 = {
+ post: post35,
+}
+
+export const post36 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginUpgradeMarketplace',
+ path: '/workspaces/current/plugin/upgrade/marketplace',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginUpgradeMarketplaceBody }))
+ .output(zPostWorkspacesCurrentPluginUpgradeMarketplaceResponse)
+
+export const marketplace3 = {
+ post: post36,
+}
+
+export const upgrade = {
+ github: github2,
+ marketplace: marketplace3,
+}
+
+export const post37 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginUploadBundle',
+ path: '/workspaces/current/plugin/upload/bundle',
+ tags: ['console'],
+ })
+ .output(zPostWorkspacesCurrentPluginUploadBundleResponse)
+
+export const bundle = {
+ post: post37,
+}
+
+export const post38 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginUploadGithub',
+ path: '/workspaces/current/plugin/upload/github',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentPluginUploadGithubBody }))
+ .output(zPostWorkspacesCurrentPluginUploadGithubResponse)
+
+export const github3 = {
+ post: post38,
+}
+
+export const post39 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentPluginUploadPkg',
+ path: '/workspaces/current/plugin/upload/pkg',
+ tags: ['console'],
+ })
+ .output(zPostWorkspacesCurrentPluginUploadPkgResponse)
+
+export const pkg3 = {
+ post: post39,
+}
+
+export const upload = {
+ bundle,
+ github: github3,
+ pkg: pkg3,
+}
+
+export const plugin2 = {
+ asset,
+ debuggingKey,
+ fetchManifest,
+ icon,
+ install,
+ list: list2,
+ marketplace: marketplace2,
+ parameters,
+ permission: permission2,
+ preferences,
+ readme,
+ tasks,
+ uninstall,
+ upgrade,
+ upload,
+}
+
+export const get28 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolLabels',
+ path: '/workspaces/current/tool-labels',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolLabelsResponse)
+
+export const toolLabels = {
+ get: get28,
+}
+
+export const post40 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderApiAdd',
+ path: '/workspaces/current/tool-provider/api/add',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiAddBody }))
+ .output(zPostWorkspacesCurrentToolProviderApiAddResponse)
+
+export const add = {
+ post: post40,
+}
+
+export const post41 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderApiDelete',
+ path: '/workspaces/current/tool-provider/api/delete',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiDeleteBody }))
+ .output(zPostWorkspacesCurrentToolProviderApiDeleteResponse)
+
+export const delete8 = {
+ post: post41,
+}
+
+export const get29 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderApiGet',
+ path: '/workspaces/current/tool-provider/api/get',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolProviderApiGetResponse)
+
+export const get30 = {
+ get: get29,
+}
+
+export const get31 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderApiRemote',
+ path: '/workspaces/current/tool-provider/api/remote',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolProviderApiRemoteResponse)
+
+export const remote = {
+ get: get31,
+}
+
+export const post42 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderApiSchema',
+ path: '/workspaces/current/tool-provider/api/schema',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiSchemaBody }))
+ .output(zPostWorkspacesCurrentToolProviderApiSchemaResponse)
+
+export const schema = {
+ post: post42,
+}
+
+export const post43 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderApiTestPre',
+ path: '/workspaces/current/tool-provider/api/test/pre',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiTestPreBody }))
+ .output(zPostWorkspacesCurrentToolProviderApiTestPreResponse)
+
+export const pre = {
+ post: post43,
+}
+
+export const test = {
+ pre,
+}
+
+export const get32 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderApiTools',
+ path: '/workspaces/current/tool-provider/api/tools',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolProviderApiToolsResponse)
+
+export const tools = {
+ get: get32,
+}
+
+export const post44 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderApiUpdate',
+ path: '/workspaces/current/tool-provider/api/update',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderApiUpdateBody }))
+ .output(zPostWorkspacesCurrentToolProviderApiUpdateResponse)
+
+export const update2 = {
+ post: post44,
+}
+
+export const api = {
+ add,
+ delete: delete8,
+ get: get30,
+ remote,
+ schema,
+ test,
+ tools,
+ update: update2,
+}
+
+export const post45 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderAdd',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/add',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentToolProviderBuiltinByProviderAddBody,
+ params: zPostWorkspacesCurrentToolProviderBuiltinByProviderAddPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderAddResponse)
+
+export const add2 = {
+ post: post45,
+}
+
+export const get33 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfo',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/credential/info',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoPath }))
+ .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse)
+
+export const info = {
+ get: get33,
+}
+
+export const get34 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId:
+ 'getWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialType',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/credential/schema/{credential_type}',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params:
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypePath,
+ }),
+ )
+ .output(
+ zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponse,
+ )
+
+export const byCredentialType = {
+ get: get34,
+}
+
+export const schema2 = {
+ byCredentialType,
+}
+
+export const credential = {
+ info,
+ schema: schema2,
+}
+
+export const get35 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderCredentials',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/credentials',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsPath }))
+ .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse)
+
+export const credentials3 = {
+ get: get35,
+}
+
+export const post46 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredential',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/default-credential',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialBody,
+ params: zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponse)
+
+export const defaultCredential = {
+ post: post46,
+}
+
+export const post47 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderDelete',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/delete',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteBody,
+ params: zPostWorkspacesCurrentToolProviderBuiltinByProviderDeletePath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponse)
+
+export const delete9 = {
+ post: post47,
+}
+
+export const get36 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderIcon',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/icon',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderIconPath }))
+ .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse)
+
+export const icon2 = {
+ get: get36,
+}
+
+export const get37 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderInfo',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/info',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoPath }))
+ .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse)
+
+export const info2 = {
+ get: get37,
+}
+
+export const get38 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchema',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/oauth/client-schema',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaPath }),
+ )
+ .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse)
+
+export const clientSchema = {
+ get: get38,
+}
+
+export const delete10 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClient',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
+ }),
+ )
+ .output(zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse)
+
+export const get39 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClient',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client',
+ tags: ['console'],
+ })
+ .input(
+ z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath }),
+ )
+ .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse)
+
+export const post48 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClient',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientBody,
+ params: zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse)
+
+export const customClient = {
+ delete: delete10,
+ get: get39,
+ post: post48,
+}
+
+export const oauth = {
+ clientSchema,
+ customClient,
+}
+
+export const get40 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderBuiltinByProviderTools',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/tools',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsPath }))
+ .output(zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse)
+
+export const tools2 = {
+ get: get40,
+}
+
+export const post49 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderBuiltinByProviderUpdate',
+ path: '/workspaces/current/tool-provider/builtin/{provider}/update',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateBody,
+ params: zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdatePath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponse)
+
+export const update3 = {
+ post: post49,
+}
+
+export const byProvider2 = {
+ add: add2,
+ credential,
+ credentials: credentials3,
+ defaultCredential,
+ delete: delete9,
+ icon: icon2,
+ info: info2,
+ oauth,
+ tools: tools2,
+ update: update3,
+}
+
+export const builtin = {
+ byProvider: byProvider2,
+}
+
+export const post50 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderMcpAuth',
+ path: '/workspaces/current/tool-provider/mcp/auth',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderMcpAuthBody }))
+ .output(zPostWorkspacesCurrentToolProviderMcpAuthResponse)
+
+export const auth = {
+ post: post50,
+}
+
+export const get41 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderMcpToolsByProviderId',
+ path: '/workspaces/current/tool-provider/mcp/tools/{provider_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdPath }))
+ .output(zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse)
+
+export const byProviderId = {
+ get: get41,
+}
+
+export const tools3 = {
+ byProviderId,
+}
+
+export const get42 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderMcpUpdateByProviderId',
+ path: '/workspaces/current/tool-provider/mcp/update/{provider_id}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdPath }))
+ .output(zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse)
+
+export const byProviderId2 = {
+ get: get42,
+}
+
+export const update4 = {
+ byProviderId: byProviderId2,
+}
+
+export const delete11 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteWorkspacesCurrentToolProviderMcp',
+ path: '/workspaces/current/tool-provider/mcp',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zDeleteWorkspacesCurrentToolProviderMcpBody }))
+ .output(zDeleteWorkspacesCurrentToolProviderMcpResponse)
+
+export const post51 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderMcp',
+ path: '/workspaces/current/tool-provider/mcp',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderMcpBody }))
+ .output(zPostWorkspacesCurrentToolProviderMcpResponse)
+
+export const put4 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putWorkspacesCurrentToolProviderMcp',
+ path: '/workspaces/current/tool-provider/mcp',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPutWorkspacesCurrentToolProviderMcpBody }))
+ .output(zPutWorkspacesCurrentToolProviderMcpResponse)
+
+export const mcp = {
+ delete: delete11,
+ post: post51,
+ put: put4,
+ auth,
+ tools: tools3,
+ update: update4,
+}
+
+export const post52 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderWorkflowCreate',
+ path: '/workspaces/current/tool-provider/workflow/create',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderWorkflowCreateBody }))
+ .output(zPostWorkspacesCurrentToolProviderWorkflowCreateResponse)
+
+export const create2 = {
+ post: post52,
+}
+
+export const post53 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderWorkflowDelete',
+ path: '/workspaces/current/tool-provider/workflow/delete',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderWorkflowDeleteBody }))
+ .output(zPostWorkspacesCurrentToolProviderWorkflowDeleteResponse)
+
+export const delete12 = {
+ post: post53,
+}
+
+export const get43 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderWorkflowGet',
+ path: '/workspaces/current/tool-provider/workflow/get',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolProviderWorkflowGetResponse)
+
+export const get44 = {
+ get: get43,
+}
+
+export const get45 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviderWorkflowTools',
+ path: '/workspaces/current/tool-provider/workflow/tools',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolProviderWorkflowToolsResponse)
+
+export const tools4 = {
+ get: get45,
+}
+
+export const post54 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentToolProviderWorkflowUpdate',
+ path: '/workspaces/current/tool-provider/workflow/update',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCurrentToolProviderWorkflowUpdateBody }))
+ .output(zPostWorkspacesCurrentToolProviderWorkflowUpdateResponse)
+
+export const update5 = {
+ post: post54,
+}
+
+export const workflow = {
+ create: create2,
+ delete: delete12,
+ get: get44,
+ tools: tools4,
+ update: update5,
+}
+
+export const toolProvider = {
+ api,
+ builtin,
+ mcp,
+ workflow,
+}
+
+export const get46 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolProviders',
+ path: '/workspaces/current/tool-providers',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolProvidersResponse)
+
+export const toolProviders = {
+ get: get46,
+}
+
+export const get47 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolsApi',
+ path: '/workspaces/current/tools/api',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolsApiResponse)
+
+export const api2 = {
+ get: get47,
+}
+
+export const get48 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolsBuiltin',
+ path: '/workspaces/current/tools/builtin',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolsBuiltinResponse)
+
+export const builtin2 = {
+ get: get48,
+}
+
+export const get49 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolsMcp',
+ path: '/workspaces/current/tools/mcp',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolsMcpResponse)
+
+export const mcp2 = {
+ get: get49,
+}
+
+export const get50 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentToolsWorkflow',
+ path: '/workspaces/current/tools/workflow',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentToolsWorkflowResponse)
+
+export const workflow2 = {
+ get: get50,
+}
+
+export const tools5 = {
+ api: api2,
+ builtin: builtin2,
+ mcp: mcp2,
+ workflow: workflow2,
+}
+
+export const get51 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentTriggerProviderByProviderIcon',
+ path: '/workspaces/current/trigger-provider/{provider}/icon',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentTriggerProviderByProviderIconPath }))
+ .output(zGetWorkspacesCurrentTriggerProviderByProviderIconResponse)
+
+export const icon3 = {
+ get: get51,
+}
+
+/**
+ * Get info for a trigger provider
+ */
+export const get52 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentTriggerProviderByProviderInfo',
+ path: '/workspaces/current/trigger-provider/{provider}/info',
+ summary: 'Get info for a trigger provider',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentTriggerProviderByProviderInfoPath }))
+ .output(zGetWorkspacesCurrentTriggerProviderByProviderInfoResponse)
+
+export const info3 = {
+ get: get52,
+}
+
+/**
+ * Remove custom OAuth client configuration
+ */
+export const delete13 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteWorkspacesCurrentTriggerProviderByProviderOauthClient',
+ path: '/workspaces/current/trigger-provider/{provider}/oauth/client',
+ summary: 'Remove custom OAuth client configuration',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientPath }))
+ .output(zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponse)
+
+/**
+ * Get OAuth client configuration for a provider
+ */
+export const get53 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentTriggerProviderByProviderOauthClient',
+ path: '/workspaces/current/trigger-provider/{provider}/oauth/client',
+ summary: 'Get OAuth client configuration for a provider',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentTriggerProviderByProviderOauthClientPath }))
+ .output(zGetWorkspacesCurrentTriggerProviderByProviderOauthClientResponse)
+
+/**
+ * Configure custom OAuth client for a provider
+ */
+export const post55 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentTriggerProviderByProviderOauthClient',
+ path: '/workspaces/current/trigger-provider/{provider}/oauth/client',
+ summary: 'Configure custom OAuth client for a provider',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentTriggerProviderByProviderOauthClientBody,
+ params: zPostWorkspacesCurrentTriggerProviderByProviderOauthClientPath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentTriggerProviderByProviderOauthClientResponse)
+
+export const client = {
+ delete: delete13,
+ get: get53,
+ post: post55,
+}
+
+export const oauth2 = {
+ client,
+}
+
+/**
+ * Build a subscription instance for a trigger provider
+ */
+export const post56 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId:
+ 'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderId',
+ path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/build/{subscription_builder_id}',
+ summary: 'Build a subscription instance for a trigger provider',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdBody,
+ params:
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdPath,
+ }),
+ )
+ .output(
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponse,
+ )
+
+export const bySubscriptionBuilderId = {
+ post: post56,
+}
+
+export const build = {
+ bySubscriptionBuilderId,
+}
+
+/**
+ * Add a new subscription instance for a trigger provider
+ */
+export const post57 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreate',
+ path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/create',
+ summary: 'Add a new subscription instance for a trigger provider',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateBody,
+ params: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreatePath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponse)
+
+export const create3 = {
+ post: post57,
+}
+
+/**
+ * Get the request logs for a subscription instance for a trigger provider
+ */
+export const get54 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId:
+ 'getWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderId',
+ path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/logs/{subscription_builder_id}',
+ summary: 'Get the request logs for a subscription instance for a trigger provider',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params:
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdPath,
+ }),
+ )
+ .output(
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponse,
+ )
+
+export const bySubscriptionBuilderId2 = {
+ get: get54,
+}
+
+export const logs = {
+ bySubscriptionBuilderId: bySubscriptionBuilderId2,
+}
+
+/**
+ * Update a subscription instance for a trigger provider
+ */
+export const post58 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId:
+ 'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderId',
+ path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/update/{subscription_builder_id}',
+ summary: 'Update a subscription instance for a trigger provider',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdBody,
+ params:
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdPath,
+ }),
+ )
+ .output(
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponse,
+ )
+
+export const bySubscriptionBuilderId3 = {
+ post: post58,
+}
+
+export const update6 = {
+ bySubscriptionBuilderId: bySubscriptionBuilderId3,
+}
+
+/**
+ * Verify and update a subscription instance for a trigger provider
+ */
+export const post59 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId:
+ 'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderId',
+ path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/verify-and-update/{subscription_builder_id}',
+ summary: 'Verify and update a subscription instance for a trigger provider',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdBody,
+ params:
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdPath,
+ }),
+ )
+ .output(
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponse,
+ )
+
+export const bySubscriptionBuilderId4 = {
+ post: post59,
+}
+
+export const verifyAndUpdate = {
+ bySubscriptionBuilderId: bySubscriptionBuilderId4,
+}
+
+/**
+ * Get a subscription instance for a trigger provider
+ */
+export const get55 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId:
+ 'getWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderId',
+ path: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/{subscription_builder_id}',
+ summary: 'Get a subscription instance for a trigger provider',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params:
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdPath,
+ }),
+ )
+ .output(
+ zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponse,
+ )
+
+export const bySubscriptionBuilderId5 = {
+ get: get55,
+}
+
+export const builder = {
+ build,
+ create: create3,
+ logs,
+ update: update6,
+ verifyAndUpdate,
+ bySubscriptionBuilderId: bySubscriptionBuilderId5,
+}
+
+/**
+ * List all trigger subscriptions for the current tenant's provider
+ */
+export const get56 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentTriggerProviderByProviderSubscriptionsList',
+ path: '/workspaces/current/trigger-provider/{provider}/subscriptions/list',
+ summary: 'List all trigger subscriptions for the current tenant\'s provider',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListPath }))
+ .output(zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse)
+
+export const list3 = {
+ get: get56,
+}
+
+/**
+ * Initiate OAuth authorization flow for a trigger provider
+ */
+export const get57 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorize',
+ path: '/workspaces/current/trigger-provider/{provider}/subscriptions/oauth/authorize',
+ summary: 'Initiate OAuth authorization flow for a trigger provider',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizePath,
+ }),
+ )
+ .output(zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse)
+
+export const authorize = {
+ get: get57,
+}
+
+export const oauth3 = {
+ authorize,
+}
+
+/**
+ * Verify credentials for an existing subscription (edit mode only)
+ */
+export const post60 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId:
+ 'postWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionId',
+ path: '/workspaces/current/trigger-provider/{provider}/subscriptions/verify/{subscription_id}',
+ summary: 'Verify credentials for an existing subscription (edit mode only)',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdBody,
+ params:
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdPath,
+ }),
+ )
+ .output(
+ zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponse,
+ )
+
+export const bySubscriptionId = {
+ post: post60,
+}
+
+export const verify = {
+ bySubscriptionId,
+}
+
+export const subscriptions = {
+ builder,
+ list: list3,
+ oauth: oauth3,
+ verify,
+}
+
+export const byProvider3 = {
+ icon: icon3,
+ info: info3,
+ oauth: oauth2,
+ subscriptions,
+}
+
+/**
+ * Delete a subscription instance
+ */
+export const post61 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDelete',
+ path: '/workspaces/current/trigger-provider/{subscription_id}/subscriptions/delete',
+ summary: 'Delete a subscription instance',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ params: zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeletePath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponse)
+
+export const delete14 = {
+ post: post61,
+}
+
+/**
+ * Update a subscription instance
+ */
+export const post62 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdate',
+ path: '/workspaces/current/trigger-provider/{subscription_id}/subscriptions/update',
+ summary: 'Update a subscription instance',
+ tags: ['console'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateBody,
+ params: zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdatePath,
+ }),
+ )
+ .output(zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponse)
+
+export const update7 = {
+ post: post62,
+}
+
+export const subscriptions2 = {
+ delete: delete14,
+ update: update7,
+}
+
+export const bySubscriptionId2 = {
+ subscriptions: subscriptions2,
+}
+
+export const triggerProvider = {
+ byProvider: byProvider3,
+ bySubscriptionId: bySubscriptionId2,
+}
+
+/**
+ * List all trigger providers for the current tenant
+ */
+export const get58 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentTriggers',
+ path: '/workspaces/current/triggers',
+ summary: 'List all trigger providers for the current tenant',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesCurrentTriggersResponse)
+
+export const triggers = {
+ get: get58,
+}
+
+export const post63 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCurrent',
+ path: '/workspaces/current',
+ tags: ['console'],
+ })
+ .output(zPostWorkspacesCurrentResponse)
+
+export const current = {
+ post: post63,
+ agentProvider,
+ agentProviders,
+ datasetOperators,
+ defaultModel,
+ endpoints,
+ members,
+ modelProviders,
+ models: models2,
+ permission,
+ plugin: plugin2,
+ toolLabels,
+ toolProvider,
+ toolProviders,
+ tools: tools5,
+ triggerProvider,
+ triggers,
+}
+
+export const post64 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCustomConfigWebappLogoUpload',
+ path: '/workspaces/custom-config/webapp-logo/upload',
+ tags: ['console'],
+ })
+ .output(zPostWorkspacesCustomConfigWebappLogoUploadResponse)
+
+export const upload2 = {
+ post: post64,
+}
+
+export const webappLogo = {
+ upload: upload2,
+}
+
+export const post65 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesCustomConfig',
+ path: '/workspaces/custom-config',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesCustomConfigBody }))
+ .output(zPostWorkspacesCustomConfigResponse)
+
+export const customConfig = {
+ post: post65,
+ webappLogo,
+}
+
+export const post66 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesInfo',
+ path: '/workspaces/info',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesInfoBody }))
+ .output(zPostWorkspacesInfoResponse)
+
+export const info4 = {
+ post: post66,
+}
+
+export const post67 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkspacesSwitch',
+ path: '/workspaces/switch',
+ tags: ['console'],
+ })
+ .input(z.object({ body: zPostWorkspacesSwitchBody }))
+ .output(zPostWorkspacesSwitchResponse)
+
+export const switch3 = {
+ post: post67,
+}
+
+export const get59 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLang',
+ path: '/workspaces/{tenant_id}/model-providers/{provider}/{icon_type}/{lang}',
+ tags: ['console'],
+ })
+ .input(z.object({ params: zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangPath }))
+ .output(zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse)
+
+export const byLang = {
+ get: get59,
+}
+
+export const byIconType = {
+ byLang,
+}
+
+export const byProvider4 = {
+ byIconType,
+}
+
+export const modelProviders2 = {
+ byProvider: byProvider4,
+}
+
+export const byTenantId = {
+ modelProviders: modelProviders2,
+}
+
+export const get60 = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspaces',
+ path: '/workspaces',
+ tags: ['console'],
+ })
+ .output(zGetWorkspacesResponse)
+
+export const workspaces = {
+ get: get60,
+ current,
+ customConfig,
+ info: info4,
+ switch: switch3,
+ byTenantId,
+}
+
+export const contract = {
+ workspaces,
+}
diff --git a/packages/contracts/generated/api/console/workspaces/types.gen.ts b/packages/contracts/generated/api/console/workspaces/types.gen.ts
new file mode 100644
index 00000000000..a90db98f22f
--- /dev/null
+++ b/packages/contracts/generated/api/console/workspaces/types.gen.ts
@@ -0,0 +1,3023 @@
+// 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 AccountWithRoleList = {
+ accounts: Array<AccountWithRole>
+}
+
+export type ParserPostDefault = {
+ model_settings: Array<Inner>
+}
+
+export type EndpointCreatePayload = {
+ name: string
+ plugin_unique_identifier: string
+ settings: {
+ [key: string]: unknown
+ }
+}
+
+export type EndpointCreateResponse = {
+ success: boolean
+}
+
+export type EndpointIdPayload = {
+ endpoint_id: string
+}
+
+export type EndpointDeleteResponse = {
+ success: boolean
+}
+
+export type EndpointDisableResponse = {
+ success: boolean
+}
+
+export type EndpointEnableResponse = {
+ success: boolean
+}
+
+export type EndpointListResponse = {
+ endpoints: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type PluginEndpointListResponse = {
+ endpoints: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type LegacyEndpointUpdatePayload = {
+ endpoint_id: string
+ name: string
+ settings: {
+ [key: string]: unknown
+ }
+}
+
+export type EndpointUpdateResponse = {
+ success: boolean
+}
+
+export type EndpointUpdatePayload = {
+ name: string
+ settings: {
+ [key: string]: unknown
+ }
+}
+
+export type MemberInvitePayload = {
+ emails?: Array<string>
+ language?: string | null
+ role: TenantAccountRole
+}
+
+export type OwnerTransferCheckPayload = {
+ code: string
+ token: string
+}
+
+export type OwnerTransferEmailPayload = {
+ language?: string | null
+}
+
+export type OwnerTransferPayload = {
+ token: string
+}
+
+export type MemberRoleUpdatePayload = {
+ role: string
+}
+
+export type ParserCredentialDelete = {
+ credential_id: string
+}
+
+export type ParserCredentialCreate = {
+ credentials: {
+ [key: string]: unknown
+ }
+ name?: string | null
+}
+
+export type ParserCredentialUpdate = {
+ credential_id: string
+ credentials: {
+ [key: string]: unknown
+ }
+ name?: string | null
+}
+
+export type ParserCredentialSwitch = {
+ credential_id: string
+}
+
+export type ParserCredentialValidate = {
+ credentials: {
+ [key: string]: unknown
+ }
+}
+
+export type ParserDeleteModels = {
+ model: string
+ model_type: ModelType
+}
+
+export type ParserPostModels = {
+ config_from?: string | null
+ credential_id?: string | null
+ load_balancing?: LoadBalancingPayload
+ model: string
+ model_type: ModelType
+}
+
+export type ParserDeleteCredential = {
+ credential_id: string
+ model: string
+ model_type: ModelType
+}
+
+export type ParserCreateCredential = {
+ credentials: {
+ [key: string]: unknown
+ }
+ model: string
+ model_type: ModelType
+ name?: string | null
+}
+
+export type ParserUpdateCredential = {
+ credential_id: string
+ credentials: {
+ [key: string]: unknown
+ }
+ model: string
+ model_type: ModelType
+ name?: string | null
+}
+
+export type ParserSwitch = {
+ credential_id: string
+ model: string
+ model_type: ModelType
+}
+
+export type ParserValidate = {
+ credentials: {
+ [key: string]: unknown
+ }
+ model: string
+ model_type: ModelType
+}
+
+export type LoadBalancingCredentialPayload = {
+ credentials: {
+ [key: string]: unknown
+ }
+ model: string
+ model_type: ModelType
+}
+
+export type ParserPreferredProviderType = {
+ preferred_provider_type: 'system' | 'custom'
+}
+
+export type ParserGithubInstall = {
+ package: string
+ plugin_unique_identifier: string
+ repo: string
+ version: string
+}
+
+export type ParserPluginIdentifiers = {
+ plugin_unique_identifiers: Array<string>
+}
+
+export type ParserLatest = {
+ plugin_ids: Array<string>
+}
+
+export type ParserDynamicOptionsWithCredentials = {
+ action: string
+ credential_id: string
+ credentials: {
+ [key: string]: unknown
+ }
+ parameter: string
+ plugin_id: string
+ provider: string
+}
+
+export type ParserPermissionChange = {
+ debug_permission: DebugPermission
+ install_permission: InstallPermission
+}
+
+export type ParserExcludePlugin = {
+ plugin_id: string
+}
+
+export type ParserPreferencesChange = {
+ auto_upgrade: PluginAutoUpgradeSettingsPayload
+ permission: PluginPermissionSettingsPayload
+}
+
+export type ParserUninstall = {
+ plugin_installation_id: string
+}
+
+export type ParserGithubUpgrade = {
+ new_plugin_unique_identifier: string
+ original_plugin_unique_identifier: string
+ package: string
+ repo: string
+ version: string
+}
+
+export type ParserMarketplaceUpgrade = {
+ new_plugin_unique_identifier: string
+ original_plugin_unique_identifier: string
+}
+
+export type ParserGithubUpload = {
+ package: string
+ repo: string
+ version: string
+}
+
+export type ApiToolProviderAddPayload = {
+ credentials: {
+ [key: string]: unknown
+ }
+ custom_disclaimer?: string
+ icon: {
+ [key: string]: unknown
+ }
+ labels?: Array<string> | null
+ privacy_policy?: string | null
+ provider: string
+ schema: string
+ schema_type: ApiProviderSchemaType
+}
+
+export type ApiToolProviderDeletePayload = {
+ provider: string
+}
+
+export type ApiToolSchemaPayload = {
+ schema: string
+}
+
+export type ApiToolTestPayload = {
+ credentials: {
+ [key: string]: unknown
+ }
+ parameters: {
+ [key: string]: unknown
+ }
+ provider_name?: string | null
+ schema: string
+ schema_type: ApiProviderSchemaType
+ tool_name: string
+}
+
+export type ApiToolProviderUpdatePayload = {
+ credentials: {
+ [key: string]: unknown
+ }
+ custom_disclaimer?: string
+ icon: {
+ [key: string]: unknown
+ }
+ labels?: Array<string> | null
+ original_provider: string
+ privacy_policy?: string | null
+ provider: string
+ schema: string
+ schema_type: ApiProviderSchemaType
+}
+
+export type BuiltinToolAddPayload = {
+ credentials: {
+ [key: string]: unknown
+ }
+ name?: string | null
+ type: CredentialType
+}
+
+export type BuiltinProviderDefaultCredentialPayload = {
+ id: string
+}
+
+export type BuiltinToolCredentialDeletePayload = {
+ credential_id: string
+}
+
+export type ToolOAuthCustomClientPayload = {
+ client_params?: {
+ [key: string]: unknown
+ } | null
+ enable_oauth_custom_client?: boolean | null
+}
+
+export type BuiltinToolUpdatePayload = {
+ credential_id: string
+ credentials?: {
+ [key: string]: unknown
+ } | null
+ name?: string | null
+}
+
+export type McpProviderDeletePayload = {
+ provider_id: string
+}
+
+export type McpProviderCreatePayload = {
+ authentication?: {
+ [key: string]: unknown
+ } | null
+ configuration?: {
+ [key: string]: unknown
+ } | null
+ headers?: {
+ [key: string]: unknown
+ } | null
+ icon: string
+ icon_background?: string
+ icon_type: string
+ name: string
+ server_identifier: string
+ server_url: string
+}
+
+export type McpProviderUpdatePayload = {
+ authentication?: {
+ [key: string]: unknown
+ } | null
+ configuration?: {
+ [key: string]: unknown
+ } | null
+ headers?: {
+ [key: string]: unknown
+ } | null
+ icon: string
+ icon_background?: string
+ icon_type: string
+ name: string
+ provider_id: string
+ server_identifier: string
+ server_url: string
+}
+
+export type McpAuthPayload = {
+ authorization_code?: string | null
+ provider_id: string
+}
+
+export type WorkflowToolCreatePayload = {
+ description: string
+ icon: {
+ [key: string]: unknown
+ }
+ label: string
+ labels?: Array<string> | null
+ name: string
+ parameters?: Array<WorkflowToolParameterConfiguration>
+ privacy_policy?: string | null
+ workflow_app_id: string
+}
+
+export type WorkflowToolDeletePayload = {
+ workflow_tool_id: string
+}
+
+export type WorkflowToolUpdatePayload = {
+ description: string
+ icon: {
+ [key: string]: unknown
+ }
+ label: string
+ labels?: Array<string> | null
+ name: string
+ parameters?: Array<WorkflowToolParameterConfiguration>
+ privacy_policy?: string | null
+ workflow_tool_id: string
+}
+
+export type TriggerOAuthClientPayload = {
+ client_params?: {
+ [key: string]: unknown
+ } | null
+ enabled?: boolean | null
+}
+
+export type TriggerSubscriptionBuilderUpdatePayload = {
+ credentials?: {
+ [key: string]: unknown
+ } | null
+ name?: string | null
+ parameters?: {
+ [key: string]: unknown
+ } | null
+ properties?: {
+ [key: string]: unknown
+ } | null
+}
+
+export type TriggerSubscriptionBuilderCreatePayload = {
+ credential_type?: string
+}
+
+export type TriggerSubscriptionBuilderVerifyPayload = {
+ credentials: {
+ [key: string]: unknown
+ }
+}
+
+export type WorkspaceCustomConfigPayload = {
+ remove_webapp_brand?: boolean | null
+ replace_webapp_logo?: string | null
+}
+
+export type WorkspaceInfoPayload = {
+ name: string
+}
+
+export type SwitchWorkspacePayload = {
+ tenant_id: string
+}
+
+export type AccountWithRole = {
+ avatar?: string | null
+ created_at?: number | null
+ email: string
+ id: string
+ last_active_at?: number | null
+ last_login_at?: number | null
+ name: string
+ role: string
+ status: string
+}
+
+export type Inner = {
+ model?: string | null
+ model_type: ModelType
+ provider?: string | null
+}
+
+export type TenantAccountRole = 'owner' | 'admin' | 'editor' | 'normal' | 'dataset_operator'
+
+export type ModelType = 'llm' | 'text-embedding' | 'rerank' | 'speech2text' | 'moderation' | 'tts'
+
+export type LoadBalancingPayload = {
+ configs?: Array<{
+ [key: string]: unknown
+ }> | null
+ enabled?: boolean | null
+}
+
+export type DebugPermission = 'everyone' | 'admins' | 'noone'
+
+export type InstallPermission = 'everyone' | 'admins' | 'noone'
+
+export type PluginAutoUpgradeSettingsPayload = {
+ exclude_plugins?: Array<string>
+ include_plugins?: Array<string>
+ strategy_setting?: StrategySetting
+ upgrade_mode?: UpgradeMode
+ upgrade_time_of_day?: number
+}
+
+export type PluginPermissionSettingsPayload = {
+ debug_permission?: DebugPermission
+ install_permission?: InstallPermission
+}
+
+export type ApiProviderSchemaType = 'openapi' | 'swagger' | 'openai_plugin' | 'openai_actions'
+
+export type CredentialType = 'api-key' | 'oauth2' | 'unauthorized'
+
+export type WorkflowToolParameterConfiguration = {
+ description: string
+ form: ToolParameterForm
+ name: string
+}
+
+export type StrategySetting = 'disabled' | 'fix_only' | 'latest'
+
+export type UpgradeMode = 'all' | 'partial' | 'exclude'
+
+export type ToolParameterForm = 'schema' | 'form' | 'llm'
+
+export type GetWorkspacesData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces'
+}
+
+export type GetWorkspacesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesResponse = GetWorkspacesResponses[keyof GetWorkspacesResponses]
+
+export type PostWorkspacesCurrentData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current'
+}
+
+export type PostWorkspacesCurrentResponses = {
+ 200: TenantInfoResponse
+}
+
+export type PostWorkspacesCurrentResponse
+ = PostWorkspacesCurrentResponses[keyof PostWorkspacesCurrentResponses]
+
+export type GetWorkspacesCurrentAgentProviderByProviderNameData = {
+ body?: never
+ path: {
+ provider_name: string
+ }
+ query?: never
+ url: '/workspaces/current/agent-provider/{provider_name}'
+}
+
+export type GetWorkspacesCurrentAgentProviderByProviderNameResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentAgentProviderByProviderNameResponse
+ = GetWorkspacesCurrentAgentProviderByProviderNameResponses[keyof GetWorkspacesCurrentAgentProviderByProviderNameResponses]
+
+export type GetWorkspacesCurrentAgentProvidersData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/agent-providers'
+}
+
+export type GetWorkspacesCurrentAgentProvidersResponses = {
+ 200: Array<{
+ [key: string]: unknown
+ }>
+}
+
+export type GetWorkspacesCurrentAgentProvidersResponse
+ = GetWorkspacesCurrentAgentProvidersResponses[keyof GetWorkspacesCurrentAgentProvidersResponses]
+
+export type GetWorkspacesCurrentDatasetOperatorsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/dataset-operators'
+}
+
+export type GetWorkspacesCurrentDatasetOperatorsResponses = {
+ 200: AccountWithRoleList
+}
+
+export type GetWorkspacesCurrentDatasetOperatorsResponse
+ = GetWorkspacesCurrentDatasetOperatorsResponses[keyof GetWorkspacesCurrentDatasetOperatorsResponses]
+
+export type GetWorkspacesCurrentDefaultModelData = {
+ body?: never
+ path?: never
+ query: {
+ model_type: string
+ }
+ url: '/workspaces/current/default-model'
+}
+
+export type GetWorkspacesCurrentDefaultModelResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentDefaultModelResponse
+ = GetWorkspacesCurrentDefaultModelResponses[keyof GetWorkspacesCurrentDefaultModelResponses]
+
+export type PostWorkspacesCurrentDefaultModelData = {
+ body: ParserPostDefault
+ path?: never
+ query?: never
+ url: '/workspaces/current/default-model'
+}
+
+export type PostWorkspacesCurrentDefaultModelResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentDefaultModelResponse
+ = PostWorkspacesCurrentDefaultModelResponses[keyof PostWorkspacesCurrentDefaultModelResponses]
+
+export type PostWorkspacesCurrentEndpointsData = {
+ body: EndpointCreatePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/endpoints'
+}
+
+export type PostWorkspacesCurrentEndpointsErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentEndpointsError
+ = PostWorkspacesCurrentEndpointsErrors[keyof PostWorkspacesCurrentEndpointsErrors]
+
+export type PostWorkspacesCurrentEndpointsResponses = {
+ 200: EndpointCreateResponse
+}
+
+export type PostWorkspacesCurrentEndpointsResponse
+ = PostWorkspacesCurrentEndpointsResponses[keyof PostWorkspacesCurrentEndpointsResponses]
+
+export type PostWorkspacesCurrentEndpointsCreateData = {
+ body: EndpointCreatePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/endpoints/create'
+}
+
+export type PostWorkspacesCurrentEndpointsCreateErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentEndpointsCreateError
+ = PostWorkspacesCurrentEndpointsCreateErrors[keyof PostWorkspacesCurrentEndpointsCreateErrors]
+
+export type PostWorkspacesCurrentEndpointsCreateResponses = {
+ 200: EndpointCreateResponse
+}
+
+export type PostWorkspacesCurrentEndpointsCreateResponse
+ = PostWorkspacesCurrentEndpointsCreateResponses[keyof PostWorkspacesCurrentEndpointsCreateResponses]
+
+export type PostWorkspacesCurrentEndpointsDeleteData = {
+ body: EndpointIdPayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/endpoints/delete'
+}
+
+export type PostWorkspacesCurrentEndpointsDeleteErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentEndpointsDeleteError
+ = PostWorkspacesCurrentEndpointsDeleteErrors[keyof PostWorkspacesCurrentEndpointsDeleteErrors]
+
+export type PostWorkspacesCurrentEndpointsDeleteResponses = {
+ 200: EndpointDeleteResponse
+}
+
+export type PostWorkspacesCurrentEndpointsDeleteResponse
+ = PostWorkspacesCurrentEndpointsDeleteResponses[keyof PostWorkspacesCurrentEndpointsDeleteResponses]
+
+export type PostWorkspacesCurrentEndpointsDisableData = {
+ body: EndpointIdPayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/endpoints/disable'
+}
+
+export type PostWorkspacesCurrentEndpointsDisableErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentEndpointsDisableError
+ = PostWorkspacesCurrentEndpointsDisableErrors[keyof PostWorkspacesCurrentEndpointsDisableErrors]
+
+export type PostWorkspacesCurrentEndpointsDisableResponses = {
+ 200: EndpointDisableResponse
+}
+
+export type PostWorkspacesCurrentEndpointsDisableResponse
+ = PostWorkspacesCurrentEndpointsDisableResponses[keyof PostWorkspacesCurrentEndpointsDisableResponses]
+
+export type PostWorkspacesCurrentEndpointsEnableData = {
+ body: EndpointIdPayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/endpoints/enable'
+}
+
+export type PostWorkspacesCurrentEndpointsEnableErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentEndpointsEnableError
+ = PostWorkspacesCurrentEndpointsEnableErrors[keyof PostWorkspacesCurrentEndpointsEnableErrors]
+
+export type PostWorkspacesCurrentEndpointsEnableResponses = {
+ 200: EndpointEnableResponse
+}
+
+export type PostWorkspacesCurrentEndpointsEnableResponse
+ = PostWorkspacesCurrentEndpointsEnableResponses[keyof PostWorkspacesCurrentEndpointsEnableResponses]
+
+export type GetWorkspacesCurrentEndpointsListData = {
+ body?: never
+ path?: never
+ query: {
+ page: number
+ page_size: number
+ }
+ url: '/workspaces/current/endpoints/list'
+}
+
+export type GetWorkspacesCurrentEndpointsListResponses = {
+ 200: EndpointListResponse
+}
+
+export type GetWorkspacesCurrentEndpointsListResponse
+ = GetWorkspacesCurrentEndpointsListResponses[keyof GetWorkspacesCurrentEndpointsListResponses]
+
+export type GetWorkspacesCurrentEndpointsListPluginData = {
+ body?: never
+ path?: never
+ query: {
+ page: number
+ page_size: number
+ plugin_id: string
+ }
+ url: '/workspaces/current/endpoints/list/plugin'
+}
+
+export type GetWorkspacesCurrentEndpointsListPluginResponses = {
+ 200: PluginEndpointListResponse
+}
+
+export type GetWorkspacesCurrentEndpointsListPluginResponse
+ = GetWorkspacesCurrentEndpointsListPluginResponses[keyof GetWorkspacesCurrentEndpointsListPluginResponses]
+
+export type PostWorkspacesCurrentEndpointsUpdateData = {
+ body: LegacyEndpointUpdatePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/endpoints/update'
+}
+
+export type PostWorkspacesCurrentEndpointsUpdateErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentEndpointsUpdateError
+ = PostWorkspacesCurrentEndpointsUpdateErrors[keyof PostWorkspacesCurrentEndpointsUpdateErrors]
+
+export type PostWorkspacesCurrentEndpointsUpdateResponses = {
+ 200: EndpointUpdateResponse
+}
+
+export type PostWorkspacesCurrentEndpointsUpdateResponse
+ = PostWorkspacesCurrentEndpointsUpdateResponses[keyof PostWorkspacesCurrentEndpointsUpdateResponses]
+
+export type DeleteWorkspacesCurrentEndpointsByIdData = {
+ body?: never
+ path: {
+ id: string
+ }
+ query?: never
+ url: '/workspaces/current/endpoints/{id}'
+}
+
+export type DeleteWorkspacesCurrentEndpointsByIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteWorkspacesCurrentEndpointsByIdError
+ = DeleteWorkspacesCurrentEndpointsByIdErrors[keyof DeleteWorkspacesCurrentEndpointsByIdErrors]
+
+export type DeleteWorkspacesCurrentEndpointsByIdResponses = {
+ 200: EndpointDeleteResponse
+}
+
+export type DeleteWorkspacesCurrentEndpointsByIdResponse
+ = DeleteWorkspacesCurrentEndpointsByIdResponses[keyof DeleteWorkspacesCurrentEndpointsByIdResponses]
+
+export type PatchWorkspacesCurrentEndpointsByIdData = {
+ body: EndpointUpdatePayload
+ path: {
+ id: string
+ }
+ query?: never
+ url: '/workspaces/current/endpoints/{id}'
+}
+
+export type PatchWorkspacesCurrentEndpointsByIdErrors = {
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchWorkspacesCurrentEndpointsByIdError
+ = PatchWorkspacesCurrentEndpointsByIdErrors[keyof PatchWorkspacesCurrentEndpointsByIdErrors]
+
+export type PatchWorkspacesCurrentEndpointsByIdResponses = {
+ 200: EndpointUpdateResponse
+}
+
+export type PatchWorkspacesCurrentEndpointsByIdResponse
+ = PatchWorkspacesCurrentEndpointsByIdResponses[keyof PatchWorkspacesCurrentEndpointsByIdResponses]
+
+export type GetWorkspacesCurrentMembersData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/members'
+}
+
+export type GetWorkspacesCurrentMembersResponses = {
+ 200: AccountWithRoleList
+}
+
+export type GetWorkspacesCurrentMembersResponse
+ = GetWorkspacesCurrentMembersResponses[keyof GetWorkspacesCurrentMembersResponses]
+
+export type PostWorkspacesCurrentMembersInviteEmailData = {
+ body: MemberInvitePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/members/invite-email'
+}
+
+export type PostWorkspacesCurrentMembersInviteEmailResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentMembersInviteEmailResponse
+ = PostWorkspacesCurrentMembersInviteEmailResponses[keyof PostWorkspacesCurrentMembersInviteEmailResponses]
+
+export type PostWorkspacesCurrentMembersOwnerTransferCheckData = {
+ body: OwnerTransferCheckPayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/members/owner-transfer-check'
+}
+
+export type PostWorkspacesCurrentMembersOwnerTransferCheckResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentMembersOwnerTransferCheckResponse
+ = PostWorkspacesCurrentMembersOwnerTransferCheckResponses[keyof PostWorkspacesCurrentMembersOwnerTransferCheckResponses]
+
+export type PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailData = {
+ body: OwnerTransferEmailPayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/members/send-owner-transfer-confirm-email'
+}
+
+export type PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponse
+ = PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponses[keyof PostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponses]
+
+export type DeleteWorkspacesCurrentMembersByMemberIdData = {
+ body?: never
+ path: {
+ member_id: string
+ }
+ query?: never
+ url: '/workspaces/current/members/{member_id}'
+}
+
+export type DeleteWorkspacesCurrentMembersByMemberIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteWorkspacesCurrentMembersByMemberIdResponse
+ = DeleteWorkspacesCurrentMembersByMemberIdResponses[keyof DeleteWorkspacesCurrentMembersByMemberIdResponses]
+
+export type PostWorkspacesCurrentMembersByMemberIdOwnerTransferData = {
+ body: OwnerTransferPayload
+ path: {
+ member_id: string
+ }
+ query?: never
+ url: '/workspaces/current/members/{member_id}/owner-transfer'
+}
+
+export type PostWorkspacesCurrentMembersByMemberIdOwnerTransferResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentMembersByMemberIdOwnerTransferResponse
+ = PostWorkspacesCurrentMembersByMemberIdOwnerTransferResponses[keyof PostWorkspacesCurrentMembersByMemberIdOwnerTransferResponses]
+
+export type PutWorkspacesCurrentMembersByMemberIdUpdateRoleData = {
+ body: MemberRoleUpdatePayload
+ path: {
+ member_id: string
+ }
+ query?: never
+ url: '/workspaces/current/members/{member_id}/update-role'
+}
+
+export type PutWorkspacesCurrentMembersByMemberIdUpdateRoleResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PutWorkspacesCurrentMembersByMemberIdUpdateRoleResponse
+ = PutWorkspacesCurrentMembersByMemberIdUpdateRoleResponses[keyof PutWorkspacesCurrentMembersByMemberIdUpdateRoleResponses]
+
+export type GetWorkspacesCurrentModelProvidersData = {
+ body?: never
+ path?: never
+ query?: {
+ model_type?: string | null
+ }
+ url: '/workspaces/current/model-providers'
+}
+
+export type GetWorkspacesCurrentModelProvidersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentModelProvidersResponse
+ = GetWorkspacesCurrentModelProvidersResponses[keyof GetWorkspacesCurrentModelProvidersResponses]
+
+export type GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/checkout-url'
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponse
+ = GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponses[keyof GetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponses]
+
+export type DeleteWorkspacesCurrentModelProvidersByProviderCredentialsData = {
+ body: ParserCredentialDelete
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/credentials'
+}
+
+export type DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse
+ = DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponses[keyof DeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponses]
+
+export type GetWorkspacesCurrentModelProvidersByProviderCredentialsData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: {
+ credential_id?: string | null
+ }
+ url: '/workspaces/current/model-providers/{provider}/credentials'
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderCredentialsResponse
+ = GetWorkspacesCurrentModelProvidersByProviderCredentialsResponses[keyof GetWorkspacesCurrentModelProvidersByProviderCredentialsResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderCredentialsData = {
+ body: ParserCredentialCreate
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/credentials'
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderCredentialsResponse
+ = PostWorkspacesCurrentModelProvidersByProviderCredentialsResponses[keyof PostWorkspacesCurrentModelProvidersByProviderCredentialsResponses]
+
+export type PutWorkspacesCurrentModelProvidersByProviderCredentialsData = {
+ body: ParserCredentialUpdate
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/credentials'
+}
+
+export type PutWorkspacesCurrentModelProvidersByProviderCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PutWorkspacesCurrentModelProvidersByProviderCredentialsResponse
+ = PutWorkspacesCurrentModelProvidersByProviderCredentialsResponses[keyof PutWorkspacesCurrentModelProvidersByProviderCredentialsResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchData = {
+ body: ParserCredentialSwitch
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/credentials/switch'
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponse
+ = PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponses[keyof PostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateData = {
+ body: ParserCredentialValidate
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/credentials/validate'
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponse
+ = PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponses[keyof PostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponses]
+
+export type DeleteWorkspacesCurrentModelProvidersByProviderModelsData = {
+ body: ParserDeleteModels
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models'
+}
+
+export type DeleteWorkspacesCurrentModelProvidersByProviderModelsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteWorkspacesCurrentModelProvidersByProviderModelsResponse
+ = DeleteWorkspacesCurrentModelProvidersByProviderModelsResponses[keyof DeleteWorkspacesCurrentModelProvidersByProviderModelsResponses]
+
+export type GetWorkspacesCurrentModelProvidersByProviderModelsData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models'
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderModelsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderModelsResponse
+ = GetWorkspacesCurrentModelProvidersByProviderModelsResponses[keyof GetWorkspacesCurrentModelProvidersByProviderModelsResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsData = {
+ body: ParserPostModels
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models'
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsResponse
+ = PostWorkspacesCurrentModelProvidersByProviderModelsResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsResponses]
+
+export type DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsData = {
+ body: ParserDeleteCredential
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models/credentials'
+}
+
+export type DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse
+ = DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses[keyof DeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses]
+
+export type GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query: {
+ config_from?: string | null
+ credential_id?: string | null
+ model: string
+ model_type: string
+ }
+ url: '/workspaces/current/model-providers/{provider}/models/credentials'
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse
+ = GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses[keyof GetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsData = {
+ body: ParserCreateCredential
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models/credentials'
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse
+ = PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses]
+
+export type PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsData = {
+ body: ParserUpdateCredential
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models/credentials'
+}
+
+export type PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse
+ = PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses[keyof PutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchData = {
+ body: ParserSwitch
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models/credentials/switch'
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponse
+ = PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateData = {
+ body: ParserValidate
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models/credentials/validate'
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponse
+ = PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponses]
+
+export type PatchWorkspacesCurrentModelProvidersByProviderModelsDisableData = {
+ body: ParserDeleteModels
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models/disable'
+}
+
+export type PatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse
+ = PatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponses[keyof PatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponses]
+
+export type PatchWorkspacesCurrentModelProvidersByProviderModelsEnableData = {
+ body: ParserDeleteModels
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models/enable'
+}
+
+export type PatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse
+ = PatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponses[keyof PatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateData
+ = {
+ body: LoadBalancingCredentialPayload
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models/load-balancing-configs/credentials-validate'
+ }
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponse
+ = PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateData
+ = {
+ body: LoadBalancingCredentialPayload
+ path: {
+ provider: string
+ config_id: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/models/load-balancing-configs/{config_id}/credentials-validate'
+ }
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponse
+ = PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponses[keyof PostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponses]
+
+export type GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query: {
+ model: string
+ }
+ url: '/workspaces/current/model-providers/{provider}/models/parameter-rules'
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponse
+ = GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponses[keyof GetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponses]
+
+export type PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeData = {
+ body: ParserPreferredProviderType
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/model-providers/{provider}/preferred-provider-type'
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponse
+ = PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponses[keyof PostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponses]
+
+export type GetWorkspacesCurrentModelsModelTypesByModelTypeData = {
+ body?: never
+ path: {
+ model_type: string
+ }
+ query?: never
+ url: '/workspaces/current/models/model-types/{model_type}'
+}
+
+export type GetWorkspacesCurrentModelsModelTypesByModelTypeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentModelsModelTypesByModelTypeResponse
+ = GetWorkspacesCurrentModelsModelTypesByModelTypeResponses[keyof GetWorkspacesCurrentModelsModelTypesByModelTypeResponses]
+
+export type GetWorkspacesCurrentPermissionData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/permission'
+}
+
+export type GetWorkspacesCurrentPermissionResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPermissionResponse
+ = GetWorkspacesCurrentPermissionResponses[keyof GetWorkspacesCurrentPermissionResponses]
+
+export type GetWorkspacesCurrentPluginAssetData = {
+ body?: never
+ path?: never
+ query: {
+ file_name: string
+ plugin_unique_identifier: string
+ }
+ url: '/workspaces/current/plugin/asset'
+}
+
+export type GetWorkspacesCurrentPluginAssetResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginAssetResponse
+ = GetWorkspacesCurrentPluginAssetResponses[keyof GetWorkspacesCurrentPluginAssetResponses]
+
+export type GetWorkspacesCurrentPluginDebuggingKeyData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/debugging-key'
+}
+
+export type GetWorkspacesCurrentPluginDebuggingKeyResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginDebuggingKeyResponse
+ = GetWorkspacesCurrentPluginDebuggingKeyResponses[keyof GetWorkspacesCurrentPluginDebuggingKeyResponses]
+
+export type GetWorkspacesCurrentPluginFetchManifestData = {
+ body?: never
+ path?: never
+ query: {
+ plugin_unique_identifier: string
+ }
+ url: '/workspaces/current/plugin/fetch-manifest'
+}
+
+export type GetWorkspacesCurrentPluginFetchManifestResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginFetchManifestResponse
+ = GetWorkspacesCurrentPluginFetchManifestResponses[keyof GetWorkspacesCurrentPluginFetchManifestResponses]
+
+export type GetWorkspacesCurrentPluginIconData = {
+ body?: never
+ path?: never
+ query: {
+ filename: string
+ tenant_id: string
+ }
+ url: '/workspaces/current/plugin/icon'
+}
+
+export type GetWorkspacesCurrentPluginIconResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginIconResponse
+ = GetWorkspacesCurrentPluginIconResponses[keyof GetWorkspacesCurrentPluginIconResponses]
+
+export type PostWorkspacesCurrentPluginInstallGithubData = {
+ body: ParserGithubInstall
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/install/github'
+}
+
+export type PostWorkspacesCurrentPluginInstallGithubResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginInstallGithubResponse
+ = PostWorkspacesCurrentPluginInstallGithubResponses[keyof PostWorkspacesCurrentPluginInstallGithubResponses]
+
+export type PostWorkspacesCurrentPluginInstallMarketplaceData = {
+ body: ParserPluginIdentifiers
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/install/marketplace'
+}
+
+export type PostWorkspacesCurrentPluginInstallMarketplaceResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginInstallMarketplaceResponse
+ = PostWorkspacesCurrentPluginInstallMarketplaceResponses[keyof PostWorkspacesCurrentPluginInstallMarketplaceResponses]
+
+export type PostWorkspacesCurrentPluginInstallPkgData = {
+ body: ParserPluginIdentifiers
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/install/pkg'
+}
+
+export type PostWorkspacesCurrentPluginInstallPkgResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginInstallPkgResponse
+ = PostWorkspacesCurrentPluginInstallPkgResponses[keyof PostWorkspacesCurrentPluginInstallPkgResponses]
+
+export type GetWorkspacesCurrentPluginListData = {
+ body?: never
+ path?: never
+ query?: {
+ page?: number
+ page_size?: number
+ }
+ url: '/workspaces/current/plugin/list'
+}
+
+export type GetWorkspacesCurrentPluginListResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginListResponse
+ = GetWorkspacesCurrentPluginListResponses[keyof GetWorkspacesCurrentPluginListResponses]
+
+export type PostWorkspacesCurrentPluginListInstallationsIdsData = {
+ body: ParserLatest
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/list/installations/ids'
+}
+
+export type PostWorkspacesCurrentPluginListInstallationsIdsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginListInstallationsIdsResponse
+ = PostWorkspacesCurrentPluginListInstallationsIdsResponses[keyof PostWorkspacesCurrentPluginListInstallationsIdsResponses]
+
+export type PostWorkspacesCurrentPluginListLatestVersionsData = {
+ body: ParserLatest
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/list/latest-versions'
+}
+
+export type PostWorkspacesCurrentPluginListLatestVersionsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginListLatestVersionsResponse
+ = PostWorkspacesCurrentPluginListLatestVersionsResponses[keyof PostWorkspacesCurrentPluginListLatestVersionsResponses]
+
+export type GetWorkspacesCurrentPluginMarketplacePkgData = {
+ body?: never
+ path?: never
+ query: {
+ plugin_unique_identifier: string
+ }
+ url: '/workspaces/current/plugin/marketplace/pkg'
+}
+
+export type GetWorkspacesCurrentPluginMarketplacePkgResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginMarketplacePkgResponse
+ = GetWorkspacesCurrentPluginMarketplacePkgResponses[keyof GetWorkspacesCurrentPluginMarketplacePkgResponses]
+
+export type GetWorkspacesCurrentPluginParametersDynamicOptionsData = {
+ body?: never
+ path?: never
+ query: {
+ action: string
+ credential_id?: string | null
+ parameter: string
+ plugin_id: string
+ provider: string
+ provider_type: 'tool' | 'trigger'
+ }
+ url: '/workspaces/current/plugin/parameters/dynamic-options'
+}
+
+export type GetWorkspacesCurrentPluginParametersDynamicOptionsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginParametersDynamicOptionsResponse
+ = GetWorkspacesCurrentPluginParametersDynamicOptionsResponses[keyof GetWorkspacesCurrentPluginParametersDynamicOptionsResponses]
+
+export type PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsData = {
+ body: ParserDynamicOptionsWithCredentials
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/parameters/dynamic-options-with-credentials'
+}
+
+export type PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponse
+ = PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponses[keyof PostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponses]
+
+export type PostWorkspacesCurrentPluginPermissionChangeData = {
+ body: ParserPermissionChange
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/permission/change'
+}
+
+export type PostWorkspacesCurrentPluginPermissionChangeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginPermissionChangeResponse
+ = PostWorkspacesCurrentPluginPermissionChangeResponses[keyof PostWorkspacesCurrentPluginPermissionChangeResponses]
+
+export type GetWorkspacesCurrentPluginPermissionFetchData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/permission/fetch'
+}
+
+export type GetWorkspacesCurrentPluginPermissionFetchResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginPermissionFetchResponse
+ = GetWorkspacesCurrentPluginPermissionFetchResponses[keyof GetWorkspacesCurrentPluginPermissionFetchResponses]
+
+export type PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeData = {
+ body: ParserExcludePlugin
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/preferences/autoupgrade/exclude'
+}
+
+export type PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponse
+ = PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponses[keyof PostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponses]
+
+export type PostWorkspacesCurrentPluginPreferencesChangeData = {
+ body: ParserPreferencesChange
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/preferences/change'
+}
+
+export type PostWorkspacesCurrentPluginPreferencesChangeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginPreferencesChangeResponse
+ = PostWorkspacesCurrentPluginPreferencesChangeResponses[keyof PostWorkspacesCurrentPluginPreferencesChangeResponses]
+
+export type GetWorkspacesCurrentPluginPreferencesFetchData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/preferences/fetch'
+}
+
+export type GetWorkspacesCurrentPluginPreferencesFetchResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginPreferencesFetchResponse
+ = GetWorkspacesCurrentPluginPreferencesFetchResponses[keyof GetWorkspacesCurrentPluginPreferencesFetchResponses]
+
+export type GetWorkspacesCurrentPluginReadmeData = {
+ body?: never
+ path?: never
+ query: {
+ language?: string
+ plugin_unique_identifier: string
+ }
+ url: '/workspaces/current/plugin/readme'
+}
+
+export type GetWorkspacesCurrentPluginReadmeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginReadmeResponse
+ = GetWorkspacesCurrentPluginReadmeResponses[keyof GetWorkspacesCurrentPluginReadmeResponses]
+
+export type GetWorkspacesCurrentPluginTasksData = {
+ body?: never
+ path?: never
+ query?: {
+ page?: number
+ page_size?: number
+ }
+ url: '/workspaces/current/plugin/tasks'
+}
+
+export type GetWorkspacesCurrentPluginTasksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginTasksResponse
+ = GetWorkspacesCurrentPluginTasksResponses[keyof GetWorkspacesCurrentPluginTasksResponses]
+
+export type PostWorkspacesCurrentPluginTasksDeleteAllData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/tasks/delete_all'
+}
+
+export type PostWorkspacesCurrentPluginTasksDeleteAllResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginTasksDeleteAllResponse
+ = PostWorkspacesCurrentPluginTasksDeleteAllResponses[keyof PostWorkspacesCurrentPluginTasksDeleteAllResponses]
+
+export type GetWorkspacesCurrentPluginTasksByTaskIdData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: never
+ url: '/workspaces/current/plugin/tasks/{task_id}'
+}
+
+export type GetWorkspacesCurrentPluginTasksByTaskIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentPluginTasksByTaskIdResponse
+ = GetWorkspacesCurrentPluginTasksByTaskIdResponses[keyof GetWorkspacesCurrentPluginTasksByTaskIdResponses]
+
+export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: never
+ url: '/workspaces/current/plugin/tasks/{task_id}/delete'
+}
+
+export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse
+ = PostWorkspacesCurrentPluginTasksByTaskIdDeleteResponses[keyof PostWorkspacesCurrentPluginTasksByTaskIdDeleteResponses]
+
+export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierData = {
+ body?: never
+ path: {
+ task_id: string
+ identifier: string
+ }
+ query?: never
+ url: '/workspaces/current/plugin/tasks/{task_id}/delete/{identifier}'
+}
+
+export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse
+ = PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponses[keyof PostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponses]
+
+export type PostWorkspacesCurrentPluginUninstallData = {
+ body: ParserUninstall
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/uninstall'
+}
+
+export type PostWorkspacesCurrentPluginUninstallResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginUninstallResponse
+ = PostWorkspacesCurrentPluginUninstallResponses[keyof PostWorkspacesCurrentPluginUninstallResponses]
+
+export type PostWorkspacesCurrentPluginUpgradeGithubData = {
+ body: ParserGithubUpgrade
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/upgrade/github'
+}
+
+export type PostWorkspacesCurrentPluginUpgradeGithubResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginUpgradeGithubResponse
+ = PostWorkspacesCurrentPluginUpgradeGithubResponses[keyof PostWorkspacesCurrentPluginUpgradeGithubResponses]
+
+export type PostWorkspacesCurrentPluginUpgradeMarketplaceData = {
+ body: ParserMarketplaceUpgrade
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/upgrade/marketplace'
+}
+
+export type PostWorkspacesCurrentPluginUpgradeMarketplaceResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginUpgradeMarketplaceResponse
+ = PostWorkspacesCurrentPluginUpgradeMarketplaceResponses[keyof PostWorkspacesCurrentPluginUpgradeMarketplaceResponses]
+
+export type PostWorkspacesCurrentPluginUploadBundleData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/upload/bundle'
+}
+
+export type PostWorkspacesCurrentPluginUploadBundleResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginUploadBundleResponse
+ = PostWorkspacesCurrentPluginUploadBundleResponses[keyof PostWorkspacesCurrentPluginUploadBundleResponses]
+
+export type PostWorkspacesCurrentPluginUploadGithubData = {
+ body: ParserGithubUpload
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/upload/github'
+}
+
+export type PostWorkspacesCurrentPluginUploadGithubResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginUploadGithubResponse
+ = PostWorkspacesCurrentPluginUploadGithubResponses[keyof PostWorkspacesCurrentPluginUploadGithubResponses]
+
+export type PostWorkspacesCurrentPluginUploadPkgData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/plugin/upload/pkg'
+}
+
+export type PostWorkspacesCurrentPluginUploadPkgResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentPluginUploadPkgResponse
+ = PostWorkspacesCurrentPluginUploadPkgResponses[keyof PostWorkspacesCurrentPluginUploadPkgResponses]
+
+export type GetWorkspacesCurrentToolLabelsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-labels'
+}
+
+export type GetWorkspacesCurrentToolLabelsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolLabelsResponse
+ = GetWorkspacesCurrentToolLabelsResponses[keyof GetWorkspacesCurrentToolLabelsResponses]
+
+export type PostWorkspacesCurrentToolProviderApiAddData = {
+ body: ApiToolProviderAddPayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/api/add'
+}
+
+export type PostWorkspacesCurrentToolProviderApiAddResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderApiAddResponse
+ = PostWorkspacesCurrentToolProviderApiAddResponses[keyof PostWorkspacesCurrentToolProviderApiAddResponses]
+
+export type PostWorkspacesCurrentToolProviderApiDeleteData = {
+ body: ApiToolProviderDeletePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/api/delete'
+}
+
+export type PostWorkspacesCurrentToolProviderApiDeleteResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderApiDeleteResponse
+ = PostWorkspacesCurrentToolProviderApiDeleteResponses[keyof PostWorkspacesCurrentToolProviderApiDeleteResponses]
+
+export type GetWorkspacesCurrentToolProviderApiGetData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/api/get'
+}
+
+export type GetWorkspacesCurrentToolProviderApiGetResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderApiGetResponse
+ = GetWorkspacesCurrentToolProviderApiGetResponses[keyof GetWorkspacesCurrentToolProviderApiGetResponses]
+
+export type GetWorkspacesCurrentToolProviderApiRemoteData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/api/remote'
+}
+
+export type GetWorkspacesCurrentToolProviderApiRemoteResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderApiRemoteResponse
+ = GetWorkspacesCurrentToolProviderApiRemoteResponses[keyof GetWorkspacesCurrentToolProviderApiRemoteResponses]
+
+export type PostWorkspacesCurrentToolProviderApiSchemaData = {
+ body: ApiToolSchemaPayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/api/schema'
+}
+
+export type PostWorkspacesCurrentToolProviderApiSchemaResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderApiSchemaResponse
+ = PostWorkspacesCurrentToolProviderApiSchemaResponses[keyof PostWorkspacesCurrentToolProviderApiSchemaResponses]
+
+export type PostWorkspacesCurrentToolProviderApiTestPreData = {
+ body: ApiToolTestPayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/api/test/pre'
+}
+
+export type PostWorkspacesCurrentToolProviderApiTestPreResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderApiTestPreResponse
+ = PostWorkspacesCurrentToolProviderApiTestPreResponses[keyof PostWorkspacesCurrentToolProviderApiTestPreResponses]
+
+export type GetWorkspacesCurrentToolProviderApiToolsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/api/tools'
+}
+
+export type GetWorkspacesCurrentToolProviderApiToolsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderApiToolsResponse
+ = GetWorkspacesCurrentToolProviderApiToolsResponses[keyof GetWorkspacesCurrentToolProviderApiToolsResponses]
+
+export type PostWorkspacesCurrentToolProviderApiUpdateData = {
+ body: ApiToolProviderUpdatePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/api/update'
+}
+
+export type PostWorkspacesCurrentToolProviderApiUpdateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderApiUpdateResponse
+ = PostWorkspacesCurrentToolProviderApiUpdateResponses[keyof PostWorkspacesCurrentToolProviderApiUpdateResponses]
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderAddData = {
+ body: BuiltinToolAddPayload
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/add'
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderAddResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderAddResponse
+ = PostWorkspacesCurrentToolProviderBuiltinByProviderAddResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderAddResponses]
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/credential/info'
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse
+ = GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponses]
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeData
+ = {
+ body?: never
+ path: {
+ provider: string
+ credential_type: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/credential/schema/{credential_type}'
+ }
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponse
+ = GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponses]
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/credentials'
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse
+ = GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponses]
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialData = {
+ body: BuiltinProviderDefaultCredentialPayload
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/default-credential'
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponse
+ = PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponses]
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteData = {
+ body: BuiltinToolCredentialDeletePayload
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/delete'
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponse
+ = PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponses]
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderIconData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/icon'
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderIconResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse
+ = GetWorkspacesCurrentToolProviderBuiltinByProviderIconResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderIconResponses]
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderInfoData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/info'
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse
+ = GetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponses]
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/oauth/client-schema'
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse
+ = GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponses]
+
+export type DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client'
+}
+
+export type DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse
+ = DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses[keyof DeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses]
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client'
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse
+ = GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses]
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientData = {
+ body: ToolOAuthCustomClientPayload
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/oauth/custom-client'
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse
+ = PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponses]
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderToolsData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/tools'
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse
+ = GetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponses[keyof GetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponses]
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateData = {
+ body: BuiltinToolUpdatePayload
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/builtin/{provider}/update'
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponse
+ = PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponses[keyof PostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponses]
+
+export type DeleteWorkspacesCurrentToolProviderMcpData = {
+ body: McpProviderDeletePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/mcp'
+}
+
+export type DeleteWorkspacesCurrentToolProviderMcpResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteWorkspacesCurrentToolProviderMcpResponse
+ = DeleteWorkspacesCurrentToolProviderMcpResponses[keyof DeleteWorkspacesCurrentToolProviderMcpResponses]
+
+export type PostWorkspacesCurrentToolProviderMcpData = {
+ body: McpProviderCreatePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/mcp'
+}
+
+export type PostWorkspacesCurrentToolProviderMcpResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderMcpResponse
+ = PostWorkspacesCurrentToolProviderMcpResponses[keyof PostWorkspacesCurrentToolProviderMcpResponses]
+
+export type PutWorkspacesCurrentToolProviderMcpData = {
+ body: McpProviderUpdatePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/mcp'
+}
+
+export type PutWorkspacesCurrentToolProviderMcpResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PutWorkspacesCurrentToolProviderMcpResponse
+ = PutWorkspacesCurrentToolProviderMcpResponses[keyof PutWorkspacesCurrentToolProviderMcpResponses]
+
+export type PostWorkspacesCurrentToolProviderMcpAuthData = {
+ body: McpAuthPayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/mcp/auth'
+}
+
+export type PostWorkspacesCurrentToolProviderMcpAuthResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderMcpAuthResponse
+ = PostWorkspacesCurrentToolProviderMcpAuthResponses[keyof PostWorkspacesCurrentToolProviderMcpAuthResponses]
+
+export type GetWorkspacesCurrentToolProviderMcpToolsByProviderIdData = {
+ body?: never
+ path: {
+ provider_id: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/mcp/tools/{provider_id}'
+}
+
+export type GetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse
+ = GetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponses[keyof GetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponses]
+
+export type GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdData = {
+ body?: never
+ path: {
+ provider_id: string
+ }
+ query?: never
+ url: '/workspaces/current/tool-provider/mcp/update/{provider_id}'
+}
+
+export type GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse
+ = GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponses[keyof GetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponses]
+
+export type PostWorkspacesCurrentToolProviderWorkflowCreateData = {
+ body: WorkflowToolCreatePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/workflow/create'
+}
+
+export type PostWorkspacesCurrentToolProviderWorkflowCreateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderWorkflowCreateResponse
+ = PostWorkspacesCurrentToolProviderWorkflowCreateResponses[keyof PostWorkspacesCurrentToolProviderWorkflowCreateResponses]
+
+export type PostWorkspacesCurrentToolProviderWorkflowDeleteData = {
+ body: WorkflowToolDeletePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/workflow/delete'
+}
+
+export type PostWorkspacesCurrentToolProviderWorkflowDeleteResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderWorkflowDeleteResponse
+ = PostWorkspacesCurrentToolProviderWorkflowDeleteResponses[keyof PostWorkspacesCurrentToolProviderWorkflowDeleteResponses]
+
+export type GetWorkspacesCurrentToolProviderWorkflowGetData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/workflow/get'
+}
+
+export type GetWorkspacesCurrentToolProviderWorkflowGetResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderWorkflowGetResponse
+ = GetWorkspacesCurrentToolProviderWorkflowGetResponses[keyof GetWorkspacesCurrentToolProviderWorkflowGetResponses]
+
+export type GetWorkspacesCurrentToolProviderWorkflowToolsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/workflow/tools'
+}
+
+export type GetWorkspacesCurrentToolProviderWorkflowToolsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProviderWorkflowToolsResponse
+ = GetWorkspacesCurrentToolProviderWorkflowToolsResponses[keyof GetWorkspacesCurrentToolProviderWorkflowToolsResponses]
+
+export type PostWorkspacesCurrentToolProviderWorkflowUpdateData = {
+ body: WorkflowToolUpdatePayload
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-provider/workflow/update'
+}
+
+export type PostWorkspacesCurrentToolProviderWorkflowUpdateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentToolProviderWorkflowUpdateResponse
+ = PostWorkspacesCurrentToolProviderWorkflowUpdateResponses[keyof PostWorkspacesCurrentToolProviderWorkflowUpdateResponses]
+
+export type GetWorkspacesCurrentToolProvidersData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tool-providers'
+}
+
+export type GetWorkspacesCurrentToolProvidersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolProvidersResponse
+ = GetWorkspacesCurrentToolProvidersResponses[keyof GetWorkspacesCurrentToolProvidersResponses]
+
+export type GetWorkspacesCurrentToolsApiData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tools/api'
+}
+
+export type GetWorkspacesCurrentToolsApiResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolsApiResponse
+ = GetWorkspacesCurrentToolsApiResponses[keyof GetWorkspacesCurrentToolsApiResponses]
+
+export type GetWorkspacesCurrentToolsBuiltinData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tools/builtin'
+}
+
+export type GetWorkspacesCurrentToolsBuiltinResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolsBuiltinResponse
+ = GetWorkspacesCurrentToolsBuiltinResponses[keyof GetWorkspacesCurrentToolsBuiltinResponses]
+
+export type GetWorkspacesCurrentToolsMcpData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tools/mcp'
+}
+
+export type GetWorkspacesCurrentToolsMcpResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolsMcpResponse
+ = GetWorkspacesCurrentToolsMcpResponses[keyof GetWorkspacesCurrentToolsMcpResponses]
+
+export type GetWorkspacesCurrentToolsWorkflowData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/tools/workflow'
+}
+
+export type GetWorkspacesCurrentToolsWorkflowResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentToolsWorkflowResponse
+ = GetWorkspacesCurrentToolsWorkflowResponses[keyof GetWorkspacesCurrentToolsWorkflowResponses]
+
+export type GetWorkspacesCurrentTriggerProviderByProviderIconData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/icon'
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderIconResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderIconResponse
+ = GetWorkspacesCurrentTriggerProviderByProviderIconResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderIconResponses]
+
+export type GetWorkspacesCurrentTriggerProviderByProviderInfoData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/info'
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderInfoResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderInfoResponse
+ = GetWorkspacesCurrentTriggerProviderByProviderInfoResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderInfoResponses]
+
+export type DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/oauth/client'
+}
+
+export type DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponse
+ = DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponses[keyof DeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponses]
+
+export type GetWorkspacesCurrentTriggerProviderByProviderOauthClientData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/oauth/client'
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderOauthClientResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderOauthClientResponse
+ = GetWorkspacesCurrentTriggerProviderByProviderOauthClientResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderOauthClientResponses]
+
+export type PostWorkspacesCurrentTriggerProviderByProviderOauthClientData = {
+ body: TriggerOAuthClientPayload
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/oauth/client'
+}
+
+export type PostWorkspacesCurrentTriggerProviderByProviderOauthClientResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentTriggerProviderByProviderOauthClientResponse
+ = PostWorkspacesCurrentTriggerProviderByProviderOauthClientResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderOauthClientResponses]
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdData
+ = {
+ body: TriggerSubscriptionBuilderUpdatePayload
+ path: {
+ provider: string
+ subscription_builder_id: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/build/{subscription_builder_id}'
+ }
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponse
+ = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponses]
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateData = {
+ body: TriggerSubscriptionBuilderCreatePayload
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/create'
+}
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponse
+ = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponses]
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdData
+ = {
+ body?: never
+ path: {
+ provider: string
+ subscription_builder_id: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/logs/{subscription_builder_id}'
+ }
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponse
+ = GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponses]
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdData
+ = {
+ body: TriggerSubscriptionBuilderUpdatePayload
+ path: {
+ provider: string
+ subscription_builder_id: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/update/{subscription_builder_id}'
+ }
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponse
+ = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponses]
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdData
+ = {
+ body: TriggerSubscriptionBuilderVerifyPayload
+ path: {
+ provider: string
+ subscription_builder_id: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/verify-and-update/{subscription_builder_id}'
+ }
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponse
+ = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponses]
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdData
+ = {
+ body?: never
+ path: {
+ provider: string
+ subscription_builder_id: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/subscriptions/builder/{subscription_builder_id}'
+ }
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponse
+ = GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponses]
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/subscriptions/list'
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse
+ = GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponses]
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeData = {
+ body?: never
+ path: {
+ provider: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/subscriptions/oauth/authorize'
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse
+ = GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponses[keyof GetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponses]
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdData
+ = {
+ body: TriggerSubscriptionBuilderVerifyPayload
+ path: {
+ provider: string
+ subscription_id: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{provider}/subscriptions/verify/{subscription_id}'
+ }
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponse
+ = PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponses[keyof PostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponses]
+
+export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteData = {
+ body?: never
+ path: {
+ subscription_id: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{subscription_id}/subscriptions/delete'
+}
+
+export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponse
+ = PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponses[keyof PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponses]
+
+export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateData = {
+ body: TriggerSubscriptionBuilderUpdatePayload
+ path: {
+ subscription_id: string
+ }
+ query?: never
+ url: '/workspaces/current/trigger-provider/{subscription_id}/subscriptions/update'
+}
+
+export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponse
+ = PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponses[keyof PostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponses]
+
+export type GetWorkspacesCurrentTriggersData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/current/triggers'
+}
+
+export type GetWorkspacesCurrentTriggersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentTriggersResponse
+ = GetWorkspacesCurrentTriggersResponses[keyof GetWorkspacesCurrentTriggersResponses]
+
+export type PostWorkspacesCustomConfigData = {
+ body: WorkspaceCustomConfigPayload
+ path?: never
+ query?: never
+ url: '/workspaces/custom-config'
+}
+
+export type PostWorkspacesCustomConfigResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCustomConfigResponse
+ = PostWorkspacesCustomConfigResponses[keyof PostWorkspacesCustomConfigResponses]
+
+export type PostWorkspacesCustomConfigWebappLogoUploadData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/workspaces/custom-config/webapp-logo/upload'
+}
+
+export type PostWorkspacesCustomConfigWebappLogoUploadResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesCustomConfigWebappLogoUploadResponse
+ = PostWorkspacesCustomConfigWebappLogoUploadResponses[keyof PostWorkspacesCustomConfigWebappLogoUploadResponses]
+
+export type PostWorkspacesInfoData = {
+ body: WorkspaceInfoPayload
+ path?: never
+ query?: never
+ url: '/workspaces/info'
+}
+
+export type PostWorkspacesInfoResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesInfoResponse
+ = PostWorkspacesInfoResponses[keyof PostWorkspacesInfoResponses]
+
+export type PostWorkspacesSwitchData = {
+ body: SwitchWorkspacePayload
+ path?: never
+ query?: never
+ url: '/workspaces/switch'
+}
+
+export type PostWorkspacesSwitchResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkspacesSwitchResponse
+ = PostWorkspacesSwitchResponses[keyof PostWorkspacesSwitchResponses]
+
+export type GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangData = {
+ body?: never
+ path: {
+ tenant_id: string
+ provider: string
+ icon_type: string
+ lang: string
+ }
+ query?: never
+ url: '/workspaces/{tenant_id}/model-providers/{provider}/{icon_type}/{lang}'
+}
+
+export type GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse
+ = GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponses[keyof GetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponses]
diff --git a/packages/contracts/generated/api/console/workspaces/zod.gen.ts b/packages/contracts/generated/api/console/workspaces/zod.gen.ts
new file mode 100644
index 00000000000..a381824da77
--- /dev/null
+++ b/packages/contracts/generated/api/console/workspaces/zod.gen.ts
@@ -0,0 +1,2150 @@
+// 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(),
+})
+
+/**
+ * EndpointCreatePayload
+ */
+export const zEndpointCreatePayload = z.object({
+ name: z.string().min(1),
+ plugin_unique_identifier: z.string(),
+ settings: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * EndpointCreateResponse
+ */
+export const zEndpointCreateResponse = z.object({
+ success: z.boolean(),
+})
+
+/**
+ * EndpointIdPayload
+ */
+export const zEndpointIdPayload = z.object({
+ endpoint_id: z.string(),
+})
+
+/**
+ * EndpointDeleteResponse
+ */
+export const zEndpointDeleteResponse = z.object({
+ success: z.boolean(),
+})
+
+/**
+ * EndpointDisableResponse
+ */
+export const zEndpointDisableResponse = z.object({
+ success: z.boolean(),
+})
+
+/**
+ * EndpointEnableResponse
+ */
+export const zEndpointEnableResponse = z.object({
+ success: z.boolean(),
+})
+
+/**
+ * EndpointListResponse
+ */
+export const zEndpointListResponse = z.object({
+ endpoints: z.array(z.record(z.string(), z.unknown())),
+})
+
+/**
+ * PluginEndpointListResponse
+ */
+export const zPluginEndpointListResponse = z.object({
+ endpoints: z.array(z.record(z.string(), z.unknown())),
+})
+
+/**
+ * LegacyEndpointUpdatePayload
+ */
+export const zLegacyEndpointUpdatePayload = z.object({
+ endpoint_id: z.string(),
+ name: z.string().min(1),
+ settings: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * EndpointUpdateResponse
+ */
+export const zEndpointUpdateResponse = z.object({
+ success: z.boolean(),
+})
+
+/**
+ * EndpointUpdatePayload
+ */
+export const zEndpointUpdatePayload = z.object({
+ name: z.string().min(1),
+ settings: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * OwnerTransferCheckPayload
+ */
+export const zOwnerTransferCheckPayload = z.object({
+ code: z.string(),
+ token: z.string(),
+})
+
+/**
+ * OwnerTransferEmailPayload
+ */
+export const zOwnerTransferEmailPayload = z.object({
+ language: z.string().nullish(),
+})
+
+/**
+ * OwnerTransferPayload
+ */
+export const zOwnerTransferPayload = z.object({
+ token: z.string(),
+})
+
+/**
+ * MemberRoleUpdatePayload
+ */
+export const zMemberRoleUpdatePayload = z.object({
+ role: z.string(),
+})
+
+/**
+ * ParserCredentialDelete
+ */
+export const zParserCredentialDelete = z.object({
+ credential_id: z.string(),
+})
+
+/**
+ * ParserCredentialCreate
+ */
+export const zParserCredentialCreate = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ name: z.string().max(30).nullish(),
+})
+
+/**
+ * ParserCredentialUpdate
+ */
+export const zParserCredentialUpdate = z.object({
+ credential_id: z.string(),
+ credentials: z.record(z.string(), z.unknown()),
+ name: z.string().max(30).nullish(),
+})
+
+/**
+ * ParserCredentialSwitch
+ */
+export const zParserCredentialSwitch = z.object({
+ credential_id: z.string(),
+})
+
+/**
+ * ParserCredentialValidate
+ */
+export const zParserCredentialValidate = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * ParserPreferredProviderType
+ */
+export const zParserPreferredProviderType = z.object({
+ preferred_provider_type: z.enum(['system', 'custom']),
+})
+
+/**
+ * ParserGithubInstall
+ */
+export const zParserGithubInstall = z.object({
+ package: z.string(),
+ plugin_unique_identifier: z.string(),
+ repo: z.string(),
+ version: z.string(),
+})
+
+/**
+ * ParserPluginIdentifiers
+ */
+export const zParserPluginIdentifiers = z.object({
+ plugin_unique_identifiers: z.array(z.string()),
+})
+
+/**
+ * ParserLatest
+ */
+export const zParserLatest = z.object({
+ plugin_ids: z.array(z.string()),
+})
+
+/**
+ * ParserDynamicOptionsWithCredentials
+ */
+export const zParserDynamicOptionsWithCredentials = z.object({
+ action: z.string(),
+ credential_id: z.string(),
+ credentials: z.record(z.string(), z.unknown()),
+ parameter: z.string(),
+ plugin_id: z.string(),
+ provider: z.string(),
+})
+
+/**
+ * ParserExcludePlugin
+ */
+export const zParserExcludePlugin = z.object({
+ plugin_id: z.string(),
+})
+
+/**
+ * ParserUninstall
+ */
+export const zParserUninstall = z.object({
+ plugin_installation_id: z.string(),
+})
+
+/**
+ * ParserGithubUpgrade
+ */
+export const zParserGithubUpgrade = z.object({
+ new_plugin_unique_identifier: z.string(),
+ original_plugin_unique_identifier: z.string(),
+ package: z.string(),
+ repo: z.string(),
+ version: z.string(),
+})
+
+/**
+ * ParserMarketplaceUpgrade
+ */
+export const zParserMarketplaceUpgrade = z.object({
+ new_plugin_unique_identifier: z.string(),
+ original_plugin_unique_identifier: z.string(),
+})
+
+/**
+ * ParserGithubUpload
+ */
+export const zParserGithubUpload = z.object({
+ package: z.string(),
+ repo: z.string(),
+ version: z.string(),
+})
+
+/**
+ * ApiToolProviderDeletePayload
+ */
+export const zApiToolProviderDeletePayload = z.object({
+ provider: z.string(),
+})
+
+/**
+ * ApiToolSchemaPayload
+ */
+export const zApiToolSchemaPayload = z.object({
+ schema: z.string(),
+})
+
+/**
+ * BuiltinProviderDefaultCredentialPayload
+ */
+export const zBuiltinProviderDefaultCredentialPayload = z.object({
+ id: z.string(),
+})
+
+/**
+ * BuiltinToolCredentialDeletePayload
+ */
+export const zBuiltinToolCredentialDeletePayload = z.object({
+ credential_id: z.string(),
+})
+
+/**
+ * ToolOAuthCustomClientPayload
+ */
+export const zToolOAuthCustomClientPayload = z.object({
+ client_params: z.record(z.string(), z.unknown()).nullish(),
+ enable_oauth_custom_client: z.boolean().nullish().default(true),
+})
+
+/**
+ * BuiltinToolUpdatePayload
+ */
+export const zBuiltinToolUpdatePayload = z.object({
+ credential_id: z.string(),
+ credentials: z.record(z.string(), z.unknown()).nullish(),
+ name: z.string().max(30).nullish(),
+})
+
+/**
+ * MCPProviderDeletePayload
+ */
+export const zMcpProviderDeletePayload = z.object({
+ provider_id: z.string(),
+})
+
+/**
+ * MCPProviderCreatePayload
+ */
+export const zMcpProviderCreatePayload = z.object({
+ authentication: z.record(z.string(), z.unknown()).nullish(),
+ configuration: z.record(z.string(), z.unknown()).nullish(),
+ headers: z.record(z.string(), z.unknown()).nullish(),
+ icon: z.string(),
+ icon_background: z.string().optional().default(''),
+ icon_type: z.string(),
+ name: z.string(),
+ server_identifier: z.string(),
+ server_url: z.string(),
+})
+
+/**
+ * MCPProviderUpdatePayload
+ */
+export const zMcpProviderUpdatePayload = z.object({
+ authentication: z.record(z.string(), z.unknown()).nullish(),
+ configuration: z.record(z.string(), z.unknown()).nullish(),
+ headers: z.record(z.string(), z.unknown()).nullish(),
+ icon: z.string(),
+ icon_background: z.string().optional().default(''),
+ icon_type: z.string(),
+ name: z.string(),
+ provider_id: z.string(),
+ server_identifier: z.string(),
+ server_url: z.string(),
+})
+
+/**
+ * MCPAuthPayload
+ */
+export const zMcpAuthPayload = z.object({
+ authorization_code: z.string().nullish(),
+ provider_id: z.string(),
+})
+
+/**
+ * WorkflowToolDeletePayload
+ */
+export const zWorkflowToolDeletePayload = z.object({
+ workflow_tool_id: z.string(),
+})
+
+/**
+ * TriggerOAuthClientPayload
+ */
+export const zTriggerOAuthClientPayload = z.object({
+ client_params: z.record(z.string(), z.unknown()).nullish(),
+ enabled: z.boolean().nullish(),
+})
+
+/**
+ * TriggerSubscriptionBuilderUpdatePayload
+ */
+export const zTriggerSubscriptionBuilderUpdatePayload = z.object({
+ credentials: z.record(z.string(), z.unknown()).nullish(),
+ name: z.string().nullish(),
+ parameters: z.record(z.string(), z.unknown()).nullish(),
+ properties: z.record(z.string(), z.unknown()).nullish(),
+})
+
+/**
+ * TriggerSubscriptionBuilderCreatePayload
+ */
+export const zTriggerSubscriptionBuilderCreatePayload = z.object({
+ credential_type: z.string().optional().default('unauthorized'),
+})
+
+/**
+ * TriggerSubscriptionBuilderVerifyPayload
+ */
+export const zTriggerSubscriptionBuilderVerifyPayload = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+})
+
+/**
+ * WorkspaceCustomConfigPayload
+ */
+export const zWorkspaceCustomConfigPayload = z.object({
+ remove_webapp_brand: z.boolean().nullish(),
+ replace_webapp_logo: z.string().nullish(),
+})
+
+/**
+ * WorkspaceInfoPayload
+ */
+export const zWorkspaceInfoPayload = z.object({
+ name: z.string(),
+})
+
+/**
+ * SwitchWorkspacePayload
+ */
+export const zSwitchWorkspacePayload = z.object({
+ tenant_id: z.string(),
+})
+
+/**
+ * AccountWithRole
+ */
+export const zAccountWithRole = z.object({
+ avatar: z.string().nullish(),
+ created_at: z.int().nullish(),
+ email: z.string(),
+ id: z.string(),
+ last_active_at: z.int().nullish(),
+ last_login_at: z.int().nullish(),
+ name: z.string(),
+ role: z.string(),
+ status: z.string(),
+})
+
+/**
+ * AccountWithRoleList
+ */
+export const zAccountWithRoleList = z.object({
+ accounts: z.array(zAccountWithRole),
+})
+
+/**
+ * TenantAccountRole
+ */
+export const zTenantAccountRole = z.enum(['owner', 'admin', 'editor', 'normal', 'dataset_operator'])
+
+/**
+ * MemberInvitePayload
+ */
+export const zMemberInvitePayload = z.object({
+ emails: z.array(z.string()).optional(),
+ language: z.string().nullish(),
+ role: zTenantAccountRole,
+})
+
+/**
+ * ModelType
+ *
+ * Enum class for model type.
+ */
+export const zModelType = z.enum([
+ 'llm',
+ 'text-embedding',
+ 'rerank',
+ 'speech2text',
+ 'moderation',
+ 'tts',
+])
+
+/**
+ * ParserDeleteModels
+ */
+export const zParserDeleteModels = z.object({
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * ParserDeleteCredential
+ */
+export const zParserDeleteCredential = z.object({
+ credential_id: z.string(),
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * ParserCreateCredential
+ */
+export const zParserCreateCredential = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ model: z.string(),
+ model_type: zModelType,
+ name: z.string().max(30).nullish(),
+})
+
+/**
+ * ParserUpdateCredential
+ */
+export const zParserUpdateCredential = z.object({
+ credential_id: z.string(),
+ credentials: z.record(z.string(), z.unknown()),
+ model: z.string(),
+ model_type: zModelType,
+ name: z.string().max(30).nullish(),
+})
+
+/**
+ * ParserSwitch
+ */
+export const zParserSwitch = z.object({
+ credential_id: z.string(),
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * ParserValidate
+ */
+export const zParserValidate = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * LoadBalancingCredentialPayload
+ */
+export const zLoadBalancingCredentialPayload = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * Inner
+ */
+export const zInner = z.object({
+ model: z.string().nullish(),
+ model_type: zModelType,
+ provider: z.string().nullish(),
+})
+
+/**
+ * ParserPostDefault
+ */
+export const zParserPostDefault = z.object({
+ model_settings: z.array(zInner),
+})
+
+/**
+ * LoadBalancingPayload
+ */
+export const zLoadBalancingPayload = z.object({
+ configs: z.array(z.record(z.string(), z.unknown())).nullish(),
+ enabled: z.boolean().nullish(),
+})
+
+/**
+ * ParserPostModels
+ */
+export const zParserPostModels = z.object({
+ config_from: z.string().nullish(),
+ credential_id: z.string().nullish(),
+ load_balancing: zLoadBalancingPayload.optional(),
+ model: z.string(),
+ model_type: zModelType,
+})
+
+/**
+ * DebugPermission
+ */
+export const zDebugPermission = z.enum(['everyone', 'admins', 'noone'])
+
+/**
+ * InstallPermission
+ */
+export const zInstallPermission = z.enum(['everyone', 'admins', 'noone'])
+
+/**
+ * ParserPermissionChange
+ */
+export const zParserPermissionChange = z.object({
+ debug_permission: zDebugPermission,
+ install_permission: zInstallPermission,
+})
+
+/**
+ * PluginPermissionSettingsPayload
+ */
+export const zPluginPermissionSettingsPayload = z.object({
+ debug_permission: zDebugPermission.optional(),
+ install_permission: zInstallPermission.optional(),
+})
+
+/**
+ * ApiProviderSchemaType
+ *
+ * Enum class for api provider schema type.
+ */
+export const zApiProviderSchemaType = z.enum([
+ 'openapi',
+ 'swagger',
+ 'openai_plugin',
+ 'openai_actions',
+])
+
+/**
+ * ApiToolProviderAddPayload
+ */
+export const zApiToolProviderAddPayload = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ custom_disclaimer: z.string().optional().default(''),
+ icon: z.record(z.string(), z.unknown()),
+ labels: z.array(z.string()).nullish(),
+ privacy_policy: z.string().nullish(),
+ provider: z.string(),
+ schema: z.string(),
+ schema_type: zApiProviderSchemaType,
+})
+
+/**
+ * ApiToolTestPayload
+ */
+export const zApiToolTestPayload = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ parameters: z.record(z.string(), z.unknown()),
+ provider_name: z.string().nullish(),
+ schema: z.string(),
+ schema_type: zApiProviderSchemaType,
+ tool_name: z.string(),
+})
+
+/**
+ * ApiToolProviderUpdatePayload
+ */
+export const zApiToolProviderUpdatePayload = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ custom_disclaimer: z.string().optional().default(''),
+ icon: z.record(z.string(), z.unknown()),
+ labels: z.array(z.string()).nullish(),
+ original_provider: z.string(),
+ privacy_policy: z.string().nullish(),
+ provider: z.string(),
+ schema: z.string(),
+ schema_type: zApiProviderSchemaType,
+})
+
+/**
+ * CredentialType
+ */
+export const zCredentialType = z.enum(['api-key', 'oauth2', 'unauthorized'])
+
+/**
+ * BuiltinToolAddPayload
+ */
+export const zBuiltinToolAddPayload = z.object({
+ credentials: z.record(z.string(), z.unknown()),
+ name: z.string().max(30).nullish(),
+ type: zCredentialType,
+})
+
+/**
+ * StrategySetting
+ */
+export const zStrategySetting = z.enum(['disabled', 'fix_only', 'latest'])
+
+/**
+ * UpgradeMode
+ */
+export const zUpgradeMode = z.enum(['all', 'partial', 'exclude'])
+
+/**
+ * PluginAutoUpgradeSettingsPayload
+ */
+export const zPluginAutoUpgradeSettingsPayload = z.object({
+ exclude_plugins: z.array(z.string()).optional(),
+ include_plugins: z.array(z.string()).optional(),
+ strategy_setting: zStrategySetting.optional(),
+ upgrade_mode: zUpgradeMode.optional(),
+ upgrade_time_of_day: z.int().optional().default(0),
+})
+
+/**
+ * ParserPreferencesChange
+ */
+export const zParserPreferencesChange = z.object({
+ auto_upgrade: zPluginAutoUpgradeSettingsPayload,
+ permission: zPluginPermissionSettingsPayload,
+})
+
+/**
+ * ToolParameterForm
+ */
+export const zToolParameterForm = z.enum(['schema', 'form', 'llm'])
+
+/**
+ * WorkflowToolParameterConfiguration
+ *
+ * Workflow tool configuration
+ */
+export const zWorkflowToolParameterConfiguration = z.object({
+ description: z.string(),
+ form: zToolParameterForm,
+ name: z.string(),
+})
+
+/**
+ * WorkflowToolCreatePayload
+ */
+export const zWorkflowToolCreatePayload = z.object({
+ description: z.string(),
+ icon: z.record(z.string(), z.unknown()),
+ label: z.string(),
+ labels: z.array(z.string()).nullish(),
+ name: z.string(),
+ parameters: z.array(zWorkflowToolParameterConfiguration).optional(),
+ privacy_policy: z.string().nullish().default(''),
+ workflow_app_id: z.string(),
+})
+
+/**
+ * WorkflowToolUpdatePayload
+ */
+export const zWorkflowToolUpdatePayload = z.object({
+ description: z.string(),
+ icon: z.record(z.string(), z.unknown()),
+ label: z.string(),
+ labels: z.array(z.string()).nullish(),
+ name: z.string(),
+ parameters: z.array(zWorkflowToolParameterConfiguration).optional(),
+ privacy_policy: z.string().nullish().default(''),
+ workflow_tool_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentResponse = zTenantInfoResponse
+
+export const zGetWorkspacesCurrentAgentProviderByProviderNamePath = z.object({
+ provider_name: z.string(),
+})
+
+/**
+ * Agent provider details
+ */
+export const zGetWorkspacesCurrentAgentProviderByProviderNameResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentAgentProvidersResponse = z.array(
+ z.record(z.string(), z.unknown()),
+)
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentDatasetOperatorsResponse = zAccountWithRoleList
+
+export const zGetWorkspacesCurrentDefaultModelQuery = z.object({
+ model_type: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentDefaultModelResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentDefaultModelBody = zParserPostDefault
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentDefaultModelResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentEndpointsBody = zEndpointCreatePayload
+
+/**
+ * Endpoint created successfully
+ */
+export const zPostWorkspacesCurrentEndpointsResponse = zEndpointCreateResponse
+
+export const zPostWorkspacesCurrentEndpointsCreateBody = zEndpointCreatePayload
+
+/**
+ * Endpoint created successfully
+ */
+export const zPostWorkspacesCurrentEndpointsCreateResponse = zEndpointCreateResponse
+
+export const zPostWorkspacesCurrentEndpointsDeleteBody = zEndpointIdPayload
+
+/**
+ * Endpoint deleted successfully
+ */
+export const zPostWorkspacesCurrentEndpointsDeleteResponse = zEndpointDeleteResponse
+
+export const zPostWorkspacesCurrentEndpointsDisableBody = zEndpointIdPayload
+
+/**
+ * Endpoint disabled successfully
+ */
+export const zPostWorkspacesCurrentEndpointsDisableResponse = zEndpointDisableResponse
+
+export const zPostWorkspacesCurrentEndpointsEnableBody = zEndpointIdPayload
+
+/**
+ * Endpoint enabled successfully
+ */
+export const zPostWorkspacesCurrentEndpointsEnableResponse = zEndpointEnableResponse
+
+export const zGetWorkspacesCurrentEndpointsListQuery = z.object({
+ page: z.int().gte(1),
+ page_size: z.int(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentEndpointsListResponse = zEndpointListResponse
+
+export const zGetWorkspacesCurrentEndpointsListPluginQuery = z.object({
+ page: z.int().gte(1),
+ page_size: z.int(),
+ plugin_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentEndpointsListPluginResponse = zPluginEndpointListResponse
+
+export const zPostWorkspacesCurrentEndpointsUpdateBody = zLegacyEndpointUpdatePayload
+
+/**
+ * Endpoint updated successfully
+ */
+export const zPostWorkspacesCurrentEndpointsUpdateResponse = zEndpointUpdateResponse
+
+export const zDeleteWorkspacesCurrentEndpointsByIdPath = z.object({
+ id: z.string(),
+})
+
+/**
+ * Endpoint deleted successfully
+ */
+export const zDeleteWorkspacesCurrentEndpointsByIdResponse = zEndpointDeleteResponse
+
+export const zPatchWorkspacesCurrentEndpointsByIdBody = zEndpointUpdatePayload
+
+export const zPatchWorkspacesCurrentEndpointsByIdPath = z.object({
+ id: z.string(),
+})
+
+/**
+ * Endpoint updated successfully
+ */
+export const zPatchWorkspacesCurrentEndpointsByIdResponse = zEndpointUpdateResponse
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentMembersResponse = zAccountWithRoleList
+
+export const zPostWorkspacesCurrentMembersInviteEmailBody = zMemberInvitePayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentMembersInviteEmailResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentMembersOwnerTransferCheckBody = zOwnerTransferCheckPayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentMembersOwnerTransferCheckResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailBody
+ = zOwnerTransferEmailPayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentMembersSendOwnerTransferConfirmEmailResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteWorkspacesCurrentMembersByMemberIdPath = z.object({
+ member_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteWorkspacesCurrentMembersByMemberIdResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentMembersByMemberIdOwnerTransferBody = zOwnerTransferPayload
+
+export const zPostWorkspacesCurrentMembersByMemberIdOwnerTransferPath = z.object({
+ member_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentMembersByMemberIdOwnerTransferResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPutWorkspacesCurrentMembersByMemberIdUpdateRoleBody = zMemberRoleUpdatePayload
+
+export const zPutWorkspacesCurrentMembersByMemberIdUpdateRolePath = z.object({
+ member_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPutWorkspacesCurrentMembersByMemberIdUpdateRoleResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentModelProvidersQuery = z.object({
+ model_type: z.string().nullish(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentModelProvidersResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentModelProvidersByProviderCheckoutUrlResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsBody
+ = zParserCredentialDelete
+
+export const zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteWorkspacesCurrentModelProvidersByProviderCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentModelProvidersByProviderCredentialsPath = z.object({
+ provider: z.string(),
+})
+
+export const zGetWorkspacesCurrentModelProvidersByProviderCredentialsQuery = z.object({
+ credential_id: z.string().nullish(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentModelProvidersByProviderCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentModelProvidersByProviderCredentialsBody = zParserCredentialCreate
+
+export const zPostWorkspacesCurrentModelProvidersByProviderCredentialsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPutWorkspacesCurrentModelProvidersByProviderCredentialsBody = zParserCredentialUpdate
+
+export const zPutWorkspacesCurrentModelProvidersByProviderCredentialsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPutWorkspacesCurrentModelProvidersByProviderCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchBody
+ = zParserCredentialSwitch
+
+export const zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderCredentialsSwitchResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateBody
+ = zParserCredentialValidate
+
+export const zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidatePath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderCredentialsValidateResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsBody = zParserDeleteModels
+
+export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentModelProvidersByProviderModelsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentModelProvidersByProviderModelsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsBody = zParserPostModels
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody
+ = zParserDeleteCredential
+
+export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath = z.object({
+ provider: z.string(),
+})
+
+export const zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsQuery = z.object({
+ config_from: z.string().nullish(),
+ credential_id: z.string().nullish(),
+ model: z.string(),
+ model_type: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody
+ = zParserCreateCredential
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsBody
+ = zParserUpdateCredential
+
+export const zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPutWorkspacesCurrentModelProvidersByProviderModelsCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchBody
+ = zParserSwitch
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsSwitchResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateBody
+ = zParserValidate
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidatePath = z.object(
+ {
+ provider: z.string(),
+ },
+)
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsCredentialsValidateResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableBody = zParserDeleteModels
+
+export const zPatchWorkspacesCurrentModelProvidersByProviderModelsDisablePath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchWorkspacesCurrentModelProvidersByProviderModelsDisableResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableBody = zParserDeleteModels
+
+export const zPatchWorkspacesCurrentModelProvidersByProviderModelsEnablePath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPatchWorkspacesCurrentModelProvidersByProviderModelsEnableResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateBody
+ = zLoadBalancingCredentialPayload
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidatePath
+ = z.object({
+ provider: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsCredentialsValidateResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateBody
+ = zLoadBalancingCredentialPayload
+
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidatePath
+ = z.object({
+ provider: z.string(),
+ config_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderModelsLoadBalancingConfigsByConfigIdCredentialsValidateResponse
+ = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesPath = z.object({
+ provider: z.string(),
+})
+
+export const zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesQuery = z.object({
+ model: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentModelProvidersByProviderModelsParameterRulesResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeBody
+ = zParserPreferredProviderType
+
+export const zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypePath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentModelProvidersByProviderPreferredProviderTypeResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentModelsModelTypesByModelTypePath = z.object({
+ model_type: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPermissionResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentPluginAssetQuery = z.object({
+ file_name: z.string(),
+ plugin_unique_identifier: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginAssetResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginDebuggingKeyResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentPluginFetchManifestQuery = z.object({
+ plugin_unique_identifier: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginFetchManifestResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentPluginIconQuery = z.object({
+ filename: z.string(),
+ tenant_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginIconResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentPluginInstallGithubBody = zParserGithubInstall
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginInstallGithubResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentPluginInstallMarketplaceBody = zParserPluginIdentifiers
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginInstallMarketplaceResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentPluginInstallPkgBody = zParserPluginIdentifiers
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginInstallPkgResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentPluginListQuery = z.object({
+ page: z.int().gte(1).optional().default(1),
+ page_size: z.int().gte(1).lte(256).optional().default(256),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginListResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentPluginListInstallationsIdsBody = zParserLatest
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginListInstallationsIdsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentPluginListLatestVersionsBody = zParserLatest
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginListLatestVersionsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentPluginMarketplacePkgQuery = z.object({
+ plugin_unique_identifier: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginMarketplacePkgResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentPluginParametersDynamicOptionsQuery = z.object({
+ action: z.string(),
+ credential_id: z.string().nullish(),
+ parameter: z.string(),
+ plugin_id: z.string(),
+ provider: z.string(),
+ provider_type: z.enum(['tool', 'trigger']),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginParametersDynamicOptionsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsBody
+ = zParserDynamicOptionsWithCredentials
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginParametersDynamicOptionsWithCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentPluginPermissionChangeBody = zParserPermissionChange
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginPermissionChangeResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginPermissionFetchResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeBody = zParserExcludePlugin
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginPreferencesAutoupgradeExcludeResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentPluginPreferencesChangeBody = zParserPreferencesChange
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginPreferencesChangeResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginPreferencesFetchResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentPluginReadmeQuery = z.object({
+ language: z.string().optional().default('en-US'),
+ plugin_unique_identifier: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginReadmeResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentPluginTasksQuery = z.object({
+ page: z.int().gte(1).optional().default(1),
+ page_size: z.int().gte(1).lte(256).optional().default(256),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginTasksResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginTasksDeleteAllResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentPluginTasksByTaskIdPath = z.object({
+ task_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentPluginTasksByTaskIdResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentPluginTasksByTaskIdDeletePath = z.object({
+ task_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginTasksByTaskIdDeleteResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierPath = z.object({
+ task_id: z.string(),
+ identifier: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginTasksByTaskIdDeleteByIdentifierResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentPluginUninstallBody = zParserUninstall
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginUninstallResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentPluginUpgradeGithubBody = zParserGithubUpgrade
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginUpgradeGithubResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentPluginUpgradeMarketplaceBody = zParserMarketplaceUpgrade
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginUpgradeMarketplaceResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginUploadBundleResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentPluginUploadGithubBody = zParserGithubUpload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginUploadGithubResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentPluginUploadPkgResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolLabelsResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentToolProviderApiAddBody = zApiToolProviderAddPayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderApiAddResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentToolProviderApiDeleteBody = zApiToolProviderDeletePayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderApiDeleteResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderApiGetResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderApiRemoteResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentToolProviderApiSchemaBody = zApiToolSchemaPayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderApiSchemaResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentToolProviderApiTestPreBody = zApiToolTestPayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderApiTestPreResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderApiToolsResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentToolProviderApiUpdateBody = zApiToolProviderUpdatePayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderApiUpdateResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderAddBody = zBuiltinToolAddPayload
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderAddPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderAddResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialInfoResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypePath
+ = z.object({
+ provider: z.string(),
+ credential_type: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialSchemaByCredentialTypeResponse
+ = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderCredentialsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialBody
+ = zBuiltinProviderDefaultCredentialPayload
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderDefaultCredentialResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteBody
+ = zBuiltinToolCredentialDeletePayload
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderDeletePath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderDeleteResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderIconPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderIconResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderInfoResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthClientSchemaResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse
+ = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientBody
+ = zToolOAuthCustomClientPayload
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderOauthCustomClientResponse
+ = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderBuiltinByProviderToolsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateBody
+ = zBuiltinToolUpdatePayload
+
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdatePath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderBuiltinByProviderUpdateResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteWorkspacesCurrentToolProviderMcpBody = zMcpProviderDeletePayload
+
+/**
+ * Success
+ */
+export const zDeleteWorkspacesCurrentToolProviderMcpResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentToolProviderMcpBody = zMcpProviderCreatePayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderMcpResponse = z.record(z.string(), z.unknown())
+
+export const zPutWorkspacesCurrentToolProviderMcpBody = zMcpProviderUpdatePayload
+
+/**
+ * Success
+ */
+export const zPutWorkspacesCurrentToolProviderMcpResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentToolProviderMcpAuthBody = zMcpAuthPayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderMcpAuthResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdPath = z.object({
+ provider_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderMcpToolsByProviderIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdPath = z.object({
+ provider_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderMcpUpdateByProviderIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentToolProviderWorkflowCreateBody = zWorkflowToolCreatePayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderWorkflowCreateResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentToolProviderWorkflowDeleteBody = zWorkflowToolDeletePayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderWorkflowDeleteResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderWorkflowGetResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProviderWorkflowToolsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentToolProviderWorkflowUpdateBody = zWorkflowToolUpdatePayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentToolProviderWorkflowUpdateResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolProvidersResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolsApiResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolsBuiltinResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolsMcpResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentToolsWorkflowResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentTriggerProviderByProviderIconPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentTriggerProviderByProviderIconResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentTriggerProviderByProviderInfoPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentTriggerProviderByProviderInfoResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zDeleteWorkspacesCurrentTriggerProviderByProviderOauthClientResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentTriggerProviderByProviderOauthClientPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentTriggerProviderByProviderOauthClientResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderOauthClientBody
+ = zTriggerOAuthClientPayload
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderOauthClientPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentTriggerProviderByProviderOauthClientResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdBody
+ = zTriggerSubscriptionBuilderUpdatePayload
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdPath
+ = z.object({
+ provider: z.string(),
+ subscription_builder_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBuildBySubscriptionBuilderIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateBody
+ = zTriggerSubscriptionBuilderCreatePayload
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreatePath
+ = z.object({
+ provider: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderCreateResponse
+ = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdPath
+ = z.object({
+ provider: z.string(),
+ subscription_builder_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderLogsBySubscriptionBuilderIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdBody
+ = zTriggerSubscriptionBuilderUpdatePayload
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdPath
+ = z.object({
+ provider: z.string(),
+ subscription_builder_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderUpdateBySubscriptionBuilderIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdBody
+ = zTriggerSubscriptionBuilderVerifyPayload
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdPath
+ = z.object({
+ provider: z.string(),
+ subscription_builder_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderVerifyAndUpdateBySubscriptionBuilderIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdPath
+ = z.object({
+ provider: z.string(),
+ subscription_builder_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsBuilderBySubscriptionBuilderIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListPath = z.object({
+ provider: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsListResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizePath
+ = z.object({
+ provider: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentTriggerProviderByProviderSubscriptionsOauthAuthorizeResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdBody
+ = zTriggerSubscriptionBuilderVerifyPayload
+
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdPath
+ = z.object({
+ provider: z.string(),
+ subscription_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentTriggerProviderByProviderSubscriptionsVerifyBySubscriptionIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeletePath
+ = z.object({
+ subscription_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsDeleteResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateBody
+ = zTriggerSubscriptionBuilderUpdatePayload
+
+export const zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdatePath
+ = z.object({
+ subscription_id: z.string(),
+ })
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCurrentTriggerProviderBySubscriptionIdSubscriptionsUpdateResponse
+ = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetWorkspacesCurrentTriggersResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesCustomConfigBody = zWorkspaceCustomConfigPayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCustomConfigResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zPostWorkspacesCustomConfigWebappLogoUploadResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesInfoBody = zWorkspaceInfoPayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesInfoResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkspacesSwitchBody = zSwitchWorkspacePayload
+
+/**
+ * Success
+ */
+export const zPostWorkspacesSwitchResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangPath = z.object({
+ tenant_id: z.string(),
+ provider: z.string(),
+ icon_type: z.string(),
+ lang: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkspacesByTenantIdModelProvidersByProviderByIconTypeByLangResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
diff --git a/packages/contracts/generated/api/service/orpc.gen.ts b/packages/contracts/generated/api/service/orpc.gen.ts
new file mode 100644
index 00000000000..a5a45a64525
--- /dev/null
+++ b/packages/contracts/generated/api/service/orpc.gen.ts
@@ -0,0 +1,2405 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zDeleteAppsAnnotationsByAnnotationIdPath,
+ zDeleteAppsAnnotationsByAnnotationIdResponse,
+ zDeleteConversationsByCIdPath,
+ zDeleteConversationsByCIdResponse,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdPath,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath,
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse,
+ zDeleteDatasetsByDatasetIdMetadataByMetadataIdPath,
+ zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse,
+ zDeleteDatasetsByDatasetIdPath,
+ zDeleteDatasetsByDatasetIdResponse,
+ zDeleteDatasetsTagsBody,
+ zDeleteDatasetsTagsResponse,
+ zGetAppFeedbacksQuery,
+ zGetAppFeedbacksResponse,
+ zGetAppsAnnotationReplyByActionStatusByJobIdPath,
+ zGetAppsAnnotationReplyByActionStatusByJobIdResponse,
+ zGetAppsAnnotationsResponse,
+ zGetConversationsByCIdVariablesPath,
+ zGetConversationsByCIdVariablesQuery,
+ zGetConversationsByCIdVariablesResponse,
+ zGetConversationsQuery,
+ zGetConversationsResponse,
+ zGetDatasetsByDatasetIdDocumentsByBatchIndexingStatusPath,
+ zGetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksQuery,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsQuery,
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse,
+ zGetDatasetsByDatasetIdDocumentsPath,
+ zGetDatasetsByDatasetIdDocumentsResponse,
+ zGetDatasetsByDatasetIdMetadataBuiltInPath,
+ zGetDatasetsByDatasetIdMetadataBuiltInResponse,
+ zGetDatasetsByDatasetIdMetadataPath,
+ zGetDatasetsByDatasetIdMetadataResponse,
+ zGetDatasetsByDatasetIdPath,
+ zGetDatasetsByDatasetIdPipelineDatasourcePluginsPath,
+ zGetDatasetsByDatasetIdPipelineDatasourcePluginsQuery,
+ zGetDatasetsByDatasetIdPipelineDatasourcePluginsResponse,
+ zGetDatasetsByDatasetIdResponse,
+ zGetDatasetsByDatasetIdTagsPath,
+ zGetDatasetsByDatasetIdTagsResponse,
+ zGetDatasetsResponse,
+ zGetDatasetsTagsResponse,
+ zGetEndUsersByEndUserIdPath,
+ zGetEndUsersByEndUserIdResponse,
+ zGetFilesByFileIdPreviewPath,
+ zGetFilesByFileIdPreviewQuery,
+ zGetFilesByFileIdPreviewResponse,
+ zGetFormHumanInputByFormTokenPath,
+ zGetFormHumanInputByFormTokenResponse,
+ zGetInfoResponse,
+ zGetMessagesByMessageIdSuggestedPath,
+ zGetMessagesByMessageIdSuggestedResponse,
+ zGetMessagesQuery,
+ zGetMessagesResponse,
+ zGetMetaResponse,
+ zGetParametersResponse,
+ zGetRootResponse,
+ zGetSiteResponse,
+ zGetWorkflowByTaskIdEventsPath,
+ zGetWorkflowByTaskIdEventsQuery,
+ zGetWorkflowByTaskIdEventsResponse,
+ zGetWorkflowsLogsQuery,
+ zGetWorkflowsLogsResponse,
+ zGetWorkflowsRunByWorkflowRunIdPath,
+ zGetWorkflowsRunByWorkflowRunIdResponse,
+ zGetWorkspacesCurrentModelsModelTypesByModelTypePath,
+ zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse,
+ zPatchDatasetsByDatasetIdBody,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdPath,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdResponse,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdBody,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath,
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse,
+ zPatchDatasetsByDatasetIdDocumentsStatusByActionPath,
+ zPatchDatasetsByDatasetIdDocumentsStatusByActionResponse,
+ zPatchDatasetsByDatasetIdMetadataByMetadataIdBody,
+ zPatchDatasetsByDatasetIdMetadataByMetadataIdPath,
+ zPatchDatasetsByDatasetIdMetadataByMetadataIdResponse,
+ zPatchDatasetsByDatasetIdPath,
+ zPatchDatasetsByDatasetIdResponse,
+ zPatchDatasetsTagsBody,
+ zPatchDatasetsTagsResponse,
+ zPostAppsAnnotationReplyByActionBody,
+ zPostAppsAnnotationReplyByActionPath,
+ zPostAppsAnnotationReplyByActionResponse,
+ zPostAppsAnnotationsBody,
+ zPostAppsAnnotationsResponse,
+ zPostAudioToTextResponse,
+ zPostChatMessagesBody,
+ zPostChatMessagesByTaskIdStopPath,
+ zPostChatMessagesByTaskIdStopResponse,
+ zPostChatMessagesResponse,
+ zPostCompletionMessagesBody,
+ zPostCompletionMessagesByTaskIdStopPath,
+ zPostCompletionMessagesByTaskIdStopResponse,
+ zPostCompletionMessagesResponse,
+ zPostConversationsByCIdNameBody,
+ zPostConversationsByCIdNamePath,
+ zPostConversationsByCIdNameResponse,
+ zPostDatasetsBody,
+ zPostDatasetsByDatasetIdDocumentCreateByFile2Path,
+ zPostDatasetsByDatasetIdDocumentCreateByFile2Response,
+ zPostDatasetsByDatasetIdDocumentCreateByFilePath,
+ zPostDatasetsByDatasetIdDocumentCreateByFileResponse,
+ zPostDatasetsByDatasetIdDocumentCreateByText2Body,
+ zPostDatasetsByDatasetIdDocumentCreateByText2Path,
+ zPostDatasetsByDatasetIdDocumentCreateByText2Response,
+ zPostDatasetsByDatasetIdDocumentCreateByTextBody,
+ zPostDatasetsByDatasetIdDocumentCreateByTextPath,
+ zPostDatasetsByDatasetIdDocumentCreateByTextResponse,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBody,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdBody,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksBody,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Path,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Response,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFilePath,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponse,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Body,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Path,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Response,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextBody,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextPath,
+ zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponse,
+ zPostDatasetsByDatasetIdDocumentsDownloadZipBody,
+ zPostDatasetsByDatasetIdDocumentsDownloadZipPath,
+ zPostDatasetsByDatasetIdDocumentsDownloadZipResponse,
+ zPostDatasetsByDatasetIdDocumentsMetadataBody,
+ zPostDatasetsByDatasetIdDocumentsMetadataPath,
+ zPostDatasetsByDatasetIdDocumentsMetadataResponse,
+ zPostDatasetsByDatasetIdHitTestingBody,
+ zPostDatasetsByDatasetIdHitTestingPath,
+ zPostDatasetsByDatasetIdHitTestingResponse,
+ zPostDatasetsByDatasetIdMetadataBody,
+ zPostDatasetsByDatasetIdMetadataBuiltInByActionPath,
+ zPostDatasetsByDatasetIdMetadataBuiltInByActionResponse,
+ zPostDatasetsByDatasetIdMetadataPath,
+ zPostDatasetsByDatasetIdMetadataResponse,
+ zPostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunPath,
+ zPostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponse,
+ zPostDatasetsByDatasetIdPipelineRunPath,
+ zPostDatasetsByDatasetIdPipelineRunResponse,
+ zPostDatasetsByDatasetIdRetrieveBody,
+ zPostDatasetsByDatasetIdRetrievePath,
+ zPostDatasetsByDatasetIdRetrieveResponse,
+ zPostDatasetsPipelineFileUploadResponse,
+ zPostDatasetsResponse,
+ zPostDatasetsTagsBindingBody,
+ zPostDatasetsTagsBindingResponse,
+ zPostDatasetsTagsBody,
+ zPostDatasetsTagsResponse,
+ zPostDatasetsTagsUnbindingBody,
+ zPostDatasetsTagsUnbindingResponse,
+ zPostFilesUploadResponse,
+ zPostFormHumanInputByFormTokenBody,
+ zPostFormHumanInputByFormTokenPath,
+ zPostFormHumanInputByFormTokenResponse,
+ zPostMessagesByMessageIdFeedbacksBody,
+ zPostMessagesByMessageIdFeedbacksPath,
+ zPostMessagesByMessageIdFeedbacksResponse,
+ zPostTextToAudioBody,
+ zPostTextToAudioResponse,
+ zPostWorkflowsByWorkflowIdRunBody,
+ zPostWorkflowsByWorkflowIdRunPath,
+ zPostWorkflowsByWorkflowIdRunResponse,
+ zPostWorkflowsRunBody,
+ zPostWorkflowsRunResponse,
+ zPostWorkflowsTasksByTaskIdStopPath,
+ zPostWorkflowsTasksByTaskIdStopResponse,
+ zPutAppsAnnotationsByAnnotationIdBody,
+ zPutAppsAnnotationsByAnnotationIdPath,
+ zPutAppsAnnotationsByAnnotationIdResponse,
+ zPutConversationsByCIdVariablesByVariableIdBody,
+ zPutConversationsByCIdVariablesByVariableIdPath,
+ zPutConversationsByCIdVariablesByVariableIdResponse,
+} from './zod.gen'
+
+export const get = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRoot',
+ path: '/',
+ tags: ['service_api'],
+ })
+ .output(zGetRootResponse)
+
+export const root = {
+ get,
+}
+
+/**
+ * Get all feedbacks for the application
+ *
+ * Get all feedbacks for the application
+ * Returns paginated list of all feedback submitted for messages in this app.
+ */
+export const get2 = oc
+ .route({
+ description:
+ 'Get all feedbacks for the application\nReturns paginated list of all feedback submitted for messages in this app.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppFeedbacks',
+ path: '/app/feedbacks',
+ summary: 'Get all feedbacks for the application',
+ tags: ['service_api'],
+ })
+ .input(z.object({ query: zGetAppFeedbacksQuery.optional() }))
+ .output(zGetAppFeedbacksResponse)
+
+export const feedbacks = {
+ get: get2,
+}
+
+export const app = {
+ feedbacks,
+}
+
+/**
+ * Get the status of an annotation reply action job
+ *
+ * Get the status of an annotation reply action job
+ */
+export const get3 = oc
+ .route({
+ description: 'Get the status of an annotation reply action job',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsAnnotationReplyByActionStatusByJobId',
+ path: '/apps/annotation-reply/{action}/status/{job_id}',
+ summary: 'Get the status of an annotation reply action job',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetAppsAnnotationReplyByActionStatusByJobIdPath }))
+ .output(zGetAppsAnnotationReplyByActionStatusByJobIdResponse)
+
+export const byJobId = {
+ get: get3,
+}
+
+export const status = {
+ byJobId,
+}
+
+/**
+ * Enable or disable annotation reply feature
+ *
+ * Enable or disable annotation reply feature
+ */
+export const post = oc
+ .route({
+ description: 'Enable or disable annotation reply feature',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsAnnotationReplyByAction',
+ path: '/apps/annotation-reply/{action}',
+ summary: 'Enable or disable annotation reply feature',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostAppsAnnotationReplyByActionBody,
+ params: zPostAppsAnnotationReplyByActionPath,
+ }),
+ )
+ .output(zPostAppsAnnotationReplyByActionResponse)
+
+export const byAction = {
+ post,
+ status,
+}
+
+export const annotationReply = {
+ byAction,
+}
+
+/**
+ * Delete an annotation
+ *
+ * Delete an annotation
+ */
+export const delete_ = oc
+ .route({
+ description: 'Delete an annotation',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteAppsAnnotationsByAnnotationId',
+ path: '/apps/annotations/{annotation_id}',
+ successStatus: 204,
+ summary: 'Delete an annotation',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zDeleteAppsAnnotationsByAnnotationIdPath }))
+ .output(zDeleteAppsAnnotationsByAnnotationIdResponse)
+
+/**
+ * Update an existing annotation
+ *
+ * Update an existing annotation
+ */
+export const put = oc
+ .route({
+ description: 'Update an existing annotation',
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putAppsAnnotationsByAnnotationId',
+ path: '/apps/annotations/{annotation_id}',
+ summary: 'Update an existing annotation',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPutAppsAnnotationsByAnnotationIdBody,
+ params: zPutAppsAnnotationsByAnnotationIdPath,
+ }),
+ )
+ .output(zPutAppsAnnotationsByAnnotationIdResponse)
+
+export const byAnnotationId = {
+ delete: delete_,
+ put,
+}
+
+/**
+ * List annotations for the application
+ *
+ * List annotations for the application
+ */
+export const get4 = oc
+ .route({
+ description: 'List annotations for the application',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getAppsAnnotations',
+ path: '/apps/annotations',
+ summary: 'List annotations for the application',
+ tags: ['service_api'],
+ })
+ .output(zGetAppsAnnotationsResponse)
+
+/**
+ * Create a new annotation
+ *
+ * Create a new annotation
+ */
+export const post2 = oc
+ .route({
+ description: 'Create a new annotation',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAppsAnnotations',
+ path: '/apps/annotations',
+ successStatus: 201,
+ summary: 'Create a new annotation',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPostAppsAnnotationsBody }))
+ .output(zPostAppsAnnotationsResponse)
+
+export const annotations = {
+ get: get4,
+ post: post2,
+ byAnnotationId,
+}
+
+export const apps = {
+ annotationReply,
+ annotations,
+}
+
+/**
+ * Convert audio to text using speech-to-text
+ *
+ * Convert audio to text using speech-to-text
+ * Accepts an audio file upload and returns the transcribed text.
+ */
+export const post3 = oc
+ .route({
+ description:
+ 'Convert audio to text using speech-to-text\nAccepts an audio file upload and returns the transcribed text.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAudioToText',
+ path: '/audio-to-text',
+ summary: 'Convert audio to text using speech-to-text',
+ tags: ['service_api'],
+ })
+ .output(zPostAudioToTextResponse)
+
+export const audioToText = {
+ post: post3,
+}
+
+/**
+ * Stop a running chat message generation
+ *
+ * Stop a running chat message generation
+ */
+export const post4 = oc
+ .route({
+ description: 'Stop a running chat message generation',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postChatMessagesByTaskIdStop',
+ path: '/chat-messages/{task_id}/stop',
+ summary: 'Stop a running chat message generation',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostChatMessagesByTaskIdStopPath }))
+ .output(zPostChatMessagesByTaskIdStopResponse)
+
+export const stop = {
+ post: post4,
+}
+
+export const byTaskId = {
+ stop,
+}
+
+/**
+ * Send a message in a chat conversation
+ *
+ * Send a message in a chat conversation
+ * This endpoint handles chat messages for chat, agent chat, and advanced chat applications.
+ * Supports conversation management and both blocking and streaming response modes.
+ */
+export const post5 = oc
+ .route({
+ description:
+ 'Send a message in a chat conversation\nThis endpoint handles chat messages for chat, agent chat, and advanced chat applications.\nSupports conversation management and both blocking and streaming response modes.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postChatMessages',
+ path: '/chat-messages',
+ summary: 'Send a message in a chat conversation',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPostChatMessagesBody }))
+ .output(zPostChatMessagesResponse)
+
+export const chatMessages = {
+ post: post5,
+ byTaskId,
+}
+
+/**
+ * Stop a running completion task
+ *
+ * Stop a running completion task
+ */
+export const post6 = oc
+ .route({
+ description: 'Stop a running completion task',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postCompletionMessagesByTaskIdStop',
+ path: '/completion-messages/{task_id}/stop',
+ summary: 'Stop a running completion task',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostCompletionMessagesByTaskIdStopPath }))
+ .output(zPostCompletionMessagesByTaskIdStopResponse)
+
+export const stop2 = {
+ post: post6,
+}
+
+export const byTaskId2 = {
+ stop: stop2,
+}
+
+/**
+ * Create a completion for the given prompt
+ *
+ * Create a completion for the given prompt
+ * This endpoint generates a completion based on the provided inputs and query.
+ * Supports both blocking and streaming response modes.
+ */
+export const post7 = oc
+ .route({
+ description:
+ 'Create a completion for the given prompt\nThis endpoint generates a completion based on the provided inputs and query.\nSupports both blocking and streaming response modes.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postCompletionMessages',
+ path: '/completion-messages',
+ summary: 'Create a completion for the given prompt',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPostCompletionMessagesBody }))
+ .output(zPostCompletionMessagesResponse)
+
+export const completionMessages = {
+ post: post7,
+ byTaskId: byTaskId2,
+}
+
+/**
+ * Rename a conversation or auto-generate a name
+ *
+ * Rename a conversation or auto-generate a name
+ */
+export const post8 = oc
+ .route({
+ description: 'Rename a conversation or auto-generate a name',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postConversationsByCIdName',
+ path: '/conversations/{c_id}/name',
+ summary: 'Rename a conversation or auto-generate a name',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({ body: zPostConversationsByCIdNameBody, params: zPostConversationsByCIdNamePath }),
+ )
+ .output(zPostConversationsByCIdNameResponse)
+
+export const name = {
+ post: post8,
+}
+
+/**
+ * Update a conversation variable's value
+ *
+ * Update a conversation variable's value
+ * Allows updating the value of a specific conversation variable.
+ * The value must match the variable's expected type.
+ */
+export const put2 = oc
+ .route({
+ description:
+ 'Update a conversation variable\'s value\nAllows updating the value of a specific conversation variable.\nThe value must match the variable\'s expected type.',
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'putConversationsByCIdVariablesByVariableId',
+ path: '/conversations/{c_id}/variables/{variable_id}',
+ summary: 'Update a conversation variable\'s value',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPutConversationsByCIdVariablesByVariableIdBody,
+ params: zPutConversationsByCIdVariablesByVariableIdPath,
+ }),
+ )
+ .output(zPutConversationsByCIdVariablesByVariableIdResponse)
+
+export const byVariableId = {
+ put: put2,
+}
+
+/**
+ * List all variables for a conversation
+ *
+ * List all variables for a conversation
+ * Conversational variables are only available for chat applications.
+ */
+export const get5 = oc
+ .route({
+ description:
+ 'List all variables for a conversation\nConversational variables are only available for chat applications.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getConversationsByCIdVariables',
+ path: '/conversations/{c_id}/variables',
+ summary: 'List all variables for a conversation',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ params: zGetConversationsByCIdVariablesPath,
+ query: zGetConversationsByCIdVariablesQuery.optional(),
+ }),
+ )
+ .output(zGetConversationsByCIdVariablesResponse)
+
+export const variables = {
+ get: get5,
+ byVariableId,
+}
+
+/**
+ * Delete a specific conversation
+ *
+ * Delete a specific conversation
+ */
+export const delete2 = oc
+ .route({
+ description: 'Delete a specific conversation',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteConversationsByCId',
+ path: '/conversations/{c_id}',
+ successStatus: 204,
+ summary: 'Delete a specific conversation',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zDeleteConversationsByCIdPath }))
+ .output(zDeleteConversationsByCIdResponse)
+
+export const byCId = {
+ delete: delete2,
+ name,
+ variables,
+}
+
+/**
+ * List all conversations for the current user
+ *
+ * List all conversations for the current user
+ * Supports pagination using last_id and limit parameters.
+ */
+export const get6 = oc
+ .route({
+ description:
+ 'List all conversations for the current user\nSupports pagination using last_id and limit parameters.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getConversations',
+ path: '/conversations',
+ summary: 'List all conversations for the current user',
+ tags: ['service_api'],
+ })
+ .input(z.object({ query: zGetConversationsQuery.optional() }))
+ .output(zGetConversationsResponse)
+
+export const conversations = {
+ get: get6,
+ byCId,
+}
+
+/**
+ * Upload a file for use in conversations
+ *
+ * Upload a file to a knowledgebase pipeline
+ * Accepts a single file upload via multipart/form-data.
+ */
+export const post9 = oc
+ .route({
+ description:
+ 'Upload a file to a knowledgebase pipeline\nAccepts a single file upload via multipart/form-data.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsPipelineFileUpload',
+ path: '/datasets/pipeline/file-upload',
+ successStatus: 201,
+ summary: 'Upload a file for use in conversations',
+ tags: ['service_api'],
+ })
+ .output(zPostDatasetsPipelineFileUploadResponse)
+
+export const fileUpload = {
+ post: post9,
+}
+
+export const pipeline = {
+ fileUpload,
+}
+
+/**
+ * Bind tags to a dataset
+ */
+export const post10 = oc
+ .route({
+ description: 'Bind tags to a dataset',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsTagsBinding',
+ path: '/datasets/tags/binding',
+ successStatus: 204,
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPostDatasetsTagsBindingBody }))
+ .output(zPostDatasetsTagsBindingResponse)
+
+export const binding = {
+ post: post10,
+}
+
+/**
+ * Unbind a tag from a dataset
+ */
+export const post11 = oc
+ .route({
+ description: 'Unbind a tag from a dataset',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsTagsUnbinding',
+ path: '/datasets/tags/unbinding',
+ successStatus: 204,
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPostDatasetsTagsUnbindingBody }))
+ .output(zPostDatasetsTagsUnbindingResponse)
+
+export const unbinding = {
+ post: post11,
+}
+
+/**
+ * Delete a knowledge type tag
+ *
+ * Delete a knowledge type tag
+ */
+export const delete3 = oc
+ .route({
+ description: 'Delete a knowledge type tag',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsTags',
+ path: '/datasets/tags',
+ successStatus: 204,
+ summary: 'Delete a knowledge type tag',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zDeleteDatasetsTagsBody }))
+ .output(zDeleteDatasetsTagsResponse)
+
+/**
+ * Get all knowledge type tags
+ *
+ * Get all knowledge type tags
+ */
+export const get7 = oc
+ .route({
+ description: 'Get all knowledge type tags',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsTags',
+ path: '/datasets/tags',
+ summary: 'Get all knowledge type tags',
+ tags: ['service_api'],
+ })
+ .output(zGetDatasetsTagsResponse)
+
+/**
+ * Update a knowledge type tag
+ */
+export const patch = oc
+ .route({
+ description: 'Update a knowledge type tag',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsTags',
+ path: '/datasets/tags',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPatchDatasetsTagsBody }))
+ .output(zPatchDatasetsTagsResponse)
+
+/**
+ * Add a knowledge type tag
+ *
+ * Add a knowledge type tag
+ */
+export const post12 = oc
+ .route({
+ description: 'Add a knowledge type tag',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsTags',
+ path: '/datasets/tags',
+ summary: 'Add a knowledge type tag',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPostDatasetsTagsBody }))
+ .output(zPostDatasetsTagsResponse)
+
+export const tags = {
+ delete: delete3,
+ get: get7,
+ patch,
+ post: post12,
+ binding,
+ unbinding,
+}
+
+/**
+ * Create a new document by uploading a file
+ */
+export const post13 = oc
+ .route({
+ description: 'Create a new document by uploading a file',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentCreateByFile',
+ path: '/datasets/{dataset_id}/document/create-by-file',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostDatasetsByDatasetIdDocumentCreateByFilePath }))
+ .output(zPostDatasetsByDatasetIdDocumentCreateByFileResponse)
+
+/**
+ * Create a new document by uploading a file
+ */
+export const post14 = oc
+ .route({
+ description: 'Create a new document by uploading a file',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentCreateByFile',
+ path: '/datasets/{dataset_id}/document/create_by_file',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostDatasetsByDatasetIdDocumentCreateByFile2Path }))
+ .output(zPostDatasetsByDatasetIdDocumentCreateByFile2Response)
+
+export const createByFile = {
+ post: post14,
+}
+
+/**
+ * Create a new document by providing text content
+ */
+export const post15 = oc
+ .route({
+ description: 'Create a new document by providing text content',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentCreateByText',
+ path: '/datasets/{dataset_id}/document/create-by-text',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentCreateByTextBody,
+ params: zPostDatasetsByDatasetIdDocumentCreateByTextPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentCreateByTextResponse)
+
+/**
+ * Deprecated legacy alias for creating a new document by providing text content. Use /datasets/{dataset_id}/document/create-by-text instead.
+ *
+ * @deprecated
+ */
+export const post16 = oc
+ .route({
+ deprecated: true,
+ description:
+ 'Deprecated legacy alias for creating a new document by providing text content. Use /datasets/{dataset_id}/document/create-by-text instead.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentCreateByText',
+ path: '/datasets/{dataset_id}/document/create_by_text',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentCreateByText2Body,
+ params: zPostDatasetsByDatasetIdDocumentCreateByText2Path,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentCreateByText2Response)
+
+export const createByText = {
+ post: post16,
+}
+
+export const document_ = {
+ createByFile,
+ createByText,
+}
+
+/**
+ * Download selected uploaded documents as a single ZIP archive
+ */
+export const post17 = oc
+ .route({
+ description: 'Download selected uploaded documents as a single ZIP archive',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsDownloadZip',
+ path: '/datasets/{dataset_id}/documents/download-zip',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsDownloadZipBody,
+ params: zPostDatasetsByDatasetIdDocumentsDownloadZipPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsDownloadZipResponse)
+
+export const downloadZip = {
+ post: post17,
+}
+
+/**
+ * Update metadata for multiple documents
+ *
+ * Update metadata for multiple documents
+ */
+export const post18 = oc
+ .route({
+ description: 'Update metadata for multiple documents',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsMetadata',
+ path: '/datasets/{dataset_id}/documents/metadata',
+ summary: 'Update metadata for multiple documents',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsMetadataBody,
+ params: zPostDatasetsByDatasetIdDocumentsMetadataPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsMetadataResponse)
+
+export const metadata = {
+ post: post18,
+}
+
+/**
+ * Batch update document status
+ *
+ * Batch update document status
+ * Args:
+ * tenant_id: tenant id
+ * dataset_id: dataset id
+ * action: action to perform (Literal["enable", "disable", "archive", "un_archive"])
+ *
+ * Returns:
+ * dict: A dictionary with a key 'result' and a value 'success'
+ * int: HTTP status code 200 indicating that the operation was successful.
+ *
+ * Raises:
+ * NotFound: If the dataset with the given ID does not exist.
+ * Forbidden: If the user does not have permission.
+ * InvalidActionError: If the action is invalid or cannot be performed.
+ */
+export const patch2 = oc
+ .route({
+ description:
+ 'Batch update document status\nArgs:\n tenant_id: tenant id\n dataset_id: dataset id\n action: action to perform (Literal["enable", "disable", "archive", "un_archive"])\n\nReturns:\n dict: A dictionary with a key \'result\' and a value \'success\'\n int: HTTP status code 200 indicating that the operation was successful.\n\nRaises:\n NotFound: If the dataset with the given ID does not exist.\n Forbidden: If the user does not have permission.\n InvalidActionError: If the action is invalid or cannot be performed.',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdDocumentsStatusByAction',
+ path: '/datasets/{dataset_id}/documents/status/{action}',
+ summary: 'Batch update document status',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPatchDatasetsByDatasetIdDocumentsStatusByActionPath }))
+ .output(zPatchDatasetsByDatasetIdDocumentsStatusByActionResponse)
+
+export const byAction2 = {
+ patch: patch2,
+}
+
+export const status2 = {
+ byAction: byAction2,
+}
+
+/**
+ * Get indexing status for documents in a batch
+ */
+export const get8 = oc
+ .route({
+ description: 'Get indexing status for documents in a batch',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByBatchIndexingStatus',
+ path: '/datasets/{dataset_id}/documents/{batch}/indexing-status',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByBatchIndexingStatusPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponse)
+
+export const indexingStatus = {
+ get: get8,
+}
+
+export const byBatch = {
+ indexingStatus,
+}
+
+/**
+ * Get a signed download URL for a document's original uploaded file
+ */
+export const get9 = oc
+ .route({
+ description: 'Get a signed download URL for a document\'s original uploaded file',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdDownload',
+ path: '/datasets/{dataset_id}/documents/{document_id}/download',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponse)
+
+export const download = {
+ get: get9,
+}
+
+/**
+ * Delete a specific child chunk
+ */
+export const delete4 = oc
+ .route({
+ description: 'Delete a specific child chunk',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId:
+ 'deleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkId',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}',
+ successStatus: 204,
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ params:
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath,
+ }),
+ )
+ .output(
+ zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse,
+ )
+
+/**
+ * Update a specific child chunk
+ */
+export const patch3 = oc
+ .route({
+ description: 'Update a specific child chunk',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId:
+ 'patchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkId',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdBody,
+ params:
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath,
+ }),
+ )
+ .output(
+ zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse,
+ )
+
+export const byChildChunkId = {
+ delete: delete4,
+ patch: patch3,
+}
+
+/**
+ * List child chunks for a segment
+ */
+export const get10 = oc
+ .route({
+ description: 'List child chunks for a segment',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunks',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ query:
+ zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksQuery.optional(),
+ }),
+ )
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse)
+
+/**
+ * Create a new child chunk for a segment
+ */
+export const post19 = oc
+ .route({
+ description: 'Create a new child chunk for a segment',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunks',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksBody,
+ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse)
+
+export const childChunks = {
+ get: get10,
+ post: post19,
+ byChildChunkId,
+}
+
+/**
+ * Delete a specific segment
+ */
+export const delete5 = oc
+ .route({
+ description: 'Delete a specific segment',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}',
+ successStatus: 204,
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({ params: zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath }),
+ )
+ .output(zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse)
+
+/**
+ * Get a specific segment by ID
+ */
+export const get11 = oc
+ .route({
+ description: 'Get a specific segment by ID',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse)
+
+/**
+ * Update a specific segment
+ */
+export const post20 = oc
+ .route({
+ description: 'Update a specific segment',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdBody,
+ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse)
+
+export const bySegmentId = {
+ delete: delete5,
+ get: get11,
+ post: post20,
+ childChunks,
+}
+
+/**
+ * List segments in a document
+ */
+export const get12 = oc
+ .route({
+ description: 'List segments in a document',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentIdSegments',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath,
+ query: zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsQuery.optional(),
+ }),
+ )
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse)
+
+/**
+ * Create segments in a document
+ */
+export const post21 = oc
+ .route({
+ description: 'Create segments in a document',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdSegments',
+ path: '/datasets/{dataset_id}/documents/{document_id}/segments',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBody,
+ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse)
+
+export const segments = {
+ get: get12,
+ post: post21,
+ bySegmentId,
+}
+
+/**
+ * Deprecated legacy alias for updating an existing document by uploading a file. Use PATCH /datasets/{dataset_id}/documents/{document_id} instead.
+ *
+ * @deprecated
+ */
+export const post22 = oc
+ .route({
+ deprecated: true,
+ description:
+ 'Deprecated legacy alias for updating an existing document by uploading a file. Use PATCH /datasets/{dataset_id}/documents/{document_id} instead.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile',
+ path: '/datasets/{dataset_id}/documents/{document_id}/update-by-file',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFilePath }))
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponse)
+
+/**
+ * Deprecated legacy alias for updating an existing document by uploading a file. Use PATCH /datasets/{dataset_id}/documents/{document_id} instead.
+ *
+ * @deprecated
+ */
+export const post23 = oc
+ .route({
+ deprecated: true,
+ description:
+ 'Deprecated legacy alias for updating an existing document by uploading a file. Use PATCH /datasets/{dataset_id}/documents/{document_id} instead.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile',
+ path: '/datasets/{dataset_id}/documents/{document_id}/update_by_file',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Path }))
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Response)
+
+export const updateByFile = {
+ post: post23,
+}
+
+/**
+ * Update an existing document by providing text content
+ */
+export const post24 = oc
+ .route({
+ description: 'Update an existing document by providing text content',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText',
+ path: '/datasets/{dataset_id}/documents/{document_id}/update-by-text',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextBody,
+ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponse)
+
+/**
+ * Deprecated legacy alias for updating an existing document by providing text content. Use /datasets/{dataset_id}/documents/{document_id}/update-by-text instead.
+ *
+ * @deprecated
+ */
+export const post25 = oc
+ .route({
+ deprecated: true,
+ description:
+ 'Deprecated legacy alias for updating an existing document by providing text content. Use /datasets/{dataset_id}/documents/{document_id}/update-by-text instead.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText',
+ path: '/datasets/{dataset_id}/documents/{document_id}/update_by_text',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Body,
+ params: zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Path,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Response)
+
+export const updateByText = {
+ post: post25,
+}
+
+/**
+ * Delete document
+ *
+ * Delete a document
+ */
+export const delete6 = oc
+ .route({
+ description: 'Delete a document',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetIdDocumentsByDocumentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}',
+ successStatus: 204,
+ summary: 'Delete document',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zDeleteDatasetsByDatasetIdDocumentsByDocumentIdPath }))
+ .output(zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse)
+
+/**
+ * Get a specific document by ID
+ */
+export const get13 = oc
+ .route({
+ description: 'Get a specific document by ID',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocumentsByDocumentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsByDocumentIdPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsByDocumentIdResponse)
+
+/**
+ * Update an existing document by uploading a file
+ */
+export const patch4 = oc
+ .route({
+ description: 'Update an existing document by uploading a file',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdDocumentsByDocumentId',
+ path: '/datasets/{dataset_id}/documents/{document_id}',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPatchDatasetsByDatasetIdDocumentsByDocumentIdPath }))
+ .output(zPatchDatasetsByDatasetIdDocumentsByDocumentIdResponse)
+
+export const byDocumentId = {
+ delete: delete6,
+ get: get13,
+ patch: patch4,
+ download,
+ segments,
+ updateByFile,
+ updateByText,
+}
+
+/**
+ * List all documents in a dataset
+ */
+export const get14 = oc
+ .route({
+ description: 'List all documents in a dataset',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdDocuments',
+ path: '/datasets/{dataset_id}/documents',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdDocumentsPath }))
+ .output(zGetDatasetsByDatasetIdDocumentsResponse)
+
+export const documents = {
+ get: get14,
+ downloadZip,
+ metadata,
+ status: status2,
+ byBatch,
+ byDocumentId,
+}
+
+/**
+ * Perform hit testing on a dataset
+ *
+ * Perform hit testing on a dataset
+ * Tests retrieval performance for the specified dataset.
+ */
+export const post26 = oc
+ .route({
+ description:
+ 'Perform hit testing on a dataset\nTests retrieval performance for the specified dataset.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdHitTesting',
+ path: '/datasets/{dataset_id}/hit-testing',
+ summary: 'Perform hit testing on a dataset',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdHitTestingBody,
+ params: zPostDatasetsByDatasetIdHitTestingPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdHitTestingResponse)
+
+export const hitTesting = {
+ post: post26,
+}
+
+/**
+ * Enable or disable built-in metadata field
+ *
+ * Enable or disable built-in metadata field
+ */
+export const post27 = oc
+ .route({
+ description: 'Enable or disable built-in metadata field',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdMetadataBuiltInByAction',
+ path: '/datasets/{dataset_id}/metadata/built-in/{action}',
+ summary: 'Enable or disable built-in metadata field',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostDatasetsByDatasetIdMetadataBuiltInByActionPath }))
+ .output(zPostDatasetsByDatasetIdMetadataBuiltInByActionResponse)
+
+export const byAction3 = {
+ post: post27,
+}
+
+/**
+ * Get all built-in metadata fields
+ *
+ * Get all built-in metadata fields
+ */
+export const get15 = oc
+ .route({
+ description: 'Get all built-in metadata fields',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdMetadataBuiltIn',
+ path: '/datasets/{dataset_id}/metadata/built-in',
+ summary: 'Get all built-in metadata fields',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdMetadataBuiltInPath }))
+ .output(zGetDatasetsByDatasetIdMetadataBuiltInResponse)
+
+export const builtIn = {
+ get: get15,
+ byAction: byAction3,
+}
+
+/**
+ * Delete metadata
+ *
+ * Delete metadata
+ */
+export const delete7 = oc
+ .route({
+ description: 'Delete metadata',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetIdMetadataByMetadataId',
+ path: '/datasets/{dataset_id}/metadata/{metadata_id}',
+ successStatus: 204,
+ summary: 'Delete metadata',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zDeleteDatasetsByDatasetIdMetadataByMetadataIdPath }))
+ .output(zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse)
+
+/**
+ * Update metadata name
+ *
+ * Update metadata name
+ */
+export const patch5 = oc
+ .route({
+ description: 'Update metadata name',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetIdMetadataByMetadataId',
+ path: '/datasets/{dataset_id}/metadata/{metadata_id}',
+ summary: 'Update metadata name',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPatchDatasetsByDatasetIdMetadataByMetadataIdBody,
+ params: zPatchDatasetsByDatasetIdMetadataByMetadataIdPath,
+ }),
+ )
+ .output(zPatchDatasetsByDatasetIdMetadataByMetadataIdResponse)
+
+export const byMetadataId = {
+ delete: delete7,
+ patch: patch5,
+}
+
+/**
+ * Get all metadata for a dataset
+ *
+ * Get all metadata for a dataset
+ */
+export const get16 = oc
+ .route({
+ description: 'Get all metadata for a dataset',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdMetadata',
+ path: '/datasets/{dataset_id}/metadata',
+ summary: 'Get all metadata for a dataset',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdMetadataPath }))
+ .output(zGetDatasetsByDatasetIdMetadataResponse)
+
+/**
+ * Create metadata for a dataset
+ *
+ * Create metadata for a dataset
+ */
+export const post28 = oc
+ .route({
+ description: 'Create metadata for a dataset',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdMetadata',
+ path: '/datasets/{dataset_id}/metadata',
+ successStatus: 201,
+ summary: 'Create metadata for a dataset',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdMetadataBody,
+ params: zPostDatasetsByDatasetIdMetadataPath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdMetadataResponse)
+
+export const metadata2 = {
+ get: get16,
+ post: post28,
+ builtIn,
+ byMetadataId,
+}
+
+/**
+ * Resource for getting datasource plugins
+ *
+ * List all datasource plugins for a rag pipeline
+ */
+export const get17 = oc
+ .route({
+ description: 'List all datasource plugins for a rag pipeline',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdPipelineDatasourcePlugins',
+ path: '/datasets/{dataset_id}/pipeline/datasource-plugins',
+ summary: 'Resource for getting datasource plugins',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ params: zGetDatasetsByDatasetIdPipelineDatasourcePluginsPath,
+ query: zGetDatasetsByDatasetIdPipelineDatasourcePluginsQuery.optional(),
+ }),
+ )
+ .output(zGetDatasetsByDatasetIdPipelineDatasourcePluginsResponse)
+
+export const datasourcePlugins = {
+ get: get17,
+}
+
+/**
+ * Resource for getting datasource plugins
+ *
+ * Run a datasource node for a rag pipeline
+ */
+export const post29 = oc
+ .route({
+ description: 'Run a datasource node for a rag pipeline',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRun',
+ path: '/datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run',
+ summary: 'Resource for getting datasource plugins',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunPath }))
+ .output(zPostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponse)
+
+export const run = {
+ post: post29,
+}
+
+export const byNodeId = {
+ run,
+}
+
+export const nodes = {
+ byNodeId,
+}
+
+export const datasource = {
+ nodes,
+}
+
+/**
+ * Resource for running a rag pipeline
+ *
+ * Run a datasource node for a rag pipeline
+ */
+export const post30 = oc
+ .route({
+ description: 'Run a datasource node for a rag pipeline',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdPipelineRun',
+ path: '/datasets/{dataset_id}/pipeline/run',
+ summary: 'Resource for running a rag pipeline',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostDatasetsByDatasetIdPipelineRunPath }))
+ .output(zPostDatasetsByDatasetIdPipelineRunResponse)
+
+export const run2 = {
+ post: post30,
+}
+
+export const pipeline2 = {
+ datasourcePlugins,
+ datasource,
+ run: run2,
+}
+
+/**
+ * Perform hit testing on a dataset
+ *
+ * Perform hit testing on a dataset
+ * Tests retrieval performance for the specified dataset.
+ */
+export const post31 = oc
+ .route({
+ description:
+ 'Perform hit testing on a dataset\nTests retrieval performance for the specified dataset.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasetsByDatasetIdRetrieve',
+ path: '/datasets/{dataset_id}/retrieve',
+ summary: 'Perform hit testing on a dataset',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostDatasetsByDatasetIdRetrieveBody,
+ params: zPostDatasetsByDatasetIdRetrievePath,
+ }),
+ )
+ .output(zPostDatasetsByDatasetIdRetrieveResponse)
+
+export const retrieve = {
+ post: post31,
+}
+
+/**
+ * Get all knowledge type tags
+ *
+ * Get tags bound to a specific dataset
+ */
+export const get18 = oc
+ .route({
+ description: 'Get tags bound to a specific dataset',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetIdTags',
+ path: '/datasets/{dataset_id}/tags',
+ summary: 'Get all knowledge type tags',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdTagsPath }))
+ .output(zGetDatasetsByDatasetIdTagsResponse)
+
+export const tags2 = {
+ get: get18,
+}
+
+/**
+ * Deletes a dataset given its ID
+ *
+ * Delete a dataset
+ * Args:
+ * _: ignore
+ * dataset_id (UUID): The ID of the dataset to be deleted.
+ *
+ * Returns:
+ * dict: A dictionary with a key 'result' and a value 'success'
+ * if the dataset was successfully deleted. Omitted in HTTP response.
+ * int: HTTP status code 204 indicating that the operation was successful.
+ *
+ * Raises:
+ * NotFound: If the dataset with the given ID does not exist.
+ */
+export const delete8 = oc
+ .route({
+ description:
+ 'Delete a dataset\nArgs:\n _: ignore\n dataset_id (UUID): The ID of the dataset to be deleted.\n\nReturns:\n dict: A dictionary with a key \'result\' and a value \'success\'\n if the dataset was successfully deleted. Omitted in HTTP response.\n int: HTTP status code 204 indicating that the operation was successful.\n\nRaises:\n NotFound: If the dataset with the given ID does not exist.',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteDatasetsByDatasetId',
+ path: '/datasets/{dataset_id}',
+ successStatus: 204,
+ summary: 'Deletes a dataset given its ID',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zDeleteDatasetsByDatasetIdPath }))
+ .output(zDeleteDatasetsByDatasetIdResponse)
+
+/**
+ * Get a specific dataset by ID
+ */
+export const get19 = oc
+ .route({
+ description: 'Get a specific dataset by ID',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasetsByDatasetId',
+ path: '/datasets/{dataset_id}',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetDatasetsByDatasetIdPath }))
+ .output(zGetDatasetsByDatasetIdResponse)
+
+/**
+ * Update an existing dataset
+ */
+export const patch6 = oc
+ .route({
+ description: 'Update an existing dataset',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchDatasetsByDatasetId',
+ path: '/datasets/{dataset_id}',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPatchDatasetsByDatasetIdBody, params: zPatchDatasetsByDatasetIdPath }))
+ .output(zPatchDatasetsByDatasetIdResponse)
+
+export const byDatasetId = {
+ delete: delete8,
+ get: get19,
+ patch: patch6,
+ document: document_,
+ documents,
+ hitTesting,
+ metadata: metadata2,
+ pipeline: pipeline2,
+ retrieve,
+ tags: tags2,
+}
+
+/**
+ * Resource for getting datasets
+ *
+ * List all datasets
+ */
+export const get20 = oc
+ .route({
+ description: 'List all datasets',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getDatasets',
+ path: '/datasets',
+ summary: 'Resource for getting datasets',
+ tags: ['service_api'],
+ })
+ .output(zGetDatasetsResponse)
+
+/**
+ * Resource for creating datasets
+ *
+ * Create a new dataset
+ */
+export const post32 = oc
+ .route({
+ description: 'Create a new dataset',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postDatasets',
+ path: '/datasets',
+ summary: 'Resource for creating datasets',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPostDatasetsBody }))
+ .output(zPostDatasetsResponse)
+
+export const datasets = {
+ get: get20,
+ post: post32,
+ pipeline,
+ tags,
+ byDatasetId,
+}
+
+/**
+ * Get end user detail
+ *
+ * Get an end user by ID
+ * This endpoint is scoped to the current app token's tenant/app to prevent
+ * cross-tenant/app access when an end-user ID is known.
+ */
+export const get21 = oc
+ .route({
+ description:
+ 'Get an end user by ID\nThis endpoint is scoped to the current app token\'s tenant/app to prevent\ncross-tenant/app access when an end-user ID is known.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getEndUsersByEndUserId',
+ path: '/end-users/{end_user_id}',
+ summary: 'Get end user detail',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetEndUsersByEndUserIdPath }))
+ .output(zGetEndUsersByEndUserIdResponse)
+
+export const byEndUserId = {
+ get: get21,
+}
+
+export const endUsers = {
+ byEndUserId,
+}
+
+/**
+ * Upload a file for use in conversations
+ *
+ * Upload a file for use in conversations
+ * Accepts a single file upload via multipart/form-data.
+ */
+export const post33 = oc
+ .route({
+ description:
+ 'Upload a file for use in conversations\nAccepts a single file upload via multipart/form-data.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postFilesUpload',
+ path: '/files/upload',
+ successStatus: 201,
+ summary: 'Upload a file for use in conversations',
+ tags: ['service_api'],
+ })
+ .output(zPostFilesUploadResponse)
+
+export const upload = {
+ post: post33,
+}
+
+/**
+ * Preview/Download a file that was uploaded via Service API
+ *
+ * Preview or download a file uploaded via Service API
+ * Provides secure file preview/download functionality.
+ * Files can only be accessed if they belong to messages within the requesting app's context.
+ */
+export const get22 = oc
+ .route({
+ description:
+ 'Preview or download a file uploaded via Service API\nProvides secure file preview/download functionality.\nFiles can only be accessed if they belong to messages within the requesting app\'s context.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getFilesByFileIdPreview',
+ path: '/files/{file_id}/preview',
+ summary: 'Preview/Download a file that was uploaded via Service API',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ params: zGetFilesByFileIdPreviewPath,
+ query: zGetFilesByFileIdPreviewQuery.optional(),
+ }),
+ )
+ .output(zGetFilesByFileIdPreviewResponse)
+
+export const preview = {
+ get: get22,
+}
+
+export const byFileId = {
+ preview,
+}
+
+export const files = {
+ upload,
+ byFileId,
+}
+
+/**
+ * Get a paused human input form by token
+ */
+export const get23 = oc
+ .route({
+ description: 'Get a paused human input form by token',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getFormHumanInputByFormToken',
+ path: '/form/human_input/{form_token}',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetFormHumanInputByFormTokenPath }))
+ .output(zGetFormHumanInputByFormTokenResponse)
+
+/**
+ * Submit a paused human input form by token
+ */
+export const post34 = oc
+ .route({
+ description: 'Submit a paused human input form by token',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postFormHumanInputByFormToken',
+ path: '/form/human_input/{form_token}',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostFormHumanInputByFormTokenBody,
+ params: zPostFormHumanInputByFormTokenPath,
+ }),
+ )
+ .output(zPostFormHumanInputByFormTokenResponse)
+
+export const byFormToken = {
+ get: get23,
+ post: post34,
+}
+
+export const humanInput = {
+ byFormToken,
+}
+
+export const form = {
+ humanInput,
+}
+
+/**
+ * Get app information
+ *
+ * Get basic application information
+ * Returns basic information about the application including name, description, tags, and mode.
+ */
+export const get24 = oc
+ .route({
+ description:
+ 'Get basic application information\nReturns basic information about the application including name, description, tags, and mode.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getInfo',
+ path: '/info',
+ summary: 'Get app information',
+ tags: ['service_api'],
+ })
+ .output(zGetInfoResponse)
+
+export const info = {
+ get: get24,
+}
+
+/**
+ * Submit feedback for a message
+ *
+ * Submit feedback for a message
+ * Allows users to rate messages as like/dislike and provide optional feedback content.
+ */
+export const post35 = oc
+ .route({
+ description:
+ 'Submit feedback for a message\nAllows users to rate messages as like/dislike and provide optional feedback content.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postMessagesByMessageIdFeedbacks',
+ path: '/messages/{message_id}/feedbacks',
+ summary: 'Submit feedback for a message',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostMessagesByMessageIdFeedbacksBody,
+ params: zPostMessagesByMessageIdFeedbacksPath,
+ }),
+ )
+ .output(zPostMessagesByMessageIdFeedbacksResponse)
+
+export const feedbacks2 = {
+ post: post35,
+}
+
+/**
+ * Get suggested follow-up questions for a message
+ *
+ * Get suggested follow-up questions for a message
+ * Returns AI-generated follow-up questions based on the message content.
+ */
+export const get25 = oc
+ .route({
+ description:
+ 'Get suggested follow-up questions for a message\nReturns AI-generated follow-up questions based on the message content.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getMessagesByMessageIdSuggested',
+ path: '/messages/{message_id}/suggested',
+ summary: 'Get suggested follow-up questions for a message',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetMessagesByMessageIdSuggestedPath }))
+ .output(zGetMessagesByMessageIdSuggestedResponse)
+
+export const suggested = {
+ get: get25,
+}
+
+export const byMessageId = {
+ feedbacks: feedbacks2,
+ suggested,
+}
+
+/**
+ * List messages in a conversation
+ *
+ * List messages in a conversation
+ * Retrieves messages with pagination support using first_id.
+ */
+export const get26 = oc
+ .route({
+ description:
+ 'List messages in a conversation\nRetrieves messages with pagination support using first_id.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getMessages',
+ path: '/messages',
+ summary: 'List messages in a conversation',
+ tags: ['service_api'],
+ })
+ .input(z.object({ query: zGetMessagesQuery }))
+ .output(zGetMessagesResponse)
+
+export const messages = {
+ get: get26,
+ byMessageId,
+}
+
+/**
+ * Get app metadata
+ *
+ * Get application metadata
+ * Returns metadata about the application including configuration and settings.
+ */
+export const get27 = oc
+ .route({
+ description:
+ 'Get application metadata\nReturns metadata about the application including configuration and settings.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getMeta',
+ path: '/meta',
+ summary: 'Get app metadata',
+ tags: ['service_api'],
+ })
+ .output(zGetMetaResponse)
+
+export const meta = {
+ get: get27,
+}
+
+/**
+ * Retrieve app parameters
+ *
+ * Retrieve application input parameters and configuration
+ * Returns the input form parameters and configuration for the application.
+ */
+export const get28 = oc
+ .route({
+ description:
+ 'Retrieve application input parameters and configuration\nReturns the input form parameters and configuration for the application.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getParameters',
+ path: '/parameters',
+ summary: 'Retrieve app parameters',
+ tags: ['service_api'],
+ })
+ .output(zGetParametersResponse)
+
+export const parameters = {
+ get: get28,
+}
+
+/**
+ * Retrieve app site info
+ *
+ * Get application site configuration
+ * Returns the site configuration for the application including theme, icons, and text.
+ */
+export const get29 = oc
+ .route({
+ description:
+ 'Get application site configuration\nReturns the site configuration for the application including theme, icons, and text.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getSite',
+ path: '/site',
+ summary: 'Retrieve app site info',
+ tags: ['service_api'],
+ })
+ .output(zGetSiteResponse)
+
+export const site = {
+ get: get29,
+}
+
+/**
+ * Convert text to audio using text-to-speech
+ *
+ * Convert text to audio using text-to-speech
+ * Converts the provided text to audio using the specified voice.
+ */
+export const post36 = oc
+ .route({
+ description:
+ 'Convert text to audio using text-to-speech\nConverts the provided text to audio using the specified voice.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTextToAudio',
+ path: '/text-to-audio',
+ summary: 'Convert text to audio using text-to-speech',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPostTextToAudioBody }))
+ .output(zPostTextToAudioResponse)
+
+export const textToAudio = {
+ post: post36,
+}
+
+/**
+ * Get workflow execution events stream after resume
+ */
+export const get30 = oc
+ .route({
+ description: 'Get workflow execution events stream after resume',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkflowByTaskIdEvents',
+ path: '/workflow/{task_id}/events',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ params: zGetWorkflowByTaskIdEventsPath,
+ query: zGetWorkflowByTaskIdEventsQuery.optional(),
+ }),
+ )
+ .output(zGetWorkflowByTaskIdEventsResponse)
+
+export const events = {
+ get: get30,
+}
+
+export const byTaskId3 = {
+ events,
+}
+
+export const workflow = {
+ byTaskId: byTaskId3,
+}
+
+/**
+ * Get workflow app logs
+ *
+ * Get workflow execution logs
+ * Returns paginated workflow execution logs with filtering options.
+ */
+export const get31 = oc
+ .route({
+ description:
+ 'Get workflow execution logs\nReturns paginated workflow execution logs with filtering options.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkflowsLogs',
+ path: '/workflows/logs',
+ summary: 'Get workflow app logs',
+ tags: ['service_api'],
+ })
+ .input(z.object({ query: zGetWorkflowsLogsQuery.optional() }))
+ .output(zGetWorkflowsLogsResponse)
+
+export const logs = {
+ get: get31,
+}
+
+/**
+ * Get a workflow task running detail
+ *
+ * Get workflow run details
+ * Returns detailed information about a specific workflow run.
+ */
+export const get32 = oc
+ .route({
+ description:
+ 'Get workflow run details\nReturns detailed information about a specific workflow run.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkflowsRunByWorkflowRunId',
+ path: '/workflows/run/{workflow_run_id}',
+ summary: 'Get a workflow task running detail',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetWorkflowsRunByWorkflowRunIdPath }))
+ .output(zGetWorkflowsRunByWorkflowRunIdResponse)
+
+export const byWorkflowRunId = {
+ get: get32,
+}
+
+/**
+ * Execute a workflow
+ *
+ * Execute a workflow
+ * Runs a workflow with the provided inputs and returns the results.
+ * Supports both blocking and streaming response modes.
+ */
+export const post37 = oc
+ .route({
+ description:
+ 'Execute a workflow\nRuns a workflow with the provided inputs and returns the results.\nSupports both blocking and streaming response modes.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkflowsRun',
+ path: '/workflows/run',
+ summary: 'Execute a workflow',
+ tags: ['service_api'],
+ })
+ .input(z.object({ body: zPostWorkflowsRunBody }))
+ .output(zPostWorkflowsRunResponse)
+
+export const run3 = {
+ post: post37,
+ byWorkflowRunId,
+}
+
+/**
+ * Stop a running workflow task
+ *
+ * Stop a running workflow task
+ */
+export const post38 = oc
+ .route({
+ description: 'Stop a running workflow task',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkflowsTasksByTaskIdStop',
+ path: '/workflows/tasks/{task_id}/stop',
+ summary: 'Stop a running workflow task',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zPostWorkflowsTasksByTaskIdStopPath }))
+ .output(zPostWorkflowsTasksByTaskIdStopResponse)
+
+export const stop3 = {
+ post: post38,
+}
+
+export const byTaskId4 = {
+ stop: stop3,
+}
+
+export const tasks = {
+ byTaskId: byTaskId4,
+}
+
+/**
+ * Run specific workflow by ID
+ *
+ * Execute a specific workflow by ID
+ * Executes a specific workflow version identified by its ID.
+ */
+export const post39 = oc
+ .route({
+ description:
+ 'Execute a specific workflow by ID\nExecutes a specific workflow version identified by its ID.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkflowsByWorkflowIdRun',
+ path: '/workflows/{workflow_id}/run',
+ summary: 'Run specific workflow by ID',
+ tags: ['service_api'],
+ })
+ .input(
+ z.object({
+ body: zPostWorkflowsByWorkflowIdRunBody,
+ params: zPostWorkflowsByWorkflowIdRunPath,
+ }),
+ )
+ .output(zPostWorkflowsByWorkflowIdRunResponse)
+
+export const run4 = {
+ post: post39,
+}
+
+export const byWorkflowId = {
+ run: run4,
+}
+
+export const workflows = {
+ logs,
+ run: run3,
+ tasks,
+ byWorkflowId,
+}
+
+/**
+ * Get available models by model type
+ *
+ * Get available models by model type
+ * Returns a list of available models for the specified model type.
+ */
+export const get33 = oc
+ .route({
+ description:
+ 'Get available models by model type\nReturns a list of available models for the specified model type.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkspacesCurrentModelsModelTypesByModelType',
+ path: '/workspaces/current/models/model-types/{model_type}',
+ summary: 'Get available models by model type',
+ tags: ['service_api'],
+ })
+ .input(z.object({ params: zGetWorkspacesCurrentModelsModelTypesByModelTypePath }))
+ .output(zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse)
+
+export const byModelType = {
+ get: get33,
+}
+
+export const modelTypes = {
+ byModelType,
+}
+
+export const models = {
+ modelTypes,
+}
+
+export const current = {
+ models,
+}
+
+export const workspaces = {
+ current,
+}
+
+export const contract = {
+ root,
+ app,
+ apps,
+ audioToText,
+ chatMessages,
+ completionMessages,
+ conversations,
+ datasets,
+ endUsers,
+ files,
+ form,
+ info,
+ messages,
+ meta,
+ parameters,
+ site,
+ textToAudio,
+ workflow,
+ workflows,
+ workspaces,
+}
diff --git a/packages/contracts/generated/api/service/types.gen.ts b/packages/contracts/generated/api/service/types.gen.ts
new file mode 100644
index 00000000000..f491c1e3f9e
--- /dev/null
+++ b/packages/contracts/generated/api/service/types.gen.ts
@@ -0,0 +1,3125 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/v1` | (string & {})
+}
+
+export type Annotation = {
+ content?: string | null
+ created_at?: number | null
+ hit_count?: number | null
+ id: string
+ question?: string | null
+}
+
+export type AnnotationCreatePayload = {
+ answer: string
+ question: string
+}
+
+export type AnnotationList = {
+ data: Array<Annotation>
+ has_more: boolean
+ limit: number
+ page: number
+ total: number
+}
+
+export type AnnotationReplyActionPayload = {
+ embedding_model_name: string
+ embedding_provider_name: string
+ score_threshold: number
+}
+
+export type ChatRequestPayload = {
+ auto_generate_name?: boolean
+ conversation_id?: string | null
+ files?: Array<{
+ [key: string]: unknown
+ }> | null
+ inputs: {
+ [key: string]: unknown
+ }
+ query: string
+ response_mode?: 'blocking' | 'streaming' | null
+ retriever_from?: string
+ workflow_id?: string | null
+}
+
+export type ChildChunkCreatePayload = {
+ content: string
+}
+
+export type ChildChunkListQuery = {
+ keyword?: string | null
+ limit?: number
+ page?: number
+}
+
+export type ChildChunkUpdatePayload = {
+ content: string
+}
+
+export type CompletionRequestPayload = {
+ files?: Array<{
+ [key: string]: unknown
+ }> | null
+ inputs: {
+ [key: string]: unknown
+ }
+ query?: string
+ response_mode?: 'blocking' | 'streaming' | null
+ retriever_from?: string
+}
+
+export type ConversationListQuery = {
+ last_id?: string | null
+ limit?: number
+ sort_by?: 'created_at' | '-created_at' | 'updated_at' | '-updated_at'
+}
+
+export type ConversationRenamePayload = {
+ auto_generate?: boolean
+ name?: string | null
+}
+
+export type ConversationVariableInfiniteScrollPaginationResponse = {
+ data: Array<ConversationVariableResponse>
+ has_more: boolean
+ limit: number
+}
+
+export type ConversationVariableResponse = {
+ created_at?: number | null
+ description?: string | null
+ id: string
+ name: string
+ updated_at?: number | null
+ value?: string | null
+ value_type: string
+}
+
+export type ConversationVariableUpdatePayload = {
+ value: unknown
+}
+
+export type ConversationVariablesQuery = {
+ last_id?: string | null
+ limit?: number
+ variable_name?: string | null
+}
+
+export type DatasetCreatePayload = {
+ description?: string
+ embedding_model?: string | null
+ embedding_model_provider?: string | null
+ external_knowledge_api_id?: string | null
+ external_knowledge_id?: string | null
+ indexing_technique?: 'high_quality' | 'economy' | null
+ name: string
+ permission?: DatasetPermissionEnum
+ provider?: string
+ retrieval_model?: RetrievalModel
+ summary_index_setting?: {
+ [key: string]: unknown
+ } | null
+}
+
+export type DatasetUpdatePayload = {
+ description?: string | null
+ embedding_model?: string | null
+ embedding_model_provider?: string | null
+ external_knowledge_api_id?: string | null
+ external_knowledge_id?: string | null
+ external_retrieval_model?: {
+ [key: string]: unknown
+ } | null
+ indexing_technique?: 'high_quality' | 'economy' | null
+ name?: string | null
+ partial_member_list?: Array<{
+ [key: string]: string
+ }> | null
+ permission?: DatasetPermissionEnum
+ retrieval_model?: RetrievalModel
+}
+
+export type DocumentBatchDownloadZipPayload = {
+ document_ids: Array<string>
+}
+
+export type DocumentTextCreatePayload = {
+ doc_form?: string
+ doc_language?: string
+ embedding_model?: string | null
+ embedding_model_provider?: string | null
+ indexing_technique?: string | null
+ name: string
+ original_document_id?: string | null
+ process_rule?: ProcessRule
+ retrieval_model?: RetrievalModel
+ text: string
+}
+
+export type DocumentTextUpdate = {
+ doc_form?: string
+ doc_language?: string
+ name?: string | null
+ process_rule?: ProcessRule
+ retrieval_model?: RetrievalModel
+ text?: string | null
+}
+
+export type FeedbackListQuery = {
+ limit?: number
+ page?: number
+}
+
+export type FilePreviewQuery = {
+ as_attachment?: boolean
+}
+
+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 HitTestingPayload = {
+ attachment_ids?: Array<string> | null
+ external_retrieval_model?: {
+ [key: string]: unknown
+ } | null
+ query: string
+ retrieval_model?: RetrievalModel
+}
+
+export type HumanInputFormSubmitPayload = {
+ action: string
+ inputs: {
+ [key: string]: JsonValue
+ }
+}
+
+export type MessageFeedbackPayload = {
+ content?: string | null
+ rating?: 'like' | 'dislike' | null
+}
+
+export type MessageListQuery = {
+ conversation_id: string
+ first_id?: string | null
+ limit?: number
+}
+
+export type MetadataArgs = {
+ name: string
+ type: 'string' | 'number' | 'time'
+}
+
+export type MetadataOperationData = {
+ operation_data: Array<DocumentMetadataOperation>
+}
+
+export type MetadataUpdatePayload = {
+ name: string
+}
+
+export type SegmentCreatePayload = {
+ segments?: Array<{
+ [key: string]: unknown
+ }> | null
+}
+
+export type SegmentListQuery = {
+ keyword?: string | null
+ status?: Array<string>
+}
+
+export type SegmentUpdatePayload = {
+ segment: SegmentUpdateArgs
+}
+
+export type TagBindingPayload = {
+ tag_ids: Array<string>
+ target_id: string
+}
+
+export type TagCreatePayload = {
+ name: string
+}
+
+export type TagDeletePayload = {
+ tag_id: string
+}
+
+export type TagUnbindingPayload = {
+ tag_id: string
+ target_id: string
+}
+
+export type TagUpdatePayload = {
+ name: string
+ tag_id: string
+}
+
+export type TextToAudioPayload = {
+ message_id?: string | null
+ streaming?: boolean | null
+ text?: string | null
+ voice?: string | null
+}
+
+export type WorkflowAppLogPaginationResponse = {
+ data: Array<WorkflowAppLogPartialResponse>
+ has_more: boolean
+ limit: number
+ page: number
+ total: number
+}
+
+export type WorkflowLogQuery = {
+ created_at__after?: string | null
+ created_at__before?: string | null
+ created_by_account?: string | null
+ created_by_end_user_session_id?: string | null
+ keyword?: string | null
+ limit?: number
+ page?: number
+ status?: 'succeeded' | 'failed' | 'stopped' | null
+}
+
+export type WorkflowRunPayload = {
+ files?: Array<{
+ [key: string]: unknown
+ }> | null
+ inputs: {
+ [key: string]: unknown
+ }
+ response_mode?: 'blocking' | 'streaming' | null
+}
+
+export type WorkflowRunResponse = {
+ created_at?: number | null
+ elapsed_time?: unknown
+ error?: string | null
+ finished_at?: number | null
+ id: string
+ inputs?: unknown
+ outputs?: {
+ [key: string]: unknown
+ }
+ status: string
+ total_steps?: number | null
+ total_tokens?: number | null
+ workflow_id: string
+}
+
+export type DatasetPermissionEnum = 'only_me' | 'all_team_members' | 'partial_members'
+
+export type RerankingModel = {
+ reranking_model_name?: string | null
+ reranking_provider_name?: string | null
+}
+
+export type RetrievalMethod
+ = | 'semantic_search'
+ | 'full_text_search'
+ | 'hybrid_search'
+ | 'keyword_search'
+
+export type RetrievalModel = {
+ reranking_enable: boolean
+ reranking_mode?: string | null
+ reranking_model?: RerankingModel
+ score_threshold?: number | null
+ score_threshold_enabled: boolean
+ search_method: RetrievalMethod
+ top_k: number
+ weights?: WeightModel
+}
+
+export type WeightKeywordSetting = {
+ keyword_weight: number
+}
+
+export type WeightModel = {
+ keyword_setting?: WeightKeywordSetting
+ vector_setting?: WeightVectorSetting
+ weight_type?: 'semantic_first' | 'keyword_first' | 'customized' | null
+}
+
+export type WeightVectorSetting = {
+ embedding_model_name: string
+ embedding_provider_name: string
+ vector_weight: number
+}
+
+export type PreProcessingRule = {
+ enabled: boolean
+ id: string
+}
+
+export type ProcessRule = {
+ mode: 'automatic' | 'custom' | 'hierarchical'
+ rules?: Rule
+}
+
+export type Rule = {
+ parent_mode?: 'full-doc' | 'paragraph' | null
+ pre_processing_rules?: Array<PreProcessingRule> | null
+ segmentation?: Segmentation
+ subchunk_segmentation?: Segmentation
+}
+
+export type Segmentation = {
+ chunk_overlap?: number
+ max_tokens: number
+ separator?: string
+}
+
+export type JsonValue = unknown
+
+export type DocumentMetadataOperation = {
+ document_id: string
+ metadata_list: Array<MetadataDetail>
+ partial_update?: boolean
+}
+
+export type MetadataDetail = {
+ id: string
+ name: string
+ value?: unknown
+}
+
+export type SegmentUpdateArgs = {
+ answer?: string | null
+ attachment_ids?: Array<string> | null
+ content?: string | null
+ enabled?: boolean | null
+ keywords?: Array<string> | null
+ regenerate_child_chunks?: boolean
+ summary?: string | null
+}
+
+export type SimpleAccount = {
+ email: string
+ id: string
+ name: string
+}
+
+export type SimpleEndUser = {
+ id: string
+ is_anonymous: boolean
+ session_id?: string | null
+ type: string
+}
+
+export type WorkflowAppLogPartialResponse = {
+ created_at?: number | null
+ created_by_account?: SimpleAccount
+ created_by_end_user?: SimpleEndUser
+ created_by_role?: string | null
+ created_from?: string | null
+ details?: unknown
+ id: string
+ workflow_run?: WorkflowRunForLogResponse
+}
+
+export type WorkflowRunForLogResponse = {
+ created_at?: number | null
+ elapsed_time?: unknown
+ error?: string | null
+ exceptions_count?: number | null
+ finished_at?: number | null
+ id: string
+ status?: string | null
+ total_steps?: number | null
+ total_tokens?: number | null
+ triggered_from?: string | null
+ version?: string | null
+}
+
+export type GetRootData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/'
+}
+
+export type GetRootResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRootResponse = GetRootResponses[keyof GetRootResponses]
+
+export type GetAppFeedbacksData = {
+ body?: never
+ path?: never
+ query?: {
+ limit?: number
+ page?: number
+ }
+ url: '/app/feedbacks'
+}
+
+export type GetAppFeedbacksErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppFeedbacksError = GetAppFeedbacksErrors[keyof GetAppFeedbacksErrors]
+
+export type GetAppFeedbacksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppFeedbacksResponse = GetAppFeedbacksResponses[keyof GetAppFeedbacksResponses]
+
+export type PostAppsAnnotationReplyByActionData = {
+ body: AnnotationReplyActionPayload
+ path: {
+ action: string
+ }
+ query?: never
+ url: '/apps/annotation-reply/{action}'
+}
+
+export type PostAppsAnnotationReplyByActionErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsAnnotationReplyByActionError
+ = PostAppsAnnotationReplyByActionErrors[keyof PostAppsAnnotationReplyByActionErrors]
+
+export type PostAppsAnnotationReplyByActionResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsAnnotationReplyByActionResponse
+ = PostAppsAnnotationReplyByActionResponses[keyof PostAppsAnnotationReplyByActionResponses]
+
+export type GetAppsAnnotationReplyByActionStatusByJobIdData = {
+ body?: never
+ path: {
+ action: string
+ job_id: string
+ }
+ query?: never
+ url: '/apps/annotation-reply/{action}/status/{job_id}'
+}
+
+export type GetAppsAnnotationReplyByActionStatusByJobIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsAnnotationReplyByActionStatusByJobIdError
+ = GetAppsAnnotationReplyByActionStatusByJobIdErrors[keyof GetAppsAnnotationReplyByActionStatusByJobIdErrors]
+
+export type GetAppsAnnotationReplyByActionStatusByJobIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsAnnotationReplyByActionStatusByJobIdResponse
+ = GetAppsAnnotationReplyByActionStatusByJobIdResponses[keyof GetAppsAnnotationReplyByActionStatusByJobIdResponses]
+
+export type GetAppsAnnotationsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/apps/annotations'
+}
+
+export type GetAppsAnnotationsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetAppsAnnotationsError = GetAppsAnnotationsErrors[keyof GetAppsAnnotationsErrors]
+
+export type GetAppsAnnotationsResponses = {
+ 200: AnnotationList
+}
+
+export type GetAppsAnnotationsResponse
+ = GetAppsAnnotationsResponses[keyof GetAppsAnnotationsResponses]
+
+export type PostAppsAnnotationsData = {
+ body: AnnotationCreatePayload
+ path?: never
+ query?: never
+ url: '/apps/annotations'
+}
+
+export type PostAppsAnnotationsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAppsAnnotationsError = PostAppsAnnotationsErrors[keyof PostAppsAnnotationsErrors]
+
+export type PostAppsAnnotationsResponses = {
+ 201: Annotation
+}
+
+export type PostAppsAnnotationsResponse
+ = PostAppsAnnotationsResponses[keyof PostAppsAnnotationsResponses]
+
+export type DeleteAppsAnnotationsByAnnotationIdData = {
+ body?: never
+ path: {
+ annotation_id: string
+ }
+ query?: never
+ url: '/apps/annotations/{annotation_id}'
+}
+
+export type DeleteAppsAnnotationsByAnnotationIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsAnnotationsByAnnotationIdError
+ = DeleteAppsAnnotationsByAnnotationIdErrors[keyof DeleteAppsAnnotationsByAnnotationIdErrors]
+
+export type DeleteAppsAnnotationsByAnnotationIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteAppsAnnotationsByAnnotationIdResponse
+ = DeleteAppsAnnotationsByAnnotationIdResponses[keyof DeleteAppsAnnotationsByAnnotationIdResponses]
+
+export type PutAppsAnnotationsByAnnotationIdData = {
+ body: AnnotationCreatePayload
+ path: {
+ annotation_id: string
+ }
+ query?: never
+ url: '/apps/annotations/{annotation_id}'
+}
+
+export type PutAppsAnnotationsByAnnotationIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PutAppsAnnotationsByAnnotationIdError
+ = PutAppsAnnotationsByAnnotationIdErrors[keyof PutAppsAnnotationsByAnnotationIdErrors]
+
+export type PutAppsAnnotationsByAnnotationIdResponses = {
+ 200: Annotation
+}
+
+export type PutAppsAnnotationsByAnnotationIdResponse
+ = PutAppsAnnotationsByAnnotationIdResponses[keyof PutAppsAnnotationsByAnnotationIdResponses]
+
+export type PostAudioToTextData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/audio-to-text'
+}
+
+export type PostAudioToTextErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 413: {
+ [key: string]: unknown
+ }
+ 415: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAudioToTextError = PostAudioToTextErrors[keyof PostAudioToTextErrors]
+
+export type PostAudioToTextResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAudioToTextResponse = PostAudioToTextResponses[keyof PostAudioToTextResponses]
+
+export type PostChatMessagesData = {
+ body: ChatRequestPayload
+ path?: never
+ query?: never
+ url: '/chat-messages'
+}
+
+export type PostChatMessagesErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 429: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostChatMessagesError = PostChatMessagesErrors[keyof PostChatMessagesErrors]
+
+export type PostChatMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostChatMessagesResponse = PostChatMessagesResponses[keyof PostChatMessagesResponses]
+
+export type PostChatMessagesByTaskIdStopData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: never
+ url: '/chat-messages/{task_id}/stop'
+}
+
+export type PostChatMessagesByTaskIdStopErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostChatMessagesByTaskIdStopError
+ = PostChatMessagesByTaskIdStopErrors[keyof PostChatMessagesByTaskIdStopErrors]
+
+export type PostChatMessagesByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostChatMessagesByTaskIdStopResponse
+ = PostChatMessagesByTaskIdStopResponses[keyof PostChatMessagesByTaskIdStopResponses]
+
+export type PostCompletionMessagesData = {
+ body: CompletionRequestPayload
+ path?: never
+ query?: never
+ url: '/completion-messages'
+}
+
+export type PostCompletionMessagesErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostCompletionMessagesError
+ = PostCompletionMessagesErrors[keyof PostCompletionMessagesErrors]
+
+export type PostCompletionMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostCompletionMessagesResponse
+ = PostCompletionMessagesResponses[keyof PostCompletionMessagesResponses]
+
+export type PostCompletionMessagesByTaskIdStopData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: never
+ url: '/completion-messages/{task_id}/stop'
+}
+
+export type PostCompletionMessagesByTaskIdStopErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostCompletionMessagesByTaskIdStopError
+ = PostCompletionMessagesByTaskIdStopErrors[keyof PostCompletionMessagesByTaskIdStopErrors]
+
+export type PostCompletionMessagesByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostCompletionMessagesByTaskIdStopResponse
+ = PostCompletionMessagesByTaskIdStopResponses[keyof PostCompletionMessagesByTaskIdStopResponses]
+
+export type GetConversationsData = {
+ body?: never
+ path?: never
+ query?: {
+ last_id?: string | null
+ limit?: number
+ sort_by?: 'created_at' | '-created_at' | 'updated_at' | '-updated_at'
+ }
+ url: '/conversations'
+}
+
+export type GetConversationsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetConversationsError = GetConversationsErrors[keyof GetConversationsErrors]
+
+export type GetConversationsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetConversationsResponse = GetConversationsResponses[keyof GetConversationsResponses]
+
+export type DeleteConversationsByCIdData = {
+ body?: never
+ path: {
+ c_id: string
+ }
+ query?: never
+ url: '/conversations/{c_id}'
+}
+
+export type DeleteConversationsByCIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteConversationsByCIdError
+ = DeleteConversationsByCIdErrors[keyof DeleteConversationsByCIdErrors]
+
+export type DeleteConversationsByCIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteConversationsByCIdResponse
+ = DeleteConversationsByCIdResponses[keyof DeleteConversationsByCIdResponses]
+
+export type PostConversationsByCIdNameData = {
+ body: ConversationRenamePayload
+ path: {
+ c_id: string
+ }
+ query?: never
+ url: '/conversations/{c_id}/name'
+}
+
+export type PostConversationsByCIdNameErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostConversationsByCIdNameError
+ = PostConversationsByCIdNameErrors[keyof PostConversationsByCIdNameErrors]
+
+export type PostConversationsByCIdNameResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostConversationsByCIdNameResponse
+ = PostConversationsByCIdNameResponses[keyof PostConversationsByCIdNameResponses]
+
+export type GetConversationsByCIdVariablesData = {
+ body?: never
+ path: {
+ c_id: string
+ }
+ query?: {
+ last_id?: string | null
+ limit?: number
+ variable_name?: string | null
+ }
+ url: '/conversations/{c_id}/variables'
+}
+
+export type GetConversationsByCIdVariablesErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetConversationsByCIdVariablesError
+ = GetConversationsByCIdVariablesErrors[keyof GetConversationsByCIdVariablesErrors]
+
+export type GetConversationsByCIdVariablesResponses = {
+ 200: ConversationVariableInfiniteScrollPaginationResponse
+}
+
+export type GetConversationsByCIdVariablesResponse
+ = GetConversationsByCIdVariablesResponses[keyof GetConversationsByCIdVariablesResponses]
+
+export type PutConversationsByCIdVariablesByVariableIdData = {
+ body: ConversationVariableUpdatePayload
+ path: {
+ c_id: string
+ variable_id: string
+ }
+ query?: never
+ url: '/conversations/{c_id}/variables/{variable_id}'
+}
+
+export type PutConversationsByCIdVariablesByVariableIdErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PutConversationsByCIdVariablesByVariableIdError
+ = PutConversationsByCIdVariablesByVariableIdErrors[keyof PutConversationsByCIdVariablesByVariableIdErrors]
+
+export type PutConversationsByCIdVariablesByVariableIdResponses = {
+ 200: ConversationVariableResponse
+}
+
+export type PutConversationsByCIdVariablesByVariableIdResponse
+ = PutConversationsByCIdVariablesByVariableIdResponses[keyof PutConversationsByCIdVariablesByVariableIdResponses]
+
+export type GetDatasetsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/datasets'
+}
+
+export type GetDatasetsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsError = GetDatasetsErrors[keyof GetDatasetsErrors]
+
+export type GetDatasetsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsResponse = GetDatasetsResponses[keyof GetDatasetsResponses]
+
+export type PostDatasetsData = {
+ body: DatasetCreatePayload
+ path?: never
+ query?: never
+ url: '/datasets'
+}
+
+export type PostDatasetsErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsError = PostDatasetsErrors[keyof PostDatasetsErrors]
+
+export type PostDatasetsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsResponse = PostDatasetsResponses[keyof PostDatasetsResponses]
+
+export type PostDatasetsPipelineFileUploadData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/datasets/pipeline/file-upload'
+}
+
+export type PostDatasetsPipelineFileUploadErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 413: {
+ [key: string]: unknown
+ }
+ 415: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsPipelineFileUploadError
+ = PostDatasetsPipelineFileUploadErrors[keyof PostDatasetsPipelineFileUploadErrors]
+
+export type PostDatasetsPipelineFileUploadResponses = {
+ 201: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsPipelineFileUploadResponse
+ = PostDatasetsPipelineFileUploadResponses[keyof PostDatasetsPipelineFileUploadResponses]
+
+export type DeleteDatasetsTagsData = {
+ body: TagDeletePayload
+ path?: never
+ query?: never
+ url: '/datasets/tags'
+}
+
+export type DeleteDatasetsTagsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsTagsError = DeleteDatasetsTagsErrors[keyof DeleteDatasetsTagsErrors]
+
+export type DeleteDatasetsTagsResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsTagsResponse
+ = DeleteDatasetsTagsResponses[keyof DeleteDatasetsTagsResponses]
+
+export type GetDatasetsTagsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/datasets/tags'
+}
+
+export type GetDatasetsTagsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsTagsError = GetDatasetsTagsErrors[keyof GetDatasetsTagsErrors]
+
+export type GetDatasetsTagsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsTagsResponse = GetDatasetsTagsResponses[keyof GetDatasetsTagsResponses]
+
+export type PatchDatasetsTagsData = {
+ body: TagUpdatePayload
+ path?: never
+ query?: never
+ url: '/datasets/tags'
+}
+
+export type PatchDatasetsTagsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsTagsError = PatchDatasetsTagsErrors[keyof PatchDatasetsTagsErrors]
+
+export type PatchDatasetsTagsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsTagsResponse = PatchDatasetsTagsResponses[keyof PatchDatasetsTagsResponses]
+
+export type PostDatasetsTagsData = {
+ body: TagCreatePayload
+ path?: never
+ query?: never
+ url: '/datasets/tags'
+}
+
+export type PostDatasetsTagsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsTagsError = PostDatasetsTagsErrors[keyof PostDatasetsTagsErrors]
+
+export type PostDatasetsTagsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsTagsResponse = PostDatasetsTagsResponses[keyof PostDatasetsTagsResponses]
+
+export type PostDatasetsTagsBindingData = {
+ body: TagBindingPayload
+ path?: never
+ query?: never
+ url: '/datasets/tags/binding'
+}
+
+export type PostDatasetsTagsBindingErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsTagsBindingError
+ = PostDatasetsTagsBindingErrors[keyof PostDatasetsTagsBindingErrors]
+
+export type PostDatasetsTagsBindingResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsTagsBindingResponse
+ = PostDatasetsTagsBindingResponses[keyof PostDatasetsTagsBindingResponses]
+
+export type PostDatasetsTagsUnbindingData = {
+ body: TagUnbindingPayload
+ path?: never
+ query?: never
+ url: '/datasets/tags/unbinding'
+}
+
+export type PostDatasetsTagsUnbindingErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsTagsUnbindingError
+ = PostDatasetsTagsUnbindingErrors[keyof PostDatasetsTagsUnbindingErrors]
+
+export type PostDatasetsTagsUnbindingResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsTagsUnbindingResponse
+ = PostDatasetsTagsUnbindingResponses[keyof PostDatasetsTagsUnbindingResponses]
+
+export type DeleteDatasetsByDatasetIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}'
+}
+
+export type DeleteDatasetsByDatasetIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 409: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdError
+ = DeleteDatasetsByDatasetIdErrors[keyof DeleteDatasetsByDatasetIdErrors]
+
+export type DeleteDatasetsByDatasetIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdResponse
+ = DeleteDatasetsByDatasetIdResponses[keyof DeleteDatasetsByDatasetIdResponses]
+
+export type GetDatasetsByDatasetIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}'
+}
+
+export type GetDatasetsByDatasetIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdError
+ = GetDatasetsByDatasetIdErrors[keyof GetDatasetsByDatasetIdErrors]
+
+export type GetDatasetsByDatasetIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdResponse
+ = GetDatasetsByDatasetIdResponses[keyof GetDatasetsByDatasetIdResponses]
+
+export type PatchDatasetsByDatasetIdData = {
+ body: DatasetUpdatePayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}'
+}
+
+export type PatchDatasetsByDatasetIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdError
+ = PatchDatasetsByDatasetIdErrors[keyof PatchDatasetsByDatasetIdErrors]
+
+export type PatchDatasetsByDatasetIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdResponse
+ = PatchDatasetsByDatasetIdResponses[keyof PatchDatasetsByDatasetIdResponses]
+
+export type PostDatasetsByDatasetIdDocumentCreateByFileData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/document/create-by-file'
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByFileErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByFileError
+ = PostDatasetsByDatasetIdDocumentCreateByFileErrors[keyof PostDatasetsByDatasetIdDocumentCreateByFileErrors]
+
+export type PostDatasetsByDatasetIdDocumentCreateByFileResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByFileResponse
+ = PostDatasetsByDatasetIdDocumentCreateByFileResponses[keyof PostDatasetsByDatasetIdDocumentCreateByFileResponses]
+
+export type PostDatasetsByDatasetIdDocumentCreateByTextData = {
+ body: DocumentTextCreatePayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/document/create-by-text'
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByTextErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByTextError
+ = PostDatasetsByDatasetIdDocumentCreateByTextErrors[keyof PostDatasetsByDatasetIdDocumentCreateByTextErrors]
+
+export type PostDatasetsByDatasetIdDocumentCreateByTextResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByTextResponse
+ = PostDatasetsByDatasetIdDocumentCreateByTextResponses[keyof PostDatasetsByDatasetIdDocumentCreateByTextResponses]
+
+export type PostDatasetsByDatasetIdDocumentCreateByFile2Data = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/document/create_by_file'
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByFile2Errors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByFile2Error
+ = PostDatasetsByDatasetIdDocumentCreateByFile2Errors[keyof PostDatasetsByDatasetIdDocumentCreateByFile2Errors]
+
+export type PostDatasetsByDatasetIdDocumentCreateByFile2Responses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByFile2Response
+ = PostDatasetsByDatasetIdDocumentCreateByFile2Responses[keyof PostDatasetsByDatasetIdDocumentCreateByFile2Responses]
+
+export type PostDatasetsByDatasetIdDocumentCreateByText2Data = {
+ body: DocumentTextCreatePayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/document/create_by_text'
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByText2Errors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByText2Error
+ = PostDatasetsByDatasetIdDocumentCreateByText2Errors[keyof PostDatasetsByDatasetIdDocumentCreateByText2Errors]
+
+export type PostDatasetsByDatasetIdDocumentCreateByText2Responses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentCreateByText2Response
+ = PostDatasetsByDatasetIdDocumentCreateByText2Responses[keyof PostDatasetsByDatasetIdDocumentCreateByText2Responses]
+
+export type GetDatasetsByDatasetIdDocumentsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents'
+}
+
+export type GetDatasetsByDatasetIdDocumentsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsError
+ = GetDatasetsByDatasetIdDocumentsErrors[keyof GetDatasetsByDatasetIdDocumentsErrors]
+
+export type GetDatasetsByDatasetIdDocumentsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsResponse
+ = GetDatasetsByDatasetIdDocumentsResponses[keyof GetDatasetsByDatasetIdDocumentsResponses]
+
+export type PostDatasetsByDatasetIdDocumentsDownloadZipData = {
+ body: DocumentBatchDownloadZipPayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/download-zip'
+}
+
+export type PostDatasetsByDatasetIdDocumentsDownloadZipErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsDownloadZipError
+ = PostDatasetsByDatasetIdDocumentsDownloadZipErrors[keyof PostDatasetsByDatasetIdDocumentsDownloadZipErrors]
+
+export type PostDatasetsByDatasetIdDocumentsDownloadZipResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsDownloadZipResponse
+ = PostDatasetsByDatasetIdDocumentsDownloadZipResponses[keyof PostDatasetsByDatasetIdDocumentsDownloadZipResponses]
+
+export type PostDatasetsByDatasetIdDocumentsMetadataData = {
+ body: MetadataOperationData
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/metadata'
+}
+
+export type PostDatasetsByDatasetIdDocumentsMetadataErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsMetadataError
+ = PostDatasetsByDatasetIdDocumentsMetadataErrors[keyof PostDatasetsByDatasetIdDocumentsMetadataErrors]
+
+export type PostDatasetsByDatasetIdDocumentsMetadataResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsMetadataResponse
+ = PostDatasetsByDatasetIdDocumentsMetadataResponses[keyof PostDatasetsByDatasetIdDocumentsMetadataResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsStatusByActionData = {
+ body?: never
+ path: {
+ dataset_id: string
+ action: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/status/{action}'
+}
+
+export type PatchDatasetsByDatasetIdDocumentsStatusByActionErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsStatusByActionError
+ = PatchDatasetsByDatasetIdDocumentsStatusByActionErrors[keyof PatchDatasetsByDatasetIdDocumentsStatusByActionErrors]
+
+export type PatchDatasetsByDatasetIdDocumentsStatusByActionResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsStatusByActionResponse
+ = PatchDatasetsByDatasetIdDocumentsStatusByActionResponses[keyof PatchDatasetsByDatasetIdDocumentsStatusByActionResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusData = {
+ body?: never
+ path: {
+ dataset_id: string
+ batch: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{batch}/indexing-status'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusError
+ = GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusErrors[keyof GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponse
+ = GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponses[keyof GetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponses]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}'
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdError
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdErrors[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdErrors]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdError
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}'
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdError
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdErrors[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdErrors]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdResponse
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/download'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadError
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: {
+ keyword?: string | null
+ status?: Array<string>
+ }
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsError
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsData = {
+ body: SegmentCreatePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsError
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsErrors]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponses]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdError
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdData = {
+ body?: never
+ path: {
+ segment_id: string
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdError
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdData = {
+ body: SegmentUpdatePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdError
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdErrors]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponses]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ }
+ query?: {
+ keyword?: string | null
+ limit?: number
+ page?: number
+ }
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks'
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksError
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors]
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses[keyof GetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksData = {
+ body: ChildChunkCreatePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksError
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksErrors]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponses]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdData
+ = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ child_chunk_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}'
+ }
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors
+ = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ }
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdError
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors]
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses
+ = {
+ 204: {
+ [key: string]: unknown
+ }
+ }
+
+export type DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
+ = DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses[keyof DeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdData
+ = {
+ body: ChildChunkUpdatePayload
+ path: {
+ dataset_id: string
+ document_id: string
+ segment_id: string
+ child_chunk_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}'
+ }
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors
+ = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ }
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdError
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdErrors]
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses
+ = {
+ 200: {
+ [key: string]: unknown
+ }
+ }
+
+export type PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
+ = PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses[keyof PatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileData = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/update-by-file'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileError
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileErrors]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponse
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextData = {
+ body: DocumentTextUpdate
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/update-by-text'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextError
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextErrors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextErrors]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponse
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Data = {
+ body?: never
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/update_by_file'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Errors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Error
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Errors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Errors]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Responses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Response
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Responses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Responses]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Data = {
+ body: DocumentTextUpdate
+ path: {
+ dataset_id: string
+ document_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/documents/{document_id}/update_by_text'
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Errors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Error
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Errors[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Errors]
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Responses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Response
+ = PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Responses[keyof PostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Responses]
+
+export type PostDatasetsByDatasetIdHitTestingData = {
+ body: HitTestingPayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/hit-testing'
+}
+
+export type PostDatasetsByDatasetIdHitTestingErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdHitTestingError
+ = PostDatasetsByDatasetIdHitTestingErrors[keyof PostDatasetsByDatasetIdHitTestingErrors]
+
+export type PostDatasetsByDatasetIdHitTestingResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdHitTestingResponse
+ = PostDatasetsByDatasetIdHitTestingResponses[keyof PostDatasetsByDatasetIdHitTestingResponses]
+
+export type GetDatasetsByDatasetIdMetadataData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata'
+}
+
+export type GetDatasetsByDatasetIdMetadataErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdMetadataError
+ = GetDatasetsByDatasetIdMetadataErrors[keyof GetDatasetsByDatasetIdMetadataErrors]
+
+export type GetDatasetsByDatasetIdMetadataResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdMetadataResponse
+ = GetDatasetsByDatasetIdMetadataResponses[keyof GetDatasetsByDatasetIdMetadataResponses]
+
+export type PostDatasetsByDatasetIdMetadataData = {
+ body: MetadataArgs
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata'
+}
+
+export type PostDatasetsByDatasetIdMetadataErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdMetadataError
+ = PostDatasetsByDatasetIdMetadataErrors[keyof PostDatasetsByDatasetIdMetadataErrors]
+
+export type PostDatasetsByDatasetIdMetadataResponses = {
+ 201: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdMetadataResponse
+ = PostDatasetsByDatasetIdMetadataResponses[keyof PostDatasetsByDatasetIdMetadataResponses]
+
+export type GetDatasetsByDatasetIdMetadataBuiltInData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata/built-in'
+}
+
+export type GetDatasetsByDatasetIdMetadataBuiltInErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdMetadataBuiltInError
+ = GetDatasetsByDatasetIdMetadataBuiltInErrors[keyof GetDatasetsByDatasetIdMetadataBuiltInErrors]
+
+export type GetDatasetsByDatasetIdMetadataBuiltInResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdMetadataBuiltInResponse
+ = GetDatasetsByDatasetIdMetadataBuiltInResponses[keyof GetDatasetsByDatasetIdMetadataBuiltInResponses]
+
+export type PostDatasetsByDatasetIdMetadataBuiltInByActionData = {
+ body?: never
+ path: {
+ dataset_id: string
+ action: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata/built-in/{action}'
+}
+
+export type PostDatasetsByDatasetIdMetadataBuiltInByActionErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdMetadataBuiltInByActionError
+ = PostDatasetsByDatasetIdMetadataBuiltInByActionErrors[keyof PostDatasetsByDatasetIdMetadataBuiltInByActionErrors]
+
+export type PostDatasetsByDatasetIdMetadataBuiltInByActionResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdMetadataBuiltInByActionResponse
+ = PostDatasetsByDatasetIdMetadataBuiltInByActionResponses[keyof PostDatasetsByDatasetIdMetadataBuiltInByActionResponses]
+
+export type DeleteDatasetsByDatasetIdMetadataByMetadataIdData = {
+ body?: never
+ path: {
+ dataset_id: string
+ metadata_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata/{metadata_id}'
+}
+
+export type DeleteDatasetsByDatasetIdMetadataByMetadataIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdMetadataByMetadataIdError
+ = DeleteDatasetsByDatasetIdMetadataByMetadataIdErrors[keyof DeleteDatasetsByDatasetIdMetadataByMetadataIdErrors]
+
+export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteDatasetsByDatasetIdMetadataByMetadataIdResponse
+ = DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses[keyof DeleteDatasetsByDatasetIdMetadataByMetadataIdResponses]
+
+export type PatchDatasetsByDatasetIdMetadataByMetadataIdData = {
+ body: MetadataUpdatePayload
+ path: {
+ dataset_id: string
+ metadata_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/metadata/{metadata_id}'
+}
+
+export type PatchDatasetsByDatasetIdMetadataByMetadataIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdMetadataByMetadataIdError
+ = PatchDatasetsByDatasetIdMetadataByMetadataIdErrors[keyof PatchDatasetsByDatasetIdMetadataByMetadataIdErrors]
+
+export type PatchDatasetsByDatasetIdMetadataByMetadataIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchDatasetsByDatasetIdMetadataByMetadataIdResponse
+ = PatchDatasetsByDatasetIdMetadataByMetadataIdResponses[keyof PatchDatasetsByDatasetIdMetadataByMetadataIdResponses]
+
+export type GetDatasetsByDatasetIdPipelineDatasourcePluginsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: {
+ is_published?: string
+ }
+ url: '/datasets/{dataset_id}/pipeline/datasource-plugins'
+}
+
+export type GetDatasetsByDatasetIdPipelineDatasourcePluginsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdPipelineDatasourcePluginsError
+ = GetDatasetsByDatasetIdPipelineDatasourcePluginsErrors[keyof GetDatasetsByDatasetIdPipelineDatasourcePluginsErrors]
+
+export type GetDatasetsByDatasetIdPipelineDatasourcePluginsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdPipelineDatasourcePluginsResponse
+ = GetDatasetsByDatasetIdPipelineDatasourcePluginsResponses[keyof GetDatasetsByDatasetIdPipelineDatasourcePluginsResponses]
+
+export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunData = {
+ body?: never
+ path: {
+ dataset_id: string
+ node_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run'
+}
+
+export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunError
+ = PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunErrors[keyof PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunErrors]
+
+export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponse
+ = PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponses[keyof PostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponses]
+
+export type PostDatasetsByDatasetIdPipelineRunData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/pipeline/run'
+}
+
+export type PostDatasetsByDatasetIdPipelineRunErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdPipelineRunError
+ = PostDatasetsByDatasetIdPipelineRunErrors[keyof PostDatasetsByDatasetIdPipelineRunErrors]
+
+export type PostDatasetsByDatasetIdPipelineRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdPipelineRunResponse
+ = PostDatasetsByDatasetIdPipelineRunResponses[keyof PostDatasetsByDatasetIdPipelineRunResponses]
+
+export type PostDatasetsByDatasetIdRetrieveData = {
+ body: HitTestingPayload
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/retrieve'
+}
+
+export type PostDatasetsByDatasetIdRetrieveErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdRetrieveError
+ = PostDatasetsByDatasetIdRetrieveErrors[keyof PostDatasetsByDatasetIdRetrieveErrors]
+
+export type PostDatasetsByDatasetIdRetrieveResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostDatasetsByDatasetIdRetrieveResponse
+ = PostDatasetsByDatasetIdRetrieveResponses[keyof PostDatasetsByDatasetIdRetrieveResponses]
+
+export type GetDatasetsByDatasetIdTagsData = {
+ body?: never
+ path: {
+ dataset_id: string
+ }
+ query?: never
+ url: '/datasets/{dataset_id}/tags'
+}
+
+export type GetDatasetsByDatasetIdTagsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdTagsError
+ = GetDatasetsByDatasetIdTagsErrors[keyof GetDatasetsByDatasetIdTagsErrors]
+
+export type GetDatasetsByDatasetIdTagsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetDatasetsByDatasetIdTagsResponse
+ = GetDatasetsByDatasetIdTagsResponses[keyof GetDatasetsByDatasetIdTagsResponses]
+
+export type GetEndUsersByEndUserIdData = {
+ body?: never
+ path: {
+ end_user_id: string
+ }
+ query?: never
+ url: '/end-users/{end_user_id}'
+}
+
+export type GetEndUsersByEndUserIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetEndUsersByEndUserIdError
+ = GetEndUsersByEndUserIdErrors[keyof GetEndUsersByEndUserIdErrors]
+
+export type GetEndUsersByEndUserIdResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetEndUsersByEndUserIdResponse
+ = GetEndUsersByEndUserIdResponses[keyof GetEndUsersByEndUserIdResponses]
+
+export type PostFilesUploadData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/files/upload'
+}
+
+export type PostFilesUploadErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 413: {
+ [key: string]: unknown
+ }
+ 415: {
+ [key: string]: unknown
+ }
+}
+
+export type PostFilesUploadError = PostFilesUploadErrors[keyof PostFilesUploadErrors]
+
+export type PostFilesUploadResponses = {
+ 201: FileResponse
+}
+
+export type PostFilesUploadResponse = PostFilesUploadResponses[keyof PostFilesUploadResponses]
+
+export type GetFilesByFileIdPreviewData = {
+ body?: never
+ path: {
+ file_id: string
+ }
+ query?: {
+ as_attachment?: boolean
+ }
+ url: '/files/{file_id}/preview'
+}
+
+export type GetFilesByFileIdPreviewErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetFilesByFileIdPreviewError
+ = GetFilesByFileIdPreviewErrors[keyof GetFilesByFileIdPreviewErrors]
+
+export type GetFilesByFileIdPreviewResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetFilesByFileIdPreviewResponse
+ = GetFilesByFileIdPreviewResponses[keyof GetFilesByFileIdPreviewResponses]
+
+export type GetFormHumanInputByFormTokenData = {
+ body?: never
+ path: {
+ form_token: string
+ }
+ query?: never
+ url: '/form/human_input/{form_token}'
+}
+
+export type GetFormHumanInputByFormTokenErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 412: {
+ [key: string]: unknown
+ }
+}
+
+export type GetFormHumanInputByFormTokenError
+ = GetFormHumanInputByFormTokenErrors[keyof GetFormHumanInputByFormTokenErrors]
+
+export type GetFormHumanInputByFormTokenResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetFormHumanInputByFormTokenResponse
+ = GetFormHumanInputByFormTokenResponses[keyof GetFormHumanInputByFormTokenResponses]
+
+export type PostFormHumanInputByFormTokenData = {
+ body: HumanInputFormSubmitPayload
+ path: {
+ form_token: string
+ }
+ query?: never
+ url: '/form/human_input/{form_token}'
+}
+
+export type PostFormHumanInputByFormTokenErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 412: {
+ [key: string]: unknown
+ }
+}
+
+export type PostFormHumanInputByFormTokenError
+ = PostFormHumanInputByFormTokenErrors[keyof PostFormHumanInputByFormTokenErrors]
+
+export type PostFormHumanInputByFormTokenResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostFormHumanInputByFormTokenResponse
+ = PostFormHumanInputByFormTokenResponses[keyof PostFormHumanInputByFormTokenResponses]
+
+export type GetInfoData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/info'
+}
+
+export type GetInfoErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetInfoError = GetInfoErrors[keyof GetInfoErrors]
+
+export type GetInfoResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetInfoResponse = GetInfoResponses[keyof GetInfoResponses]
+
+export type GetMessagesData = {
+ body?: never
+ path?: never
+ query: {
+ conversation_id: string
+ first_id?: string | null
+ limit?: number
+ }
+ url: '/messages'
+}
+
+export type GetMessagesErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesError = GetMessagesErrors[keyof GetMessagesErrors]
+
+export type GetMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesResponse = GetMessagesResponses[keyof GetMessagesResponses]
+
+export type PostMessagesByMessageIdFeedbacksData = {
+ body: MessageFeedbackPayload
+ path: {
+ message_id: string
+ }
+ query?: never
+ url: '/messages/{message_id}/feedbacks'
+}
+
+export type PostMessagesByMessageIdFeedbacksErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostMessagesByMessageIdFeedbacksError
+ = PostMessagesByMessageIdFeedbacksErrors[keyof PostMessagesByMessageIdFeedbacksErrors]
+
+export type PostMessagesByMessageIdFeedbacksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostMessagesByMessageIdFeedbacksResponse
+ = PostMessagesByMessageIdFeedbacksResponses[keyof PostMessagesByMessageIdFeedbacksResponses]
+
+export type GetMessagesByMessageIdSuggestedData = {
+ body?: never
+ path: {
+ message_id: string
+ }
+ query?: never
+ url: '/messages/{message_id}/suggested'
+}
+
+export type GetMessagesByMessageIdSuggestedErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesByMessageIdSuggestedError
+ = GetMessagesByMessageIdSuggestedErrors[keyof GetMessagesByMessageIdSuggestedErrors]
+
+export type GetMessagesByMessageIdSuggestedResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesByMessageIdSuggestedResponse
+ = GetMessagesByMessageIdSuggestedResponses[keyof GetMessagesByMessageIdSuggestedResponses]
+
+export type GetMetaData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/meta'
+}
+
+export type GetMetaErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMetaError = GetMetaErrors[keyof GetMetaErrors]
+
+export type GetMetaResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMetaResponse = GetMetaResponses[keyof GetMetaResponses]
+
+export type GetParametersData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/parameters'
+}
+
+export type GetParametersErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetParametersError = GetParametersErrors[keyof GetParametersErrors]
+
+export type GetParametersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetParametersResponse = GetParametersResponses[keyof GetParametersResponses]
+
+export type GetSiteData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/site'
+}
+
+export type GetSiteErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+}
+
+export type GetSiteError = GetSiteErrors[keyof GetSiteErrors]
+
+export type GetSiteResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetSiteResponse = GetSiteResponses[keyof GetSiteResponses]
+
+export type PostTextToAudioData = {
+ body: TextToAudioPayload
+ path?: never
+ query?: never
+ url: '/text-to-audio'
+}
+
+export type PostTextToAudioErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTextToAudioError = PostTextToAudioErrors[keyof PostTextToAudioErrors]
+
+export type PostTextToAudioResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTextToAudioResponse = PostTextToAudioResponses[keyof PostTextToAudioResponses]
+
+export type GetWorkflowByTaskIdEventsData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: {
+ user?: string
+ include_state_snapshot?: string
+ continue_on_pause?: string
+ }
+ url: '/workflow/{task_id}/events'
+}
+
+export type GetWorkflowByTaskIdEventsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkflowByTaskIdEventsError
+ = GetWorkflowByTaskIdEventsErrors[keyof GetWorkflowByTaskIdEventsErrors]
+
+export type GetWorkflowByTaskIdEventsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkflowByTaskIdEventsResponse
+ = GetWorkflowByTaskIdEventsResponses[keyof GetWorkflowByTaskIdEventsResponses]
+
+export type GetWorkflowsLogsData = {
+ body?: never
+ path?: never
+ query?: {
+ created_at__after?: string | null
+ created_at__before?: string | null
+ created_by_account?: string | null
+ created_by_end_user_session_id?: string | null
+ keyword?: string | null
+ limit?: number
+ page?: number
+ status?: 'succeeded' | 'failed' | 'stopped' | null
+ }
+ url: '/workflows/logs'
+}
+
+export type GetWorkflowsLogsErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkflowsLogsError = GetWorkflowsLogsErrors[keyof GetWorkflowsLogsErrors]
+
+export type GetWorkflowsLogsResponses = {
+ 200: WorkflowAppLogPaginationResponse
+}
+
+export type GetWorkflowsLogsResponse = GetWorkflowsLogsResponses[keyof GetWorkflowsLogsResponses]
+
+export type PostWorkflowsRunData = {
+ body: WorkflowRunPayload
+ path?: never
+ query?: never
+ url: '/workflows/run'
+}
+
+export type PostWorkflowsRunErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 429: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsRunError = PostWorkflowsRunErrors[keyof PostWorkflowsRunErrors]
+
+export type PostWorkflowsRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsRunResponse = PostWorkflowsRunResponses[keyof PostWorkflowsRunResponses]
+
+export type GetWorkflowsRunByWorkflowRunIdData = {
+ body?: never
+ path: {
+ workflow_run_id: string
+ }
+ query?: never
+ url: '/workflows/run/{workflow_run_id}'
+}
+
+export type GetWorkflowsRunByWorkflowRunIdErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkflowsRunByWorkflowRunIdError
+ = GetWorkflowsRunByWorkflowRunIdErrors[keyof GetWorkflowsRunByWorkflowRunIdErrors]
+
+export type GetWorkflowsRunByWorkflowRunIdResponses = {
+ 200: WorkflowRunResponse
+}
+
+export type GetWorkflowsRunByWorkflowRunIdResponse
+ = GetWorkflowsRunByWorkflowRunIdResponses[keyof GetWorkflowsRunByWorkflowRunIdResponses]
+
+export type PostWorkflowsTasksByTaskIdStopData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: never
+ url: '/workflows/tasks/{task_id}/stop'
+}
+
+export type PostWorkflowsTasksByTaskIdStopErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsTasksByTaskIdStopError
+ = PostWorkflowsTasksByTaskIdStopErrors[keyof PostWorkflowsTasksByTaskIdStopErrors]
+
+export type PostWorkflowsTasksByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsTasksByTaskIdStopResponse
+ = PostWorkflowsTasksByTaskIdStopResponses[keyof PostWorkflowsTasksByTaskIdStopResponses]
+
+export type PostWorkflowsByWorkflowIdRunData = {
+ body: WorkflowRunPayload
+ path: {
+ workflow_id: string
+ }
+ query?: never
+ url: '/workflows/{workflow_id}/run'
+}
+
+export type PostWorkflowsByWorkflowIdRunErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 429: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsByWorkflowIdRunError
+ = PostWorkflowsByWorkflowIdRunErrors[keyof PostWorkflowsByWorkflowIdRunErrors]
+
+export type PostWorkflowsByWorkflowIdRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsByWorkflowIdRunResponse
+ = PostWorkflowsByWorkflowIdRunResponses[keyof PostWorkflowsByWorkflowIdRunResponses]
+
+export type GetWorkspacesCurrentModelsModelTypesByModelTypeData = {
+ body?: never
+ path: {
+ model_type: string
+ }
+ query?: never
+ url: '/workspaces/current/models/model-types/{model_type}'
+}
+
+export type GetWorkspacesCurrentModelsModelTypesByModelTypeErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentModelsModelTypesByModelTypeError
+ = GetWorkspacesCurrentModelsModelTypesByModelTypeErrors[keyof GetWorkspacesCurrentModelsModelTypesByModelTypeErrors]
+
+export type GetWorkspacesCurrentModelsModelTypesByModelTypeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkspacesCurrentModelsModelTypesByModelTypeResponse
+ = GetWorkspacesCurrentModelsModelTypesByModelTypeResponses[keyof GetWorkspacesCurrentModelsModelTypesByModelTypeResponses]
diff --git a/packages/contracts/generated/api/service/zod.gen.ts b/packages/contracts/generated/api/service/zod.gen.ts
new file mode 100644
index 00000000000..2c2400c0cb8
--- /dev/null
+++ b/packages/contracts/generated/api/service/zod.gen.ts
@@ -0,0 +1,1558 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import * as z from 'zod'
+
+/**
+ * Annotation
+ */
+export const zAnnotation = z.object({
+ content: z.string().nullish(),
+ created_at: z.int().nullish(),
+ hit_count: z.int().nullish(),
+ id: z.string(),
+ question: z.string().nullish(),
+})
+
+/**
+ * AnnotationCreatePayload
+ */
+export const zAnnotationCreatePayload = z.object({
+ answer: z.string(),
+ question: z.string(),
+})
+
+/**
+ * AnnotationList
+ */
+export const zAnnotationList = z.object({
+ data: z.array(zAnnotation),
+ has_more: z.boolean(),
+ limit: z.int(),
+ page: z.int(),
+ total: z.int(),
+})
+
+/**
+ * AnnotationReplyActionPayload
+ */
+export const zAnnotationReplyActionPayload = z.object({
+ embedding_model_name: z.string(),
+ embedding_provider_name: z.string(),
+ score_threshold: z.number(),
+})
+
+/**
+ * ChatRequestPayload
+ */
+export const zChatRequestPayload = z.object({
+ auto_generate_name: z.boolean().optional().default(true),
+ conversation_id: z.string().nullish(),
+ files: z.array(z.record(z.string(), z.unknown())).nullish(),
+ inputs: z.record(z.string(), z.unknown()),
+ query: z.string(),
+ response_mode: z.enum(['blocking', 'streaming']).nullish(),
+ retriever_from: z.string().optional().default('dev'),
+ workflow_id: z.string().nullish(),
+})
+
+/**
+ * ChildChunkCreatePayload
+ */
+export const zChildChunkCreatePayload = z.object({
+ content: z.string(),
+})
+
+/**
+ * ChildChunkListQuery
+ */
+export const zChildChunkListQuery = z.object({
+ keyword: z.string().nullish(),
+ limit: z.int().gte(1).optional().default(20),
+ page: z.int().gte(1).optional().default(1),
+})
+
+/**
+ * ChildChunkUpdatePayload
+ */
+export const zChildChunkUpdatePayload = z.object({
+ content: z.string(),
+})
+
+/**
+ * CompletionRequestPayload
+ */
+export const zCompletionRequestPayload = 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('dev'),
+})
+
+/**
+ * ConversationListQuery
+ */
+export const zConversationListQuery = z.object({
+ last_id: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ sort_by: z
+ .enum(['created_at', '-created_at', 'updated_at', '-updated_at'])
+ .optional()
+ .default('-updated_at'),
+})
+
+/**
+ * ConversationRenamePayload
+ */
+export const zConversationRenamePayload = z.object({
+ auto_generate: z.boolean().optional().default(false),
+ name: z.string().nullish(),
+})
+
+/**
+ * ConversationVariableResponse
+ */
+export const zConversationVariableResponse = z.object({
+ created_at: z.int().nullish(),
+ description: z.string().nullish(),
+ id: z.string(),
+ name: z.string(),
+ updated_at: z.int().nullish(),
+ value: z.string().nullish(),
+ value_type: z.string(),
+})
+
+/**
+ * ConversationVariableInfiniteScrollPaginationResponse
+ */
+export const zConversationVariableInfiniteScrollPaginationResponse = z.object({
+ data: z.array(zConversationVariableResponse),
+ has_more: z.boolean(),
+ limit: z.int(),
+})
+
+/**
+ * ConversationVariableUpdatePayload
+ */
+export const zConversationVariableUpdatePayload = z.object({
+ value: z.unknown(),
+})
+
+/**
+ * ConversationVariablesQuery
+ */
+export const zConversationVariablesQuery = z.object({
+ last_id: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ variable_name: z.string().min(1).max(255).nullish(),
+})
+
+/**
+ * DocumentBatchDownloadZipPayload
+ *
+ * Request payload for bulk downloading documents as a zip archive.
+ */
+export const zDocumentBatchDownloadZipPayload = z.object({
+ document_ids: z.array(z.uuid()).min(1).max(100),
+})
+
+/**
+ * FeedbackListQuery
+ */
+export const zFeedbackListQuery = z.object({
+ limit: z.int().gte(1).lte(101).optional().default(20),
+ page: z.int().gte(1).optional().default(1),
+})
+
+/**
+ * FilePreviewQuery
+ */
+export const zFilePreviewQuery = z.object({
+ as_attachment: z.boolean().optional().default(false),
+})
+
+/**
+ * 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(),
+})
+
+/**
+ * MessageFeedbackPayload
+ */
+export const zMessageFeedbackPayload = z.object({
+ content: z.string().nullish(),
+ rating: z.enum(['like', 'dislike']).nullish(),
+})
+
+/**
+ * MessageListQuery
+ */
+export const zMessageListQuery = z.object({
+ conversation_id: z.string(),
+ first_id: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+})
+
+/**
+ * MetadataArgs
+ */
+export const zMetadataArgs = z.object({
+ name: z.string(),
+ type: z.enum(['string', 'number', 'time']),
+})
+
+/**
+ * MetadataUpdatePayload
+ */
+export const zMetadataUpdatePayload = z.object({
+ name: z.string(),
+})
+
+/**
+ * SegmentCreatePayload
+ */
+export const zSegmentCreatePayload = z.object({
+ segments: z.array(z.record(z.string(), z.unknown())).nullish(),
+})
+
+/**
+ * SegmentListQuery
+ */
+export const zSegmentListQuery = z.object({
+ keyword: z.string().nullish(),
+ status: z.array(z.string()).optional(),
+})
+
+/**
+ * TagBindingPayload
+ */
+export const zTagBindingPayload = z.object({
+ tag_ids: z.array(z.string()),
+ target_id: z.string(),
+})
+
+/**
+ * TagCreatePayload
+ */
+export const zTagCreatePayload = z.object({
+ name: z.string().min(1).max(50),
+})
+
+/**
+ * TagDeletePayload
+ */
+export const zTagDeletePayload = z.object({
+ tag_id: z.string(),
+})
+
+/**
+ * TagUnbindingPayload
+ */
+export const zTagUnbindingPayload = z.object({
+ tag_id: z.string(),
+ target_id: z.string(),
+})
+
+/**
+ * TagUpdatePayload
+ */
+export const zTagUpdatePayload = z.object({
+ name: z.string().min(1).max(50),
+ tag_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(),
+})
+
+/**
+ * WorkflowLogQuery
+ */
+export const zWorkflowLogQuery = z.object({
+ created_at__after: z.string().nullish(),
+ created_at__before: z.string().nullish(),
+ created_by_account: z.string().nullish(),
+ created_by_end_user_session_id: z.string().nullish(),
+ keyword: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ page: z.int().gte(1).lte(99999).optional().default(1),
+ status: z.enum(['succeeded', 'failed', 'stopped']).nullish(),
+})
+
+/**
+ * WorkflowRunPayload
+ */
+export const zWorkflowRunPayload = z.object({
+ files: z.array(z.record(z.string(), z.unknown())).nullish(),
+ inputs: z.record(z.string(), z.unknown()),
+ response_mode: z.enum(['blocking', 'streaming']).nullish(),
+})
+
+/**
+ * WorkflowRunResponse
+ */
+export const zWorkflowRunResponse = z.object({
+ created_at: z.int().nullish(),
+ elapsed_time: z.unknown().optional(),
+ error: z.string().nullish(),
+ finished_at: z.int().nullish(),
+ id: z.string(),
+ inputs: z.unknown().optional(),
+ outputs: z.record(z.string(), z.unknown()).optional(),
+ status: z.string(),
+ total_steps: z.int().nullish(),
+ total_tokens: z.int().nullish(),
+ workflow_id: z.string(),
+})
+
+/**
+ * DatasetPermissionEnum
+ */
+export const zDatasetPermissionEnum = z.enum(['only_me', 'all_team_members', 'partial_members'])
+
+/**
+ * RerankingModel
+ */
+export const zRerankingModel = z.object({
+ reranking_model_name: z.string().nullish(),
+ reranking_provider_name: z.string().nullish(),
+})
+
+/**
+ * RetrievalMethod
+ */
+export const zRetrievalMethod = z.enum([
+ 'semantic_search',
+ 'full_text_search',
+ 'hybrid_search',
+ 'keyword_search',
+])
+
+/**
+ * WeightKeywordSetting
+ */
+export const zWeightKeywordSetting = z.object({
+ keyword_weight: z.number(),
+})
+
+/**
+ * WeightVectorSetting
+ */
+export const zWeightVectorSetting = z.object({
+ embedding_model_name: z.string(),
+ embedding_provider_name: z.string(),
+ vector_weight: z.number(),
+})
+
+/**
+ * WeightModel
+ */
+export const zWeightModel = z.object({
+ keyword_setting: zWeightKeywordSetting.optional(),
+ vector_setting: zWeightVectorSetting.optional(),
+ weight_type: z.enum(['semantic_first', 'keyword_first', 'customized']).nullish(),
+})
+
+/**
+ * RetrievalModel
+ */
+export const zRetrievalModel = z.object({
+ reranking_enable: z.boolean(),
+ reranking_mode: z.string().nullish(),
+ reranking_model: zRerankingModel.optional(),
+ score_threshold: z.number().nullish(),
+ score_threshold_enabled: z.boolean(),
+ search_method: zRetrievalMethod,
+ top_k: z.int(),
+ weights: zWeightModel.optional(),
+})
+
+/**
+ * DatasetCreatePayload
+ */
+export const zDatasetCreatePayload = z.object({
+ description: z.string().max(400).optional().default(''),
+ embedding_model: z.string().nullish(),
+ embedding_model_provider: z.string().nullish(),
+ external_knowledge_api_id: z.string().nullish(),
+ external_knowledge_id: z.string().nullish(),
+ indexing_technique: z.enum(['high_quality', 'economy']).nullish(),
+ name: z.string().min(1).max(40),
+ permission: zDatasetPermissionEnum.optional(),
+ provider: z.string().optional().default('vendor'),
+ retrieval_model: zRetrievalModel.optional(),
+ summary_index_setting: z.record(z.string(), z.unknown()).nullish(),
+})
+
+/**
+ * DatasetUpdatePayload
+ */
+export const zDatasetUpdatePayload = z.object({
+ description: z.string().max(400).nullish(),
+ embedding_model: z.string().nullish(),
+ embedding_model_provider: z.string().nullish(),
+ external_knowledge_api_id: z.string().nullish(),
+ external_knowledge_id: z.string().nullish(),
+ external_retrieval_model: z.record(z.string(), z.unknown()).nullish(),
+ indexing_technique: z.enum(['high_quality', 'economy']).nullish(),
+ name: z.string().min(1).max(40).nullish(),
+ partial_member_list: z.array(z.record(z.string(), z.string())).nullish(),
+ permission: zDatasetPermissionEnum.optional(),
+ retrieval_model: zRetrievalModel.optional(),
+})
+
+/**
+ * HitTestingPayload
+ */
+export const zHitTestingPayload = z.object({
+ attachment_ids: z.array(z.string()).nullish(),
+ external_retrieval_model: z.record(z.string(), z.unknown()).nullish(),
+ query: z.string().max(250),
+ retrieval_model: zRetrievalModel.optional(),
+})
+
+/**
+ * PreProcessingRule
+ */
+export const zPreProcessingRule = z.object({
+ enabled: z.boolean(),
+ id: z.string(),
+})
+
+/**
+ * Segmentation
+ */
+export const zSegmentation = z.object({
+ chunk_overlap: z.int().optional().default(0),
+ max_tokens: z.int(),
+ separator: z.string().optional().default('\n'),
+})
+
+/**
+ * Rule
+ */
+export const zRule = z.object({
+ parent_mode: z.enum(['full-doc', 'paragraph']).nullish(),
+ pre_processing_rules: z.array(zPreProcessingRule).nullish(),
+ segmentation: zSegmentation.optional(),
+ subchunk_segmentation: zSegmentation.optional(),
+})
+
+/**
+ * ProcessRule
+ */
+export const zProcessRule = z.object({
+ mode: z.enum(['automatic', 'custom', 'hierarchical']),
+ rules: zRule.optional(),
+})
+
+/**
+ * DocumentTextCreatePayload
+ */
+export const zDocumentTextCreatePayload = z.object({
+ doc_form: z.string().optional().default('text_model'),
+ doc_language: z.string().optional().default('English'),
+ embedding_model: z.string().nullish(),
+ embedding_model_provider: z.string().nullish(),
+ indexing_technique: z.string().nullish(),
+ name: z.string(),
+ original_document_id: z.string().nullish(),
+ process_rule: zProcessRule.optional(),
+ retrieval_model: zRetrievalModel.optional(),
+ text: z.string(),
+})
+
+/**
+ * DocumentTextUpdate
+ */
+export const zDocumentTextUpdate = z.object({
+ doc_form: z.string().optional().default('text_model'),
+ doc_language: z.string().optional().default('English'),
+ name: z.string().nullish(),
+ process_rule: zProcessRule.optional(),
+ retrieval_model: zRetrievalModel.optional(),
+ text: z.string().nullish(),
+})
+
+export const zJsonValue = z.unknown()
+
+/**
+ * HumanInputFormSubmitPayload
+ */
+export const zHumanInputFormSubmitPayload = z.object({
+ action: z.string(),
+ inputs: z.record(z.string(), zJsonValue),
+})
+
+/**
+ * MetadataDetail
+ */
+export const zMetadataDetail = z.object({
+ id: z.string(),
+ name: z.string(),
+ value: z.unknown().optional(),
+})
+
+/**
+ * DocumentMetadataOperation
+ */
+export const zDocumentMetadataOperation = z.object({
+ document_id: z.string(),
+ metadata_list: z.array(zMetadataDetail),
+ partial_update: z.boolean().optional().default(false),
+})
+
+/**
+ * MetadataOperationData
+ *
+ * Metadata operation data
+ */
+export const zMetadataOperationData = z.object({
+ operation_data: z.array(zDocumentMetadataOperation),
+})
+
+/**
+ * SegmentUpdateArgs
+ */
+export const zSegmentUpdateArgs = z.object({
+ answer: z.string().nullish(),
+ attachment_ids: z.array(z.string()).nullish(),
+ content: z.string().nullish(),
+ enabled: z.boolean().nullish(),
+ keywords: z.array(z.string()).nullish(),
+ regenerate_child_chunks: z.boolean().optional().default(false),
+ summary: z.string().nullish(),
+})
+
+/**
+ * SegmentUpdatePayload
+ */
+export const zSegmentUpdatePayload = z.object({
+ segment: zSegmentUpdateArgs,
+})
+
+/**
+ * SimpleAccount
+ */
+export const zSimpleAccount = z.object({
+ email: z.string(),
+ id: z.string(),
+ name: z.string(),
+})
+
+/**
+ * SimpleEndUser
+ */
+export const zSimpleEndUser = z.object({
+ id: z.string(),
+ is_anonymous: z.boolean(),
+ session_id: z.string().nullish(),
+ type: z.string(),
+})
+
+/**
+ * WorkflowRunForLogResponse
+ */
+export const zWorkflowRunForLogResponse = z.object({
+ created_at: z.int().nullish(),
+ elapsed_time: z.unknown().optional(),
+ error: z.string().nullish(),
+ exceptions_count: z.int().nullish(),
+ finished_at: z.int().nullish(),
+ id: z.string(),
+ status: z.string().nullish(),
+ total_steps: z.int().nullish(),
+ total_tokens: z.int().nullish(),
+ triggered_from: z.string().nullish(),
+ version: z.string().nullish(),
+})
+
+/**
+ * WorkflowAppLogPartialResponse
+ */
+export const zWorkflowAppLogPartialResponse = z.object({
+ created_at: z.int().nullish(),
+ created_by_account: zSimpleAccount.optional(),
+ created_by_end_user: zSimpleEndUser.optional(),
+ created_by_role: z.string().nullish(),
+ created_from: z.string().nullish(),
+ details: z.unknown().optional(),
+ id: z.string(),
+ workflow_run: zWorkflowRunForLogResponse.optional(),
+})
+
+/**
+ * WorkflowAppLogPaginationResponse
+ */
+export const zWorkflowAppLogPaginationResponse = z.object({
+ data: z.array(zWorkflowAppLogPartialResponse),
+ has_more: z.boolean(),
+ limit: z.int(),
+ page: z.int(),
+ total: z.int(),
+})
+
+/**
+ * Success
+ */
+export const zGetRootResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppFeedbacksQuery = z.object({
+ limit: z.int().gte(1).lte(101).optional().default(20),
+ page: z.int().gte(1).optional().default(1),
+})
+
+/**
+ * Feedbacks retrieved successfully
+ */
+export const zGetAppFeedbacksResponse = z.record(z.string(), z.unknown())
+
+export const zPostAppsAnnotationReplyByActionBody = zAnnotationReplyActionPayload
+
+export const zPostAppsAnnotationReplyByActionPath = z.object({
+ action: z.string(),
+})
+
+/**
+ * Action completed successfully
+ */
+export const zPostAppsAnnotationReplyByActionResponse = z.record(z.string(), z.unknown())
+
+export const zGetAppsAnnotationReplyByActionStatusByJobIdPath = z.object({
+ action: z.string(),
+ job_id: z.string(),
+})
+
+/**
+ * Job status retrieved successfully
+ */
+export const zGetAppsAnnotationReplyByActionStatusByJobIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+/**
+ * Annotations retrieved successfully
+ */
+export const zGetAppsAnnotationsResponse = zAnnotationList
+
+export const zPostAppsAnnotationsBody = zAnnotationCreatePayload
+
+/**
+ * Annotation created successfully
+ */
+export const zPostAppsAnnotationsResponse = zAnnotation
+
+export const zDeleteAppsAnnotationsByAnnotationIdPath = z.object({
+ annotation_id: z.string(),
+})
+
+/**
+ * Annotation deleted successfully
+ */
+export const zDeleteAppsAnnotationsByAnnotationIdResponse = z.record(z.string(), z.unknown())
+
+export const zPutAppsAnnotationsByAnnotationIdBody = zAnnotationCreatePayload
+
+export const zPutAppsAnnotationsByAnnotationIdPath = z.object({
+ annotation_id: z.string(),
+})
+
+/**
+ * Annotation updated successfully
+ */
+export const zPutAppsAnnotationsByAnnotationIdResponse = zAnnotation
+
+/**
+ * Audio successfully transcribed
+ */
+export const zPostAudioToTextResponse = z.record(z.string(), z.unknown())
+
+export const zPostChatMessagesBody = zChatRequestPayload
+
+/**
+ * Message sent successfully
+ */
+export const zPostChatMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zPostChatMessagesByTaskIdStopPath = z.object({
+ task_id: z.string(),
+})
+
+/**
+ * Task stopped successfully
+ */
+export const zPostChatMessagesByTaskIdStopResponse = z.record(z.string(), z.unknown())
+
+export const zPostCompletionMessagesBody = zCompletionRequestPayload
+
+/**
+ * Completion created successfully
+ */
+export const zPostCompletionMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zPostCompletionMessagesByTaskIdStopPath = z.object({
+ task_id: z.string(),
+})
+
+/**
+ * Task stopped successfully
+ */
+export const zPostCompletionMessagesByTaskIdStopResponse = z.record(z.string(), z.unknown())
+
+export const zGetConversationsQuery = z.object({
+ last_id: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ sort_by: z
+ .enum(['created_at', '-created_at', 'updated_at', '-updated_at'])
+ .optional()
+ .default('-updated_at'),
+})
+
+/**
+ * Conversations retrieved successfully
+ */
+export const zGetConversationsResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteConversationsByCIdPath = z.object({
+ c_id: z.string(),
+})
+
+/**
+ * Conversation deleted successfully
+ */
+export const zDeleteConversationsByCIdResponse = z.record(z.string(), z.unknown())
+
+export const zPostConversationsByCIdNameBody = zConversationRenamePayload
+
+export const zPostConversationsByCIdNamePath = z.object({
+ c_id: z.string(),
+})
+
+/**
+ * Conversation renamed successfully
+ */
+export const zPostConversationsByCIdNameResponse = z.record(z.string(), z.unknown())
+
+export const zGetConversationsByCIdVariablesPath = z.object({
+ c_id: z.string(),
+})
+
+export const zGetConversationsByCIdVariablesQuery = z.object({
+ last_id: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ variable_name: z.string().min(1).max(255).nullish(),
+})
+
+/**
+ * Variables retrieved successfully
+ */
+export const zGetConversationsByCIdVariablesResponse
+ = zConversationVariableInfiniteScrollPaginationResponse
+
+export const zPutConversationsByCIdVariablesByVariableIdBody = zConversationVariableUpdatePayload
+
+export const zPutConversationsByCIdVariablesByVariableIdPath = z.object({
+ c_id: z.string(),
+ variable_id: z.string(),
+})
+
+/**
+ * Variable updated successfully
+ */
+export const zPutConversationsByCIdVariablesByVariableIdResponse = zConversationVariableResponse
+
+/**
+ * Datasets retrieved successfully
+ */
+export const zGetDatasetsResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsBody = zDatasetCreatePayload
+
+/**
+ * Dataset created successfully
+ */
+export const zPostDatasetsResponse = z.record(z.string(), z.unknown())
+
+/**
+ * File uploaded successfully
+ */
+export const zPostDatasetsPipelineFileUploadResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteDatasetsTagsBody = zTagDeletePayload
+
+/**
+ * Tag deleted successfully
+ */
+export const zDeleteDatasetsTagsResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Tags retrieved successfully
+ */
+export const zGetDatasetsTagsResponse = z.record(z.string(), z.unknown())
+
+export const zPatchDatasetsTagsBody = zTagUpdatePayload
+
+/**
+ * Tag updated successfully
+ */
+export const zPatchDatasetsTagsResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsTagsBody = zTagCreatePayload
+
+/**
+ * Tag created successfully
+ */
+export const zPostDatasetsTagsResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsTagsBindingBody = zTagBindingPayload
+
+/**
+ * Tags bound successfully
+ */
+export const zPostDatasetsTagsBindingResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsTagsUnbindingBody = zTagUnbindingPayload
+
+/**
+ * Tag unbound successfully
+ */
+export const zPostDatasetsTagsUnbindingResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteDatasetsByDatasetIdPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Dataset deleted successfully
+ */
+export const zDeleteDatasetsByDatasetIdResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Dataset retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdResponse = z.record(z.string(), z.unknown())
+
+export const zPatchDatasetsByDatasetIdBody = zDatasetUpdatePayload
+
+export const zPatchDatasetsByDatasetIdPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Dataset updated successfully
+ */
+export const zPatchDatasetsByDatasetIdResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdDocumentCreateByFilePath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Document created successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentCreateByFileResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentCreateByTextBody = zDocumentTextCreatePayload
+
+export const zPostDatasetsByDatasetIdDocumentCreateByTextPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Document created successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentCreateByTextResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentCreateByFile2Path = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Document created successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentCreateByFile2Response = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentCreateByText2Body = zDocumentTextCreatePayload
+
+export const zPostDatasetsByDatasetIdDocumentCreateByText2Path = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Document created successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentCreateByText2Response = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Documents retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdDocumentsDownloadZipBody = zDocumentBatchDownloadZipPayload
+
+export const zPostDatasetsByDatasetIdDocumentsDownloadZipPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * ZIP archive generated successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsDownloadZipResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsMetadataBody = zMetadataOperationData
+
+export const zPostDatasetsByDatasetIdDocumentsMetadataPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Documents metadata updated successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsMetadataResponse = z.record(z.string(), z.unknown())
+
+export const zPatchDatasetsByDatasetIdDocumentsStatusByActionPath = z.object({
+ dataset_id: z.string(),
+ action: z.string(),
+})
+
+/**
+ * Document status updated successfully
+ */
+export const zPatchDatasetsByDatasetIdDocumentsStatusByActionResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByBatchIndexingStatusPath = z.object({
+ dataset_id: z.string(),
+ batch: z.string(),
+})
+
+/**
+ * Indexing status retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByBatchIndexingStatusResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Document deleted successfully
+ */
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Document retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Document updated successfully
+ */
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Download URL generated successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdDownloadResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsQuery = z.object({
+ keyword: z.string().nullish(),
+ status: z.array(z.string()).optional(),
+})
+
+/**
+ * Segments retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBody = zSegmentCreatePayload
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Segments created successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+})
+
+/**
+ * Segment deleted successfully
+ */
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath = z.object({
+ segment_id: z.string(),
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Segment retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdBody
+ = zSegmentUpdatePayload
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+})
+
+/**
+ * Segment updated successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath
+ = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+ })
+
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksQuery
+ = z.object({
+ keyword: z.string().nullish(),
+ limit: z.int().gte(1).optional().default(20),
+ page: z.int().gte(1).optional().default(1),
+ })
+
+/**
+ * Child chunks retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksBody
+ = zChildChunkCreatePayload
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksPath
+ = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+ })
+
+/**
+ * Child chunk created successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksResponse
+ = z.record(z.string(), z.unknown())
+
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath
+ = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+ child_chunk_id: z.string(),
+ })
+
+/**
+ * Child chunk deleted successfully
+ */
+export const zDeleteDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdBody
+ = zChildChunkUpdatePayload
+
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdPath
+ = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+ segment_id: z.string(),
+ child_chunk_id: z.string(),
+ })
+
+/**
+ * Child chunk updated successfully
+ */
+export const zPatchDatasetsByDatasetIdDocumentsByDocumentIdSegmentsBySegmentIdChildChunksByChildChunkIdResponse
+ = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFilePath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Document updated successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFileResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextBody = zDocumentTextUpdate
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextPath = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Document updated successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByTextResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Path = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Document updated successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByFile2Response = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Body = zDocumentTextUpdate
+
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Path = z.object({
+ dataset_id: z.string(),
+ document_id: z.string(),
+})
+
+/**
+ * Document updated successfully
+ */
+export const zPostDatasetsByDatasetIdDocumentsByDocumentIdUpdateByText2Response = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdHitTestingBody = zHitTestingPayload
+
+export const zPostDatasetsByDatasetIdHitTestingPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Hit testing results
+ */
+export const zPostDatasetsByDatasetIdHitTestingResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdMetadataPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Metadata retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdMetadataResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdMetadataBody = zMetadataArgs
+
+export const zPostDatasetsByDatasetIdMetadataPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Metadata created successfully
+ */
+export const zPostDatasetsByDatasetIdMetadataResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdMetadataBuiltInPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Built-in fields retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdMetadataBuiltInResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdMetadataBuiltInByActionPath = z.object({
+ dataset_id: z.string(),
+ action: z.string(),
+})
+
+/**
+ * Action completed successfully
+ */
+export const zPostDatasetsByDatasetIdMetadataBuiltInByActionResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdPath = z.object({
+ dataset_id: z.string(),
+ metadata_id: z.string(),
+})
+
+/**
+ * Metadata deleted successfully
+ */
+export const zDeleteDatasetsByDatasetIdMetadataByMetadataIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPatchDatasetsByDatasetIdMetadataByMetadataIdBody = zMetadataUpdatePayload
+
+export const zPatchDatasetsByDatasetIdMetadataByMetadataIdPath = z.object({
+ dataset_id: z.string(),
+ metadata_id: z.string(),
+})
+
+/**
+ * Metadata updated successfully
+ */
+export const zPatchDatasetsByDatasetIdMetadataByMetadataIdResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zGetDatasetsByDatasetIdPipelineDatasourcePluginsPath = z.object({
+ dataset_id: z.string(),
+})
+
+export const zGetDatasetsByDatasetIdPipelineDatasourcePluginsQuery = z.object({
+ is_published: z.string().optional(),
+})
+
+/**
+ * Datasource plugins retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdPipelineDatasourcePluginsResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunPath = z.object({
+ dataset_id: z.string(),
+ node_id: z.string(),
+})
+
+/**
+ * Datasource node run successfully
+ */
+export const zPostDatasetsByDatasetIdPipelineDatasourceNodesByNodeIdRunResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
+
+export const zPostDatasetsByDatasetIdPipelineRunPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Pipeline run successfully
+ */
+export const zPostDatasetsByDatasetIdPipelineRunResponse = z.record(z.string(), z.unknown())
+
+export const zPostDatasetsByDatasetIdRetrieveBody = zHitTestingPayload
+
+export const zPostDatasetsByDatasetIdRetrievePath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Hit testing results
+ */
+export const zPostDatasetsByDatasetIdRetrieveResponse = z.record(z.string(), z.unknown())
+
+export const zGetDatasetsByDatasetIdTagsPath = z.object({
+ dataset_id: z.string(),
+})
+
+/**
+ * Tags retrieved successfully
+ */
+export const zGetDatasetsByDatasetIdTagsResponse = z.record(z.string(), z.unknown())
+
+export const zGetEndUsersByEndUserIdPath = z.object({
+ end_user_id: z.string(),
+})
+
+/**
+ * End user retrieved successfully
+ */
+export const zGetEndUsersByEndUserIdResponse = z.record(z.string(), z.unknown())
+
+/**
+ * File uploaded successfully
+ */
+export const zPostFilesUploadResponse = zFileResponse
+
+export const zGetFilesByFileIdPreviewPath = z.object({
+ file_id: z.string(),
+})
+
+export const zGetFilesByFileIdPreviewQuery = z.object({
+ as_attachment: z.boolean().optional().default(false),
+})
+
+/**
+ * File retrieved successfully
+ */
+export const zGetFilesByFileIdPreviewResponse = z.record(z.string(), z.unknown())
+
+export const zGetFormHumanInputByFormTokenPath = z.object({
+ form_token: z.string(),
+})
+
+/**
+ * Form retrieved successfully
+ */
+export const zGetFormHumanInputByFormTokenResponse = z.record(z.string(), z.unknown())
+
+export const zPostFormHumanInputByFormTokenBody = zHumanInputFormSubmitPayload
+
+export const zPostFormHumanInputByFormTokenPath = z.object({
+ form_token: z.string(),
+})
+
+/**
+ * Form submitted successfully
+ */
+export const zPostFormHumanInputByFormTokenResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Application info retrieved successfully
+ */
+export const zGetInfoResponse = z.record(z.string(), z.unknown())
+
+export const zGetMessagesQuery = z.object({
+ conversation_id: z.string(),
+ first_id: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+})
+
+/**
+ * Messages retrieved successfully
+ */
+export const zGetMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zPostMessagesByMessageIdFeedbacksBody = zMessageFeedbackPayload
+
+export const zPostMessagesByMessageIdFeedbacksPath = z.object({
+ message_id: z.string(),
+})
+
+/**
+ * Feedback submitted successfully
+ */
+export const zPostMessagesByMessageIdFeedbacksResponse = z.record(z.string(), z.unknown())
+
+export const zGetMessagesByMessageIdSuggestedPath = z.object({
+ message_id: z.string(),
+})
+
+/**
+ * Suggested questions retrieved successfully
+ */
+export const zGetMessagesByMessageIdSuggestedResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Metadata retrieved successfully
+ */
+export const zGetMetaResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Parameters retrieved successfully
+ */
+export const zGetParametersResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Site configuration retrieved successfully
+ */
+export const zGetSiteResponse = z.record(z.string(), z.unknown())
+
+export const zPostTextToAudioBody = zTextToAudioPayload
+
+/**
+ * Text successfully converted to audio
+ */
+export const zPostTextToAudioResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkflowByTaskIdEventsPath = z.object({
+ task_id: z.string(),
+})
+
+export const zGetWorkflowByTaskIdEventsQuery = z.object({
+ user: z.string().optional(),
+ include_state_snapshot: z.string().optional(),
+ continue_on_pause: z.string().optional(),
+})
+
+/**
+ * SSE event stream
+ */
+export const zGetWorkflowByTaskIdEventsResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkflowsLogsQuery = z.object({
+ created_at__after: z.string().nullish(),
+ created_at__before: z.string().nullish(),
+ created_by_account: z.string().nullish(),
+ created_by_end_user_session_id: z.string().nullish(),
+ keyword: z.string().nullish(),
+ limit: z.int().gte(1).lte(100).optional().default(20),
+ page: z.int().gte(1).lte(99999).optional().default(1),
+ status: z.enum(['succeeded', 'failed', 'stopped']).nullish(),
+})
+
+/**
+ * Logs retrieved successfully
+ */
+export const zGetWorkflowsLogsResponse = zWorkflowAppLogPaginationResponse
+
+export const zPostWorkflowsRunBody = zWorkflowRunPayload
+
+/**
+ * Workflow executed successfully
+ */
+export const zPostWorkflowsRunResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkflowsRunByWorkflowRunIdPath = z.object({
+ workflow_run_id: z.string(),
+})
+
+/**
+ * Workflow run details retrieved successfully
+ */
+export const zGetWorkflowsRunByWorkflowRunIdResponse = zWorkflowRunResponse
+
+export const zPostWorkflowsTasksByTaskIdStopPath = z.object({
+ task_id: z.string(),
+})
+
+/**
+ * Task stopped successfully
+ */
+export const zPostWorkflowsTasksByTaskIdStopResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkflowsByWorkflowIdRunBody = zWorkflowRunPayload
+
+export const zPostWorkflowsByWorkflowIdRunPath = z.object({
+ workflow_id: z.string(),
+})
+
+/**
+ * Workflow executed successfully
+ */
+export const zPostWorkflowsByWorkflowIdRunResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkspacesCurrentModelsModelTypesByModelTypePath = z.object({
+ model_type: z.string(),
+})
+
+/**
+ * Models retrieved successfully
+ */
+export const zGetWorkspacesCurrentModelsModelTypesByModelTypeResponse = z.record(
+ z.string(),
+ z.unknown(),
+)
diff --git a/packages/contracts/generated/api/web/orpc.gen.ts b/packages/contracts/generated/api/web/orpc.gen.ts
new file mode 100644
index 00000000000..459d5561451
--- /dev/null
+++ b/packages/contracts/generated/api/web/orpc.gen.ts
@@ -0,0 +1,1085 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zDeleteConversationsByCIdPath,
+ zDeleteConversationsByCIdResponse,
+ zDeleteSavedMessagesByMessageIdPath,
+ zDeleteSavedMessagesByMessageIdResponse,
+ zGetConversationsQuery,
+ zGetConversationsResponse,
+ zGetFormHumanInputByFormTokenPath,
+ zGetFormHumanInputByFormTokenResponse,
+ zGetLoginStatusResponse,
+ zGetMessagesByMessageIdMoreLikeThisPath,
+ zGetMessagesByMessageIdMoreLikeThisQuery,
+ zGetMessagesByMessageIdMoreLikeThisResponse,
+ zGetMessagesByMessageIdSuggestedQuestionsPath,
+ zGetMessagesByMessageIdSuggestedQuestionsResponse,
+ zGetMessagesQuery,
+ zGetMessagesResponse,
+ zGetMetaResponse,
+ zGetParametersResponse,
+ zGetPassportResponse,
+ zGetRemoteFilesByUrlPath,
+ zGetRemoteFilesByUrlResponse,
+ zGetSavedMessagesQuery,
+ zGetSavedMessagesResponse,
+ zGetSiteResponse,
+ zGetSystemFeaturesResponse,
+ zGetWebappAccessModeQuery,
+ zGetWebappAccessModeResponse,
+ zGetWebappPermissionQuery,
+ zGetWebappPermissionResponse,
+ zGetWorkflowByTaskIdEventsPath,
+ zGetWorkflowByTaskIdEventsResponse,
+ zPatchConversationsByCIdPinPath,
+ zPatchConversationsByCIdPinResponse,
+ zPatchConversationsByCIdUnpinPath,
+ zPatchConversationsByCIdUnpinResponse,
+ zPostAudioToTextResponse,
+ zPostChatMessagesBody,
+ zPostChatMessagesByTaskIdStopPath,
+ zPostChatMessagesByTaskIdStopResponse,
+ zPostChatMessagesResponse,
+ zPostCompletionMessagesBody,
+ zPostCompletionMessagesByTaskIdStopPath,
+ zPostCompletionMessagesByTaskIdStopResponse,
+ zPostCompletionMessagesResponse,
+ zPostConversationsByCIdNamePath,
+ zPostConversationsByCIdNameQuery,
+ zPostConversationsByCIdNameResponse,
+ zPostEmailCodeLoginBody,
+ zPostEmailCodeLoginResponse,
+ zPostEmailCodeLoginValidityBody,
+ zPostEmailCodeLoginValidityResponse,
+ zPostFilesUploadResponse,
+ zPostForgotPasswordBody,
+ zPostForgotPasswordResetsBody,
+ zPostForgotPasswordResetsResponse,
+ zPostForgotPasswordResponse,
+ zPostForgotPasswordValidityBody,
+ zPostForgotPasswordValidityResponse,
+ zPostFormHumanInputByFormTokenPath,
+ zPostFormHumanInputByFormTokenResponse,
+ zPostLoginBody,
+ zPostLoginResponse,
+ zPostLogoutResponse,
+ zPostMessagesByMessageIdFeedbacksPath,
+ zPostMessagesByMessageIdFeedbacksQuery,
+ zPostMessagesByMessageIdFeedbacksResponse,
+ zPostRemoteFilesUploadResponse,
+ zPostSavedMessagesQuery,
+ zPostSavedMessagesResponse,
+ zPostTextToAudioBody,
+ zPostTextToAudioResponse,
+ zPostWorkflowsRunBody,
+ zPostWorkflowsRunResponse,
+ zPostWorkflowsTasksByTaskIdStopPath,
+ zPostWorkflowsTasksByTaskIdStopResponse,
+} from './zod.gen'
+
+/**
+ * Convert audio to text
+ *
+ * Convert audio file to text using speech-to-text service.
+ */
+export const post = oc
+ .route({
+ description: 'Convert audio file to text using speech-to-text service.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postAudioToText',
+ path: '/audio-to-text',
+ summary: 'Convert audio to text',
+ tags: ['web'],
+ })
+ .output(zPostAudioToTextResponse)
+
+export const audioToText = {
+ post,
+}
+
+/**
+ * Stop a running chat message task.
+ */
+export const post2 = oc
+ .route({
+ description: 'Stop a running chat message task.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postChatMessagesByTaskIdStop',
+ path: '/chat-messages/{task_id}/stop',
+ tags: ['web'],
+ })
+ .input(z.object({ params: zPostChatMessagesByTaskIdStopPath }))
+ .output(zPostChatMessagesByTaskIdStopResponse)
+
+export const stop = {
+ post: post2,
+}
+
+export const byTaskId = {
+ stop,
+}
+
+/**
+ * Create a chat message for conversational applications.
+ */
+export const post3 = oc
+ .route({
+ description: 'Create a chat message for conversational applications.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postChatMessages',
+ path: '/chat-messages',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostChatMessagesBody }))
+ .output(zPostChatMessagesResponse)
+
+export const chatMessages = {
+ post: post3,
+ byTaskId,
+}
+
+/**
+ * Stop a running completion message task.
+ */
+export const post4 = oc
+ .route({
+ description: 'Stop a running completion message task.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postCompletionMessagesByTaskIdStop',
+ path: '/completion-messages/{task_id}/stop',
+ tags: ['web'],
+ })
+ .input(z.object({ params: zPostCompletionMessagesByTaskIdStopPath }))
+ .output(zPostCompletionMessagesByTaskIdStopResponse)
+
+export const stop2 = {
+ post: post4,
+}
+
+export const byTaskId2 = {
+ stop: stop2,
+}
+
+/**
+ * Create a completion message for text generation applications.
+ */
+export const post5 = oc
+ .route({
+ description: 'Create a completion message for text generation applications.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postCompletionMessages',
+ path: '/completion-messages',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostCompletionMessagesBody }))
+ .output(zPostCompletionMessagesResponse)
+
+export const completionMessages = {
+ post: post5,
+ byTaskId: byTaskId2,
+}
+
+/**
+ * Rename a specific conversation with a custom name or auto-generate one.
+ */
+export const post6 = oc
+ .route({
+ description: 'Rename a specific conversation with a custom name or auto-generate one.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postConversationsByCIdName',
+ path: '/conversations/{c_id}/name',
+ tags: ['web'],
+ })
+ .input(
+ z.object({
+ params: zPostConversationsByCIdNamePath,
+ query: zPostConversationsByCIdNameQuery.optional(),
+ }),
+ )
+ .output(zPostConversationsByCIdNameResponse)
+
+export const name = {
+ post: post6,
+}
+
+/**
+ * Pin a specific conversation to keep it at the top of the list.
+ */
+export const patch = oc
+ .route({
+ description: 'Pin a specific conversation to keep it at the top of the list.',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchConversationsByCIdPin',
+ path: '/conversations/{c_id}/pin',
+ tags: ['web'],
+ })
+ .input(z.object({ params: zPatchConversationsByCIdPinPath }))
+ .output(zPatchConversationsByCIdPinResponse)
+
+export const pin = {
+ patch,
+}
+
+/**
+ * Unpin a specific conversation to remove it from the top of the list.
+ */
+export const patch2 = oc
+ .route({
+ description: 'Unpin a specific conversation to remove it from the top of the list.',
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'patchConversationsByCIdUnpin',
+ path: '/conversations/{c_id}/unpin',
+ tags: ['web'],
+ })
+ .input(z.object({ params: zPatchConversationsByCIdUnpinPath }))
+ .output(zPatchConversationsByCIdUnpinResponse)
+
+export const unpin = {
+ patch: patch2,
+}
+
+/**
+ * Delete a specific conversation.
+ */
+export const delete_ = oc
+ .route({
+ description: 'Delete a specific conversation.',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteConversationsByCId',
+ path: '/conversations/{c_id}',
+ successStatus: 204,
+ tags: ['web'],
+ })
+ .input(z.object({ params: zDeleteConversationsByCIdPath }))
+ .output(zDeleteConversationsByCIdResponse)
+
+export const byCId = {
+ delete: delete_,
+ name,
+ pin,
+ unpin,
+}
+
+/**
+ * Retrieve paginated list of conversations for a chat application.
+ */
+export const get = oc
+ .route({
+ description: 'Retrieve paginated list of conversations for a chat application.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getConversations',
+ path: '/conversations',
+ tags: ['web'],
+ })
+ .input(z.object({ query: zGetConversationsQuery.optional() }))
+ .output(zGetConversationsResponse)
+
+export const conversations = {
+ get,
+ byCId,
+}
+
+/**
+ * Verify email code and complete login
+ */
+export const post7 = oc
+ .route({
+ description: 'Verify email code and complete login',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postEmailCodeLoginValidity',
+ path: '/email-code-login/validity',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostEmailCodeLoginValidityBody }))
+ .output(zPostEmailCodeLoginValidityResponse)
+
+export const validity = {
+ post: post7,
+}
+
+/**
+ * Send email verification code for login
+ */
+export const post8 = oc
+ .route({
+ description: 'Send email verification code for login',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postEmailCodeLogin',
+ path: '/email-code-login',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostEmailCodeLoginBody }))
+ .output(zPostEmailCodeLoginResponse)
+
+export const emailCodeLogin = {
+ post: post8,
+ validity,
+}
+
+/**
+ * Upload a file for use in web applications
+ *
+ * Upload a file for use in web applications
+ * Accepts file uploads for use within web applications, supporting
+ * multiple file types with automatic validation and storage.
+ *
+ * Args:
+ * app_model: The associated application model
+ * end_user: The end user uploading the file
+ *
+ * Form Parameters:
+ * file: The file to upload (required)
+ * source: Optional source type (datasets or None)
+ *
+ * Returns:
+ * dict: File information including ID, URL, and metadata
+ * int: HTTP status code 201 for success
+ *
+ * Raises:
+ * NoFileUploadedError: No file provided in request
+ * TooManyFilesError: Multiple files provided (only one allowed)
+ * FilenameNotExistsError: File has no filename
+ * FileTooLargeError: File exceeds size limit
+ * UnsupportedFileTypeError: File type not supported
+ */
+export const post9 = oc
+ .route({
+ description:
+ 'Upload a file for use in web applications\nAccepts file uploads for use within web applications, supporting\nmultiple file types with automatic validation and storage.\n\nArgs:\n app_model: The associated application model\n end_user: The end user uploading the file\n\nForm Parameters:\n file: The file to upload (required)\n source: Optional source type (datasets or None)\n\nReturns:\n dict: File information including ID, URL, and metadata\n int: HTTP status code 201 for success\n\nRaises:\n NoFileUploadedError: No file provided in request\n TooManyFilesError: Multiple files provided (only one allowed)\n FilenameNotExistsError: File has no filename\n FileTooLargeError: File exceeds size limit\n UnsupportedFileTypeError: File type not supported',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postFilesUpload',
+ path: '/files/upload',
+ successStatus: 201,
+ summary: 'Upload a file for use in web applications',
+ tags: ['web'],
+ })
+ .output(zPostFilesUploadResponse)
+
+export const upload = {
+ post: post9,
+}
+
+export const files = {
+ upload,
+}
+
+/**
+ * Reset user password with verification token
+ */
+export const post10 = oc
+ .route({
+ description: 'Reset user password with verification token',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postForgotPasswordResets',
+ path: '/forgot-password/resets',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostForgotPasswordResetsBody }))
+ .output(zPostForgotPasswordResetsResponse)
+
+export const resets = {
+ post: post10,
+}
+
+/**
+ * Verify password reset token validity
+ */
+export const post11 = oc
+ .route({
+ description: 'Verify password reset token validity',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postForgotPasswordValidity',
+ path: '/forgot-password/validity',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostForgotPasswordValidityBody }))
+ .output(zPostForgotPasswordValidityResponse)
+
+export const validity2 = {
+ post: post11,
+}
+
+/**
+ * Send password reset email
+ */
+export const post12 = oc
+ .route({
+ description: 'Send password reset email',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postForgotPassword',
+ path: '/forgot-password',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostForgotPasswordBody }))
+ .output(zPostForgotPasswordResponse)
+
+export const forgotPassword = {
+ post: post12,
+ resets,
+ validity: validity2,
+}
+
+/**
+ * Get human input form definition by token
+ *
+ * GET /api/form/human_input/<form_token>
+ */
+export const get2 = oc
+ .route({
+ description: 'GET /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 token',
+ tags: ['web'],
+ })
+ .input(z.object({ params: zGetFormHumanInputByFormTokenPath }))
+ .output(zGetFormHumanInputByFormTokenResponse)
+
+/**
+ * Submit human input form by token
+ *
+ * POST /api/form/human_input/<form_token>
+ *
+ * Request body:
+ * {
+ * "inputs": {
+ * "content": "User input content"
+ * },
+ * "action": "Approve"
+ * }
+ */
+export const post13 = oc
+ .route({
+ description:
+ 'POST /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 token',
+ tags: ['web'],
+ })
+ .input(z.object({ params: zPostFormHumanInputByFormTokenPath }))
+ .output(zPostFormHumanInputByFormTokenResponse)
+
+export const byFormToken = {
+ get: get2,
+ post: post13,
+}
+
+export const humanInput = {
+ byFormToken,
+}
+
+export const form = {
+ humanInput,
+}
+
+/**
+ * Check login status
+ */
+export const get3 = oc
+ .route({
+ description: 'Check login status',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getLoginStatus',
+ path: '/login/status',
+ tags: ['web'],
+ })
+ .output(zGetLoginStatusResponse)
+
+export const status = {
+ get: get3,
+}
+
+/**
+ * Authenticate user and login
+ *
+ * Authenticate user for web application access
+ */
+export const post14 = oc
+ .route({
+ description: 'Authenticate user for web application access',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postLogin',
+ path: '/login',
+ summary: 'Authenticate user and login',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostLoginBody }))
+ .output(zPostLoginResponse)
+
+export const login = {
+ post: post14,
+ status,
+}
+
+/**
+ * Logout user from web application
+ */
+export const post15 = oc
+ .route({
+ description: 'Logout user from web application',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postLogout',
+ path: '/logout',
+ tags: ['web'],
+ })
+ .output(zPostLogoutResponse)
+
+export const logout = {
+ post: post15,
+}
+
+/**
+ * Submit feedback (like/dislike) for a specific message.
+ */
+export const post16 = oc
+ .route({
+ description: 'Submit feedback (like/dislike) for a specific message.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postMessagesByMessageIdFeedbacks',
+ path: '/messages/{message_id}/feedbacks',
+ tags: ['web'],
+ })
+ .input(
+ z.object({
+ params: zPostMessagesByMessageIdFeedbacksPath,
+ query: zPostMessagesByMessageIdFeedbacksQuery.optional(),
+ }),
+ )
+ .output(zPostMessagesByMessageIdFeedbacksResponse)
+
+export const feedbacks = {
+ post: post16,
+}
+
+/**
+ * Generate a new completion similar to an existing message (completion apps only).
+ */
+export const get4 = oc
+ .route({
+ description: 'Generate a new completion similar to an existing message (completion apps only).',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getMessagesByMessageIdMoreLikeThis',
+ path: '/messages/{message_id}/more-like-this',
+ tags: ['web'],
+ })
+ .input(
+ z.object({
+ params: zGetMessagesByMessageIdMoreLikeThisPath,
+ query: zGetMessagesByMessageIdMoreLikeThisQuery,
+ }),
+ )
+ .output(zGetMessagesByMessageIdMoreLikeThisResponse)
+
+export const moreLikeThis = {
+ get: get4,
+}
+
+/**
+ * Get suggested follow-up questions after a message (chat apps only).
+ */
+export const get5 = oc
+ .route({
+ description: 'Get suggested follow-up questions after a message (chat apps only).',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getMessagesByMessageIdSuggestedQuestions',
+ path: '/messages/{message_id}/suggested-questions',
+ tags: ['web'],
+ })
+ .input(z.object({ params: zGetMessagesByMessageIdSuggestedQuestionsPath }))
+ .output(zGetMessagesByMessageIdSuggestedQuestionsResponse)
+
+export const suggestedQuestions = {
+ get: get5,
+}
+
+export const byMessageId = {
+ feedbacks,
+ moreLikeThis,
+ suggestedQuestions,
+}
+
+/**
+ * Retrieve paginated list of messages from a conversation in a chat application.
+ */
+export const get6 = oc
+ .route({
+ description: 'Retrieve paginated list of messages from a conversation in a chat application.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getMessages',
+ path: '/messages',
+ tags: ['web'],
+ })
+ .input(z.object({ query: zGetMessagesQuery }))
+ .output(zGetMessagesResponse)
+
+export const messages = {
+ get: get6,
+ byMessageId,
+}
+
+/**
+ * Get app meta
+ *
+ * Retrieve the metadata for a specific app.
+ */
+export const get7 = oc
+ .route({
+ description: 'Retrieve the metadata for a specific app.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getMeta',
+ path: '/meta',
+ summary: 'Get app meta',
+ tags: ['web'],
+ })
+ .output(zGetMetaResponse)
+
+export const meta = {
+ get: get7,
+}
+
+/**
+ * Retrieve app parameters
+ *
+ * Retrieve the parameters for a specific app.
+ */
+export const get8 = oc
+ .route({
+ description: 'Retrieve the parameters for a specific app.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getParameters',
+ path: '/parameters',
+ summary: 'Retrieve app parameters',
+ tags: ['web'],
+ })
+ .output(zGetParametersResponse)
+
+export const parameters = {
+ get: get8,
+}
+
+/**
+ * Get authentication passport for web application access
+ */
+export const get9 = oc
+ .route({
+ description: 'Get authentication passport for web application access',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getPassport',
+ path: '/passport',
+ tags: ['web'],
+ })
+ .output(zGetPassportResponse)
+
+export const passport = {
+ get: get9,
+}
+
+/**
+ * Upload a file from a remote URL
+ *
+ * Upload a file from a remote URL
+ * Downloads a file from the provided remote URL and uploads it
+ * to the platform storage for use in web applications.
+ *
+ * Args:
+ * app_model: The associated application model
+ * end_user: The end user making the request
+ *
+ * JSON Parameters:
+ * url: The remote URL to download the file from (required)
+ *
+ * Returns:
+ * dict: File information including ID, signed URL, and metadata
+ * int: HTTP status code 201 for success
+ *
+ * Raises:
+ * RemoteFileUploadError: Failed to fetch file from remote URL
+ * FileTooLargeError: File exceeds size limit
+ * UnsupportedFileTypeError: File type not supported
+ */
+export const post17 = oc
+ .route({
+ description:
+ 'Upload a file from a remote URL\nDownloads a file from the provided remote URL and uploads it\nto the platform storage for use in web applications.\n\nArgs:\n app_model: The associated application model\n end_user: The end user making the request\n\nJSON Parameters:\n url: The remote URL to download the file from (required)\n\nReturns:\n dict: File information including ID, signed URL, and metadata\n int: HTTP status code 201 for success\n\nRaises:\n RemoteFileUploadError: Failed to fetch file from remote URL\n FileTooLargeError: File exceeds size limit\n UnsupportedFileTypeError: File type not supported',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postRemoteFilesUpload',
+ path: '/remote-files/upload',
+ successStatus: 201,
+ summary: 'Upload a file from a remote URL',
+ tags: ['web'],
+ })
+ .output(zPostRemoteFilesUploadResponse)
+
+export const upload2 = {
+ post: post17,
+}
+
+/**
+ * Get information about a remote file
+ *
+ * Get information about a remote file
+ * Retrieves basic information about a file located at a remote URL,
+ * including content type and content length.
+ *
+ * Args:
+ * app_model: The associated application model
+ * end_user: The end user making the request
+ * url: URL-encoded path to the remote file
+ *
+ * Returns:
+ * dict: Remote file information including type and length
+ *
+ * Raises:
+ * HTTPException: If the remote file cannot be accessed
+ */
+export const get10 = oc
+ .route({
+ description:
+ 'Get information about a remote file\nRetrieves basic information about a file located at a remote URL,\nincluding content type and content length.\n\nArgs:\n app_model: The associated application model\n end_user: The end user making the request\n url: URL-encoded path to the remote file\n\nReturns:\n dict: Remote file information including type and length\n\nRaises:\n HTTPException: If the remote file cannot be accessed',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getRemoteFilesByUrl',
+ path: '/remote-files/{url}',
+ summary: 'Get information about a remote file',
+ tags: ['web'],
+ })
+ .input(z.object({ params: zGetRemoteFilesByUrlPath }))
+ .output(zGetRemoteFilesByUrlResponse)
+
+export const byUrl = {
+ get: get10,
+}
+
+export const remoteFiles = {
+ upload: upload2,
+ byUrl,
+}
+
+/**
+ * Remove a message from saved messages.
+ */
+export const delete2 = oc
+ .route({
+ description: 'Remove a message from saved messages.',
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'deleteSavedMessagesByMessageId',
+ path: '/saved-messages/{message_id}',
+ successStatus: 204,
+ tags: ['web'],
+ })
+ .input(z.object({ params: zDeleteSavedMessagesByMessageIdPath }))
+ .output(zDeleteSavedMessagesByMessageIdResponse)
+
+export const byMessageId2 = {
+ delete: delete2,
+}
+
+/**
+ * Retrieve paginated list of saved messages for a completion application.
+ */
+export const get11 = oc
+ .route({
+ description: 'Retrieve paginated list of saved messages for a completion application.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getSavedMessages',
+ path: '/saved-messages',
+ tags: ['web'],
+ })
+ .input(z.object({ query: zGetSavedMessagesQuery.optional() }))
+ .output(zGetSavedMessagesResponse)
+
+/**
+ * Save a specific message for later reference.
+ */
+export const post18 = oc
+ .route({
+ description: 'Save a specific message for later reference.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postSavedMessages',
+ path: '/saved-messages',
+ tags: ['web'],
+ })
+ .input(z.object({ query: zPostSavedMessagesQuery }))
+ .output(zPostSavedMessagesResponse)
+
+export const savedMessages = {
+ get: get11,
+ post: post18,
+ byMessageId: byMessageId2,
+}
+
+/**
+ * Retrieve app site info
+ *
+ * Retrieve app site information and configuration.
+ */
+export const get12 = oc
+ .route({
+ description: 'Retrieve app site information and configuration.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getSite',
+ path: '/site',
+ summary: 'Retrieve app site info',
+ tags: ['web'],
+ })
+ .output(zGetSiteResponse)
+
+export const site = {
+ get: get12,
+}
+
+/**
+ * Get system feature flags and configuration
+ *
+ * Get system feature flags and configuration
+ * Returns the current system feature flags and configuration
+ * that control various functionalities across the platform.
+ *
+ * Returns:
+ * dict: System feature configuration object
+ *
+ * This endpoint is akin to the `SystemFeatureApi` endpoint in api/controllers/console/feature.py,
+ * except it is intended for use by the web app, instead of the console dashboard.
+ *
+ * NOTE: This endpoint is unauthenticated by design, as it provides system features
+ * data required for webapp initialization.
+ *
+ * Authentication would create circular dependency (can't authenticate without webapp loading).
+ *
+ * Only non-sensitive configuration data should be returned by this endpoint.
+ */
+export const get13 = oc
+ .route({
+ description:
+ 'Get system feature flags and configuration\nReturns the current system feature flags and configuration\nthat control various functionalities across the platform.\n\nReturns:\n dict: System feature configuration object\n\nThis endpoint is akin to the `SystemFeatureApi` endpoint in api/controllers/console/feature.py,\nexcept it is intended for use by the web app, instead of the console dashboard.\n\nNOTE: This endpoint is unauthenticated by design, as it provides system features\ndata required for webapp initialization.\n\nAuthentication would create circular dependency (can\'t authenticate without webapp loading).\n\nOnly non-sensitive configuration data should be returned by this endpoint.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getSystemFeatures',
+ path: '/system-features',
+ summary: 'Get system feature flags and configuration',
+ tags: ['web'],
+ })
+ .output(zGetSystemFeaturesResponse)
+
+export const systemFeatures = {
+ get: get13,
+}
+
+/**
+ * Convert text to audio
+ *
+ * Convert text to audio using text-to-speech service.
+ */
+export const post19 = oc
+ .route({
+ description: 'Convert text to audio using text-to-speech service.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postTextToAudio',
+ path: '/text-to-audio',
+ summary: 'Convert text to audio',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostTextToAudioBody }))
+ .output(zPostTextToAudioResponse)
+
+export const textToAudio = {
+ post: post19,
+}
+
+/**
+ * Retrieve the access mode for a web application (public or restricted).
+ */
+export const get14 = oc
+ .route({
+ description: 'Retrieve the access mode for a web application (public or restricted).',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWebappAccessMode',
+ path: '/webapp/access-mode',
+ tags: ['web'],
+ })
+ .input(z.object({ query: zGetWebappAccessModeQuery.optional() }))
+ .output(zGetWebappAccessModeResponse)
+
+export const accessMode = {
+ get: get14,
+}
+
+/**
+ * Check if user has permission to access a web application.
+ */
+export const get15 = oc
+ .route({
+ description: 'Check if user has permission to access a web application.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWebappPermission',
+ path: '/webapp/permission',
+ tags: ['web'],
+ })
+ .input(z.object({ query: zGetWebappPermissionQuery }))
+ .output(zGetWebappPermissionResponse)
+
+export const permission = {
+ get: get15,
+}
+
+export const webapp = {
+ accessMode,
+ permission,
+}
+
+/**
+ * Get workflow execution events stream after resume
+ *
+ * GET /api/workflow/<task_id>/events
+ *
+ * Returns Server-Sent Events stream.
+ */
+export const get16 = oc
+ .route({
+ description: 'GET /api/workflow/<task_id>/events\n\nReturns Server-Sent Events stream.',
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'getWorkflowByTaskIdEvents',
+ path: '/workflow/{task_id}/events',
+ summary: 'Get workflow execution events stream after resume',
+ tags: ['default'],
+ })
+ .input(z.object({ params: zGetWorkflowByTaskIdEventsPath }))
+ .output(zGetWorkflowByTaskIdEventsResponse)
+
+export const events = {
+ get: get16,
+}
+
+export const byTaskId3 = {
+ events,
+}
+
+export const workflow = {
+ byTaskId: byTaskId3,
+}
+
+/**
+ * Run workflow
+ *
+ * Execute a workflow with provided inputs and files.
+ */
+export const post20 = oc
+ .route({
+ description: 'Execute a workflow with provided inputs and files.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkflowsRun',
+ path: '/workflows/run',
+ summary: 'Run workflow',
+ tags: ['web'],
+ })
+ .input(z.object({ body: zPostWorkflowsRunBody }))
+ .output(zPostWorkflowsRunResponse)
+
+export const run = {
+ post: post20,
+}
+
+/**
+ * Stop workflow task
+ *
+ * Stop a running workflow task.
+ */
+export const post21 = oc
+ .route({
+ description: 'Stop a running workflow task.',
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'postWorkflowsTasksByTaskIdStop',
+ path: '/workflows/tasks/{task_id}/stop',
+ summary: 'Stop workflow task',
+ tags: ['web'],
+ })
+ .input(z.object({ params: zPostWorkflowsTasksByTaskIdStopPath }))
+ .output(zPostWorkflowsTasksByTaskIdStopResponse)
+
+export const stop3 = {
+ post: post21,
+}
+
+export const byTaskId4 = {
+ stop: stop3,
+}
+
+export const tasks = {
+ byTaskId: byTaskId4,
+}
+
+export const workflows = {
+ run,
+ tasks,
+}
+
+export const contract = {
+ audioToText,
+ chatMessages,
+ completionMessages,
+ conversations,
+ emailCodeLogin,
+ files,
+ forgotPassword,
+ form,
+ login,
+ logout,
+ messages,
+ meta,
+ parameters,
+ passport,
+ remoteFiles,
+ savedMessages,
+ site,
+ systemFeatures,
+ textToAudio,
+ webapp,
+ workflow,
+ workflows,
+}
diff --git a/packages/contracts/generated/api/web/types.gen.ts b/packages/contracts/generated/api/web/types.gen.ts
new file mode 100644
index 00000000000..f2009b966bf
--- /dev/null
+++ b/packages/contracts/generated/api/web/types.gen.ts
@@ -0,0 +1,1461 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}/api` | (string & {})
+}
+
+export type ChatMessagePayload = {
+ conversation_id?: string | null
+ files?: Array<{
+ [key: string]: unknown
+ }> | null
+ inputs: {
+ [key: string]: unknown
+ }
+ parent_message_id?: string | null
+ query: string
+ response_mode?: 'blocking' | 'streaming' | null
+ retriever_from?: string
+}
+
+export type CompletionMessagePayload = {
+ files?: Array<{
+ [key: string]: unknown
+ }> | null
+ inputs: {
+ [key: string]: unknown
+ }
+ query?: string
+ response_mode?: 'blocking' | 'streaming' | null
+ retriever_from?: string
+}
+
+export type EmailCodeLoginSendPayload = {
+ email: string
+ language?: string | null
+}
+
+export type EmailCodeLoginVerifyPayload = {
+ code: string
+ email: string
+ token: string
+}
+
+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 FileWithSignedUrl = {
+ created_at?: number | null
+ created_by?: string | null
+ extension?: string | null
+ id: string
+ mime_type?: string | null
+ name: string
+ size: number
+ url?: string | null
+}
+
+export type ForgotPasswordCheckPayload = {
+ code: string
+ email: string
+ token: string
+}
+
+export type ForgotPasswordResetPayload = {
+ new_password: string
+ password_confirm: string
+ token: string
+}
+
+export type ForgotPasswordSendPayload = {
+ email: string
+ language?: string | null
+}
+
+export type LoginPayload = {
+ email: string
+ password: string
+}
+
+export type MessageMoreLikeThisQuery = {
+ response_mode: 'blocking' | 'streaming'
+}
+
+export type RemoteFileInfo = {
+ file_length: number
+ file_type: 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 PostAudioToTextData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/audio-to-text'
+}
+
+export type PostAudioToTextErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 413: {
+ [key: string]: unknown
+ }
+ 415: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAudioToTextError = PostAudioToTextErrors[keyof PostAudioToTextErrors]
+
+export type PostAudioToTextResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostAudioToTextResponse = PostAudioToTextResponses[keyof PostAudioToTextResponses]
+
+export type PostChatMessagesData = {
+ body: ChatMessagePayload
+ path?: never
+ query?: never
+ url: '/chat-messages'
+}
+
+export type PostChatMessagesErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostChatMessagesError = PostChatMessagesErrors[keyof PostChatMessagesErrors]
+
+export type PostChatMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostChatMessagesResponse = PostChatMessagesResponses[keyof PostChatMessagesResponses]
+
+export type PostChatMessagesByTaskIdStopData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: never
+ url: '/chat-messages/{task_id}/stop'
+}
+
+export type PostChatMessagesByTaskIdStopErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostChatMessagesByTaskIdStopError
+ = PostChatMessagesByTaskIdStopErrors[keyof PostChatMessagesByTaskIdStopErrors]
+
+export type PostChatMessagesByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostChatMessagesByTaskIdStopResponse
+ = PostChatMessagesByTaskIdStopResponses[keyof PostChatMessagesByTaskIdStopResponses]
+
+export type PostCompletionMessagesData = {
+ body: CompletionMessagePayload
+ path?: never
+ query?: never
+ url: '/completion-messages'
+}
+
+export type PostCompletionMessagesErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostCompletionMessagesError
+ = PostCompletionMessagesErrors[keyof PostCompletionMessagesErrors]
+
+export type PostCompletionMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostCompletionMessagesResponse
+ = PostCompletionMessagesResponses[keyof PostCompletionMessagesResponses]
+
+export type PostCompletionMessagesByTaskIdStopData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: never
+ url: '/completion-messages/{task_id}/stop'
+}
+
+export type PostCompletionMessagesByTaskIdStopErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostCompletionMessagesByTaskIdStopError
+ = PostCompletionMessagesByTaskIdStopErrors[keyof PostCompletionMessagesByTaskIdStopErrors]
+
+export type PostCompletionMessagesByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostCompletionMessagesByTaskIdStopResponse
+ = PostCompletionMessagesByTaskIdStopResponses[keyof PostCompletionMessagesByTaskIdStopResponses]
+
+export type GetConversationsData = {
+ body?: never
+ path?: never
+ query?: {
+ last_id?: string
+ limit?: number
+ pinned?: 'true' | 'false'
+ sort_by?: 'created_at' | '-created_at' | 'updated_at' | '-updated_at'
+ }
+ url: '/conversations'
+}
+
+export type GetConversationsErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetConversationsError = GetConversationsErrors[keyof GetConversationsErrors]
+
+export type GetConversationsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetConversationsResponse = GetConversationsResponses[keyof GetConversationsResponses]
+
+export type DeleteConversationsByCIdData = {
+ body?: never
+ path: {
+ c_id: string
+ }
+ query?: never
+ url: '/conversations/{c_id}'
+}
+
+export type DeleteConversationsByCIdErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteConversationsByCIdError
+ = DeleteConversationsByCIdErrors[keyof DeleteConversationsByCIdErrors]
+
+export type DeleteConversationsByCIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteConversationsByCIdResponse
+ = DeleteConversationsByCIdResponses[keyof DeleteConversationsByCIdResponses]
+
+export type PostConversationsByCIdNameData = {
+ body?: never
+ path: {
+ c_id: string
+ }
+ query?: {
+ name?: string
+ auto_generate?: boolean
+ }
+ url: '/conversations/{c_id}/name'
+}
+
+export type PostConversationsByCIdNameErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostConversationsByCIdNameError
+ = PostConversationsByCIdNameErrors[keyof PostConversationsByCIdNameErrors]
+
+export type PostConversationsByCIdNameResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostConversationsByCIdNameResponse
+ = PostConversationsByCIdNameResponses[keyof PostConversationsByCIdNameResponses]
+
+export type PatchConversationsByCIdPinData = {
+ body?: never
+ path: {
+ c_id: string
+ }
+ query?: never
+ url: '/conversations/{c_id}/pin'
+}
+
+export type PatchConversationsByCIdPinErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchConversationsByCIdPinError
+ = PatchConversationsByCIdPinErrors[keyof PatchConversationsByCIdPinErrors]
+
+export type PatchConversationsByCIdPinResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchConversationsByCIdPinResponse
+ = PatchConversationsByCIdPinResponses[keyof PatchConversationsByCIdPinResponses]
+
+export type PatchConversationsByCIdUnpinData = {
+ body?: never
+ path: {
+ c_id: string
+ }
+ query?: never
+ url: '/conversations/{c_id}/unpin'
+}
+
+export type PatchConversationsByCIdUnpinErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchConversationsByCIdUnpinError
+ = PatchConversationsByCIdUnpinErrors[keyof PatchConversationsByCIdUnpinErrors]
+
+export type PatchConversationsByCIdUnpinResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PatchConversationsByCIdUnpinResponse
+ = PatchConversationsByCIdUnpinResponses[keyof PatchConversationsByCIdUnpinResponses]
+
+export type PostEmailCodeLoginData = {
+ body: EmailCodeLoginSendPayload
+ path?: never
+ query?: never
+ url: '/email-code-login'
+}
+
+export type PostEmailCodeLoginErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostEmailCodeLoginError = PostEmailCodeLoginErrors[keyof PostEmailCodeLoginErrors]
+
+export type PostEmailCodeLoginResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostEmailCodeLoginResponse
+ = PostEmailCodeLoginResponses[keyof PostEmailCodeLoginResponses]
+
+export type PostEmailCodeLoginValidityData = {
+ body: EmailCodeLoginVerifyPayload
+ path?: never
+ query?: never
+ url: '/email-code-login/validity'
+}
+
+export type PostEmailCodeLoginValidityErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostEmailCodeLoginValidityError
+ = PostEmailCodeLoginValidityErrors[keyof PostEmailCodeLoginValidityErrors]
+
+export type PostEmailCodeLoginValidityResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostEmailCodeLoginValidityResponse
+ = PostEmailCodeLoginValidityResponses[keyof PostEmailCodeLoginValidityResponses]
+
+export type PostFilesUploadData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/files/upload'
+}
+
+export type PostFilesUploadErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 413: {
+ [key: string]: unknown
+ }
+ 415: {
+ [key: string]: unknown
+ }
+}
+
+export type PostFilesUploadError = PostFilesUploadErrors[keyof PostFilesUploadErrors]
+
+export type PostFilesUploadResponses = {
+ 201: FileResponse
+}
+
+export type PostFilesUploadResponse = PostFilesUploadResponses[keyof PostFilesUploadResponses]
+
+export type PostForgotPasswordData = {
+ body: ForgotPasswordSendPayload
+ path?: never
+ query?: never
+ url: '/forgot-password'
+}
+
+export type PostForgotPasswordErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 429: {
+ [key: string]: unknown
+ }
+}
+
+export type PostForgotPasswordError = PostForgotPasswordErrors[keyof PostForgotPasswordErrors]
+
+export type PostForgotPasswordResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+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
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostForgotPasswordResetsError
+ = PostForgotPasswordResetsErrors[keyof PostForgotPasswordResetsErrors]
+
+export type PostForgotPasswordResetsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+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
+ }
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type PostForgotPasswordValidityError
+ = PostForgotPasswordValidityErrors[keyof PostForgotPasswordValidityErrors]
+
+export type PostForgotPasswordValidityResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostForgotPasswordValidityResponse
+ = PostForgotPasswordValidityResponses[keyof PostForgotPasswordValidityResponses]
+
+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]
+
+export type PostLoginData = {
+ body: LoginPayload
+ path?: never
+ query?: never
+ url: '/login'
+}
+
+export type PostLoginErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type PostLoginError = PostLoginErrors[keyof PostLoginErrors]
+
+export type PostLoginResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostLoginResponse = PostLoginResponses[keyof PostLoginResponses]
+
+export type GetLoginStatusData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/login/status'
+}
+
+export type GetLoginStatusErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+}
+
+export type GetLoginStatusError = GetLoginStatusErrors[keyof GetLoginStatusErrors]
+
+export type GetLoginStatusResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetLoginStatusResponse = GetLoginStatusResponses[keyof GetLoginStatusResponses]
+
+export type PostLogoutData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/logout'
+}
+
+export type PostLogoutResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostLogoutResponse = PostLogoutResponses[keyof PostLogoutResponses]
+
+export type GetMessagesData = {
+ body?: never
+ path?: never
+ query: {
+ conversation_id: string
+ first_id?: string
+ limit?: number
+ }
+ url: '/messages'
+}
+
+export type GetMessagesErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesError = GetMessagesErrors[keyof GetMessagesErrors]
+
+export type GetMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesResponse = GetMessagesResponses[keyof GetMessagesResponses]
+
+export type PostMessagesByMessageIdFeedbacksData = {
+ body?: never
+ path: {
+ message_id: string
+ }
+ query?: {
+ rating?: 'like' | 'dislike'
+ content?: string
+ }
+ url: '/messages/{message_id}/feedbacks'
+}
+
+export type PostMessagesByMessageIdFeedbacksErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostMessagesByMessageIdFeedbacksError
+ = PostMessagesByMessageIdFeedbacksErrors[keyof PostMessagesByMessageIdFeedbacksErrors]
+
+export type PostMessagesByMessageIdFeedbacksResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostMessagesByMessageIdFeedbacksResponse
+ = PostMessagesByMessageIdFeedbacksResponses[keyof PostMessagesByMessageIdFeedbacksResponses]
+
+export type GetMessagesByMessageIdMoreLikeThisData = {
+ body?: never
+ path: {
+ message_id: string
+ }
+ query: {
+ response_mode: 'blocking' | 'streaming'
+ }
+ url: '/messages/{message_id}/more-like-this'
+}
+
+export type GetMessagesByMessageIdMoreLikeThisErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesByMessageIdMoreLikeThisError
+ = GetMessagesByMessageIdMoreLikeThisErrors[keyof GetMessagesByMessageIdMoreLikeThisErrors]
+
+export type GetMessagesByMessageIdMoreLikeThisResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesByMessageIdMoreLikeThisResponse
+ = GetMessagesByMessageIdMoreLikeThisResponses[keyof GetMessagesByMessageIdMoreLikeThisResponses]
+
+export type GetMessagesByMessageIdSuggestedQuestionsData = {
+ body?: never
+ path: {
+ message_id: string
+ }
+ query?: never
+ url: '/messages/{message_id}/suggested-questions'
+}
+
+export type GetMessagesByMessageIdSuggestedQuestionsErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesByMessageIdSuggestedQuestionsError
+ = GetMessagesByMessageIdSuggestedQuestionsErrors[keyof GetMessagesByMessageIdSuggestedQuestionsErrors]
+
+export type GetMessagesByMessageIdSuggestedQuestionsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMessagesByMessageIdSuggestedQuestionsResponse
+ = GetMessagesByMessageIdSuggestedQuestionsResponses[keyof GetMessagesByMessageIdSuggestedQuestionsResponses]
+
+export type GetMetaData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/meta'
+}
+
+export type GetMetaErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMetaError = GetMetaErrors[keyof GetMetaErrors]
+
+export type GetMetaResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetMetaResponse = GetMetaResponses[keyof GetMetaResponses]
+
+export type GetParametersData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/parameters'
+}
+
+export type GetParametersErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetParametersError = GetParametersErrors[keyof GetParametersErrors]
+
+export type GetParametersResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetParametersResponse = GetParametersResponses[keyof GetParametersResponses]
+
+export type GetPassportData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/passport'
+}
+
+export type GetPassportErrors = {
+ 401: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+}
+
+export type GetPassportError = GetPassportErrors[keyof GetPassportErrors]
+
+export type GetPassportResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetPassportResponse = GetPassportResponses[keyof GetPassportResponses]
+
+export type PostRemoteFilesUploadData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/remote-files/upload'
+}
+
+export type PostRemoteFilesUploadErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 413: {
+ [key: string]: unknown
+ }
+ 415: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostRemoteFilesUploadError
+ = PostRemoteFilesUploadErrors[keyof PostRemoteFilesUploadErrors]
+
+export type PostRemoteFilesUploadResponses = {
+ 201: FileWithSignedUrl
+}
+
+export type PostRemoteFilesUploadResponse
+ = PostRemoteFilesUploadResponses[keyof PostRemoteFilesUploadResponses]
+
+export type GetRemoteFilesByUrlData = {
+ body?: never
+ path: {
+ url: string
+ }
+ query?: never
+ url: '/remote-files/{url}'
+}
+
+export type GetRemoteFilesByUrlErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetRemoteFilesByUrlError = GetRemoteFilesByUrlErrors[keyof GetRemoteFilesByUrlErrors]
+
+export type GetRemoteFilesByUrlResponses = {
+ 200: RemoteFileInfo
+}
+
+export type GetRemoteFilesByUrlResponse
+ = GetRemoteFilesByUrlResponses[keyof GetRemoteFilesByUrlResponses]
+
+export type GetSavedMessagesData = {
+ body?: never
+ path?: never
+ query?: {
+ last_id?: string
+ limit?: number
+ }
+ url: '/saved-messages'
+}
+
+export type GetSavedMessagesErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetSavedMessagesError = GetSavedMessagesErrors[keyof GetSavedMessagesErrors]
+
+export type GetSavedMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetSavedMessagesResponse = GetSavedMessagesResponses[keyof GetSavedMessagesResponses]
+
+export type PostSavedMessagesData = {
+ body?: never
+ path?: never
+ query: {
+ message_id: string
+ }
+ url: '/saved-messages'
+}
+
+export type PostSavedMessagesErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostSavedMessagesError = PostSavedMessagesErrors[keyof PostSavedMessagesErrors]
+
+export type PostSavedMessagesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostSavedMessagesResponse = PostSavedMessagesResponses[keyof PostSavedMessagesResponses]
+
+export type DeleteSavedMessagesByMessageIdData = {
+ body?: never
+ path: {
+ message_id: string
+ }
+ query?: never
+ url: '/saved-messages/{message_id}'
+}
+
+export type DeleteSavedMessagesByMessageIdErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteSavedMessagesByMessageIdError
+ = DeleteSavedMessagesByMessageIdErrors[keyof DeleteSavedMessagesByMessageIdErrors]
+
+export type DeleteSavedMessagesByMessageIdResponses = {
+ 204: {
+ [key: string]: unknown
+ }
+}
+
+export type DeleteSavedMessagesByMessageIdResponse
+ = DeleteSavedMessagesByMessageIdResponses[keyof DeleteSavedMessagesByMessageIdResponses]
+
+export type GetSiteData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/site'
+}
+
+export type GetSiteErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetSiteError = GetSiteErrors[keyof GetSiteErrors]
+
+export type GetSiteResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetSiteResponse = GetSiteResponses[keyof GetSiteResponses]
+
+export type GetSystemFeaturesData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/system-features'
+}
+
+export type GetSystemFeaturesErrors = {
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetSystemFeaturesError = GetSystemFeaturesErrors[keyof GetSystemFeaturesErrors]
+
+export type GetSystemFeaturesResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetSystemFeaturesResponse = GetSystemFeaturesResponses[keyof GetSystemFeaturesResponses]
+
+export type PostTextToAudioData = {
+ body: TextToAudioPayload
+ path?: never
+ query?: never
+ url: '/text-to-audio'
+}
+
+export type PostTextToAudioErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTextToAudioError = PostTextToAudioErrors[keyof PostTextToAudioErrors]
+
+export type PostTextToAudioResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostTextToAudioResponse = PostTextToAudioResponses[keyof PostTextToAudioResponses]
+
+export type GetWebappAccessModeData = {
+ body?: never
+ path?: never
+ query?: {
+ appId?: string
+ appCode?: string
+ }
+ url: '/webapp/access-mode'
+}
+
+export type GetWebappAccessModeErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWebappAccessModeError = GetWebappAccessModeErrors[keyof GetWebappAccessModeErrors]
+
+export type GetWebappAccessModeResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWebappAccessModeResponse
+ = GetWebappAccessModeResponses[keyof GetWebappAccessModeResponses]
+
+export type GetWebappPermissionData = {
+ body?: never
+ path?: never
+ query: {
+ appId: string
+ }
+ url: '/webapp/permission'
+}
+
+export type GetWebappPermissionErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWebappPermissionError = GetWebappPermissionErrors[keyof GetWebappPermissionErrors]
+
+export type GetWebappPermissionResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWebappPermissionResponse
+ = GetWebappPermissionResponses[keyof GetWebappPermissionResponses]
+
+export type GetWorkflowByTaskIdEventsData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: never
+ url: '/workflow/{task_id}/events'
+}
+
+export type GetWorkflowByTaskIdEventsResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type GetWorkflowByTaskIdEventsResponse
+ = GetWorkflowByTaskIdEventsResponses[keyof GetWorkflowByTaskIdEventsResponses]
+
+export type PostWorkflowsRunData = {
+ body: WorkflowRunPayload
+ path?: never
+ query?: never
+ url: '/workflows/run'
+}
+
+export type PostWorkflowsRunErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsRunError = PostWorkflowsRunErrors[keyof PostWorkflowsRunErrors]
+
+export type PostWorkflowsRunResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsRunResponse = PostWorkflowsRunResponses[keyof PostWorkflowsRunResponses]
+
+export type PostWorkflowsTasksByTaskIdStopData = {
+ body?: never
+ path: {
+ task_id: string
+ }
+ query?: never
+ url: '/workflows/tasks/{task_id}/stop'
+}
+
+export type PostWorkflowsTasksByTaskIdStopErrors = {
+ 400: {
+ [key: string]: unknown
+ }
+ 401: {
+ [key: string]: unknown
+ }
+ 403: {
+ [key: string]: unknown
+ }
+ 404: {
+ [key: string]: unknown
+ }
+ 500: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsTasksByTaskIdStopError
+ = PostWorkflowsTasksByTaskIdStopErrors[keyof PostWorkflowsTasksByTaskIdStopErrors]
+
+export type PostWorkflowsTasksByTaskIdStopResponses = {
+ 200: {
+ [key: string]: unknown
+ }
+}
+
+export type PostWorkflowsTasksByTaskIdStopResponse
+ = PostWorkflowsTasksByTaskIdStopResponses[keyof PostWorkflowsTasksByTaskIdStopResponses]
diff --git a/packages/contracts/generated/api/web/zod.gen.ts b/packages/contracts/generated/api/web/zod.gen.ts
new file mode 100644
index 00000000000..ec4bd19aff4
--- /dev/null
+++ b/packages/contracts/generated/api/web/zod.gen.ts
@@ -0,0 +1,478 @@
+// 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.record(z.string(), z.unknown())).nullish(),
+ inputs: z.record(z.string(), z.unknown()),
+ parent_message_id: z.string().nullish(),
+ query: z.string(),
+ response_mode: z.enum(['blocking', 'streaming']).nullish(),
+ retriever_from: z.string().optional().default('web_app'),
+})
+
+/**
+ * CompletionMessagePayload
+ */
+export const zCompletionMessagePayload = 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('web_app'),
+})
+
+/**
+ * EmailCodeLoginSendPayload
+ */
+export const zEmailCodeLoginSendPayload = z.object({
+ email: z.string(),
+ language: z.string().nullish(),
+})
+
+/**
+ * EmailCodeLoginVerifyPayload
+ */
+export const zEmailCodeLoginVerifyPayload = z.object({
+ code: z.string(),
+ email: z.string(),
+ token: z.string().min(1),
+})
+
+/**
+ * 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(),
+})
+
+/**
+ * FileWithSignedUrl
+ */
+export const zFileWithSignedUrl = z.object({
+ created_at: z.int().nullish(),
+ created_by: z.string().nullish(),
+ extension: z.string().nullish(),
+ id: z.string(),
+ mime_type: z.string().nullish(),
+ name: z.string(),
+ size: z.int(),
+ url: z.string().nullish(),
+})
+
+/**
+ * ForgotPasswordCheckPayload
+ */
+export const zForgotPasswordCheckPayload = z.object({
+ code: z.string(),
+ email: z.string(),
+ token: z.string().min(1),
+})
+
+/**
+ * ForgotPasswordResetPayload
+ */
+export const zForgotPasswordResetPayload = z.object({
+ new_password: z.string(),
+ password_confirm: z.string(),
+ token: z.string().min(1),
+})
+
+/**
+ * ForgotPasswordSendPayload
+ */
+export const zForgotPasswordSendPayload = z.object({
+ email: z.string(),
+ language: z.string().nullish(),
+})
+
+/**
+ * LoginPayload
+ */
+export const zLoginPayload = z.object({
+ email: z.string(),
+ password: z.string(),
+})
+
+/**
+ * MessageMoreLikeThisQuery
+ */
+export const zMessageMoreLikeThisQuery = z.object({
+ response_mode: z.enum(['blocking', 'streaming']),
+})
+
+/**
+ * RemoteFileInfo
+ */
+export const zRemoteFileInfo = z.object({
+ file_length: z.int(),
+ file_type: 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()),
+})
+
+/**
+ * Success
+ */
+export const zPostAudioToTextResponse = z.record(z.string(), z.unknown())
+
+export const zPostChatMessagesBody = zChatMessagePayload
+
+/**
+ * Success
+ */
+export const zPostChatMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zPostChatMessagesByTaskIdStopPath = z.object({
+ task_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostChatMessagesByTaskIdStopResponse = z.record(z.string(), z.unknown())
+
+export const zPostCompletionMessagesBody = zCompletionMessagePayload
+
+/**
+ * Success
+ */
+export const zPostCompletionMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zPostCompletionMessagesByTaskIdStopPath = z.object({
+ task_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostCompletionMessagesByTaskIdStopResponse = z.record(z.string(), z.unknown())
+
+export const zGetConversationsQuery = z.object({
+ last_id: z.string().optional(),
+ limit: z.int().optional().default(20),
+ pinned: z.enum(['true', 'false']).optional(),
+ sort_by: z
+ .enum(['created_at', '-created_at', 'updated_at', '-updated_at'])
+ .optional()
+ .default('-updated_at'),
+})
+
+/**
+ * Success
+ */
+export const zGetConversationsResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteConversationsByCIdPath = z.object({
+ c_id: z.string(),
+})
+
+/**
+ * Conversation deleted successfully
+ */
+export const zDeleteConversationsByCIdResponse = z.record(z.string(), z.unknown())
+
+export const zPostConversationsByCIdNamePath = z.object({
+ c_id: z.string(),
+})
+
+export const zPostConversationsByCIdNameQuery = z.object({
+ name: z.string().optional(),
+ auto_generate: z.boolean().optional().default(false),
+})
+
+/**
+ * Conversation renamed successfully
+ */
+export const zPostConversationsByCIdNameResponse = z.record(z.string(), z.unknown())
+
+export const zPatchConversationsByCIdPinPath = z.object({
+ c_id: z.string(),
+})
+
+/**
+ * Conversation pinned successfully
+ */
+export const zPatchConversationsByCIdPinResponse = z.record(z.string(), z.unknown())
+
+export const zPatchConversationsByCIdUnpinPath = z.object({
+ c_id: z.string(),
+})
+
+/**
+ * Conversation unpinned successfully
+ */
+export const zPatchConversationsByCIdUnpinResponse = z.record(z.string(), z.unknown())
+
+export const zPostEmailCodeLoginBody = zEmailCodeLoginSendPayload
+
+/**
+ * Email code sent successfully
+ */
+export const zPostEmailCodeLoginResponse = z.record(z.string(), z.unknown())
+
+export const zPostEmailCodeLoginValidityBody = zEmailCodeLoginVerifyPayload
+
+/**
+ * Email code verified and login successful
+ */
+export const zPostEmailCodeLoginValidityResponse = z.record(z.string(), z.unknown())
+
+/**
+ * File uploaded successfully
+ */
+export const zPostFilesUploadResponse = zFileResponse
+
+export const zPostForgotPasswordBody = zForgotPasswordSendPayload
+
+/**
+ * Password reset email sent successfully
+ */
+export const zPostForgotPasswordResponse = z.record(z.string(), z.unknown())
+
+export const zPostForgotPasswordResetsBody = zForgotPasswordResetPayload
+
+/**
+ * Password reset successfully
+ */
+export const zPostForgotPasswordResetsResponse = z.record(z.string(), z.unknown())
+
+export const zPostForgotPasswordValidityBody = zForgotPasswordCheckPayload
+
+/**
+ * Token is valid
+ */
+export const zPostForgotPasswordValidityResponse = z.record(z.string(), z.unknown())
+
+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())
+
+export const zPostLoginBody = zLoginPayload
+
+/**
+ * Authentication successful
+ */
+export const zPostLoginResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Login status
+ */
+export const zGetLoginStatusResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Logout successful
+ */
+export const zPostLogoutResponse = z.record(z.string(), z.unknown())
+
+export const zGetMessagesQuery = z.object({
+ conversation_id: z.string(),
+ first_id: z.string().optional(),
+ limit: z.int().optional().default(20),
+})
+
+/**
+ * Success
+ */
+export const zGetMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zPostMessagesByMessageIdFeedbacksPath = z.object({
+ message_id: z.string(),
+})
+
+export const zPostMessagesByMessageIdFeedbacksQuery = z.object({
+ rating: z.enum(['like', 'dislike']).optional(),
+ content: z.string().optional(),
+})
+
+/**
+ * Feedback submitted successfully
+ */
+export const zPostMessagesByMessageIdFeedbacksResponse = z.record(z.string(), z.unknown())
+
+export const zGetMessagesByMessageIdMoreLikeThisPath = z.object({
+ message_id: z.string(),
+})
+
+export const zGetMessagesByMessageIdMoreLikeThisQuery = z.object({
+ response_mode: z.enum(['blocking', 'streaming']),
+})
+
+/**
+ * Success
+ */
+export const zGetMessagesByMessageIdMoreLikeThisResponse = z.record(z.string(), z.unknown())
+
+export const zGetMessagesByMessageIdSuggestedQuestionsPath = z.object({
+ message_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetMessagesByMessageIdSuggestedQuestionsResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetMetaResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetParametersResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Passport retrieved successfully
+ */
+export const zGetPassportResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Remote file uploaded successfully
+ */
+export const zPostRemoteFilesUploadResponse = zFileWithSignedUrl
+
+export const zGetRemoteFilesByUrlPath = z.object({
+ url: z.string(),
+})
+
+/**
+ * Remote file information retrieved successfully
+ */
+export const zGetRemoteFilesByUrlResponse = zRemoteFileInfo
+
+export const zGetSavedMessagesQuery = z.object({
+ last_id: z.string().optional(),
+ limit: z.int().optional().default(20),
+})
+
+/**
+ * Success
+ */
+export const zGetSavedMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zPostSavedMessagesQuery = z.object({
+ message_id: z.string(),
+})
+
+/**
+ * Message saved successfully
+ */
+export const zPostSavedMessagesResponse = z.record(z.string(), z.unknown())
+
+export const zDeleteSavedMessagesByMessageIdPath = z.object({
+ message_id: z.string(),
+})
+
+/**
+ * Message removed successfully
+ */
+export const zDeleteSavedMessagesByMessageIdResponse = z.record(z.string(), z.unknown())
+
+/**
+ * Success
+ */
+export const zGetSiteResponse = z.record(z.string(), z.unknown())
+
+/**
+ * System features retrieved successfully
+ */
+export const zGetSystemFeaturesResponse = z.record(z.string(), z.unknown())
+
+export const zPostTextToAudioBody = zTextToAudioPayload
+
+/**
+ * Success
+ */
+export const zPostTextToAudioResponse = z.record(z.string(), z.unknown())
+
+export const zGetWebappAccessModeQuery = z.object({
+ appId: z.string().optional(),
+ appCode: z.string().optional(),
+})
+
+/**
+ * Success
+ */
+export const zGetWebappAccessModeResponse = z.record(z.string(), z.unknown())
+
+export const zGetWebappPermissionQuery = z.object({
+ appId: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWebappPermissionResponse = z.record(z.string(), z.unknown())
+
+export const zGetWorkflowByTaskIdEventsPath = z.object({
+ task_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zGetWorkflowByTaskIdEventsResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkflowsRunBody = zWorkflowRunPayload
+
+/**
+ * Success
+ */
+export const zPostWorkflowsRunResponse = z.record(z.string(), z.unknown())
+
+export const zPostWorkflowsTasksByTaskIdStopPath = z.object({
+ task_id: z.string(),
+})
+
+/**
+ * Success
+ */
+export const zPostWorkflowsTasksByTaskIdStopResponse = z.record(z.string(), z.unknown())
diff --git a/packages/contracts/generated/enterprise/orpc.gen.ts b/packages/contracts/generated/enterprise/orpc.gen.ts
new file mode 100644
index 00000000000..73eb850001c
--- /dev/null
+++ b/packages/contracts/generated/enterprise/orpc.gen.ts
@@ -0,0 +1,534 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+import { oc } from '@orpc/contract'
+import * as z from 'zod'
+
+import {
+ zConsoleSsoOAuth2LoginResponse,
+ zConsoleSsoOidcLoginResponse,
+ zConsoleSsoSamlLoginResponse,
+ zEnterpriseAppDeployConsoleCancelRuntimeDeploymentBody,
+ zEnterpriseAppDeployConsoleCancelRuntimeDeploymentPath,
+ zEnterpriseAppDeployConsoleCancelRuntimeDeploymentResponse,
+ zEnterpriseAppDeployConsoleCreateAppInstanceBody,
+ zEnterpriseAppDeployConsoleCreateAppInstanceResponse,
+ zEnterpriseAppDeployConsoleCreateDeploymentBody,
+ zEnterpriseAppDeployConsoleCreateDeploymentPath,
+ zEnterpriseAppDeployConsoleCreateDeploymentResponse,
+ zEnterpriseAppDeployConsoleCreateDeveloperApiKeyBody,
+ zEnterpriseAppDeployConsoleCreateDeveloperApiKeyPath,
+ zEnterpriseAppDeployConsoleCreateDeveloperApiKeyResponse,
+ zEnterpriseAppDeployConsoleCreateReleaseBody,
+ zEnterpriseAppDeployConsoleCreateReleasePath,
+ zEnterpriseAppDeployConsoleCreateReleaseResponse,
+ zEnterpriseAppDeployConsoleDeleteAppInstancePath,
+ zEnterpriseAppDeployConsoleDeleteAppInstanceResponse,
+ zEnterpriseAppDeployConsoleDeleteDeveloperApiKeyPath,
+ zEnterpriseAppDeployConsoleDeleteDeveloperApiKeyResponse,
+ zEnterpriseAppDeployConsoleGetAppInstanceAccessPath,
+ zEnterpriseAppDeployConsoleGetAppInstanceAccessResponse,
+ zEnterpriseAppDeployConsoleGetAppInstanceOverviewPath,
+ zEnterpriseAppDeployConsoleGetAppInstanceOverviewResponse,
+ zEnterpriseAppDeployConsoleGetAppInstanceSettingsPath,
+ zEnterpriseAppDeployConsoleGetAppInstanceSettingsResponse,
+ zEnterpriseAppDeployConsoleGetEnvironmentAccessPolicyPath,
+ zEnterpriseAppDeployConsoleGetEnvironmentAccessPolicyResponse,
+ zEnterpriseAppDeployConsoleListAppInstancesQuery,
+ zEnterpriseAppDeployConsoleListAppInstancesResponse,
+ zEnterpriseAppDeployConsoleListDeploymentBindingOptionsPath,
+ zEnterpriseAppDeployConsoleListDeploymentBindingOptionsResponse,
+ zEnterpriseAppDeployConsoleListDeploymentEnvironmentOptionsResponse,
+ zEnterpriseAppDeployConsoleListReleasesPath,
+ zEnterpriseAppDeployConsoleListReleasesQuery,
+ zEnterpriseAppDeployConsoleListReleasesResponse,
+ zEnterpriseAppDeployConsoleListRuntimeInstancesPath,
+ zEnterpriseAppDeployConsoleListRuntimeInstancesResponse,
+ zEnterpriseAppDeployConsolePreviewReleaseBody,
+ zEnterpriseAppDeployConsolePreviewReleasePath,
+ zEnterpriseAppDeployConsolePreviewReleaseResponse,
+ zEnterpriseAppDeployConsoleSearchAccessSubjectsPath,
+ zEnterpriseAppDeployConsoleSearchAccessSubjectsQuery,
+ zEnterpriseAppDeployConsoleSearchAccessSubjectsResponse,
+ zEnterpriseAppDeployConsoleUndeployRuntimeInstanceBody,
+ zEnterpriseAppDeployConsoleUndeployRuntimeInstancePath,
+ zEnterpriseAppDeployConsoleUndeployRuntimeInstanceResponse,
+ zEnterpriseAppDeployConsoleUpdateAccessChannelsBody,
+ zEnterpriseAppDeployConsoleUpdateAccessChannelsPath,
+ zEnterpriseAppDeployConsoleUpdateAccessChannelsResponse,
+ zEnterpriseAppDeployConsoleUpdateAppInstanceBody,
+ zEnterpriseAppDeployConsoleUpdateAppInstancePath,
+ zEnterpriseAppDeployConsoleUpdateAppInstanceResponse,
+ zEnterpriseAppDeployConsoleUpdateDeveloperApiBody,
+ zEnterpriseAppDeployConsoleUpdateDeveloperApiPath,
+ zEnterpriseAppDeployConsoleUpdateDeveloperApiResponse,
+ zEnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyBody,
+ zEnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyPath,
+ zEnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyResponse,
+ zWebAppAuthGetGroupSubjectsQuery,
+ zWebAppAuthGetGroupSubjectsResponse,
+ zWebAppAuthGetWebAppAccessModeQuery,
+ zWebAppAuthGetWebAppAccessModeResponse,
+ zWebAppAuthGetWebAppWhitelistSubjectsQuery,
+ zWebAppAuthGetWebAppWhitelistSubjectsResponse,
+ zWebAppAuthIsUserAllowedToAccessWebAppQuery,
+ zWebAppAuthIsUserAllowedToAccessWebAppResponse,
+ zWebAppAuthSearchForWhilteListCandidatesQuery,
+ zWebAppAuthSearchForWhilteListCandidatesResponse,
+ zWebAppAuthUpdateWebAppWhitelistSubjectsBody,
+ zWebAppAuthUpdateWebAppWhitelistSubjectsResponse,
+} from './zod.gen'
+
+export const listAppInstances = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_ListAppInstances',
+ path: '/enterprise/app-instances',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ query: zEnterpriseAppDeployConsoleListAppInstancesQuery.optional() }))
+ .output(zEnterpriseAppDeployConsoleListAppInstancesResponse)
+
+export const createAppInstance = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'EnterpriseAppDeployConsole_CreateAppInstance',
+ path: '/enterprise/app-instances',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ body: zEnterpriseAppDeployConsoleCreateAppInstanceBody }))
+ .output(zEnterpriseAppDeployConsoleCreateAppInstanceResponse)
+
+export const deleteAppInstance = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'EnterpriseAppDeployConsole_DeleteAppInstance',
+ path: '/enterprise/app-instances/{appInstanceId}',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ params: zEnterpriseAppDeployConsoleDeleteAppInstancePath }))
+ .output(zEnterpriseAppDeployConsoleDeleteAppInstanceResponse)
+
+export const updateAppInstance = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'EnterpriseAppDeployConsole_UpdateAppInstance',
+ path: '/enterprise/app-instances/{appInstanceId}',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsoleUpdateAppInstanceBody,
+ params: zEnterpriseAppDeployConsoleUpdateAppInstancePath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleUpdateAppInstanceResponse)
+
+export const getAppInstanceAccess = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_GetAppInstanceAccess',
+ path: '/enterprise/app-instances/{appInstanceId}/access',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ params: zEnterpriseAppDeployConsoleGetAppInstanceAccessPath }))
+ .output(zEnterpriseAppDeployConsoleGetAppInstanceAccessResponse)
+
+export const updateAccessChannels = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'EnterpriseAppDeployConsole_UpdateAccessChannels',
+ path: '/enterprise/app-instances/{appInstanceId}/access-channels',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsoleUpdateAccessChannelsBody,
+ params: zEnterpriseAppDeployConsoleUpdateAccessChannelsPath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleUpdateAccessChannelsResponse)
+
+export const searchAccessSubjects = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_SearchAccessSubjects',
+ path: '/enterprise/app-instances/{appInstanceId}/access-subjects:search',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ params: zEnterpriseAppDeployConsoleSearchAccessSubjectsPath,
+ query: zEnterpriseAppDeployConsoleSearchAccessSubjectsQuery.optional(),
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleSearchAccessSubjectsResponse)
+
+export const createDeveloperApiKey = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'EnterpriseAppDeployConsole_CreateDeveloperApiKey',
+ path: '/enterprise/app-instances/{appInstanceId}/api-keys',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsoleCreateDeveloperApiKeyBody,
+ params: zEnterpriseAppDeployConsoleCreateDeveloperApiKeyPath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleCreateDeveloperApiKeyResponse)
+
+export const deleteDeveloperApiKey = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'DELETE',
+ operationId: 'EnterpriseAppDeployConsole_DeleteDeveloperApiKey',
+ path: '/enterprise/app-instances/{appInstanceId}/api-keys/{apiKeyId}',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ params: zEnterpriseAppDeployConsoleDeleteDeveloperApiKeyPath }))
+ .output(zEnterpriseAppDeployConsoleDeleteDeveloperApiKeyResponse)
+
+export const listDeploymentBindingOptions = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_ListDeploymentBindingOptions',
+ path: '/enterprise/app-instances/{appInstanceId}/deployment-binding-options',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ params: zEnterpriseAppDeployConsoleListDeploymentBindingOptionsPath }))
+ .output(zEnterpriseAppDeployConsoleListDeploymentBindingOptionsResponse)
+
+export const createDeployment = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'EnterpriseAppDeployConsole_CreateDeployment',
+ path: '/enterprise/app-instances/{appInstanceId}/deployments',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsoleCreateDeploymentBody,
+ params: zEnterpriseAppDeployConsoleCreateDeploymentPath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleCreateDeploymentResponse)
+
+export const updateDeveloperApi = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PATCH',
+ operationId: 'EnterpriseAppDeployConsole_UpdateDeveloperApi',
+ path: '/enterprise/app-instances/{appInstanceId}/developer-api',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsoleUpdateDeveloperApiBody,
+ params: zEnterpriseAppDeployConsoleUpdateDeveloperApiPath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleUpdateDeveloperApiResponse)
+
+export const getEnvironmentAccessPolicy = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_GetEnvironmentAccessPolicy',
+ path: '/enterprise/app-instances/{appInstanceId}/environments/{environmentId}/access-policy',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ params: zEnterpriseAppDeployConsoleGetEnvironmentAccessPolicyPath }))
+ .output(zEnterpriseAppDeployConsoleGetEnvironmentAccessPolicyResponse)
+
+export const updateEnvironmentAccessPolicy = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'PUT',
+ operationId: 'EnterpriseAppDeployConsole_UpdateEnvironmentAccessPolicy',
+ path: '/enterprise/app-instances/{appInstanceId}/environments/{environmentId}/access-policy',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyBody,
+ params: zEnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyPath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyResponse)
+
+export const getAppInstanceOverview = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_GetAppInstanceOverview',
+ path: '/enterprise/app-instances/{appInstanceId}/overview',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ params: zEnterpriseAppDeployConsoleGetAppInstanceOverviewPath }))
+ .output(zEnterpriseAppDeployConsoleGetAppInstanceOverviewResponse)
+
+export const listReleases = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_ListReleases',
+ path: '/enterprise/app-instances/{appInstanceId}/releases',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ params: zEnterpriseAppDeployConsoleListReleasesPath,
+ query: zEnterpriseAppDeployConsoleListReleasesQuery.optional(),
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleListReleasesResponse)
+
+export const createRelease = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'EnterpriseAppDeployConsole_CreateRelease',
+ path: '/enterprise/app-instances/{appInstanceId}/releases',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsoleCreateReleaseBody,
+ params: zEnterpriseAppDeployConsoleCreateReleasePath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleCreateReleaseResponse)
+
+export const previewRelease = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'EnterpriseAppDeployConsole_PreviewRelease',
+ path: '/enterprise/app-instances/{appInstanceId}/releases:preview',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsolePreviewReleaseBody,
+ params: zEnterpriseAppDeployConsolePreviewReleasePath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsolePreviewReleaseResponse)
+
+export const listRuntimeInstances = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_ListRuntimeInstances',
+ path: '/enterprise/app-instances/{appInstanceId}/runtime-instances',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ params: zEnterpriseAppDeployConsoleListRuntimeInstancesPath }))
+ .output(zEnterpriseAppDeployConsoleListRuntimeInstancesResponse)
+
+export const cancelRuntimeDeployment = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'EnterpriseAppDeployConsole_CancelRuntimeDeployment',
+ path: '/enterprise/app-instances/{appInstanceId}/runtime-instances/{runtimeInstanceId}/deployment:cancel',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsoleCancelRuntimeDeploymentBody,
+ params: zEnterpriseAppDeployConsoleCancelRuntimeDeploymentPath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleCancelRuntimeDeploymentResponse)
+
+export const undeployRuntimeInstance = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'EnterpriseAppDeployConsole_UndeployRuntimeInstance',
+ path: '/enterprise/app-instances/{appInstanceId}/runtime-instances/{runtimeInstanceId}:undeploy',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(
+ z.object({
+ body: zEnterpriseAppDeployConsoleUndeployRuntimeInstanceBody,
+ params: zEnterpriseAppDeployConsoleUndeployRuntimeInstancePath,
+ }),
+ )
+ .output(zEnterpriseAppDeployConsoleUndeployRuntimeInstanceResponse)
+
+export const getAppInstanceSettings = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_GetAppInstanceSettings',
+ path: '/enterprise/app-instances/{appInstanceId}/settings',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .input(z.object({ params: zEnterpriseAppDeployConsoleGetAppInstanceSettingsPath }))
+ .output(zEnterpriseAppDeployConsoleGetAppInstanceSettingsResponse)
+
+export const listDeploymentEnvironmentOptions = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'EnterpriseAppDeployConsole_ListDeploymentEnvironmentOptions',
+ path: '/enterprise/deployment-environment-options',
+ tags: ['EnterpriseAppDeployConsole'],
+ })
+ .output(zEnterpriseAppDeployConsoleListDeploymentEnvironmentOptionsResponse)
+
+export const enterpriseAppDeployConsole = {
+ listAppInstances,
+ createAppInstance,
+ deleteAppInstance,
+ updateAppInstance,
+ getAppInstanceAccess,
+ updateAccessChannels,
+ searchAccessSubjects,
+ createDeveloperApiKey,
+ deleteDeveloperApiKey,
+ listDeploymentBindingOptions,
+ createDeployment,
+ updateDeveloperApi,
+ getEnvironmentAccessPolicy,
+ updateEnvironmentAccessPolicy,
+ getAppInstanceOverview,
+ listReleases,
+ createRelease,
+ previewRelease,
+ listRuntimeInstances,
+ cancelRuntimeDeployment,
+ undeployRuntimeInstance,
+ getAppInstanceSettings,
+ listDeploymentEnvironmentOptions,
+}
+
+export const oAuth2Login = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'ConsoleSSO_OAuth2Login',
+ path: '/enterprise/sso/oauth2/login',
+ tags: ['ConsoleSSO'],
+ })
+ .output(zConsoleSsoOAuth2LoginResponse)
+
+export const oidcLogin = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'ConsoleSSO_OIDCLogin',
+ path: '/enterprise/sso/oidc/login',
+ tags: ['ConsoleSSO'],
+ })
+ .output(zConsoleSsoOidcLoginResponse)
+
+export const samlLogin = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'ConsoleSSO_SAMLLogin',
+ path: '/enterprise/sso/saml/login',
+ tags: ['ConsoleSSO'],
+ })
+ .output(zConsoleSsoSamlLoginResponse)
+
+export const consoleSso = {
+ oAuth2Login,
+ oidcLogin,
+ samlLogin,
+}
+
+export const getWebAppAccessMode = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'WebAppAuth_GetWebAppAccessMode',
+ path: '/enterprise/webapp/app/access-mode',
+ tags: ['WebAppAuth'],
+ })
+ .input(z.object({ query: zWebAppAuthGetWebAppAccessModeQuery.optional() }))
+ .output(zWebAppAuthGetWebAppAccessModeResponse)
+
+export const updateWebAppWhitelistSubjects = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'POST',
+ operationId: 'WebAppAuth_UpdateWebAppWhitelistSubjects',
+ path: '/enterprise/webapp/app/access-mode',
+ tags: ['WebAppAuth'],
+ })
+ .input(z.object({ body: zWebAppAuthUpdateWebAppWhitelistSubjectsBody }))
+ .output(zWebAppAuthUpdateWebAppWhitelistSubjectsResponse)
+
+export const searchForWhilteListCandidates = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'WebAppAuth_SearchForWhilteListCandidates',
+ path: '/enterprise/webapp/app/subject/search',
+ tags: ['WebAppAuth'],
+ })
+ .input(z.object({ query: zWebAppAuthSearchForWhilteListCandidatesQuery.optional() }))
+ .output(zWebAppAuthSearchForWhilteListCandidatesResponse)
+
+export const getWebAppWhitelistSubjects = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'WebAppAuth_GetWebAppWhitelistSubjects',
+ path: '/enterprise/webapp/app/subjects',
+ tags: ['WebAppAuth'],
+ })
+ .input(z.object({ query: zWebAppAuthGetWebAppWhitelistSubjectsQuery.optional() }))
+ .output(zWebAppAuthGetWebAppWhitelistSubjectsResponse)
+
+export const getGroupSubjects = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'WebAppAuth_GetGroupSubjects',
+ path: '/enterprise/webapp/group/subjects',
+ tags: ['WebAppAuth'],
+ })
+ .input(z.object({ query: zWebAppAuthGetGroupSubjectsQuery.optional() }))
+ .output(zWebAppAuthGetGroupSubjectsResponse)
+
+export const isUserAllowedToAccessWebApp = oc
+ .route({
+ inputStructure: 'detailed',
+ method: 'GET',
+ operationId: 'WebAppAuth_IsUserAllowedToAccessWebApp',
+ path: '/enterprise/webapp/permission',
+ tags: ['WebAppAuth'],
+ })
+ .input(z.object({ query: zWebAppAuthIsUserAllowedToAccessWebAppQuery.optional() }))
+ .output(zWebAppAuthIsUserAllowedToAccessWebAppResponse)
+
+export const webAppAuth = {
+ getWebAppAccessMode,
+ updateWebAppWhitelistSubjects,
+ searchForWhilteListCandidates,
+ getWebAppWhitelistSubjects,
+ getGroupSubjects,
+ isUserAllowedToAccessWebApp,
+}
+
+export const contract = {
+ enterpriseAppDeployConsole,
+ consoleSso,
+ webAppAuth,
+}
diff --git a/packages/contracts/generated/enterprise/types.gen.ts b/packages/contracts/generated/enterprise/types.gen.ts
new file mode 100644
index 00000000000..56228f27389
--- /dev/null
+++ b/packages/contracts/generated/enterprise/types.gen.ts
@@ -0,0 +1,1978 @@
+// This file is auto-generated by @hey-api/openapi-ts
+
+export type ClientOptions = {
+ baseUrl: `${string}://${string}` | (string & {})
+}
+
+export type AccessChannels = {
+ enabled?: boolean
+ webappRows?: Array<WebAppAccessRow>
+ cli?: CliAccess
+}
+
+export type AccessModeOption = {
+ mode?: string
+ label?: string
+ disabled?: boolean
+ selected?: boolean
+}
+
+export type AccessPolicyDetail = {
+ accessMode?: string
+ subjects?: Array<AccessSubjectDisplay>
+ options?: Array<AccessModeOption>
+}
+
+export type AccessStatus = {
+ accessChannelsEnabled?: boolean
+ webappUrl?: string
+ cliUrl?: string
+ developerApiEnabled?: boolean
+ apiKeyCount?: number
+}
+
+export type AccessSubject = {
+ subjectId?: string
+ subjectType?: string
+}
+
+export type AccessSubjectDisplay = {
+ id?: string
+ subjectType?: string
+ name?: string
+ avatarUrl?: string
+ memberCount?: string
+}
+
+export type Account = {
+ id?: string
+ email?: string
+ name?: string
+}
+
+export type AccountDetail = {
+ account?: Account
+ status?: string
+ createdAt?: string
+ lastActiveAt?: string
+ workspaces?: Array<AccountInWorkspace>
+ groups?: Array<AccountDetailGroup>
+}
+
+export type AccountDetailGroup = {
+ id?: string
+ name?: string
+}
+
+export type AccountInWorkspace = {
+ workspaceId?: string
+ workspaceName?: string
+ role?: string
+}
+
+export type AckDeploymentReply = {
+ accepted?: boolean
+ newVersion?: string
+}
+
+export type AckDeploymentReq = {
+ deploymentId?: string
+ instanceId?: string
+ expectedVersion?: string
+ status?: string
+ observedReleaseId?: string
+ lastError?: LastError
+}
+
+export type AppInstanceBasicInfo = {
+ id?: string
+ name?: string
+ description?: string
+ sourceAppId?: string
+ sourceAppName?: string
+ mode?: string
+ createdAt?: string
+}
+
+export type AppInstanceCard = {
+ id?: string
+ name?: string
+ icon?: string
+ mode?: string
+ sourceAppName?: string
+ statuses?: Array<StatusCount>
+ lastDeployedAt?: string
+}
+
+export type AppRunnerBatchRuntimeArtifactReply = {
+ results?: Array<AppRunnerRuntimeArtifactResult>
+}
+
+export type AppRunnerBatchRuntimeArtifactRequest = {
+ artifacts?: Array<AppRunnerRuntimeArtifactRequest>
+}
+
+export type AppRunnerBootstrapAssignment = {
+ appId?: string
+ environmentId?: string
+ workflowId?: string
+ instanceId?: string
+ workspaceId?: string
+ instanceVersion?: string
+ bindingSnapshotVersion?: string
+ executionTokenVersion?: string
+ executionToken?: string
+ releaseId?: string
+}
+
+export type AppRunnerBootstrapReply = {
+ runnerId?: string
+ assignmentRevision?: string
+ assignments?: Array<AppRunnerBootstrapAssignment>
+}
+
+export type AppRunnerBootstrapRequest = {
+ runner?: AppRunnerRunnerInfo
+}
+
+export type AppRunnerRunnerInfo = {
+ hostname?: string
+}
+
+export type AppRunnerRuntimeArtifactReply = {
+ dslYaml?: string
+ bindingSnapshotVersion?: string
+ bindingSnapshot?: {
+ [key: string]: unknown
+ }
+}
+
+export type AppRunnerRuntimeArtifactRequest = {
+ instanceId?: string
+ releaseId?: string
+ bindingSnapshotVersion?: string
+}
+
+export type AppRunnerRuntimeArtifactResult = {
+ instanceId?: string
+ releaseId?: string
+ artifact?: AppRunnerRuntimeArtifactReply
+ errorCode?: string
+ errorMessage?: string
+}
+
+export type AppRunnerTokenExchangeReply = {
+ accessToken?: string
+ expiresAt?: string
+}
+
+export type AppRunnerTokenExchangeRequest = {
+ joinToken?: string
+}
+
+export type AuthSettingsReply = {
+ userSsoSettings?: SsoSettings
+ webSsoSettings?: SsoSettings
+ dashboardSsoSettings?: SsoSettings
+ userSsoSamlAcsUrl?: string
+ userSsoOidcCallbackUrl?: string
+ userSsoOauth2CallbackUrl?: string
+ webSsoSamlAcsUrl?: string
+ webSsoOidcCallbackUrl?: string
+ webSsoOauth2CallbackUrl?: string
+ webSsoMembersSamlAcsUrl?: string
+ webSsoMembersOidcCallbackUrl?: string
+ webSsoMembersOauth2CallbackUrl?: string
+ dashboardSsoSamlAcsUrl?: string
+ dashboardSsoOidcCallbackUrl?: string
+ dashboardSsoOauth2CallbackUrl?: string
+}
+
+export type AuthSettingsReq = {
+ ssoType?: string
+ ssoSettings?: SsoSettings
+}
+
+export type BootstrapProgress = {
+ currentStep?: string
+ completedSteps?: Array<string>
+ attemptCount?: number
+ lastAttemptAt?: string
+ lastErrorCode?: string
+ lastErrorMessage?: string
+}
+
+export type BrandingInfo = {
+ enabled?: boolean
+ applicationTitle?: string
+ loginPageLogo?: string
+ workspaceLogo?: string
+ favicon?: string
+}
+
+export type CancelRuntimeDeploymentReply = {
+ status?: string
+}
+
+export type CancelRuntimeDeploymentReq = {
+ appInstanceId?: string
+ runtimeInstanceId?: string
+}
+
+export type CheckPasswordStatusReply = {
+ requirePasswordChange?: boolean
+ changeReason?: number
+ daysToExpire?: number
+ message?: string
+}
+
+export type ClearDefaultWorkspaceReply = {
+ [key: string]: unknown
+}
+
+export type CliAccess = {
+ url?: string
+}
+
+export type ConsoleEnvironment = {
+ id?: string
+ name?: string
+ runtime?: string
+ type?: string
+ status?: string
+}
+
+export type ConsoleRelease = {
+ id?: string
+ name?: string
+ shortCommitId?: string
+ createdAt?: string
+}
+
+export type ConsoleUser = {
+ id?: string
+ name?: string
+}
+
+export type CreateAppInstanceReply = {
+ appInstanceId?: string
+ initialRelease?: ConsoleRelease
+}
+
+export type CreateAppInstanceReq = {
+ sourceAppId?: string
+ name?: string
+ description?: string
+}
+
+export type CreateBearerTokenResponse = {
+ token?: string
+}
+
+export type CreateDeploymentReply = {
+ runtimeInstanceId?: string
+ deploymentId?: string
+ status?: string
+}
+
+export type CreateDeploymentReq = {
+ appInstanceId?: string
+ environmentId?: string
+ releaseId?: string
+ bindings?: Array<DeploymentRuntimeBinding>
+}
+
+export type CreateDeveloperApiKeyReply = {
+ apiKey?: DeveloperApiKeyRow
+ token?: string
+}
+
+export type CreateDeveloperApiKeyReq = {
+ appInstanceId?: string
+ environmentId?: string
+ name?: string
+}
+
+export type CreateEnvironmentReply = {
+ environment?: Environment
+}
+
+export type CreateEnvironmentReq = {
+ name?: string
+ description?: string
+ mode?: number
+ backend?: number
+ k8s?: K8sEnvironmentConfig
+ host?: HostEnvironmentConfig
+}
+
+export type CreateMemberReply = {
+ id?: string
+ password?: string
+}
+
+export type CreateMemberReq = {
+ name?: string
+ email?: string
+ status?: string
+}
+
+export type CreateNewGroupsReq = {
+ groups?: Array<CreateNewGroupsReqGroup>
+}
+
+export type CreateNewGroupsReqGroup = {
+ name?: string
+}
+
+export type CreateNewGroupsRes = {
+ groups?: Array<SubjectGroupData>
+}
+
+export type CreateReleaseReply = {
+ release?: ConsoleRelease
+}
+
+export type CreateReleaseReq = {
+ appInstanceId?: string
+ name?: string
+ description?: string
+}
+
+export type CreateSecretKeyReply = {
+ id?: string
+ name?: string
+ secretKey?: string
+ createdAt?: string
+ lastActive?: string
+}
+
+export type CreateSecretKeyReq = {
+ name?: string
+}
+
+export type CreateUserReply = {
+ id?: string
+ password?: string
+}
+
+export type CreateUserReq = {
+ name?: string
+ email?: string
+ status?: string
+}
+
+export type CreateWorkspaceReply = {
+ workspace?: Workspace
+}
+
+export type CreateWorkspaceReq = {
+ name?: string
+ email?: string
+ status?: string
+}
+
+export type CurrentUserReply = {
+ id?: string
+ name?: string
+ email?: string
+ interfaceLanguage?: string
+ timezone?: string
+}
+
+export type DashboardSsooidcLoginReply = {
+ url?: string
+ state?: string
+}
+
+export type DashboardSsoOauth2LoginReply = {
+ url?: string
+ state?: string
+}
+
+export type DashboardSsosamlLoginReply = {
+ url?: string
+}
+
+export type DeleteAppInstanceReply = {
+ [key: string]: unknown
+}
+
+export type DeleteDeveloperApiKeyReply = {
+ [key: string]: unknown
+}
+
+export type DeleteEnvironmentReply = {
+ [key: string]: unknown
+}
+
+export type DeleteGroupsRes = {
+ message?: string
+}
+
+export type DeleteGuard = {
+ canDelete?: boolean
+ disabledReason?: string
+}
+
+export type DeleteMemberReply = {
+ account?: Account
+}
+
+export type DeleteSecretKeyReply = {
+ message?: string
+}
+
+export type DeleteUserReply = {
+ account?: Account
+}
+
+export type DeleteWorkspaceReply = {
+ [key: string]: unknown
+}
+
+export type DeployedEnvironment = {
+ environmentId?: string
+ environmentName?: string
+}
+
+export type DeploymentBindingOptionSlot = {
+ slot?: string
+ kind?: string
+ label?: string
+ required?: boolean
+ candidates?: Array<DeploymentCredentialOption>
+ envVarCandidates?: Array<DeploymentEnvVarOption>
+}
+
+export type DeploymentCredentialOption = {
+ credentialId?: string
+ displayName?: string
+ pluginId?: string
+ pluginName?: string
+ pluginVersion?: string
+}
+
+export type DeploymentEnvVarOption = {
+ envVarId?: string
+ name?: string
+ valueType?: string
+ displayValue?: string
+}
+
+export type DeploymentEnvironmentOption = {
+ id?: string
+ name?: string
+ type?: string
+ backend?: string
+ status?: string
+ managedBy?: string
+ deployable?: boolean
+ disabledReason?: string
+}
+
+export type DeploymentRuntimeBinding = {
+ slot?: string
+ credentialId?: string
+ envVarId?: string
+}
+
+export type DeploymentStatusRow = {
+ environment?: ConsoleEnvironment
+ release?: ConsoleRelease
+ status?: string
+}
+
+export type DeveloperApiAccess = {
+ enabled?: boolean
+ apiKeys?: Array<DeveloperApiKeyRow>
+}
+
+export type DeveloperApiKeyRow = {
+ id?: string
+ name?: string
+ environment?: ConsoleEnvironment
+ maskedKey?: string
+}
+
+export type EndpointReply = {
+ mode?: number
+ metricsEndpoint?: OtelExporterEndpoint
+ tracesEndpoint?: OtelExporterEndpoint
+}
+
+export type EnterpriseSystemUserSettingReply = {
+ ssoEnforcedForSignin?: boolean
+ ssoEnforcedForSigninProtocol?: string
+ enableEmailPasswordLogin?: boolean
+}
+
+export type Environment = {
+ id?: string
+ name?: string
+ description?: string
+ mode?: number
+ namespace?: string
+ apiServer?: string
+ status?: number
+ statusMessage?: string
+ bootstrapProgress?: BootstrapProgress
+ managedBy?: string
+ createdAt?: string
+ updatedAt?: string
+ backend?: number
+ host?: string
+}
+
+export type EnvironmentAccessRow = {
+ environment?: ConsoleEnvironment
+ currentRelease?: ConsoleRelease
+ accessMode?: string
+ accessModeLabel?: string
+ hint?: string
+}
+
+export type EnvironmentFilter = {
+ id?: string
+ name?: string
+ kind?: string
+}
+
+export type GetAppInstanceAccessReply = {
+ permissions?: Array<EnvironmentAccessRow>
+ accessChannels?: AccessChannels
+ developerApi?: DeveloperApiAccess
+}
+
+export type GetAppInstanceOverviewReply = {
+ instance?: AppInstanceBasicInfo
+ deployments?: Array<DeploymentStatusRow>
+ access?: AccessStatus
+}
+
+export type GetAppInstanceSettingsReply = {
+ name?: string
+ description?: string
+ deleteGuard?: DeleteGuard
+}
+
+export type GetBearerTokenResponse = {
+ maskedToken?: string
+}
+
+export type GetClusterInfoReply = {
+ mode?: string
+ clusterId?: string
+ verifyMode?: string
+}
+
+export type GetDefaultWorkspaceReply = {
+ workspaceId?: string
+ workspace?: Workspace
+}
+
+export type GetEnvironmentAccessPolicyReply = {
+ policy?: AccessPolicyDetail
+}
+
+export type GetEnvironmentReply = {
+ environment?: Environment
+}
+
+export type GetGroupSubjectsRes = {
+ subjects?: Array<Subject>
+}
+
+export type GetGroupsRes = {
+ groups?: Array<SubjectGroupData>
+}
+
+export type GetInstanceReply = {
+ instanceId?: string
+ status?: string
+ desiredReleaseId?: string
+ observedReleaseId?: string
+ currentDeploymentId?: string
+ version?: string
+}
+
+export type GetJoinedGroupsRes = {
+ groups?: Array<SubjectGroupData>
+}
+
+export type GetLicenseReply = {
+ license?: LicenseInfo
+}
+
+export type GetLicenseStatusReply = {
+ status?: string
+}
+
+export type GetMfaInfoReply = {
+ userEnabled?: boolean
+ userSetup?: boolean
+ globalEnabled?: boolean
+}
+
+export type GetMemberReply = {
+ account?: AccountDetail
+}
+
+export type GetUserReply = {
+ account?: AccountDetail
+}
+
+export type GetWebAppAccessModeRes = {
+ accessMode?: string
+}
+
+export type GetWebAppAuthInfoRes = {
+ allowSso?: boolean
+ allowEmailCodeLogin?: boolean
+ allowEmailPasswordLogin?: boolean
+}
+
+export type GetWebAppWhitelistSubjectsRes = {
+ groups?: Array<SubjectGroupData>
+ members?: Array<GetWebAppWhitelistSubjectsResMember>
+}
+
+export type GetWebAppWhitelistSubjectsResMember = {
+ id?: string
+ name?: string
+ email?: string
+ avatar?: string
+}
+
+export type GetWorkspacePermissionReply = {
+ permission?: WorkspacePermission
+}
+
+export type GetWorkspaceReply = {
+ workspace?: Workspace
+}
+
+export type HealthzReply = {
+ message?: string
+ status?: string
+}
+
+export type HostEnvironmentConfig = {
+ machineId?: string
+ joinTokenHash?: string
+}
+
+export type InfoConfigReply = {
+ SSOEnforcedForSignin?: boolean
+ SSOEnforcedForSigninProtocol?: string
+ SSOEnforcedForWeb?: boolean
+ SSOEnforcedForWebProtocol?: string
+ EnableEmailCodeLogin?: boolean
+ EnableEmailPasswordLogin?: boolean
+ IsAllowRegister?: boolean
+ IsAllowCreateWorkspace?: boolean
+ License?: LicenseStatus
+ Branding?: BrandingInfo
+ WebAppAuth?: WebAppAuthInfo
+ PluginInstallationPermission?: PluginInstallationPermissionInfo
+}
+
+export type InnerBatchGetWebAppAccessModesByIdReq = {
+ appIds?: Array<string>
+}
+
+export type InnerBatchGetWebAppAccessModesByIdRes = {
+ accessModes?: {
+ [key: string]: string
+ }
+}
+
+export type InnerBatchIsUserAllowedToAccessWebAppReq = {
+ userId?: string
+ appIds?: Array<string>
+}
+
+export type InnerBatchIsUserAllowedToAccessWebAppRes = {
+ permissions?: {
+ [key: string]: boolean
+ }
+}
+
+export type InnerCheckAppDeployAccessReply = {
+ allowed?: boolean
+ matchedPolicyId?: string
+ matchedScopeType?: string
+ reason?: string
+ cacheTtlSeconds?: number
+}
+
+export type InnerCheckAppDeployAccessReq = {
+ appInstanceId?: string
+ environmentId?: string
+ principalType?: string
+ principalId?: string
+}
+
+export type InnerCleanAppRes = {
+ message?: string
+}
+
+export type InnerGetTokenRouteReply = {
+ environmentId?: string
+ namespace?: string
+ serviceName?: string
+ servicePort?: number
+ environmentStatus?: string
+ appId?: string
+ tenantId?: string
+ instanceId?: string
+ observedReleaseId?: string
+ instanceStatus?: string
+}
+
+export type InnerGetTokenRouteReq = {
+ token?: string
+}
+
+export type InnerGetWebAppAccessModeByCodeRes = {
+ accessMode?: string
+}
+
+export type InnerGetWebAppAccessModeByIdRes = {
+ accessMode?: string
+}
+
+export type InnerIsUserAllowedToAccessWebAppRes = {
+ result?: boolean
+}
+
+export type InnerTryAddAccountToDefaultWorkspaceReply = {
+ workspaceId?: string
+ joined?: boolean
+ message?: string
+}
+
+export type InnerTryAddAccountToDefaultWorkspaceReq = {
+ accountId?: string
+}
+
+export type IsUserAllowedToAccessWebAppRes = {
+ result?: boolean
+}
+
+export type JoinWorkspaceReply = {
+ message?: string
+}
+
+export type JoinWorkspaceReq = {
+ id?: string
+ email?: string
+ role?: string
+}
+
+export type K8sEnvironmentConfig = {
+ namespace?: string
+ apiServer?: string
+ caBundle?: string
+ bearerToken?: string
+}
+
+export type LastError = {
+ phase?: string
+ code?: string
+ message?: string
+ releaseId?: string
+}
+
+export type LicenseInfo = {
+ uuid?: string
+ expiredAt?: string
+ clusterId?: string
+ product?: string
+ limits?: LimitFields
+}
+
+export type LicenseStatus = {
+ status?: string
+ expiredAt?: string
+ workspaces?: ResourceQuota
+}
+
+export type LimitFields = {
+ workspaceMembers?: number
+ workspaces?: ResourceQuota
+}
+
+export type ListAppInstancesReply = {
+ filters?: Array<EnvironmentFilter>
+ data?: Array<AppInstanceCard>
+ pagination?: Pagination
+}
+
+export type ListDeploymentBindingOptionsReply = {
+ slots?: Array<DeploymentBindingOptionSlot>
+}
+
+export type ListDeploymentEnvironmentOptionsReply = {
+ environments?: Array<DeploymentEnvironmentOption>
+}
+
+export type ListEnvironmentsReply = {
+ data?: Array<Environment>
+ pagination?: Pagination
+}
+
+export type ListMembersReply = {
+ data?: Array<AccountDetail>
+ pagination?: Pagination
+}
+
+export type ListReleasesReply = {
+ data?: Array<ReleaseRow>
+ pagination?: Pagination
+}
+
+export type ListRuntimeInstancesReply = {
+ data?: Array<RuntimeInstanceRow>
+}
+
+export type ListSecretKeysReply = {
+ data?: Array<SecretKey>
+ pagination?: Pagination
+}
+
+export type ListUsersReply = {
+ data?: Array<AccountDetail>
+ pagination?: Pagination
+}
+
+export type ListWorkspacesReply = {
+ data?: Array<Workspace>
+ pagination?: Pagination
+}
+
+export type LoginTypesReply = {
+ enabledEmailCodeLogin?: boolean
+ enableEmailPasswordLogin?: boolean
+ isAllowRegister?: boolean
+ isAllowCreateWorkspace?: boolean
+}
+
+export type LoginTypesReq = {
+ enabledEmailCodeLogin?: boolean
+ enableEmailPasswordLogin?: boolean
+ isAllowRegister?: boolean
+ isAllowCreateWorkspace?: boolean
+}
+
+export type MfaBackupCodesRes = {
+ codes?: Array<string>
+ validCounts?: number
+ createdAt?: string
+}
+
+export type MfaDeleteBackupCodesRes = {
+ message?: string
+}
+
+export type MfaDeleteRes = {
+ token?: string
+}
+
+export type MfaDownloadBackupCodesSummaryRes = {
+ content?: string
+}
+
+export type MfaEnrollReq = {
+ code?: string
+}
+
+export type MfaEnrollRes = {
+ token?: string
+}
+
+export type MfaGetEnrollInfoRes = {
+ qrCode?: string
+ secret?: string
+}
+
+export type MfaModifyRes = {
+ message?: string
+}
+
+export type OAuth2Config = {
+ clientId?: string
+ clientSecret?: string
+ authUrl?: string
+ tokenUrl?: string
+ userinfoUrl?: string
+ scopes?: string
+ enablePkce?: boolean
+}
+
+export type OAuth2LoginReply = {
+ url?: string
+ state?: string
+}
+
+export type OidcConfig = {
+ issuerUrl?: string
+ clientId?: string
+ clientSecret?: string
+ enablePkce?: boolean
+}
+
+export type OidcReply = {
+ url?: string
+ state?: string
+}
+
+export type OtelExporterEndpoint = {
+ endpoint?: string
+ compression?: string
+ protocol?: number
+ timeout?: string
+ headers?: {
+ [key: string]: string
+ }
+ tlsCaPem?: string
+ tlsInsecure?: boolean
+ tlsClientCertPem?: string
+ tlsClientKeyPem?: string
+ enabled?: boolean
+ tlsInsecureSkipVerify?: boolean
+}
+
+export type OtelExporterStatusReply = {
+ connectedAt?: string
+ bytesPushed?: string
+ itemsInQueue?: string
+ logs?: string
+ status?: number
+}
+
+export type PasswordPolicyConfig = {
+ minLength?: number
+ requireDigit?: boolean
+ requireLowercase?: boolean
+ requireUppercase?: boolean
+ requireSpecial?: boolean
+ forbidRepeated?: boolean
+ forbidSequential?: boolean
+ expiryEnabled?: boolean
+ expiryDays?: number
+}
+
+export type PasswordStrengthReply = {
+ level?: number
+}
+
+export type PasswordStrengthReq = {
+ password?: string
+}
+
+export type PluginInstallationPermissionInfo = {
+ pluginInstallationScope?: string
+ restrictToMarketplaceOnly?: boolean
+}
+
+export type PluginInstallationSettingsReply = {
+ pluginInstallationScope?: number
+ restrictToMarketplaceOnly?: boolean
+}
+
+export type PreviewReleaseReply = {
+ release?: ConsoleRelease
+ bindings?: Array<ReleaseRuntimeBinding>
+}
+
+export type PreviewReleaseReq = {
+ appInstanceId?: string
+ releaseId?: string
+}
+
+export type ReleaseRow = {
+ id?: string
+ name?: string
+ createdAt?: string
+ createdBy?: ConsoleUser
+ deployedTo?: Array<DeployedEnvironment>
+}
+
+export type ReleaseRuntimeBinding = {
+ kind?: string
+ label?: string
+ displayValue?: string
+ valueType?: string
+}
+
+export type ResetMemberPasswordReply = {
+ id?: string
+ password?: string
+}
+
+export type ResetMemberPasswordReq = {
+ id?: string
+}
+
+export type ResetPasswordReply = {
+ message?: string
+}
+
+export type ResetPasswordReq = {
+ currentPassword?: string
+ newPassword?: string
+ confirmPassword?: string
+}
+
+export type ResetUserPasswordReply = {
+ id?: string
+ password?: string
+}
+
+export type ResetUserPasswordReq = {
+ id?: string
+}
+
+export type ResolveCredentialsReply = {
+ resolved?: Array<ResolvedCredential>
+}
+
+export type ResolveCredentialsReq = {
+ instanceId?: string
+ deploymentId?: string
+ slots?: Array<string>
+}
+
+export type ResolvedCredential = {
+ slot?: string
+ credentialId?: string
+ envVarId?: string
+ value?: string
+}
+
+export type ResourceQuota = {
+ used?: number
+ limit?: number
+ enabled?: boolean
+}
+
+export type RetryEnvironmentReply = {
+ environment?: Environment
+}
+
+export type RetryEnvironmentReq = {
+ id?: string
+}
+
+export type RuntimeEndpoints = {
+ run?: string
+ health?: string
+}
+
+export type RuntimeInstanceDetail = {
+ deploymentName?: string
+ replicas?: number
+ runtimeMode?: string
+ runtimeNote?: string
+ endpoints?: RuntimeEndpoints
+ bindings?: Array<ReleaseRuntimeBinding>
+}
+
+export type RuntimeInstanceRow = {
+ id?: string
+ environment?: ConsoleEnvironment
+ status?: string
+ currentRelease?: ConsoleRelease
+ detail?: RuntimeInstanceDetail
+}
+
+export type SamlConfig = {
+ idpSsoUrl?: string
+ certificate?: string
+}
+
+export type SamlLoginReply = {
+ url?: string
+}
+
+export type SsoIdPProvider = {
+ protocol?: string
+ provider?: string
+ samlConfig?: SamlConfig
+ oidcConfig?: OidcConfig
+ oauth2Config?: OAuth2Config
+}
+
+export type SsoSettings = {
+ ssoEnforced?: boolean
+ sessionTimeout?: number
+ ssoIdpProvider?: SsoIdPProvider
+}
+
+export type SsoSettingsReply = {
+ enabled?: boolean
+}
+
+export type ScimSettings = {
+ enabled?: boolean
+ lastSyncTime?: string
+}
+
+export type SearchAccessSubjectsReply = {
+ data?: Array<AccessSubjectDisplay>
+}
+
+export type SearchForWhilteListCandidatesRes = {
+ subjects?: Array<Subject>
+ currPage?: number
+ hasMore?: boolean
+}
+
+export type SecretKey = {
+ id?: string
+ name?: string
+ secretKeyMasked?: string
+ createdAt?: string
+ lastActive?: string
+}
+
+export type SetDefaultWorkspaceReply = {
+ workspaceId?: string
+}
+
+export type SetDefaultWorkspaceReq = {
+ id?: string
+}
+
+export type StatusCount = {
+ status?: string
+ count?: number
+}
+
+export type Subject = {
+ subjectId?: string
+ subjectType?: string
+ accountData?: SubjectAccountData
+ groupData?: SubjectGroupData
+}
+
+export type SubjectAccountData = {
+ id?: string
+ name?: string
+ email?: string
+ avatar?: string
+}
+
+export type SubjectGroupData = {
+ id?: string
+ name?: string
+ groupSize?: number
+}
+
+export type SystemUserSettingReply = {
+ isAllowRegister?: boolean
+ enableEmailPasswordLogin?: boolean
+}
+
+export type SystemUserSettingReq = {
+ isAllowRegister?: boolean
+ enableEmailPasswordLogin?: boolean
+}
+
+export type TestConnectionReply = {
+ success?: boolean
+ error?: string
+}
+
+export type TestEnvironmentConnectionReply = {
+ ok?: boolean
+ reachableServerVersion?: string
+ namespaceExists?: boolean
+ missingPermissions?: Array<string>
+ error?: string
+ probedAt?: string
+}
+
+export type TestEnvironmentConnectionReq = {
+ id?: string
+}
+
+export type ToggleEndpointRequest = {
+ enabled?: boolean
+}
+
+export type UndeployRuntimeInstanceReply = {
+ deploymentId?: string
+ status?: string
+}
+
+export type UndeployRuntimeInstanceReq = {
+ appInstanceId?: string
+ runtimeInstanceId?: string
+}
+
+export type UpdateAccessChannelsReply = {
+ accessChannels?: AccessChannels
+}
+
+export type UpdateAccessChannelsReq = {
+ appInstanceId?: string
+ enabled?: boolean
+}
+
+export type UpdateAccessModeReq = {
+ appId?: string
+ accessMode?: string
+}
+
+export type UpdateAccessModeRes = {
+ message?: string
+}
+
+export type UpdateAppInstanceReply = {
+ appInstanceId?: string
+}
+
+export type UpdateAppInstanceReq = {
+ appInstanceId?: string
+ name?: string
+ description?: string
+}
+
+export type UpdateBrandingInfoReq = {
+ enabled?: boolean
+ applicationTitle?: string
+ loginPageLogo?: string
+ workspaceLogo?: string
+ favicon?: string
+}
+
+export type UpdateDeveloperApiReply = {
+ developerApi?: DeveloperApiAccess
+}
+
+export type UpdateDeveloperApiReq = {
+ appInstanceId?: string
+ enabled?: boolean
+}
+
+export type UpdateEnvironmentAccessPolicyReply = {
+ permission?: EnvironmentAccessRow
+}
+
+export type UpdateEnvironmentAccessPolicyReq = {
+ appInstanceId?: string
+ environmentId?: string
+ accessMode?: string
+ subjects?: Array<AccessSubject>
+}
+
+export type UpdateEnvironmentReply = {
+ environment?: Environment
+}
+
+export type UpdateEnvironmentReq = {
+ id?: string
+ name?: string
+ description?: string
+}
+
+export type UpdateGroupSubjectsReq = {
+ groupId?: string
+ subjects?: Array<Subject>
+}
+
+export type UpdateGroupSubjectsRes = {
+ message?: string
+}
+
+export type UpdateGroupsReq = {
+ groups?: Array<UpdateGroupsReqGroup>
+}
+
+export type UpdateGroupsReqGroup = {
+ id?: string
+ name?: string
+}
+
+export type UpdateGroupsRes = {
+ groups?: Array<SubjectGroupData>
+}
+
+export type UpdateJoinedGroupsReq = {
+ accountId?: string
+ groupIds?: Array<string>
+}
+
+export type UpdateJoinedGroupsRes = {
+ message?: string
+}
+
+export type UpdateLicenseReply = {
+ message?: string
+}
+
+export type UpdateLicenseReq = {
+ licenseId?: string
+}
+
+export type UpdateMfaStatusReq = {
+ enabled?: boolean
+}
+
+export type UpdateMfaStatusRes = {
+ message?: string
+}
+
+export type UpdateMemberReply = {
+ account?: Account
+}
+
+export type UpdateMemberReq = {
+ id?: string
+ name?: string
+ email?: string
+ status?: string
+}
+
+export type UpdateMembersInGroupsReq = {
+ groupId?: string
+ accountIds?: Array<string>
+}
+
+export type UpdateMembersInGroupsRes = {
+ message?: string
+}
+
+export type UpdateOfflineLicenseReply = {
+ message?: string
+}
+
+export type UpdateOfflineLicenseReq = {
+ offlineCode?: string
+}
+
+export type UpdatePluginInstallationSettingsRequest = {
+ pluginInstallationScope?: number
+ restrictToMarketplaceOnly?: boolean
+}
+
+export type UpdateUserReply = {
+ account?: AccountDetail
+}
+
+export type UpdateUserReq = {
+ id?: string
+ name?: string
+ email?: string
+ status?: string
+}
+
+export type UpdateWebAppAuthInfoReq = {
+ allowSso?: boolean
+ allowEmailCodeLogin?: boolean
+ allowEmailPasswordLogin?: boolean
+}
+
+export type UpdateWebAppAuthInfoRes = {
+ message?: string
+}
+
+export type UpdateWebAppWhitelistSubjectsReq = {
+ appId?: string
+ subjects?: Array<Subject>
+ accessMode?: string
+}
+
+export type UpdateWebAppWhitelistSubjectsRes = {
+ message?: string
+}
+
+export type UpdateWorkspacePermissionReply = {
+ message?: string
+ permission?: WorkspacePermission
+}
+
+export type UpdateWorkspacePermissionReq = {
+ id?: string
+ permission?: WorkspacePermission
+}
+
+export type UpdateWorkspaceReply = {
+ workspace?: Workspace
+}
+
+export type UpdateWorkspaceReq = {
+ id?: string
+ name?: string
+ email?: string
+ status?: string
+}
+
+export type WebAppAccessRow = {
+ environment?: ConsoleEnvironment
+ url?: string
+}
+
+export type WebAppAuthInfo = {
+ allowSso?: boolean
+ allowEmailCodeLogin?: boolean
+ allowEmailPasswordLogin?: boolean
+}
+
+export type WebOAuth2LoginReply = {
+ url?: string
+ state?: string
+}
+
+export type WebOidcLoginReply = {
+ url?: string
+}
+
+export type WebSamlLoginReply = {
+ url?: string
+}
+
+export type Workspace = {
+ id?: string
+ name?: string
+ status?: string
+ createdAt?: string
+ owner?: Account
+}
+
+export type WorkspaceInfoReply = {
+ WorkspaceMembers?: ResourceQuota
+}
+
+export type WorkspacePermission = {
+ workspaceId?: string
+ allowMemberInvite?: boolean
+ allowOwnerTransfer?: boolean
+}
+
+export type Pagination = {
+ totalCount?: number
+ perPage?: number
+ currentPage?: number
+ totalPages?: number
+}
+
+export type EnterpriseAppDeployConsoleListAppInstancesData = {
+ body?: never
+ path?: never
+ query?: {
+ environmentId?: string
+ notDeployed?: boolean
+ query?: string
+ pageNumber?: number
+ resultsPerPage?: number
+ }
+ url: '/enterprise/app-instances'
+}
+
+export type EnterpriseAppDeployConsoleListAppInstancesResponses = {
+ 200: ListAppInstancesReply
+}
+
+export type EnterpriseAppDeployConsoleListAppInstancesResponse
+ = EnterpriseAppDeployConsoleListAppInstancesResponses[keyof EnterpriseAppDeployConsoleListAppInstancesResponses]
+
+export type EnterpriseAppDeployConsoleCreateAppInstanceData = {
+ body: CreateAppInstanceReq
+ path?: never
+ query?: never
+ url: '/enterprise/app-instances'
+}
+
+export type EnterpriseAppDeployConsoleCreateAppInstanceResponses = {
+ 200: CreateAppInstanceReply
+}
+
+export type EnterpriseAppDeployConsoleCreateAppInstanceResponse
+ = EnterpriseAppDeployConsoleCreateAppInstanceResponses[keyof EnterpriseAppDeployConsoleCreateAppInstanceResponses]
+
+export type EnterpriseAppDeployConsoleDeleteAppInstanceData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}'
+}
+
+export type EnterpriseAppDeployConsoleDeleteAppInstanceResponses = {
+ 200: DeleteAppInstanceReply
+}
+
+export type EnterpriseAppDeployConsoleDeleteAppInstanceResponse
+ = EnterpriseAppDeployConsoleDeleteAppInstanceResponses[keyof EnterpriseAppDeployConsoleDeleteAppInstanceResponses]
+
+export type EnterpriseAppDeployConsoleUpdateAppInstanceData = {
+ body: UpdateAppInstanceReq
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}'
+}
+
+export type EnterpriseAppDeployConsoleUpdateAppInstanceResponses = {
+ 200: UpdateAppInstanceReply
+}
+
+export type EnterpriseAppDeployConsoleUpdateAppInstanceResponse
+ = EnterpriseAppDeployConsoleUpdateAppInstanceResponses[keyof EnterpriseAppDeployConsoleUpdateAppInstanceResponses]
+
+export type EnterpriseAppDeployConsoleGetAppInstanceAccessData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/access'
+}
+
+export type EnterpriseAppDeployConsoleGetAppInstanceAccessResponses = {
+ 200: GetAppInstanceAccessReply
+}
+
+export type EnterpriseAppDeployConsoleGetAppInstanceAccessResponse
+ = EnterpriseAppDeployConsoleGetAppInstanceAccessResponses[keyof EnterpriseAppDeployConsoleGetAppInstanceAccessResponses]
+
+export type EnterpriseAppDeployConsoleUpdateAccessChannelsData = {
+ body: UpdateAccessChannelsReq
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/access-channels'
+}
+
+export type EnterpriseAppDeployConsoleUpdateAccessChannelsResponses = {
+ 200: UpdateAccessChannelsReply
+}
+
+export type EnterpriseAppDeployConsoleUpdateAccessChannelsResponse
+ = EnterpriseAppDeployConsoleUpdateAccessChannelsResponses[keyof EnterpriseAppDeployConsoleUpdateAccessChannelsResponses]
+
+export type EnterpriseAppDeployConsoleSearchAccessSubjectsData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ }
+ query?: {
+ keyword?: string
+ subjectTypes?: Array<string>
+ }
+ url: '/enterprise/app-instances/{appInstanceId}/access-subjects:search'
+}
+
+export type EnterpriseAppDeployConsoleSearchAccessSubjectsResponses = {
+ 200: SearchAccessSubjectsReply
+}
+
+export type EnterpriseAppDeployConsoleSearchAccessSubjectsResponse
+ = EnterpriseAppDeployConsoleSearchAccessSubjectsResponses[keyof EnterpriseAppDeployConsoleSearchAccessSubjectsResponses]
+
+export type EnterpriseAppDeployConsoleCreateDeveloperApiKeyData = {
+ body: CreateDeveloperApiKeyReq
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/api-keys'
+}
+
+export type EnterpriseAppDeployConsoleCreateDeveloperApiKeyResponses = {
+ 200: CreateDeveloperApiKeyReply
+}
+
+export type EnterpriseAppDeployConsoleCreateDeveloperApiKeyResponse
+ = EnterpriseAppDeployConsoleCreateDeveloperApiKeyResponses[keyof EnterpriseAppDeployConsoleCreateDeveloperApiKeyResponses]
+
+export type EnterpriseAppDeployConsoleDeleteDeveloperApiKeyData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ apiKeyId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/api-keys/{apiKeyId}'
+}
+
+export type EnterpriseAppDeployConsoleDeleteDeveloperApiKeyResponses = {
+ 200: DeleteDeveloperApiKeyReply
+}
+
+export type EnterpriseAppDeployConsoleDeleteDeveloperApiKeyResponse
+ = EnterpriseAppDeployConsoleDeleteDeveloperApiKeyResponses[keyof EnterpriseAppDeployConsoleDeleteDeveloperApiKeyResponses]
+
+export type EnterpriseAppDeployConsoleListDeploymentBindingOptionsData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/deployment-binding-options'
+}
+
+export type EnterpriseAppDeployConsoleListDeploymentBindingOptionsResponses = {
+ 200: ListDeploymentBindingOptionsReply
+}
+
+export type EnterpriseAppDeployConsoleListDeploymentBindingOptionsResponse
+ = EnterpriseAppDeployConsoleListDeploymentBindingOptionsResponses[keyof EnterpriseAppDeployConsoleListDeploymentBindingOptionsResponses]
+
+export type EnterpriseAppDeployConsoleCreateDeploymentData = {
+ body: CreateDeploymentReq
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/deployments'
+}
+
+export type EnterpriseAppDeployConsoleCreateDeploymentResponses = {
+ 200: CreateDeploymentReply
+}
+
+export type EnterpriseAppDeployConsoleCreateDeploymentResponse
+ = EnterpriseAppDeployConsoleCreateDeploymentResponses[keyof EnterpriseAppDeployConsoleCreateDeploymentResponses]
+
+export type EnterpriseAppDeployConsoleUpdateDeveloperApiData = {
+ body: UpdateDeveloperApiReq
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/developer-api'
+}
+
+export type EnterpriseAppDeployConsoleUpdateDeveloperApiResponses = {
+ 200: UpdateDeveloperApiReply
+}
+
+export type EnterpriseAppDeployConsoleUpdateDeveloperApiResponse
+ = EnterpriseAppDeployConsoleUpdateDeveloperApiResponses[keyof EnterpriseAppDeployConsoleUpdateDeveloperApiResponses]
+
+export type EnterpriseAppDeployConsoleGetEnvironmentAccessPolicyData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ environmentId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/environments/{environmentId}/access-policy'
+}
+
+export type EnterpriseAppDeployConsoleGetEnvironmentAccessPolicyResponses = {
+ 200: GetEnvironmentAccessPolicyReply
+}
+
+export type EnterpriseAppDeployConsoleGetEnvironmentAccessPolicyResponse
+ = EnterpriseAppDeployConsoleGetEnvironmentAccessPolicyResponses[keyof EnterpriseAppDeployConsoleGetEnvironmentAccessPolicyResponses]
+
+export type EnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyData = {
+ body: UpdateEnvironmentAccessPolicyReq
+ path: {
+ appInstanceId: string
+ environmentId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/environments/{environmentId}/access-policy'
+}
+
+export type EnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyResponses = {
+ 200: UpdateEnvironmentAccessPolicyReply
+}
+
+export type EnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyResponse
+ = EnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyResponses[keyof EnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyResponses]
+
+export type EnterpriseAppDeployConsoleGetAppInstanceOverviewData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/overview'
+}
+
+export type EnterpriseAppDeployConsoleGetAppInstanceOverviewResponses = {
+ 200: GetAppInstanceOverviewReply
+}
+
+export type EnterpriseAppDeployConsoleGetAppInstanceOverviewResponse
+ = EnterpriseAppDeployConsoleGetAppInstanceOverviewResponses[keyof EnterpriseAppDeployConsoleGetAppInstanceOverviewResponses]
+
+export type EnterpriseAppDeployConsoleListReleasesData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ }
+ query?: {
+ pageNumber?: number
+ resultsPerPage?: number
+ }
+ url: '/enterprise/app-instances/{appInstanceId}/releases'
+}
+
+export type EnterpriseAppDeployConsoleListReleasesResponses = {
+ 200: ListReleasesReply
+}
+
+export type EnterpriseAppDeployConsoleListReleasesResponse
+ = EnterpriseAppDeployConsoleListReleasesResponses[keyof EnterpriseAppDeployConsoleListReleasesResponses]
+
+export type EnterpriseAppDeployConsoleCreateReleaseData = {
+ body: CreateReleaseReq
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/releases'
+}
+
+export type EnterpriseAppDeployConsoleCreateReleaseResponses = {
+ 200: CreateReleaseReply
+}
+
+export type EnterpriseAppDeployConsoleCreateReleaseResponse
+ = EnterpriseAppDeployConsoleCreateReleaseResponses[keyof EnterpriseAppDeployConsoleCreateReleaseResponses]
+
+export type EnterpriseAppDeployConsolePreviewReleaseData = {
+ body: PreviewReleaseReq
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/releases:preview'
+}
+
+export type EnterpriseAppDeployConsolePreviewReleaseResponses = {
+ 200: PreviewReleaseReply
+}
+
+export type EnterpriseAppDeployConsolePreviewReleaseResponse
+ = EnterpriseAppDeployConsolePreviewReleaseResponses[keyof EnterpriseAppDeployConsolePreviewReleaseResponses]
+
+export type EnterpriseAppDeployConsoleListRuntimeInstancesData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/runtime-instances'
+}
+
+export type EnterpriseAppDeployConsoleListRuntimeInstancesResponses = {
+ 200: ListRuntimeInstancesReply
+}
+
+export type EnterpriseAppDeployConsoleListRuntimeInstancesResponse
+ = EnterpriseAppDeployConsoleListRuntimeInstancesResponses[keyof EnterpriseAppDeployConsoleListRuntimeInstancesResponses]
+
+export type EnterpriseAppDeployConsoleCancelRuntimeDeploymentData = {
+ body: CancelRuntimeDeploymentReq
+ path: {
+ appInstanceId: string
+ runtimeInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/runtime-instances/{runtimeInstanceId}/deployment:cancel'
+}
+
+export type EnterpriseAppDeployConsoleCancelRuntimeDeploymentResponses = {
+ 200: CancelRuntimeDeploymentReply
+}
+
+export type EnterpriseAppDeployConsoleCancelRuntimeDeploymentResponse
+ = EnterpriseAppDeployConsoleCancelRuntimeDeploymentResponses[keyof EnterpriseAppDeployConsoleCancelRuntimeDeploymentResponses]
+
+export type EnterpriseAppDeployConsoleUndeployRuntimeInstanceData = {
+ body: UndeployRuntimeInstanceReq
+ path: {
+ appInstanceId: string
+ runtimeInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/runtime-instances/{runtimeInstanceId}:undeploy'
+}
+
+export type EnterpriseAppDeployConsoleUndeployRuntimeInstanceResponses = {
+ 200: UndeployRuntimeInstanceReply
+}
+
+export type EnterpriseAppDeployConsoleUndeployRuntimeInstanceResponse
+ = EnterpriseAppDeployConsoleUndeployRuntimeInstanceResponses[keyof EnterpriseAppDeployConsoleUndeployRuntimeInstanceResponses]
+
+export type EnterpriseAppDeployConsoleGetAppInstanceSettingsData = {
+ body?: never
+ path: {
+ appInstanceId: string
+ }
+ query?: never
+ url: '/enterprise/app-instances/{appInstanceId}/settings'
+}
+
+export type EnterpriseAppDeployConsoleGetAppInstanceSettingsResponses = {
+ 200: GetAppInstanceSettingsReply
+}
+
+export type EnterpriseAppDeployConsoleGetAppInstanceSettingsResponse
+ = EnterpriseAppDeployConsoleGetAppInstanceSettingsResponses[keyof EnterpriseAppDeployConsoleGetAppInstanceSettingsResponses]
+
+export type EnterpriseAppDeployConsoleListDeploymentEnvironmentOptionsData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/enterprise/deployment-environment-options'
+}
+
+export type EnterpriseAppDeployConsoleListDeploymentEnvironmentOptionsResponses = {
+ 200: ListDeploymentEnvironmentOptionsReply
+}
+
+export type EnterpriseAppDeployConsoleListDeploymentEnvironmentOptionsResponse
+ = EnterpriseAppDeployConsoleListDeploymentEnvironmentOptionsResponses[keyof EnterpriseAppDeployConsoleListDeploymentEnvironmentOptionsResponses]
+
+export type ConsoleSsoOAuth2LoginData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/enterprise/sso/oauth2/login'
+}
+
+export type ConsoleSsoOAuth2LoginResponses = {
+ 200: OAuth2LoginReply
+}
+
+export type ConsoleSsoOAuth2LoginResponse
+ = ConsoleSsoOAuth2LoginResponses[keyof ConsoleSsoOAuth2LoginResponses]
+
+export type ConsoleSsoOidcLoginData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/enterprise/sso/oidc/login'
+}
+
+export type ConsoleSsoOidcLoginResponses = {
+ 200: OidcReply
+}
+
+export type ConsoleSsoOidcLoginResponse
+ = ConsoleSsoOidcLoginResponses[keyof ConsoleSsoOidcLoginResponses]
+
+export type ConsoleSsoSamlLoginData = {
+ body?: never
+ path?: never
+ query?: never
+ url: '/enterprise/sso/saml/login'
+}
+
+export type ConsoleSsoSamlLoginResponses = {
+ 200: SamlLoginReply
+}
+
+export type ConsoleSsoSamlLoginResponse
+ = ConsoleSsoSamlLoginResponses[keyof ConsoleSsoSamlLoginResponses]
+
+export type WebAppAuthGetWebAppAccessModeData = {
+ body?: never
+ path?: never
+ query?: {
+ appId?: string
+ }
+ url: '/enterprise/webapp/app/access-mode'
+}
+
+export type WebAppAuthGetWebAppAccessModeResponses = {
+ 200: GetWebAppAccessModeRes
+}
+
+export type WebAppAuthGetWebAppAccessModeResponse
+ = WebAppAuthGetWebAppAccessModeResponses[keyof WebAppAuthGetWebAppAccessModeResponses]
+
+export type WebAppAuthUpdateWebAppWhitelistSubjectsData = {
+ body: UpdateWebAppWhitelistSubjectsReq
+ path?: never
+ query?: never
+ url: '/enterprise/webapp/app/access-mode'
+}
+
+export type WebAppAuthUpdateWebAppWhitelistSubjectsResponses = {
+ 200: UpdateWebAppWhitelistSubjectsRes
+}
+
+export type WebAppAuthUpdateWebAppWhitelistSubjectsResponse
+ = WebAppAuthUpdateWebAppWhitelistSubjectsResponses[keyof WebAppAuthUpdateWebAppWhitelistSubjectsResponses]
+
+export type WebAppAuthSearchForWhilteListCandidatesData = {
+ body?: never
+ path?: never
+ query?: {
+ keyword?: string
+ pageNumber?: number
+ resultsPerPage?: number
+ groupId?: string
+ }
+ url: '/enterprise/webapp/app/subject/search'
+}
+
+export type WebAppAuthSearchForWhilteListCandidatesResponses = {
+ 200: SearchForWhilteListCandidatesRes
+}
+
+export type WebAppAuthSearchForWhilteListCandidatesResponse
+ = WebAppAuthSearchForWhilteListCandidatesResponses[keyof WebAppAuthSearchForWhilteListCandidatesResponses]
+
+export type WebAppAuthGetWebAppWhitelistSubjectsData = {
+ body?: never
+ path?: never
+ query?: {
+ appId?: string
+ }
+ url: '/enterprise/webapp/app/subjects'
+}
+
+export type WebAppAuthGetWebAppWhitelistSubjectsResponses = {
+ 200: GetWebAppWhitelistSubjectsRes
+}
+
+export type WebAppAuthGetWebAppWhitelistSubjectsResponse
+ = WebAppAuthGetWebAppWhitelistSubjectsResponses[keyof WebAppAuthGetWebAppWhitelistSubjectsResponses]
+
+export type WebAppAuthGetGroupSubjectsData = {
+ body?: never
+ path?: never
+ query?: {
+ groupId?: string
+ }
+ url: '/enterprise/webapp/group/subjects'
+}
+
+export type WebAppAuthGetGroupSubjectsResponses = {
+ 200: GetGroupSubjectsRes
+}
+
+export type WebAppAuthGetGroupSubjectsResponse
+ = WebAppAuthGetGroupSubjectsResponses[keyof WebAppAuthGetGroupSubjectsResponses]
+
+export type WebAppAuthIsUserAllowedToAccessWebAppData = {
+ body?: never
+ path?: never
+ query?: {
+ appId?: string
+ }
+ url: '/enterprise/webapp/permission'
+}
+
+export type WebAppAuthIsUserAllowedToAccessWebAppResponses = {
+ 200: IsUserAllowedToAccessWebAppRes
+}
+
+export type WebAppAuthIsUserAllowedToAccessWebAppResponse
+ = WebAppAuthIsUserAllowedToAccessWebAppResponses[keyof WebAppAuthIsUserAllowedToAccessWebAppResponses]
diff --git a/web/contract/generated/enterprise/zod.gen.ts b/packages/contracts/generated/enterprise/zod.gen.ts
similarity index 54%
rename from web/contract/generated/enterprise/zod.gen.ts
rename to packages/contracts/generated/enterprise/zod.gen.ts
index cef500a9064..1e7e3d44ae9 100644
--- a/web/contract/generated/enterprise/zod.gen.ts
+++ b/packages/contracts/generated/enterprise/zod.gen.ts
@@ -2,6 +2,44 @@
import * as z from 'zod'
+export const zAccessModeOption = z.object({
+ mode: z.string().optional(),
+ label: z.string().optional(),
+ disabled: z.boolean().optional(),
+ selected: z.boolean().optional(),
+})
+
+export const zAccessStatus = z.object({
+ accessChannelsEnabled: z.boolean().optional(),
+ webappUrl: z.string().optional(),
+ cliUrl: z.string().optional(),
+ developerApiEnabled: z.boolean().optional(),
+ apiKeyCount: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+})
+
+export const zAccessSubject = z.object({
+ subjectId: z.string().optional(),
+ subjectType: z.string().optional(),
+})
+
+export const zAccessSubjectDisplay = z.object({
+ id: z.string().optional(),
+ subjectType: z.string().optional(),
+ name: z.string().optional(),
+ avatarUrl: z.string().optional(),
+ memberCount: z.string().optional(),
+})
+
+export const zAccessPolicyDetail = z.object({
+ accessMode: z.string().optional(),
+ subjects: z.array(zAccessSubjectDisplay).optional(),
+ options: z.array(zAccessModeOption).optional(),
+})
+
/**
* Account represents a basic user account
*/
@@ -37,9 +75,101 @@ export const zAccountDetail = z.object({
groups: z.array(zAccountDetailGroup).optional(),
})
-export const zAddGroupAppsRequest = z.object({
+export const zAckDeploymentReply = z.object({
+ accepted: z.boolean().optional(),
+ newVersion: z.string().optional(),
+})
+
+export const zAppInstanceBasicInfo = z.object({
id: z.string().optional(),
- app_ids: z.array(z.string()).optional(),
+ name: z.string().optional(),
+ description: z.string().optional(),
+ sourceAppId: z.string().optional(),
+ sourceAppName: z.string().optional(),
+ mode: z.string().optional(),
+ createdAt: z.iso.datetime().optional(),
+})
+
+export const zAppRunnerBootstrapAssignment = z.object({
+ appId: z.string().optional(),
+ environmentId: z.string().optional(),
+ workflowId: z.string().optional(),
+ instanceId: z.string().optional(),
+ workspaceId: z.string().optional(),
+ instanceVersion: z.string().optional(),
+ bindingSnapshotVersion: z.string().optional(),
+ executionTokenVersion: z.string().optional(),
+ executionToken: z.string().optional(),
+ releaseId: z.string().optional(),
+})
+
+export const zAppRunnerBootstrapReply = z.object({
+ runnerId: z.string().optional(),
+ assignmentRevision: z.string().optional(),
+ assignments: z.array(zAppRunnerBootstrapAssignment).optional(),
+})
+
+export const zAppRunnerRunnerInfo = z.object({
+ hostname: z.string().optional(),
+})
+
+export const zAppRunnerBootstrapRequest = z.object({
+ runner: zAppRunnerRunnerInfo.optional(),
+})
+
+export const zAppRunnerRuntimeArtifactReply = z.object({
+ dslYaml: z.string().optional(),
+ bindingSnapshotVersion: z.string().optional(),
+ bindingSnapshot: z.record(z.string(), z.unknown()).optional(),
+})
+
+export const zAppRunnerRuntimeArtifactRequest = z.object({
+ instanceId: z.string().optional(),
+ releaseId: z.string().optional(),
+ bindingSnapshotVersion: z.string().optional(),
+})
+
+export const zAppRunnerBatchRuntimeArtifactRequest = z.object({
+ artifacts: z.array(zAppRunnerRuntimeArtifactRequest).optional(),
+})
+
+export const zAppRunnerRuntimeArtifactResult = z.object({
+ instanceId: z.string().optional(),
+ releaseId: z.string().optional(),
+ artifact: zAppRunnerRuntimeArtifactReply.optional(),
+ errorCode: z.string().optional(),
+ errorMessage: z.string().optional(),
+})
+
+export const zAppRunnerBatchRuntimeArtifactReply = z.object({
+ results: z.array(zAppRunnerRuntimeArtifactResult).optional(),
+})
+
+export const zAppRunnerTokenExchangeReply = z.object({
+ accessToken: z.string().optional(),
+ expiresAt: z.iso.datetime().optional(),
+})
+
+export const zAppRunnerTokenExchangeRequest = z.object({
+ joinToken: z.string().optional(),
+})
+
+/**
+ * BootstrapProgress is step-list-agnostic. Reconcilers emit step names as
+ * strings owned by each executor (e.g. "connectivity", "namespace"), so adding
+ * or removing steps does not break the API.
+ */
+export const zBootstrapProgress = z.object({
+ currentStep: z.string().optional(),
+ completedSteps: z.array(z.string()).optional(),
+ attemptCount: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+ lastAttemptAt: z.iso.datetime().optional(),
+ lastErrorCode: z.string().optional(),
+ lastErrorMessage: z.string().optional(),
})
export const zBrandingInfo = z.object({
@@ -50,6 +180,15 @@ export const zBrandingInfo = z.object({
favicon: z.string().optional(),
})
+export const zCancelRuntimeDeploymentReply = z.object({
+ status: z.string().optional(),
+})
+
+export const zCancelRuntimeDeploymentReq = z.object({
+ appInstanceId: z.string().optional(),
+ runtimeInstanceId: z.string().optional(),
+})
+
export const zCheckPasswordStatusReply = z.object({
requirePasswordChange: z.boolean().optional(),
changeReason: z.int().optional(),
@@ -63,10 +202,57 @@ export const zCheckPasswordStatusReply = z.object({
export const zClearDefaultWorkspaceReply = z.record(z.string(), z.unknown())
+export const zCliAccess = z.object({
+ url: z.string().optional(),
+})
+
+export const zConsoleEnvironment = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ runtime: z.string().optional(),
+ type: z.string().optional(),
+ status: z.string().optional(),
+})
+
+export const zConsoleRelease = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ shortCommitId: z.string().optional(),
+ createdAt: z.iso.datetime().optional(),
+})
+
+export const zConsoleUser = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+})
+
+export const zCreateAppInstanceReply = z.object({
+ appInstanceId: z.string().optional(),
+ initialRelease: zConsoleRelease.optional(),
+})
+
+export const zCreateAppInstanceReq = z.object({
+ sourceAppId: z.string().optional(),
+ name: z.string().optional(),
+ description: z.string().optional(),
+})
+
export const zCreateBearerTokenResponse = z.object({
token: z.string().optional(),
})
+export const zCreateDeploymentReply = z.object({
+ runtimeInstanceId: z.string().optional(),
+ deploymentId: z.string().optional(),
+ status: z.string().optional(),
+})
+
+export const zCreateDeveloperApiKeyReq = z.object({
+ appInstanceId: z.string().optional(),
+ environmentId: z.string().optional(),
+ name: z.string().optional(),
+})
+
export const zCreateMemberReply = z.object({
id: z.string().optional(),
password: z.string().optional(),
@@ -89,7 +275,12 @@ export const zCreateNewGroupsReq = z.object({
groups: z.array(zCreateNewGroupsReqGroup).optional(),
})
-export const zCreateResourceGroupRequest = z.object({
+export const zCreateReleaseReply = z.object({
+ release: zConsoleRelease.optional(),
+})
+
+export const zCreateReleaseReq = z.object({
+ appInstanceId: z.string().optional(),
name: z.string().optional(),
description: z.string().optional(),
})
@@ -151,10 +342,21 @@ export const zDashboardSsosamlLoginReply = z.object({
url: z.string().optional(),
})
+export const zDeleteAppInstanceReply = z.record(z.string(), z.unknown())
+
+export const zDeleteDeveloperApiKeyReply = z.record(z.string(), z.unknown())
+
+export const zDeleteEnvironmentReply = z.record(z.string(), z.unknown())
+
export const zDeleteGroupsRes = z.object({
message: z.string().optional(),
})
+export const zDeleteGuard = z.object({
+ canDelete: z.boolean().optional(),
+ disabledReason: z.string().optional(),
+})
+
export const zDeleteMemberReply = z.object({
account: zAccount.optional(),
})
@@ -169,6 +371,82 @@ export const zDeleteUserReply = z.object({
export const zDeleteWorkspaceReply = z.record(z.string(), z.unknown())
+export const zDeployedEnvironment = z.object({
+ environmentId: z.string().optional(),
+ environmentName: z.string().optional(),
+})
+
+export const zDeploymentCredentialOption = z.object({
+ credentialId: z.string().optional(),
+ displayName: z.string().optional(),
+ pluginId: z.string().optional(),
+ pluginName: z.string().optional(),
+ pluginVersion: z.string().optional(),
+})
+
+export const zDeploymentEnvVarOption = z.object({
+ envVarId: z.string().optional(),
+ name: z.string().optional(),
+ valueType: z.string().optional(),
+ displayValue: z.string().optional(),
+})
+
+export const zDeploymentBindingOptionSlot = z.object({
+ slot: z.string().optional(),
+ kind: z.string().optional(),
+ label: z.string().optional(),
+ required: z.boolean().optional(),
+ candidates: z.array(zDeploymentCredentialOption).optional(),
+ envVarCandidates: z.array(zDeploymentEnvVarOption).optional(),
+})
+
+export const zDeploymentEnvironmentOption = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ type: z.string().optional(),
+ backend: z.string().optional(),
+ status: z.string().optional(),
+ managedBy: z.string().optional(),
+ deployable: z.boolean().optional(),
+ disabledReason: z.string().optional(),
+})
+
+export const zDeploymentRuntimeBinding = z.object({
+ slot: z.string().optional(),
+ credentialId: z.string().optional(),
+ envVarId: z.string().optional(),
+})
+
+export const zCreateDeploymentReq = z.object({
+ appInstanceId: z.string().optional(),
+ environmentId: z.string().optional(),
+ releaseId: z.string().optional(),
+ bindings: z.array(zDeploymentRuntimeBinding).optional(),
+})
+
+export const zDeploymentStatusRow = z.object({
+ environment: zConsoleEnvironment.optional(),
+ release: zConsoleRelease.optional(),
+ status: z.string().optional(),
+})
+
+export const zDeveloperApiKeyRow = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ environment: zConsoleEnvironment.optional(),
+ maskedKey: z.string().optional(),
+})
+
+export const zCreateDeveloperApiKeyReply = z.object({
+ apiKey: zDeveloperApiKeyRow.optional(),
+ token: z.string().optional(),
+})
+
+export const zDeveloperApiAccess = z.object({
+ enabled: z.boolean().optional(),
+ apiKeys: z.array(zDeveloperApiKeyRow).optional(),
+})
+
/**
* System user setting messages
*/
@@ -178,6 +456,53 @@ export const zEnterpriseSystemUserSettingReply = z.object({
enableEmailPasswordLogin: z.boolean().optional(),
})
+export const zEnvironment = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ description: z.string().optional(),
+ mode: z.int().optional(),
+ namespace: z.string().optional(),
+ apiServer: z.string().optional(),
+ status: z.int().optional(),
+ statusMessage: z.string().optional(),
+ bootstrapProgress: zBootstrapProgress.optional(),
+ managedBy: z.string().optional(),
+ createdAt: z.iso.datetime().optional(),
+ updatedAt: z.iso.datetime().optional(),
+ backend: z.int().optional(),
+ host: z.string().optional(),
+})
+
+export const zCreateEnvironmentReply = z.object({
+ environment: zEnvironment.optional(),
+})
+
+export const zEnvironmentAccessRow = z.object({
+ environment: zConsoleEnvironment.optional(),
+ currentRelease: zConsoleRelease.optional(),
+ accessMode: z.string().optional(),
+ accessModeLabel: z.string().optional(),
+ hint: z.string().optional(),
+})
+
+export const zEnvironmentFilter = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ kind: z.string().optional(),
+})
+
+export const zGetAppInstanceOverviewReply = z.object({
+ instance: zAppInstanceBasicInfo.optional(),
+ deployments: z.array(zDeploymentStatusRow).optional(),
+ access: zAccessStatus.optional(),
+})
+
+export const zGetAppInstanceSettingsReply = z.object({
+ name: z.string().optional(),
+ description: z.string().optional(),
+ deleteGuard: zDeleteGuard.optional(),
+})
+
export const zGetBearerTokenResponse = z.object({
maskedToken: z.string().optional(),
})
@@ -188,6 +513,23 @@ export const zGetClusterInfoReply = z.object({
verifyMode: z.string().optional(),
})
+export const zGetEnvironmentAccessPolicyReply = z.object({
+ policy: zAccessPolicyDetail.optional(),
+})
+
+export const zGetEnvironmentReply = z.object({
+ environment: zEnvironment.optional(),
+})
+
+export const zGetInstanceReply = z.object({
+ instanceId: z.string().optional(),
+ status: z.string().optional(),
+ desiredReleaseId: z.string().optional(),
+ observedReleaseId: z.string().optional(),
+ currentDeploymentId: z.string().optional(),
+ version: z.string().optional(),
+})
+
export const zGetLicenseStatusReply = z.object({
status: z.string().optional(),
})
@@ -223,25 +565,14 @@ export const zGetWebAppWhitelistSubjectsResMember = z.object({
avatar: z.string().optional(),
})
-export const zGroupAppItem = z.object({
- app_id: z.string().optional(),
- app_name: z.string().optional(),
- workspace_id: z.string().optional(),
- workspace_name: z.string().optional(),
- app_status: z.int().optional(),
- token_usage: z.string().optional(),
- rpm: z.string().optional(),
- concurrency: z.string().optional(),
-})
-
export const zHealthzReply = z.object({
message: z.string().optional(),
status: z.string().optional(),
})
-export const zInnerAdmission = z.object({
- marker: z.string().optional(),
- concurrencyGroupIds: z.array(z.string()).optional(),
+export const zHostEnvironmentConfig = z.object({
+ machineId: z.string().optional(),
+ joinTokenHash: z.string().optional(),
})
export const zInnerBatchGetWebAppAccessModesByIdReq = z.object({
@@ -261,10 +592,50 @@ export const zInnerBatchIsUserAllowedToAccessWebAppRes = z.object({
permissions: z.record(z.string(), z.boolean()).optional(),
})
+export const zInnerCheckAppDeployAccessReply = z.object({
+ allowed: z.boolean().optional(),
+ matchedPolicyId: z.string().optional(),
+ matchedScopeType: z.string().optional(),
+ reason: z.string().optional(),
+ cacheTtlSeconds: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+})
+
+export const zInnerCheckAppDeployAccessReq = z.object({
+ appInstanceId: z.string().optional(),
+ environmentId: z.string().optional(),
+ principalType: z.string().optional(),
+ principalId: z.string().optional(),
+})
+
export const zInnerCleanAppRes = z.object({
message: z.string().optional(),
})
+export const zInnerGetTokenRouteReply = z.object({
+ environmentId: z.string().optional(),
+ namespace: z.string().optional(),
+ serviceName: z.string().optional(),
+ servicePort: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+ environmentStatus: z.string().optional(),
+ appId: z.string().optional(),
+ tenantId: z.string().optional(),
+ instanceId: z.string().optional(),
+ observedReleaseId: z.string().optional(),
+ instanceStatus: z.string().optional(),
+})
+
+export const zInnerGetTokenRouteReq = z.object({
+ token: z.string().optional(),
+})
+
export const zInnerGetWebAppAccessModeByCodeRes = z.object({
accessMode: z.string().optional(),
})
@@ -277,12 +648,6 @@ export const zInnerIsUserAllowedToAccessWebAppRes = z.object({
result: z.boolean().optional(),
})
-export const zInnerReleaseAdmissionRequest = z.object({
- admission: zInnerAdmission.optional(),
-})
-
-export const zInnerReleaseAdmissionResponse = z.record(z.string(), z.unknown())
-
export const zInnerTryAddAccountToDefaultWorkspaceReply = z.object({
workspaceId: z.string().optional(),
joined: z.boolean().optional(),
@@ -313,32 +678,48 @@ export const zJoinWorkspaceReq = z.object({
role: z.string().optional(),
})
-export const zLimitConfig = z.object({
- type: z.int().optional(),
- threshold: z.string().optional(),
- action: z.int().optional(),
- reached: z.boolean().optional(),
+export const zK8sEnvironmentConfig = z.object({
+ namespace: z.string().optional(),
+ apiServer: z.string().optional(),
+ caBundle: z.string().optional(),
+ bearerToken: z.string().optional(),
})
-export const zInnerGroupConfig = z.object({
- id: z.string().optional(),
- enabled: z.boolean().optional(),
- membershipId: z.string().optional(),
- limits: z.array(zLimitConfig).optional(),
+/**
+ * Field-level validation only; target (api_server) and RBAC validation happen
+ * in the bootstrap reconciler.
+ */
+export const zCreateEnvironmentReq = z.object({
+ name: z.string().optional(),
+ description: z.string().optional(),
+ mode: z.int().optional(),
+ backend: z.int().optional(),
+ k8s: zK8sEnvironmentConfig.optional(),
+ host: zHostEnvironmentConfig.optional(),
})
-export const zInnerResolveResponse = z.object({
- appId: z.string().optional(),
- groups: z.array(zInnerGroupConfig).optional(),
- blocked: z.boolean().optional(),
- blockGroupId: z.string().optional(),
- blockReason: z.string().optional(),
- admission: zInnerAdmission.optional(),
+export const zLastError = z.object({
+ phase: z.string().optional(),
+ code: z.string().optional(),
+ message: z.string().optional(),
+ releaseId: z.string().optional(),
+})
+
+export const zAckDeploymentReq = z.object({
+ deploymentId: z.string().optional(),
+ instanceId: z.string().optional(),
+ expectedVersion: z.string().optional(),
+ status: z.string().optional(),
+ observedReleaseId: z.string().optional(),
+ lastError: zLastError.optional(),
+})
+
+export const zListDeploymentBindingOptionsReply = z.object({
+ slots: z.array(zDeploymentBindingOptionSlot).optional(),
})
-export const zListGroupAppsResponse = z.object({
- items: z.array(zGroupAppItem).optional(),
- total: z.string().optional(),
+export const zListDeploymentEnvironmentOptionsReply = z.object({
+ environments: z.array(zDeploymentEnvironmentOption).optional(),
})
export const zLoginTypesReply = z.object({
@@ -490,6 +871,31 @@ export const zPluginInstallationSettingsReply = z.object({
restrictToMarketplaceOnly: z.boolean().optional(),
})
+export const zPreviewReleaseReq = z.object({
+ appInstanceId: z.string().optional(),
+ releaseId: z.string().optional(),
+})
+
+export const zReleaseRow = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ createdAt: z.iso.datetime().optional(),
+ createdBy: zConsoleUser.optional(),
+ deployedTo: z.array(zDeployedEnvironment).optional(),
+})
+
+export const zReleaseRuntimeBinding = z.object({
+ kind: z.string().optional(),
+ label: z.string().optional(),
+ displayValue: z.string().optional(),
+ valueType: z.string().optional(),
+})
+
+export const zPreviewReleaseReply = z.object({
+ release: zConsoleRelease.optional(),
+ bindings: z.array(zReleaseRuntimeBinding).optional(),
+})
+
export const zResetMemberPasswordReply = z.object({
id: z.string().optional(),
password: z.string().optional(),
@@ -524,56 +930,26 @@ export const zResetUserPasswordReq = z.object({
id: z.string().optional(),
})
-export const zResourceGroupDetail = z.object({
- id: z.string().optional(),
- name: z.string().optional(),
- description: z.string().optional(),
- enabled: z.boolean().optional(),
- rpm_limit: z
- .int()
- .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
- .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
- .optional(),
- rpm_action: z.int().optional(),
- concurrency_limit: z
- .int()
- .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
- .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
- .optional(),
- concurrency_action: z.int().optional(),
- token_quota: z.string().optional(),
- token_action: z.int().optional(),
- created_at: z.string().optional(),
- updated_at: z.string().optional(),
+export const zResolveCredentialsReq = z.object({
+ instanceId: z.string().optional(),
+ deploymentId: z.string().optional(),
+ slots: z.array(z.string()).optional(),
})
-export const zResourceGroupItem = z.object({
- id: z.string().optional(),
- name: z.string().optional(),
- description: z.string().optional(),
- enabled: z.boolean().optional(),
- rpm_limit: z
- .int()
- .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
- .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
- .optional(),
- concurrency_limit: z
- .int()
- .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
- .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
- .optional(),
- token_quota: z.string().optional(),
- token_usage: z.string().optional(),
- app_count: z.string().optional(),
- rpm_status: z.int().optional(),
- conc_status: z.int().optional(),
- created_at: z.string().optional(),
- updated_at: z.string().optional(),
+/**
+ * Exactly one of credential_id / env_var_id is populated; model/plugin slots
+ * carry credential_id (pool A), env_var slots carry env_var_id (pool B).
+ * See design §4.1.
+ */
+export const zResolvedCredential = z.object({
+ slot: z.string().optional(),
+ credentialId: z.string().optional(),
+ envVarId: z.string().optional(),
+ value: z.string().optional(),
})
-export const zListResourceGroupsResponse = z.object({
- items: z.array(zResourceGroupItem).optional(),
- total: z.string().optional(),
+export const zResolveCredentialsReply = z.object({
+ resolved: z.array(zResolvedCredential).optional(),
})
/**
@@ -626,6 +1002,44 @@ export const zGetLicenseReply = z.object({
license: zLicenseInfo.optional(),
})
+export const zRetryEnvironmentReply = z.object({
+ environment: zEnvironment.optional(),
+})
+
+export const zRetryEnvironmentReq = z.object({
+ id: z.string().optional(),
+})
+
+export const zRuntimeEndpoints = z.object({
+ run: z.string().optional(),
+ health: z.string().optional(),
+})
+
+export const zRuntimeInstanceDetail = z.object({
+ deploymentName: z.string().optional(),
+ replicas: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+ runtimeMode: z.string().optional(),
+ runtimeNote: z.string().optional(),
+ endpoints: zRuntimeEndpoints.optional(),
+ bindings: z.array(zReleaseRuntimeBinding).optional(),
+})
+
+export const zRuntimeInstanceRow = z.object({
+ id: z.string().optional(),
+ environment: zConsoleEnvironment.optional(),
+ status: z.string().optional(),
+ currentRelease: zConsoleRelease.optional(),
+ detail: zRuntimeInstanceDetail.optional(),
+})
+
+export const zListRuntimeInstancesReply = z.object({
+ data: z.array(zRuntimeInstanceRow).optional(),
+})
+
/**
* SSO Configuration messages
*/
@@ -688,21 +1102,8 @@ export const zScimSettings = z.object({
lastSyncTime: z.iso.datetime().optional(),
})
-export const zSearchAppItem = z.object({
- app_id: z.string().optional(),
- app_name: z.string().optional(),
- workspace_id: z.string().optional(),
- workspace_name: z.string().optional(),
- app_status: z.int().optional(),
- icon: z.string().optional(),
- icon_type: z.string().optional(),
- icon_background: z.string().optional(),
- created_by_name: z.string().optional(),
-})
-
-export const zSearchAppsResponse = z.object({
- items: z.array(zSearchAppItem).optional(),
- total: z.string().optional(),
+export const zSearchAccessSubjectsReply = z.object({
+ data: z.array(zAccessSubjectDisplay).optional(),
})
export const zSecretKey = z.object({
@@ -721,6 +1122,25 @@ export const zSetDefaultWorkspaceReq = z.object({
id: z.string().optional(),
})
+export const zStatusCount = z.object({
+ status: z.string().optional(),
+ count: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+})
+
+export const zAppInstanceCard = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ icon: z.string().optional(),
+ mode: z.string().optional(),
+ sourceAppName: z.string().optional(),
+ statuses: z.array(zStatusCount).optional(),
+ lastDeployedAt: z.iso.datetime().optional(),
+})
+
export const zSubjectAccountData = z.object({
id: z.string().optional(),
name: z.string().optional(),
@@ -794,10 +1214,38 @@ export const zTestConnectionReply = z.object({
error: z.string().optional(),
})
+export const zTestEnvironmentConnectionReply = z.object({
+ ok: z.boolean().optional(),
+ reachableServerVersion: z.string().optional(),
+ namespaceExists: z.boolean().optional(),
+ missingPermissions: z.array(z.string()).optional(),
+ error: z.string().optional(),
+ probedAt: z.iso.datetime().optional(),
+})
+
+export const zTestEnvironmentConnectionReq = z.object({
+ id: z.string().optional(),
+})
+
export const zToggleEndpointRequest = z.object({
enabled: z.boolean().optional(),
})
+export const zUndeployRuntimeInstanceReply = z.object({
+ deploymentId: z.string().optional(),
+ status: z.string().optional(),
+})
+
+export const zUndeployRuntimeInstanceReq = z.object({
+ appInstanceId: z.string().optional(),
+ runtimeInstanceId: z.string().optional(),
+})
+
+export const zUpdateAccessChannelsReq = z.object({
+ appInstanceId: z.string().optional(),
+ enabled: z.boolean().optional(),
+})
+
export const zUpdateAccessModeReq = z.object({
appId: z.string().optional(),
accessMode: z.string().optional(),
@@ -807,6 +1255,16 @@ export const zUpdateAccessModeRes = z.object({
message: z.string().optional(),
})
+export const zUpdateAppInstanceReply = z.object({
+ appInstanceId: z.string().optional(),
+})
+
+export const zUpdateAppInstanceReq = z.object({
+ appInstanceId: z.string().optional(),
+ name: z.string().optional(),
+ description: z.string().optional(),
+})
+
export const zUpdateBrandingInfoReq = z.object({
enabled: z.boolean().optional(),
applicationTitle: z.string().optional(),
@@ -815,6 +1273,36 @@ export const zUpdateBrandingInfoReq = z.object({
favicon: z.string().optional(),
})
+export const zUpdateDeveloperApiReply = z.object({
+ developerApi: zDeveloperApiAccess.optional(),
+})
+
+export const zUpdateDeveloperApiReq = z.object({
+ appInstanceId: z.string().optional(),
+ enabled: z.boolean().optional(),
+})
+
+export const zUpdateEnvironmentAccessPolicyReply = z.object({
+ permission: zEnvironmentAccessRow.optional(),
+})
+
+export const zUpdateEnvironmentAccessPolicyReq = z.object({
+ appInstanceId: z.string().optional(),
+ environmentId: z.string().optional(),
+ accessMode: z.string().optional(),
+ subjects: z.array(zAccessSubject).optional(),
+})
+
+export const zUpdateEnvironmentReply = z.object({
+ environment: zEnvironment.optional(),
+})
+
+export const zUpdateEnvironmentReq = z.object({
+ id: z.string().optional(),
+ name: z.string().optional(),
+ description: z.string().optional(),
+})
+
export const zUpdateGroupSubjectsReq = z.object({
groupId: z.string().optional(),
subjects: z.array(zSubject).optional(),
@@ -898,27 +1386,6 @@ export const zUpdatePluginInstallationSettingsRequest = z.object({
restrictToMarketplaceOnly: z.boolean().optional(),
})
-export const zUpdateResourceGroupRequest = z.object({
- id: z.string().optional(),
- name: z.string().optional(),
- description: z.string().optional(),
- enabled: z.boolean().optional(),
- rpm_limit: z
- .int()
- .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
- .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
- .optional(),
- rpm_action: z.int().optional(),
- concurrency_limit: z
- .int()
- .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
- .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
- .optional(),
- concurrency_action: z.int().optional(),
- token_quota: z.string().optional(),
- token_action: z.int().optional(),
-})
-
export const zUpdateUserReply = z.object({
account: zAccountDetail.optional(),
})
@@ -963,6 +1430,27 @@ export const zUpdateWorkspaceReq = z.object({
status: z.string().optional(),
})
+export const zWebAppAccessRow = z.object({
+ environment: zConsoleEnvironment.optional(),
+ url: z.string().optional(),
+})
+
+export const zAccessChannels = z.object({
+ enabled: z.boolean().optional(),
+ webappRows: z.array(zWebAppAccessRow).optional(),
+ cli: zCliAccess.optional(),
+})
+
+export const zGetAppInstanceAccessReply = z.object({
+ permissions: z.array(zEnvironmentAccessRow).optional(),
+ accessChannels: zAccessChannels.optional(),
+ developerApi: zDeveloperApiAccess.optional(),
+})
+
+export const zUpdateAccessChannelsReply = z.object({
+ accessChannels: zAccessChannels.optional(),
+})
+
export const zWebAppAuthInfo = z.object({
allowSso: z.boolean().optional(),
allowEmailCodeLogin: z.boolean().optional(),
@@ -1084,11 +1572,27 @@ export const zPagination = z.object({
.optional(),
})
+export const zListAppInstancesReply = z.object({
+ filters: z.array(zEnvironmentFilter).optional(),
+ data: z.array(zAppInstanceCard).optional(),
+ pagination: zPagination.optional(),
+})
+
+export const zListEnvironmentsReply = z.object({
+ data: z.array(zEnvironment).optional(),
+ pagination: zPagination.optional(),
+})
+
export const zListMembersReply = z.object({
data: z.array(zAccountDetail).optional(),
pagination: zPagination.optional(),
})
+export const zListReleasesReply = z.object({
+ data: z.array(zReleaseRow).optional(),
+ pagination: zPagination.optional(),
+})
+
export const zListSecretKeysReply = z.object({
data: z.array(zSecretKey).optional(),
pagination: zPagination.optional(),
@@ -1104,6 +1608,271 @@ export const zListWorkspacesReply = z.object({
pagination: zPagination.optional(),
})
+export const zEnterpriseAppDeployConsoleListAppInstancesQuery = z.object({
+ environmentId: z.string().optional(),
+ notDeployed: z.boolean().optional(),
+ query: z.string().optional(),
+ pageNumber: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+ resultsPerPage: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleListAppInstancesResponse = zListAppInstancesReply
+
+export const zEnterpriseAppDeployConsoleCreateAppInstanceBody = zCreateAppInstanceReq
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleCreateAppInstanceResponse = zCreateAppInstanceReply
+
+export const zEnterpriseAppDeployConsoleDeleteAppInstancePath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleDeleteAppInstanceResponse = zDeleteAppInstanceReply
+
+export const zEnterpriseAppDeployConsoleUpdateAppInstanceBody = zUpdateAppInstanceReq
+
+export const zEnterpriseAppDeployConsoleUpdateAppInstancePath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleUpdateAppInstanceResponse = zUpdateAppInstanceReply
+
+export const zEnterpriseAppDeployConsoleGetAppInstanceAccessPath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleGetAppInstanceAccessResponse = zGetAppInstanceAccessReply
+
+export const zEnterpriseAppDeployConsoleUpdateAccessChannelsBody = zUpdateAccessChannelsReq
+
+export const zEnterpriseAppDeployConsoleUpdateAccessChannelsPath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleUpdateAccessChannelsResponse = zUpdateAccessChannelsReply
+
+export const zEnterpriseAppDeployConsoleSearchAccessSubjectsPath = z.object({
+ appInstanceId: z.string(),
+})
+
+export const zEnterpriseAppDeployConsoleSearchAccessSubjectsQuery = z.object({
+ keyword: z.string().optional(),
+ subjectTypes: z.array(z.string()).optional(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleSearchAccessSubjectsResponse = zSearchAccessSubjectsReply
+
+export const zEnterpriseAppDeployConsoleCreateDeveloperApiKeyBody = zCreateDeveloperApiKeyReq
+
+export const zEnterpriseAppDeployConsoleCreateDeveloperApiKeyPath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleCreateDeveloperApiKeyResponse = zCreateDeveloperApiKeyReply
+
+export const zEnterpriseAppDeployConsoleDeleteDeveloperApiKeyPath = z.object({
+ appInstanceId: z.string(),
+ apiKeyId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleDeleteDeveloperApiKeyResponse = zDeleteDeveloperApiKeyReply
+
+export const zEnterpriseAppDeployConsoleListDeploymentBindingOptionsPath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleListDeploymentBindingOptionsResponse
+ = zListDeploymentBindingOptionsReply
+
+export const zEnterpriseAppDeployConsoleCreateDeploymentBody = zCreateDeploymentReq
+
+export const zEnterpriseAppDeployConsoleCreateDeploymentPath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleCreateDeploymentResponse = zCreateDeploymentReply
+
+export const zEnterpriseAppDeployConsoleUpdateDeveloperApiBody = zUpdateDeveloperApiReq
+
+export const zEnterpriseAppDeployConsoleUpdateDeveloperApiPath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleUpdateDeveloperApiResponse = zUpdateDeveloperApiReply
+
+export const zEnterpriseAppDeployConsoleGetEnvironmentAccessPolicyPath = z.object({
+ appInstanceId: z.string(),
+ environmentId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleGetEnvironmentAccessPolicyResponse
+ = zGetEnvironmentAccessPolicyReply
+
+export const zEnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyBody
+ = zUpdateEnvironmentAccessPolicyReq
+
+export const zEnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyPath = z.object({
+ appInstanceId: z.string(),
+ environmentId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleUpdateEnvironmentAccessPolicyResponse
+ = zUpdateEnvironmentAccessPolicyReply
+
+export const zEnterpriseAppDeployConsoleGetAppInstanceOverviewPath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleGetAppInstanceOverviewResponse
+ = zGetAppInstanceOverviewReply
+
+export const zEnterpriseAppDeployConsoleListReleasesPath = z.object({
+ appInstanceId: z.string(),
+})
+
+export const zEnterpriseAppDeployConsoleListReleasesQuery = z.object({
+ pageNumber: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+ resultsPerPage: z
+ .int()
+ .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' })
+ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' })
+ .optional(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleListReleasesResponse = zListReleasesReply
+
+export const zEnterpriseAppDeployConsoleCreateReleaseBody = zCreateReleaseReq
+
+export const zEnterpriseAppDeployConsoleCreateReleasePath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleCreateReleaseResponse = zCreateReleaseReply
+
+export const zEnterpriseAppDeployConsolePreviewReleaseBody = zPreviewReleaseReq
+
+export const zEnterpriseAppDeployConsolePreviewReleasePath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsolePreviewReleaseResponse = zPreviewReleaseReply
+
+export const zEnterpriseAppDeployConsoleListRuntimeInstancesPath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleListRuntimeInstancesResponse = zListRuntimeInstancesReply
+
+export const zEnterpriseAppDeployConsoleCancelRuntimeDeploymentBody = zCancelRuntimeDeploymentReq
+
+export const zEnterpriseAppDeployConsoleCancelRuntimeDeploymentPath = z.object({
+ appInstanceId: z.string(),
+ runtimeInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleCancelRuntimeDeploymentResponse
+ = zCancelRuntimeDeploymentReply
+
+export const zEnterpriseAppDeployConsoleUndeployRuntimeInstanceBody = zUndeployRuntimeInstanceReq
+
+export const zEnterpriseAppDeployConsoleUndeployRuntimeInstancePath = z.object({
+ appInstanceId: z.string(),
+ runtimeInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleUndeployRuntimeInstanceResponse
+ = zUndeployRuntimeInstanceReply
+
+export const zEnterpriseAppDeployConsoleGetAppInstanceSettingsPath = z.object({
+ appInstanceId: z.string(),
+})
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleGetAppInstanceSettingsResponse
+ = zGetAppInstanceSettingsReply
+
+/**
+ * OK
+ */
+export const zEnterpriseAppDeployConsoleListDeploymentEnvironmentOptionsResponse
+ = zListDeploymentEnvironmentOptionsReply
+
/**
* OK
*/
diff --git a/packages/contracts/openapi-ts.api.config.ts b/packages/contracts/openapi-ts.api.config.ts
new file mode 100644
index 00000000000..79c8ec8322d
--- /dev/null
+++ b/packages/contracts/openapi-ts.api.config.ts
@@ -0,0 +1,610 @@
+import type { UserConfig } from '@hey-api/openapi-ts'
+import fs from 'node:fs'
+import path from 'node:path'
+import { fileURLToPath } from 'node:url'
+import { defineConfig } from '@hey-api/openapi-ts'
+
+type JsonObject = Record<string, unknown>
+
+type SwaggerSchema = JsonObject & {
+ '$defs'?: Record<string, SwaggerSchema>
+ '$ref'?: string
+ 'x-nullable'?: boolean
+ 'additionalProperties'?: unknown
+ 'anyOf'?: SwaggerSchema[]
+ 'const'?: unknown
+ 'default'?: unknown
+ 'definitions'?: Record<string, SwaggerSchema>
+ 'description'?: string
+ 'enum'?: unknown[]
+ 'format'?: string
+ 'items'?: SwaggerSchema
+ 'properties'?: Record<string, SwaggerSchema>
+ 'required'?: string[]
+ 'type'?: string
+}
+
+type SwaggerParameter = JsonObject & {
+ in?: string
+ name?: string
+ required?: boolean
+ schema?: SwaggerSchema
+ type?: string
+}
+
+type SwaggerResponse = JsonObject & {
+ description?: string
+ schema?: SwaggerSchema
+}
+
+type SwaggerOperation = JsonObject & {
+ operationId?: string
+ parameters?: SwaggerParameter[]
+ responses?: Record<string, SwaggerResponse>
+}
+
+type SwaggerDocument = JsonObject & {
+ definitions?: Record<string, SwaggerSchema>
+ paths?: Record<string, Record<string, unknown>>
+}
+
+type ApiSpec = {
+ filename: string
+ name: string
+}
+
+type ApiJob = {
+ document: SwaggerDocument
+ outputPath: string
+}
+
+type ApiContractOperation = {
+ method: string
+ path: string
+}
+
+const currentDir = path.dirname(fileURLToPath(import.meta.url))
+const apiOpenApiDir = path.resolve(currentDir, 'openapi')
+
+const operationMethods = new Set(['delete', 'get', 'patch', 'post', 'put'])
+
+const apiSpecs: ApiSpec[] = [
+ { filename: 'console-swagger.json', name: 'console' },
+ { filename: 'web-swagger.json', name: 'web' },
+ { filename: 'service-swagger.json', name: 'service' },
+]
+
+const isObject = (value: unknown): value is JsonObject => {
+ return !!value && typeof value === 'object' && !Array.isArray(value)
+}
+
+const unknownObjectSchema = (): SwaggerSchema => ({
+ additionalProperties: true,
+ type: 'object',
+})
+
+const toWords = (value: string) => {
+ return value
+ .replace(/[{}]/g, '')
+ .replace(/([a-z0-9])([A-Z])/g, '$1 $2')
+ .split(/[^a-z0-9]+/i)
+ .filter(Boolean)
+}
+
+const toPascalCase = (words: string[]) => {
+ return words.map(word => `${word.charAt(0).toUpperCase()}${word.slice(1)}`).join('')
+}
+
+const toCamelCase = (words: string[]) => {
+ const pascal = toPascalCase(words)
+ return `${pascal.charAt(0).toLowerCase()}${pascal.slice(1)}`
+}
+
+const toKebabCase = (value: string) => {
+ return toWords(value).join('-').toLowerCase()
+}
+
+const segmentWords = (segment: string) => {
+ if (segment.startsWith('{') && segment.endsWith('}'))
+ return ['by', ...toWords(segment)]
+
+ return toWords(segment)
+}
+
+const routeWords = (routePath: string) => {
+ return routePath
+ .split('/')
+ .filter(Boolean)
+ .flatMap(segmentWords)
+}
+
+const operationId = (method: string, routePath: string) => {
+ return toCamelCase([method, ...(routeWords(routePath).length > 0 ? routeWords(routePath) : ['root'])])
+}
+
+const contractPathSegments = (operation: ApiContractOperation) => {
+ const segments = operation.path
+ .split('/')
+ .filter(Boolean)
+ .map(segment => toCamelCase(segmentWords(segment)))
+
+ return [...(segments.length > 0 ? segments : ['root']), operation.method.toLowerCase()]
+}
+
+const readApiSwagger = (filename: string): SwaggerDocument => {
+ const specPath = path.join(apiOpenApiDir, filename)
+
+ if (!fs.existsSync(specPath)) {
+ throw new Error(
+ `Missing API OpenAPI spec: ${specPath}. Run "pnpm gen-api-openapi" from packages/contracts/ first.`,
+ )
+ }
+
+ const rawSpec = JSON.parse(fs.readFileSync(specPath, 'utf8'))
+ if (!isObject(rawSpec) || !isObject(rawSpec.paths))
+ throw new Error(`Invalid API OpenAPI spec: ${specPath}`)
+
+ return rawSpec as SwaggerDocument
+}
+
+const clone = <T>(value: T): T => {
+ return JSON.parse(JSON.stringify(value)) as T
+}
+
+const collectDefinitionRefs = (value: unknown, refs: Set<string>, visited = new WeakSet<object>()) => {
+ if (!value || typeof value !== 'object')
+ return
+
+ if (visited.has(value))
+ return
+
+ visited.add(value)
+
+ if (Array.isArray(value)) {
+ value.forEach(item => collectDefinitionRefs(item, refs, visited))
+ return
+ }
+
+ const objectValue = value as JsonObject
+ const ref = objectValue.$ref
+ if (typeof ref === 'string' && ref.startsWith('#/definitions/'))
+ refs.add(ref.slice('#/definitions/'.length))
+
+ Object.values(objectValue).forEach(item => collectDefinitionRefs(item, refs, visited))
+}
+
+const removeNullDefaults = (value: unknown, visited = new WeakSet<object>()) => {
+ if (!value || typeof value !== 'object' || visited.has(value))
+ return
+
+ visited.add(value)
+
+ if (Array.isArray(value)) {
+ value.forEach(item => removeNullDefaults(item, visited))
+ return
+ }
+
+ const schema = value as SwaggerSchema
+ if (schema.default === null)
+ delete schema.default
+
+ Object.values(schema).forEach(item => removeNullDefaults(item, visited))
+}
+
+const isNullSchema = (schema: SwaggerSchema) => {
+ return schema.type === 'null'
+}
+
+const normalizeNullableAnyOf = (value: unknown, visited = new WeakSet<object>()) => {
+ if (!value || typeof value !== 'object' || visited.has(value))
+ return
+
+ visited.add(value)
+
+ if (Array.isArray(value)) {
+ value.forEach(item => normalizeNullableAnyOf(item, visited))
+ return
+ }
+
+ const schema = value as SwaggerSchema
+
+ if (Array.isArray(schema.anyOf)) {
+ const nonNullSchemas = schema.anyOf.filter(item => !isNullSchema(item))
+ const hasNullSchema = nonNullSchemas.length !== schema.anyOf.length
+
+ if (hasNullSchema && nonNullSchemas.length === 1) {
+ const { anyOf: _anyOf, ...rest } = schema
+ Object.keys(schema).forEach(key => delete schema[key])
+ Object.assign(schema, rest, nonNullSchemas[0], { 'x-nullable': true })
+ }
+ }
+
+ Object.values(schema).forEach(item => normalizeNullableAnyOf(item, visited))
+}
+
+const hoistNestedDefinitions = (definitions: Record<string, SwaggerSchema>) => {
+ const visited = new WeakSet<object>()
+
+ const visit = (value: unknown) => {
+ if (!value || typeof value !== 'object' || visited.has(value))
+ return
+
+ visited.add(value)
+
+ if (Array.isArray(value)) {
+ value.forEach(visit)
+ return
+ }
+
+ const schema = value as SwaggerSchema
+ for (const key of ['$defs', 'definitions'] as const) {
+ const nestedDefinitions = schema[key]
+ if (!isObject(nestedDefinitions))
+ continue
+
+ for (const [name, nestedSchema] of Object.entries(nestedDefinitions)) {
+ definitions[name] ??= nestedSchema
+ visit(nestedSchema)
+ }
+
+ delete schema[key]
+ }
+
+ Object.values(schema).forEach(visit)
+ }
+
+ Object.values(definitions).forEach(visit)
+}
+
+const ensureReferencedDefinitions = (document: SwaggerDocument) => {
+ const definitions = document.definitions ??= {}
+ const refs = new Set<string>()
+ collectDefinitionRefs(document, refs)
+
+ for (const refName of refs)
+ definitions[refName] ??= unknownObjectSchema()
+}
+
+const resolveDefinitionRef = (
+ schema: SwaggerSchema | undefined,
+ definitions: Record<string, SwaggerSchema>,
+): SwaggerSchema | undefined => {
+ const ref = schema?.$ref
+
+ if (!ref?.startsWith('#/definitions/'))
+ return schema
+
+ return definitions[ref.slice('#/definitions/'.length)] ?? schema
+}
+
+const withoutNullableWrapper = (schema: SwaggerSchema | undefined): SwaggerSchema => {
+ if (!schema)
+ return {}
+
+ const nonNullSchema = schema.anyOf?.find(item => item.type !== 'null')
+ if (!nonNullSchema)
+ return schema
+
+ const { anyOf: _anyOf, ...rest } = schema
+ return {
+ ...rest,
+ ...nonNullSchema,
+ }
+}
+
+const isNullEnumItem = (item: unknown) => {
+ return isObject(item) && (item.type === 'null' || item.const === null)
+}
+
+const markNullableEnumSchema = (ctx: { schema: JsonObject }): undefined => {
+ const items = ctx.schema.items
+
+ if (ctx.schema['x-nullable'] !== true || !Array.isArray(items) || items.some(isNullEnumItem))
+ return undefined
+
+ // Hey API's enum visitors infer nullable from a null enum item, not x-nullable.
+ ctx.schema.items = [...items, { const: null, type: 'null' }]
+
+ return undefined
+}
+
+const queryParameterFromSchema = (
+ name: string,
+ schema: SwaggerSchema | undefined,
+ required: boolean,
+): SwaggerParameter => {
+ const querySchema = withoutNullableWrapper(schema)
+ const parameter: SwaggerParameter = {
+ in: 'query',
+ name,
+ required,
+ }
+
+ if (querySchema.default !== undefined)
+ parameter.default = querySchema.default
+
+ if (querySchema.description)
+ parameter.description = querySchema.description
+
+ if (querySchema.enum)
+ parameter.enum = querySchema.enum
+
+ if (querySchema.format)
+ parameter.format = querySchema.format
+
+ if (querySchema.items)
+ parameter.items = querySchema.items
+
+ for (const key of [
+ 'exclusiveMaximum',
+ 'exclusiveMinimum',
+ 'maxItems',
+ 'maxLength',
+ 'maximum',
+ 'minItems',
+ 'minLength',
+ 'minimum',
+ 'multipleOf',
+ 'pattern',
+ 'uniqueItems',
+ 'x-nullable',
+ ]) {
+ if (querySchema[key] !== undefined)
+ parameter[key] = querySchema[key]
+ }
+
+ parameter.type = ['array', 'boolean', 'integer', 'number', 'string'].includes(querySchema.type ?? '')
+ ? querySchema.type
+ : 'string'
+
+ return parameter
+}
+
+const mergeQueryParameter = (
+ parameters: SwaggerParameter[],
+ queryParameter: SwaggerParameter,
+) => {
+ const existingIndex = parameters.findIndex((parameter) => {
+ return parameter.in === 'query' && parameter.name === queryParameter.name
+ })
+
+ if (existingIndex === -1) {
+ parameters.push(queryParameter)
+ return
+ }
+
+ const existingParameter = parameters[existingIndex]
+ if (!existingParameter) {
+ parameters.push(queryParameter)
+ return
+ }
+
+ parameters[existingIndex] = {
+ ...existingParameter,
+ ...queryParameter,
+ description: queryParameter.description ?? existingParameter.description,
+ required: Boolean(existingParameter.required) || Boolean(queryParameter.required),
+ }
+}
+
+const normalizeGetBodyParameters = (
+ operation: SwaggerOperation,
+ definitions: Record<string, SwaggerSchema>,
+) => {
+ if (!Array.isArray(operation.parameters))
+ return
+
+ const bodyParameters: SwaggerParameter[] = []
+ const normalizedParameters: SwaggerParameter[] = []
+
+ for (const parameter of operation.parameters) {
+ if (parameter.in === 'body') {
+ bodyParameters.push(parameter)
+ continue
+ }
+
+ normalizedParameters.push(parameter)
+ }
+
+ for (const parameter of bodyParameters) {
+ const schema = resolveDefinitionRef(parameter.schema, definitions)
+ const properties = schema?.properties ?? {}
+ const required = new Set(schema?.required ?? [])
+
+ for (const [name, propertySchema] of Object.entries(properties)) {
+ mergeQueryParameter(
+ normalizedParameters,
+ queryParameterFromSchema(name, propertySchema, required.has(name)),
+ )
+ }
+ }
+
+ operation.parameters = normalizedParameters
+}
+
+const normalizeResponses = (operation: SwaggerOperation) => {
+ const responses = operation.responses ??= {}
+
+ for (const response of Object.values(responses)) {
+ if (!response.schema)
+ response.schema = unknownObjectSchema()
+ }
+
+ if (!Object.keys(responses).some(status => /^2\d\d$/.test(status))) {
+ responses['200'] = {
+ description: 'Success',
+ schema: unknownObjectSchema(),
+ }
+ }
+}
+
+const normalizeOperations = (document: SwaggerDocument) => {
+ const definitions = document.definitions ??= {}
+
+ for (const [routePath, pathItem] of Object.entries(document.paths ?? {})) {
+ for (const [method, operation] of Object.entries(pathItem)) {
+ if (!operationMethods.has(method) || !isObject(operation))
+ continue
+
+ const swaggerOperation = operation as SwaggerOperation
+ swaggerOperation.operationId = operationId(method, routePath)
+
+ normalizeResponses(swaggerOperation)
+
+ if (method === 'get')
+ normalizeGetBodyParameters(swaggerOperation, definitions)
+ }
+ }
+}
+
+const normalizeApiSwagger = (document: SwaggerDocument) => {
+ document.definitions ??= {}
+
+ // Flask-RESTX emits Pydantic nested $defs inside individual schemas while
+ // refs point at the root Swagger 2.0 definitions object.
+ hoistNestedDefinitions(document.definitions)
+ ensureReferencedDefinitions(document)
+ normalizeNullableAnyOf(document)
+ removeNullDefaults(document)
+ normalizeOperations(document)
+
+ return document
+}
+
+const topLevelPathSegment = (routePath: string) => {
+ return routePath.split('/').filter(Boolean)[0] ?? 'root'
+}
+
+const selectReferencedDefinitions = (
+ definitions: Record<string, SwaggerSchema>,
+ paths: Record<string, Record<string, unknown>>,
+) => {
+ const selectedDefinitions: Record<string, SwaggerSchema> = {}
+ const pendingRefs = new Set<string>()
+ collectDefinitionRefs(paths, pendingRefs)
+
+ while (pendingRefs.size > 0) {
+ const refName = pendingRefs.values().next().value
+ if (!refName)
+ break
+
+ pendingRefs.delete(refName)
+
+ if (selectedDefinitions[refName])
+ continue
+
+ selectedDefinitions[refName] = definitions[refName] ?? unknownObjectSchema()
+
+ const nestedRefs = new Set<string>()
+ collectDefinitionRefs(selectedDefinitions[refName], nestedRefs)
+ for (const nestedRef of nestedRefs) {
+ if (!selectedDefinitions[nestedRef])
+ pendingRefs.add(nestedRef)
+ }
+ }
+
+ return selectedDefinitions
+}
+
+const cloneDocumentWithPaths = (
+ document: SwaggerDocument,
+ paths: Record<string, Record<string, unknown>>,
+) => {
+ const { definitions: _definitions, paths: _paths, ...metadata } = document
+ const clonedPaths = clone(paths)
+
+ return {
+ ...clone(metadata),
+ definitions: selectReferencedDefinitions(document.definitions ?? {}, clonedPaths),
+ paths: clonedPaths,
+ } satisfies SwaggerDocument
+}
+
+const splitConsoleDocument = (document: SwaggerDocument) => {
+ const pathsBySegment = new Map<string, Record<string, Record<string, unknown>>>()
+
+ for (const [routePath, pathItem] of Object.entries(document.paths ?? {})) {
+ const segment = topLevelPathSegment(routePath)
+ const paths = pathsBySegment.get(segment) ?? {}
+ paths[routePath] = pathItem
+ pathsBySegment.set(segment, paths)
+ }
+
+ return [...pathsBySegment.entries()]
+ .sort(([left], [right]) => left.localeCompare(right))
+ .map(([segment, paths]): ApiJob => ({
+ document: cloneDocumentWithPaths(document, paths),
+ outputPath: `generated/api/console/${toKebabCase(segment)}`,
+ }))
+}
+
+const createApiJobs = (spec: ApiSpec): ApiJob[] => {
+ const document = normalizeApiSwagger(readApiSwagger(spec.filename))
+
+ if (spec.name === 'console')
+ return splitConsoleDocument(document)
+
+ return [
+ {
+ document,
+ outputPath: `generated/api/${spec.name}`,
+ },
+ ]
+}
+
+const createApiConfig = (job: ApiJob): UserConfig => ({
+ input: job.document,
+ logs: {
+ file: false,
+ },
+ output: {
+ entryFile: false,
+ fileName: {
+ suffix: '.gen',
+ },
+ path: job.outputPath,
+ postProcess: [
+ {
+ args: ['fmt', '{{path}}'],
+ command: 'vp',
+ },
+ {
+ args: ['--fix', '{{path}}/*.ts'],
+ command: 'eslint',
+ },
+ ],
+ },
+ plugins: [
+ {
+ 'comments': false,
+ 'name': '@hey-api/typescript',
+ '~resolvers': {
+ enum: markNullableEnumSchema,
+ },
+ },
+ {
+ 'name': 'zod',
+ '~resolvers': {
+ enum: markNullableEnumSchema,
+ },
+ },
+ {
+ contracts: {
+ contractName: {
+ casing: 'camelCase',
+ name: '{{name}}',
+ },
+ nesting: contractPathSegments,
+ segmentName: {
+ casing: 'camelCase',
+ name: '{{name}}',
+ },
+ strategy: 'single',
+ },
+ name: 'orpc',
+ validator: 'zod',
+ },
+ ],
+})
+
+export default defineConfig(apiSpecs.flatMap(createApiJobs).map(createApiConfig))
diff --git a/web/openapi-ts.enterprise.config.ts b/packages/contracts/openapi-ts.enterprise.config.ts
similarity index 95%
rename from web/openapi-ts.enterprise.config.ts
rename to packages/contracts/openapi-ts.enterprise.config.ts
index 3a9086ee3f6..3c9bc903ab4 100644
--- a/web/openapi-ts.enterprise.config.ts
+++ b/packages/contracts/openapi-ts.enterprise.config.ts
@@ -19,7 +19,7 @@ type ContractOperation = {
const currentDir = path.dirname(fileURLToPath(import.meta.url))
const enterpriseServerDir = process.env.DIFY_ENTERPRISE_SERVER
? path.resolve(process.env.DIFY_ENTERPRISE_SERVER)
- : path.resolve(currentDir, '../../dify-enterprise/server')
+ : path.resolve(currentDir, '../../../dify-enterprise/server')
const enterpriseOpenApiPath = path.join(enterpriseServerDir, 'pkg/apis/enterprise/openapi.yaml')
const isConsoleApiPath = (routePath: string) => routePath.startsWith('/console/api/')
@@ -73,7 +73,7 @@ export default defineConfig({
input: normalizeEnterpriseOpenApi(),
output: {
entryFile: false,
- path: 'contract/generated/enterprise',
+ path: 'generated/enterprise',
fileName: {
suffix: '.gen',
},
@@ -84,7 +84,7 @@ export default defineConfig({
},
{
command: 'eslint',
- args: ['--fix', '{{path}}'],
+ args: ['--fix', '{{path}}/*.ts'],
},
],
},
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
new file mode 100644
index 00000000000..5e9af5e0f16
--- /dev/null
+++ b/packages/contracts/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "@dify/contracts",
+ "type": "module",
+ "version": "0.0.0-private",
+ "private": true,
+ "exports": {
+ "./api/*": {
+ "types": "./generated/api/*.ts",
+ "import": "./generated/api/*.ts"
+ },
+ "./enterprise/*": {
+ "types": "./generated/enterprise/*.ts",
+ "import": "./generated/enterprise/*.ts"
+ }
+ },
+ "scripts": {
+ "gen-api-contract": "pnpm gen-api-openapi && node -e \"fs.rmSync('generated/api', { recursive: true, force: true })\" && openapi-ts -f openapi-ts.api.config.ts",
+ "gen-api-openapi": "uv run --project ../../api ../../api/dev/generate_swagger_specs.py --output-dir openapi",
+ "gen-enterprise-contract": "openapi-ts -f openapi-ts.enterprise.config.ts",
+ "type-check": "tsgo"
+ },
+ "dependencies": {
+ "@orpc/contract": "catalog:",
+ "zod": "catalog:"
+ },
+ "devDependencies": {
+ "@dify/tsconfig": "workspace:*",
+ "@hey-api/openapi-ts": "catalog:",
+ "@types/js-yaml": "catalog:",
+ "@types/node": "catalog:",
+ "@typescript/native-preview": "catalog:",
+ "eslint": "catalog:",
+ "js-yaml": "catalog:",
+ "typescript": "catalog:",
+ "vite-plus": "catalog:"
+ }
+}
diff --git a/packages/contracts/tsconfig.json b/packages/contracts/tsconfig.json
new file mode 100644
index 00000000000..4ebf36d2d35
--- /dev/null
+++ b/packages/contracts/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "extends": "@dify/tsconfig/node.json",
+ "include": [
+ "*.ts",
+ "generated/**/*.ts"
+ ],
+ "exclude": [
+ "node_modules"
+ ]
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9529c1aee3f..2021d87adc1 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -647,6 +647,43 @@ importers:
specifier: 'catalog:'
+ packages/contracts:
+ dependencies:
+ '@orpc/contract':
+ specifier: 'catalog:'
+ version: 1.14.0
+ zod:
+ specifier: 'catalog:'
+ version: 4.3.6
+ devDependencies:
+ '@dify/tsconfig':
+ specifier: workspace:*
+ version: link:../tsconfig
+ '@hey-api/openapi-ts':
+ specifier: 'catalog:'
+ '@types/js-yaml':
+ specifier: 'catalog:'
+ version: 4.0.9
+ '@types/node':
+ specifier: 'catalog:'
+ version: 25.6.0
+ '@typescript/native-preview':
+ specifier: 'catalog:'
+ version: 7.0.0-dev.20260428.1
+ eslint:
+ specifier: 'catalog:'
+ version: 10.2.1([email protected])
+ js-yaml:
+ specifier: 'catalog:'
+ version: 4.1.1
+ typescript:
+ specifier: 'catalog:'
+ version: 6.0.3
+ vite-plus:
+ specifier: 'catalog:'
+
packages/dify-ui:
dependencies:
clsx:
@@ -1122,6 +1159,9 @@ importers:
'@chromatic-com/storybook':
specifier: 'catalog:'
+ '@dify/contracts':
+ specifier: workspace:*
+ version: link:../packages/contracts
'@dify/iconify-collections':
specifier: workspace:*
version: link:../packages/iconify-collections
@@ -1134,9 +1174,6 @@ importers:
'@eslint-react/eslint-plugin':
specifier: 'catalog:'
- '@hey-api/openapi-ts':
- specifier: 'catalog:'
'@hono/node-server':
specifier: 'catalog:'
version: 2.0.0([email protected])
@@ -16557,6 +16594,7 @@ time:
'@lexical/[email protected]': '2026-04-27T14:48:15.054Z'
'@lexical/[email protected]': '2026-04-27T14:48:23.958Z'
'@lexical/[email protected]': '2026-04-27T14:48:26.689Z'
+ '@orpc/[email protected]': '2026-04-22T14:03:55.170Z'
'@tanstack/[email protected]': '2026-04-28T16:39:45.129Z'
'@tanstack/[email protected]': '2026-04-25T12:28:06.989Z'
'@tanstack/[email protected]': '2026-04-28T16:39:51.334Z'
@@ -16564,6 +16602,8 @@ time:
'@tsslint/[email protected]': '2026-04-29T04:57:38.423Z'
'@tsslint/[email protected]': '2026-04-29T04:57:34.593Z'
'@tsslint/[email protected]': '2026-04-29T04:57:36.446Z'
+ '@types/[email protected]': '2023-11-07T20:20:13.264Z'
+ '@types/[email protected]': '2026-04-10T03:39:59.421Z'
'@typescript-eslint/[email protected]': '2026-04-27T17:31:50.020Z'
'@typescript-eslint/[email protected]': '2026-04-27T17:31:29.147Z'
'@typescript/[email protected]': '2026-04-28T08:09:51.266Z'
@@ -16573,9 +16613,13 @@ time:
[email protected]: '2026-04-24T22:15:18.933Z'
[email protected]: '2026-04-25T11:31:20.226Z'
[email protected]: '2026-04-28T06:24:47.281Z'
+ [email protected]: '2026-04-17T20:17:44.852Z'
[email protected]: '2026-04-24T19:20:14.685Z'
+ [email protected]: '2025-11-12T15:18:03.524Z'
[email protected]: '2026-04-27T14:47:00.970Z'
[email protected]: '2026-04-28T12:21:32.710Z'
+ [email protected]: '2026-04-16T23:38:27.905Z'
[email protected]: '2026-04-19T15:15:42.302Z'
[email protected]: '2026-04-28T11:43:03.463Z'
[email protected]: '2026-04-29T03:08:50.317Z'
+ [email protected]: '2026-01-22T19:14:35.382Z'
diff --git a/web/contract/generated/enterprise/orpc.gen.ts b/web/contract/generated/enterprise/orpc.gen.ts
deleted file mode 100644
index 6b9b76470aa..00000000000
--- a/web/contract/generated/enterprise/orpc.gen.ts
+++ /dev/null
@@ -1,138 +0,0 @@
-// This file is auto-generated by @hey-api/openapi-ts
-
-import { oc } from '@orpc/contract'
-import * as z from 'zod'
-
-import {
- zConsoleSsoOAuth2LoginResponse,
- zConsoleSsoOidcLoginResponse,
- zConsoleSsoSamlLoginResponse,
- zWebAppAuthGetGroupSubjectsQuery,
- zWebAppAuthGetGroupSubjectsResponse,
- zWebAppAuthGetWebAppAccessModeQuery,
- zWebAppAuthGetWebAppAccessModeResponse,
- zWebAppAuthGetWebAppWhitelistSubjectsQuery,
- zWebAppAuthGetWebAppWhitelistSubjectsResponse,
- zWebAppAuthIsUserAllowedToAccessWebAppQuery,
- zWebAppAuthIsUserAllowedToAccessWebAppResponse,
- zWebAppAuthSearchForWhilteListCandidatesQuery,
- zWebAppAuthSearchForWhilteListCandidatesResponse,
- zWebAppAuthUpdateWebAppWhitelistSubjectsBody,
- zWebAppAuthUpdateWebAppWhitelistSubjectsResponse,
-} from './zod.gen'
-
-export const oAuth2Login = oc
- .route({
- inputStructure: 'detailed',
- method: 'GET',
- operationId: 'ConsoleSSO_OAuth2Login',
- path: '/enterprise/sso/oauth2/login',
- tags: ['ConsoleSSO'],
- })
- .output(zConsoleSsoOAuth2LoginResponse)
-
-export const oidcLogin = oc
- .route({
- inputStructure: 'detailed',
- method: 'GET',
- operationId: 'ConsoleSSO_OIDCLogin',
- path: '/enterprise/sso/oidc/login',
- tags: ['ConsoleSSO'],
- })
- .output(zConsoleSsoOidcLoginResponse)
-
-export const samlLogin = oc
- .route({
- inputStructure: 'detailed',
- method: 'GET',
- operationId: 'ConsoleSSO_SAMLLogin',
- path: '/enterprise/sso/saml/login',
- tags: ['ConsoleSSO'],
- })
- .output(zConsoleSsoSamlLoginResponse)
-
-export const consoleSso = {
- oAuth2Login,
- oidcLogin,
- samlLogin,
-}
-
-export const getWebAppAccessMode = oc
- .route({
- inputStructure: 'detailed',
- method: 'GET',
- operationId: 'WebAppAuth_GetWebAppAccessMode',
- path: '/enterprise/webapp/app/access-mode',
- tags: ['WebAppAuth'],
- })
- .input(z.object({ query: zWebAppAuthGetWebAppAccessModeQuery.optional() }))
- .output(zWebAppAuthGetWebAppAccessModeResponse)
-
-export const updateWebAppWhitelistSubjects = oc
- .route({
- inputStructure: 'detailed',
- method: 'POST',
- operationId: 'WebAppAuth_UpdateWebAppWhitelistSubjects',
- path: '/enterprise/webapp/app/access-mode',
- tags: ['WebAppAuth'],
- })
- .input(z.object({ body: zWebAppAuthUpdateWebAppWhitelistSubjectsBody }))
- .output(zWebAppAuthUpdateWebAppWhitelistSubjectsResponse)
-
-export const searchForWhilteListCandidates = oc
- .route({
- inputStructure: 'detailed',
- method: 'GET',
- operationId: 'WebAppAuth_SearchForWhilteListCandidates',
- path: '/enterprise/webapp/app/subject/search',
- tags: ['WebAppAuth'],
- })
- .input(z.object({ query: zWebAppAuthSearchForWhilteListCandidatesQuery.optional() }))
- .output(zWebAppAuthSearchForWhilteListCandidatesResponse)
-
-export const getWebAppWhitelistSubjects = oc
- .route({
- inputStructure: 'detailed',
- method: 'GET',
- operationId: 'WebAppAuth_GetWebAppWhitelistSubjects',
- path: '/enterprise/webapp/app/subjects',
- tags: ['WebAppAuth'],
- })
- .input(z.object({ query: zWebAppAuthGetWebAppWhitelistSubjectsQuery.optional() }))
- .output(zWebAppAuthGetWebAppWhitelistSubjectsResponse)
-
-export const getGroupSubjects = oc
- .route({
- inputStructure: 'detailed',
- method: 'GET',
- operationId: 'WebAppAuth_GetGroupSubjects',
- path: '/enterprise/webapp/group/subjects',
- tags: ['WebAppAuth'],
- })
- .input(z.object({ query: zWebAppAuthGetGroupSubjectsQuery.optional() }))
- .output(zWebAppAuthGetGroupSubjectsResponse)
-
-export const isUserAllowedToAccessWebApp = oc
- .route({
- inputStructure: 'detailed',
- method: 'GET',
- operationId: 'WebAppAuth_IsUserAllowedToAccessWebApp',
- path: '/enterprise/webapp/permission',
- tags: ['WebAppAuth'],
- })
- .input(z.object({ query: zWebAppAuthIsUserAllowedToAccessWebAppQuery.optional() }))
- .output(zWebAppAuthIsUserAllowedToAccessWebAppResponse)
-
-export const webAppAuth = {
- getWebAppAccessMode,
- updateWebAppWhitelistSubjects,
- searchForWhilteListCandidates,
- getWebAppWhitelistSubjects,
- getGroupSubjects,
- isUserAllowedToAccessWebApp,
-}
-
-export const contract = {
- consoleSso,
- webAppAuth,
-}
diff --git a/web/contract/generated/enterprise/types.gen.ts b/web/contract/generated/enterprise/types.gen.ts
deleted file mode 100644
index b747c4baa89..00000000000
--- a/web/contract/generated/enterprise/types.gen.ts
+++ /dev/null
@@ -1,1103 +0,0 @@
-// This file is auto-generated by @hey-api/openapi-ts
-
-export type ClientOptions = {
- baseUrl: `${string}://${string}` | (string & {})
-}
-
-export type Account = {
- id?: string
- email?: string
- name?: string
-}
-
-export type AccountDetail = {
- account?: Account
- status?: string
- createdAt?: string
- lastActiveAt?: string
- workspaces?: Array<AccountInWorkspace>
- groups?: Array<AccountDetailGroup>
-}
-
-export type AccountDetailGroup = {
- id?: string
- name?: string
-}
-
-export type AccountInWorkspace = {
- workspaceId?: string
- workspaceName?: string
- role?: string
-}
-
-export type AddGroupAppsRequest = {
- id?: string
- app_ids?: Array<string>
-}
-
-export type AuthSettingsReply = {
- userSsoSettings?: SsoSettings
- webSsoSettings?: SsoSettings
- dashboardSsoSettings?: SsoSettings
- userSsoSamlAcsUrl?: string
- userSsoOidcCallbackUrl?: string
- userSsoOauth2CallbackUrl?: string
- webSsoSamlAcsUrl?: string
- webSsoOidcCallbackUrl?: string
- webSsoOauth2CallbackUrl?: string
- webSsoMembersSamlAcsUrl?: string
- webSsoMembersOidcCallbackUrl?: string
- webSsoMembersOauth2CallbackUrl?: string
- dashboardSsoSamlAcsUrl?: string
- dashboardSsoOidcCallbackUrl?: string
- dashboardSsoOauth2CallbackUrl?: string
-}
-
-export type AuthSettingsReq = {
- ssoType?: string
- ssoSettings?: SsoSettings
-}
-
-export type BrandingInfo = {
- enabled?: boolean
- applicationTitle?: string
- loginPageLogo?: string
- workspaceLogo?: string
- favicon?: string
-}
-
-export type CheckPasswordStatusReply = {
- requirePasswordChange?: boolean
- changeReason?: number
- daysToExpire?: number
- message?: string
-}
-
-export type ClearDefaultWorkspaceReply = {
- [key: string]: unknown
-}
-
-export type CreateBearerTokenResponse = {
- token?: string
-}
-
-export type CreateMemberReply = {
- id?: string
- password?: string
-}
-
-export type CreateMemberReq = {
- name?: string
- email?: string
- status?: string
-}
-
-export type CreateNewGroupsReq = {
- groups?: Array<CreateNewGroupsReqGroup>
-}
-
-export type CreateNewGroupsReqGroup = {
- name?: string
-}
-
-export type CreateNewGroupsRes = {
- groups?: Array<SubjectGroupData>
-}
-
-export type CreateResourceGroupRequest = {
- name?: string
- description?: string
-}
-
-export type CreateSecretKeyReply = {
- id?: string
- name?: string
- secretKey?: string
- createdAt?: string
- lastActive?: string
-}
-
-export type CreateSecretKeyReq = {
- name?: string
-}
-
-export type CreateUserReply = {
- id?: string
- password?: string
-}
-
-export type CreateUserReq = {
- name?: string
- email?: string
- status?: string
-}
-
-export type CreateWorkspaceReply = {
- workspace?: Workspace
-}
-
-export type CreateWorkspaceReq = {
- name?: string
- email?: string
- status?: string
-}
-
-export type CurrentUserReply = {
- id?: string
- name?: string
- email?: string
- interfaceLanguage?: string
- timezone?: string
-}
-
-export type DashboardSsooidcLoginReply = {
- url?: string
- state?: string
-}
-
-export type DashboardSsoOauth2LoginReply = {
- url?: string
- state?: string
-}
-
-export type DashboardSsosamlLoginReply = {
- url?: string
-}
-
-export type DeleteGroupsRes = {
- message?: string
-}
-
-export type DeleteMemberReply = {
- account?: Account
-}
-
-export type DeleteSecretKeyReply = {
- message?: string
-}
-
-export type DeleteUserReply = {
- account?: Account
-}
-
-export type DeleteWorkspaceReply = {
- [key: string]: unknown
-}
-
-export type EndpointReply = {
- mode?: number
- metricsEndpoint?: OtelExporterEndpoint
- tracesEndpoint?: OtelExporterEndpoint
-}
-
-export type EnterpriseSystemUserSettingReply = {
- ssoEnforcedForSignin?: boolean
- ssoEnforcedForSigninProtocol?: string
- enableEmailPasswordLogin?: boolean
-}
-
-export type GetBearerTokenResponse = {
- maskedToken?: string
-}
-
-export type GetClusterInfoReply = {
- mode?: string
- clusterId?: string
- verifyMode?: string
-}
-
-export type GetDefaultWorkspaceReply = {
- workspaceId?: string
- workspace?: Workspace
-}
-
-export type GetGroupSubjectsRes = {
- subjects?: Array<Subject>
-}
-
-export type GetGroupsRes = {
- groups?: Array<SubjectGroupData>
-}
-
-export type GetJoinedGroupsRes = {
- groups?: Array<SubjectGroupData>
-}
-
-export type GetLicenseReply = {
- license?: LicenseInfo
-}
-
-export type GetLicenseStatusReply = {
- status?: string
-}
-
-export type GetMfaInfoReply = {
- userEnabled?: boolean
- userSetup?: boolean
- globalEnabled?: boolean
-}
-
-export type GetMemberReply = {
- account?: AccountDetail
-}
-
-export type GetUserReply = {
- account?: AccountDetail
-}
-
-export type GetWebAppAccessModeRes = {
- accessMode?: string
-}
-
-export type GetWebAppAuthInfoRes = {
- allowSso?: boolean
- allowEmailCodeLogin?: boolean
- allowEmailPasswordLogin?: boolean
-}
-
-export type GetWebAppWhitelistSubjectsRes = {
- groups?: Array<SubjectGroupData>
- members?: Array<GetWebAppWhitelistSubjectsResMember>
-}
-
-export type GetWebAppWhitelistSubjectsResMember = {
- id?: string
- name?: string
- email?: string
- avatar?: string
-}
-
-export type GetWorkspacePermissionReply = {
- permission?: WorkspacePermission
-}
-
-export type GetWorkspaceReply = {
- workspace?: Workspace
-}
-
-export type GroupAppItem = {
- app_id?: string
- app_name?: string
- workspace_id?: string
- workspace_name?: string
- app_status?: number
- token_usage?: string
- rpm?: string
- concurrency?: string
-}
-
-export type HealthzReply = {
- message?: string
- status?: string
-}
-
-export type InfoConfigReply = {
- SSOEnforcedForSignin?: boolean
- SSOEnforcedForSigninProtocol?: string
- SSOEnforcedForWeb?: boolean
- SSOEnforcedForWebProtocol?: string
- EnableEmailCodeLogin?: boolean
- EnableEmailPasswordLogin?: boolean
- IsAllowRegister?: boolean
- IsAllowCreateWorkspace?: boolean
- License?: LicenseStatus
- Branding?: BrandingInfo
- WebAppAuth?: WebAppAuthInfo
- PluginInstallationPermission?: PluginInstallationPermissionInfo
-}
-
-export type InnerAdmission = {
- marker?: string
- concurrencyGroupIds?: Array<string>
-}
-
-export type InnerBatchGetWebAppAccessModesByIdReq = {
- appIds?: Array<string>
-}
-
-export type InnerBatchGetWebAppAccessModesByIdRes = {
- accessModes?: {
- [key: string]: string
- }
-}
-
-export type InnerBatchIsUserAllowedToAccessWebAppReq = {
- userId?: string
- appIds?: Array<string>
-}
-
-export type InnerBatchIsUserAllowedToAccessWebAppRes = {
- permissions?: {
- [key: string]: boolean
- }
-}
-
-export type InnerCleanAppRes = {
- message?: string
-}
-
-export type InnerGetWebAppAccessModeByCodeRes = {
- accessMode?: string
-}
-
-export type InnerGetWebAppAccessModeByIdRes = {
- accessMode?: string
-}
-
-export type InnerGroupConfig = {
- id?: string
- enabled?: boolean
- membershipId?: string
- limits?: Array<LimitConfig>
-}
-
-export type InnerIsUserAllowedToAccessWebAppRes = {
- result?: boolean
-}
-
-export type InnerReleaseAdmissionRequest = {
- admission?: InnerAdmission
-}
-
-export type InnerReleaseAdmissionResponse = {
- [key: string]: unknown
-}
-
-export type InnerResolveResponse = {
- appId?: string
- groups?: Array<InnerGroupConfig>
- blocked?: boolean
- blockGroupId?: string
- blockReason?: string
- admission?: InnerAdmission
-}
-
-export type InnerTryAddAccountToDefaultWorkspaceReply = {
- workspaceId?: string
- joined?: boolean
- message?: string
-}
-
-export type InnerTryAddAccountToDefaultWorkspaceReq = {
- accountId?: string
-}
-
-export type IsUserAllowedToAccessWebAppRes = {
- result?: boolean
-}
-
-export type JoinWorkspaceReply = {
- message?: string
-}
-
-export type JoinWorkspaceReq = {
- id?: string
- email?: string
- role?: string
-}
-
-export type LicenseInfo = {
- uuid?: string
- expiredAt?: string
- clusterId?: string
- product?: string
- limits?: LimitFields
-}
-
-export type LicenseStatus = {
- status?: string
- expiredAt?: string
- workspaces?: ResourceQuota
-}
-
-export type LimitConfig = {
- type?: number
- threshold?: string
- action?: number
- reached?: boolean
-}
-
-export type LimitFields = {
- workspaceMembers?: number
- workspaces?: ResourceQuota
-}
-
-export type ListGroupAppsResponse = {
- items?: Array<GroupAppItem>
- total?: string
-}
-
-export type ListMembersReply = {
- data?: Array<AccountDetail>
- pagination?: Pagination
-}
-
-export type ListResourceGroupsResponse = {
- items?: Array<ResourceGroupItem>
- total?: string
-}
-
-export type ListSecretKeysReply = {
- data?: Array<SecretKey>
- pagination?: Pagination
-}
-
-export type ListUsersReply = {
- data?: Array<AccountDetail>
- pagination?: Pagination
-}
-
-export type ListWorkspacesReply = {
- data?: Array<Workspace>
- pagination?: Pagination
-}
-
-export type LoginTypesReply = {
- enabledEmailCodeLogin?: boolean
- enableEmailPasswordLogin?: boolean
- isAllowRegister?: boolean
- isAllowCreateWorkspace?: boolean
-}
-
-export type LoginTypesReq = {
- enabledEmailCodeLogin?: boolean
- enableEmailPasswordLogin?: boolean
- isAllowRegister?: boolean
- isAllowCreateWorkspace?: boolean
-}
-
-export type MfaBackupCodesRes = {
- codes?: Array<string>
- validCounts?: number
- createdAt?: string
-}
-
-export type MfaDeleteBackupCodesRes = {
- message?: string
-}
-
-export type MfaDeleteRes = {
- token?: string
-}
-
-export type MfaDownloadBackupCodesSummaryRes = {
- content?: string
-}
-
-export type MfaEnrollReq = {
- code?: string
-}
-
-export type MfaEnrollRes = {
- token?: string
-}
-
-export type MfaGetEnrollInfoRes = {
- qrCode?: string
- secret?: string
-}
-
-export type MfaModifyRes = {
- message?: string
-}
-
-export type OAuth2Config = {
- clientId?: string
- clientSecret?: string
- authUrl?: string
- tokenUrl?: string
- userinfoUrl?: string
- scopes?: string
- enablePkce?: boolean
-}
-
-export type OAuth2LoginReply = {
- url?: string
- state?: string
-}
-
-export type OidcConfig = {
- issuerUrl?: string
- clientId?: string
- clientSecret?: string
- enablePkce?: boolean
-}
-
-export type OidcReply = {
- url?: string
- state?: string
-}
-
-export type OtelExporterEndpoint = {
- endpoint?: string
- compression?: string
- protocol?: number
- timeout?: string
- headers?: {
- [key: string]: string
- }
- tlsCaPem?: string
- tlsInsecure?: boolean
- tlsClientCertPem?: string
- tlsClientKeyPem?: string
- enabled?: boolean
- tlsInsecureSkipVerify?: boolean
-}
-
-export type OtelExporterStatusReply = {
- connectedAt?: string
- bytesPushed?: string
- itemsInQueue?: string
- logs?: string
- status?: number
-}
-
-export type PasswordPolicyConfig = {
- minLength?: number
- requireDigit?: boolean
- requireLowercase?: boolean
- requireUppercase?: boolean
- requireSpecial?: boolean
- forbidRepeated?: boolean
- forbidSequential?: boolean
- expiryEnabled?: boolean
- expiryDays?: number
-}
-
-export type PasswordStrengthReply = {
- level?: number
-}
-
-export type PasswordStrengthReq = {
- password?: string
-}
-
-export type PluginInstallationPermissionInfo = {
- pluginInstallationScope?: string
- restrictToMarketplaceOnly?: boolean
-}
-
-export type PluginInstallationSettingsReply = {
- pluginInstallationScope?: number
- restrictToMarketplaceOnly?: boolean
-}
-
-export type ResetMemberPasswordReply = {
- id?: string
- password?: string
-}
-
-export type ResetMemberPasswordReq = {
- id?: string
-}
-
-export type ResetPasswordReply = {
- message?: string
-}
-
-export type ResetPasswordReq = {
- currentPassword?: string
- newPassword?: string
- confirmPassword?: string
-}
-
-export type ResetUserPasswordReply = {
- id?: string
- password?: string
-}
-
-export type ResetUserPasswordReq = {
- id?: string
-}
-
-export type ResourceGroupDetail = {
- id?: string
- name?: string
- description?: string
- enabled?: boolean
- rpm_limit?: number
- rpm_action?: number
- concurrency_limit?: number
- concurrency_action?: number
- token_quota?: string
- token_action?: number
- created_at?: string
- updated_at?: string
-}
-
-export type ResourceGroupItem = {
- id?: string
- name?: string
- description?: string
- enabled?: boolean
- rpm_limit?: number
- concurrency_limit?: number
- token_quota?: string
- token_usage?: string
- app_count?: string
- rpm_status?: number
- conc_status?: number
- created_at?: string
- updated_at?: string
-}
-
-export type ResourceQuota = {
- used?: number
- limit?: number
- enabled?: boolean
-}
-
-export type SamlConfig = {
- idpSsoUrl?: string
- certificate?: string
-}
-
-export type SamlLoginReply = {
- url?: string
-}
-
-export type SsoIdPProvider = {
- protocol?: string
- provider?: string
- samlConfig?: SamlConfig
- oidcConfig?: OidcConfig
- oauth2Config?: OAuth2Config
-}
-
-export type SsoSettings = {
- ssoEnforced?: boolean
- sessionTimeout?: number
- ssoIdpProvider?: SsoIdPProvider
-}
-
-export type SsoSettingsReply = {
- enabled?: boolean
-}
-
-export type ScimSettings = {
- enabled?: boolean
- lastSyncTime?: string
-}
-
-export type SearchAppItem = {
- app_id?: string
- app_name?: string
- workspace_id?: string
- workspace_name?: string
- app_status?: number
- icon?: string
- icon_type?: string
- icon_background?: string
- created_by_name?: string
-}
-
-export type SearchAppsResponse = {
- items?: Array<SearchAppItem>
- total?: string
-}
-
-export type SearchForWhilteListCandidatesRes = {
- subjects?: Array<Subject>
- currPage?: number
- hasMore?: boolean
-}
-
-export type SecretKey = {
- id?: string
- name?: string
- secretKeyMasked?: string
- createdAt?: string
- lastActive?: string
-}
-
-export type SetDefaultWorkspaceReply = {
- workspaceId?: string
-}
-
-export type SetDefaultWorkspaceReq = {
- id?: string
-}
-
-export type Subject = {
- subjectId?: string
- subjectType?: string
- accountData?: SubjectAccountData
- groupData?: SubjectGroupData
-}
-
-export type SubjectAccountData = {
- id?: string
- name?: string
- email?: string
- avatar?: string
-}
-
-export type SubjectGroupData = {
- id?: string
- name?: string
- groupSize?: number
-}
-
-export type SystemUserSettingReply = {
- isAllowRegister?: boolean
- enableEmailPasswordLogin?: boolean
-}
-
-export type SystemUserSettingReq = {
- isAllowRegister?: boolean
- enableEmailPasswordLogin?: boolean
-}
-
-export type TestConnectionReply = {
- success?: boolean
- error?: string
-}
-
-export type ToggleEndpointRequest = {
- enabled?: boolean
-}
-
-export type UpdateAccessModeReq = {
- appId?: string
- accessMode?: string
-}
-
-export type UpdateAccessModeRes = {
- message?: string
-}
-
-export type UpdateBrandingInfoReq = {
- enabled?: boolean
- applicationTitle?: string
- loginPageLogo?: string
- workspaceLogo?: string
- favicon?: string
-}
-
-export type UpdateGroupSubjectsReq = {
- groupId?: string
- subjects?: Array<Subject>
-}
-
-export type UpdateGroupSubjectsRes = {
- message?: string
-}
-
-export type UpdateGroupsReq = {
- groups?: Array<UpdateGroupsReqGroup>
-}
-
-export type UpdateGroupsReqGroup = {
- id?: string
- name?: string
-}
-
-export type UpdateGroupsRes = {
- groups?: Array<SubjectGroupData>
-}
-
-export type UpdateJoinedGroupsReq = {
- accountId?: string
- groupIds?: Array<string>
-}
-
-export type UpdateJoinedGroupsRes = {
- message?: string
-}
-
-export type UpdateLicenseReply = {
- message?: string
-}
-
-export type UpdateLicenseReq = {
- licenseId?: string
-}
-
-export type UpdateMfaStatusReq = {
- enabled?: boolean
-}
-
-export type UpdateMfaStatusRes = {
- message?: string
-}
-
-export type UpdateMemberReply = {
- account?: Account
-}
-
-export type UpdateMemberReq = {
- id?: string
- name?: string
- email?: string
- status?: string
-}
-
-export type UpdateMembersInGroupsReq = {
- groupId?: string
- accountIds?: Array<string>
-}
-
-export type UpdateMembersInGroupsRes = {
- message?: string
-}
-
-export type UpdateOfflineLicenseReply = {
- message?: string
-}
-
-export type UpdateOfflineLicenseReq = {
- offlineCode?: string
-}
-
-export type UpdatePluginInstallationSettingsRequest = {
- pluginInstallationScope?: number
- restrictToMarketplaceOnly?: boolean
-}
-
-export type UpdateResourceGroupRequest = {
- id?: string
- name?: string
- description?: string
- enabled?: boolean
- rpm_limit?: number
- rpm_action?: number
- concurrency_limit?: number
- concurrency_action?: number
- token_quota?: string
- token_action?: number
-}
-
-export type UpdateUserReply = {
- account?: AccountDetail
-}
-
-export type UpdateUserReq = {
- id?: string
- name?: string
- email?: string
- status?: string
-}
-
-export type UpdateWebAppAuthInfoReq = {
- allowSso?: boolean
- allowEmailCodeLogin?: boolean
- allowEmailPasswordLogin?: boolean
-}
-
-export type UpdateWebAppAuthInfoRes = {
- message?: string
-}
-
-export type UpdateWebAppWhitelistSubjectsReq = {
- appId?: string
- subjects?: Array<Subject>
- accessMode?: string
-}
-
-export type UpdateWebAppWhitelistSubjectsRes = {
- message?: string
-}
-
-export type UpdateWorkspacePermissionReply = {
- message?: string
- permission?: WorkspacePermission
-}
-
-export type UpdateWorkspacePermissionReq = {
- id?: string
- permission?: WorkspacePermission
-}
-
-export type UpdateWorkspaceReply = {
- workspace?: Workspace
-}
-
-export type UpdateWorkspaceReq = {
- id?: string
- name?: string
- email?: string
- status?: string
-}
-
-export type WebAppAuthInfo = {
- allowSso?: boolean
- allowEmailCodeLogin?: boolean
- allowEmailPasswordLogin?: boolean
-}
-
-export type WebOAuth2LoginReply = {
- url?: string
- state?: string
-}
-
-export type WebOidcLoginReply = {
- url?: string
-}
-
-export type WebSamlLoginReply = {
- url?: string
-}
-
-export type Workspace = {
- id?: string
- name?: string
- status?: string
- createdAt?: string
- owner?: Account
-}
-
-export type WorkspaceInfoReply = {
- WorkspaceMembers?: ResourceQuota
-}
-
-export type WorkspacePermission = {
- workspaceId?: string
- allowMemberInvite?: boolean
- allowOwnerTransfer?: boolean
-}
-
-export type Pagination = {
- totalCount?: number
- perPage?: number
- currentPage?: number
- totalPages?: number
-}
-
-export type ConsoleSsoOAuth2LoginData = {
- body?: never
- path?: never
- query?: never
- url: '/enterprise/sso/oauth2/login'
-}
-
-export type ConsoleSsoOAuth2LoginResponses = {
- 200: OAuth2LoginReply
-}
-
-export type ConsoleSsoOAuth2LoginResponse
- = ConsoleSsoOAuth2LoginResponses[keyof ConsoleSsoOAuth2LoginResponses]
-
-export type ConsoleSsoOidcLoginData = {
- body?: never
- path?: never
- query?: never
- url: '/enterprise/sso/oidc/login'
-}
-
-export type ConsoleSsoOidcLoginResponses = {
- 200: OidcReply
-}
-
-export type ConsoleSsoOidcLoginResponse
- = ConsoleSsoOidcLoginResponses[keyof ConsoleSsoOidcLoginResponses]
-
-export type ConsoleSsoSamlLoginData = {
- body?: never
- path?: never
- query?: never
- url: '/enterprise/sso/saml/login'
-}
-
-export type ConsoleSsoSamlLoginResponses = {
- 200: SamlLoginReply
-}
-
-export type ConsoleSsoSamlLoginResponse
- = ConsoleSsoSamlLoginResponses[keyof ConsoleSsoSamlLoginResponses]
-
-export type WebAppAuthGetWebAppAccessModeData = {
- body?: never
- path?: never
- query?: {
- appId?: string
- }
- url: '/enterprise/webapp/app/access-mode'
-}
-
-export type WebAppAuthGetWebAppAccessModeResponses = {
- 200: GetWebAppAccessModeRes
-}
-
-export type WebAppAuthGetWebAppAccessModeResponse
- = WebAppAuthGetWebAppAccessModeResponses[keyof WebAppAuthGetWebAppAccessModeResponses]
-
-export type WebAppAuthUpdateWebAppWhitelistSubjectsData = {
- body: UpdateWebAppWhitelistSubjectsReq
- path?: never
- query?: never
- url: '/enterprise/webapp/app/access-mode'
-}
-
-export type WebAppAuthUpdateWebAppWhitelistSubjectsResponses = {
- 200: UpdateWebAppWhitelistSubjectsRes
-}
-
-export type WebAppAuthUpdateWebAppWhitelistSubjectsResponse
- = WebAppAuthUpdateWebAppWhitelistSubjectsResponses[keyof WebAppAuthUpdateWebAppWhitelistSubjectsResponses]
-
-export type WebAppAuthSearchForWhilteListCandidatesData = {
- body?: never
- path?: never
- query?: {
- keyword?: string
- pageNumber?: number
- resultsPerPage?: number
- groupId?: string
- }
- url: '/enterprise/webapp/app/subject/search'
-}
-
-export type WebAppAuthSearchForWhilteListCandidatesResponses = {
- 200: SearchForWhilteListCandidatesRes
-}
-
-export type WebAppAuthSearchForWhilteListCandidatesResponse
- = WebAppAuthSearchForWhilteListCandidatesResponses[keyof WebAppAuthSearchForWhilteListCandidatesResponses]
-
-export type WebAppAuthGetWebAppWhitelistSubjectsData = {
- body?: never
- path?: never
- query?: {
- appId?: string
- }
- url: '/enterprise/webapp/app/subjects'
-}
-
-export type WebAppAuthGetWebAppWhitelistSubjectsResponses = {
- 200: GetWebAppWhitelistSubjectsRes
-}
-
-export type WebAppAuthGetWebAppWhitelistSubjectsResponse
- = WebAppAuthGetWebAppWhitelistSubjectsResponses[keyof WebAppAuthGetWebAppWhitelistSubjectsResponses]
-
-export type WebAppAuthGetGroupSubjectsData = {
- body?: never
- path?: never
- query?: {
- groupId?: string
- }
- url: '/enterprise/webapp/group/subjects'
-}
-
-export type WebAppAuthGetGroupSubjectsResponses = {
- 200: GetGroupSubjectsRes
-}
-
-export type WebAppAuthGetGroupSubjectsResponse
- = WebAppAuthGetGroupSubjectsResponses[keyof WebAppAuthGetGroupSubjectsResponses]
-
-export type WebAppAuthIsUserAllowedToAccessWebAppData = {
- body?: never
- path?: never
- query?: {
- appId?: string
- }
- url: '/enterprise/webapp/permission'
-}
-
-export type WebAppAuthIsUserAllowedToAccessWebAppResponses = {
- 200: IsUserAllowedToAccessWebAppRes
-}
-
-export type WebAppAuthIsUserAllowedToAccessWebAppResponse
- = WebAppAuthIsUserAllowedToAccessWebAppResponses[keyof WebAppAuthIsUserAllowedToAccessWebAppResponses]
diff --git a/web/contract/router.ts b/web/contract/router.ts
index 4519160d052..d45d3c000a2 100644
--- a/web/contract/router.ts
+++ b/web/contract/router.ts
@@ -1,4 +1,5 @@
import type { InferContractRouterInputs } from '@orpc/contract'
+import { contract as enterpriseContract } from '@dify/contracts/enterprise/orpc.gen'
import { accountAvatarContract } from './console/account'
import { appDeleteContract, workflowOnlineUsersContract } from './console/apps'
import { bindPartnerStackContract, invoicesContract } from './console/billing'
@@ -42,7 +43,6 @@ import {
workflowDraftUpdateFeaturesContract,
} from './console/workflow'
import { workflowCommentContracts } from './console/workflow-comment'
-import { contract as enterpriseContract } from './generated/enterprise/orpc.gen'
import { collectionPluginsContract, collectionsContract, searchAdvancedContract, templateDetailContract } from './marketplace'
export const marketplaceRouterContract = {
diff --git a/web/knip.config.ts b/web/knip.config.ts
index 1670155aad9..d6b71b4af96 100644
--- a/web/knip.config.ts
+++ b/web/knip.config.ts
@@ -8,11 +8,9 @@ const config: KnipConfig = {
'scripts/**/*.{js,ts,mjs}',
'bin/**/*.{js,ts,mjs}',
'tsslint.config.ts',
- 'openapi-ts.*.config.ts',
],
ignore: [
'public/**',
- 'contract/generated/**',
],
ignoreBinaries: [
'only-allow',
diff --git a/web/package.json b/web/package.json
index 092d82a17e8..a7174da9c36 100644
--- a/web/package.json
+++ b/web/package.json
@@ -31,7 +31,6 @@
"dev:proxy": "tsx ./scripts/dev-hono-proxy.ts",
"dev:vinext": "vinext dev",
"gen-doc-paths": "tsx ./scripts/gen-doc-paths.ts",
- "gen-enterprise-contract": "openapi-ts -f openapi-ts.enterprise.config.ts",
"gen-icons": "pnpm --filter @dify/iconify-collections generate && node ./scripts/gen-icons.mjs && eslint --fix app/components/base/icons/src/",
"i18n:check": "tsx ./scripts/check-i18n.js",
"knip": "knip",
@@ -156,11 +155,11 @@
"devDependencies": {
"@antfu/eslint-config": "catalog:",
"@chromatic-com/storybook": "catalog:",
+ "@dify/contracts": "workspace:*",
"@dify/iconify-collections": "workspace:*",
"@dify/tsconfig": "workspace:*",
"@egoist/tailwindcss-icons": "catalog:",
"@eslint-react/eslint-plugin": "catalog:",
- "@hey-api/openapi-ts": "catalog:",
"@hono/node-server": "catalog:",
"@iconify-json/heroicons": "catalog:",
"@iconify-json/ri": "catalog:",