This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// The statuses a knowledge document moves through. `unavailable` and `disabled` are not rows: they
|
||||
// are the module's and the service's answers, and the UI maps all eight states from what a page
|
||||
// reads (the module flag, the service readiness, the document row).
|
||||
|
||||
export const DOCUMENT_STATUSES = ["queued", "indexing", "indexed", "failed", "cancelled"] as const
|
||||
export type DocumentStatus = (typeof DOCUMENT_STATUSES)[number]
|
||||
|
||||
/** The search backend a deployment binds: the local vector adapters, or the managed service. */
|
||||
export const KNOWLEDGE_BACKENDS = ["vectors", "platform"] as const
|
||||
export type KnowledgeBackend = (typeof KNOWLEDGE_BACKENDS)[number]
|
||||
|
||||
/** The readiness states the search port answers (the managed toolset's readiness + unavailable). */
|
||||
export const SERVICE_STATES = ["registered", "indexing", "ready", "degraded", "disabled", "unavailable"] as const
|
||||
export type ServiceState = (typeof SERVICE_STATES)[number]
|
||||
|
||||
/** The enablement flow's typed refusal reasons, surfaced in the UI as states. */
|
||||
export const ENABLEMENT_REASONS = ["plan_required", "feature_disabled", "quota_exhausted"] as const
|
||||
export type EnablementReason = (typeof ENABLEMENT_REASONS)[number]
|
||||
|
||||
/** The indexing failure codes a document row records. */
|
||||
export const INDEX_FAILURES = ["not_indexable", "too_large", "not_text", "vector_store_unavailable"] as const
|
||||
export type IndexFailure = (typeof INDEX_FAILURES)[number]
|
||||
Reference in New Issue
Block a user