mirror of
https://github.com/langgenius/dify.git
synced 2026-06-26 23:01:11 +08:00
fix(api): site dto
This commit is contained in:
parent
71df1572b7
commit
01c138e7a9
@ -331,7 +331,7 @@ class ModelConfig(ResponseModel):
|
||||
return to_timestamp(value)
|
||||
|
||||
|
||||
class Site(ResponseModel):
|
||||
class AppDetailSiteResponse(ResponseModel):
|
||||
access_token: str | None = Field(default=None, validation_alias="code")
|
||||
code: str | None = None
|
||||
title: str | None = None
|
||||
@ -461,7 +461,7 @@ class AppDetailWithSite(AppDetail):
|
||||
api_base_url: str | None = None
|
||||
max_active_requests: int | None = None
|
||||
deleted_tools: list[DeletedTool] = Field(default_factory=list)
|
||||
site: Site | None = None
|
||||
site: AppDetailSiteResponse | None = None
|
||||
# For Agent App type: the roster Agent backing this app (None otherwise).
|
||||
bound_agent_id: str | None = None
|
||||
# For Agent App responses exposed through /agent.
|
||||
@ -546,7 +546,7 @@ register_schema_models(
|
||||
WorkflowPartial,
|
||||
ModelConfigPartial,
|
||||
ModelConfig,
|
||||
Site,
|
||||
AppDetailSiteResponse,
|
||||
DeletedTool,
|
||||
AppDetail,
|
||||
AppExportResponse,
|
||||
|
||||
@ -46,7 +46,7 @@ export type AgentAppDetailWithSite = {
|
||||
name: string
|
||||
permission_keys?: Array<string>
|
||||
role?: string | null
|
||||
site?: Site | null
|
||||
site?: AppDetailSiteResponse | null
|
||||
tags?: Array<Tag>
|
||||
tracing?: JsonValue | null
|
||||
updated_at?: number | null
|
||||
@ -413,21 +413,31 @@ export type ModelConfig = {
|
||||
provider: string
|
||||
}
|
||||
|
||||
export type Site = {
|
||||
export type AppDetailSiteResponse = {
|
||||
access_token?: string | null
|
||||
app_base_url?: string | null
|
||||
chat_color_theme?: string | null
|
||||
chat_color_theme_inverted: boolean
|
||||
chat_color_theme_inverted?: boolean | null
|
||||
code?: string | null
|
||||
copyright?: string | null
|
||||
created_at?: number | null
|
||||
created_by?: string | null
|
||||
custom_disclaimer?: string | null
|
||||
default_language: string
|
||||
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?: string | null
|
||||
icon_type?: string | IconType | null
|
||||
readonly icon_url: string | null
|
||||
privacy_policy?: string | null
|
||||
show_workflow_steps: boolean
|
||||
title: string
|
||||
use_icon_as_answer_icon: boolean
|
||||
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 Tag = {
|
||||
@ -1603,7 +1613,7 @@ export type AgentAppDetailWithSiteWritable = {
|
||||
name: string
|
||||
permission_keys?: Array<string>
|
||||
role?: string | null
|
||||
site?: SiteWritable | null
|
||||
site?: AppDetailSiteResponseWritable | null
|
||||
tags?: Array<Tag>
|
||||
tracing?: JsonValue | null
|
||||
updated_at?: number | null
|
||||
@ -1645,20 +1655,30 @@ export type AgentAppPartialWritable = {
|
||||
workflow?: WorkflowPartial | null
|
||||
}
|
||||
|
||||
export type SiteWritable = {
|
||||
export type AppDetailSiteResponseWritable = {
|
||||
access_token?: string | null
|
||||
app_base_url?: string | null
|
||||
chat_color_theme?: string | null
|
||||
chat_color_theme_inverted: boolean
|
||||
chat_color_theme_inverted?: boolean | null
|
||||
code?: string | null
|
||||
copyright?: string | null
|
||||
created_at?: number | null
|
||||
created_by?: string | null
|
||||
custom_disclaimer?: string | null
|
||||
default_language: string
|
||||
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?: string | null
|
||||
icon_type?: string | IconType | null
|
||||
privacy_policy?: string | null
|
||||
show_workflow_steps: boolean
|
||||
title: string
|
||||
use_icon_as_answer_icon: boolean
|
||||
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 GetAgentData = {
|
||||
|
||||
@ -190,23 +190,33 @@ export const zDeletedTool = z.object({
|
||||
})
|
||||
|
||||
/**
|
||||
* Site
|
||||
* AppDetailSiteResponse
|
||||
*/
|
||||
export const zSite = z.object({
|
||||
export const zAppDetailSiteResponse = z.object({
|
||||
access_token: z.string().nullish(),
|
||||
app_base_url: z.string().nullish(),
|
||||
chat_color_theme: z.string().nullish(),
|
||||
chat_color_theme_inverted: z.boolean(),
|
||||
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(),
|
||||
default_language: z.string(),
|
||||
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.string().nullish(),
|
||||
icon_type: z.union([z.string(), zIconType]).nullish(),
|
||||
icon_url: z.string().nullable(),
|
||||
privacy_policy: z.string().nullish(),
|
||||
show_workflow_steps: z.boolean(),
|
||||
title: z.string(),
|
||||
use_icon_as_answer_icon: z.boolean(),
|
||||
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(),
|
||||
})
|
||||
|
||||
/**
|
||||
@ -818,7 +828,7 @@ export const zAgentAppDetailWithSite = z.object({
|
||||
name: z.string(),
|
||||
permission_keys: z.array(z.string()).optional(),
|
||||
role: z.string().nullish(),
|
||||
site: zSite.nullish(),
|
||||
site: zAppDetailSiteResponse.nullish(),
|
||||
tags: z.array(zTag).optional(),
|
||||
tracing: zJsonValue.nullish(),
|
||||
updated_at: z.int().nullish(),
|
||||
@ -2269,22 +2279,32 @@ export const zAgentAppPaginationWritable = z.object({
|
||||
})
|
||||
|
||||
/**
|
||||
* Site
|
||||
* AppDetailSiteResponse
|
||||
*/
|
||||
export const zSiteWritable = z.object({
|
||||
export const zAppDetailSiteResponseWritable = z.object({
|
||||
access_token: z.string().nullish(),
|
||||
app_base_url: z.string().nullish(),
|
||||
chat_color_theme: z.string().nullish(),
|
||||
chat_color_theme_inverted: z.boolean(),
|
||||
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(),
|
||||
default_language: z.string(),
|
||||
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.string().nullish(),
|
||||
icon_type: z.union([z.string(), zIconType]).nullish(),
|
||||
privacy_policy: z.string().nullish(),
|
||||
show_workflow_steps: z.boolean(),
|
||||
title: z.string(),
|
||||
use_icon_as_answer_icon: z.boolean(),
|
||||
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(),
|
||||
})
|
||||
|
||||
/**
|
||||
@ -2314,7 +2334,7 @@ export const zAgentAppDetailWithSiteWritable = z.object({
|
||||
name: z.string(),
|
||||
permission_keys: z.array(z.string()).optional(),
|
||||
role: z.string().nullish(),
|
||||
site: zSiteWritable.nullish(),
|
||||
site: zAppDetailSiteResponseWritable.nullish(),
|
||||
tags: z.array(zTag).optional(),
|
||||
tracing: zJsonValue.nullish(),
|
||||
updated_at: z.int().nullish(),
|
||||
|
||||
@ -43,7 +43,7 @@ export type AppDetailWithSite = {
|
||||
model_config?: ModelConfig | null
|
||||
name: string
|
||||
permission_keys?: Array<string>
|
||||
site?: Site | null
|
||||
site?: AppDetailSiteResponse | null
|
||||
tags?: Array<Tag>
|
||||
tracing?: JsonValue | null
|
||||
updated_at?: number | null
|
||||
@ -1231,21 +1231,31 @@ export type ModelConfig = {
|
||||
provider: string
|
||||
}
|
||||
|
||||
export type Site = {
|
||||
export type AppDetailSiteResponse = {
|
||||
access_token?: string | null
|
||||
app_base_url?: string | null
|
||||
chat_color_theme?: string | null
|
||||
chat_color_theme_inverted: boolean
|
||||
chat_color_theme_inverted?: boolean | null
|
||||
code?: string | null
|
||||
copyright?: string | null
|
||||
created_at?: number | null
|
||||
created_by?: string | null
|
||||
custom_disclaimer?: string | null
|
||||
default_language: string
|
||||
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?: string | null
|
||||
icon_type?: string | IconType | null
|
||||
readonly icon_url: string | null
|
||||
privacy_policy?: string | null
|
||||
show_workflow_steps: boolean
|
||||
title: string
|
||||
use_icon_as_answer_icon: boolean
|
||||
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 Tag = {
|
||||
@ -2716,7 +2726,7 @@ export type AppDetailWithSiteWritable = {
|
||||
model_config?: ModelConfig | null
|
||||
name: string
|
||||
permission_keys?: Array<string>
|
||||
site?: SiteWritable | null
|
||||
site?: AppDetailSiteResponseWritable | null
|
||||
tags?: Array<Tag>
|
||||
tracing?: JsonValue | null
|
||||
updated_at?: number | null
|
||||
@ -2776,20 +2786,30 @@ export type AppPartialWritable = {
|
||||
workflow?: WorkflowPartial | null
|
||||
}
|
||||
|
||||
export type SiteWritable = {
|
||||
export type AppDetailSiteResponseWritable = {
|
||||
access_token?: string | null
|
||||
app_base_url?: string | null
|
||||
chat_color_theme?: string | null
|
||||
chat_color_theme_inverted: boolean
|
||||
chat_color_theme_inverted?: boolean | null
|
||||
code?: string | null
|
||||
copyright?: string | null
|
||||
created_at?: number | null
|
||||
created_by?: string | null
|
||||
custom_disclaimer?: string | null
|
||||
default_language: string
|
||||
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?: string | null
|
||||
icon_type?: string | IconType | null
|
||||
privacy_policy?: string | null
|
||||
show_workflow_steps: boolean
|
||||
title: string
|
||||
use_icon_as_answer_icon: boolean
|
||||
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 WorkflowCommentBasicWritable = {
|
||||
|
||||
@ -845,23 +845,33 @@ export const zDeletedTool = z.object({
|
||||
})
|
||||
|
||||
/**
|
||||
* Site
|
||||
* AppDetailSiteResponse
|
||||
*/
|
||||
export const zSite = z.object({
|
||||
export const zAppDetailSiteResponse = z.object({
|
||||
access_token: z.string().nullish(),
|
||||
app_base_url: z.string().nullish(),
|
||||
chat_color_theme: z.string().nullish(),
|
||||
chat_color_theme_inverted: z.boolean(),
|
||||
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(),
|
||||
default_language: z.string(),
|
||||
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.string().nullish(),
|
||||
icon_type: z.union([z.string(), zIconType]).nullish(),
|
||||
icon_url: z.string().nullable(),
|
||||
privacy_policy: z.string().nullish(),
|
||||
show_workflow_steps: z.boolean(),
|
||||
title: z.string(),
|
||||
use_icon_as_answer_icon: z.boolean(),
|
||||
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(),
|
||||
})
|
||||
|
||||
/**
|
||||
@ -2098,7 +2108,7 @@ export const zAppDetailWithSite = z.object({
|
||||
model_config: zModelConfig.nullish(),
|
||||
name: z.string(),
|
||||
permission_keys: z.array(z.string()).optional(),
|
||||
site: zSite.nullish(),
|
||||
site: zAppDetailSiteResponse.nullish(),
|
||||
tags: z.array(zTag).optional(),
|
||||
tracing: zJsonValue.nullish(),
|
||||
updated_at: z.int().nullish(),
|
||||
@ -3689,22 +3699,32 @@ export const zAppPaginationWritable = z.object({
|
||||
})
|
||||
|
||||
/**
|
||||
* Site
|
||||
* AppDetailSiteResponse
|
||||
*/
|
||||
export const zSiteWritable = z.object({
|
||||
export const zAppDetailSiteResponseWritable = z.object({
|
||||
access_token: z.string().nullish(),
|
||||
app_base_url: z.string().nullish(),
|
||||
chat_color_theme: z.string().nullish(),
|
||||
chat_color_theme_inverted: z.boolean(),
|
||||
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(),
|
||||
default_language: z.string(),
|
||||
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.string().nullish(),
|
||||
icon_type: z.union([z.string(), zIconType]).nullish(),
|
||||
privacy_policy: z.string().nullish(),
|
||||
show_workflow_steps: z.boolean(),
|
||||
title: z.string(),
|
||||
use_icon_as_answer_icon: z.boolean(),
|
||||
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(),
|
||||
})
|
||||
|
||||
/**
|
||||
@ -3731,7 +3751,7 @@ export const zAppDetailWithSiteWritable = z.object({
|
||||
model_config: zModelConfig.nullish(),
|
||||
name: z.string(),
|
||||
permission_keys: z.array(z.string()).optional(),
|
||||
site: zSiteWritable.nullish(),
|
||||
site: zAppDetailSiteResponseWritable.nullish(),
|
||||
tags: z.array(zTag).optional(),
|
||||
tracing: zJsonValue.nullish(),
|
||||
updated_at: z.int().nullish(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user