mirror of
https://github.com/langgenius/dify.git
synced 2026-06-14 21:01:08 +08:00
Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Co-authored-by: Stephen Zhou <hi@hyoban.cc> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
143 lines
3.6 KiB
TypeScript
143 lines
3.6 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* BrandingModel
|
|
*/
|
|
export const zBrandingModel = z.object({
|
|
application_title: z.string().default(''),
|
|
enabled: z.boolean().default(false),
|
|
favicon: z.string().default(''),
|
|
login_page_logo: z.string().default(''),
|
|
workspace_logo: z.string().default(''),
|
|
})
|
|
|
|
/**
|
|
* PluginManagerModel
|
|
*/
|
|
export const zPluginManagerModel = z.object({
|
|
enabled: z.boolean().default(false),
|
|
})
|
|
|
|
/**
|
|
* LicenseStatus
|
|
*/
|
|
export const zLicenseStatus = z.enum(['active', 'expired', 'expiring', 'inactive', 'lost', 'none'])
|
|
|
|
/**
|
|
* LicenseLimitationModel
|
|
*
|
|
* - enabled: whether this limit is enforced
|
|
* - size: current usage count
|
|
* - limit: maximum allowed count; 0 means unlimited
|
|
*/
|
|
export const zLicenseLimitationModel = z.object({
|
|
enabled: z.boolean().default(false),
|
|
limit: z.int().default(0),
|
|
size: z.int().default(0),
|
|
})
|
|
|
|
/**
|
|
* LicenseModel
|
|
*/
|
|
export const zLicenseModel = z.object({
|
|
expired_at: z.string().default(''),
|
|
status: zLicenseStatus.default('none'),
|
|
workspaces: zLicenseLimitationModel.default({
|
|
enabled: false,
|
|
limit: 0,
|
|
size: 0,
|
|
}),
|
|
})
|
|
|
|
/**
|
|
* PluginInstallationScope
|
|
*/
|
|
export const zPluginInstallationScope = z.enum([
|
|
'all',
|
|
'none',
|
|
'official_and_specific_partners',
|
|
'official_only',
|
|
])
|
|
|
|
/**
|
|
* PluginInstallationPermissionModel
|
|
*/
|
|
export const zPluginInstallationPermissionModel = z.object({
|
|
plugin_installation_scope: zPluginInstallationScope.default('all'),
|
|
restrict_to_marketplace_only: z.boolean().default(false),
|
|
})
|
|
|
|
/**
|
|
* WebAppAuthSSOModel
|
|
*/
|
|
export const zWebAppAuthSsoModel = z.object({
|
|
protocol: z.string().default(''),
|
|
})
|
|
|
|
/**
|
|
* WebAppAuthModel
|
|
*/
|
|
export const zWebAppAuthModel = z.object({
|
|
allow_email_code_login: z.boolean().default(false),
|
|
allow_email_password_login: z.boolean().default(false),
|
|
allow_sso: z.boolean().default(false),
|
|
enabled: z.boolean().default(false),
|
|
sso_config: zWebAppAuthSsoModel.default({ protocol: '' }),
|
|
})
|
|
|
|
/**
|
|
* SystemFeatureModel
|
|
*/
|
|
export const zSystemFeatureModel = z.object({
|
|
branding: zBrandingModel.default({
|
|
application_title: '',
|
|
enabled: false,
|
|
favicon: '',
|
|
login_page_logo: '',
|
|
workspace_logo: '',
|
|
}),
|
|
enable_change_email: z.boolean().default(true),
|
|
enable_collaboration_mode: z.boolean().default(true),
|
|
enable_creators_platform: z.boolean().default(false),
|
|
enable_email_code_login: z.boolean().default(false),
|
|
enable_email_password_login: z.boolean().default(true),
|
|
enable_explore_banner: z.boolean().default(false),
|
|
enable_marketplace: z.boolean().default(false),
|
|
enable_social_oauth_login: z.boolean().default(false),
|
|
enable_trial_app: z.boolean().default(false),
|
|
is_allow_create_workspace: z.boolean().default(false),
|
|
is_allow_register: z.boolean().default(false),
|
|
is_email_setup: z.boolean().default(false),
|
|
license: zLicenseModel.default({
|
|
expired_at: '',
|
|
status: 'none',
|
|
workspaces: {
|
|
enabled: false,
|
|
limit: 0,
|
|
size: 0,
|
|
},
|
|
}),
|
|
max_plugin_package_size: z.int().default(15728640),
|
|
plugin_installation_permission: zPluginInstallationPermissionModel.default({
|
|
plugin_installation_scope: 'all',
|
|
restrict_to_marketplace_only: false,
|
|
}),
|
|
plugin_manager: zPluginManagerModel.default({ enabled: false }),
|
|
sso_enforced_for_signin: z.boolean().default(false),
|
|
sso_enforced_for_signin_protocol: z.string().default(''),
|
|
webapp_auth: zWebAppAuthModel.default({
|
|
allow_email_code_login: false,
|
|
allow_email_password_login: false,
|
|
allow_sso: false,
|
|
enabled: false,
|
|
sso_config: { protocol: '' },
|
|
}),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetSystemFeaturesResponse = zSystemFeatureModel
|