@glideidentity/glide-be-node-magical-auth 2.0.0
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/LICENSE +35 -0
- package/README.md +341 -0
- package/dist/index.cjs +1275 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +419 -0
- package/dist/index.d.ts +419 -0
- package/dist/index.js +1204 -0
- package/dist/index.js.map +1 -0
- package/dist/types-DKfytuP6.d.cts +858 -0
- package/dist/types-DKfytuP6.d.ts +858 -0
- package/dist/types.cjs +19 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,858 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP client interface for custom implementations (BYOC - Bring Your Own Client).
|
|
3
|
+
* Defaults to native fetch if not provided.
|
|
4
|
+
*/
|
|
5
|
+
interface HttpClient {
|
|
6
|
+
request(options: HttpRequestOptions): Promise<HttpResponse>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Options for making an HTTP request.
|
|
10
|
+
*/
|
|
11
|
+
interface HttpRequestOptions {
|
|
12
|
+
method: string;
|
|
13
|
+
url: string;
|
|
14
|
+
headers: Record<string, string>;
|
|
15
|
+
body?: string;
|
|
16
|
+
signal?: AbortSignal;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* HTTP response interface matching the native Response API.
|
|
20
|
+
*/
|
|
21
|
+
interface HttpResponse {
|
|
22
|
+
ok: boolean;
|
|
23
|
+
status: number;
|
|
24
|
+
headers: Headers;
|
|
25
|
+
json(): Promise<unknown>;
|
|
26
|
+
text(): Promise<string>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Logger interface for custom implementations (BYOL - Bring Your Own Logger).
|
|
30
|
+
* Defaults to no-op if not provided.
|
|
31
|
+
*/
|
|
32
|
+
interface Logger {
|
|
33
|
+
debug(message: string, meta?: Record<string, unknown>): void;
|
|
34
|
+
info(message: string, meta?: Record<string, unknown>): void;
|
|
35
|
+
warn(message: string, meta?: Record<string, unknown>): void;
|
|
36
|
+
error(message: string, meta?: Record<string, unknown>): void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Default HTTP client implementation using native fetch.
|
|
40
|
+
*/
|
|
41
|
+
declare const defaultHttpClient: HttpClient;
|
|
42
|
+
/**
|
|
43
|
+
* Default no-op logger implementation.
|
|
44
|
+
*/
|
|
45
|
+
declare const noopLogger: Logger;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Configuration options for MagicalAuthClient.
|
|
49
|
+
*/
|
|
50
|
+
interface MagicalAuthConfig {
|
|
51
|
+
/** OAuth2 client ID (required) */
|
|
52
|
+
clientId: string;
|
|
53
|
+
/** OAuth2 client secret (required) */
|
|
54
|
+
clientSecret: string;
|
|
55
|
+
/** API base URL (default: https://api.glideidentity.app) */
|
|
56
|
+
baseUrl?: string;
|
|
57
|
+
/** Custom HTTP client (default: native fetch) */
|
|
58
|
+
httpClient?: HttpClient;
|
|
59
|
+
/** Custom logger (default: no-op) */
|
|
60
|
+
logger?: Logger;
|
|
61
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
62
|
+
timeout?: number;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Internal resolved configuration with all defaults applied.
|
|
66
|
+
*/
|
|
67
|
+
interface ResolvedConfig {
|
|
68
|
+
readonly clientId: string;
|
|
69
|
+
readonly clientSecret: string;
|
|
70
|
+
readonly baseUrl: string;
|
|
71
|
+
readonly httpClient: HttpClient;
|
|
72
|
+
readonly logger: Logger;
|
|
73
|
+
readonly timeout: number;
|
|
74
|
+
}
|
|
75
|
+
/** Default API base URL */
|
|
76
|
+
declare const DEFAULT_BASE_URL = "https://api.glideidentity.app";
|
|
77
|
+
/** Default request timeout in milliseconds */
|
|
78
|
+
declare const DEFAULT_TIMEOUT = 30000;
|
|
79
|
+
/**
|
|
80
|
+
* Resolves user-provided configuration with defaults.
|
|
81
|
+
* @param config - User-provided configuration
|
|
82
|
+
* @returns Fully resolved configuration with defaults applied
|
|
83
|
+
*/
|
|
84
|
+
declare function resolveConfig(config: MagicalAuthConfig): ResolvedConfig;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Use case for authentication.
|
|
88
|
+
* Use `UseCase.GET_PHONE_NUMBER` or `UseCase.VERIFY_PHONE_NUMBER` instead of raw strings.
|
|
89
|
+
*/
|
|
90
|
+
declare const UseCase: {
|
|
91
|
+
readonly GET_PHONE_NUMBER: "GetPhoneNumber";
|
|
92
|
+
readonly VERIFY_PHONE_NUMBER: "VerifyPhoneNumber";
|
|
93
|
+
};
|
|
94
|
+
type UseCase = (typeof UseCase)[keyof typeof UseCase];
|
|
95
|
+
/**
|
|
96
|
+
* Authentication strategy returned by prepare.
|
|
97
|
+
* Use `AuthenticationStrategy.TS43`, `.LINK`, or `.DESKTOP` instead of raw strings.
|
|
98
|
+
*/
|
|
99
|
+
declare const AuthenticationStrategy: {
|
|
100
|
+
readonly TS43: "ts43";
|
|
101
|
+
readonly LINK: "link";
|
|
102
|
+
readonly DESKTOP: "desktop";
|
|
103
|
+
readonly NONE: "";
|
|
104
|
+
};
|
|
105
|
+
type AuthenticationStrategy = (typeof AuthenticationStrategy)[keyof typeof AuthenticationStrategy];
|
|
106
|
+
/**
|
|
107
|
+
* Protocol type for authentication.
|
|
108
|
+
*/
|
|
109
|
+
type ProtocolType = 'ts43' | 'link' | 'desktop';
|
|
110
|
+
/**
|
|
111
|
+
* Session status for polling.
|
|
112
|
+
* Use `SessionStatus.PENDING`, `.SCANNED`, etc. instead of raw strings.
|
|
113
|
+
*/
|
|
114
|
+
declare const SessionStatus: {
|
|
115
|
+
readonly PENDING: "pending";
|
|
116
|
+
readonly SCANNED: "scanned";
|
|
117
|
+
readonly PENDING_COMPLETION: "pending_completion";
|
|
118
|
+
readonly COMPLETED: "completed";
|
|
119
|
+
readonly FAILED: "failed";
|
|
120
|
+
};
|
|
121
|
+
type SessionStatus = (typeof SessionStatus)[keyof typeof SessionStatus];
|
|
122
|
+
/**
|
|
123
|
+
* SIM swap risk level.
|
|
124
|
+
*/
|
|
125
|
+
type RiskLevel = 'RISK_LEVEL_HIGH' | 'RISK_LEVEL_MEDIUM' | 'RISK_LEVEL_LOW' | 'RISK_LEVEL_UNKNOWN';
|
|
126
|
+
/**
|
|
127
|
+
* SIM swap check failure reason.
|
|
128
|
+
*/
|
|
129
|
+
type SimSwapFailureReason = 'timeout' | 'carrier_not_supported' | 'disabled' | 'error';
|
|
130
|
+
/**
|
|
131
|
+
* PLMN (Public Land Mobile Network) identifier.
|
|
132
|
+
*/
|
|
133
|
+
interface PLMN {
|
|
134
|
+
/** Mobile Country Code (3 digits) */
|
|
135
|
+
mcc: string;
|
|
136
|
+
/** Mobile Network Code (2-3 digits) */
|
|
137
|
+
mnc: string;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Client information for strategy selection.
|
|
141
|
+
*
|
|
142
|
+
* **IMPORTANT:** The `user_agent` field MUST be the actual browser's `navigator.userAgent`
|
|
143
|
+
* from the end-user's device, NOT the server's user agent. The SDK runs on your backend,
|
|
144
|
+
* but this value must come from your frontend (e.g., passed via your API).
|
|
145
|
+
*/
|
|
146
|
+
interface ClientInfo {
|
|
147
|
+
/**
|
|
148
|
+
* End-user's browser user agent string (REQUIRED).
|
|
149
|
+
* Must be captured from the frontend via `navigator.userAgent`.
|
|
150
|
+
*
|
|
151
|
+
* The backend uses the user agent (alongside other device/client signals) to
|
|
152
|
+
* pick a strategy: `TS43` for clients with a Digital Credentials surface,
|
|
153
|
+
* `LINK` for the mobile redirect flow, and `DESKTOP` when running on a
|
|
154
|
+
* non-mobile browser.
|
|
155
|
+
*/
|
|
156
|
+
user_agent: string;
|
|
157
|
+
/** Platform identifier from the end-user's browser (e.g., navigator.platform) */
|
|
158
|
+
platform?: string;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* User consent data for authentication.
|
|
162
|
+
*/
|
|
163
|
+
interface ConsentData {
|
|
164
|
+
/** User consent text */
|
|
165
|
+
consent_text: string;
|
|
166
|
+
/** Link to privacy policy */
|
|
167
|
+
policy_link: string;
|
|
168
|
+
/** Privacy policy text */
|
|
169
|
+
policy_text?: string;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Session information from prepare response.
|
|
173
|
+
*/
|
|
174
|
+
interface SessionInfo {
|
|
175
|
+
/** Hex string session key (16-char hex) */
|
|
176
|
+
session_key: string;
|
|
177
|
+
/** Session nonce for replay attack prevention */
|
|
178
|
+
nonce?: string;
|
|
179
|
+
/** Protocol type used for authentication */
|
|
180
|
+
protocol_type?: ProtocolType;
|
|
181
|
+
/** Additional session metadata (internal use) */
|
|
182
|
+
metadata?: Record<string, string>;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* SIM swap check result.
|
|
186
|
+
*/
|
|
187
|
+
interface SimSwapInfo {
|
|
188
|
+
/** Whether the SIM swap check completed successfully */
|
|
189
|
+
checked: boolean;
|
|
190
|
+
/** Fraud risk level based on SIM swap recency */
|
|
191
|
+
risk_level?: RiskLevel;
|
|
192
|
+
/** Time band since last SIM change */
|
|
193
|
+
age_band?: string;
|
|
194
|
+
/** Carrier that performed the SIM swap check */
|
|
195
|
+
carrier_name?: string;
|
|
196
|
+
/** When the SIM swap check was performed (RFC3339) */
|
|
197
|
+
checked_at?: string;
|
|
198
|
+
/** Reason for check failure (only present when checked=false) */
|
|
199
|
+
reason?: SimSwapFailureReason;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Information about the device that scanned the QR code.
|
|
203
|
+
* Only present when status is "scanned" or later.
|
|
204
|
+
*/
|
|
205
|
+
interface DeviceInfo {
|
|
206
|
+
/** Device type/model (e.g., "iPhone 14") */
|
|
207
|
+
type: string;
|
|
208
|
+
/** Operating system and version (e.g., "iOS 17.1") */
|
|
209
|
+
os: string;
|
|
210
|
+
/** Browser name and version (optional, may not be present for native apps) */
|
|
211
|
+
browser?: string;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Device swap (IMEI change) check result.
|
|
215
|
+
* Present when the carrier supports device swap detection.
|
|
216
|
+
* Parallel and independent signal alongside SimSwapInfo.
|
|
217
|
+
*/
|
|
218
|
+
interface DeviceSwapInfo {
|
|
219
|
+
/** Whether the device swap check completed successfully */
|
|
220
|
+
checked: boolean;
|
|
221
|
+
/** Fraud risk level based on device swap recency */
|
|
222
|
+
risk_level?: RiskLevel;
|
|
223
|
+
/** Time band since last device (IMEI) change */
|
|
224
|
+
age_band?: string;
|
|
225
|
+
/** Carrier that performed the device swap check */
|
|
226
|
+
carrier_name?: string;
|
|
227
|
+
/** When the device swap check was performed (RFC3339) */
|
|
228
|
+
checked_at?: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Parsed components of an E.164 phone number.
|
|
232
|
+
*/
|
|
233
|
+
interface PhoneNumberDetails {
|
|
234
|
+
/** ITU E.164 country calling code (1, 44, 972, etc.) */
|
|
235
|
+
country_code: number;
|
|
236
|
+
/** National significant number without trunk prefix or formatting */
|
|
237
|
+
national_number: string;
|
|
238
|
+
/** ISO 3166-1 alpha-2 country code ("US", "GB", "IL") */
|
|
239
|
+
region_code: string;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Visual verification code for desktop-mobile QR authentication.
|
|
243
|
+
*/
|
|
244
|
+
interface Challenge {
|
|
245
|
+
/** 4-character hex pattern displayed for visual verification */
|
|
246
|
+
pattern?: string;
|
|
247
|
+
/** Hex color code for the challenge display */
|
|
248
|
+
color?: string;
|
|
249
|
+
/** Associated session ID */
|
|
250
|
+
session_id?: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* UI theme for consistent visual experience across all authentication
|
|
255
|
+
* touchpoints (SDK modals, mobile app, OAuth redirect pages).
|
|
256
|
+
*
|
|
257
|
+
* Free-form string (max 32 characters). The aggregator forwards the value
|
|
258
|
+
* verbatim into the mobile-auth URL and session metadata; callers can use
|
|
259
|
+
* the built-in `"dark"` / `"light"` palettes or pass any custom identifier
|
|
260
|
+
* understood by their downstream surfaces.
|
|
261
|
+
*
|
|
262
|
+
* @example "dark"
|
|
263
|
+
* @example "light"
|
|
264
|
+
*/
|
|
265
|
+
type Theme = string;
|
|
266
|
+
/**
|
|
267
|
+
* Link strategy dispatch override.
|
|
268
|
+
* Only applies to Link authentication strategy; ignored for TS43/Desktop.
|
|
269
|
+
*/
|
|
270
|
+
type LinkType = 'app_clip' | 'app_link' | 'headless' | 'web_link';
|
|
271
|
+
/**
|
|
272
|
+
* Advanced options for prepare requests.
|
|
273
|
+
*/
|
|
274
|
+
interface PrepareOptions {
|
|
275
|
+
/**
|
|
276
|
+
* Parent session ID for desktop-mobile binding.
|
|
277
|
+
* When a mobile device scans a desktop QR code, the mobile session (child)
|
|
278
|
+
* links back to the desktop session (parent).
|
|
279
|
+
*/
|
|
280
|
+
parent_session_id?: string;
|
|
281
|
+
/**
|
|
282
|
+
* UI theme for consistent visual experience across all touchpoints.
|
|
283
|
+
* Affects SDK modals, mobile app, and OAuth redirect pages.
|
|
284
|
+
* @default "dark"
|
|
285
|
+
*/
|
|
286
|
+
theme?: Theme;
|
|
287
|
+
/**
|
|
288
|
+
* Override link strategy dispatch.
|
|
289
|
+
* Only applies to Link authentication strategy; ignored for TS43/Desktop.
|
|
290
|
+
*/
|
|
291
|
+
link_type?: LinkType;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Request body for prepare authentication.
|
|
295
|
+
*/
|
|
296
|
+
interface PrepareRequest {
|
|
297
|
+
/**
|
|
298
|
+
* Phone number in E.164 format (for VerifyPhoneNumber).
|
|
299
|
+
* @example "+14155551234"
|
|
300
|
+
*/
|
|
301
|
+
phone_number?: string;
|
|
302
|
+
/** PLMN identifier for carrier detection */
|
|
303
|
+
plmn?: PLMN;
|
|
304
|
+
/**
|
|
305
|
+
* Nonce for replay protection. Auto-generated by the SDK if not provided.
|
|
306
|
+
* @example "8WSXfuM2RFsC648x6_F4BwgygSgpJSYR1VYNFnslxFQ"
|
|
307
|
+
*/
|
|
308
|
+
nonce?: string;
|
|
309
|
+
/**
|
|
310
|
+
* The use case for authentication.
|
|
311
|
+
* Required unless `options.parent_session_id` is provided (child sessions
|
|
312
|
+
* inherit the use case from the parent desktop session).
|
|
313
|
+
*/
|
|
314
|
+
use_case?: UseCase;
|
|
315
|
+
/** User consent data */
|
|
316
|
+
consent_data?: ConsentData;
|
|
317
|
+
/**
|
|
318
|
+
* Client information for strategy selection (REQUIRED).
|
|
319
|
+
* Must contain the end-user's browser user agent from your frontend.
|
|
320
|
+
*/
|
|
321
|
+
client_info: ClientInfo;
|
|
322
|
+
/**
|
|
323
|
+
* SHA256 hash of fe_code for device binding (link protocol).
|
|
324
|
+
* Set automatically by the SDK — callers should not set this directly.
|
|
325
|
+
*/
|
|
326
|
+
fe_hash?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Base64-encoded x963 P-256 public key (65 bytes unencoded) for native device binding.
|
|
329
|
+
* Generated by the mobile app's Secure Enclave (iOS) or TEE (Android).
|
|
330
|
+
* Only used for native link protocol sessions — web sessions use fe_hash instead.
|
|
331
|
+
*/
|
|
332
|
+
public_key?: string;
|
|
333
|
+
/** Advanced options */
|
|
334
|
+
options?: PrepareOptions;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Extended prepare result returned by the SDK.
|
|
338
|
+
* Wraps the aggregator's PrepareResponse with the SDK-generated fe_code
|
|
339
|
+
* when the authentication strategy is 'link'.
|
|
340
|
+
*/
|
|
341
|
+
interface PrepareResult extends PrepareResponse {
|
|
342
|
+
/**
|
|
343
|
+
* Frontend binding code for device-bound link protocol sessions.
|
|
344
|
+
* Only present when `authentication_strategy === 'link'`.
|
|
345
|
+
* The caller MUST set this as an HttpOnly cookie using `buildSetBindingCookieHeader()`.
|
|
346
|
+
*/
|
|
347
|
+
feCode?: string;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Response from prepare authentication.
|
|
351
|
+
*/
|
|
352
|
+
interface PrepareResponse {
|
|
353
|
+
/** Selected authentication strategy */
|
|
354
|
+
authentication_strategy: AuthenticationStrategy;
|
|
355
|
+
/** Session information */
|
|
356
|
+
session: SessionInfo;
|
|
357
|
+
/**
|
|
358
|
+
* Strategy-specific data.
|
|
359
|
+
* The actual type depends on authentication_strategy:
|
|
360
|
+
* - 'ts43': TS43StrategyData - Contains protocol, data with dcql_query
|
|
361
|
+
* - 'link': LinkStrategyData - Contains url, return_url, status_url, params
|
|
362
|
+
* - 'desktop': DesktopStrategyData - Contains protocol, data with a single universal QR image and URL
|
|
363
|
+
*/
|
|
364
|
+
data: StrategyData;
|
|
365
|
+
/** Visual verification challenge (for desktop strategy) */
|
|
366
|
+
challenge?: Challenge;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* DCQL credential request specification.
|
|
371
|
+
*/
|
|
372
|
+
interface DCQLCredential {
|
|
373
|
+
/** Credential identifier */
|
|
374
|
+
id: string;
|
|
375
|
+
/** Credential format type (e.g., "dc-authorization+sd-jwt") */
|
|
376
|
+
format: string;
|
|
377
|
+
/** Credential metadata */
|
|
378
|
+
meta: DCQLCredentialMeta;
|
|
379
|
+
/** Requested claims from the credential */
|
|
380
|
+
claims?: string[];
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* DCQL credential metadata.
|
|
384
|
+
*/
|
|
385
|
+
interface DCQLCredentialMeta {
|
|
386
|
+
/** Verifiable Credential Type values */
|
|
387
|
+
vct_values: string[];
|
|
388
|
+
/** JWT for credential authorization containing encryption keys */
|
|
389
|
+
credential_authorization_jwt: string;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* DCQL query structure for TS43.
|
|
393
|
+
*/
|
|
394
|
+
interface DCQLQuery {
|
|
395
|
+
/** Array of credential requests */
|
|
396
|
+
credentials: DCQLCredential[];
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* TS43 request data — the OpenID4VP payload passed to the Digital Credentials API
|
|
400
|
+
* (browser `navigator.credentials.get` or native Android Credential Manager).
|
|
401
|
+
*/
|
|
402
|
+
interface TS43RequestData {
|
|
403
|
+
/** Request nonce for replay attack prevention */
|
|
404
|
+
nonce: string;
|
|
405
|
+
/** Response mode for the credential request (e.g., "dc_api") */
|
|
406
|
+
response_mode: string;
|
|
407
|
+
/** Expected response type (e.g., "vp_token") */
|
|
408
|
+
response_type: string;
|
|
409
|
+
/** DCQL credential query */
|
|
410
|
+
dcql_query: DCQLQuery;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* TS43 protocol data.
|
|
414
|
+
* Used when authentication_strategy is 'ts43'.
|
|
415
|
+
*/
|
|
416
|
+
interface TS43StrategyData {
|
|
417
|
+
/** Protocol identifier (e.g., "openid4vp-v1-unsigned") */
|
|
418
|
+
protocol: string;
|
|
419
|
+
/** OpenID4VP request data for the Digital Credentials API */
|
|
420
|
+
data: TS43RequestData;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Link/OAuth strategy data.
|
|
424
|
+
* Used when authentication_strategy is 'link'.
|
|
425
|
+
*/
|
|
426
|
+
interface LinkStrategyData {
|
|
427
|
+
/** OAuth authorization URL to redirect user to */
|
|
428
|
+
url: string;
|
|
429
|
+
/** URL to return to after OAuth completion */
|
|
430
|
+
return_url?: string;
|
|
431
|
+
/** URL to poll for authentication status */
|
|
432
|
+
status_url?: string;
|
|
433
|
+
/** Additional OAuth parameters */
|
|
434
|
+
params?: Record<string, string>;
|
|
435
|
+
/**
|
|
436
|
+
* Server-generated frontend binding code.
|
|
437
|
+
* Only present when `fe_hash` was NOT provided in the prepare request.
|
|
438
|
+
* Must be delivered to the browser as an HttpOnly cookie.
|
|
439
|
+
*/
|
|
440
|
+
fe_code?: string;
|
|
441
|
+
/** How the client SDK should complete the link flow. */
|
|
442
|
+
link_type?: LinkType;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Desktop QR code data for cross-device authentication.
|
|
446
|
+
*
|
|
447
|
+
* A single universal QR/URL is returned. The Mobile Auth companion app
|
|
448
|
+
* detects the device at runtime and picks TS43 (Android) or Link (iOS).
|
|
449
|
+
*/
|
|
450
|
+
interface DesktopQRData {
|
|
451
|
+
/** Session ID for linking desktop and mobile */
|
|
452
|
+
session_id: string;
|
|
453
|
+
/** Base64-encoded PNG of the universal QR code (data URL). */
|
|
454
|
+
qr_image: string;
|
|
455
|
+
/** Universal mobile auth URL encoded in the QR. The mobile app picks the strategy at runtime. */
|
|
456
|
+
url: string;
|
|
457
|
+
/** URL to poll for authentication status */
|
|
458
|
+
status_url: string;
|
|
459
|
+
/** Visual verification challenge */
|
|
460
|
+
challenge?: Challenge;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Desktop QR code strategy data for cross-device authentication.
|
|
464
|
+
* Used when authentication_strategy is 'desktop'.
|
|
465
|
+
*/
|
|
466
|
+
interface DesktopStrategyData {
|
|
467
|
+
/** Protocol identifier for QR authentication (e.g., "qr-auth-v1") */
|
|
468
|
+
protocol: string;
|
|
469
|
+
/** QR code and session binding information */
|
|
470
|
+
data: DesktopQRData;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Union type for strategy-specific data.
|
|
474
|
+
* The actual type depends on the authentication_strategy value.
|
|
475
|
+
*/
|
|
476
|
+
type StrategyData = TS43StrategyData | LinkStrategyData | DesktopStrategyData;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Request body for verify phone number.
|
|
480
|
+
*/
|
|
481
|
+
interface VerifyPhoneNumberRequest {
|
|
482
|
+
/** Session information from prepare response */
|
|
483
|
+
session: SessionInfo;
|
|
484
|
+
/** SD-JWT credential string from digital credential */
|
|
485
|
+
credential: string;
|
|
486
|
+
/** Device binding code for link protocol sessions (from _glide_bind cookie) */
|
|
487
|
+
fe_code?: string;
|
|
488
|
+
/**
|
|
489
|
+
* Base64-encoded DER ECDSA signature for native device binding.
|
|
490
|
+
* The native app signs "{session_key}:{credential}" with its SE/TEE private key.
|
|
491
|
+
* Only used for native link protocol sessions — web sessions use fe_code instead.
|
|
492
|
+
*/
|
|
493
|
+
signature?: string;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Response from verify phone number.
|
|
497
|
+
*/
|
|
498
|
+
interface VerifyPhoneNumberResponse {
|
|
499
|
+
/** The phone number that was verified (E.164 format) */
|
|
500
|
+
phone_number: string;
|
|
501
|
+
/** Whether the phone number matches the device */
|
|
502
|
+
verified: boolean;
|
|
503
|
+
/** Audience from TS43 response (when available) */
|
|
504
|
+
aud?: string;
|
|
505
|
+
/** SIM swap check result (when enabled) */
|
|
506
|
+
sim_swap?: SimSwapInfo;
|
|
507
|
+
/** Device swap (IMEI change) check result (when supported by carrier) */
|
|
508
|
+
device_swap?: DeviceSwapInfo;
|
|
509
|
+
/** Parsed phone number components (optional, server-populated) */
|
|
510
|
+
phone_number_details?: PhoneNumberDetails;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Request body for get phone number.
|
|
515
|
+
*/
|
|
516
|
+
interface GetPhoneNumberRequest {
|
|
517
|
+
/** Session information from prepare response */
|
|
518
|
+
session: SessionInfo;
|
|
519
|
+
/** SD-JWT credential string from digital credential */
|
|
520
|
+
credential: string;
|
|
521
|
+
/** Device binding code for link protocol sessions (from _glide_bind cookie) */
|
|
522
|
+
fe_code?: string;
|
|
523
|
+
/**
|
|
524
|
+
* Base64-encoded DER ECDSA signature for native device binding.
|
|
525
|
+
* The native app signs "{session_key}:{credential}" with its SE/TEE private key.
|
|
526
|
+
* Only used for native link protocol sessions — web sessions use fe_code instead.
|
|
527
|
+
*/
|
|
528
|
+
signature?: string;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Response from get phone number.
|
|
532
|
+
*/
|
|
533
|
+
interface GetPhoneNumberResponse {
|
|
534
|
+
/** The retrieved phone number (E.164 format) */
|
|
535
|
+
phone_number: string;
|
|
536
|
+
/** Audience from TS43 response (when available) */
|
|
537
|
+
aud?: string;
|
|
538
|
+
/** SIM swap check result (when enabled) */
|
|
539
|
+
sim_swap?: SimSwapInfo;
|
|
540
|
+
/** Device swap (IMEI change) check result (when supported by carrier) */
|
|
541
|
+
device_swap?: DeviceSwapInfo;
|
|
542
|
+
/** Parsed phone number components (optional, server-populated) */
|
|
543
|
+
phone_number_details?: PhoneNumberDetails;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Response from status polling endpoints.
|
|
548
|
+
*
|
|
549
|
+
* Note: This endpoint does NOT expose phone_number or verification results directly.
|
|
550
|
+
* Sensitive data is only returned via the protected verify/get-phone-number endpoints
|
|
551
|
+
* which require authentication.
|
|
552
|
+
*/
|
|
553
|
+
interface StatusResponse {
|
|
554
|
+
/** The session identifier (16-char hex) */
|
|
555
|
+
session_key: string;
|
|
556
|
+
/** Current status of the verification request */
|
|
557
|
+
status: SessionStatus;
|
|
558
|
+
/** Protocol used for authentication (optional) */
|
|
559
|
+
protocol?: ProtocolType;
|
|
560
|
+
/** Session creation timestamp (ISO 8601) */
|
|
561
|
+
created_at: string;
|
|
562
|
+
/** Last status update timestamp (ISO 8601) */
|
|
563
|
+
last_updated: string;
|
|
564
|
+
/** Device info (only present when status is "scanned" or later) */
|
|
565
|
+
device_info?: DeviceInfo;
|
|
566
|
+
/** Grace period expiry time (only present when status is "scanned") */
|
|
567
|
+
grace_expires_at?: string;
|
|
568
|
+
/** Timestamp when the QR code was scanned */
|
|
569
|
+
scanned_at?: string;
|
|
570
|
+
/** Additional metadata (e.g., error reason for failed status) */
|
|
571
|
+
extra?: Record<string, unknown>;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Request body for report invocation.
|
|
576
|
+
*/
|
|
577
|
+
interface ReportInvocationRequest {
|
|
578
|
+
/** The session identifier for the invocation */
|
|
579
|
+
session_id: string;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Response from report invocation.
|
|
583
|
+
*
|
|
584
|
+
* The backend returns `{ "success": true }` on 2xx. Invocation recording is
|
|
585
|
+
* idempotent — reporting the same `session_id` twice also returns
|
|
586
|
+
* `{ success: true }`.
|
|
587
|
+
*/
|
|
588
|
+
interface ReportInvocationResponse {
|
|
589
|
+
/** Whether the invocation was recorded successfully. */
|
|
590
|
+
success: boolean;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Configuration for {@link createLogger}.
|
|
595
|
+
*/
|
|
596
|
+
interface LoggerConfig {
|
|
597
|
+
/**
|
|
598
|
+
* Enable logging. When `false` (default) the returned logger is silent at
|
|
599
|
+
* every level. Set to `true` to route output through `console.*`. Partners
|
|
600
|
+
* with their own structured logger (Pino, Winston, Bunyan, Datadog, etc.)
|
|
601
|
+
* should pass it via `MagicalAuthConfig.logger` instead — this factory is
|
|
602
|
+
* intended for local development and quick smoke tests.
|
|
603
|
+
*/
|
|
604
|
+
debug?: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* Prefix prepended to every log message. Default: `[GlideMagicalAuth]`.
|
|
607
|
+
*/
|
|
608
|
+
prefix?: string;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Creates a console logger with PII sanitization and a configurable prefix.
|
|
613
|
+
*
|
|
614
|
+
* Default-silent — call with no args (or `debug: false`) and every level is
|
|
615
|
+
* a no-op. Set `debug: true` to opt into console output. Phone numbers,
|
|
616
|
+
* JWTs, and explicit `session_key=…` values are auto-masked; object fields
|
|
617
|
+
* named `phone_number`, `credential`, `token`, `password`, `secret`, or
|
|
618
|
+
* `fe_code` are redacted to `[REDACTED]`.
|
|
619
|
+
*
|
|
620
|
+
* @example
|
|
621
|
+
* ```typescript
|
|
622
|
+
* import { MagicalAuthClient, createLogger } from '@glideidentity/glide-be-node-magical-auth';
|
|
623
|
+
*
|
|
624
|
+
* const client = new MagicalAuthClient({
|
|
625
|
+
* clientId: process.env.GLIDE_CLIENT_ID!,
|
|
626
|
+
* clientSecret: process.env.GLIDE_CLIENT_SECRET!,
|
|
627
|
+
* logger: createLogger({ debug: true }),
|
|
628
|
+
* });
|
|
629
|
+
* ```
|
|
630
|
+
*/
|
|
631
|
+
declare function createLogger(config?: LoggerConfig): Logger;
|
|
632
|
+
/**
|
|
633
|
+
* Recursively redacts PII from a log payload (string, array, or object).
|
|
634
|
+
* Exported for partners who want the same redaction in their own logger.
|
|
635
|
+
*/
|
|
636
|
+
declare function sanitize(data: unknown): unknown;
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Error codes returned by the Magical Auth API.
|
|
640
|
+
* Use `ErrorCode.SESSION_NOT_FOUND`, `ErrorCode.VALIDATION_ERROR`, etc. instead of raw strings.
|
|
641
|
+
*/
|
|
642
|
+
declare const ErrorCode: {
|
|
643
|
+
readonly BAD_REQUEST: "BAD_REQUEST";
|
|
644
|
+
readonly UNAUTHORIZED: "UNAUTHORIZED";
|
|
645
|
+
readonly VALIDATION_ERROR: "VALIDATION_ERROR";
|
|
646
|
+
readonly MISSING_PARAMETERS: "MISSING_PARAMETERS";
|
|
647
|
+
readonly SESSION_NOT_FOUND: "SESSION_NOT_FOUND";
|
|
648
|
+
readonly INVALID_VERIFICATION: "INVALID_VERIFICATION";
|
|
649
|
+
readonly CARRIER_NOT_ELIGIBLE: "CARRIER_NOT_ELIGIBLE";
|
|
650
|
+
readonly UNSUPPORTED_PLATFORM: "UNSUPPORTED_PLATFORM";
|
|
651
|
+
readonly PHONE_NUMBER_MISMATCH: "PHONE_NUMBER_MISMATCH";
|
|
652
|
+
readonly INVALID_CREDENTIAL_FORMAT: "INVALID_CREDENTIAL_FORMAT";
|
|
653
|
+
readonly FORBIDDEN: "FORBIDDEN";
|
|
654
|
+
readonly AUDIENCE_VALIDATION_FAILED: "AUDIENCE_VALIDATION_FAILED";
|
|
655
|
+
readonly BROWSER_MISMATCH: "BROWSER_MISMATCH";
|
|
656
|
+
readonly QR_ALREADY_SCANNED: "QR_ALREADY_SCANNED";
|
|
657
|
+
readonly SESSION_NOT_ELIGIBLE: "SESSION_NOT_ELIGIBLE";
|
|
658
|
+
readonly SESSION_EXPIRED: "SESSION_EXPIRED";
|
|
659
|
+
readonly DEVICE_BINDING_FAILED: "DEVICE_BINDING_FAILED";
|
|
660
|
+
readonly MISSING_BINDING_COOKIE: "MISSING_BINDING_COOKIE";
|
|
661
|
+
readonly RATE_LIMIT_EXCEEDED: "RATE_LIMIT_EXCEEDED";
|
|
662
|
+
readonly INTERNAL_SERVER_ERROR: "INTERNAL_SERVER_ERROR";
|
|
663
|
+
readonly SERVICE_UNAVAILABLE: "SERVICE_UNAVAILABLE";
|
|
664
|
+
};
|
|
665
|
+
type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
666
|
+
/**
|
|
667
|
+
* Error response structure from the API.
|
|
668
|
+
*/
|
|
669
|
+
interface ErrorResponse {
|
|
670
|
+
code: string;
|
|
671
|
+
message: string;
|
|
672
|
+
status?: number;
|
|
673
|
+
request_id?: string;
|
|
674
|
+
timestamp?: string;
|
|
675
|
+
trace_id?: string;
|
|
676
|
+
span_id?: string;
|
|
677
|
+
service?: string;
|
|
678
|
+
details?: {
|
|
679
|
+
fields?: Record<string, string>;
|
|
680
|
+
[key: string]: unknown;
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Base error class for all Magical Auth SDK errors.
|
|
685
|
+
*/
|
|
686
|
+
declare class MagicalAuthError extends Error {
|
|
687
|
+
/**
|
|
688
|
+
* Error code from the API.
|
|
689
|
+
*/
|
|
690
|
+
readonly code: string;
|
|
691
|
+
/**
|
|
692
|
+
* HTTP status code.
|
|
693
|
+
*/
|
|
694
|
+
readonly status: number;
|
|
695
|
+
/**
|
|
696
|
+
* Request ID for debugging/support.
|
|
697
|
+
*/
|
|
698
|
+
readonly requestId?: string;
|
|
699
|
+
/**
|
|
700
|
+
* Additional error details.
|
|
701
|
+
*/
|
|
702
|
+
readonly details?: Record<string, unknown>;
|
|
703
|
+
/**
|
|
704
|
+
* Distributed trace ID (from OpenTelemetry).
|
|
705
|
+
*/
|
|
706
|
+
readonly traceId?: string;
|
|
707
|
+
/**
|
|
708
|
+
* Span ID for tracing.
|
|
709
|
+
*/
|
|
710
|
+
readonly spanId?: string;
|
|
711
|
+
/**
|
|
712
|
+
* ISO 8601 timestamp of when the error occurred on the server.
|
|
713
|
+
*/
|
|
714
|
+
readonly timestamp?: string;
|
|
715
|
+
/**
|
|
716
|
+
* Name of the service that produced this error.
|
|
717
|
+
*/
|
|
718
|
+
readonly service?: string;
|
|
719
|
+
constructor(message: string, code: string, status: number, requestId?: string, details?: Record<string, unknown>);
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Bad request error (generic 400).
|
|
723
|
+
*/
|
|
724
|
+
declare class BadRequestError extends MagicalAuthError {
|
|
725
|
+
constructor(message?: string, requestId?: string);
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Validation error with field-level details.
|
|
729
|
+
*/
|
|
730
|
+
declare class ValidationError extends MagicalAuthError {
|
|
731
|
+
/**
|
|
732
|
+
* Field-level validation errors.
|
|
733
|
+
*/
|
|
734
|
+
readonly fieldErrors: Record<string, string>;
|
|
735
|
+
constructor(message: string, fieldErrors: Record<string, string>, requestId?: string);
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Authentication/authorization error.
|
|
739
|
+
*/
|
|
740
|
+
declare class UnauthorizedError extends MagicalAuthError {
|
|
741
|
+
constructor(message?: string, requestId?: string);
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Session not found error.
|
|
745
|
+
*/
|
|
746
|
+
declare class SessionNotFoundError extends MagicalAuthError {
|
|
747
|
+
constructor(message?: string, requestId?: string);
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Carrier not eligible for authentication.
|
|
751
|
+
*/
|
|
752
|
+
declare class CarrierNotEligibleError extends MagicalAuthError {
|
|
753
|
+
constructor(message?: string, requestId?: string);
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Platform not supported for authentication.
|
|
757
|
+
*/
|
|
758
|
+
declare class UnsupportedPlatformError extends MagicalAuthError {
|
|
759
|
+
constructor(message?: string, requestId?: string);
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Invalid credential format error.
|
|
763
|
+
*/
|
|
764
|
+
declare class InvalidCredentialError extends MagicalAuthError {
|
|
765
|
+
constructor(message?: string, requestId?: string);
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Phone number mismatch error.
|
|
769
|
+
*/
|
|
770
|
+
declare class PhoneNumberMismatchError extends MagicalAuthError {
|
|
771
|
+
constructor(message?: string, requestId?: string);
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Rate limit exceeded error.
|
|
775
|
+
*/
|
|
776
|
+
declare class RateLimitError extends MagicalAuthError {
|
|
777
|
+
/**
|
|
778
|
+
* Seconds until rate limit resets (if provided by API).
|
|
779
|
+
*/
|
|
780
|
+
readonly retryAfter?: number;
|
|
781
|
+
constructor(message: string, retryAfter?: number, requestId?: string);
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Internal server error.
|
|
785
|
+
*/
|
|
786
|
+
declare class InternalServerError extends MagicalAuthError {
|
|
787
|
+
constructor(message?: string, requestId?: string);
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Service temporarily unavailable.
|
|
791
|
+
*/
|
|
792
|
+
declare class ServiceUnavailableError extends MagicalAuthError {
|
|
793
|
+
constructor(message?: string, requestId?: string);
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Forbidden error (device binding validation failed).
|
|
797
|
+
*/
|
|
798
|
+
declare class ForbiddenError extends MagicalAuthError {
|
|
799
|
+
constructor(message?: string, requestId?: string);
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Browser mismatch error (completion page opened in a different browser than prepare).
|
|
803
|
+
*/
|
|
804
|
+
declare class BrowserMismatchError extends MagicalAuthError {
|
|
805
|
+
constructor(message?: string, requestId?: string, details?: Record<string, unknown>);
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* Session not eligible for the requested operation (e.g., wrong status for /complete).
|
|
809
|
+
*/
|
|
810
|
+
declare class SessionNotEligibleError extends MagicalAuthError {
|
|
811
|
+
constructor(message?: string, requestId?: string);
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Device binding validation failed (fe_code/agg_code format or aggregator rejection).
|
|
815
|
+
*/
|
|
816
|
+
declare class DeviceBindingError extends MagicalAuthError {
|
|
817
|
+
constructor(message?: string, code?: string, requestId?: string);
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Binding cookie is missing — the session-scoped `_glide_bind_{sessionKey}` cookie
|
|
821
|
+
* was not found. This typically means the user opened the completion URL in a
|
|
822
|
+
* different browser than the one that initiated the flow.
|
|
823
|
+
*/
|
|
824
|
+
declare class MissingBindingCookieError extends DeviceBindingError {
|
|
825
|
+
constructor(message?: string, requestId?: string);
|
|
826
|
+
}
|
|
827
|
+
/**
|
|
828
|
+
* Desktop wait response — thrown when the server returns HTTP 202
|
|
829
|
+
* indicating the desktop QR session is still waiting for mobile completion.
|
|
830
|
+
* Callers should inspect `waitResponse` to decide whether to retry.
|
|
831
|
+
*/
|
|
832
|
+
declare class DesktopWaitError extends MagicalAuthError {
|
|
833
|
+
readonly waitResponse: {
|
|
834
|
+
status: 'waiting';
|
|
835
|
+
message: string;
|
|
836
|
+
session_key: string;
|
|
837
|
+
session_status: string;
|
|
838
|
+
retry: boolean;
|
|
839
|
+
session_expires_in_seconds: number;
|
|
840
|
+
};
|
|
841
|
+
constructor(waitResponse: {
|
|
842
|
+
status: 'waiting';
|
|
843
|
+
message: string;
|
|
844
|
+
session_key: string;
|
|
845
|
+
session_status: string;
|
|
846
|
+
retry: boolean;
|
|
847
|
+
session_expires_in_seconds: number;
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Creates the appropriate error class instance from an API error response.
|
|
852
|
+
* @param response - The error response from the API
|
|
853
|
+
* @param headers - Optional response headers (for extracting Retry-After, etc.)
|
|
854
|
+
* @returns The appropriate MagicalAuthError subclass instance
|
|
855
|
+
*/
|
|
856
|
+
declare function createErrorFromResponse(response: ErrorResponse, headers?: Headers): MagicalAuthError;
|
|
857
|
+
|
|
858
|
+
export { SessionStatus as $, AuthenticationStrategy as A, BadRequestError as B, CarrierNotEligibleError as C, type DCQLCredential as D, ErrorCode as E, ForbiddenError as F, type GetPhoneNumberRequest as G, type HttpClient as H, InternalServerError as I, PhoneNumberMismatchError as J, type PrepareOptions as K, type Logger as L, type MagicalAuthConfig as M, type PrepareResponse as N, type ProtocolType as O, type PrepareRequest as P, RateLimitError as Q, type ReportInvocationResponse as R, type StatusResponse as S, type ReportInvocationRequest as T, type ResolvedConfig as U, type VerifyPhoneNumberRequest as V, type RiskLevel as W, ServiceUnavailableError as X, type SessionInfo as Y, SessionNotEligibleError as Z, SessionNotFoundError as _, type PrepareResult as a, type SimSwapFailureReason as a0, type SimSwapInfo as a1, type StrategyData as a2, type TS43RequestData as a3, type TS43StrategyData as a4, type Theme as a5, UnauthorizedError as a6, UnsupportedPlatformError as a7, UseCase as a8, ValidationError as a9, createErrorFromResponse as aa, createLogger as ab, defaultHttpClient as ac, noopLogger as ad, resolveConfig as ae, sanitize as af, type VerifyPhoneNumberResponse as b, type GetPhoneNumberResponse as c, BrowserMismatchError as d, type Challenge as e, type ClientInfo as f, type ConsentData as g, type DCQLCredentialMeta as h, type DCQLQuery as i, DEFAULT_BASE_URL as j, DEFAULT_TIMEOUT as k, type DesktopQRData as l, type DesktopStrategyData as m, DesktopWaitError as n, DeviceBindingError as o, type DeviceInfo as p, type DeviceSwapInfo as q, type ErrorResponse as r, type HttpRequestOptions as s, type HttpResponse as t, InvalidCredentialError as u, type LinkStrategyData as v, type LoggerConfig as w, MagicalAuthError as x, MissingBindingCookieError as y, type PLMN as z };
|