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

import * as z from 'zod'

/**
 * LimitationModel
 */
export const zLimitationModel = z.object({
  limit: z.int().default(0),
  size: z.int().default(0),
})

/**
 * Quota
 */
export const zQuota = z.object({
  limit: z.int().default(0),
  reset_date: z.int().default(-1),
  usage: z.int().default(0),
})

/**
 * EducationModel
 */
export const zEducationModel = z.object({
  activated: z.boolean().default(false),
  enabled: z.boolean().default(false),
})

/**
 * KnowledgePipeline
 */
export const zKnowledgePipeline = z.object({
  publish_enabled: z.boolean().default(false),
})

/**
 * 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),
})

/**
 * SubscriptionModel
 */
export const zSubscriptionModel = z.object({
  interval: z.string().default(''),
  plan: z.string().default('sandbox'),
})

/**
 * BillingModel
 */
export const zBillingModel = z.object({
  enabled: z.boolean().default(false),
  subscription: zSubscriptionModel,
})

/**
 * FeatureModel
 */
export const zFeatureModel = z.object({
  annotation_quota_limit: zLimitationModel,
  api_rate_limit: zQuota,
  apps: zLimitationModel,
  billing: zBillingModel,
  can_replace_logo: z.boolean().default(false),
  dataset_operator_enabled: z.boolean().default(false),
  docs_processing: z.string().default('standard'),
  documents_upload_quota: zLimitationModel,
  education: zEducationModel,
  human_input_email_delivery_enabled: z.boolean().default(false),
  is_allow_transfer_workspace: z.boolean().default(true),
  knowledge_pipeline: zKnowledgePipeline,
  knowledge_rate_limit: z.int().default(10),
  members: zLimitationModel,
  model_load_balancing_enabled: z.boolean().default(false),
  next_credit_reset_date: z.int().default(0),
  trigger_event: zQuota,
  vector_space: zLimitationModel,
  webapp_copyright_enabled: z.boolean().default(false),
  workspace_members: zLicenseLimitationModel,
})

/**
 * Success
 */
export const zGetFeaturesResponse = zFeatureModel

/**
 * Success
 */
export const zGetFeaturesVectorSpaceResponse = zLimitationModel
