@transmitsecurity/platform-web-sdk 2.6.0 → 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 +14 -0
- package/dist/common.cjs +1 -1
- package/dist/common.js +1 -1
- package/dist/drs.cjs +1 -1
- package/dist/drs.d.ts +28 -1
- package/dist/drs.js +1 -1
- package/dist/ido.cjs +1 -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 +30 -1
- package/dist/webauthn.cjs +1 -1
- package/dist/webauthn.js +1 -1
- package/package.json +1 -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;
|
|
@@ -177,6 +178,24 @@ interface TransactionData {
|
|
|
177
178
|
matchLevel?: AvsMatchLevel;
|
|
178
179
|
};
|
|
179
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
|
+
}
|
|
180
199
|
interface ActionEventOptions {
|
|
181
200
|
/** Any ID that could help relate the action with external context or session */
|
|
182
201
|
correlationId?: string;
|
|
@@ -201,6 +220,12 @@ interface ActionEventOptions {
|
|
|
201
220
|
triggerSource?: 'page_load' | 'interaction_interval';
|
|
202
221
|
/** @internal Per-type tally of interactions counted toward this checkpoint. Set only by AgenticManager. @ignore */
|
|
203
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;
|
|
204
229
|
/**
|
|
205
230
|
* The fields below are supported for Enterprise-IAM sdk usage actions, added `ignore` for avoiding preseting this attribute in the docs
|
|
206
231
|
* @ignore
|
|
@@ -232,6 +257,8 @@ interface ActionEventOptions {
|
|
|
232
257
|
uploadFile?: Record<string, boolean | string | number>;
|
|
233
258
|
}
|
|
234
259
|
declare class TSAccountProtection {
|
|
260
|
+
private static initializedInstance;
|
|
261
|
+
private static initializedAgenticInstance;
|
|
235
262
|
private initializationPromise;
|
|
236
263
|
private disabledReason;
|
|
237
264
|
private enableSessionToken;
|
|
@@ -404,4 +431,4 @@ declare const __internal: {
|
|
|
404
431
|
declare const PACKAGE_VERSION: string;
|
|
405
432
|
declare function initialize(config: any): void;
|
|
406
433
|
|
|
407
|
-
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 };
|