@sparkvault/sdk-js 15.6.0 → 15.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/errors.d.ts CHANGED
@@ -21,7 +21,7 @@ export declare class SparkVaultError extends Error {
21
21
  * answer named none (a gateway's HTML). A typed refusal's `code` names its
22
22
  * class of failure: one per 400 (`validation_error`), two per 401
23
23
  * (`authentication_error`, `UNAUTHORIZED`), 402 (`PLAN_REQUIRED`,
24
- * `QUOTA_EXCEEDED`) and 403 (`authorization_error`, `NOTIFY_SUBSCRIPTION_REQUIRED`;
24
+ * `QUOTA_EXCEEDED`, `USAGE_CREDITS_EXHAUSTED`) and 403 (`authorization_error`, `NOTIFY_SUBSCRIPTION_REQUIRED`;
25
25
  * http.ts createErrorFromResponse), so this is what tells apart two
26
26
  * refusals that share a code.
27
27
  * Undefined on an error the SDK raised itself, on the Identity product's
@@ -66,6 +66,17 @@ export type QuotaResource = 'storage' | 'bandwidth';
66
66
  export declare class PlanRequiredError extends SparkVaultError {
67
67
  constructor(message: string, details?: Record<string, unknown>, retryAfterMs?: number | null, serviceCode?: string);
68
68
  }
69
+ /**
70
+ * Prepaid usage is exhausted (402 USAGE_CREDITS_EXHAUSTED). The subscription
71
+ * can still be active: an admin replenishes the shared usage-credit wallet.
72
+ */
73
+ export declare class UsageCreditsExhaustedError extends SparkVaultError {
74
+ constructor(message: string, details?: Record<string, unknown>, retryAfterMs?: number | null, serviceCode?: string);
75
+ }
76
+ /** A payment reversal requires billing review; buying more credits cannot clear it. */
77
+ export declare class UsageCreditFundingReviewError extends SparkVaultError {
78
+ constructor(message: string, details?: Record<string, unknown>, retryAfterMs?: number | null, serviceCode?: string);
79
+ }
69
80
  /**
70
81
  * Quota exceeded gate (402 QUOTA_EXCEEDED) — a pooled-capacity limit is
71
82
  * exhausted. `resource` identifies which pool so callers can point the CTA at