@useatlas/types
Advanced tools
+8
-0
@@ -626,2 +626,9 @@ // src/auth.ts | ||
| var GATEWAY_MODEL_TYPES = ["language", "embedding", "image", "video", "reranking"]; | ||
| var BYOT_CATALOG_REFRESH_SKIP_REASONS = [ | ||
| "in_backoff", | ||
| "ee_unavailable", | ||
| "missing_byot_key", | ||
| "decrypt_failed", | ||
| "malformed_bedrock_bundle" | ||
| ]; | ||
| // src/approval.ts | ||
@@ -828,2 +835,3 @@ var APPROVAL_RULE_TYPES = ["table", "column", "cost"]; | ||
| BYOT_REQUIRED_PROVIDERS, | ||
| BYOT_CATALOG_REFRESH_SKIP_REASONS, | ||
| BEDROCK_REGIONS, | ||
@@ -830,0 +838,0 @@ BACKUP_STATUSES, |
+37
-0
@@ -27,2 +27,33 @@ /** | ||
| /** | ||
| * Per-surface "when was the most recent draft edited" metadata, surfaced | ||
| * in the pending-changes pill popover (#2177). ISO-8601 timestamps so the | ||
| * frontend can render a relative time (e.g. "5 minutes ago") without | ||
| * parsing pg date strings. | ||
| * | ||
| * Keys map 1:1 to {@link ModeDraftCounts}. A null `lastEditedAt` means no | ||
| * draft rows for that surface (or — for the legacy `entityEdits` / | ||
| * `entityDeletes` slices that share the `semantic_entities` table — no | ||
| * draft of that specific shape). | ||
| */ | ||
| export interface ModeDraftActivity { | ||
| readonly connections: { | ||
| readonly lastEditedAt: string | null; | ||
| }; | ||
| readonly entities: { | ||
| readonly lastEditedAt: string | null; | ||
| }; | ||
| readonly entityEdits: { | ||
| readonly lastEditedAt: string | null; | ||
| }; | ||
| readonly entityDeletes: { | ||
| readonly lastEditedAt: string | null; | ||
| }; | ||
| readonly prompts: { | ||
| readonly lastEditedAt: string | null; | ||
| }; | ||
| readonly starterPrompts: { | ||
| readonly lastEditedAt: string | null; | ||
| }; | ||
| } | ||
| /** | ||
| * Effective mode state for the current user/org. | ||
@@ -43,2 +74,8 @@ * | ||
| readonly draftCounts: ModeDraftCounts | null; | ||
| /** | ||
| * Per-surface activity timestamps, populated when `hasDrafts` is true. | ||
| * Null when there are no drafts. The pending-changes pill popover | ||
| * renders these as relative times (e.g. "5 minutes ago"). | ||
| */ | ||
| readonly draftActivity: ModeDraftActivity | null; | ||
| } |
@@ -41,3 +41,3 @@ /** | ||
| * Bedrock-specific credential bundle. Stored as JSON in `api_key_encrypted` | ||
| * after `encryptUrl`; the helper round-trips a string, so callers stringify | ||
| * after `encryptSecret`; the helper round-trips a string, so callers stringify | ||
| * before encrypt and parse after decrypt. | ||
@@ -201,1 +201,50 @@ */ | ||
| } | ||
| /** | ||
| * Reasons the daily BYOT catalog refresh skipped a workspace without | ||
| * contacting the upstream provider. Pinned as a single literal tuple so the | ||
| * API audit metadata, admin route response, and UI rendering stay in lockstep. | ||
| * | ||
| * Skip categories: | ||
| * - `in_backoff` — workspace recently failed; sitting out its backoff window | ||
| * (deliberate suppression, audit `status: success`) | ||
| * - `ee_unavailable` — install is self-hosted without `@atlas/ee` | ||
| * (deliberate, audit `status: success`) | ||
| * - `missing_byot_key` — workspace's config no longer carries a BYOT key | ||
| * for this provider (e.g. mid-rotation; audit `status: success`) | ||
| * - `decrypt_failed` — the stored ciphertext could not be decrypted | ||
| * (admin must re-enter key, audit `status: failure`) | ||
| * - `malformed_bedrock_bundle` — bedrock cred JSON parsed as null | ||
| * (admin must re-enter creds, audit `status: failure`) | ||
| */ | ||
| export declare const BYOT_CATALOG_REFRESH_SKIP_REASONS: readonly ["in_backoff", "ee_unavailable", "missing_byot_key", "decrypt_failed", "malformed_bedrock_bundle"]; | ||
| export type ByotCatalogRefreshSkipReason = (typeof BYOT_CATALOG_REFRESH_SKIP_REASONS)[number]; | ||
| /** | ||
| * Cycle-level outcome of one BYOT catalog refresh tick. | ||
| * | ||
| * `status: "failure"` means the tick failed before producing accurate per-row | ||
| * counts (e.g. the stale-row query itself threw). Per-bucket numbers are zero | ||
| * in that case and `error` carries the message; the admin manual trigger | ||
| * surfaces this as HTTP 500. | ||
| * | ||
| * `status: "success"` is the normal path — every dispatched row settled into | ||
| * one of the buckets below, including a cycle where every row failed | ||
| * individually (which still produces an accurate audit trail). | ||
| * | ||
| * Invariant (success path): | ||
| * refreshed + failed + skippedDecryptFailed + skippedInBackoff | ||
| * + skippedMissingKey + skippedEeUnavailable + skippedMalformedBundle | ||
| * === inspected | ||
| */ | ||
| export interface ByotRefreshCycleResult { | ||
| status: "success" | "failure"; | ||
| inspected: number; | ||
| refreshed: number; | ||
| failed: number; | ||
| skippedDecryptFailed: number; | ||
| skippedInBackoff: number; | ||
| skippedMissingKey: number; | ||
| skippedEeUnavailable: number; | ||
| skippedMalformedBundle: number; | ||
| /** Present only when `status === "failure"`. */ | ||
| error?: string; | ||
| } |
+1
-1
| { | ||
| "name": "@useatlas/types", | ||
| "version": "0.0.25", | ||
| "version": "0.0.26", | ||
| "description": "Shared types for the Atlas text-to-SQL agent", | ||
@@ -5,0 +5,0 @@ "type": "module", |
178967
2.17%4593
2.09%