@glideidentity/web-client-sdk 5.1.2 → 6.0.0-beta.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/README.md +337 -526
- package/dist/browser/web-client-sdk.min.js +1 -1
- package/dist/cjs/adapters/index.js +15 -0
- package/dist/cjs/adapters/react.js +192 -0
- package/dist/cjs/adapters/vanilla.js +38 -0
- package/dist/cjs/adapters/vue.js +187 -0
- package/dist/cjs/browser.js +58 -0
- package/dist/cjs/client/http.js +159 -0
- package/dist/cjs/client/index.js +19 -0
- package/dist/cjs/client/logger.js +135 -0
- package/dist/cjs/client/phone-auth-client.js +439 -0
- package/dist/cjs/client/strategies/polling.js +177 -0
- package/dist/cjs/core/errors.js +204 -0
- package/dist/cjs/core/index.js +83 -0
- package/dist/cjs/core/type-guards.js +196 -0
- package/dist/cjs/core/types.js +25 -0
- package/dist/{core/phone-auth/validation-utils.js → cjs/core/validators.js} +70 -23
- package/dist/cjs/index.js +81 -0
- package/dist/cjs/ui/index.js +11 -0
- package/dist/{core/phone-auth → cjs}/ui/mobile-debug-console.js +149 -78
- package/dist/cjs/ui/modal.js +1122 -0
- package/dist/esm/adapters/index.js +11 -0
- package/dist/esm/adapters/react.js +182 -0
- package/dist/esm/adapters/vanilla.js +29 -0
- package/dist/esm/adapters/vue.js +177 -0
- package/dist/esm/browser.js +30 -11
- package/dist/esm/client/http.js +156 -0
- package/dist/esm/client/index.js +11 -0
- package/dist/esm/client/logger.js +131 -0
- package/dist/esm/client/phone-auth-client.js +435 -0
- package/dist/esm/client/strategies/polling.js +174 -0
- package/dist/esm/core/errors.js +193 -0
- package/dist/esm/core/index.js +60 -0
- package/dist/esm/core/type-guards.js +181 -0
- package/dist/esm/core/types.js +22 -1
- package/dist/esm/core/{phone-auth/validation-utils.js → validators.js} +66 -21
- package/dist/esm/index.js +45 -17
- package/dist/esm/ui/index.js +5 -0
- package/dist/esm/{core/phone-auth/ui → ui}/mobile-debug-console.js +149 -78
- package/dist/esm/ui/modal.js +1117 -0
- package/dist/types/adapters/index.d.ts +10 -0
- package/dist/types/adapters/index.d.ts.map +1 -0
- package/dist/types/adapters/react.d.ts +70 -0
- package/dist/types/adapters/react.d.ts.map +1 -0
- package/dist/types/adapters/vanilla.d.ts +29 -0
- package/dist/types/adapters/vanilla.d.ts.map +1 -0
- package/dist/types/adapters/vue.d.ts +71 -0
- package/dist/types/adapters/vue.d.ts.map +1 -0
- package/dist/types/browser.d.ts +27 -0
- package/dist/types/browser.d.ts.map +1 -0
- package/dist/types/client/http.d.ts +41 -0
- package/dist/types/client/http.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +10 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/client/logger.d.ts +36 -0
- package/dist/types/client/logger.d.ts.map +1 -0
- package/dist/types/client/phone-auth-client.d.ts +91 -0
- package/dist/types/client/phone-auth-client.d.ts.map +1 -0
- package/dist/types/client/strategies/polling.d.ts +36 -0
- package/dist/types/client/strategies/polling.d.ts.map +1 -0
- package/dist/types/core/errors.d.ts +71 -0
- package/dist/types/core/errors.d.ts.map +1 -0
- package/dist/types/core/index.d.ts +38 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/types/core/type-guards.d.ts +118 -0
- package/dist/types/core/type-guards.d.ts.map +1 -0
- package/dist/types/core/types.d.ts +534 -0
- package/dist/types/core/types.d.ts.map +1 -0
- package/dist/types/core/validators.d.ts +63 -0
- package/dist/types/core/validators.d.ts.map +1 -0
- package/dist/types/index.d.ts +40 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/ui/index.d.ts +6 -0
- package/dist/types/ui/index.d.ts.map +1 -0
- package/dist/{esm/core/phone-auth → types}/ui/mobile-debug-console.d.ts +1 -0
- package/dist/types/ui/mobile-debug-console.d.ts.map +1 -0
- package/dist/types/ui/modal.d.ts +87 -0
- package/dist/types/ui/modal.d.ts.map +1 -0
- package/package.json +48 -34
- package/dist/adapters/angular/client.service.d.ts +0 -7
- package/dist/adapters/angular/client.service.js +0 -30
- package/dist/adapters/angular/index.d.ts +0 -3
- package/dist/adapters/angular/index.js +0 -18
- package/dist/adapters/angular/phone-auth.service.d.ts +0 -38
- package/dist/adapters/angular/phone-auth.service.js +0 -130
- package/dist/adapters/react/index.d.ts +0 -9
- package/dist/adapters/react/index.js +0 -28
- package/dist/adapters/react/useClient.d.ts +0 -26
- package/dist/adapters/react/useClient.js +0 -121
- package/dist/adapters/react/usePhoneAuth.d.ts +0 -23
- package/dist/adapters/react/usePhoneAuth.js +0 -95
- package/dist/adapters/vanilla/client.d.ts +0 -8
- package/dist/adapters/vanilla/client.js +0 -33
- package/dist/adapters/vanilla/index.d.ts +0 -3
- package/dist/adapters/vanilla/index.js +0 -18
- package/dist/adapters/vanilla/phone-auth.d.ts +0 -46
- package/dist/adapters/vanilla/phone-auth.js +0 -138
- package/dist/adapters/vue/index.d.ts +0 -10
- package/dist/adapters/vue/index.js +0 -36
- package/dist/adapters/vue/useClient.d.ts +0 -115
- package/dist/adapters/vue/useClient.js +0 -131
- package/dist/adapters/vue/usePhoneAuth.d.ts +0 -94
- package/dist/adapters/vue/usePhoneAuth.js +0 -103
- package/dist/browser.d.ts +0 -7
- package/dist/browser.js +0 -31
- package/dist/core/client.d.ts +0 -22
- package/dist/core/client.js +0 -77
- package/dist/core/logger.d.ts +0 -130
- package/dist/core/logger.js +0 -370
- package/dist/core/phone-auth/api-types.d.ts +0 -593
- package/dist/core/phone-auth/api-types.js +0 -215
- package/dist/core/phone-auth/client.d.ts +0 -189
- package/dist/core/phone-auth/client.js +0 -1441
- package/dist/core/phone-auth/error-utils.d.ts +0 -110
- package/dist/core/phone-auth/error-utils.js +0 -350
- package/dist/core/phone-auth/index.d.ts +0 -7
- package/dist/core/phone-auth/index.js +0 -50
- package/dist/core/phone-auth/status-types.d.ts +0 -107
- package/dist/core/phone-auth/status-types.js +0 -31
- package/dist/core/phone-auth/strategies/desktop.d.ts +0 -122
- package/dist/core/phone-auth/strategies/desktop.js +0 -596
- package/dist/core/phone-auth/strategies/index.d.ts +0 -11
- package/dist/core/phone-auth/strategies/index.js +0 -15
- package/dist/core/phone-auth/strategies/link.d.ts +0 -89
- package/dist/core/phone-auth/strategies/link.js +0 -384
- package/dist/core/phone-auth/strategies/ts43.d.ts +0 -32
- package/dist/core/phone-auth/strategies/ts43.js +0 -151
- package/dist/core/phone-auth/strategies/types.d.ts +0 -18
- package/dist/core/phone-auth/strategies/types.js +0 -6
- package/dist/core/phone-auth/type-guards.d.ts +0 -143
- package/dist/core/phone-auth/type-guards.js +0 -198
- package/dist/core/phone-auth/types.d.ts +0 -237
- package/dist/core/phone-auth/types.js +0 -93
- package/dist/core/phone-auth/ui/mobile-debug-console.d.ts +0 -25
- package/dist/core/phone-auth/ui/modal.d.ts +0 -88
- package/dist/core/phone-auth/ui/modal.js +0 -598
- package/dist/core/phone-auth/validation-utils.d.ts +0 -44
- package/dist/core/types.d.ts +0 -62
- package/dist/core/types.js +0 -2
- package/dist/core/version.d.ts +0 -1
- package/dist/core/version.js +0 -5
- package/dist/esm/adapters/angular/client.service.d.ts +0 -7
- package/dist/esm/adapters/angular/client.service.js +0 -27
- package/dist/esm/adapters/angular/index.d.ts +0 -3
- package/dist/esm/adapters/angular/index.js +0 -4
- package/dist/esm/adapters/angular/phone-auth.service.d.ts +0 -38
- package/dist/esm/adapters/angular/phone-auth.service.js +0 -127
- package/dist/esm/adapters/react/index.d.ts +0 -9
- package/dist/esm/adapters/react/index.js +0 -8
- package/dist/esm/adapters/react/useClient.d.ts +0 -26
- package/dist/esm/adapters/react/useClient.js +0 -116
- package/dist/esm/adapters/react/usePhoneAuth.d.ts +0 -23
- package/dist/esm/adapters/react/usePhoneAuth.js +0 -92
- package/dist/esm/adapters/vanilla/client.d.ts +0 -8
- package/dist/esm/adapters/vanilla/client.js +0 -29
- package/dist/esm/adapters/vanilla/index.d.ts +0 -3
- package/dist/esm/adapters/vanilla/index.js +0 -4
- package/dist/esm/adapters/vanilla/phone-auth.d.ts +0 -46
- package/dist/esm/adapters/vanilla/phone-auth.js +0 -134
- package/dist/esm/adapters/vue/index.d.ts +0 -10
- package/dist/esm/adapters/vue/index.js +0 -11
- package/dist/esm/adapters/vue/useClient.d.ts +0 -115
- package/dist/esm/adapters/vue/useClient.js +0 -127
- package/dist/esm/adapters/vue/usePhoneAuth.d.ts +0 -94
- package/dist/esm/adapters/vue/usePhoneAuth.js +0 -100
- package/dist/esm/browser.d.ts +0 -7
- package/dist/esm/core/client.d.ts +0 -22
- package/dist/esm/core/client.js +0 -70
- package/dist/esm/core/logger.d.ts +0 -130
- package/dist/esm/core/logger.js +0 -359
- package/dist/esm/core/phone-auth/api-types.d.ts +0 -593
- package/dist/esm/core/phone-auth/api-types.js +0 -203
- package/dist/esm/core/phone-auth/client.d.ts +0 -189
- package/dist/esm/core/phone-auth/client.js +0 -1404
- package/dist/esm/core/phone-auth/error-utils.d.ts +0 -110
- package/dist/esm/core/phone-auth/error-utils.js +0 -338
- package/dist/esm/core/phone-auth/index.d.ts +0 -7
- package/dist/esm/core/phone-auth/index.js +0 -8
- package/dist/esm/core/phone-auth/status-types.d.ts +0 -107
- package/dist/esm/core/phone-auth/status-types.js +0 -26
- package/dist/esm/core/phone-auth/strategies/desktop.d.ts +0 -122
- package/dist/esm/core/phone-auth/strategies/desktop.js +0 -590
- package/dist/esm/core/phone-auth/strategies/index.d.ts +0 -11
- package/dist/esm/core/phone-auth/strategies/index.js +0 -7
- package/dist/esm/core/phone-auth/strategies/link.d.ts +0 -89
- package/dist/esm/core/phone-auth/strategies/link.js +0 -380
- package/dist/esm/core/phone-auth/strategies/ts43.d.ts +0 -32
- package/dist/esm/core/phone-auth/strategies/ts43.js +0 -147
- package/dist/esm/core/phone-auth/strategies/types.d.ts +0 -18
- package/dist/esm/core/phone-auth/strategies/types.js +0 -5
- package/dist/esm/core/phone-auth/type-guards.d.ts +0 -143
- package/dist/esm/core/phone-auth/type-guards.js +0 -185
- package/dist/esm/core/phone-auth/types.d.ts +0 -237
- package/dist/esm/core/phone-auth/types.js +0 -76
- package/dist/esm/core/phone-auth/ui/modal.d.ts +0 -88
- package/dist/esm/core/phone-auth/ui/modal.js +0 -594
- package/dist/esm/core/phone-auth/validation-utils.d.ts +0 -44
- package/dist/esm/core/types.d.ts +0 -62
- package/dist/esm/core/version.d.ts +0 -1
- package/dist/esm/core/version.js +0 -2
- package/dist/esm/index.d.ts +0 -12
- package/dist/index.d.ts +0 -12
- package/dist/index.js +0 -55
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type Guards for Phone Authentication.
|
|
3
|
+
*
|
|
4
|
+
* These utilities help developers work with SDK responses in a type-safe way
|
|
5
|
+
* without having to write their own type checking logic.
|
|
6
|
+
*/
|
|
7
|
+
import type { InvokeResult, AuthCredential, PrepareResponse, TS43Data, LinkData, DesktopData, GetPhoneNumberResponse, VerifyPhoneNumberResponse, PhoneAuthResult } from './types';
|
|
8
|
+
/**
|
|
9
|
+
* Type guard to check if result is an InvokeResult.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const result = await sdk.invokeSecurePrompt(prepared);
|
|
14
|
+
* if (isInvokeResult(result)) {
|
|
15
|
+
* const credential = await result.credential;
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function isInvokeResult(result: unknown): result is InvokeResult;
|
|
20
|
+
/**
|
|
21
|
+
* Type guard to check if result is an AuthCredential.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const credential = await result.credential;
|
|
26
|
+
* if (isAuthCredential(credential)) {
|
|
27
|
+
* console.log(credential.phone_number);
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function isAuthCredential(result: unknown): result is AuthCredential;
|
|
32
|
+
/**
|
|
33
|
+
* Check if result is from TS43 strategy.
|
|
34
|
+
* TS43 uses Android Digital Credentials API.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const result = await sdk.invokeSecurePrompt(prepared);
|
|
39
|
+
* if (isTS43Strategy(result)) {
|
|
40
|
+
* // result.cancel is undefined for TS43
|
|
41
|
+
* // To retry: call invokeSecurePrompt again
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function isTS43Strategy(result: InvokeResult): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Check if result is from Link strategy.
|
|
48
|
+
* Link strategy uses iOS App Clips or Android App Links.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const result = await sdk.invokeSecurePrompt(prepared);
|
|
53
|
+
* if (isLinkStrategy(result)) {
|
|
54
|
+
* // Can cancel polling
|
|
55
|
+
* result.cancel?.();
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function isLinkStrategy(result: InvokeResult): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Check if result is from Desktop strategy.
|
|
62
|
+
* Desktop strategy uses QR codes for cross-device auth.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const result = await sdk.invokeSecurePrompt(prepared);
|
|
67
|
+
* if (isDesktopStrategy(result)) {
|
|
68
|
+
* // QR code data is in prepared.data
|
|
69
|
+
* // Can cancel polling
|
|
70
|
+
* result.cancel?.();
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
export declare function isDesktopStrategy(result: InvokeResult): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Check if result has cancel capability.
|
|
77
|
+
* Only Link and Desktop strategies support cancel.
|
|
78
|
+
*/
|
|
79
|
+
export declare function isCancellable(result: InvokeResult): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Check if prepare response data is TS43Data.
|
|
82
|
+
*/
|
|
83
|
+
export declare function isTS43Data(data: unknown): data is TS43Data;
|
|
84
|
+
/**
|
|
85
|
+
* Check if prepare response data is LinkData.
|
|
86
|
+
*/
|
|
87
|
+
export declare function isLinkData(data: unknown): data is LinkData;
|
|
88
|
+
/**
|
|
89
|
+
* Check if prepare response data is DesktopData.
|
|
90
|
+
*/
|
|
91
|
+
export declare function isDesktopData(data: unknown): data is DesktopData;
|
|
92
|
+
/**
|
|
93
|
+
* Get strategy-specific data from PrepareResponse with proper typing.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* const prepared = await sdk.prepare(request);
|
|
98
|
+
*
|
|
99
|
+
* if (prepared.authentication_strategy === 'desktop') {
|
|
100
|
+
* const desktopData = getStrategyData(prepared);
|
|
101
|
+
* // Show QR code: desktopData.data.ios_qr_image
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export declare function getStrategyData<T extends PrepareResponse>(prepared: T): T['data'];
|
|
106
|
+
/**
|
|
107
|
+
* Check if response is GetPhoneNumberResponse.
|
|
108
|
+
*/
|
|
109
|
+
export declare function isGetPhoneNumberResponse(result: PhoneAuthResult): result is GetPhoneNumberResponse;
|
|
110
|
+
/**
|
|
111
|
+
* Check if response is VerifyPhoneNumberResponse.
|
|
112
|
+
*/
|
|
113
|
+
export declare function isVerifyPhoneNumberResponse(result: PhoneAuthResult): result is VerifyPhoneNumberResponse;
|
|
114
|
+
/**
|
|
115
|
+
* Check if response is an error response from server.
|
|
116
|
+
*/
|
|
117
|
+
export declare function isErrorResponse(response: unknown): boolean;
|
|
118
|
+
//# sourceMappingURL=type-guards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["../../../src/core/type-guards.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,eAAe,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AgB,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAO1D"}
|
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glide Phone Authentication - Core Types
|
|
3
|
+
*
|
|
4
|
+
* This file contains all types for the Phone Auth SDK.
|
|
5
|
+
* Zero runtime dependencies - pure TypeScript types and constants.
|
|
6
|
+
*
|
|
7
|
+
* NAMING CONVENTION:
|
|
8
|
+
* - All types use snake_case to match API communication
|
|
9
|
+
* - This eliminates conversion errors and makes debugging easier
|
|
10
|
+
*/
|
|
11
|
+
/** E.164 format phone number: "+1234567890" */
|
|
12
|
+
export type PhoneNumber = string;
|
|
13
|
+
/** ISO 8601 timestamp: "2024-01-15T09:30:00Z" */
|
|
14
|
+
export type Timestamp = string;
|
|
15
|
+
/** RFC 4122 UUID: "550e8400-e29b-41d4-a716-446655440000" */
|
|
16
|
+
export type UUID = string;
|
|
17
|
+
export declare const USE_CASE: {
|
|
18
|
+
readonly GET_PHONE_NUMBER: "GetPhoneNumber";
|
|
19
|
+
readonly VERIFY_PHONE_NUMBER: "VerifyPhoneNumber";
|
|
20
|
+
};
|
|
21
|
+
export type UseCase = typeof USE_CASE[keyof typeof USE_CASE];
|
|
22
|
+
export declare const AUTHENTICATION_STRATEGY: {
|
|
23
|
+
readonly TS43: "ts43";
|
|
24
|
+
readonly LINK: "link";
|
|
25
|
+
readonly DESKTOP: "desktop";
|
|
26
|
+
};
|
|
27
|
+
export type AuthenticationStrategy = typeof AUTHENTICATION_STRATEGY[keyof typeof AUTHENTICATION_STRATEGY];
|
|
28
|
+
/**
|
|
29
|
+
* Session information used across all operations.
|
|
30
|
+
* Maintains state between prepare and process steps.
|
|
31
|
+
*/
|
|
32
|
+
export interface SessionInfo {
|
|
33
|
+
/** Unique session identifier */
|
|
34
|
+
session_key: string;
|
|
35
|
+
/** Use case for this session (returned by server) */
|
|
36
|
+
use_case?: UseCase;
|
|
37
|
+
/** Security nonce */
|
|
38
|
+
nonce?: string;
|
|
39
|
+
/** Additional metadata from server */
|
|
40
|
+
metadata?: Record<string, string>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Public Land Mobile Network identifiers.
|
|
44
|
+
* Identifies the carrier network.
|
|
45
|
+
*
|
|
46
|
+
* @deprecated PLMN will be removed in a future version.
|
|
47
|
+
* GetPhoneNumber will always pass prepare but may fail later in the flow.
|
|
48
|
+
* Use phone_number for VerifyPhoneNumber instead.
|
|
49
|
+
*
|
|
50
|
+
* TODO: Remove PLMN support in next major version
|
|
51
|
+
*/
|
|
52
|
+
export interface PLMN {
|
|
53
|
+
/** Mobile Country Code (exactly 3 digits) */
|
|
54
|
+
mcc: string;
|
|
55
|
+
/** Mobile Network Code (2-3 digits) */
|
|
56
|
+
mnc: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Browser/client information for strategy selection.
|
|
60
|
+
*/
|
|
61
|
+
export interface ClientInfo {
|
|
62
|
+
/** navigator.userAgent */
|
|
63
|
+
user_agent: string;
|
|
64
|
+
/** navigator.platform */
|
|
65
|
+
platform: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Advanced options for prepare requests.
|
|
69
|
+
* Contains optional configuration for special features.
|
|
70
|
+
*/
|
|
71
|
+
export interface PrepareOptions {
|
|
72
|
+
/**
|
|
73
|
+
* Parent session ID for desktop-mobile binding.
|
|
74
|
+
* When a mobile device scans a desktop QR code, the mobile session (child)
|
|
75
|
+
* links back to the desktop session (parent).
|
|
76
|
+
*/
|
|
77
|
+
parent_session_id?: string;
|
|
78
|
+
/**
|
|
79
|
+
* UI theme preference for consistency across all authentication touchpoints.
|
|
80
|
+
* Affects SDK modals, mobile app, and OAuth callback pages.
|
|
81
|
+
* @default 'dark'
|
|
82
|
+
*/
|
|
83
|
+
theme?: 'dark' | 'light';
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Request to prepare authentication session.
|
|
87
|
+
*/
|
|
88
|
+
export interface PrepareRequest {
|
|
89
|
+
/**
|
|
90
|
+
* Use case for this authentication.
|
|
91
|
+
* Optional when parent_session_id is provided (inherited from parent).
|
|
92
|
+
*/
|
|
93
|
+
use_case?: UseCase;
|
|
94
|
+
/** E.164 format phone number (required for VerifyPhoneNumber) */
|
|
95
|
+
phone_number?: PhoneNumber;
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated PLMN will be removed. GetPhoneNumber passes prepare but may fail later.
|
|
98
|
+
* TODO: Remove in next major version
|
|
99
|
+
*/
|
|
100
|
+
plmn?: PLMN;
|
|
101
|
+
/**
|
|
102
|
+
* Request identifier.
|
|
103
|
+
* Auto-generated by SDK if not provided.
|
|
104
|
+
*/
|
|
105
|
+
id?: string;
|
|
106
|
+
/** Client information for strategy selection */
|
|
107
|
+
client_info?: ClientInfo;
|
|
108
|
+
/** Advanced options for special features */
|
|
109
|
+
options?: PrepareOptions;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Response from prepare authentication.
|
|
113
|
+
*/
|
|
114
|
+
export interface PrepareResponse {
|
|
115
|
+
/** Selected authentication strategy */
|
|
116
|
+
authentication_strategy: AuthenticationStrategy;
|
|
117
|
+
/** Session information for subsequent requests */
|
|
118
|
+
session: SessionInfo;
|
|
119
|
+
/** Strategy-specific data */
|
|
120
|
+
data: TS43Data | LinkData | DesktopData;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* TS43 strategy data.
|
|
124
|
+
* Used for Android Digital Credentials API.
|
|
125
|
+
*/
|
|
126
|
+
export interface TS43Data {
|
|
127
|
+
/** Protocol identifier (e.g., 'openid4vp-v1-unsigned') */
|
|
128
|
+
protocol: string;
|
|
129
|
+
/** Protocol-specific data for Digital Credentials API */
|
|
130
|
+
data: {
|
|
131
|
+
nonce: string;
|
|
132
|
+
response_mode: string;
|
|
133
|
+
response_type: string;
|
|
134
|
+
dcql_query: {
|
|
135
|
+
credentials: Array<{
|
|
136
|
+
id: string;
|
|
137
|
+
format: string;
|
|
138
|
+
meta: {
|
|
139
|
+
vct_values: string[];
|
|
140
|
+
credential_authorization_jwt: string;
|
|
141
|
+
};
|
|
142
|
+
claims?: string[];
|
|
143
|
+
}>;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Link strategy data.
|
|
149
|
+
* Used for iOS App Clips and Android App Links.
|
|
150
|
+
*/
|
|
151
|
+
export interface LinkData {
|
|
152
|
+
/** URL to redirect user to (App Clip or App Link) */
|
|
153
|
+
url: string;
|
|
154
|
+
/** URL to return to after authentication */
|
|
155
|
+
return_url?: string;
|
|
156
|
+
/** Status URL for polling authentication status */
|
|
157
|
+
status_url?: string;
|
|
158
|
+
/** Additional parameters */
|
|
159
|
+
params?: Record<string, string>;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Desktop strategy data.
|
|
163
|
+
* Used for QR code-based authentication from desktop browsers.
|
|
164
|
+
*/
|
|
165
|
+
export interface DesktopData {
|
|
166
|
+
/** Protocol version for QR authentication */
|
|
167
|
+
protocol?: string;
|
|
168
|
+
/** QR code and authentication data */
|
|
169
|
+
data: {
|
|
170
|
+
/** QR code image as base64 data URI */
|
|
171
|
+
qr_code_image?: string;
|
|
172
|
+
/** iOS-specific QR code image */
|
|
173
|
+
ios_qr_image?: string;
|
|
174
|
+
/** Android-specific QR code image */
|
|
175
|
+
android_qr_image?: string;
|
|
176
|
+
/** iOS authentication URL */
|
|
177
|
+
ios_url?: string;
|
|
178
|
+
/** Android authentication URL */
|
|
179
|
+
android_url?: string;
|
|
180
|
+
/** Unique session identifier for the QR code */
|
|
181
|
+
session_id?: string;
|
|
182
|
+
/** Status polling URL */
|
|
183
|
+
status_url?: string;
|
|
184
|
+
/** Mobile authentication URL */
|
|
185
|
+
url?: string;
|
|
186
|
+
/** Polling interval in milliseconds @default 2000 */
|
|
187
|
+
polling_interval?: number;
|
|
188
|
+
/** QR code expiration time in seconds */
|
|
189
|
+
expires_in?: number;
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Options for invokeSecurePrompt.
|
|
194
|
+
*
|
|
195
|
+
* IMPORTANT: invokeSecurePrompt must be called from a user gesture (button click)
|
|
196
|
+
* because both iOS App Clips and Android Digital Credentials API require
|
|
197
|
+
* transient activation (user interaction) to open system UI.
|
|
198
|
+
*/
|
|
199
|
+
export interface InvokeOptions {
|
|
200
|
+
/**
|
|
201
|
+
* Prevents SDK from showing its UI components.
|
|
202
|
+
* Only affects Desktop strategy (hides QR modal).
|
|
203
|
+
* When true, developer must show QR codes from PrepareResponse.data.
|
|
204
|
+
*
|
|
205
|
+
* @default false
|
|
206
|
+
*/
|
|
207
|
+
preventDefaultUI?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Custom polling endpoint.
|
|
210
|
+
* Overrides SDK config and backend-provided status URL.
|
|
211
|
+
*/
|
|
212
|
+
pollingEndpoint?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Polling interval in milliseconds.
|
|
215
|
+
* @default 2000
|
|
216
|
+
*/
|
|
217
|
+
pollingInterval?: number;
|
|
218
|
+
/**
|
|
219
|
+
* Maximum polling attempts before timeout.
|
|
220
|
+
* @default 30 (1 minute with 2s interval)
|
|
221
|
+
*/
|
|
222
|
+
maxPollingAttempts?: number;
|
|
223
|
+
/**
|
|
224
|
+
* Modal customization options.
|
|
225
|
+
* Only used when preventDefaultUI is false (Desktop strategy).
|
|
226
|
+
*/
|
|
227
|
+
modalOptions?: ModalOptions;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* View mode for the QR code modal.
|
|
231
|
+
* - 'toggle': Single QR with toggle button to switch between iOS/Android (default)
|
|
232
|
+
* - 'dual': Shows both iOS and Android QR codes side-by-side
|
|
233
|
+
* - 'pre-step': First shows OS choice, then shows the appropriate QR
|
|
234
|
+
*/
|
|
235
|
+
export type ModalViewMode = 'toggle' | 'dual' | 'pre-step';
|
|
236
|
+
/**
|
|
237
|
+
* Theme for the modal UI.
|
|
238
|
+
* - 'dark': Dark theme
|
|
239
|
+
* - 'light': Light theme
|
|
240
|
+
* - 'auto': Uses system preference (prefers-color-scheme)
|
|
241
|
+
*/
|
|
242
|
+
export type ModalTheme = 'dark' | 'light' | 'auto';
|
|
243
|
+
/**
|
|
244
|
+
* Modal customization options for Desktop QR code flow.
|
|
245
|
+
*/
|
|
246
|
+
export interface ModalOptions {
|
|
247
|
+
/**
|
|
248
|
+
* View mode for QR codes.
|
|
249
|
+
* @default 'toggle'
|
|
250
|
+
*/
|
|
251
|
+
viewMode?: ModalViewMode;
|
|
252
|
+
/**
|
|
253
|
+
* UI theme for the modal.
|
|
254
|
+
* @default 'auto'
|
|
255
|
+
*/
|
|
256
|
+
theme?: ModalTheme;
|
|
257
|
+
/** Title text for the modal */
|
|
258
|
+
title?: string;
|
|
259
|
+
/** Description text for the modal */
|
|
260
|
+
description?: string;
|
|
261
|
+
/** Whether to show close button @default true */
|
|
262
|
+
showCloseButton?: boolean;
|
|
263
|
+
/** Whether pressing Escape closes the modal @default true */
|
|
264
|
+
closeOnEscape?: boolean;
|
|
265
|
+
/** Whether clicking backdrop closes the modal @default true */
|
|
266
|
+
closeOnBackdropClick?: boolean;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Authentication credential result.
|
|
270
|
+
*/
|
|
271
|
+
export interface AuthCredential {
|
|
272
|
+
/** Authentication credential token */
|
|
273
|
+
credential: string;
|
|
274
|
+
/** Phone number if available */
|
|
275
|
+
phone_number?: PhoneNumber;
|
|
276
|
+
/** Session information */
|
|
277
|
+
session: SessionInfo;
|
|
278
|
+
/** Whether authentication was successful */
|
|
279
|
+
authenticated: boolean;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Unified result from invokeSecurePrompt.
|
|
283
|
+
* Same shape for all strategies (TS43, Link, Desktop).
|
|
284
|
+
*
|
|
285
|
+
* For TS43: credential promise resolves immediately.
|
|
286
|
+
* For Link/Desktop: credential promise resolves when polling completes.
|
|
287
|
+
*/
|
|
288
|
+
export interface InvokeResult {
|
|
289
|
+
/**
|
|
290
|
+
* Promise that resolves to the credential.
|
|
291
|
+
* For TS43: resolves immediately after user completes system prompt.
|
|
292
|
+
* For Link/Desktop: resolves when polling detects completion.
|
|
293
|
+
*/
|
|
294
|
+
credential: Promise<AuthCredential>;
|
|
295
|
+
/**
|
|
296
|
+
* Cancel the authentication flow.
|
|
297
|
+
* Causes credential promise to reject with error code 'CANCELLED'.
|
|
298
|
+
*
|
|
299
|
+
* For TS43: undefined (cannot cancel system prompt).
|
|
300
|
+
* For Link/Desktop: stops polling and rejects promise.
|
|
301
|
+
*
|
|
302
|
+
* To retry: call invokeSecurePrompt again from a new user gesture.
|
|
303
|
+
*/
|
|
304
|
+
cancel?: () => void;
|
|
305
|
+
/** Authentication strategy for this result */
|
|
306
|
+
strategy: AuthenticationStrategy;
|
|
307
|
+
/** Session information */
|
|
308
|
+
session: SessionInfo;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Request to get phone number from credential.
|
|
312
|
+
*/
|
|
313
|
+
export interface GetPhoneNumberRequest {
|
|
314
|
+
/** Session from PrepareResponse */
|
|
315
|
+
session: SessionInfo;
|
|
316
|
+
/** Credential string from InvokeResult */
|
|
317
|
+
credential: string;
|
|
318
|
+
/** Use case (always 'GetPhoneNumber' for this request) */
|
|
319
|
+
use_case: typeof USE_CASE.GET_PHONE_NUMBER;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Response with retrieved phone number.
|
|
323
|
+
*/
|
|
324
|
+
export interface GetPhoneNumberResponse {
|
|
325
|
+
/** E.164 format phone number */
|
|
326
|
+
phone_number: PhoneNumber;
|
|
327
|
+
/** Audience from carrier (optional) */
|
|
328
|
+
aud?: string;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Request to verify phone number with credential.
|
|
332
|
+
*/
|
|
333
|
+
export interface VerifyPhoneNumberRequest {
|
|
334
|
+
/** Session from PrepareResponse */
|
|
335
|
+
session: SessionInfo;
|
|
336
|
+
/** Credential string from InvokeResult */
|
|
337
|
+
credential: string;
|
|
338
|
+
/** Use case (always 'VerifyPhoneNumber' for this request) */
|
|
339
|
+
use_case: typeof USE_CASE.VERIFY_PHONE_NUMBER;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Response from phone number verification.
|
|
343
|
+
*/
|
|
344
|
+
export interface VerifyPhoneNumberResponse {
|
|
345
|
+
/** The phone number that was verified */
|
|
346
|
+
phone_number: PhoneNumber;
|
|
347
|
+
/** Whether verification was successful */
|
|
348
|
+
verified: boolean;
|
|
349
|
+
/** Audience from carrier (optional) */
|
|
350
|
+
aud?: string;
|
|
351
|
+
}
|
|
352
|
+
/** Union of all process response types */
|
|
353
|
+
export type PhoneAuthResult = GetPhoneNumberResponse | VerifyPhoneNumberResponse;
|
|
354
|
+
/**
|
|
355
|
+
* SDK configuration options.
|
|
356
|
+
*/
|
|
357
|
+
export interface AuthConfig {
|
|
358
|
+
/**
|
|
359
|
+
* Custom endpoints for authentication flow.
|
|
360
|
+
*/
|
|
361
|
+
endpoints?: {
|
|
362
|
+
/** Prepare endpoint @default '/api/magic-auth/prepare' */
|
|
363
|
+
prepare?: string;
|
|
364
|
+
/** Process endpoint @default '/api/magic-auth/process' */
|
|
365
|
+
process?: string;
|
|
366
|
+
/** Desktop/Link polling endpoint */
|
|
367
|
+
polling?: string;
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* Timeout for API calls in milliseconds.
|
|
371
|
+
* @default 30000
|
|
372
|
+
*/
|
|
373
|
+
timeout?: number;
|
|
374
|
+
/**
|
|
375
|
+
* Polling interval in milliseconds for status checks.
|
|
376
|
+
* @default 2000
|
|
377
|
+
*/
|
|
378
|
+
pollingInterval?: number;
|
|
379
|
+
/**
|
|
380
|
+
* Maximum polling attempts before timeout.
|
|
381
|
+
* @default 30 (1 minute with 2s interval)
|
|
382
|
+
*/
|
|
383
|
+
maxPollingAttempts?: number;
|
|
384
|
+
/**
|
|
385
|
+
* Enable debug logging.
|
|
386
|
+
* @default false
|
|
387
|
+
*/
|
|
388
|
+
debug?: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Developer environment for testing (e.g., 'dev1', 'dev2').
|
|
391
|
+
* When set, adds a 'developer' header to polling requests.
|
|
392
|
+
*/
|
|
393
|
+
devEnv?: string;
|
|
394
|
+
/**
|
|
395
|
+
* Developer tools configuration for debugging.
|
|
396
|
+
*/
|
|
397
|
+
devtools?: {
|
|
398
|
+
/**
|
|
399
|
+
* Show mobile console overlay for on-device debugging.
|
|
400
|
+
* Displays all console logs at the bottom of the screen.
|
|
401
|
+
* @default false
|
|
402
|
+
*/
|
|
403
|
+
showMobileConsole?: boolean;
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* Custom HTTP client.
|
|
407
|
+
* When provided, SDK uses this instead of built-in fetch.
|
|
408
|
+
*/
|
|
409
|
+
httpClient?: HttpClient;
|
|
410
|
+
/**
|
|
411
|
+
* Custom logger.
|
|
412
|
+
* When provided, SDK uses this for all logging.
|
|
413
|
+
*/
|
|
414
|
+
logger?: Logger;
|
|
415
|
+
/**
|
|
416
|
+
* Static headers to include in requests.
|
|
417
|
+
*/
|
|
418
|
+
headers?: HeaderConfig;
|
|
419
|
+
/**
|
|
420
|
+
* Dynamic headers function.
|
|
421
|
+
* Called before each request to get additional headers.
|
|
422
|
+
*/
|
|
423
|
+
dynamicHeaders?: (context: HeaderContext) => Record<string, string> | Promise<Record<string, string>>;
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* HTTP Client interface for BYOH (Bring Your Own HTTP).
|
|
427
|
+
* Implement this to use your own HTTP client (axios, ky, etc.).
|
|
428
|
+
*/
|
|
429
|
+
export interface HttpClient {
|
|
430
|
+
post<T>(url: string, body: unknown, options?: HttpOptions): Promise<T>;
|
|
431
|
+
get<T>(url: string, options?: HttpOptions): Promise<T>;
|
|
432
|
+
}
|
|
433
|
+
export interface HttpOptions {
|
|
434
|
+
headers?: Record<string, string>;
|
|
435
|
+
timeout?: number;
|
|
436
|
+
signal?: AbortSignal;
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Logger interface for custom logging.
|
|
440
|
+
* Implement this to integrate with your logging infrastructure.
|
|
441
|
+
*/
|
|
442
|
+
export interface Logger {
|
|
443
|
+
debug(message: string, data?: unknown): void;
|
|
444
|
+
info(message: string, data?: unknown): void;
|
|
445
|
+
warn(message: string, data?: unknown): void;
|
|
446
|
+
error(message: string, data?: unknown): void;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Header configuration for requests.
|
|
450
|
+
*/
|
|
451
|
+
export interface HeaderConfig {
|
|
452
|
+
/** Headers for all requests */
|
|
453
|
+
common?: Record<string, string>;
|
|
454
|
+
/** Headers for prepare requests */
|
|
455
|
+
prepare?: Record<string, string>;
|
|
456
|
+
/** Headers for process requests */
|
|
457
|
+
process?: Record<string, string>;
|
|
458
|
+
/** Headers for polling requests */
|
|
459
|
+
polling?: Record<string, string>;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Context passed to dynamicHeaders function.
|
|
463
|
+
*/
|
|
464
|
+
export interface HeaderContext {
|
|
465
|
+
endpoint: 'prepare' | 'process' | 'polling';
|
|
466
|
+
method: 'GET' | 'POST';
|
|
467
|
+
sessionId?: string;
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* SDK authentication error.
|
|
471
|
+
*/
|
|
472
|
+
export interface AuthError extends Error {
|
|
473
|
+
/** Machine-readable error code */
|
|
474
|
+
code: string;
|
|
475
|
+
/** HTTP status code (if from server) */
|
|
476
|
+
status?: number;
|
|
477
|
+
/** Additional error details */
|
|
478
|
+
details?: unknown;
|
|
479
|
+
/** Request tracking ID */
|
|
480
|
+
requestId?: string;
|
|
481
|
+
/** ISO 8601 timestamp */
|
|
482
|
+
timestamp?: string;
|
|
483
|
+
/** Seconds until retry allowed (for rate limits) */
|
|
484
|
+
retryAfter?: number;
|
|
485
|
+
/** Distributed tracing context */
|
|
486
|
+
traceId?: string;
|
|
487
|
+
spanId?: string;
|
|
488
|
+
service?: string;
|
|
489
|
+
/** Browser error details (for Digital Credentials API errors) */
|
|
490
|
+
browserError?: {
|
|
491
|
+
name: string;
|
|
492
|
+
message: string;
|
|
493
|
+
stack?: string;
|
|
494
|
+
code?: number;
|
|
495
|
+
};
|
|
496
|
+
/** Context about when/where error occurred */
|
|
497
|
+
context?: {
|
|
498
|
+
step?: 'prepare' | 'invoke' | 'process';
|
|
499
|
+
useCase?: UseCase;
|
|
500
|
+
timestamp: string;
|
|
501
|
+
userAgent?: string;
|
|
502
|
+
url?: string;
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Browser Digital Credential type (extends standard Credential).
|
|
507
|
+
*/
|
|
508
|
+
export interface DigitalCredential extends Credential {
|
|
509
|
+
data: {
|
|
510
|
+
vp_token: {
|
|
511
|
+
[aggregatorId: string]: string | string[];
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Browser credential request structure for Digital Credentials API.
|
|
517
|
+
*/
|
|
518
|
+
export interface SecureCredentialRequest {
|
|
519
|
+
digital: {
|
|
520
|
+
requests: Array<{
|
|
521
|
+
protocol: string;
|
|
522
|
+
data: unknown;
|
|
523
|
+
}>;
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Response from browser's Digital Credentials API.
|
|
528
|
+
*/
|
|
529
|
+
export interface SecureCredentialResponse {
|
|
530
|
+
vp_token: {
|
|
531
|
+
[aggregator_id: string]: string | string[];
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;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