@transmitsecurity/platform-web-sdk 1.18.2 → 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/CHANGELOG.md +45 -0
- package/README.md +70 -59
- package/dist/common.cjs +1 -0
- package/dist/common.d.ts +11 -0
- package/dist/common.js +1 -0
- 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 +576 -167
- package/dist/webauthn.cjs +1 -1
- package/dist/webauthn.d.ts +45 -24
- package/dist/webauthn.js +1 -1
- package/package.json +23 -11
package/dist/web-sdk.d.ts
CHANGED
|
@@ -1,3 +1,389 @@
|
|
|
1
|
+
type AgentCreate<T> = T extends new (...any: any) => Agent ? InstanceType<T> : T extends Function ? OmitThisParameter<T> : T extends {} ? BoundMethods<T> : T;
|
|
2
|
+
type BoundMethods<T> = {
|
|
3
|
+
[key in keyof T]: OmitThisParameter<AgentCreate<T[key]>>;
|
|
4
|
+
};
|
|
5
|
+
declare class Agent {
|
|
6
|
+
slug: string;
|
|
7
|
+
constructor(slug: string);
|
|
8
|
+
static create<T extends object>(method: (agent: Agent) => T): new (slug: string) => Agent & BoundMethods<T>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface eventNameToDataParam {
|
|
12
|
+
[eventName: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
type eventKnownName = keyof eventNameToDataParam;
|
|
15
|
+
type callback<T> = (eventData: T) => void;
|
|
16
|
+
declare function on<T extends eventKnownName>(eventName: T, method: callback<eventNameToDataParam[T]>): void;
|
|
17
|
+
declare function off<T extends eventKnownName>(eventName: T, method: callback<eventNameToDataParam[T]>): void;
|
|
18
|
+
declare function emit<T extends eventKnownName>(eventName: T, eventData: eventNameToDataParam[T]): void;
|
|
19
|
+
|
|
20
|
+
declare module './events' {
|
|
21
|
+
interface eventNameToDataParam {
|
|
22
|
+
[MODULE_INITIALIZED]: undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
declare const MODULE_INITIALIZED: unique symbol;
|
|
26
|
+
|
|
27
|
+
declare const events_MODULE_INITIALIZED: typeof MODULE_INITIALIZED;
|
|
28
|
+
declare const events_emit: typeof emit;
|
|
29
|
+
type events_eventNameToDataParam = eventNameToDataParam;
|
|
30
|
+
declare const events_off: typeof off;
|
|
31
|
+
declare const events_on: typeof on;
|
|
32
|
+
declare namespace events {
|
|
33
|
+
export {
|
|
34
|
+
events_MODULE_INITIALIZED as MODULE_INITIALIZED,
|
|
35
|
+
events_emit as emit,
|
|
36
|
+
events_eventNameToDataParam as eventNameToDataParam,
|
|
37
|
+
events_off as off,
|
|
38
|
+
events_on as on,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface initConfigParams {
|
|
43
|
+
clientId: string;
|
|
44
|
+
}
|
|
45
|
+
declare let initConfig: initConfigParams | null;
|
|
46
|
+
declare function getInitConfig(): initConfigParams | null;
|
|
47
|
+
declare function setInitConfig(config: initConfigParams): void;
|
|
48
|
+
|
|
49
|
+
declare const moduleMetadata_getInitConfig: typeof getInitConfig;
|
|
50
|
+
declare const moduleMetadata_initConfig: typeof initConfig;
|
|
51
|
+
type moduleMetadata_initConfigParams = initConfigParams;
|
|
52
|
+
declare const moduleMetadata_setInitConfig: typeof setInitConfig;
|
|
53
|
+
declare namespace moduleMetadata {
|
|
54
|
+
export {
|
|
55
|
+
moduleMetadata_getInitConfig as getInitConfig,
|
|
56
|
+
moduleMetadata_initConfig as initConfig,
|
|
57
|
+
moduleMetadata_initConfigParams as initConfigParams,
|
|
58
|
+
moduleMetadata_setInitConfig as setInitConfig,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare function initialize(params: initConfigParams): void;
|
|
63
|
+
|
|
64
|
+
type mainEntry_initConfigParams = initConfigParams;
|
|
65
|
+
declare const mainEntry_initialize: typeof initialize;
|
|
66
|
+
declare namespace mainEntry {
|
|
67
|
+
export {
|
|
68
|
+
mainEntry_initConfigParams as initConfigParams,
|
|
69
|
+
mainEntry_initialize as initialize,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type JsonNode = number | string | boolean | null | undefined | JsonNode[] | {
|
|
74
|
+
[key: string]: JsonNode;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
declare const COMMON_STORAGE_KEY = "tsec";
|
|
78
|
+
declare const GENERAL_ID_KEY = "general";
|
|
79
|
+
type storageKeyOptions = {
|
|
80
|
+
isGeneral?: boolean;
|
|
81
|
+
sessionOnly?: boolean;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Storage module handles local storage and session storgae for multyple modules in
|
|
85
|
+
* same storage key, with JSON serialization. It stores data in 'tsec' key, as an
|
|
86
|
+
* object with that structure:
|
|
87
|
+
* { [moduleSlug]: { [clientId | 'general']: { [key]: value } } }
|
|
88
|
+
*/
|
|
89
|
+
declare function setValue(this: Agent, key: string, value: JsonNode, options?: storageKeyOptions): void;
|
|
90
|
+
declare function removeValue(this: Agent, key: string, options?: storageKeyOptions): void;
|
|
91
|
+
declare function getValue(this: Agent, key: string, options?: storageKeyOptions): JsonNode;
|
|
92
|
+
declare function hasValue(this: Agent, key: string, options?: storageKeyOptions): JsonNode;
|
|
93
|
+
|
|
94
|
+
declare const storage_COMMON_STORAGE_KEY: typeof COMMON_STORAGE_KEY;
|
|
95
|
+
declare const storage_GENERAL_ID_KEY: typeof GENERAL_ID_KEY;
|
|
96
|
+
declare const storage_getValue: typeof getValue;
|
|
97
|
+
declare const storage_hasValue: typeof hasValue;
|
|
98
|
+
declare const storage_removeValue: typeof removeValue;
|
|
99
|
+
declare const storage_setValue: typeof setValue;
|
|
100
|
+
type storage_storageKeyOptions = storageKeyOptions;
|
|
101
|
+
declare namespace storage {
|
|
102
|
+
export {
|
|
103
|
+
storage_COMMON_STORAGE_KEY as COMMON_STORAGE_KEY,
|
|
104
|
+
storage_GENERAL_ID_KEY as GENERAL_ID_KEY,
|
|
105
|
+
storage_getValue as getValue,
|
|
106
|
+
storage_hasValue as hasValue,
|
|
107
|
+
storage_removeValue as removeValue,
|
|
108
|
+
storage_setValue as setValue,
|
|
109
|
+
storage_storageKeyOptions as storageKeyOptions,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare const INIT_ROTATION_RESPONSE = "init";
|
|
114
|
+
declare const COMPLETED_ROTATION_RESPONSE = "completed";
|
|
115
|
+
type CryptoBindingPublicData = {
|
|
116
|
+
publicKey: string;
|
|
117
|
+
keyIdentifier: string;
|
|
118
|
+
currentKeyId: string;
|
|
119
|
+
};
|
|
120
|
+
type CryptoBindingRotationPayload = {
|
|
121
|
+
data: string;
|
|
122
|
+
signature: string;
|
|
123
|
+
};
|
|
124
|
+
type CryptoBindingOptions = {
|
|
125
|
+
/** Set to true if you want to scope your crypto-binding keys with your product only (default is false, to use global-platofrm scope) */
|
|
126
|
+
productScope?: boolean;
|
|
127
|
+
/** Custom database name, will be affected only if set `productScope` to true */
|
|
128
|
+
indexedDBName?: string;
|
|
129
|
+
/** Custom db-versioning, will be be affected only if set `productScope` to true */
|
|
130
|
+
dbVersion?: number;
|
|
131
|
+
/** Custom keys-store (table) name, will be affected only if set `productScope` to true */
|
|
132
|
+
keysStoreName?: string;
|
|
133
|
+
/** Set to true if product supports key rotation */
|
|
134
|
+
/** Expiry days - number of days after which the key will expire */
|
|
135
|
+
/** Started at - timestamp of the day when the rotation was enabled for the product */
|
|
136
|
+
keyRotation?: {
|
|
137
|
+
isEnabled: boolean;
|
|
138
|
+
expiryDays: number;
|
|
139
|
+
startedAt: number;
|
|
140
|
+
tenantId: string;
|
|
141
|
+
};
|
|
142
|
+
/** @internal
|
|
143
|
+
* Warning! This flag shouldn't be used, it was added temporarily for multi-tenant support.
|
|
144
|
+
*
|
|
145
|
+
* Internal flag used when the Product SDK instance has its own client ID separate from the Platform SDK root-level client ID */
|
|
146
|
+
fallbackClientId?: string;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* @param keysType - the purpose of the keys, will use different key generator
|
|
150
|
+
* @param options - typeof CryptoBindingOptions
|
|
151
|
+
*/
|
|
152
|
+
declare class CryptoBinding {
|
|
153
|
+
agent: Agent;
|
|
154
|
+
private keysType;
|
|
155
|
+
private options?;
|
|
156
|
+
private indexedDBClient;
|
|
157
|
+
private indexedDBClientFallback;
|
|
158
|
+
private keysDatabaseName;
|
|
159
|
+
private keysStoreName;
|
|
160
|
+
private dbVersion;
|
|
161
|
+
private publicKeyBase64;
|
|
162
|
+
private keyIdentifier;
|
|
163
|
+
private currentKeyId;
|
|
164
|
+
private _extractingKeysPromise;
|
|
165
|
+
constructor(agent: Agent, keysType?: 'encrypt' | 'sign', options?: CryptoBindingOptions);
|
|
166
|
+
private getClientConfiguration;
|
|
167
|
+
private getKeysRecordKey;
|
|
168
|
+
private getRotatedKeysRecordKey;
|
|
169
|
+
private getRotatedKeysRecordKeyPending;
|
|
170
|
+
private arrayBufferToBase64;
|
|
171
|
+
private getPKRepresentations;
|
|
172
|
+
private generateKeyPair;
|
|
173
|
+
private calcKeyIdentifier;
|
|
174
|
+
private extractKeysData;
|
|
175
|
+
private generateKeyPairData;
|
|
176
|
+
private shouldKeyBeRotated;
|
|
177
|
+
private extractMainKeysData;
|
|
178
|
+
private extractFallbackMainKeysData;
|
|
179
|
+
private extractRotatedKeysData;
|
|
180
|
+
private extractPendingRotatedKeysData;
|
|
181
|
+
private saveKeyData;
|
|
182
|
+
private getKeysData;
|
|
183
|
+
private getOrCreateRotatedKeys;
|
|
184
|
+
private getRotatedKeysData;
|
|
185
|
+
getPublicData(): Promise<CryptoBindingPublicData>;
|
|
186
|
+
sign(message: string): Promise<string>;
|
|
187
|
+
clearKeys(): Promise<void>;
|
|
188
|
+
private getBaseRotationPayload;
|
|
189
|
+
getRotationData(): Promise<CryptoBindingRotationPayload | undefined>;
|
|
190
|
+
private signPayload;
|
|
191
|
+
handleRotateResponse(response: string): Promise<void>;
|
|
192
|
+
}
|
|
193
|
+
declare function createCryptoBinding(this: Agent, keysType?: 'encrypt' | 'sign', options?: CryptoBindingOptions): CryptoBinding;
|
|
194
|
+
|
|
195
|
+
declare const generateRSAKeyPair: () => Promise<CryptoKey | CryptoKeyPair>;
|
|
196
|
+
declare const generateRSASignKeyPair: () => Promise<CryptoKey | CryptoKeyPair>;
|
|
197
|
+
declare const signAssymetric: (privateKey: CryptoKey, message: string) => Promise<ArrayBuffer>;
|
|
198
|
+
declare const verifyAssymetric: (publicKey: CryptoKey, message: string, signature: ArrayBuffer) => Promise<boolean>;
|
|
199
|
+
|
|
200
|
+
declare const crypto_COMPLETED_ROTATION_RESPONSE: typeof COMPLETED_ROTATION_RESPONSE;
|
|
201
|
+
type crypto_CryptoBindingOptions = CryptoBindingOptions;
|
|
202
|
+
type crypto_CryptoBindingPublicData = CryptoBindingPublicData;
|
|
203
|
+
declare const crypto_INIT_ROTATION_RESPONSE: typeof INIT_ROTATION_RESPONSE;
|
|
204
|
+
declare const crypto_createCryptoBinding: typeof createCryptoBinding;
|
|
205
|
+
declare const crypto_generateRSAKeyPair: typeof generateRSAKeyPair;
|
|
206
|
+
declare const crypto_generateRSASignKeyPair: typeof generateRSASignKeyPair;
|
|
207
|
+
declare const crypto_signAssymetric: typeof signAssymetric;
|
|
208
|
+
declare const crypto_verifyAssymetric: typeof verifyAssymetric;
|
|
209
|
+
declare namespace crypto {
|
|
210
|
+
export {
|
|
211
|
+
crypto_COMPLETED_ROTATION_RESPONSE as COMPLETED_ROTATION_RESPONSE,
|
|
212
|
+
crypto_CryptoBindingOptions as CryptoBindingOptions,
|
|
213
|
+
crypto_CryptoBindingPublicData as CryptoBindingPublicData,
|
|
214
|
+
crypto_INIT_ROTATION_RESPONSE as INIT_ROTATION_RESPONSE,
|
|
215
|
+
crypto_createCryptoBinding as createCryptoBinding,
|
|
216
|
+
crypto_generateRSAKeyPair as generateRSAKeyPair,
|
|
217
|
+
crypto_generateRSASignKeyPair as generateRSASignKeyPair,
|
|
218
|
+
crypto_signAssymetric as signAssymetric,
|
|
219
|
+
crypto_verifyAssymetric as verifyAssymetric,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
type QueryObjectStoreOptions = {
|
|
224
|
+
operation?: 'read' | 'readwrite';
|
|
225
|
+
attemptToRecoverDB?: boolean;
|
|
226
|
+
};
|
|
227
|
+
type TransactionOperation = {
|
|
228
|
+
type: 'put';
|
|
229
|
+
key: string;
|
|
230
|
+
value: any;
|
|
231
|
+
} | {
|
|
232
|
+
type: 'delete';
|
|
233
|
+
key: string;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
type indexedDB_QueryObjectStoreOptions = QueryObjectStoreOptions;
|
|
237
|
+
type indexedDB_TransactionOperation = TransactionOperation;
|
|
238
|
+
declare namespace indexedDB {
|
|
239
|
+
export {
|
|
240
|
+
indexedDB_QueryObjectStoreOptions as QueryObjectStoreOptions,
|
|
241
|
+
indexedDB_TransactionOperation as TransactionOperation,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
type LogSeverity = 1 | 2 | 3 | 4 | 5 | 6;
|
|
246
|
+
interface LogRow {
|
|
247
|
+
timestamp: number;
|
|
248
|
+
severity: LogSeverity;
|
|
249
|
+
message: string;
|
|
250
|
+
module: string;
|
|
251
|
+
fields: object;
|
|
252
|
+
}
|
|
253
|
+
type Middleware = (instance: SdkLogger) => void;
|
|
254
|
+
declare class SdkLogger {
|
|
255
|
+
agent: Agent;
|
|
256
|
+
middlewares: Middleware[];
|
|
257
|
+
logs: LogRow[];
|
|
258
|
+
constructor(agent: Agent, middlewares?: Middleware[]);
|
|
259
|
+
info(message: string, fields?: object): void;
|
|
260
|
+
warn(message: string, fields?: object): void;
|
|
261
|
+
error(message: string, fields?: object): void;
|
|
262
|
+
private pushLog;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
declare function createSdkLogger(this: Agent, middlewares?: Middleware[]): SdkLogger;
|
|
266
|
+
|
|
267
|
+
declare function consoleMiddleware(logger: SdkLogger): void;
|
|
268
|
+
|
|
269
|
+
type logger_SdkLogger = SdkLogger;
|
|
270
|
+
declare const logger_SdkLogger: typeof SdkLogger;
|
|
271
|
+
declare const logger_consoleMiddleware: typeof consoleMiddleware;
|
|
272
|
+
declare const logger_createSdkLogger: typeof createSdkLogger;
|
|
273
|
+
declare namespace logger {
|
|
274
|
+
export {
|
|
275
|
+
logger_SdkLogger as SdkLogger,
|
|
276
|
+
logger_consoleMiddleware as consoleMiddleware,
|
|
277
|
+
logger_createSdkLogger as createSdkLogger,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
282
|
+
type RequestBody = object;
|
|
283
|
+
type HttpResponse<T> = Response & {
|
|
284
|
+
data: T;
|
|
285
|
+
};
|
|
286
|
+
type ResponseError = {
|
|
287
|
+
message: string;
|
|
288
|
+
};
|
|
289
|
+
declare function init(method: HttpMethod, body?: RequestBody, headers?: HeadersInit): RequestInit;
|
|
290
|
+
/**
|
|
291
|
+
* constructs a `GET` request
|
|
292
|
+
* @param path API path
|
|
293
|
+
* @param params request parameters
|
|
294
|
+
* @returns a promise of the response body if successful and throw an error if failed
|
|
295
|
+
*/
|
|
296
|
+
declare function httpGet<T>(path: string, params?: URLSearchParams, headers?: HeadersInit): Promise<HttpResponse<T>>;
|
|
297
|
+
/**
|
|
298
|
+
* constructs a `POST` request
|
|
299
|
+
* @param path API path
|
|
300
|
+
* @param data content of the request
|
|
301
|
+
* @param params request parameters
|
|
302
|
+
* @returns a promise of the response body if successful and throw an error if failed
|
|
303
|
+
*/
|
|
304
|
+
declare function httpPost<T>(path: string, data: RequestBody, params?: URLSearchParams, headers?: HeadersInit): Promise<HttpResponse<T>>;
|
|
305
|
+
/**
|
|
306
|
+
* constructs a `PUT` request
|
|
307
|
+
* @param path API path
|
|
308
|
+
* @param data content of the request
|
|
309
|
+
* @param params request parameters
|
|
310
|
+
* @returns a promise of the response body if successful and throw an error if failed
|
|
311
|
+
*/
|
|
312
|
+
declare function httpPut<T>(path: string, data: RequestBody, params?: URLSearchParams, headers?: HeadersInit): Promise<HttpResponse<T>>;
|
|
313
|
+
/**
|
|
314
|
+
* constructs a `DELETE` request
|
|
315
|
+
* @param path API path
|
|
316
|
+
* @param body content of the request
|
|
317
|
+
* @param params request parameters
|
|
318
|
+
* @returns a promise of the response body if successful and throw an error if failed
|
|
319
|
+
*/
|
|
320
|
+
declare function httpDelete<T>(path: string, headers?: HeadersInit): Promise<HttpResponse<T>>;
|
|
321
|
+
|
|
322
|
+
type http_HttpMethod = HttpMethod;
|
|
323
|
+
type http_HttpResponse<T> = HttpResponse<T>;
|
|
324
|
+
type http_RequestBody = RequestBody;
|
|
325
|
+
type http_ResponseError = ResponseError;
|
|
326
|
+
declare const http_httpDelete: typeof httpDelete;
|
|
327
|
+
declare const http_httpGet: typeof httpGet;
|
|
328
|
+
declare const http_httpPost: typeof httpPost;
|
|
329
|
+
declare const http_httpPut: typeof httpPut;
|
|
330
|
+
declare const http_init: typeof init;
|
|
331
|
+
declare namespace http {
|
|
332
|
+
export {
|
|
333
|
+
http_HttpMethod as HttpMethod,
|
|
334
|
+
http_HttpResponse as HttpResponse,
|
|
335
|
+
http_RequestBody as RequestBody,
|
|
336
|
+
http_ResponseError as ResponseError,
|
|
337
|
+
http_httpDelete as httpDelete,
|
|
338
|
+
http_httpGet as httpGet,
|
|
339
|
+
http_httpPost as httpPost,
|
|
340
|
+
http_httpPut as httpPut,
|
|
341
|
+
http_init as init,
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
declare const _default$1: new (slug: string) => Agent & BoundMethods<{
|
|
346
|
+
events: typeof events;
|
|
347
|
+
moduleMetadata: typeof moduleMetadata;
|
|
348
|
+
mainEntry: typeof mainEntry;
|
|
349
|
+
utils: new (slug: string) => Agent & BoundMethods<{
|
|
350
|
+
Agent: typeof Agent;
|
|
351
|
+
exceptions: new (slug: string) => Agent & BoundMethods<{
|
|
352
|
+
TsError: {
|
|
353
|
+
new (errorCode: string, message: string): {
|
|
354
|
+
name: string;
|
|
355
|
+
message: string;
|
|
356
|
+
stack?: string;
|
|
357
|
+
};
|
|
358
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
359
|
+
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
|
|
360
|
+
stackTraceLimit: number;
|
|
361
|
+
};
|
|
362
|
+
TsInternalError: {
|
|
363
|
+
new (errorCode: string): {
|
|
364
|
+
name: string;
|
|
365
|
+
message: string;
|
|
366
|
+
stack?: string;
|
|
367
|
+
};
|
|
368
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
369
|
+
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
|
|
370
|
+
stackTraceLimit: number;
|
|
371
|
+
};
|
|
372
|
+
}>;
|
|
373
|
+
}>;
|
|
374
|
+
storage: typeof storage;
|
|
375
|
+
crypto: typeof crypto;
|
|
376
|
+
indexedDB: typeof indexedDB;
|
|
377
|
+
logger: typeof logger;
|
|
378
|
+
http: typeof http;
|
|
379
|
+
}>;
|
|
380
|
+
|
|
381
|
+
declare namespace index_d$3 {
|
|
382
|
+
export {
|
|
383
|
+
_default$1 as default,
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
|
|
1
387
|
declare enum RecommendationType {
|
|
2
388
|
ALLOW = "ALLOW",
|
|
3
389
|
CHALLENGE = "CHALLENGE",
|
|
@@ -13,36 +399,27 @@ type EventResponse = {
|
|
|
13
399
|
type Recommendation = {
|
|
14
400
|
type: RecommendationType;
|
|
15
401
|
};
|
|
402
|
+
type LightweightPayload = {
|
|
403
|
+
clientId: string;
|
|
404
|
+
deviceId: string;
|
|
405
|
+
userId: string | null;
|
|
406
|
+
sdkPlatform: 'mobile_web' | 'desktop_web';
|
|
407
|
+
events: Array<Record<string, unknown>>;
|
|
408
|
+
};
|
|
16
409
|
|
|
17
410
|
interface ActionResponse {
|
|
18
|
-
/** The token return by the SDK when the action was reported */
|
|
19
411
|
actionToken?: string;
|
|
20
412
|
}
|
|
21
413
|
interface InitOptions {
|
|
22
|
-
/** Opaque identifier of the user in your system */
|
|
23
414
|
userId?: string;
|
|
24
415
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Initial parameters for SDK
|
|
27
|
-
*/
|
|
28
416
|
interface ConstructorOptions {
|
|
29
|
-
/** Print logs to console */
|
|
30
417
|
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 */
|
|
418
|
+
serverPath: string;
|
|
38
419
|
enableSessionToken?: boolean;
|
|
39
|
-
/** First party server url for the identifiers migration
|
|
40
|
-
*
|
|
41
|
-
* Default value is undefined */
|
|
42
420
|
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
421
|
hasOwnClientId?: boolean;
|
|
422
|
+
tier?: 'standard' | 'lightweight';
|
|
46
423
|
}
|
|
47
424
|
interface TransactionData {
|
|
48
425
|
amount: number;
|
|
@@ -63,27 +440,12 @@ interface TransactionData {
|
|
|
63
440
|
};
|
|
64
441
|
}
|
|
65
442
|
interface ActionEventOptions {
|
|
66
|
-
/** Any ID that could help relate the action with external context or session */
|
|
67
443
|
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
444
|
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
445
|
claimedUserIdType?: string;
|
|
77
|
-
/**
|
|
78
|
-
* A transaction data-points object for transaction-monitoring
|
|
79
|
-
*/
|
|
80
446
|
transactionData?: TransactionData;
|
|
81
|
-
/**
|
|
82
|
-
* Custom attributes matching the schema previously defined in the Admin Portal
|
|
83
|
-
*/
|
|
84
447
|
customAttributes?: Record<string, string | number | boolean>;
|
|
85
448
|
/**
|
|
86
|
-
* The fields below are supported for Enterprise-IAM sdk usage actions, added `ignore` for avoiding preseting this attribute in the docs
|
|
87
449
|
* @ignore
|
|
88
450
|
*/
|
|
89
451
|
publicKey?: string;
|
|
@@ -120,6 +482,7 @@ declare class TSAccountProtection {
|
|
|
120
482
|
private identifiersMigrationEnabled;
|
|
121
483
|
private firstPartyMigrationUrl;
|
|
122
484
|
private hasOwnClientId;
|
|
485
|
+
private tier;
|
|
123
486
|
private validationManager;
|
|
124
487
|
private storageManager;
|
|
125
488
|
private eventsManager;
|
|
@@ -132,62 +495,34 @@ declare class TSAccountProtection {
|
|
|
132
495
|
private logsReporter;
|
|
133
496
|
private options;
|
|
134
497
|
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);
|
|
498
|
+
constructor(clientId: string, options: ConstructorOptions);
|
|
142
499
|
/** @ignore */
|
|
143
500
|
constructor(serverPath: string, clientId: string);
|
|
144
501
|
private generateDisabledToken;
|
|
145
502
|
/**
|
|
146
503
|
* @ignore
|
|
147
|
-
* @returns List of loaded actions that can be invoked
|
|
148
504
|
*/
|
|
149
505
|
get actions(): string[];
|
|
150
506
|
/** @ignore */
|
|
151
507
|
getActions(): Promise<string[]>;
|
|
152
508
|
getSessionToken(): Promise<any>;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
* @param options Init options
|
|
156
|
-
* @returns Indicates if the call succeeded
|
|
157
|
-
*/
|
|
509
|
+
getPayload(): Promise<LightweightPayload>;
|
|
510
|
+
clearQueue(): void;
|
|
158
511
|
init(options?: InitOptions | string): Promise<boolean>;
|
|
159
512
|
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
513
|
triggerActionEvent(actionType: string, options?: ActionEventOptions): Promise<ActionResponse>;
|
|
166
514
|
/**
|
|
167
515
|
* @ignore
|
|
168
516
|
*/
|
|
169
517
|
identifyUser(userId: string): Promise<boolean>;
|
|
170
518
|
private updateUserId;
|
|
519
|
+
setAuthenticatedUser(userId: string, options?: {}): Promise<boolean>;
|
|
520
|
+
clearUser(options?: {}): Promise<boolean>;
|
|
171
521
|
/**
|
|
172
522
|
* @ignore
|
|
173
523
|
*/
|
|
174
524
|
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>;
|
|
525
|
+
getSecureSessionToken(actionType?: string | null, expirationSeconds?: number): Promise<string>;
|
|
191
526
|
}
|
|
192
527
|
|
|
193
528
|
declare module '@transmit-security/web-sdk-common/dist/module-metadata/module-metadata' {
|
|
@@ -205,8 +540,6 @@ declare module '@transmit-security/web-sdk-common/dist/module-metadata/module-me
|
|
|
205
540
|
* @returns Indicates if the call succeeded
|
|
206
541
|
*/
|
|
207
542
|
declare const triggerActionEvent: TSAccountProtection['triggerActionEvent'];
|
|
208
|
-
/** @ignore */
|
|
209
|
-
declare const setUser: TSAccountProtection['setUser'];
|
|
210
543
|
/**
|
|
211
544
|
* Sets the user context for all subsequent events in the browser session (or until the user is explicitly cleared)
|
|
212
545
|
* It should be set only after you've fully authenticated the user (including, for example, any 2FA that was required)
|
|
@@ -222,13 +555,18 @@ declare const setAuthenticatedUser: TSAccountProtection['setAuthenticatedUser'];
|
|
|
222
555
|
*/
|
|
223
556
|
declare const clearUser: TSAccountProtection['clearUser'];
|
|
224
557
|
/** @ignore */
|
|
225
|
-
declare const identifyUser: TSAccountProtection['identifyUser'];
|
|
226
|
-
/** @ignore */
|
|
227
|
-
declare const unidentifiedUser: TSAccountProtection['unidentifiedUser'];
|
|
228
|
-
/** @ignore */
|
|
229
558
|
declare const getActions: TSAccountProtection['getActions'];
|
|
230
559
|
/** @ignore */
|
|
231
560
|
declare const getSessionToken: TSAccountProtection['getSessionToken'];
|
|
561
|
+
/**
|
|
562
|
+
* Gets a secure session token that is signed with the device's private key
|
|
563
|
+
* @param actionType Optional action type to include in the token payload (default: null)
|
|
564
|
+
* @param expirationSeconds Optional expiration time in seconds (default: 300 seconds / 5 minutes)
|
|
565
|
+
* @returns A JWT-like token containing the backend session token and device information, signed with the device's private key
|
|
566
|
+
*/
|
|
567
|
+
declare const getSecureSessionToken: TSAccountProtection['getSecureSessionToken'];
|
|
568
|
+
/** @ignore */
|
|
569
|
+
declare const getPayload: TSAccountProtection['getPayload'];
|
|
232
570
|
/** @ignore */
|
|
233
571
|
declare const __internal: {
|
|
234
572
|
getDeviceId(): string;
|
|
@@ -238,28 +576,28 @@ declare const __internal: {
|
|
|
238
576
|
|
|
239
577
|
type webSdkModule_d_ActionEventOptions = ActionEventOptions;
|
|
240
578
|
type webSdkModule_d_ActionResponse = ActionResponse;
|
|
579
|
+
type webSdkModule_d_LightweightPayload = LightweightPayload;
|
|
241
580
|
declare const webSdkModule_d___internal: typeof __internal;
|
|
242
581
|
declare const webSdkModule_d_clearUser: typeof clearUser;
|
|
243
582
|
declare const webSdkModule_d_getActions: typeof getActions;
|
|
583
|
+
declare const webSdkModule_d_getPayload: typeof getPayload;
|
|
584
|
+
declare const webSdkModule_d_getSecureSessionToken: typeof getSecureSessionToken;
|
|
244
585
|
declare const webSdkModule_d_getSessionToken: typeof getSessionToken;
|
|
245
|
-
declare const webSdkModule_d_identifyUser: typeof identifyUser;
|
|
246
586
|
declare const webSdkModule_d_setAuthenticatedUser: typeof setAuthenticatedUser;
|
|
247
|
-
declare const webSdkModule_d_setUser: typeof setUser;
|
|
248
587
|
declare const webSdkModule_d_triggerActionEvent: typeof triggerActionEvent;
|
|
249
|
-
declare const webSdkModule_d_unidentifiedUser: typeof unidentifiedUser;
|
|
250
588
|
declare namespace webSdkModule_d {
|
|
251
589
|
export {
|
|
252
590
|
webSdkModule_d_ActionEventOptions as ActionEventOptions,
|
|
253
591
|
webSdkModule_d_ActionResponse as ActionResponse,
|
|
592
|
+
webSdkModule_d_LightweightPayload as LightweightPayload,
|
|
254
593
|
webSdkModule_d___internal as __internal,
|
|
255
594
|
webSdkModule_d_clearUser as clearUser,
|
|
256
595
|
webSdkModule_d_getActions as getActions,
|
|
596
|
+
webSdkModule_d_getPayload as getPayload,
|
|
597
|
+
webSdkModule_d_getSecureSessionToken as getSecureSessionToken,
|
|
257
598
|
webSdkModule_d_getSessionToken as getSessionToken,
|
|
258
|
-
webSdkModule_d_identifyUser as identifyUser,
|
|
259
599
|
webSdkModule_d_setAuthenticatedUser as setAuthenticatedUser,
|
|
260
|
-
webSdkModule_d_setUser as setUser,
|
|
261
600
|
webSdkModule_d_triggerActionEvent as triggerActionEvent,
|
|
262
|
-
webSdkModule_d_unidentifiedUser as unidentifiedUser,
|
|
263
601
|
};
|
|
264
602
|
}
|
|
265
603
|
|
|
@@ -322,16 +660,16 @@ declare function recapture(): Promise<boolean>;
|
|
|
322
660
|
declare function restart(): Promise<boolean>;
|
|
323
661
|
declare const version: () => string;
|
|
324
662
|
|
|
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$
|
|
663
|
+
declare const index_d$2_recapture: typeof recapture;
|
|
664
|
+
declare const index_d$2_restart: typeof restart;
|
|
665
|
+
declare const index_d$2_start: typeof start;
|
|
666
|
+
declare const index_d$2_version: typeof version;
|
|
667
|
+
declare namespace index_d$2 {
|
|
330
668
|
export {
|
|
331
|
-
index_d$
|
|
332
|
-
index_d$
|
|
333
|
-
index_d$
|
|
334
|
-
index_d$
|
|
669
|
+
index_d$2_recapture as recapture,
|
|
670
|
+
index_d$2_restart as restart,
|
|
671
|
+
index_d$2_start as start,
|
|
672
|
+
index_d$2_version as version,
|
|
335
673
|
};
|
|
336
674
|
}
|
|
337
675
|
|
|
@@ -573,7 +911,10 @@ interface WebauthnCrossDeviceFlows {
|
|
|
573
911
|
* @throws {@link ErrorCode.RegistrationFailed}
|
|
574
912
|
* @throws {@link ErrorCode.RegistrationCanceled}
|
|
575
913
|
*/
|
|
576
|
-
register: (
|
|
914
|
+
register: (params: {
|
|
915
|
+
crossDeviceTicketId: string;
|
|
916
|
+
options?: WebauthnCrossDeviceRegistrationOptions;
|
|
917
|
+
}) => Promise<string>;
|
|
577
918
|
/**
|
|
578
919
|
* Indicates when a session is accepted on another device in cross-device flows.
|
|
579
920
|
*
|
|
@@ -685,14 +1026,17 @@ interface AutofillHandlers {
|
|
|
685
1026
|
* 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
1027
|
* 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
1028
|
* If it fails, the `onError` callback will be triggered with an SdkError.
|
|
1029
|
+
* @param params.handlers - Handlers that will be invoked once the authentication is completed (success or failure)
|
|
1030
|
+
* @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
1031
|
* @throws {@link ErrorCode.NotInitialized}
|
|
689
1032
|
* @throws {@link ErrorCode.AuthenticationFailed}
|
|
690
1033
|
* @throws {@link ErrorCode.AuthenticationCanceled}
|
|
691
1034
|
* @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
1035
|
*/
|
|
695
|
-
activate(
|
|
1036
|
+
activate(params: {
|
|
1037
|
+
handlers: AuthenticationAutofillActivateHandlers;
|
|
1038
|
+
username?: string;
|
|
1039
|
+
}): void;
|
|
696
1040
|
/**
|
|
697
1041
|
* 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
1042
|
*/
|
|
@@ -708,20 +1052,29 @@ interface WebauthnAuthenticationOptions {
|
|
|
708
1052
|
|
|
709
1053
|
interface WebauthnAuthenticationFlows {
|
|
710
1054
|
/**
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
1055
|
+
* 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/>
|
|
1056
|
+
* 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/>
|
|
1057
|
+
* 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/>
|
|
1058
|
+
*
|
|
1059
|
+
* @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
|
|
1060
|
+
* @param params.options - Options for the authentication process
|
|
1061
|
+
* @param params.identifier - Identifier value (email, phone number, user ID, or custom identifier). Mutually exclusive with username.
|
|
1062
|
+
* @param params.identifierType - Type of identifier (email, phone_number, user_id, username, or custom identifier type). Required when using identifier.
|
|
1063
|
+
* @throws {@link ErrorCode.NotInitialized}
|
|
1064
|
+
* @throws {@link ErrorCode.AuthenticationFailed}
|
|
1065
|
+
* @throws {@link ErrorCode.AuthenticationCanceled}
|
|
1066
|
+
* @throws {@link ErrorCode.InvalidApprovalData}
|
|
1067
|
+
* @throws {@link ErrorCode.AuthenticationProcessAlreadyActive}
|
|
1068
|
+
* @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).
|
|
1069
|
+
*/
|
|
1070
|
+
modal(params: {
|
|
1071
|
+
username?: string;
|
|
1072
|
+
options?: WebauthnAuthenticationOptions;
|
|
1073
|
+
} | {
|
|
1074
|
+
identifier?: string;
|
|
1075
|
+
identifierType?: string;
|
|
1076
|
+
options?: WebauthnAuthenticationOptions;
|
|
1077
|
+
}): Promise<string>;
|
|
725
1078
|
/**
|
|
726
1079
|
* Property used to implement credential selection via autofill UI.
|
|
727
1080
|
*/
|
|
@@ -733,8 +1086,8 @@ interface WebauthnApprovalFlows {
|
|
|
733
1086
|
* 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
1087
|
* 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
1088
|
* 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
|
|
1089
|
+
* @param params.username Name of user account, as used in the WebAuthn registration.
|
|
1090
|
+
* @param params.approvalData Data that represents the approval to be signed with a passkey
|
|
738
1091
|
* @throws {@link ErrorCode.NotInitialized}
|
|
739
1092
|
* @throws {@link ErrorCode.InvalidApprovalData}
|
|
740
1093
|
* @throws {@link ErrorCode.AuthenticationFailed}
|
|
@@ -742,7 +1095,10 @@ interface WebauthnApprovalFlows {
|
|
|
742
1095
|
* @throws {@link ErrorCode.AuthenticationProcessAlreadyActive}
|
|
743
1096
|
* @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
1097
|
*/
|
|
745
|
-
modal(
|
|
1098
|
+
modal(params: {
|
|
1099
|
+
username: string | undefined;
|
|
1100
|
+
approvalData: Record<string, string>;
|
|
1101
|
+
}): Promise<string>;
|
|
746
1102
|
}
|
|
747
1103
|
|
|
748
1104
|
declare module '@transmit-security/web-sdk-common/dist/module-metadata/module-metadata' {
|
|
@@ -761,13 +1117,16 @@ declare const approve: WebauthnApprovalFlows;
|
|
|
761
1117
|
*
|
|
762
1118
|
* If registration fails, an SdkError will be thrown.
|
|
763
1119
|
*
|
|
764
|
-
* @param username WebAuthn username to register
|
|
765
|
-
* @param options Additional configuration for registration flow
|
|
1120
|
+
* @param params.username - WebAuthn username to register
|
|
1121
|
+
* @param params.options - Additional configuration for registration flow
|
|
766
1122
|
* @throws {@link ErrorCode.NotInitialized}
|
|
767
1123
|
* @throws {@link ErrorCode.RegistrationFailed}
|
|
768
1124
|
* @throws {@link ErrorCode.RegistrationCanceled}
|
|
769
1125
|
*/
|
|
770
|
-
declare function register(
|
|
1126
|
+
declare function register(params: {
|
|
1127
|
+
username: string;
|
|
1128
|
+
options?: WebauthnRegistrationOptions;
|
|
1129
|
+
}): Promise<string>;
|
|
771
1130
|
/**
|
|
772
1131
|
* Returns webauthn cross device flows
|
|
773
1132
|
* @type WebauthnCrossDeviceFlows
|
|
@@ -786,56 +1145,56 @@ declare const isAutofillSupported: () => Promise<boolean>;
|
|
|
786
1145
|
*/
|
|
787
1146
|
declare const getDefaultPaths: () => WebauthnApis;
|
|
788
1147
|
|
|
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 {
|
|
1148
|
+
type index_d$1_ApiCrossDeviceStatusResponse = ApiCrossDeviceStatusResponse;
|
|
1149
|
+
type index_d$1_AttachDeviceResult = AttachDeviceResult;
|
|
1150
|
+
type index_d$1_AuthenticationAutofillActivateHandlers = AuthenticationAutofillActivateHandlers;
|
|
1151
|
+
type index_d$1_AutofillHandlers = AutofillHandlers;
|
|
1152
|
+
type index_d$1_CrossDeviceAuthenticationHandlers = CrossDeviceAuthenticationHandlers;
|
|
1153
|
+
type index_d$1_CrossDeviceController = CrossDeviceController;
|
|
1154
|
+
type index_d$1_CrossDeviceRegistrationHandlers = CrossDeviceRegistrationHandlers;
|
|
1155
|
+
type index_d$1_SdkError = SdkError;
|
|
1156
|
+
type index_d$1_WebauthnApis = WebauthnApis;
|
|
1157
|
+
type index_d$1_WebauthnApprovalFlows = WebauthnApprovalFlows;
|
|
1158
|
+
type index_d$1_WebauthnAuthenticationFlows = WebauthnAuthenticationFlows;
|
|
1159
|
+
type index_d$1_WebauthnAuthenticationOptions = WebauthnAuthenticationOptions;
|
|
1160
|
+
type index_d$1_WebauthnCrossDeviceFlows = WebauthnCrossDeviceFlows;
|
|
1161
|
+
type index_d$1_WebauthnCrossDeviceRegistrationOptions = WebauthnCrossDeviceRegistrationOptions;
|
|
1162
|
+
type index_d$1_WebauthnCrossDeviceStatus = WebauthnCrossDeviceStatus;
|
|
1163
|
+
declare const index_d$1_WebauthnCrossDeviceStatus: typeof WebauthnCrossDeviceStatus;
|
|
1164
|
+
type index_d$1_WebauthnRegistrationOptions = WebauthnRegistrationOptions;
|
|
1165
|
+
declare const index_d$1_approve: typeof approve;
|
|
1166
|
+
declare const index_d$1_authenticate: typeof authenticate;
|
|
1167
|
+
declare const index_d$1_crossDevice: typeof crossDevice;
|
|
1168
|
+
declare const index_d$1_getDefaultPaths: typeof getDefaultPaths;
|
|
1169
|
+
declare const index_d$1_isAutofillSupported: typeof isAutofillSupported;
|
|
1170
|
+
declare const index_d$1_isPlatformAuthenticatorSupported: typeof isPlatformAuthenticatorSupported;
|
|
1171
|
+
declare const index_d$1_register: typeof register;
|
|
1172
|
+
declare namespace index_d$1 {
|
|
814
1173
|
export {
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
1174
|
+
index_d$1_ApiCrossDeviceStatusResponse as ApiCrossDeviceStatusResponse,
|
|
1175
|
+
index_d$1_AttachDeviceResult as AttachDeviceResult,
|
|
1176
|
+
index_d$1_AuthenticationAutofillActivateHandlers as AuthenticationAutofillActivateHandlers,
|
|
1177
|
+
index_d$1_AutofillHandlers as AutofillHandlers,
|
|
1178
|
+
index_d$1_CrossDeviceAuthenticationHandlers as CrossDeviceAuthenticationHandlers,
|
|
1179
|
+
index_d$1_CrossDeviceController as CrossDeviceController,
|
|
1180
|
+
index_d$1_CrossDeviceRegistrationHandlers as CrossDeviceRegistrationHandlers,
|
|
822
1181
|
ErrorCode$1 as ErrorCode,
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
1182
|
+
index_d$1_SdkError as SdkError,
|
|
1183
|
+
index_d$1_WebauthnApis as WebauthnApis,
|
|
1184
|
+
index_d$1_WebauthnApprovalFlows as WebauthnApprovalFlows,
|
|
1185
|
+
index_d$1_WebauthnAuthenticationFlows as WebauthnAuthenticationFlows,
|
|
1186
|
+
index_d$1_WebauthnAuthenticationOptions as WebauthnAuthenticationOptions,
|
|
1187
|
+
index_d$1_WebauthnCrossDeviceFlows as WebauthnCrossDeviceFlows,
|
|
1188
|
+
index_d$1_WebauthnCrossDeviceRegistrationOptions as WebauthnCrossDeviceRegistrationOptions,
|
|
1189
|
+
index_d$1_WebauthnCrossDeviceStatus as WebauthnCrossDeviceStatus,
|
|
1190
|
+
index_d$1_WebauthnRegistrationOptions as WebauthnRegistrationOptions,
|
|
1191
|
+
index_d$1_approve as approve,
|
|
1192
|
+
index_d$1_authenticate as authenticate,
|
|
1193
|
+
index_d$1_crossDevice as crossDevice,
|
|
1194
|
+
index_d$1_getDefaultPaths as getDefaultPaths,
|
|
1195
|
+
index_d$1_isAutofillSupported as isAutofillSupported,
|
|
1196
|
+
index_d$1_isPlatformAuthenticatorSupported as isPlatformAuthenticatorSupported,
|
|
1197
|
+
index_d$1_register as register,
|
|
839
1198
|
};
|
|
840
1199
|
}
|
|
841
1200
|
|
|
@@ -868,6 +1227,12 @@ interface IdoInitOptions {
|
|
|
868
1227
|
* The expected locale format is the standard language tags as defined by the localization RFC 5646 (https://datatracker.ietf.org/doc/html/rfc5646).
|
|
869
1228
|
*/
|
|
870
1229
|
locale?: string;
|
|
1230
|
+
/**
|
|
1231
|
+
* When true, the SDK will collect queued device events and send them back to the server.
|
|
1232
|
+
* This flag is mandatory for collecting data for the Risk Level Analysis step.
|
|
1233
|
+
* @default false
|
|
1234
|
+
*/
|
|
1235
|
+
collectRiskData?: boolean;
|
|
871
1236
|
}
|
|
872
1237
|
/**
|
|
873
1238
|
* @interface
|
|
@@ -1786,13 +2151,57 @@ declare module "@transmit-security/web-sdk-common/dist/module-metadata/module-me
|
|
|
1786
2151
|
ido?: IdoInitOptions;
|
|
1787
2152
|
}
|
|
1788
2153
|
}
|
|
1789
|
-
declare const instance: IdoSdk;
|
|
1790
2154
|
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
2155
|
+
declare const startJourney: IdoSdk['startJourney'];
|
|
2156
|
+
declare const startSsoJourney: IdoSdk['startSsoJourney'];
|
|
2157
|
+
declare const submitClientResponse: IdoSdk['submitClientResponse'];
|
|
2158
|
+
declare const serializeState: IdoSdk['serializeState'];
|
|
2159
|
+
declare const restoreFromSerializedState: IdoSdk['restoreFromSerializedState'];
|
|
2160
|
+
declare const generateDebugPin: IdoSdk['generateDebugPin'];
|
|
1794
2161
|
|
|
1795
|
-
|
|
2162
|
+
type index_d_ClientResponseOption = ClientResponseOption;
|
|
2163
|
+
type index_d_ClientResponseOptionType = ClientResponseOptionType;
|
|
2164
|
+
declare const index_d_ClientResponseOptionType: typeof ClientResponseOptionType;
|
|
2165
|
+
type index_d_IdoInitOptions = IdoInitOptions;
|
|
2166
|
+
type index_d_IdoJourneyActionType = IdoJourneyActionType;
|
|
2167
|
+
declare const index_d_IdoJourneyActionType: typeof IdoJourneyActionType;
|
|
2168
|
+
type index_d_IdoSdk = IdoSdk;
|
|
2169
|
+
type index_d_IdoSdkError = IdoSdkError;
|
|
2170
|
+
type index_d_IdoServiceResponse = IdoServiceResponse;
|
|
2171
|
+
type index_d_IdoServiceResponseType = IdoServiceResponseType;
|
|
2172
|
+
declare const index_d_IdoServiceResponseType: typeof IdoServiceResponseType;
|
|
2173
|
+
type index_d_LogLevel = LogLevel;
|
|
2174
|
+
declare const index_d_LogLevel: typeof LogLevel;
|
|
2175
|
+
type index_d_StartJourneyOptions = StartJourneyOptions;
|
|
2176
|
+
type index_d_StartSsoJourneyOptions = StartSsoJourneyOptions;
|
|
2177
|
+
declare const index_d_generateDebugPin: typeof generateDebugPin;
|
|
2178
|
+
declare const index_d_restoreFromSerializedState: typeof restoreFromSerializedState;
|
|
2179
|
+
declare const index_d_serializeState: typeof serializeState;
|
|
2180
|
+
declare const index_d_startJourney: typeof startJourney;
|
|
2181
|
+
declare const index_d_startSsoJourney: typeof startSsoJourney;
|
|
2182
|
+
declare const index_d_submitClientResponse: typeof submitClientResponse;
|
|
2183
|
+
declare namespace index_d {
|
|
2184
|
+
export {
|
|
2185
|
+
index_d_ClientResponseOption as ClientResponseOption,
|
|
2186
|
+
index_d_ClientResponseOptionType as ClientResponseOptionType,
|
|
2187
|
+
ErrorCode as IdoErrorCode,
|
|
2188
|
+
index_d_IdoInitOptions as IdoInitOptions,
|
|
2189
|
+
index_d_IdoJourneyActionType as IdoJourneyActionType,
|
|
2190
|
+
index_d_IdoSdk as IdoSdk,
|
|
2191
|
+
index_d_IdoSdkError as IdoSdkError,
|
|
2192
|
+
index_d_IdoServiceResponse as IdoServiceResponse,
|
|
2193
|
+
index_d_IdoServiceResponseType as IdoServiceResponseType,
|
|
2194
|
+
index_d_LogLevel as LogLevel,
|
|
2195
|
+
index_d_StartJourneyOptions as StartJourneyOptions,
|
|
2196
|
+
index_d_StartSsoJourneyOptions as StartSsoJourneyOptions,
|
|
2197
|
+
index_d_generateDebugPin as generateDebugPin,
|
|
2198
|
+
index_d_restoreFromSerializedState as restoreFromSerializedState,
|
|
2199
|
+
index_d_serializeState as serializeState,
|
|
2200
|
+
index_d_startJourney as startJourney,
|
|
2201
|
+
index_d_startSsoJourney as startSsoJourney,
|
|
2202
|
+
index_d_submitClientResponse as submitClientResponse,
|
|
2203
|
+
};
|
|
2204
|
+
}
|
|
1796
2205
|
|
|
1797
2206
|
/**
|
|
1798
2207
|
* Main SDK class for CDN usage (window.tsPlatform)
|
|
@@ -1807,6 +2216,6 @@ declare class TSWebSDK {
|
|
|
1807
2216
|
}
|
|
1808
2217
|
declare const _default: TSWebSDK;
|
|
1809
2218
|
|
|
1810
|
-
declare const PACKAGE_VERSION = "
|
|
2219
|
+
declare const PACKAGE_VERSION = "2.0.0";
|
|
1811
2220
|
|
|
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,
|
|
2221
|
+
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 };
|