@corbado/observe 0.15.1 → 0.15.2
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/dist/cdn/script.global.js +1 -1
- package/dist/index.d.mts +248 -8
- package/dist/index.d.ts +248 -8
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,10 @@ interface SdkInfo {
|
|
|
3
3
|
version: string;
|
|
4
4
|
}
|
|
5
5
|
type EventType = "predefined" | "custom" | "error" | "identify";
|
|
6
|
-
type AuthMethodType = "identifier-email"
|
|
7
|
-
|
|
6
|
+
type AuthMethodType = "identifier-email"
|
|
7
|
+
/** Neutral "enter an identifier" choice; the identifier kind is the provide-identifier spec type. */
|
|
8
|
+
| "identifier" | "passkey-login-known-identifier" | "passkey-login-no-identifier" | "passkey-login-cui" | "passkey-login-immediate" | "passkey-enrollment" | "password-login" | "password-login-known-identifier" | "password-login-with-identifier" | "password-enrollment" | "email-otp" | "email-otp-login" | "email-otp-enrollment" | "email-link" | "email-link-login" | "email-link-enrollment" | "sms-otp" | "sms-otp-login" | "sms-otp-enrollment" | "social-google" | "social-apple" | "social-facebook" | "social-other" | "reset-flow" | "provide-data";
|
|
9
|
+
type SubflowType = "trusted-device-check" | "trusted-device-enrollment" | "passkey-enrollment" | "passkey-login" | "email-otp" | "email-link" | "social-login" | "sms-otp" | "provide-identifier" | "provide-data" | "password-login" | "password-enrollment" | "totp" | "app-confirmation" | "captcha";
|
|
8
10
|
type FlowType = "login" | "signup" | "recovery" | "enrollment" | (string & {});
|
|
9
11
|
type SocialLoginProviderType = "google" | "apple" | "facebook" | "github" | "microsoft" | "other";
|
|
10
12
|
declare enum AuthEventName {
|
|
@@ -517,6 +519,98 @@ interface LowEventSink {
|
|
|
517
519
|
};
|
|
518
520
|
}
|
|
519
521
|
|
|
522
|
+
/**
|
|
523
|
+
* Limits for optional raw-error serialization. Modeled on Sentry's client options
|
|
524
|
+
* (`normalizeDepth`, `normalizeMaxBreadth`, `maxValueLength`, `normalizeToSize`, the
|
|
525
|
+
* stack-frame limit and the linked-errors limit) with defaults tuned for an authentication
|
|
526
|
+
* event stream rather than an error monitor. Every value is clamped to {@link RAW_ERROR_BOUNDS};
|
|
527
|
+
* invalid values fall back to the default.
|
|
528
|
+
*/
|
|
529
|
+
type SerializeRawErrorOptions = {
|
|
530
|
+
/** Include `stack` strings. Default false. */
|
|
531
|
+
stack?: boolean;
|
|
532
|
+
/** Stack lines kept after the header line when `stack` is on. Default 50 (Sentry: 50). */
|
|
533
|
+
maxStackFrames?: number;
|
|
534
|
+
/** Object nesting depth below the envelope. Default 3 (Sentry `normalizeDepth`: 3). */
|
|
535
|
+
depth?: number;
|
|
536
|
+
/** Keys per object and items per array, Map or Set. Default 30 (Sentry `normalizeMaxBreadth`: 1000). */
|
|
537
|
+
maxBreadth?: number;
|
|
538
|
+
/** Characters kept per string. Default 1024 (Sentry `maxValueLength`: 250). */
|
|
539
|
+
maxValueLength?: number;
|
|
540
|
+
/** `cause` hops followed. Default 3 (Sentry linked errors: 5, Datadog: 10). */
|
|
541
|
+
maxCauseDepth?: number;
|
|
542
|
+
/** Maximum UTF-8 JSON size in bytes. Depth is reduced until the output fits; omit diagnostics that cannot fit. Default 32768 (Sentry `normalizeToSize`: 100 KiB). */
|
|
543
|
+
maxBytes?: number;
|
|
544
|
+
};
|
|
545
|
+
/** Envelope produced by {@link serializeRawError}. */
|
|
546
|
+
type RawErrorEnvelope = {
|
|
547
|
+
/** Class tag of the original value: `DOMException`, `Error`, `Object`, `Response`, `number`, `null`, `unserializable`, … */
|
|
548
|
+
type: string;
|
|
549
|
+
/** Bounded plain-JSON copy of the value; absent when it could not be serialized within the limits. */
|
|
550
|
+
value?: unknown;
|
|
551
|
+
/** Set when even the shallowest serialization exceeded `maxBytes`. */
|
|
552
|
+
truncated?: true;
|
|
553
|
+
};
|
|
554
|
+
type Limits = Required<Omit<SerializeRawErrorOptions, "stack">> & {
|
|
555
|
+
stack: boolean;
|
|
556
|
+
};
|
|
557
|
+
/** Inclusive bounds for every numeric limit; defaults sit inside them. */
|
|
558
|
+
declare const RAW_ERROR_BOUNDS: {
|
|
559
|
+
readonly maxStackFrames: {
|
|
560
|
+
readonly min: 1;
|
|
561
|
+
readonly max: 100;
|
|
562
|
+
readonly default: 50;
|
|
563
|
+
};
|
|
564
|
+
readonly depth: {
|
|
565
|
+
readonly min: 0;
|
|
566
|
+
readonly max: 10;
|
|
567
|
+
readonly default: 3;
|
|
568
|
+
};
|
|
569
|
+
readonly maxBreadth: {
|
|
570
|
+
readonly min: 1;
|
|
571
|
+
readonly max: 1000;
|
|
572
|
+
readonly default: 30;
|
|
573
|
+
};
|
|
574
|
+
readonly maxValueLength: {
|
|
575
|
+
readonly min: 1;
|
|
576
|
+
readonly max: 10000;
|
|
577
|
+
readonly default: 1024;
|
|
578
|
+
};
|
|
579
|
+
readonly maxCauseDepth: {
|
|
580
|
+
readonly min: 0;
|
|
581
|
+
readonly max: 10;
|
|
582
|
+
readonly default: 3;
|
|
583
|
+
};
|
|
584
|
+
readonly maxBytes: {
|
|
585
|
+
readonly min: 0;
|
|
586
|
+
readonly max: 65536;
|
|
587
|
+
readonly default: 32768;
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
/** Resolve caller options into clamped limits. Exported for tests and integrations that want to inspect the effective values. */
|
|
591
|
+
declare function resolveRawErrorLimits(options?: SerializeRawErrorOptions): Limits;
|
|
592
|
+
/**
|
|
593
|
+
* Serialize an arbitrary thrown value for the `rawError` diagnostic field.
|
|
594
|
+
*
|
|
595
|
+
* Copies standard error fields and serializable own properties within the configured limits.
|
|
596
|
+
* Standard fields are read through the prototype chain so DOMException and cross-realm errors
|
|
597
|
+
* serialize. Output is plain JSON, bounded in depth, breadth, string length, cause chain and
|
|
598
|
+
* UTF-8 size, and never throws.
|
|
599
|
+
*
|
|
600
|
+
* The result is an envelope `{ type, value }`: `type` is the value's class tag (`DOMException`,
|
|
601
|
+
* `Error`, `Object`, `number`, …) and `value` is a bounded diagnostic copy. Keeping the class tag
|
|
602
|
+
* outside value preserves the library's own `type` field. When the value cannot be serialized
|
|
603
|
+
* within the limits the envelope carries `truncated: true` or the type `unserializable` and no
|
|
604
|
+
* `value`.
|
|
605
|
+
*
|
|
606
|
+
* Stacks are omitted unless `stack: true`; they carry page URLs and add the most bytes.
|
|
607
|
+
* Binary data (ArrayBuffer, typed arrays) is reported by type and length only, never by content.
|
|
608
|
+
*
|
|
609
|
+
* @param value - Original thrown value or an explicit diagnostic projection.
|
|
610
|
+
* @param options - Limits; see {@link SerializeRawErrorOptions} for defaults and {@link RAW_ERROR_BOUNDS} for clamping.
|
|
611
|
+
*/
|
|
612
|
+
declare function serializeRawError(value: unknown, options?: SerializeRawErrorOptions): RawErrorEnvelope | undefined;
|
|
613
|
+
|
|
520
614
|
/** Ceremony context lease on the shared observer. Never installs its own window listeners. */
|
|
521
615
|
declare class LowEventWindowTracker {
|
|
522
616
|
private logger;
|
|
@@ -535,12 +629,56 @@ declare class LowEventWindowTracker {
|
|
|
535
629
|
* picker dismiss animations land shortly after the WebAuthn promise resolves/rejects.
|
|
536
630
|
*/
|
|
537
631
|
declare const CEREMONY_LOW_EVENT_TAIL_MS = 1500;
|
|
632
|
+
/**
|
|
633
|
+
* Optional diagnostic context for both normal and typed step errors.
|
|
634
|
+
*
|
|
635
|
+
* Use `rawError` when a library error contains useful context beyond its classified name,
|
|
636
|
+
* code and message, such as a nested cause, an error array or a response status.
|
|
637
|
+
* It is emitted as a bounded `{ type, value }` envelope in `stepData.rawError` for raw-event
|
|
638
|
+
* inspection. The envelope type describes the JavaScript value; the library's own fields
|
|
639
|
+
* stay inside value. See {@link serializeRawError} for serialization limits.
|
|
640
|
+
*
|
|
641
|
+
* @remarks
|
|
642
|
+
* The first argument to `.error()` or `.errorTyped()` supplies the classified diagnostic.
|
|
643
|
+
* `rawError` does not fill missing classified fields or affect outcomes, error-group assignment
|
|
644
|
+
* or severity: a code-only typed error remains code-only even if its raw diagnostic has a name
|
|
645
|
+
* and message. Existing StepOptions such as userReference and explicitTimestamp can accompany
|
|
646
|
+
* rawError; calls without it behave as before.
|
|
647
|
+
*
|
|
648
|
+
* Supply a deliberate diagnostic object without credentials, cookies or personal data.
|
|
649
|
+
* Arrays retain their structure in rawError; arrays passed directly to `.error()` become a
|
|
650
|
+
* string message. Keep the original error for application handling; serialization makes a copy.
|
|
651
|
+
*
|
|
652
|
+
* @example
|
|
653
|
+
* ```ts
|
|
654
|
+
* // Normal error with additional provider context.
|
|
655
|
+
* passkey.ceremony.error(originalError, { rawError: providerDiagnostic });
|
|
656
|
+
*
|
|
657
|
+
* // Typed error with the original error available for inspection.
|
|
658
|
+
* password.postResponse.errorTyped(
|
|
659
|
+
* { code: "invalid_password" },
|
|
660
|
+
* { rawError: originalError },
|
|
661
|
+
* );
|
|
662
|
+
*
|
|
663
|
+
* // A classified code and message plus additional raw context.
|
|
664
|
+
* password.postResponse.error(
|
|
665
|
+
* { code: "invalid_password", name: "AuthenticationError", message: "The password was rejected" },
|
|
666
|
+
* { rawError: providerDiagnostic },
|
|
667
|
+
* );
|
|
668
|
+
* ```
|
|
669
|
+
*/
|
|
670
|
+
type ErrorStepOptions = StepOptions & {
|
|
671
|
+
/** Explicit opt-in. Serialized with bounded depth and UTF-8 size; stacks are omitted by default and binary contents are summarized. */
|
|
672
|
+
rawError?: unknown;
|
|
673
|
+
/** Per-call limits for `rawError` serialization (depth, breadth, string length, cause chain, bytes, stack). See {@link SerializeRawErrorOptions}. */
|
|
674
|
+
rawErrorLimits?: SerializeRawErrorOptions;
|
|
675
|
+
};
|
|
538
676
|
type StepHelper<TStart = {}, TFinished = {}, TTypedError = never> = {
|
|
539
677
|
start: (data: TStart, options?: StepOptions) => void;
|
|
540
678
|
finished: (data: TFinished, options?: StepOptions) => void;
|
|
541
|
-
error: (error: unknown, options?:
|
|
679
|
+
error: (error: unknown, options?: ErrorStepOptions) => void;
|
|
542
680
|
} & ([TTypedError] extends [never] ? {} : {
|
|
543
|
-
errorTyped: (error: TTypedError, options?:
|
|
681
|
+
errorTyped: (error: TTypedError, options?: ErrorStepOptions) => void;
|
|
544
682
|
});
|
|
545
683
|
declare abstract class OperationFull {
|
|
546
684
|
private tracker;
|
|
@@ -577,7 +715,7 @@ declare abstract class OperationFull {
|
|
|
577
715
|
customStep<TStart = {}, TFinished = {}>(stepName: string): StepHelper<TStart, TFinished>;
|
|
578
716
|
protected subflowStepStarted(stepName: string, data: any, options?: StepOptions, ignoreAsInteraction?: boolean): void;
|
|
579
717
|
protected subflowStepFinished(stepName: string, data: any, options?: StepOptions): void;
|
|
580
|
-
protected subflowStepError(stepName: string, data: any, options?:
|
|
718
|
+
protected subflowStepError(stepName: string, data: any, options?: ErrorStepOptions): void;
|
|
581
719
|
/**
|
|
582
720
|
* Decorate a (ceremony) step so window low-event collection follows its lifecycle: `start` arms
|
|
583
721
|
* the tracker, `finished`/`error`/`errorTyped` schedule disarming after
|
|
@@ -769,7 +907,7 @@ declare class PasskeyEnrollmentOperationFull extends OperationFull {
|
|
|
769
907
|
type PasswordLoginTypedError = {
|
|
770
908
|
code: PasswordLoginTypedErrorCode;
|
|
771
909
|
};
|
|
772
|
-
type PasswordLoginTypedErrorCode = "invalid_password" | "user_not_found" | "account_locked";
|
|
910
|
+
type PasswordLoginTypedErrorCode = "invalid_identifier_or_password" | "invalid_password" | "user_not_found" | "account_locked";
|
|
773
911
|
/**
|
|
774
912
|
* Conditional-UI (CUI) passkey login hosted on the password-login subflow. Mirrors the CUI step
|
|
775
913
|
* family of `OperationFullProvideIdentifierWithCUI`, but the steps are emitted under
|
|
@@ -848,7 +986,7 @@ type PasskeyLoginCUITypedError = {
|
|
|
848
986
|
code: PasskeyLoginCUITypedErrorCode;
|
|
849
987
|
};
|
|
850
988
|
type PasskeyLoginCUITypedErrorCode = "cancel_detected";
|
|
851
|
-
type ProvideIdentifierSpecType = "email" | "phone";
|
|
989
|
+
type ProvideIdentifierSpecType = "email" | "phone" | "username";
|
|
852
990
|
type ProvideIdentifierPostResponseStart = {
|
|
853
991
|
explicitSpecType?: ProvideIdentifierSpecType;
|
|
854
992
|
};
|
|
@@ -947,6 +1085,60 @@ declare class CaptchaOperationFull extends OperationFull {
|
|
|
947
1085
|
constructor(tracker: CorbadoTracker, config?: CaptchaOperationConfig);
|
|
948
1086
|
}
|
|
949
1087
|
|
|
1088
|
+
type TrustedDevicePurpose = "additional-verification" | "mfa-exemption";
|
|
1089
|
+
type TrustedDeviceStorage = "cookie" | "indexeddb" | "localstore" | "sessionstore";
|
|
1090
|
+
/** Metadata about the accepted binding. Never report cookie values, proofs or key material. */
|
|
1091
|
+
type TrustedDeviceBindingMetadata = {
|
|
1092
|
+
storage?: TrustedDeviceStorage;
|
|
1093
|
+
/** Stable pseudonymous reference to the binding, max 255 characters. */
|
|
1094
|
+
bindingReference?: string;
|
|
1095
|
+
/** Optional name for the trust mechanism, max 128 characters. */
|
|
1096
|
+
trustName?: string;
|
|
1097
|
+
};
|
|
1098
|
+
/**
|
|
1099
|
+
* Identity of the operation. Only `explicitSpecType` is sent on subflow_started, as for every other
|
|
1100
|
+
* subflow; `purpose`, `storage` and `trustName` are repeated by the helper on every step start
|
|
1101
|
+
* and on finished results, so they survive early completion, errors or abandonment.
|
|
1102
|
+
*/
|
|
1103
|
+
type TrustedDeviceOperationConfig = {
|
|
1104
|
+
explicitSpecType: "token" | "key";
|
|
1105
|
+
purpose: TrustedDevicePurpose;
|
|
1106
|
+
storage: TrustedDeviceStorage;
|
|
1107
|
+
trustName?: string;
|
|
1108
|
+
};
|
|
1109
|
+
type TrustedDeviceCheckConfig = TrustedDeviceOperationConfig;
|
|
1110
|
+
type TrustedDeviceNegativeResult = "not-trusted" | "no-eligible-local-key" | "server-key-no-local-match";
|
|
1111
|
+
type TrustedDeviceCheckResult = TrustedDeviceBindingMetadata & {
|
|
1112
|
+
result: "trusted" | TrustedDeviceNegativeResult;
|
|
1113
|
+
};
|
|
1114
|
+
/** Expected negative results can settle discovery without a server verification step. */
|
|
1115
|
+
type TrustedDeviceCheckStepResult = {
|
|
1116
|
+
result?: TrustedDeviceNegativeResult;
|
|
1117
|
+
};
|
|
1118
|
+
/** Keeps the original diagnostic while reporting a typed negative check code. */
|
|
1119
|
+
type TrustedDeviceCheckTypedError = {
|
|
1120
|
+
code: "not_trusted" | "no_eligible_local_key" | "server_key_no_local_match";
|
|
1121
|
+
error?: unknown;
|
|
1122
|
+
};
|
|
1123
|
+
type TrustedDeviceEnrollmentResult = TrustedDeviceBindingMetadata & {
|
|
1124
|
+
result: "created" | "renewed" | "unchanged" | "skipped";
|
|
1125
|
+
};
|
|
1126
|
+
/** Records a host trust verdict. Discovery or signing alone is not a successful check. */
|
|
1127
|
+
declare class TrustedDeviceCheckOperationFull extends OperationFull {
|
|
1128
|
+
readonly getOptions: StepHelper<{}, TrustedDeviceCheckStepResult, TrustedDeviceCheckTypedError>;
|
|
1129
|
+
readonly ceremony: StepHelper<{}, TrustedDeviceCheckStepResult, TrustedDeviceCheckTypedError>;
|
|
1130
|
+
readonly postResponse: StepHelper<{}, TrustedDeviceCheckResult, TrustedDeviceCheckTypedError>;
|
|
1131
|
+
constructor(tracker: CorbadoTracker, config: TrustedDeviceCheckConfig);
|
|
1132
|
+
private checkStep;
|
|
1133
|
+
}
|
|
1134
|
+
/** Finish registration/renewal after host acceptance. Explicit user opt-out reports skipped without creating a binding. */
|
|
1135
|
+
declare class TrustedDeviceEnrollmentOperationFull extends OperationFull {
|
|
1136
|
+
readonly getOptions: StepHelper<{}, {}>;
|
|
1137
|
+
readonly ceremony: StepHelper<{}, {}>;
|
|
1138
|
+
readonly postResponse: StepHelper<{}, TrustedDeviceEnrollmentResult>;
|
|
1139
|
+
constructor(tracker: CorbadoTracker, config: TrustedDeviceOperationConfig);
|
|
1140
|
+
}
|
|
1141
|
+
|
|
950
1142
|
type ProvideDataOperationSpecType = "signup" | "login" | "recovery" | "enrollment";
|
|
951
1143
|
type ProvideDataOperationStart = {
|
|
952
1144
|
/** Stable name of the data field collected by this subflow, when known. */
|
|
@@ -1051,6 +1243,7 @@ declare class CorbadoTracker {
|
|
|
1051
1243
|
private handleConfig;
|
|
1052
1244
|
/**
|
|
1053
1245
|
* Returns the logger used by this tracker.
|
|
1246
|
+
* @internal
|
|
1054
1247
|
*/
|
|
1055
1248
|
getLogger(): Logger;
|
|
1056
1249
|
private applicationTag;
|
|
@@ -1158,13 +1351,19 @@ declare class CorbadoTracker {
|
|
|
1158
1351
|
* sessionStorage-backed and stable for the whole page lifetime.
|
|
1159
1352
|
*/
|
|
1160
1353
|
private resolveEventTabId;
|
|
1354
|
+
/** @internal */
|
|
1161
1355
|
trackSubflowStarted(subflowType: SubflowType, data: Record<string, any>, options?: StepOptions, eventId?: string): void;
|
|
1356
|
+
/** @internal */
|
|
1162
1357
|
trackSubflowTrigger(subflowType: SubflowType, data: Record<string, any>, options?: StepOptions): void;
|
|
1358
|
+
/** @internal */
|
|
1163
1359
|
trackSubflowStepStarted(subflowType: SubflowType, stepName: string, data: Record<string, any>, options?: StepOptions, ignoreAsInteraction?: boolean): void;
|
|
1360
|
+
/** @internal */
|
|
1164
1361
|
trackSubflowStepFinished(subflowType: SubflowType, stepName: string, data: Record<string, any>, options?: StepOptions): void;
|
|
1362
|
+
/** @internal */
|
|
1165
1363
|
trackSubflowStepError(subflowType: SubflowType, stepName: string, data: Record<string, any>, options?: StepOptions): void;
|
|
1166
1364
|
/**
|
|
1167
1365
|
* @remarks
|
|
1366
|
+
* @internal
|
|
1168
1367
|
* Records an additional error occurrence against the subflow. Carries no outcome semantics —
|
|
1169
1368
|
* step errors are the intended channel; not part of a normal integration.
|
|
1170
1369
|
*/
|
|
@@ -1431,6 +1630,47 @@ declare class CorbadoTracker {
|
|
|
1431
1630
|
socialLoginOperationFull(config?: SocialLoginOperationConfig): SocialLoginOperationFull;
|
|
1432
1631
|
appConfirmationOperationFull(config?: AppConfirmationOperationConfig): AppConfirmationOperationFull;
|
|
1433
1632
|
captchaOperationFull(config?: CaptchaOperationConfig): CaptchaOperationFull;
|
|
1633
|
+
/**
|
|
1634
|
+
* Track a device-trust check through getOptions, ceremony and postResponse.
|
|
1635
|
+
*
|
|
1636
|
+
* @param config - Mechanism, purpose, storage and optional trust name.
|
|
1637
|
+
* @remarks
|
|
1638
|
+
* Only `trusted` completes the check. Negative results (`not-trusted`, `no-eligible-local-key`,
|
|
1639
|
+
* `server-key-no-local-match`) remain incomplete and may settle an early step. Key-specific
|
|
1640
|
+
* results require a key mechanism; the server-specific result requires explicit evidence.
|
|
1641
|
+
* Use `errorTyped({ code, error })` to retain an original diagnostic with a negative result,
|
|
1642
|
+
* or `error(error)` for an unexpected failure. An accepted result may include a stable
|
|
1643
|
+
* pseudonymous `bindingReference`; never send cookie values, proofs or key material.
|
|
1644
|
+
* @example
|
|
1645
|
+
* ```ts
|
|
1646
|
+
* const check = tracker.trustedDeviceCheckOperationFull({
|
|
1647
|
+
* explicitSpecType: "key", storage: "indexeddb", purpose: "additional-verification",
|
|
1648
|
+
* });
|
|
1649
|
+
* check.ceremony.start({});
|
|
1650
|
+
* // On a recognized local-key failure:
|
|
1651
|
+
* check.ceremony.errorTyped({ code: "no_eligible_local_key", error: originalError });
|
|
1652
|
+
* ```
|
|
1653
|
+
*/
|
|
1654
|
+
trustedDeviceCheckOperationFull(config: TrustedDeviceCheckConfig): TrustedDeviceCheckOperationFull;
|
|
1655
|
+
/**
|
|
1656
|
+
* Track device-trust enrollment through getOptions, ceremony and postResponse.
|
|
1657
|
+
*
|
|
1658
|
+
* @param config - Mechanism, purpose, storage and optional trust name.
|
|
1659
|
+
* @remarks
|
|
1660
|
+
* Report `created`, `renewed` or `unchanged` after host acceptance. Explicit opt-out is `skipped`;
|
|
1661
|
+
* an unanswered operation remains incomplete. User identity uses the existing `setUser` API.
|
|
1662
|
+
* Missing or unsupported purpose/storage logs a warning and is omitted; the operation remains usable.
|
|
1663
|
+
* @example
|
|
1664
|
+
* ```ts
|
|
1665
|
+
* const enrollment = tracker.trustedDeviceEnrollmentOperationFull({
|
|
1666
|
+
* explicitSpecType: "token", storage: "cookie", purpose: "mfa-exemption",
|
|
1667
|
+
* });
|
|
1668
|
+
* enrollment.postResponse.start({});
|
|
1669
|
+
* // After the host grants browser trust:
|
|
1670
|
+
* enrollment.postResponse.finished({ result: "created", bindingReference });
|
|
1671
|
+
* ```
|
|
1672
|
+
*/
|
|
1673
|
+
trustedDeviceEnrollmentOperationFull(config: TrustedDeviceOperationConfig): TrustedDeviceEnrollmentOperationFull;
|
|
1434
1674
|
/**
|
|
1435
1675
|
* Flush any pending events and release all resources (timers, event listeners).
|
|
1436
1676
|
*
|
|
@@ -1993,4 +2233,4 @@ declare function logInfo(message: string): void;
|
|
|
1993
2233
|
declare function logError(message: string): void;
|
|
1994
2234
|
declare function destroy(): Promise<void>;
|
|
1995
2235
|
|
|
1996
|
-
export { type AppConfirmationOperationCeremonyTypedError, type AppConfirmationOperationConfig, AppConfirmationOperationFull, type AppConfirmationOperationRetryReason, type AppConfirmationOperationSpecType, type AppConfirmationOperationStart, type AuthDecisionFinished, type AuthDecisionStarted, AuthEventName, type AuthMethodDecisionFinished, type AuthMethodDecisionStarted, type AuthMethodType, type BaseEvent, CEREMONY_LOW_EVENT_TAIL_MS, CONFIG_BOUNDS, CONFIG_REQUEST_HEADER, CONFIG_STORAGE_KEY, type CaptchaOperationConfig, CaptchaOperationFull, type CaptchaOperationSpecType, type ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_DEVICE_INFO_COLLECTOR_TIMEOUT_MS, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SEQ_LOCK_TIMEOUT_MS, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, type EmailLinkOperationConfig, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, type EmailOTPOperationConfig, type EmailOTPOperationPostResponseStart, type EmailOTPOperationSendOTPStart, type EmailOTPOperationSpecType, EmailOtpOperationFull, type Event, type EventBatch, type EventBatchMeta, type EventMeta, EventStore, type EventType, type FlowAutoFinished, type FlowDecided, type FlowFinished, type FlowReset, type FlowStarted, type FlowType, type FlushReason, type JavaScriptHighEntropy, LocalStorage, type Logger, type LowEvent, type LowEventFieldRole, type LowEventInitiator, type LowEventInputEffect, type LowEventSourceKind, type MultiFlowReset, type MultiFlowStarted, NamespacedStorage, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, type ObserveSdkConfigSnapshot, OperationFull, OperationFullProvideIdentifierWithCUI, type OperationFullProvideIdentifierWithCUIConfig, type OutboxEntry, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, type PasskeyEnrollmentOperationConfig, PasskeyEnrollmentOperationFull, type PasskeyEnrollmentPostResponseStart, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, type PasskeyLoginOperationConfig, PasskeyLoginOperationFull, type PasskeyLoginPostResponseStart, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginCUICeremonyStart, type PasswordLoginCUIGetOptionsFinished, type PasswordLoginCUIGetOptionsStart, type PasswordLoginCUISpecType, type PasswordLoginCUITypedError, type PasswordLoginConfig, type PasswordLoginExplicitSpecType, PasswordLoginOperationFull, type PasswordLoginTypedError, type PredefinedEvent, type ProvideDataOperationConfig, ProvideDataOperationFull, type ProvideDataOperationPostResponseStart, type ProvideDataOperationSpecType, type ProvideDataOperationStart, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkReliabilityConfigOverrides, type SdkRetryConfig, SessionStorage, type SmsOTPOperationConfig, type SmsOTPOperationPostResponseStart, type SmsOTPOperationSpecType, SmsOtpOperationFull, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, type SocialLoginOperationConfig, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type StepHelper, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TelemetryEntry, type TelemetryLevel, type TelemetrySink, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type UserReference, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, getExperiments, getSessionId, getTracker, init, loadCachedConfig, logError, logInfo, namespacedKey, parseReliabilityConfig, resetSession, resolveReliabilityConfig, setExperiment, setExperiments, setUser, telemetry };
|
|
2236
|
+
export { type AppConfirmationOperationCeremonyTypedError, type AppConfirmationOperationConfig, AppConfirmationOperationFull, type AppConfirmationOperationRetryReason, type AppConfirmationOperationSpecType, type AppConfirmationOperationStart, type AuthDecisionFinished, type AuthDecisionStarted, AuthEventName, type AuthMethodDecisionFinished, type AuthMethodDecisionStarted, type AuthMethodType, type BaseEvent, CEREMONY_LOW_EVENT_TAIL_MS, CONFIG_BOUNDS, CONFIG_REQUEST_HEADER, CONFIG_STORAGE_KEY, type CaptchaOperationConfig, CaptchaOperationFull, type CaptchaOperationSpecType, type ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_DEVICE_INFO_COLLECTOR_TIMEOUT_MS, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SEQ_LOCK_TIMEOUT_MS, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, type EmailLinkOperationConfig, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, type EmailOTPOperationConfig, type EmailOTPOperationPostResponseStart, type EmailOTPOperationSendOTPStart, type EmailOTPOperationSpecType, EmailOtpOperationFull, type ErrorStepOptions, type Event, type EventBatch, type EventBatchMeta, type EventMeta, EventStore, type EventType, type FlowAutoFinished, type FlowDecided, type FlowFinished, type FlowReset, type FlowStarted, type FlowType, type FlushReason, type JavaScriptHighEntropy, LocalStorage, type Logger, type LowEvent, type LowEventFieldRole, type LowEventInitiator, type LowEventInputEffect, type LowEventSourceKind, type MultiFlowReset, type MultiFlowStarted, NamespacedStorage, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, type ObserveSdkConfigSnapshot, OperationFull, OperationFullProvideIdentifierWithCUI, type OperationFullProvideIdentifierWithCUIConfig, type OutboxEntry, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, type PasskeyEnrollmentOperationConfig, PasskeyEnrollmentOperationFull, type PasskeyEnrollmentPostResponseStart, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, type PasskeyLoginOperationConfig, PasskeyLoginOperationFull, type PasskeyLoginPostResponseStart, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginCUICeremonyStart, type PasswordLoginCUIGetOptionsFinished, type PasswordLoginCUIGetOptionsStart, type PasswordLoginCUISpecType, type PasswordLoginCUITypedError, type PasswordLoginConfig, type PasswordLoginExplicitSpecType, PasswordLoginOperationFull, type PasswordLoginTypedError, type PredefinedEvent, type ProvideDataOperationConfig, ProvideDataOperationFull, type ProvideDataOperationPostResponseStart, type ProvideDataOperationSpecType, type ProvideDataOperationStart, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RAW_ERROR_BOUNDS, type RawErrorEnvelope, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkReliabilityConfigOverrides, type SdkRetryConfig, type SerializeRawErrorOptions, SessionStorage, type SmsOTPOperationConfig, type SmsOTPOperationPostResponseStart, type SmsOTPOperationSpecType, SmsOtpOperationFull, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, type SocialLoginOperationConfig, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type StepHelper, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TelemetryEntry, type TelemetryLevel, type TelemetrySink, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type TrustedDeviceBindingMetadata, type TrustedDeviceCheckConfig, TrustedDeviceCheckOperationFull, type TrustedDeviceCheckResult, type TrustedDeviceCheckStepResult, type TrustedDeviceCheckTypedError, TrustedDeviceEnrollmentOperationFull, type TrustedDeviceEnrollmentResult, type TrustedDeviceOperationConfig, type TrustedDevicePurpose, type TrustedDeviceStorage, type UserReference, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, getExperiments, getSessionId, getTracker, init, loadCachedConfig, logError, logInfo, namespacedKey, parseReliabilityConfig, resetSession, resolveRawErrorLimits, resolveReliabilityConfig, serializeRawError, setExperiment, setExperiments, setUser, telemetry };
|