@sparkvault/sdk-js 13.0.8 → 13.0.9
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/index.cjs +139 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.mjs +139 -21
- package/dist/index.mjs.map +1 -1
- package/dist/products/identity/types.d.ts +6 -2
- package/dist/products/identity/views/backup-verify.d.ts +4 -3
- package/dist/products/identity/views/identity-input.d.ts +2 -1
- package/dist/products/identity/views/method-select.d.ts +5 -1
- package/dist/products/identity/views/sms-consent.d.ts +15 -0
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
|
@@ -41,7 +41,11 @@ export interface AuthContext {
|
|
|
41
41
|
export interface VerifyOptions {
|
|
42
42
|
/** Pre-fill email address (mutually exclusive with phone) */
|
|
43
43
|
email?: string;
|
|
44
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Pre-fill phone number in E.164 format, e.g. "+14155551234" (mutually
|
|
46
|
+
* exclusive with email). The sign-in texts or calls it only once the person
|
|
47
|
+
* picks a text or call method, under the SMS and voice consent.
|
|
48
|
+
*/
|
|
45
49
|
phone?: string;
|
|
46
50
|
/**
|
|
47
51
|
* Target element for inline rendering. Can be:
|
|
@@ -93,7 +97,7 @@ export interface VerifyOptions {
|
|
|
93
97
|
export interface AttachOptions {
|
|
94
98
|
/** Pre-fill email address */
|
|
95
99
|
email?: string;
|
|
96
|
-
/** Pre-fill phone number in E.164 format */
|
|
100
|
+
/** Pre-fill phone number in E.164 format (see `VerifyOptions.phone`) */
|
|
97
101
|
phone?: string;
|
|
98
102
|
/** Auth context for OIDC/simple mode flows */
|
|
99
103
|
authContext?: AuthContext;
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Backup Verification Input View
|
|
3
3
|
*
|
|
4
4
|
* Post-login nudge to add the inverse identifier as a recovery backup:
|
|
5
|
-
* collects a new phone (for an email login)
|
|
6
|
-
* then hands it off to send a one-time code.
|
|
7
|
-
* suppresses this method's prompt for 30 days
|
|
5
|
+
* collects a new phone (for an email login), under the SMS and voice consent,
|
|
6
|
+
* or email (for a phone login), then hands it off to send a one-time code.
|
|
7
|
+
* Includes a "Not now" skip that suppresses this method's prompt for 30 days
|
|
8
|
+
* (handled by the renderer).
|
|
8
9
|
*
|
|
9
10
|
* Sibling of PasskeyPromptView — same low-friction, skippable shape.
|
|
10
11
|
*/
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Collects and validates the user's email or phone number: reads the input as
|
|
5
5
|
* one or the other by the platform's rules (`@sparkvault/app-sdk/phone` and
|
|
6
6
|
* `@sparkvault/app-sdk/email-address`), and formats a phone-only field as the
|
|
7
|
-
* number is typed.
|
|
7
|
+
* number is typed. A field that takes a phone number carries the SMS and voice
|
|
8
|
+
* consent beneath it.
|
|
8
9
|
*/
|
|
9
10
|
import type { View } from './base';
|
|
10
11
|
export type IdentityType = 'email' | 'phone';
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Method Select View
|
|
3
3
|
*
|
|
4
|
-
* Displays available authentication methods for the user to choose from.
|
|
4
|
+
* Displays available authentication methods for the user to choose from. A
|
|
5
|
+
* list that offers a text or a call carries the SMS and voice consent beneath
|
|
6
|
+
* it: a phone number the sign-in was handed reaches this list without passing
|
|
7
|
+
* the identifier field that carries it, so the tap on a text or call method is
|
|
8
|
+
* what gives it.
|
|
5
9
|
*/
|
|
6
10
|
import type { View } from './base';
|
|
7
11
|
import type { IdentityType } from './identity-input';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SMS and Voice Consent
|
|
3
|
+
*
|
|
4
|
+
* The line the sign-in shows wherever a person gives SparkVault a phone number
|
|
5
|
+
* to text or call, in the platform's one wording
|
|
6
|
+
* (`@sparkvault/app-sdk/consent-lines`): under every field that takes one, and
|
|
7
|
+
* under the method picker wherever it offers a text or a call. It describes
|
|
8
|
+
* the field or the methods above it, so a screen reader reads it with them.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The consent line, its "Terms" opening the terms in a new tab.
|
|
12
|
+
*
|
|
13
|
+
* @param id - The line's id, which the field or each method names in its `aria-describedby`
|
|
14
|
+
*/
|
|
15
|
+
export declare function smsConsent(id: string): HTMLParagraphElement;
|