@sparkvault/sdk-js 17.0.0 → 17.0.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/README.md +7 -7
- package/dist/api-base.d.ts +2 -2
- package/dist/config.d.ts +1 -1
- package/dist/entropy/index.d.ts +2 -2
- package/dist/entropy/types.d.ts +1 -1
- package/dist/errors.d.ts +3 -3
- package/dist/http.d.ts +1 -1
- package/dist/index.cjs +208 -196
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +150 -150
- package/dist/index.mjs +208 -196
- package/dist/index.mjs.map +1 -1
- package/dist/ingots/index.d.ts +10 -10
- package/dist/ingots/types.d.ts +3 -3
- package/dist/notify/index.d.ts +8 -8
- package/dist/notify/types.d.ts +10 -10
- package/dist/products/identity/api.d.ts +5 -5
- package/dist/products/identity/dialog-launcher.d.ts +2 -2
- package/dist/products/identity/handlers/otp-handler.d.ts +1 -1
- package/dist/products/identity/handlers/passkey-handler.d.ts +4 -4
- package/dist/products/identity/index.d.ts +11 -11
- package/dist/products/identity/renderer.d.ts +10 -10
- package/dist/products/identity/types.d.ts +10 -10
- package/dist/products/identity/utils.d.ts +3 -3
- package/dist/products/identity/views/backup-verify.d.ts +3 -3
- package/dist/products/identity/views/error.d.ts +1 -1
- package/dist/products/identity/views/identity-input.d.ts +1 -1
- package/dist/products/identity/views/method-select.d.ts +1 -1
- package/dist/products/identity/views/origin-not-allowed.d.ts +2 -2
- package/dist/products/identity/views/passkey-auto.d.ts +1 -1
- package/dist/products/identity/views/product-not-configured.d.ts +2 -2
- package/dist/products/identity/views/service-unavailable.d.ts +1 -1
- package/dist/products/index.d.ts +1 -1
- package/dist/products/notify/index.d.ts +21 -21
- package/dist/products/notify/types.d.ts +65 -65
- package/dist/products/structured-ingots/types.d.ts +2 -2
- package/dist/sparks/index.d.ts +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/utils/dom.d.ts +3 -3
- package/dist/vaults/index.d.ts +2 -2
- package/dist/vaults/types.d.ts +2 -2
- package/dist/vaults/upload/api.d.ts +14 -14
- package/dist/vaults/upload/renderer.d.ts +1 -1
- package/dist/vaults/upload/styles.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -197,7 +197,7 @@ enforces its shape on the server. Types have immutable versions. Use
|
|
|
197
197
|
with the vault as their first argument. Publishing requires `expectedVersion`;
|
|
198
198
|
existing records keep their pin. PATCH retains the pin unless `type` explicitly
|
|
199
199
|
changes it or is `null`. Transforms run before validation of the complete object.
|
|
200
|
-
`types.create` also accepts an optional stable `idempotencyKey` (8
|
|
200
|
+
`types.create` also accepts an optional stable `idempotencyKey` (8 to 128 printable
|
|
201
201
|
ASCII characters) to safely retry creation of the same named definition. Reuse
|
|
202
202
|
that key with the same schema and ordered transformations; a changed definition
|
|
203
203
|
conflicts. An omitted key keeps creation strict on name collisions.
|
|
@@ -220,7 +220,7 @@ restore validates historical values against the current Type and creates a new
|
|
|
220
220
|
version. Retention is the Vault's `ingotVersionLimit` setting, shared with
|
|
221
221
|
ordinary files and defaulting to zero previous versions. An interactive company
|
|
222
222
|
administrator sets it with `vaults.updateVersionHistory(vaultId, { versionLimit })`
|
|
223
|
-
(0
|
|
223
|
+
(0 to 50). Current content is additional; lowering the limit takes effect on each
|
|
224
224
|
ingot's next successful content change. The old `structuredIngotVersionLimit`
|
|
225
225
|
property and `updateStructuredIngotSettings` method remain compatibility aliases. `delete(vault, ref, { expectedRevision })` deletes only the inspected
|
|
226
226
|
publication and its retained history. Omitting the option preserves deliberate
|
|
@@ -244,7 +244,7 @@ Structured objects keep their product-specific history and type-aware restore.
|
|
|
244
244
|
|
|
245
245
|
Create rejects an existing name; it never overwrites. Names follow the server's
|
|
246
246
|
Unicode caseless matching rules. An optional stable `idempotencyKey` contains
|
|
247
|
-
8
|
|
247
|
+
8 to 128 printable ASCII characters. A successful replay has `replayed: true` and
|
|
248
248
|
returns the original creation receipt, including its original version. Call
|
|
249
249
|
`get` when you need the object's current version. A different payload under the
|
|
250
250
|
same key fails. The name/key binding ends when the object is deleted or renamed.
|
|
@@ -413,12 +413,12 @@ without another login. Anonymous visitors continue to a second step that asks
|
|
|
413
413
|
nothing: **Sign in and send** opens the native auth.SV Identity window, which
|
|
414
414
|
offers the accounts already signed in on the browser or a fresh sign-in, before
|
|
415
415
|
the request is sent. An inline (`target`) wizard asks before its page is left
|
|
416
|
-
with an unsent request.
|
|
417
|
-
the window answers with one (closing it changes nothing);
|
|
416
|
+
with an unsent request. "Switch account" changes only the support account, once
|
|
417
|
+
the window answers with one (closing it changes nothing); "Sign out" ends the
|
|
418
418
|
support session without a window and revokes it, even a session the host lent
|
|
419
419
|
through `getSessionToken`, so a host that lends one must drop it when
|
|
420
420
|
`onSession` reports `null`. The host website's own login is untouched. Both
|
|
421
|
-
suppress website sign-in until
|
|
421
|
+
suppress website sign-in until "Use website account" is chosen, which is
|
|
422
422
|
offered once the visitor has switched away from the website account; a Sign
|
|
423
423
|
out alone does not offer it. Use website account releases the switched-to
|
|
424
424
|
session at once, its revocation going behind as a switch's does (a refused or
|
|
@@ -617,7 +617,7 @@ requester/session without a second login, consent or auth.SV account. Even a
|
|
|
617
617
|
verified host email stays contact metadata: host proofs never claim native
|
|
618
618
|
ticket history or create/link a global SVID. The support widget's optional
|
|
619
619
|
auth.SV account switch opens a separate native requester and leaves the website
|
|
620
|
-
signed in; only
|
|
620
|
+
signed in; only "Use website account" resumes the host provider.
|
|
621
621
|
|
|
622
622
|
A custom UI that offers Use website account calls `returnToWebsiteAccount()`.
|
|
623
623
|
The session in use is released at once and the website's identity resumed;
|
package/dist/api-base.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ export declare abstract class SparkVaultApi {
|
|
|
70
70
|
protected readonly timeoutMs: number;
|
|
71
71
|
/**
|
|
72
72
|
* Abort controller for the current session. Replaced by resetSession()
|
|
73
|
-
* at the start of every user-facing session
|
|
73
|
+
* at the start of every user-facing session, so an aborted controller can
|
|
74
74
|
* never leak into the next session.
|
|
75
75
|
*/
|
|
76
76
|
private closeController;
|
|
@@ -79,7 +79,7 @@ export declare abstract class SparkVaultApi {
|
|
|
79
79
|
abort(): void;
|
|
80
80
|
/** Whether the *current* session has been aborted. */
|
|
81
81
|
isAborted(): boolean;
|
|
82
|
-
/** The current session's abort signal
|
|
82
|
+
/** The current session's abort signal, for callers that need to wire it into XHR/etc. */
|
|
83
83
|
getAbortSignal(): AbortSignal;
|
|
84
84
|
/**
|
|
85
85
|
* Swap in a fresh AbortController. The Module calls this at the start of
|
package/dist/config.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export interface SparkVaultConfig {
|
|
|
44
44
|
* Preload Identity configuration on SDK init (default: true in a browser,
|
|
45
45
|
* false off-DOM). When enabled, the /config call is made immediately when the
|
|
46
46
|
* SDK initializes, so verify() opens instantly without waiting for the config
|
|
47
|
-
* fetch. It buys nothing in a server process
|
|
47
|
+
* fetch. It buys nothing in a server process (there is no dialog to open),
|
|
48
48
|
* so a Node host does not pay for a network call it will never use.
|
|
49
49
|
* Set explicitly to override in either direction.
|
|
50
50
|
*/
|
package/dist/entropy/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare class EntropyModule {
|
|
|
19
19
|
/**
|
|
20
20
|
* Generate `n` random bytes as a Uint8Array.
|
|
21
21
|
*
|
|
22
|
-
* SECURITY: this returns raw *server* entropy
|
|
22
|
+
* SECURITY: this returns raw *server* entropy; it is NOT finished key
|
|
23
23
|
* material. Client secret keys MUST hybrid-mix it: XOR the returned bytes with
|
|
24
24
|
* a local CSPRNG (`crypto.getRandomValues`) before use, so the server share
|
|
25
25
|
* alone can never determine the key.
|
|
@@ -27,7 +27,7 @@ export declare class EntropyModule {
|
|
|
27
27
|
* @example
|
|
28
28
|
* const serverEntropy = await sv.entropy.generateBytes(32);
|
|
29
29
|
* const localEntropy = crypto.getRandomValues(new Uint8Array(32));
|
|
30
|
-
* // Hybrid-mixed key material
|
|
30
|
+
* // Hybrid-mixed key material, safe to use as a secret key.
|
|
31
31
|
* const key = serverEntropy.map((b, i) => b ^ localEntropy[i]);
|
|
32
32
|
*/
|
|
33
33
|
generateBytes(n: number): Promise<Uint8Array>;
|
package/dist/entropy/types.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
export type EntropyFormat = 'hex' | 'base64' | 'base64url' | 'alphanumeric' | 'alphanumeric-mixed' | 'password' | 'numeric' | 'uuid' | 'bytes';
|
|
9
9
|
/** Options for generate. */
|
|
10
10
|
export interface GenerateEntropyOptions {
|
|
11
|
-
/** Number of random bytes: 1
|
|
11
|
+
/** Number of random bytes: 1 to 1024, or 1 to 512 for alphanumeric, alphanumeric-mixed and password. */
|
|
12
12
|
bytes: number;
|
|
13
13
|
/** Output format. Defaults to hex. */
|
|
14
14
|
format?: EntropyFormat;
|
package/dist/errors.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export declare class ValidationError extends SparkVaultError {
|
|
|
59
59
|
*/
|
|
60
60
|
export type QuotaResource = 'storage' | 'bandwidth';
|
|
61
61
|
/**
|
|
62
|
-
* Plan required gate (402 PLAN_REQUIRED)
|
|
62
|
+
* Plan required gate (402 PLAN_REQUIRED): the account has no active
|
|
63
63
|
* subscription and attempted a billable/create action. Surface a subscribe CTA
|
|
64
64
|
* to admins, or "ask your account admin" to members.
|
|
65
65
|
*/
|
|
@@ -78,7 +78,7 @@ export declare class UsageCreditFundingReviewError extends SparkVaultError {
|
|
|
78
78
|
constructor(message: string, details?: Record<string, unknown>, retryAfterMs?: number | null, serviceCode?: string);
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* Quota exceeded gate (402 QUOTA_EXCEEDED)
|
|
81
|
+
* Quota exceeded gate (402 QUOTA_EXCEEDED): a pooled-capacity limit is
|
|
82
82
|
* exhausted. `resource` identifies which pool so callers can point the CTA at
|
|
83
83
|
* the right capacity block.
|
|
84
84
|
*/
|
|
@@ -88,7 +88,7 @@ export declare class QuotaExceededError extends SparkVaultError {
|
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Notify subscription gate (403 NOTIFY_SUBSCRIPTION_REQUIRED or
|
|
91
|
-
* NOTIFY_PROJECT_SUBSCRIPTION_REQUIRED)
|
|
91
|
+
* NOTIFY_PROJECT_SUBSCRIPTION_REQUIRED): the account or selected project
|
|
92
92
|
* does not hold Notify and attempted a send that names no accepted send's
|
|
93
93
|
* `sendId` (a replay of an accepted send, the same request under its `sendId`,
|
|
94
94
|
* is answered with the stored send), or a config save that selects a new
|
package/dist/http.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare class HttpClient {
|
|
|
32
32
|
* and every other answer is the base error under the service's own code.
|
|
33
33
|
* Each carries the service's code (`serviceCode`), which tells apart two
|
|
34
34
|
* refusals that share a typed class's `code`, and the answer's `Retry-After`
|
|
35
|
-
* (`retryAfterMs`), the floor for whoever retries it
|
|
35
|
+
* (`retryAfterMs`), the floor for whoever retries it: the SDK's own
|
|
36
36
|
* transfers when the answer is a download link's mint, and the host page
|
|
37
37
|
* otherwise.
|
|
38
38
|
*/
|