@sparkvault/sdk-js 8.11.0 → 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 +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/sparkvault.cjs.js +6 -11
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +6 -11
- package/dist/sparkvault.esm.js.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/utils/base64url.d.ts +1 -1
- package/dist/vaults/upload/api.d.ts +1 -1
- package/package.json +1 -1
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
|
-
*
|
|
22
|
-
*
|
|
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'
|
|
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
|
|
35
|
-
* exhausted. `resource` identifies which pool so callers can
|
|
36
|
-
*
|
|
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
|
-
*
|
|
268
|
-
*
|
|
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'
|
|
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
|
|
281
|
-
* exhausted. `resource` identifies which pool so callers can
|
|
282
|
-
*
|
|
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;
|
package/dist/sparkvault.cjs.js
CHANGED
|
@@ -49,9 +49,9 @@ class PlanRequiredError extends SparkVaultError {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
* Quota exceeded gate (402 QUOTA_EXCEEDED) — a pooled-capacity
|
|
53
|
-
* exhausted. `resource` identifies which pool so callers can
|
|
54
|
-
*
|
|
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
|
}
|
|
@@ -695,7 +690,7 @@ class ExpirationTimer {
|
|
|
695
690
|
/**
|
|
696
691
|
* Base64URL Encoding/Decoding Utilities
|
|
697
692
|
*
|
|
698
|
-
* Centralized implementation
|
|
693
|
+
* Centralized implementation (DRY).
|
|
699
694
|
* Used by Identity (WebAuthn) and Vaults modules.
|
|
700
695
|
*/
|
|
701
696
|
/**
|
|
@@ -9359,7 +9354,7 @@ class UploadApi extends SparkVaultApi {
|
|
|
9359
9354
|
* Upload a file to Forge over the TUS resumable protocol (v1.0.0).
|
|
9360
9355
|
*
|
|
9361
9356
|
* The single canonical browser transfer path — the upload widget and the
|
|
9362
|
-
* authenticated `ingots.upload` flow both go through here (
|
|
9357
|
+
* authenticated `ingots.upload` flow both go through here (one canonical
|
|
9363
9358
|
* transfer path). Creates the session, PATCHes chunks sized by the server's
|
|
9364
9359
|
* `X-Chunk-Size` (50MB default, which keeps every request under CDN body
|
|
9365
9360
|
* caps such as Cloudflare's 100MB), validates every server-reported offset,
|