@transmitsecurity/platform-web-sdk 1.18.3 → 2.0.0-beta.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/CHANGELOG.md +40 -0
- package/README.md +70 -59
- package/dist/common.cjs +1 -1
- package/dist/common.js +1 -1
- package/dist/drs.cjs +1 -1
- package/dist/drs.d.ts +26 -74
- package/dist/drs.js +1 -1
- package/dist/ido.cjs +1 -3
- package/dist/ido.d.ts +13 -22
- package/dist/ido.js +1 -3
- package/dist/idv.cjs +1 -1
- package/dist/idv.js +1 -1
- package/dist/index.cjs +1 -3
- package/dist/index.esm.js +1 -3
- package/dist/index.umd.js +1 -3
- package/dist/ts-platform-websdk.js +1 -3
- package/dist/web-sdk-drs+idv+webauthn+ido.js +1 -3
- package/dist/web-sdk.d.ts +594 -167
- package/dist/webauthn.cjs +1 -1
- package/dist/webauthn.d.ts +45 -24
- package/dist/webauthn.js +1 -1
- package/package.json +17 -11
package/dist/web-sdk.d.ts
CHANGED
|
@@ -1,3 +1,407 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
type AgentCreate<T> = T extends new (...any: any) => Agent ? InstanceType<T> : T extends Function ? OmitThisParameter<T> : T extends {} ? BoundMethods<T> : T;
|
|
3
|
+
type BoundMethods<T> = {
|
|
4
|
+
[key in keyof T]: OmitThisParameter<AgentCreate<T[key]>>;
|
|
5
|
+
};
|
|
6
|
+
declare class Agent {
|
|
7
|
+
slug: string;
|
|
8
|
+
constructor(slug: string);
|
|
9
|
+
static create<T extends object>(method: (agent: Agent) => T): new (slug: string) => Agent & BoundMethods<T>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface eventNameToDataParam {
|
|
13
|
+
[eventName: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
type eventKnownName = keyof eventNameToDataParam;
|
|
16
|
+
type callback<T> = (eventData: T) => void;
|
|
17
|
+
declare function on<T extends eventKnownName>(eventName: T, method: callback<eventNameToDataParam[T]>): void;
|
|
18
|
+
declare function off<T extends eventKnownName>(eventName: T, method: callback<eventNameToDataParam[T]>): void;
|
|
19
|
+
declare function emit<T extends eventKnownName>(eventName: T, eventData: eventNameToDataParam[T]): void;
|
|
20
|
+
|
|
21
|
+
declare module './events' {
|
|
22
|
+
interface eventNameToDataParam {
|
|
23
|
+
[MODULE_INITIALIZED]: undefined;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
declare const MODULE_INITIALIZED: unique symbol;
|
|
27
|
+
|
|
28
|
+
declare const events_MODULE_INITIALIZED: typeof MODULE_INITIALIZED;
|
|
29
|
+
declare const events_emit: typeof emit;
|
|
30
|
+
type events_eventNameToDataParam = eventNameToDataParam;
|
|
31
|
+
declare const events_off: typeof off;
|
|
32
|
+
declare const events_on: typeof on;
|
|
33
|
+
declare namespace events {
|
|
34
|
+
export {
|
|
35
|
+
events_MODULE_INITIALIZED as MODULE_INITIALIZED,
|
|
36
|
+
events_emit as emit,
|
|
37
|
+
events_eventNameToDataParam as eventNameToDataParam,
|
|
38
|
+
events_off as off,
|
|
39
|
+
events_on as on,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface initConfigParams {
|
|
44
|
+
clientId: string;
|
|
45
|
+
drs?: {
|
|
46
|
+
enabled?: boolean;
|
|
47
|
+
serverPath?: string;
|
|
48
|
+
enableSessionToken?: boolean;
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
};
|
|
51
|
+
webauthn?: {
|
|
52
|
+
serverPath?: string;
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
};
|
|
55
|
+
idv?: {
|
|
56
|
+
serverPath?: string;
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
};
|
|
59
|
+
ido?: {
|
|
60
|
+
serverPath?: string;
|
|
61
|
+
[key: string]: any;
|
|
62
|
+
};
|
|
63
|
+
[key: string]: any;
|
|
64
|
+
}
|
|
65
|
+
declare let initConfig: initConfigParams | null;
|
|
66
|
+
declare function getInitConfig(): initConfigParams | null;
|
|
67
|
+
declare function setInitConfig(config: initConfigParams): void;
|
|
68
|
+
|
|
69
|
+
declare const moduleMetadata_getInitConfig: typeof getInitConfig;
|
|
70
|
+
declare const moduleMetadata_initConfig: typeof initConfig;
|
|
71
|
+
type moduleMetadata_initConfigParams = initConfigParams;
|
|
72
|
+
declare const moduleMetadata_setInitConfig: typeof setInitConfig;
|
|
73
|
+
declare namespace moduleMetadata {
|
|
74
|
+
export {
|
|
75
|
+
moduleMetadata_getInitConfig as getInitConfig,
|
|
76
|
+
moduleMetadata_initConfig as initConfig,
|
|
77
|
+
moduleMetadata_initConfigParams as initConfigParams,
|
|
78
|
+
moduleMetadata_setInitConfig as setInitConfig,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
declare function initialize(params: initConfigParams): void;
|
|
83
|
+
|
|
84
|
+
declare const mainEntry_initialize: typeof initialize;
|
|
85
|
+
declare namespace mainEntry {
|
|
86
|
+
export {
|
|
87
|
+
mainEntry_initialize as initialize,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
type JsonNode = number | string | boolean | null | undefined | JsonNode[] | {
|
|
92
|
+
[key: string]: JsonNode;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
declare const COMMON_STORAGE_KEY = "tsec";
|
|
96
|
+
declare const GENERAL_ID_KEY = "general";
|
|
97
|
+
type storageKeyOptions = {
|
|
98
|
+
isGeneral?: boolean;
|
|
99
|
+
sessionOnly?: boolean;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Storage module handles local storage and session storgae for multyple modules in
|
|
103
|
+
* same storage key, with JSON serialization. It stores data in 'tsec' key, as an
|
|
104
|
+
* object with that structure:
|
|
105
|
+
* { [moduleSlug]: { [clientId | 'general']: { [key]: value } } }
|
|
106
|
+
*/
|
|
107
|
+
declare function setValue(this: Agent, key: string, value: JsonNode, options?: storageKeyOptions): void;
|
|
108
|
+
declare function removeValue(this: Agent, key: string, options?: storageKeyOptions): void;
|
|
109
|
+
declare function getValue(this: Agent, key: string, options?: storageKeyOptions): JsonNode;
|
|
110
|
+
declare function hasValue(this: Agent, key: string, options?: storageKeyOptions): JsonNode;
|
|
111
|
+
|
|
112
|
+
declare const storage_COMMON_STORAGE_KEY: typeof COMMON_STORAGE_KEY;
|
|
113
|
+
declare const storage_GENERAL_ID_KEY: typeof GENERAL_ID_KEY;
|
|
114
|
+
declare const storage_getValue: typeof getValue;
|
|
115
|
+
declare const storage_hasValue: typeof hasValue;
|
|
116
|
+
declare const storage_removeValue: typeof removeValue;
|
|
117
|
+
declare const storage_setValue: typeof setValue;
|
|
118
|
+
type storage_storageKeyOptions = storageKeyOptions;
|
|
119
|
+
declare namespace storage {
|
|
120
|
+
export {
|
|
121
|
+
storage_COMMON_STORAGE_KEY as COMMON_STORAGE_KEY,
|
|
122
|
+
storage_GENERAL_ID_KEY as GENERAL_ID_KEY,
|
|
123
|
+
storage_getValue as getValue,
|
|
124
|
+
storage_hasValue as hasValue,
|
|
125
|
+
storage_removeValue as removeValue,
|
|
126
|
+
storage_setValue as setValue,
|
|
127
|
+
storage_storageKeyOptions as storageKeyOptions,
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare const INIT_ROTATION_RESPONSE = "init";
|
|
132
|
+
declare const COMPLETED_ROTATION_RESPONSE = "completed";
|
|
133
|
+
type CryptoBindingPublicData = {
|
|
134
|
+
publicKey: string;
|
|
135
|
+
keyIdentifier: string;
|
|
136
|
+
publicKeyId: string;
|
|
137
|
+
};
|
|
138
|
+
type CryptoBindingRotationPayload = {
|
|
139
|
+
data: string;
|
|
140
|
+
signature: string;
|
|
141
|
+
};
|
|
142
|
+
type CryptoBindingOptions = {
|
|
143
|
+
/** Set to true if you want to scope your crypto-binding keys with your product only (default is false, to use global-platofrm scope) */
|
|
144
|
+
productScope?: boolean;
|
|
145
|
+
/** Custom database name, will be affected only if set `productScope` to true */
|
|
146
|
+
indexedDBName?: string;
|
|
147
|
+
/** Custom db-versioning, will be be affected only if set `productScope` to true */
|
|
148
|
+
dbVersion?: number;
|
|
149
|
+
/** Custom keys-store (table) name, will be affected only if set `productScope` to true */
|
|
150
|
+
keysStoreName?: string;
|
|
151
|
+
/** Set to true if product supports key rotation */
|
|
152
|
+
/** Expiry days - number of days after which the key will expire */
|
|
153
|
+
/** Started at - timestamp of the day when the rotation was enabled for the product */
|
|
154
|
+
keyRotation?: {
|
|
155
|
+
isEnabled: boolean;
|
|
156
|
+
expiryDays: number;
|
|
157
|
+
startedAt: number;
|
|
158
|
+
tenantId: string;
|
|
159
|
+
};
|
|
160
|
+
/** @internal
|
|
161
|
+
* Warning! This flag shouldn't be used, it was added temporarily for multi-tenant support.
|
|
162
|
+
*
|
|
163
|
+
* Internal flag used when the Product SDK instance has its own client ID separate from the Platform SDK root-level client ID */
|
|
164
|
+
fallbackClientId?: string;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* @param keysType - the purpose of the keys, will use different key generator
|
|
168
|
+
* @param options - typeof CryptoBindingOptions
|
|
169
|
+
*/
|
|
170
|
+
declare class CryptoBinding {
|
|
171
|
+
agent: Agent;
|
|
172
|
+
private keysType;
|
|
173
|
+
private options?;
|
|
174
|
+
private indexedDBClient;
|
|
175
|
+
private indexedDBClientFallback;
|
|
176
|
+
private keysDatabaseName;
|
|
177
|
+
private keysStoreName;
|
|
178
|
+
private dbVersion;
|
|
179
|
+
private publicKeyBase64;
|
|
180
|
+
private keyIdentifier;
|
|
181
|
+
private publicKeyId;
|
|
182
|
+
private _extractingKeysPromise;
|
|
183
|
+
constructor(agent: Agent, keysType?: 'encrypt' | 'sign', options?: CryptoBindingOptions);
|
|
184
|
+
private getClientConfiguration;
|
|
185
|
+
private getKeysRecordKey;
|
|
186
|
+
private getRotatedKeysRecordKey;
|
|
187
|
+
private getRotatedKeysRecordKeyPending;
|
|
188
|
+
private arrayBufferToBase64;
|
|
189
|
+
private getPKRepresentations;
|
|
190
|
+
private generateKeyPair;
|
|
191
|
+
private calcKeyIdentifier;
|
|
192
|
+
private extractKeysData;
|
|
193
|
+
private generateKeyPairData;
|
|
194
|
+
private shouldKeyBeRotated;
|
|
195
|
+
private extractMainKeysData;
|
|
196
|
+
private extractFallbackMainKeysData;
|
|
197
|
+
private extractRotatedKeysData;
|
|
198
|
+
private extractPendingRotatedKeysData;
|
|
199
|
+
private saveKeyData;
|
|
200
|
+
private getKeysData;
|
|
201
|
+
private getOrCreateRotatedKeys;
|
|
202
|
+
private getRotatedKeysData;
|
|
203
|
+
getPublicData(): Promise<CryptoBindingPublicData>;
|
|
204
|
+
sign(message: string): Promise<string>;
|
|
205
|
+
clearKeys(): Promise<void>;
|
|
206
|
+
private getBaseRotationPayload;
|
|
207
|
+
getRotationData(): Promise<CryptoBindingRotationPayload | undefined>;
|
|
208
|
+
private signPayload;
|
|
209
|
+
handleRotateResponse(response: string): Promise<void>;
|
|
210
|
+
}
|
|
211
|
+
declare function createCryptoBinding(this: Agent, keysType?: 'encrypt' | 'sign', options?: CryptoBindingOptions): CryptoBinding;
|
|
212
|
+
|
|
213
|
+
declare const generateRSAKeyPair: () => Promise<CryptoKey | CryptoKeyPair>;
|
|
214
|
+
declare const generateRSASignKeyPair: () => Promise<CryptoKey | CryptoKeyPair>;
|
|
215
|
+
declare const signAssymetric: (privateKey: CryptoKey, message: string) => Promise<ArrayBuffer>;
|
|
216
|
+
declare const verifyAssymetric: (publicKey: CryptoKey, message: string, signature: ArrayBuffer) => Promise<boolean>;
|
|
217
|
+
|
|
218
|
+
declare const crypto_COMPLETED_ROTATION_RESPONSE: typeof COMPLETED_ROTATION_RESPONSE;
|
|
219
|
+
type crypto_CryptoBindingOptions = CryptoBindingOptions;
|
|
220
|
+
type crypto_CryptoBindingPublicData = CryptoBindingPublicData;
|
|
221
|
+
declare const crypto_INIT_ROTATION_RESPONSE: typeof INIT_ROTATION_RESPONSE;
|
|
222
|
+
declare const crypto_createCryptoBinding: typeof createCryptoBinding;
|
|
223
|
+
declare const crypto_generateRSAKeyPair: typeof generateRSAKeyPair;
|
|
224
|
+
declare const crypto_generateRSASignKeyPair: typeof generateRSASignKeyPair;
|
|
225
|
+
declare const crypto_signAssymetric: typeof signAssymetric;
|
|
226
|
+
declare const crypto_verifyAssymetric: typeof verifyAssymetric;
|
|
227
|
+
declare namespace crypto {
|
|
228
|
+
export {
|
|
229
|
+
crypto_COMPLETED_ROTATION_RESPONSE as COMPLETED_ROTATION_RESPONSE,
|
|
230
|
+
crypto_CryptoBindingOptions as CryptoBindingOptions,
|
|
231
|
+
crypto_CryptoBindingPublicData as CryptoBindingPublicData,
|
|
232
|
+
crypto_INIT_ROTATION_RESPONSE as INIT_ROTATION_RESPONSE,
|
|
233
|
+
crypto_createCryptoBinding as createCryptoBinding,
|
|
234
|
+
crypto_generateRSAKeyPair as generateRSAKeyPair,
|
|
235
|
+
crypto_generateRSASignKeyPair as generateRSASignKeyPair,
|
|
236
|
+
crypto_signAssymetric as signAssymetric,
|
|
237
|
+
crypto_verifyAssymetric as verifyAssymetric,
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
type QueryObjectStoreOptions = {
|
|
242
|
+
operation?: 'read' | 'readwrite';
|
|
243
|
+
attemptToRecoverDB?: boolean;
|
|
244
|
+
};
|
|
245
|
+
type TransactionOperation = {
|
|
246
|
+
type: 'put';
|
|
247
|
+
key: string;
|
|
248
|
+
value: any;
|
|
249
|
+
} | {
|
|
250
|
+
type: 'delete';
|
|
251
|
+
key: string;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
type indexedDB_QueryObjectStoreOptions = QueryObjectStoreOptions;
|
|
255
|
+
type indexedDB_TransactionOperation = TransactionOperation;
|
|
256
|
+
declare namespace indexedDB {
|
|
257
|
+
export {
|
|
258
|
+
indexedDB_QueryObjectStoreOptions as QueryObjectStoreOptions,
|
|
259
|
+
indexedDB_TransactionOperation as TransactionOperation,
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
type LogSeverity = 1 | 2 | 3 | 4 | 5 | 6;
|
|
264
|
+
interface LogRow {
|
|
265
|
+
timestamp: number;
|
|
266
|
+
severity: LogSeverity;
|
|
267
|
+
message: string;
|
|
268
|
+
module: string;
|
|
269
|
+
fields: object;
|
|
270
|
+
}
|
|
271
|
+
type Middleware = (instance: SdkLogger) => void;
|
|
272
|
+
declare class SdkLogger {
|
|
273
|
+
agent: Agent;
|
|
274
|
+
middlewares: Middleware[];
|
|
275
|
+
logs: LogRow[];
|
|
276
|
+
constructor(agent: Agent, middlewares?: Middleware[]);
|
|
277
|
+
info(message: string, fields?: object): void;
|
|
278
|
+
warn(message: string, fields?: object): void;
|
|
279
|
+
error(message: string, fields?: object): void;
|
|
280
|
+
private pushLog;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
declare function createSdkLogger(this: Agent, middlewares?: Middleware[]): SdkLogger;
|
|
284
|
+
|
|
285
|
+
declare function consoleMiddleware(logger: SdkLogger): void;
|
|
286
|
+
|
|
287
|
+
type logger_SdkLogger = SdkLogger;
|
|
288
|
+
declare const logger_SdkLogger: typeof SdkLogger;
|
|
289
|
+
declare const logger_consoleMiddleware: typeof consoleMiddleware;
|
|
290
|
+
declare const logger_createSdkLogger: typeof createSdkLogger;
|
|
291
|
+
declare namespace logger {
|
|
292
|
+
export {
|
|
293
|
+
logger_SdkLogger as SdkLogger,
|
|
294
|
+
logger_consoleMiddleware as consoleMiddleware,
|
|
295
|
+
logger_createSdkLogger as createSdkLogger,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
300
|
+
type RequestBody = object;
|
|
301
|
+
type HttpResponse<T> = Response & {
|
|
302
|
+
data: T;
|
|
303
|
+
};
|
|
304
|
+
type ResponseError = {
|
|
305
|
+
message: string;
|
|
306
|
+
};
|
|
307
|
+
declare function init(method: HttpMethod, body?: RequestBody, headers?: HeadersInit): RequestInit;
|
|
308
|
+
/**
|
|
309
|
+
* constructs a `GET` request
|
|
310
|
+
* @param path API path
|
|
311
|
+
* @param params request parameters
|
|
312
|
+
* @returns a promise of the response body if successful and throw an error if failed
|
|
313
|
+
*/
|
|
314
|
+
declare function httpGet<T>(path: string, params?: URLSearchParams, headers?: HeadersInit): Promise<HttpResponse<T>>;
|
|
315
|
+
/**
|
|
316
|
+
* constructs a `POST` request
|
|
317
|
+
* @param path API path
|
|
318
|
+
* @param data content of the request
|
|
319
|
+
* @param params request parameters
|
|
320
|
+
* @returns a promise of the response body if successful and throw an error if failed
|
|
321
|
+
*/
|
|
322
|
+
declare function httpPost<T>(path: string, data: RequestBody, params?: URLSearchParams, headers?: HeadersInit): Promise<HttpResponse<T>>;
|
|
323
|
+
/**
|
|
324
|
+
* constructs a `PUT` request
|
|
325
|
+
* @param path API path
|
|
326
|
+
* @param data content of the request
|
|
327
|
+
* @param params request parameters
|
|
328
|
+
* @returns a promise of the response body if successful and throw an error if failed
|
|
329
|
+
*/
|
|
330
|
+
declare function httpPut<T>(path: string, data: RequestBody, params?: URLSearchParams, headers?: HeadersInit): Promise<HttpResponse<T>>;
|
|
331
|
+
/**
|
|
332
|
+
* constructs a `DELETE` request
|
|
333
|
+
* @param path API path
|
|
334
|
+
* @param body content of the request
|
|
335
|
+
* @param params request parameters
|
|
336
|
+
* @returns a promise of the response body if successful and throw an error if failed
|
|
337
|
+
*/
|
|
338
|
+
declare function httpDelete<T>(path: string, headers?: HeadersInit): Promise<HttpResponse<T>>;
|
|
339
|
+
|
|
340
|
+
type http_HttpMethod = HttpMethod;
|
|
341
|
+
type http_HttpResponse<T> = HttpResponse<T>;
|
|
342
|
+
type http_RequestBody = RequestBody;
|
|
343
|
+
type http_ResponseError = ResponseError;
|
|
344
|
+
declare const http_httpDelete: typeof httpDelete;
|
|
345
|
+
declare const http_httpGet: typeof httpGet;
|
|
346
|
+
declare const http_httpPost: typeof httpPost;
|
|
347
|
+
declare const http_httpPut: typeof httpPut;
|
|
348
|
+
declare const http_init: typeof init;
|
|
349
|
+
declare namespace http {
|
|
350
|
+
export {
|
|
351
|
+
http_HttpMethod as HttpMethod,
|
|
352
|
+
http_HttpResponse as HttpResponse,
|
|
353
|
+
http_RequestBody as RequestBody,
|
|
354
|
+
http_ResponseError as ResponseError,
|
|
355
|
+
http_httpDelete as httpDelete,
|
|
356
|
+
http_httpGet as httpGet,
|
|
357
|
+
http_httpPost as httpPost,
|
|
358
|
+
http_httpPut as httpPut,
|
|
359
|
+
http_init as init,
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
declare const _default$1: new (slug: string) => Agent & BoundMethods<{
|
|
364
|
+
events: typeof events;
|
|
365
|
+
moduleMetadata: typeof moduleMetadata;
|
|
366
|
+
mainEntry: typeof mainEntry;
|
|
367
|
+
utils: new (slug: string) => Agent & BoundMethods<{
|
|
368
|
+
Agent: typeof Agent;
|
|
369
|
+
exceptions: new (slug: string) => Agent & BoundMethods<{
|
|
370
|
+
TsError: {
|
|
371
|
+
new (errorCode: string, message: string): {
|
|
372
|
+
name: string;
|
|
373
|
+
message: string;
|
|
374
|
+
stack?: string;
|
|
375
|
+
};
|
|
376
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
377
|
+
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
|
|
378
|
+
stackTraceLimit: number;
|
|
379
|
+
};
|
|
380
|
+
TsInternalError: {
|
|
381
|
+
new (errorCode: string): {
|
|
382
|
+
name: string;
|
|
383
|
+
message: string;
|
|
384
|
+
stack?: string;
|
|
385
|
+
};
|
|
386
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
387
|
+
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
|
|
388
|
+
stackTraceLimit: number;
|
|
389
|
+
};
|
|
390
|
+
}>;
|
|
391
|
+
}>;
|
|
392
|
+
storage: typeof storage;
|
|
393
|
+
crypto: typeof crypto;
|
|
394
|
+
indexedDB: typeof indexedDB;
|
|
395
|
+
logger: typeof logger;
|
|
396
|
+
http: typeof http;
|
|
397
|
+
}>;
|
|
398
|
+
|
|
399
|
+
declare namespace index_d$3 {
|
|
400
|
+
export {
|
|
401
|
+
_default$1 as default,
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
|
|
1
405
|
declare enum RecommendationType {
|
|
2
406
|
ALLOW = "ALLOW",
|
|
3
407
|
CHALLENGE = "CHALLENGE",
|
|
@@ -13,36 +417,27 @@ type EventResponse = {
|
|
|
13
417
|
type Recommendation = {
|
|
14
418
|
type: RecommendationType;
|
|
15
419
|
};
|
|
420
|
+
type LightweightPayload = {
|
|
421
|
+
clientId: string;
|
|
422
|
+
deviceId: string;
|
|
423
|
+
userId: string | null;
|
|
424
|
+
sdkPlatform: 'mobile_web' | 'desktop_web';
|
|
425
|
+
events: Array<Record<string, unknown>>;
|
|
426
|
+
};
|
|
16
427
|
|
|
17
428
|
interface ActionResponse {
|
|
18
|
-
/** The token return by the SDK when the action was reported */
|
|
19
429
|
actionToken?: string;
|
|
20
430
|
}
|
|
21
431
|
interface InitOptions {
|
|
22
|
-
/** Opaque identifier of the user in your system */
|
|
23
432
|
userId?: string;
|
|
24
433
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Initial parameters for SDK
|
|
27
|
-
*/
|
|
28
434
|
interface ConstructorOptions {
|
|
29
|
-
/** Print logs to console */
|
|
30
435
|
verbose?: boolean;
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
* Default value is https://collect.riskid.security */
|
|
34
|
-
serverPath?: string;
|
|
35
|
-
/** Enable session token fetching
|
|
36
|
-
*
|
|
37
|
-
* Default value is false */
|
|
436
|
+
serverPath: string;
|
|
38
437
|
enableSessionToken?: boolean;
|
|
39
|
-
/** First party server url for the identifiers migration
|
|
40
|
-
*
|
|
41
|
-
* Default value is undefined */
|
|
42
438
|
firstPartyMigrationUrl?: string;
|
|
43
|
-
/** @internal
|
|
44
|
-
* Internal flag indicating this web_sdk instance has its own clientId separate from the Platform SDK root-level clientId */
|
|
45
439
|
hasOwnClientId?: boolean;
|
|
440
|
+
tier?: 'standard' | 'lightweight';
|
|
46
441
|
}
|
|
47
442
|
interface TransactionData {
|
|
48
443
|
amount: number;
|
|
@@ -63,27 +458,12 @@ interface TransactionData {
|
|
|
63
458
|
};
|
|
64
459
|
}
|
|
65
460
|
interface ActionEventOptions {
|
|
66
|
-
/** Any ID that could help relate the action with external context or session */
|
|
67
461
|
correlationId?: string;
|
|
68
|
-
/** User ID of the not yet authenticated user, used to enhance risk and
|
|
69
|
-
* trust assessments. Once the user is authenticated,
|
|
70
|
-
* {@link TSAccountProtection.setAuthenticatedUser} should be called. */
|
|
71
462
|
claimedUserId?: string;
|
|
72
|
-
/**
|
|
73
|
-
* The reported claimedUserId type (if provided), should not contain PII unless it is hashed.
|
|
74
|
-
* Supported values: email, phone_number, account_id, ssn, national_id, passport_number, drivers_license_number, other.
|
|
75
|
-
*/
|
|
76
463
|
claimedUserIdType?: string;
|
|
77
|
-
/**
|
|
78
|
-
* A transaction data-points object for transaction-monitoring
|
|
79
|
-
*/
|
|
80
464
|
transactionData?: TransactionData;
|
|
81
|
-
/**
|
|
82
|
-
* Custom attributes matching the schema previously defined in the Admin Portal
|
|
83
|
-
*/
|
|
84
465
|
customAttributes?: Record<string, string | number | boolean>;
|
|
85
466
|
/**
|
|
86
|
-
* The fields below are supported for Enterprise-IAM sdk usage actions, added `ignore` for avoiding preseting this attribute in the docs
|
|
87
467
|
* @ignore
|
|
88
468
|
*/
|
|
89
469
|
publicKey?: string;
|
|
@@ -120,6 +500,7 @@ declare class TSAccountProtection {
|
|
|
120
500
|
private identifiersMigrationEnabled;
|
|
121
501
|
private firstPartyMigrationUrl;
|
|
122
502
|
private hasOwnClientId;
|
|
503
|
+
private tier;
|
|
123
504
|
private validationManager;
|
|
124
505
|
private storageManager;
|
|
125
506
|
private eventsManager;
|
|
@@ -132,62 +513,34 @@ declare class TSAccountProtection {
|
|
|
132
513
|
private logsReporter;
|
|
133
514
|
private options;
|
|
134
515
|
private clientId;
|
|
135
|
-
|
|
136
|
-
*
|
|
137
|
-
Creates a new Account Protection SDK instance with your client context
|
|
138
|
-
@param clientId Your AccountProtection client identifier
|
|
139
|
-
@param options SDK configuration options
|
|
140
|
-
*/
|
|
141
|
-
constructor(clientId: string, options?: ConstructorOptions);
|
|
516
|
+
constructor(clientId: string, options: ConstructorOptions);
|
|
142
517
|
/** @ignore */
|
|
143
518
|
constructor(serverPath: string, clientId: string);
|
|
144
519
|
private generateDisabledToken;
|
|
145
520
|
/**
|
|
146
521
|
* @ignore
|
|
147
|
-
* @returns List of loaded actions that can be invoked
|
|
148
522
|
*/
|
|
149
523
|
get actions(): string[];
|
|
150
524
|
/** @ignore */
|
|
151
525
|
getActions(): Promise<string[]>;
|
|
152
526
|
getSessionToken(): Promise<any>;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
* @param options Init options
|
|
156
|
-
* @returns Indicates if the call succeeded
|
|
157
|
-
*/
|
|
527
|
+
getPayload(): Promise<LightweightPayload>;
|
|
528
|
+
clearQueue(): void;
|
|
158
529
|
init(options?: InitOptions | string): Promise<boolean>;
|
|
159
530
|
private isInitialized;
|
|
160
|
-
/**
|
|
161
|
-
* Reports a user action event to the SDK
|
|
162
|
-
* @param actionType Type of user action event that was predefined in the Transmit Security server
|
|
163
|
-
* @returns Indicates if the call succeeded
|
|
164
|
-
*/
|
|
165
531
|
triggerActionEvent(actionType: string, options?: ActionEventOptions): Promise<ActionResponse>;
|
|
166
532
|
/**
|
|
167
533
|
* @ignore
|
|
168
534
|
*/
|
|
169
535
|
identifyUser(userId: string): Promise<boolean>;
|
|
170
536
|
private updateUserId;
|
|
537
|
+
setAuthenticatedUser(userId: string, options?: {}): Promise<boolean>;
|
|
538
|
+
clearUser(options?: {}): Promise<boolean>;
|
|
171
539
|
/**
|
|
172
540
|
* @ignore
|
|
173
541
|
*/
|
|
174
542
|
unidentifiedUser(): Promise<boolean>;
|
|
175
|
-
|
|
176
|
-
* Sets the user context for all subsequent events in the browser session (or until the user is explicitly cleared)
|
|
177
|
-
* It should be set only after you've fully authenticated the user (including, for example, any 2FA that was required)
|
|
178
|
-
* @param userId Opaque identifier of the user in your system
|
|
179
|
-
* @param options Reserved for future use
|
|
180
|
-
* @returns Indicates if the call succeeded
|
|
181
|
-
*/
|
|
182
|
-
setAuthenticatedUser(userId: string, options?: {}): Promise<boolean>;
|
|
183
|
-
/** @ignore */
|
|
184
|
-
setUser(userId: string, _options?: {}): Promise<boolean>;
|
|
185
|
-
/**
|
|
186
|
-
* Clears the user context for all subsequent events in the browser session
|
|
187
|
-
* @param options Reserved for future use
|
|
188
|
-
* @returns Indicates if the call succeeded
|
|
189
|
-
*/
|
|
190
|
-
clearUser(options?: {}): Promise<boolean>;
|
|
543
|
+
getSecureSessionToken(actionType?: string | null, expirationSeconds?: number): Promise<string>;
|
|
191
544
|
}
|
|
192
545
|
|
|
193
546
|
declare module '@transmit-security/web-sdk-common/dist/module-metadata/module-metadata' {
|
|
@@ -205,8 +558,6 @@ declare module '@transmit-security/web-sdk-common/dist/module-metadata/module-me
|
|
|
205
558
|
* @returns Indicates if the call succeeded
|
|
206
559
|
*/
|
|
207
560
|
declare const triggerActionEvent: TSAccountProtection['triggerActionEvent'];
|
|
208
|
-
/** @ignore */
|
|
209
|
-
declare const setUser: TSAccountProtection['setUser'];
|
|
210
561
|
/**
|
|
211
562
|
* Sets the user context for all subsequent events in the browser session (or until the user is explicitly cleared)
|
|
212
563
|
* It should be set only after you've fully authenticated the user (including, for example, any 2FA that was required)
|
|
@@ -222,13 +573,18 @@ declare const setAuthenticatedUser: TSAccountProtection['setAuthenticatedUser'];
|
|
|
222
573
|
*/
|
|
223
574
|
declare const clearUser: TSAccountProtection['clearUser'];
|
|
224
575
|
/** @ignore */
|
|
225
|
-
declare const identifyUser: TSAccountProtection['identifyUser'];
|
|
226
|
-
/** @ignore */
|
|
227
|
-
declare const unidentifiedUser: TSAccountProtection['unidentifiedUser'];
|
|
228
|
-
/** @ignore */
|
|
229
576
|
declare const getActions: TSAccountProtection['getActions'];
|
|
230
577
|
/** @ignore */
|
|
231
578
|
declare const getSessionToken: TSAccountProtection['getSessionToken'];
|
|
579
|
+
/**
|
|
580
|
+
* Gets a secure session token that is signed with the device's private key
|
|
581
|
+
* @param actionType Optional action type to include in the token payload (default: null)
|
|
582
|
+
* @param expirationSeconds Optional expiration time in seconds (default: 300 seconds / 5 minutes)
|
|
583
|
+
* @returns A JWT-like token containing the backend session token and device information, signed with the device's private key
|
|
584
|
+
*/
|
|
585
|
+
declare const getSecureSessionToken: TSAccountProtection['getSecureSessionToken'];
|
|
586
|
+
/** @ignore */
|
|
587
|
+
declare const getPayload: TSAccountProtection['getPayload'];
|
|
232
588
|
/** @ignore */
|
|
233
589
|
declare const __internal: {
|
|
234
590
|
getDeviceId(): string;
|
|
@@ -238,28 +594,28 @@ declare const __internal: {
|
|
|
238
594
|
|
|
239
595
|
type webSdkModule_d_ActionEventOptions = ActionEventOptions;
|
|
240
596
|
type webSdkModule_d_ActionResponse = ActionResponse;
|
|
597
|
+
type webSdkModule_d_LightweightPayload = LightweightPayload;
|
|
241
598
|
declare const webSdkModule_d___internal: typeof __internal;
|
|
242
599
|
declare const webSdkModule_d_clearUser: typeof clearUser;
|
|
243
600
|
declare const webSdkModule_d_getActions: typeof getActions;
|
|
601
|
+
declare const webSdkModule_d_getPayload: typeof getPayload;
|
|
602
|
+
declare const webSdkModule_d_getSecureSessionToken: typeof getSecureSessionToken;
|
|
244
603
|
declare const webSdkModule_d_getSessionToken: typeof getSessionToken;
|
|
245
|
-
declare const webSdkModule_d_identifyUser: typeof identifyUser;
|
|
246
604
|
declare const webSdkModule_d_setAuthenticatedUser: typeof setAuthenticatedUser;
|
|
247
|
-
declare const webSdkModule_d_setUser: typeof setUser;
|
|
248
605
|
declare const webSdkModule_d_triggerActionEvent: typeof triggerActionEvent;
|
|
249
|
-
declare const webSdkModule_d_unidentifiedUser: typeof unidentifiedUser;
|
|
250
606
|
declare namespace webSdkModule_d {
|
|
251
607
|
export {
|
|
252
608
|
webSdkModule_d_ActionEventOptions as ActionEventOptions,
|
|
253
609
|
webSdkModule_d_ActionResponse as ActionResponse,
|
|
610
|
+
webSdkModule_d_LightweightPayload as LightweightPayload,
|
|
254
611
|
webSdkModule_d___internal as __internal,
|
|
255
612
|
webSdkModule_d_clearUser as clearUser,
|
|
256
613
|
webSdkModule_d_getActions as getActions,
|
|
614
|
+
webSdkModule_d_getPayload as getPayload,
|
|
615
|
+
webSdkModule_d_getSecureSessionToken as getSecureSessionToken,
|
|
257
616
|
webSdkModule_d_getSessionToken as getSessionToken,
|
|
258
|
-
webSdkModule_d_identifyUser as identifyUser,
|
|
259
617
|
webSdkModule_d_setAuthenticatedUser as setAuthenticatedUser,
|
|
260
|
-
webSdkModule_d_setUser as setUser,
|
|
261
618
|
webSdkModule_d_triggerActionEvent as triggerActionEvent,
|
|
262
|
-
webSdkModule_d_unidentifiedUser as unidentifiedUser,
|
|
263
619
|
};
|
|
264
620
|
}
|
|
265
621
|
|
|
@@ -322,16 +678,16 @@ declare function recapture(): Promise<boolean>;
|
|
|
322
678
|
declare function restart(): Promise<boolean>;
|
|
323
679
|
declare const version: () => string;
|
|
324
680
|
|
|
325
|
-
declare const index_d$
|
|
326
|
-
declare const index_d$
|
|
327
|
-
declare const index_d$
|
|
328
|
-
declare const index_d$
|
|
329
|
-
declare namespace index_d$
|
|
681
|
+
declare const index_d$2_recapture: typeof recapture;
|
|
682
|
+
declare const index_d$2_restart: typeof restart;
|
|
683
|
+
declare const index_d$2_start: typeof start;
|
|
684
|
+
declare const index_d$2_version: typeof version;
|
|
685
|
+
declare namespace index_d$2 {
|
|
330
686
|
export {
|
|
331
|
-
index_d$
|
|
332
|
-
index_d$
|
|
333
|
-
index_d$
|
|
334
|
-
index_d$
|
|
687
|
+
index_d$2_recapture as recapture,
|
|
688
|
+
index_d$2_restart as restart,
|
|
689
|
+
index_d$2_start as start,
|
|
690
|
+
index_d$2_version as version,
|
|
335
691
|
};
|
|
336
692
|
}
|
|
337
693
|
|
|
@@ -573,7 +929,10 @@ interface WebauthnCrossDeviceFlows {
|
|
|
573
929
|
* @throws {@link ErrorCode.RegistrationFailed}
|
|
574
930
|
* @throws {@link ErrorCode.RegistrationCanceled}
|
|
575
931
|
*/
|
|
576
|
-
register: (
|
|
932
|
+
register: (params: {
|
|
933
|
+
crossDeviceTicketId: string;
|
|
934
|
+
options?: WebauthnCrossDeviceRegistrationOptions;
|
|
935
|
+
}) => Promise<string>;
|
|
577
936
|
/**
|
|
578
937
|
* Indicates when a session is accepted on another device in cross-device flows.
|
|
579
938
|
*
|
|
@@ -685,14 +1044,17 @@ interface AutofillHandlers {
|
|
|
685
1044
|
* Invokes a WebAuthn authentication, including prompting the user to select from a list of registered credentials using autofill, and then prompting the user for biometrics. In order to prompt this credentials list, the autocomplete="username webauthn" attribute **must** be defined on the username input box of the authentication page.<br/>
|
|
686
1045
|
* If authentication is completed successfully, the `onSuccess` callback will be triggered with the credential result, which is an object encoded as a base64 string. This encoded result should then be passed to the [backend authentication endpoint](/openapi/user/backend-webauthn/#operation/authenticateWebauthnCredential) to retrieve user tokens.<br/>
|
|
687
1046
|
* If it fails, the `onError` callback will be triggered with an SdkError.
|
|
1047
|
+
* @param params.handlers - Handlers that will be invoked once the authentication is completed (success or failure)
|
|
1048
|
+
* @param params.username - Name of user account, as used in the WebAuthn registration. If not provided, the authentication will start without the context of a user and it will be inferred by the chosen passkey
|
|
688
1049
|
* @throws {@link ErrorCode.NotInitialized}
|
|
689
1050
|
* @throws {@link ErrorCode.AuthenticationFailed}
|
|
690
1051
|
* @throws {@link ErrorCode.AuthenticationCanceled}
|
|
691
1052
|
* @throws {@link ErrorCode.AutofillAuthenticationAborted}
|
|
692
|
-
* @param handlers Handlers that will be invoked once the authentication is completed (success or failure)
|
|
693
|
-
* @param username Name of user account, as used in the WebAuthn registration. If not provided, the authentication will start without the context of a user and it will be inferred by the chosen passkey
|
|
694
1053
|
*/
|
|
695
|
-
activate(
|
|
1054
|
+
activate(params: {
|
|
1055
|
+
handlers: AuthenticationAutofillActivateHandlers;
|
|
1056
|
+
username?: string;
|
|
1057
|
+
}): void;
|
|
696
1058
|
/**
|
|
697
1059
|
* Aborts a WebAuthn authentication. This method should be called after the passkey autofill is dismissed in order to be able to query existing passkeys once again. This will end the browser's `navigator.credentials.get()` operation.
|
|
698
1060
|
*/
|
|
@@ -708,20 +1070,29 @@ interface WebauthnAuthenticationOptions {
|
|
|
708
1070
|
|
|
709
1071
|
interface WebauthnAuthenticationFlows {
|
|
710
1072
|
/**
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
1073
|
+
* Invokes a WebAuthn authentication, including prompting the user to select from a list of registered credentials, and then prompting the user for biometrics. The credentials list is displayed using the native browser modal.<br/>
|
|
1074
|
+
* If username isn't provided, it will promote a modal with a list of all discoverable credentials on the device. If username is provided, this call must be invoked for a registered username. If the target username is not registered or in case of any other failure, an SdkError will be thrown.<br/>
|
|
1075
|
+
* If authentication is completed successfully, this call will return a promise that resolves to the credential result, which is an object encoded as a base64 string. This encoded result should then be passed to the [backend authentication endpoint](/openapi/user/backend-webauthn/#operation/authenticateWebauthnCredential) to retrieve user tokens.<br/>
|
|
1076
|
+
*
|
|
1077
|
+
* @param params.username - Name of user account, as used in the WebAuthn registration. If not provided, the authentication will start without the context of a user and it will be inferred by the chosen passkey
|
|
1078
|
+
* @param params.options - Options for the authentication process
|
|
1079
|
+
* @param params.identifier - Identifier value (email, phone number, user ID, or custom identifier). Mutually exclusive with username.
|
|
1080
|
+
* @param params.identifierType - Type of identifier (email, phone_number, user_id, username, or custom identifier type). Required when using identifier.
|
|
1081
|
+
* @throws {@link ErrorCode.NotInitialized}
|
|
1082
|
+
* @throws {@link ErrorCode.AuthenticationFailed}
|
|
1083
|
+
* @throws {@link ErrorCode.AuthenticationCanceled}
|
|
1084
|
+
* @throws {@link ErrorCode.InvalidApprovalData}
|
|
1085
|
+
* @throws {@link ErrorCode.AuthenticationProcessAlreadyActive}
|
|
1086
|
+
* @returns Base64-encoded object, which contains the credential result. This encoded result will be used to fetch user tokens via the [backend authentication endpoint](/openapi/user/backend-webauthn/#operation/authenticateWebauthnCredential).
|
|
1087
|
+
*/
|
|
1088
|
+
modal(params: {
|
|
1089
|
+
username?: string;
|
|
1090
|
+
options?: WebauthnAuthenticationOptions;
|
|
1091
|
+
} | {
|
|
1092
|
+
identifier?: string;
|
|
1093
|
+
identifierType?: string;
|
|
1094
|
+
options?: WebauthnAuthenticationOptions;
|
|
1095
|
+
}): Promise<string>;
|
|
725
1096
|
/**
|
|
726
1097
|
* Property used to implement credential selection via autofill UI.
|
|
727
1098
|
*/
|
|
@@ -733,8 +1104,8 @@ interface WebauthnApprovalFlows {
|
|
|
733
1104
|
* Invokes a WebAuthn approval, including prompting the user to select from a list of registered credentials, and then prompting the user for biometrics. The credentials list is displayed using the native browser modal.<br/>
|
|
734
1105
|
* This call must be invoked for a registered username. If the target username is not registered or in case of any other failure, an SdkError will be thrown.<br/>
|
|
735
1106
|
* If approval is completed successfully, this call will return a promise that resolves to the credential result, which is an object encoded as a base64 string. This encoded result should then be passed to the [backend authentication endpoint](/openapi/user/backend-webauthn/#operation/authenticateWebauthnCredential) to retrieve user tokens.<br/>
|
|
736
|
-
* @param username Name of user account, as used in the WebAuthn registration.
|
|
737
|
-
* @param approvalData Data that represents the approval to be signed with a passkey
|
|
1107
|
+
* @param params.username Name of user account, as used in the WebAuthn registration.
|
|
1108
|
+
* @param params.approvalData Data that represents the approval to be signed with a passkey
|
|
738
1109
|
* @throws {@link ErrorCode.NotInitialized}
|
|
739
1110
|
* @throws {@link ErrorCode.InvalidApprovalData}
|
|
740
1111
|
* @throws {@link ErrorCode.AuthenticationFailed}
|
|
@@ -742,7 +1113,10 @@ interface WebauthnApprovalFlows {
|
|
|
742
1113
|
* @throws {@link ErrorCode.AuthenticationProcessAlreadyActive}
|
|
743
1114
|
* @returns Base64-encoded object, which contains the credential result. This encoded result will be used to fetch user tokens via the [backend authentication endpoint](/openapi/user/backend-webauthn/#operation/authenticateWebauthnCredential).
|
|
744
1115
|
*/
|
|
745
|
-
modal(
|
|
1116
|
+
modal(params: {
|
|
1117
|
+
username: string | undefined;
|
|
1118
|
+
approvalData: Record<string, string>;
|
|
1119
|
+
}): Promise<string>;
|
|
746
1120
|
}
|
|
747
1121
|
|
|
748
1122
|
declare module '@transmit-security/web-sdk-common/dist/module-metadata/module-metadata' {
|
|
@@ -761,13 +1135,16 @@ declare const approve: WebauthnApprovalFlows;
|
|
|
761
1135
|
*
|
|
762
1136
|
* If registration fails, an SdkError will be thrown.
|
|
763
1137
|
*
|
|
764
|
-
* @param username WebAuthn username to register
|
|
765
|
-
* @param options Additional configuration for registration flow
|
|
1138
|
+
* @param params.username - WebAuthn username to register
|
|
1139
|
+
* @param params.options - Additional configuration for registration flow
|
|
766
1140
|
* @throws {@link ErrorCode.NotInitialized}
|
|
767
1141
|
* @throws {@link ErrorCode.RegistrationFailed}
|
|
768
1142
|
* @throws {@link ErrorCode.RegistrationCanceled}
|
|
769
1143
|
*/
|
|
770
|
-
declare function register(
|
|
1144
|
+
declare function register(params: {
|
|
1145
|
+
username: string;
|
|
1146
|
+
options?: WebauthnRegistrationOptions;
|
|
1147
|
+
}): Promise<string>;
|
|
771
1148
|
/**
|
|
772
1149
|
* Returns webauthn cross device flows
|
|
773
1150
|
* @type WebauthnCrossDeviceFlows
|
|
@@ -786,56 +1163,56 @@ declare const isAutofillSupported: () => Promise<boolean>;
|
|
|
786
1163
|
*/
|
|
787
1164
|
declare const getDefaultPaths: () => WebauthnApis;
|
|
788
1165
|
|
|
789
|
-
type
|
|
790
|
-
type
|
|
791
|
-
type
|
|
792
|
-
type
|
|
793
|
-
type
|
|
794
|
-
type
|
|
795
|
-
type
|
|
796
|
-
type
|
|
797
|
-
type
|
|
798
|
-
type
|
|
799
|
-
type
|
|
800
|
-
type
|
|
801
|
-
type
|
|
802
|
-
type
|
|
803
|
-
type
|
|
804
|
-
declare const
|
|
805
|
-
type
|
|
806
|
-
declare const
|
|
807
|
-
declare const
|
|
808
|
-
declare const
|
|
809
|
-
declare const
|
|
810
|
-
declare const
|
|
811
|
-
declare const
|
|
812
|
-
declare const
|
|
813
|
-
declare namespace index_d {
|
|
1166
|
+
type index_d$1_ApiCrossDeviceStatusResponse = ApiCrossDeviceStatusResponse;
|
|
1167
|
+
type index_d$1_AttachDeviceResult = AttachDeviceResult;
|
|
1168
|
+
type index_d$1_AuthenticationAutofillActivateHandlers = AuthenticationAutofillActivateHandlers;
|
|
1169
|
+
type index_d$1_AutofillHandlers = AutofillHandlers;
|
|
1170
|
+
type index_d$1_CrossDeviceAuthenticationHandlers = CrossDeviceAuthenticationHandlers;
|
|
1171
|
+
type index_d$1_CrossDeviceController = CrossDeviceController;
|
|
1172
|
+
type index_d$1_CrossDeviceRegistrationHandlers = CrossDeviceRegistrationHandlers;
|
|
1173
|
+
type index_d$1_SdkError = SdkError;
|
|
1174
|
+
type index_d$1_WebauthnApis = WebauthnApis;
|
|
1175
|
+
type index_d$1_WebauthnApprovalFlows = WebauthnApprovalFlows;
|
|
1176
|
+
type index_d$1_WebauthnAuthenticationFlows = WebauthnAuthenticationFlows;
|
|
1177
|
+
type index_d$1_WebauthnAuthenticationOptions = WebauthnAuthenticationOptions;
|
|
1178
|
+
type index_d$1_WebauthnCrossDeviceFlows = WebauthnCrossDeviceFlows;
|
|
1179
|
+
type index_d$1_WebauthnCrossDeviceRegistrationOptions = WebauthnCrossDeviceRegistrationOptions;
|
|
1180
|
+
type index_d$1_WebauthnCrossDeviceStatus = WebauthnCrossDeviceStatus;
|
|
1181
|
+
declare const index_d$1_WebauthnCrossDeviceStatus: typeof WebauthnCrossDeviceStatus;
|
|
1182
|
+
type index_d$1_WebauthnRegistrationOptions = WebauthnRegistrationOptions;
|
|
1183
|
+
declare const index_d$1_approve: typeof approve;
|
|
1184
|
+
declare const index_d$1_authenticate: typeof authenticate;
|
|
1185
|
+
declare const index_d$1_crossDevice: typeof crossDevice;
|
|
1186
|
+
declare const index_d$1_getDefaultPaths: typeof getDefaultPaths;
|
|
1187
|
+
declare const index_d$1_isAutofillSupported: typeof isAutofillSupported;
|
|
1188
|
+
declare const index_d$1_isPlatformAuthenticatorSupported: typeof isPlatformAuthenticatorSupported;
|
|
1189
|
+
declare const index_d$1_register: typeof register;
|
|
1190
|
+
declare namespace index_d$1 {
|
|
814
1191
|
export {
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
1192
|
+
index_d$1_ApiCrossDeviceStatusResponse as ApiCrossDeviceStatusResponse,
|
|
1193
|
+
index_d$1_AttachDeviceResult as AttachDeviceResult,
|
|
1194
|
+
index_d$1_AuthenticationAutofillActivateHandlers as AuthenticationAutofillActivateHandlers,
|
|
1195
|
+
index_d$1_AutofillHandlers as AutofillHandlers,
|
|
1196
|
+
index_d$1_CrossDeviceAuthenticationHandlers as CrossDeviceAuthenticationHandlers,
|
|
1197
|
+
index_d$1_CrossDeviceController as CrossDeviceController,
|
|
1198
|
+
index_d$1_CrossDeviceRegistrationHandlers as CrossDeviceRegistrationHandlers,
|
|
822
1199
|
ErrorCode$1 as ErrorCode,
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
1200
|
+
index_d$1_SdkError as SdkError,
|
|
1201
|
+
index_d$1_WebauthnApis as WebauthnApis,
|
|
1202
|
+
index_d$1_WebauthnApprovalFlows as WebauthnApprovalFlows,
|
|
1203
|
+
index_d$1_WebauthnAuthenticationFlows as WebauthnAuthenticationFlows,
|
|
1204
|
+
index_d$1_WebauthnAuthenticationOptions as WebauthnAuthenticationOptions,
|
|
1205
|
+
index_d$1_WebauthnCrossDeviceFlows as WebauthnCrossDeviceFlows,
|
|
1206
|
+
index_d$1_WebauthnCrossDeviceRegistrationOptions as WebauthnCrossDeviceRegistrationOptions,
|
|
1207
|
+
index_d$1_WebauthnCrossDeviceStatus as WebauthnCrossDeviceStatus,
|
|
1208
|
+
index_d$1_WebauthnRegistrationOptions as WebauthnRegistrationOptions,
|
|
1209
|
+
index_d$1_approve as approve,
|
|
1210
|
+
index_d$1_authenticate as authenticate,
|
|
1211
|
+
index_d$1_crossDevice as crossDevice,
|
|
1212
|
+
index_d$1_getDefaultPaths as getDefaultPaths,
|
|
1213
|
+
index_d$1_isAutofillSupported as isAutofillSupported,
|
|
1214
|
+
index_d$1_isPlatformAuthenticatorSupported as isPlatformAuthenticatorSupported,
|
|
1215
|
+
index_d$1_register as register,
|
|
839
1216
|
};
|
|
840
1217
|
}
|
|
841
1218
|
|
|
@@ -868,6 +1245,12 @@ interface IdoInitOptions {
|
|
|
868
1245
|
* The expected locale format is the standard language tags as defined by the localization RFC 5646 (https://datatracker.ietf.org/doc/html/rfc5646).
|
|
869
1246
|
*/
|
|
870
1247
|
locale?: string;
|
|
1248
|
+
/**
|
|
1249
|
+
* When true, the SDK will collect queued device events and send them back to the server.
|
|
1250
|
+
* This flag is mandatory for collecting data for the Risk Level Analysis step.
|
|
1251
|
+
* @default false
|
|
1252
|
+
*/
|
|
1253
|
+
collectRiskData?: boolean;
|
|
871
1254
|
}
|
|
872
1255
|
/**
|
|
873
1256
|
* @interface
|
|
@@ -1786,13 +2169,57 @@ declare module "@transmit-security/web-sdk-common/dist/module-metadata/module-me
|
|
|
1786
2169
|
ido?: IdoInitOptions;
|
|
1787
2170
|
}
|
|
1788
2171
|
}
|
|
1789
|
-
declare const instance: IdoSdk;
|
|
1790
2172
|
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
2173
|
+
declare const startJourney: IdoSdk['startJourney'];
|
|
2174
|
+
declare const startSsoJourney: IdoSdk['startSsoJourney'];
|
|
2175
|
+
declare const submitClientResponse: IdoSdk['submitClientResponse'];
|
|
2176
|
+
declare const serializeState: IdoSdk['serializeState'];
|
|
2177
|
+
declare const restoreFromSerializedState: IdoSdk['restoreFromSerializedState'];
|
|
2178
|
+
declare const generateDebugPin: IdoSdk['generateDebugPin'];
|
|
1794
2179
|
|
|
1795
|
-
|
|
2180
|
+
type index_d_ClientResponseOption = ClientResponseOption;
|
|
2181
|
+
type index_d_ClientResponseOptionType = ClientResponseOptionType;
|
|
2182
|
+
declare const index_d_ClientResponseOptionType: typeof ClientResponseOptionType;
|
|
2183
|
+
type index_d_IdoInitOptions = IdoInitOptions;
|
|
2184
|
+
type index_d_IdoJourneyActionType = IdoJourneyActionType;
|
|
2185
|
+
declare const index_d_IdoJourneyActionType: typeof IdoJourneyActionType;
|
|
2186
|
+
type index_d_IdoSdk = IdoSdk;
|
|
2187
|
+
type index_d_IdoSdkError = IdoSdkError;
|
|
2188
|
+
type index_d_IdoServiceResponse = IdoServiceResponse;
|
|
2189
|
+
type index_d_IdoServiceResponseType = IdoServiceResponseType;
|
|
2190
|
+
declare const index_d_IdoServiceResponseType: typeof IdoServiceResponseType;
|
|
2191
|
+
type index_d_LogLevel = LogLevel;
|
|
2192
|
+
declare const index_d_LogLevel: typeof LogLevel;
|
|
2193
|
+
type index_d_StartJourneyOptions = StartJourneyOptions;
|
|
2194
|
+
type index_d_StartSsoJourneyOptions = StartSsoJourneyOptions;
|
|
2195
|
+
declare const index_d_generateDebugPin: typeof generateDebugPin;
|
|
2196
|
+
declare const index_d_restoreFromSerializedState: typeof restoreFromSerializedState;
|
|
2197
|
+
declare const index_d_serializeState: typeof serializeState;
|
|
2198
|
+
declare const index_d_startJourney: typeof startJourney;
|
|
2199
|
+
declare const index_d_startSsoJourney: typeof startSsoJourney;
|
|
2200
|
+
declare const index_d_submitClientResponse: typeof submitClientResponse;
|
|
2201
|
+
declare namespace index_d {
|
|
2202
|
+
export {
|
|
2203
|
+
index_d_ClientResponseOption as ClientResponseOption,
|
|
2204
|
+
index_d_ClientResponseOptionType as ClientResponseOptionType,
|
|
2205
|
+
ErrorCode as IdoErrorCode,
|
|
2206
|
+
index_d_IdoInitOptions as IdoInitOptions,
|
|
2207
|
+
index_d_IdoJourneyActionType as IdoJourneyActionType,
|
|
2208
|
+
index_d_IdoSdk as IdoSdk,
|
|
2209
|
+
index_d_IdoSdkError as IdoSdkError,
|
|
2210
|
+
index_d_IdoServiceResponse as IdoServiceResponse,
|
|
2211
|
+
index_d_IdoServiceResponseType as IdoServiceResponseType,
|
|
2212
|
+
index_d_LogLevel as LogLevel,
|
|
2213
|
+
index_d_StartJourneyOptions as StartJourneyOptions,
|
|
2214
|
+
index_d_StartSsoJourneyOptions as StartSsoJourneyOptions,
|
|
2215
|
+
index_d_generateDebugPin as generateDebugPin,
|
|
2216
|
+
index_d_restoreFromSerializedState as restoreFromSerializedState,
|
|
2217
|
+
index_d_serializeState as serializeState,
|
|
2218
|
+
index_d_startJourney as startJourney,
|
|
2219
|
+
index_d_startSsoJourney as startSsoJourney,
|
|
2220
|
+
index_d_submitClientResponse as submitClientResponse,
|
|
2221
|
+
};
|
|
2222
|
+
}
|
|
1796
2223
|
|
|
1797
2224
|
/**
|
|
1798
2225
|
* Main SDK class for CDN usage (window.tsPlatform)
|
|
@@ -1807,6 +2234,6 @@ declare class TSWebSDK {
|
|
|
1807
2234
|
}
|
|
1808
2235
|
declare const _default: TSWebSDK;
|
|
1809
2236
|
|
|
1810
|
-
declare const PACKAGE_VERSION = "
|
|
2237
|
+
declare const PACKAGE_VERSION = "2.0.0-beta.0";
|
|
1811
2238
|
|
|
1812
|
-
export { ActionEventOptions, ActionResponse, AuthenticationAutofillActivateHandlers, AutofillHandlers, CrossDeviceController, ErrorCode$1 as ErrorCode, PACKAGE_VERSION, SdkError, WebauthnApis, WebauthnAuthenticationFlows, WebauthnCrossDeviceFlows, WebauthnCrossDeviceRegistrationOptions, WebauthnRegistrationOptions, authenticate, crossDevice, _default as default, webSdkModule_d as drs, getDefaultPaths,
|
|
2239
|
+
export { ActionEventOptions, ActionResponse, AuthenticationAutofillActivateHandlers, AutofillHandlers, CrossDeviceController, ErrorCode$1 as ErrorCode, PACKAGE_VERSION, SdkError, WebauthnApis, WebauthnAuthenticationFlows, WebauthnCrossDeviceFlows, WebauthnCrossDeviceRegistrationOptions, WebauthnRegistrationOptions, authenticate, index_d$3 as common, crossDevice, _default as default, webSdkModule_d as drs, getDefaultPaths, index_d as ido, index_d$2 as idv, initConfigParams, initialize, isAutofillSupported, isPlatformAuthenticatorSupported, register, index_d$1 as webauthn };
|