@useatlas/types
Advanced tools
+1
-1
| import type { AuthMode } from "./auth"; | ||
| export declare const CHAT_ERROR_CODES: readonly ["auth_error", "session_expired", "rate_limited", "conversation_budget_exceeded", "configuration_error", "no_datasource", "invalid_request", "provider_model_not_found", "provider_auth_error", "provider_rate_limit", "provider_timeout", "provider_unreachable", "provider_error", "internal_error", "validation_error", "not_found", "forbidden", "forbidden_role", "org_not_found", "plan_limit_exceeded", "trial_expired", "billing_check_failed", "workspace_check_failed", "workspace_suspended", "workspace_throttled", "workspace_deleted"]; | ||
| export declare const CHAT_ERROR_CODES: readonly ["auth_error", "session_expired", "rate_limited", "conversation_budget_exceeded", "configuration_error", "no_datasource", "invalid_request", "provider_model_not_found", "provider_auth_error", "provider_rate_limit", "provider_timeout", "provider_unreachable", "provider_error", "internal_error", "validation_error", "not_found", "forbidden", "forbidden_role", "org_not_found", "plan_limit_exceeded", "trial_expired", "subscription_required", "billing_check_failed", "workspace_check_failed", "workspace_suspended", "workspace_throttled", "workspace_deleted"]; | ||
| /** Union of all error codes the server can return in the `error` field. */ | ||
@@ -4,0 +4,0 @@ export type ChatErrorCode = (typeof CHAT_ERROR_CODES)[number]; |
+4
-0
@@ -24,2 +24,3 @@ // src/errors.ts | ||
| "trial_expired", | ||
| "subscription_required", | ||
| "billing_check_failed", | ||
@@ -55,2 +56,3 @@ "workspace_check_failed", | ||
| trial_expired: false, | ||
| subscription_required: false, | ||
| billing_check_failed: true, | ||
@@ -326,2 +328,4 @@ workspace_check_failed: true, | ||
| return { title: "Trial expired.", detail: serverMessage ?? "Upgrade to a paid plan to continue using Atlas.", code: rawCode, retryable, requestId }; | ||
| case "subscription_required": | ||
| return { title: "Subscription required.", detail: serverMessage ?? "Your subscription has ended. Resubscribe from the billing page to continue using Atlas.", code: rawCode, retryable, requestId }; | ||
| case "billing_check_failed": | ||
@@ -328,0 +332,0 @@ return { title: "Billing check failed.", detail: serverMessage ?? "Unable to verify billing status. Please try again.", code: rawCode, retryable, requestId }; |
+7
-1
@@ -146,2 +146,3 @@ // src/auth.ts | ||
| "trial_expired", | ||
| "subscription_required", | ||
| "billing_check_failed", | ||
@@ -177,2 +178,3 @@ "workspace_check_failed", | ||
| trial_expired: false, | ||
| subscription_required: false, | ||
| billing_check_failed: true, | ||
@@ -448,2 +450,4 @@ workspace_check_failed: true, | ||
| return { title: "Trial expired.", detail: serverMessage ?? "Upgrade to a paid plan to continue using Atlas.", code: rawCode, retryable, requestId }; | ||
| case "subscription_required": | ||
| return { title: "Subscription required.", detail: serverMessage ?? "Your subscription has ended. Resubscribe from the billing page to continue using Atlas.", code: rawCode, retryable, requestId }; | ||
| case "billing_check_failed": | ||
@@ -678,3 +682,4 @@ return { title: "Billing check failed.", detail: serverMessage ?? "Unable to verify billing status. Please try again.", code: rawCode, retryable, requestId }; | ||
| var WORKSPACE_STATUSES = ["active", "suspended", "deleted"]; | ||
| var PLAN_TIERS = ["free", "trial", "starter", "pro", "business"]; | ||
| var PLAN_TIERS = ["free", "trial", "starter", "pro", "business", "locked"]; | ||
| var MIN_PLAN_TIERS = ["free", "trial", "starter", "pro", "business"]; | ||
| var NOISY_NEIGHBOR_METRICS = ["queries", "tokens", "storage"]; | ||
@@ -851,2 +856,3 @@ // src/onboarding-email.ts | ||
| MODEL_CONFIG_PROVIDERS, | ||
| MIN_PLAN_TIERS, | ||
| MIGRATION_STATUSES, | ||
@@ -853,0 +859,0 @@ MIGRATION_PHASES, |
@@ -15,4 +15,6 @@ /** | ||
| export type WorkspaceStatus = (typeof WORKSPACE_STATUSES)[number]; | ||
| export declare const PLAN_TIERS: readonly ["free", "trial", "starter", "pro", "business"]; | ||
| export declare const PLAN_TIERS: readonly ["free", "trial", "starter", "pro", "business", "locked"]; | ||
| export type PlanTier = (typeof PLAN_TIERS)[number]; | ||
| export declare const MIN_PLAN_TIERS: readonly ["free", "trial", "starter", "pro", "business"]; | ||
| export type MinPlanTier = (typeof MIN_PLAN_TIERS)[number]; | ||
| export declare const NOISY_NEIGHBOR_METRICS: readonly ["queries", "tokens", "storage"]; | ||
@@ -19,0 +21,0 @@ export type NoisyNeighborMetric = (typeof NOISY_NEIGHBOR_METRICS)[number]; |
+1
-1
| { | ||
| "name": "@useatlas/types", | ||
| "version": "0.1.17", | ||
| "version": "0.1.18", | ||
| "description": "Shared types for the Atlas text-to-SQL agent", | ||
@@ -5,0 +5,0 @@ "type": "module", |
240925
0.37%5920
0.2%