mirror of
https://github.com/langgenius/dify.git
synced 2026-06-08 09:27:39 +08:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
118 lines
3.1 KiB
TypeScript
118 lines
3.1 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,
|
|
workspaces: zLicenseLimitationModel,
|
|
})
|
|
|
|
/**
|
|
* PluginInstallationScope
|
|
*/
|
|
export const zPluginInstallationScope = z.enum([
|
|
'all',
|
|
'none',
|
|
'official_and_specific_partners',
|
|
'official_only',
|
|
])
|
|
|
|
/**
|
|
* PluginInstallationPermissionModel
|
|
*/
|
|
export const zPluginInstallationPermissionModel = z.object({
|
|
plugin_installation_scope: zPluginInstallationScope,
|
|
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,
|
|
})
|
|
|
|
/**
|
|
* SystemFeatureModel
|
|
*/
|
|
export const zSystemFeatureModel = z.object({
|
|
app_dsl_version: z.string().default(''),
|
|
branding: zBrandingModel,
|
|
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,
|
|
max_plugin_package_size: z.int().default(15728640),
|
|
plugin_installation_permission: zPluginInstallationPermissionModel,
|
|
plugin_manager: zPluginManagerModel,
|
|
sso_enforced_for_signin: z.boolean().default(false),
|
|
sso_enforced_for_signin_protocol: z.string().default(''),
|
|
trial_models: z.array(z.string()).default([]),
|
|
webapp_auth: zWebAppAuthModel,
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetSystemFeaturesResponse = zSystemFeatureModel
|