@sparkvault/sdk-js 8.11.1 → 8.11.2

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
@@ -17,11 +17,11 @@ export declare class ValidationError extends SparkVaultError {
17
17
  constructor(message: string, details?: Record<string, unknown>);
18
18
  }
19
19
  /**
20
- * The pooled-capacity resource a quota gate refers to.
21
- * Storage and bandwidth gates surface low-capacity nudges and CTAs; seats and
22
- * identity gate issuance (invites, DVAKs).
20
+ * The pooled-capacity resource a quota gate refers to. Only the byte pools
21
+ * hard-gate: flex licensing has no seat limit (inviting and licensing are
22
+ * never quota-gated), and Identity soft-gates through its own path.
23
23
  */
24
- export type QuotaResource = 'storage' | 'bandwidth' | 'seats' | 'identity';
24
+ export type QuotaResource = 'storage' | 'bandwidth';
25
25
  /**
26
26
  * Plan required gate (402 PLAN_REQUIRED) — the account has no active
27
27
  * subscription and attempted a billable/create action. Surface a subscribe CTA
@@ -31,9 +31,9 @@ export declare class PlanRequiredError extends SparkVaultError {
31
31
  constructor(message: string, details?: Record<string, unknown>);
32
32
  }
33
33
  /**
34
- * Quota exceeded gate (402 QUOTA_EXCEEDED) — a pooled-capacity or seat limit is
35
- * exhausted. `resource` identifies which pool so callers can branch on the CTA
36
- * (add a capacity block for storage/bandwidth, free a seat for seats).
34
+ * Quota exceeded gate (402 QUOTA_EXCEEDED) — a pooled-capacity limit is
35
+ * exhausted. `resource` identifies which pool so callers can point the CTA at
36
+ * the right capacity block.
37
37
  */
38
38
  export declare class QuotaExceededError extends SparkVaultError {
39
39
  readonly resource?: QuotaResource;
package/dist/index.d.ts CHANGED
@@ -263,11 +263,11 @@ declare class ValidationError extends SparkVaultError {
263
263
  constructor(message: string, details?: Record<string, unknown>);
264
264
  }
265
265
  /**
266
- * The pooled-capacity resource a quota gate refers to.
267
- * Storage and bandwidth gates surface low-capacity nudges and CTAs; seats and
268
- * identity gate issuance (invites, DVAKs).
266
+ * The pooled-capacity resource a quota gate refers to. Only the byte pools
267
+ * hard-gate: flex licensing has no seat limit (inviting and licensing are
268
+ * never quota-gated), and Identity soft-gates through its own path.
269
269
  */
270
- type QuotaResource = 'storage' | 'bandwidth' | 'seats' | 'identity';
270
+ type QuotaResource = 'storage' | 'bandwidth';
271
271
  /**
272
272
  * Plan required gate (402 PLAN_REQUIRED) — the account has no active
273
273
  * subscription and attempted a billable/create action. Surface a subscribe CTA
@@ -277,9 +277,9 @@ declare class PlanRequiredError extends SparkVaultError {
277
277
  constructor(message: string, details?: Record<string, unknown>);
278
278
  }
279
279
  /**
280
- * Quota exceeded gate (402 QUOTA_EXCEEDED) — a pooled-capacity or seat limit is
281
- * exhausted. `resource` identifies which pool so callers can branch on the CTA
282
- * (add a capacity block for storage/bandwidth, free a seat for seats).
280
+ * Quota exceeded gate (402 QUOTA_EXCEEDED) — a pooled-capacity limit is
281
+ * exhausted. `resource` identifies which pool so callers can point the CTA at
282
+ * the right capacity block.
283
283
  */
284
284
  declare class QuotaExceededError extends SparkVaultError {
285
285
  readonly resource?: QuotaResource;
@@ -49,9 +49,9 @@ class PlanRequiredError extends SparkVaultError {
49
49
  }
50
50
  }
51
51
  /**
52
- * Quota exceeded gate (402 QUOTA_EXCEEDED) — a pooled-capacity or seat limit is
53
- * exhausted. `resource` identifies which pool so callers can branch on the CTA
54
- * (add a capacity block for storage/bandwidth, free a seat for seats).
52
+ * Quota exceeded gate (402 QUOTA_EXCEEDED) — a pooled-capacity limit is
53
+ * exhausted. `resource` identifies which pool so callers can point the CTA at
54
+ * the right capacity block.
55
55
  */
56
56
  class QuotaExceededError extends SparkVaultError {
57
57
  constructor(message, details) {
@@ -59,12 +59,7 @@ class QuotaExceededError extends SparkVaultError {
59
59
  this.name = 'QuotaExceededError';
60
60
  const resource = details?.resource;
61
61
  this.resource =
62
- resource === 'storage' ||
63
- resource === 'bandwidth' ||
64
- resource === 'seats' ||
65
- resource === 'identity'
66
- ? resource
67
- : undefined;
62
+ resource === 'storage' || resource === 'bandwidth' ? resource : undefined;
68
63
  Object.setPrototypeOf(this, QuotaExceededError.prototype);
69
64
  }
70
65
  }