// This file is auto-generated by @hey-api/openapi-ts

export type ClientOptions = {
  baseUrl: `${string}://${string}/console/api` | (string & {})
}

export type SystemFeatureModel = {
  branding: BrandingModel
  deployment_edition: DeploymentEdition
  enable_app_deploy: boolean
  enable_change_email: boolean
  enable_collaboration_mode: boolean
  enable_creators_platform: boolean
  enable_email_code_login: boolean
  enable_email_password_login: boolean
  enable_explore_banner: boolean
  enable_learn_app: boolean
  enable_marketplace: boolean
  enable_social_oauth_login: boolean
  enable_step_by_step_tour: boolean
  is_allow_register: boolean
  is_email_setup: boolean
  knowledge_fs_enabled: boolean
  license: LicenseStatusModel
  plugin_installation_permission: PluginInstallationPermissionModel
  rbac_enabled: boolean
  sso_enforced_for_signin: boolean
  sso_enforced_for_signin_protocol: string
  webapp_auth: WebAppAuthModel
}

export type LicenseModel = {
  expired_at: string
  seats: LicenseLimitationModel
  status: LicenseStatus
  workspaces: LicenseLimitationModel
}

export type BrandingModel = {
  application_title: string
  enabled: boolean
  favicon: string
  login_page_logo: string
  workspace_logo: string
}

export type DeploymentEdition = 'CLOUD' | 'COMMUNITY' | 'ENTERPRISE'

export type LicenseStatusModel = {
  status: LicenseStatus
}

export type PluginInstallationPermissionModel = {
  plugin_installation_scope: PluginInstallationScope
  restrict_to_marketplace_only: boolean
}

export type WebAppAuthModel = {
  allow_email_code_login: boolean
  allow_email_password_login: boolean
  allow_public_access: boolean
  allow_sso: boolean
  enabled: boolean
  sso_config: WebAppAuthSsoModel
}

export type LicenseLimitationModel = {
  enabled: boolean
  limit: number
  size: number
}

export type LicenseStatus = 'active' | 'expired' | 'expiring' | 'inactive' | 'lost' | 'none'

export type PluginInstallationScope =
  | 'all'
  | 'none'
  | 'official_and_specific_partners'
  | 'official_only'

export type WebAppAuthSsoModel = {
  protocol: string
}

export type GetSystemFeaturesData = {
  body?: never
  path?: never
  query?: never
  url: '/system-features'
}

export type GetSystemFeaturesResponses = {
  200: SystemFeatureModel
}

export type GetSystemFeaturesResponse = GetSystemFeaturesResponses[keyof GetSystemFeaturesResponses]

export type GetSystemFeaturesLicenseData = {
  body?: never
  path?: never
  query?: never
  url: '/system-features/license'
}

export type GetSystemFeaturesLicenseResponses = {
  200: LicenseModel
}

export type GetSystemFeaturesLicenseResponse =
  GetSystemFeaturesLicenseResponses[keyof GetSystemFeaturesLicenseResponses]
