@transmitsecurity/platform-web-sdk 2.5.1 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/common.cjs +1 -1
- package/dist/common.js +1 -1
- package/dist/drs.cjs +1 -1
- package/dist/drs.d.ts +48 -1
- package/dist/drs.js +1 -1
- package/dist/ido.cjs +1 -1
- package/dist/ido.d.ts +3 -1
- package/dist/ido.js +1 -1
- package/dist/idv.cjs +1 -1
- package/dist/idv.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/ts-platform-websdk.js +1 -1
- package/dist/web-sdk-drs+idv+webauthn+ido.js +1 -1
- package/dist/web-sdk.d.ts +91 -9
- package/dist/webauthn.cjs +1 -1
- package/dist/webauthn.js +1 -1
- package/package.json +3 -1
package/dist/drs.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ type AvsMatchLevel = 'none' | 'postal' | 'street' | 'full' | 'unknown';
|
|
|
60
60
|
type ActionResult = "success" | "failure" | "incomplete";
|
|
61
61
|
/** Type of challenge presented to the user, when a challenge was recommended for the action */
|
|
62
62
|
type ChallengeType = "sms_otp" | "email_otp" | "totp" | "push_otp" | "voice_otp" | "idv" | "captcha" | "password" | "passkey";
|
|
63
|
+
type AuthMethodType = 'password' | 'webauthn' | 'totp' | 'email_otp' | 'sms_otp' | 'direct_otp' | 'voice_otp' | 'push_otp' | 'idv' | 'email_magic_link' | 'mobile_biometric' | 'face' | 'pin_authenticator' | 'google' | 'facebook' | 'apple' | 'line' | 'saml' | 'oidc';
|
|
63
64
|
interface ActionResultOptions {
|
|
64
65
|
/** Identifier containing sensitive user data. Mosaic will encrypt and securely store this data. */
|
|
65
66
|
privateUserIdentifier?: string;
|
|
@@ -98,6 +99,8 @@ interface ConstructorOptions {
|
|
|
98
99
|
hasOwnClientId?: boolean;
|
|
99
100
|
/** Tier mode for the SDK: 'standard' (default) or 'lightweight' (server-to-server) */
|
|
100
101
|
tier?: 'standard' | 'lightweight';
|
|
102
|
+
/** Agentic mode for CDN-injected integrations: enables agentic identity collection and artificial action triggering. Not supported with the lightweight tier. */
|
|
103
|
+
agenticCollect?: boolean;
|
|
101
104
|
/** @internal
|
|
102
105
|
* Optional configuration for crypto-binding key scoping.
|
|
103
106
|
* Use only when instructed by Transmit Security. */
|
|
@@ -175,6 +178,24 @@ interface TransactionData {
|
|
|
175
178
|
matchLevel?: AvsMatchLevel;
|
|
176
179
|
};
|
|
177
180
|
}
|
|
181
|
+
interface AuthContext {
|
|
182
|
+
/**
|
|
183
|
+
* Opaque identifier of the authenticated user in your system. Required — providing an auth
|
|
184
|
+
* context signals the user is already authenticated (e.g. they logged in through a flow
|
|
185
|
+
* outside this SDK before reaching this action).
|
|
186
|
+
*/
|
|
187
|
+
userId: string;
|
|
188
|
+
/** Unix timestamp (ms) of when the login happened. */
|
|
189
|
+
loginTimestamp?: number;
|
|
190
|
+
/** The challenge type used for the authentication action (e.g. sms_otp, password, passkey). */
|
|
191
|
+
challengeType?: ChallengeType;
|
|
192
|
+
/** The number of failed attempts for the authentication action. */
|
|
193
|
+
failedAttempts?: number;
|
|
194
|
+
/** The authentication method used for the authentication action (e.g. password, biometric, sso). */
|
|
195
|
+
authMethod?: AuthMethodType;
|
|
196
|
+
/** The origin url of the page the user logged in from. */
|
|
197
|
+
loginOrigin?: string;
|
|
198
|
+
}
|
|
178
199
|
interface ActionEventOptions {
|
|
179
200
|
/** Any ID that could help relate the action with external context or session */
|
|
180
201
|
correlationId?: string;
|
|
@@ -195,6 +216,16 @@ interface ActionEventOptions {
|
|
|
195
216
|
* Custom attributes matching the schema previously defined in the Admin Portal
|
|
196
217
|
*/
|
|
197
218
|
customAttributes?: Record<string, string | number | boolean>;
|
|
219
|
+
/** @internal Set only by AgenticManager, never by customer code. @ignore */
|
|
220
|
+
triggerSource?: 'page_load' | 'interaction_interval';
|
|
221
|
+
/** @internal Per-type tally of interactions counted toward this checkpoint. Set only by AgenticManager. @ignore */
|
|
222
|
+
agenticCountedInteractions?: Record<string, number>;
|
|
223
|
+
/**
|
|
224
|
+
* Authentication context for an already-authenticated user. Providing it signals the user is
|
|
225
|
+
* authenticated (userId is required) and registers them like {@link TSAccountProtection.setAuthenticatedUser}.
|
|
226
|
+
* Useful when the login happened outside this SDK (e.g. a different site).
|
|
227
|
+
*/
|
|
228
|
+
authContext?: AuthContext;
|
|
198
229
|
/**
|
|
199
230
|
* The fields below are supported for Enterprise-IAM sdk usage actions, added `ignore` for avoiding preseting this attribute in the docs
|
|
200
231
|
* @ignore
|
|
@@ -227,6 +258,7 @@ interface ActionEventOptions {
|
|
|
227
258
|
}
|
|
228
259
|
declare class TSAccountProtection {
|
|
229
260
|
private static initializedInstance;
|
|
261
|
+
private static initializedAgenticInstance;
|
|
230
262
|
private initializationPromise;
|
|
231
263
|
private disabledReason;
|
|
232
264
|
private enableSessionToken;
|
|
@@ -234,10 +266,16 @@ declare class TSAccountProtection {
|
|
|
234
266
|
private firstPartyMigrationUrl;
|
|
235
267
|
private hasOwnClientId;
|
|
236
268
|
private tier;
|
|
269
|
+
private agenticCollect;
|
|
270
|
+
private agenticActive;
|
|
271
|
+
private agenticManager;
|
|
272
|
+
private agenticInitStartedAt;
|
|
273
|
+
private lastCascadePath;
|
|
237
274
|
private validationManager;
|
|
238
275
|
private storageManager;
|
|
239
276
|
private eventsManager;
|
|
240
277
|
private deviceDataManager;
|
|
278
|
+
private agenticSignalsManager;
|
|
241
279
|
private configManager;
|
|
242
280
|
private requestsManager;
|
|
243
281
|
private identityManager;
|
|
@@ -255,6 +293,14 @@ declare class TSAccountProtection {
|
|
|
255
293
|
constructor(clientId: string, options: ConstructorOptions);
|
|
256
294
|
/** @ignore */
|
|
257
295
|
constructor(serverPath: string, clientId: string);
|
|
296
|
+
private standDownCalled;
|
|
297
|
+
private standDown;
|
|
298
|
+
private runDetectionCascade;
|
|
299
|
+
private standardInitListenerRegistered;
|
|
300
|
+
private trafficWatchStarted;
|
|
301
|
+
private startTrafficWatch;
|
|
302
|
+
private spaRouteHooksRegistered;
|
|
303
|
+
private registerSpaRouteHooks;
|
|
258
304
|
private generateDisabledToken;
|
|
259
305
|
/**
|
|
260
306
|
* @ignore
|
|
@@ -278,6 +324,7 @@ declare class TSAccountProtection {
|
|
|
278
324
|
* @param deviceId - The JWT deviceId returned from citadel backend
|
|
279
325
|
*/
|
|
280
326
|
setDeviceId(deviceId: string): void;
|
|
327
|
+
private resolveAgenticActive;
|
|
281
328
|
/**
|
|
282
329
|
* Initializes the AccountProtection SDK, which starts automatically tracking and submitting info of the user journey
|
|
283
330
|
* @param options Init options
|
|
@@ -384,4 +431,4 @@ declare const __internal: {
|
|
|
384
431
|
declare const PACKAGE_VERSION: string;
|
|
385
432
|
declare function initialize(config: any): void;
|
|
386
433
|
|
|
387
|
-
export { ActionEventOptions, ActionResponse, ActionResultOptions, LightweightPayload, PACKAGE_VERSION, __internal, clearUser, getActions, getPayload, getSecureSessionToken, getSessionToken, initialize, reportActionResult, setAuthenticatedUser, setDeviceId, triggerActionEvent };
|
|
434
|
+
export { ActionEventOptions, ActionResponse, ActionResultOptions, AuthContext, LightweightPayload, PACKAGE_VERSION, __internal, clearUser, getActions, getPayload, getSecureSessionToken, getSessionToken, initialize, reportActionResult, setAuthenticatedUser, setDeviceId, triggerActionEvent };
|