mirror of
https://github.com/langgenius/dify.git
synced 2026-02-19 07:23:56 +00:00
Some checks failed
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Has been cancelled
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Has been cancelled
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Has been cancelled
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Has been cancelled
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Has been cancelled
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Has been cancelled
# Conflicts: # web/app/components/rag-pipeline/components/update-dsl-modal.tsx # web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts # web/app/components/workflow/variable-inspect/utils.tsx # web/app/layout.tsx # web/context/event-emitter.tsx # web/eslint-suppressions.json # web/next.config.ts # web/package.json # web/pnpm-lock.yaml # web/types/feature.ts
112 lines
2.7 KiB
TypeScript
112 lines
2.7 KiB
TypeScript
import type { ModelProviderQuotaGetPaid } from './model-provider'
|
|
|
|
export enum SSOProtocol {
|
|
SAML = 'saml',
|
|
OIDC = 'oidc',
|
|
OAuth2 = 'oauth2',
|
|
}
|
|
|
|
export enum LicenseStatus {
|
|
NONE = 'none',
|
|
INACTIVE = 'inactive',
|
|
ACTIVE = 'active',
|
|
EXPIRING = 'expiring',
|
|
EXPIRED = 'expired',
|
|
LOST = 'lost',
|
|
}
|
|
|
|
export enum InstallationScope {
|
|
ALL = 'all',
|
|
NONE = 'none',
|
|
OFFICIAL_ONLY = 'official_only',
|
|
OFFICIAL_AND_PARTNER = 'official_and_specific_partners',
|
|
}
|
|
|
|
type License = {
|
|
status: LicenseStatus
|
|
expired_at: string | null
|
|
}
|
|
|
|
export type SystemFeatures = {
|
|
trial_models: ModelProviderQuotaGetPaid[]
|
|
plugin_installation_permission: {
|
|
plugin_installation_scope: InstallationScope
|
|
restrict_to_marketplace_only: boolean
|
|
}
|
|
sso_enforced_for_signin: boolean
|
|
sso_enforced_for_signin_protocol: SSOProtocol | ''
|
|
sso_enforced_for_web: boolean
|
|
sso_enforced_for_web_protocol: SSOProtocol | ''
|
|
enable_marketplace: boolean
|
|
enable_change_email: boolean
|
|
enable_email_code_login: boolean
|
|
enable_email_password_login: boolean
|
|
enable_social_oauth_login: boolean
|
|
enable_collaboration_mode: boolean
|
|
is_allow_create_workspace: boolean
|
|
is_allow_register: boolean
|
|
is_email_setup: boolean
|
|
license: License
|
|
branding: {
|
|
enabled: boolean
|
|
login_page_logo: string
|
|
workspace_logo: string
|
|
favicon: string
|
|
application_title: string
|
|
}
|
|
webapp_auth: {
|
|
enabled: boolean
|
|
allow_sso: boolean
|
|
sso_config: {
|
|
protocol: SSOProtocol | ''
|
|
}
|
|
allow_email_code_login: boolean
|
|
allow_email_password_login: boolean
|
|
}
|
|
enable_trial_app: boolean
|
|
enable_explore_banner: boolean
|
|
}
|
|
|
|
export const defaultSystemFeatures: SystemFeatures = {
|
|
trial_models: [],
|
|
plugin_installation_permission: {
|
|
plugin_installation_scope: InstallationScope.ALL,
|
|
restrict_to_marketplace_only: false,
|
|
},
|
|
sso_enforced_for_signin: false,
|
|
sso_enforced_for_signin_protocol: '',
|
|
sso_enforced_for_web: false,
|
|
sso_enforced_for_web_protocol: '',
|
|
enable_marketplace: false,
|
|
enable_change_email: false,
|
|
enable_email_code_login: false,
|
|
enable_email_password_login: false,
|
|
enable_social_oauth_login: false,
|
|
enable_collaboration_mode: false,
|
|
is_allow_create_workspace: false,
|
|
is_allow_register: false,
|
|
is_email_setup: false,
|
|
license: {
|
|
status: LicenseStatus.NONE,
|
|
expired_at: '',
|
|
},
|
|
branding: {
|
|
enabled: false,
|
|
login_page_logo: '',
|
|
workspace_logo: '',
|
|
favicon: '',
|
|
application_title: 'test title',
|
|
},
|
|
webapp_auth: {
|
|
enabled: false,
|
|
allow_sso: false,
|
|
sso_config: {
|
|
protocol: '',
|
|
},
|
|
allow_email_code_login: false,
|
|
allow_email_password_login: false,
|
|
},
|
|
enable_trial_app: false,
|
|
enable_explore_banner: false,
|
|
}
|