@useatlas/types
Advanced tools
| /** | ||
| * Per-user preference types shared across API, frontend, and SDK. | ||
| * | ||
| * `DEFAULT_LANDINGS` is the single source of truth for the legal value set — | ||
| * the DB CHECK constraint, the Zod enum on the API, and the narrowing guards | ||
| * on the web all reference this tuple so a future addition (`notebook`, | ||
| * `reports`, ...) lands in one place instead of three. | ||
| */ | ||
| export declare const DEFAULT_LANDINGS: readonly ["chat", "admin"]; | ||
| export type DefaultLanding = (typeof DEFAULT_LANDINGS)[number]; | ||
| export declare function isDefaultLanding(value: unknown): value is DefaultLanding; | ||
| export interface UserPreferences { | ||
| defaultLanding: DefaultLanding; | ||
| } |
| // src/preferences.ts | ||
| var DEFAULT_LANDINGS = ["chat", "admin"]; | ||
| function isDefaultLanding(value) { | ||
| return typeof value === "string" && DEFAULT_LANDINGS.includes(value); | ||
| } | ||
| export { | ||
| isDefaultLanding, | ||
| DEFAULT_LANDINGS | ||
| }; |
+1
-0
@@ -37,1 +37,2 @@ export * from "./auth"; | ||
| export * from "./security"; | ||
| export * from "./preferences"; |
+8
-0
@@ -524,2 +524,8 @@ // src/auth.ts | ||
| } | ||
| // src/preferences.ts | ||
| var DEFAULT_LANDINGS = ["chat", "admin"]; | ||
| function isDefaultLanding(value) { | ||
| return typeof value === "string" && DEFAULT_LANDINGS.includes(value); | ||
| } | ||
| // src/compliance.ts | ||
@@ -756,2 +762,3 @@ var PII_CATEGORIES = [ | ||
| isDeprecatedConfig, | ||
| isDefaultLanding, | ||
| isChatErrorCode, | ||
@@ -810,2 +817,3 @@ isChatContextWarningCode, | ||
| DELIVERY_CHANNELS, | ||
| DEFAULT_LANDINGS, | ||
| DB_TYPES, | ||
@@ -812,0 +820,0 @@ CONNECTION_STATUSES, |
+7
-2
| { | ||
| "name": "@useatlas/types", | ||
| "version": "0.0.24", | ||
| "version": "0.0.25", | ||
| "description": "Shared types for the Atlas text-to-SQL agent", | ||
| "type": "module", | ||
| "scripts": { | ||
| "build": "rm -rf dist && bun build src/index.ts src/auth.ts src/conversation.ts src/connection.ts src/action.ts src/scheduled-task.ts src/errors.ts src/semantic.ts src/share.ts src/billing.ts src/dashboard.ts src/mode.ts src/starter-prompt.ts src/integrations.ts src/email-provider.ts src/mcp.ts --outdir dist --root src --target node --packages external && bun x tsc -p tsconfig.build.json", | ||
| "build": "rm -rf dist && bun build src/index.ts src/auth.ts src/conversation.ts src/connection.ts src/action.ts src/scheduled-task.ts src/errors.ts src/semantic.ts src/share.ts src/billing.ts src/dashboard.ts src/mode.ts src/starter-prompt.ts src/integrations.ts src/email-provider.ts src/mcp.ts src/preferences.ts --outdir dist --root src --target node --packages external && bun x tsc -p tsconfig.build.json", | ||
| "prepare": "bun run build" | ||
@@ -90,2 +90,7 @@ }, | ||
| "default": "./dist/mcp.js" | ||
| }, | ||
| "./preferences": { | ||
| "types": "./dist/preferences.d.ts", | ||
| "import": "./dist/preferences.js", | ||
| "default": "./dist/preferences.js" | ||
| } | ||
@@ -92,0 +97,0 @@ }, |
175158
0.74%58
3.57%4499
0.69%