@corbado/observe 0.16.2 → 0.16.4
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 +4 -4
- package/dist/index.d.mts +133 -60
- package/dist/index.d.ts +133 -60
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ type EventType = "predefined" | "custom" | "error" | "identify";
|
|
|
6
6
|
type AuthMethodType = "identifier-email"
|
|
7
7
|
/** Neutral "enter an identifier" choice; the identifier kind is the provide-identifier spec type. */
|
|
8
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";
|
|
9
|
+
type SubflowType = "key-signing" | "key-registration" | "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";
|
|
10
10
|
type FlowType = "login" | "signup" | "recovery" | "enrollment" | (string & {});
|
|
11
11
|
type SocialLoginProviderType = "google" | "apple" | "facebook" | "github" | "microsoft" | "other";
|
|
12
12
|
declare enum AuthEventName {
|
|
@@ -343,6 +343,8 @@ type ObserveSdkConfigSnapshot = {
|
|
|
343
343
|
/** Server config version this load is running; empty string when running the built-in defaults. */
|
|
344
344
|
readonly version: string;
|
|
345
345
|
readonly aap: string;
|
|
346
|
+
/** Whether explicitly supplied raw error diagnostics are serialized. Defaults to true. */
|
|
347
|
+
readonly rawErrors: boolean;
|
|
346
348
|
};
|
|
347
349
|
/**
|
|
348
350
|
* Resolved browser SDK reliability policy. Init overrides take precedence over server policy and defaults.
|
|
@@ -432,6 +434,8 @@ interface SdkReliabilityConfig {
|
|
|
432
434
|
* run permanently.
|
|
433
435
|
*/
|
|
434
436
|
deviceInfoTiming: boolean;
|
|
437
|
+
/** Serialize explicitly supplied raw error diagnostics. Defaults to true; refreshes apply to subsequent errors. Already queued events are unchanged. */
|
|
438
|
+
rawErrors: boolean;
|
|
435
439
|
/**
|
|
436
440
|
* How far autocapture may attach when another integration already holds the surface it
|
|
437
441
|
* instruments.
|
|
@@ -445,63 +449,6 @@ type SdkReliabilityConfigOverrides = Partial<Omit<SdkReliabilityConfig, "retry">
|
|
|
445
449
|
retry?: Partial<SdkRetryConfig>;
|
|
446
450
|
};
|
|
447
451
|
|
|
448
|
-
/** Sink that escalates a diagnostic message to the telemetry stream. */
|
|
449
|
-
type TelemetrySink = (level: TelemetryLevel, message: string) => void;
|
|
450
|
-
interface Logger {
|
|
451
|
-
debug(message: string, ...args: unknown[]): void;
|
|
452
|
-
info(message: string, ...args: unknown[]): void;
|
|
453
|
-
warn(message: string, ...args: unknown[]): void;
|
|
454
|
-
error(message: string, ...args: unknown[]): void;
|
|
455
|
-
critical(message: string, ...args: unknown[]): void;
|
|
456
|
-
/**
|
|
457
|
-
* Escalate a diagnostic message to the telemetry stream, if a sink is attached (no-op otherwise).
|
|
458
|
-
* Unlike the level methods, telemetry is delivered to the backend regardless of the `debug` flag.
|
|
459
|
-
* Optional so an integrator-provided custom logger stays valid without implementing it.
|
|
460
|
-
*/
|
|
461
|
-
reportTelemetry?(level: TelemetryLevel, message: string): void;
|
|
462
|
-
/** Attach (or clear) the telemetry sink. Called once by the tracker after the queue exists. */
|
|
463
|
-
setTelemetrySink?(sink: TelemetrySink | undefined): void;
|
|
464
|
-
}
|
|
465
|
-
interface CreateLoggerOptions {
|
|
466
|
-
debug: boolean;
|
|
467
|
-
}
|
|
468
|
-
declare function createLogger(options: CreateLoggerOptions): Logger;
|
|
469
|
-
|
|
470
|
-
type WindowCaptureContext = Pick<LowEvent, "subflowStartEventId" | "fieldRole" | "initiator"> & {
|
|
471
|
-
sessionId?: string;
|
|
472
|
-
};
|
|
473
|
-
/** One passive observer per tracker. Field/ceremony collectors register context, not DOM listeners. */
|
|
474
|
-
declare class SharedWindowObserver {
|
|
475
|
-
private logger;
|
|
476
|
-
private enqueue;
|
|
477
|
-
private flushKeepalive;
|
|
478
|
-
private inputs;
|
|
479
|
-
private ceremonies;
|
|
480
|
-
private removers;
|
|
481
|
-
private lastBlur?;
|
|
482
|
-
private bracket?;
|
|
483
|
-
private unrelatedPointerAt;
|
|
484
|
-
private destroyed;
|
|
485
|
-
private viewportContext;
|
|
486
|
-
private resize;
|
|
487
|
-
private scroll;
|
|
488
|
-
constructor(logger: Logger, enqueue: (low: LowEvent, sessionId?: string) => void, flushKeepalive: () => void);
|
|
489
|
-
registerInputs(fields: readonly HTMLInputElement[], context: () => WindowCaptureContext, flush: () => void): () => void;
|
|
490
|
-
beginCeremony(context: WindowCaptureContext): {
|
|
491
|
-
settle: (tailMs: number) => void;
|
|
492
|
-
destroy: () => void;
|
|
493
|
-
};
|
|
494
|
-
private context;
|
|
495
|
-
private findInput;
|
|
496
|
-
/** Flush all registered input batches before a high-level lifecycle boundary. */
|
|
497
|
-
flushInputs(): void;
|
|
498
|
-
private emit;
|
|
499
|
-
private listen;
|
|
500
|
-
private extendViewport;
|
|
501
|
-
private observeNavigation;
|
|
502
|
-
destroy(): void;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
452
|
/**
|
|
506
453
|
* Where low events go. `flushKeepalive` is requested on `pagehide` teardown so lows batched after
|
|
507
454
|
* the queue's own lifecycle flush still get out; operations wire it to the client's
|
|
@@ -524,7 +471,8 @@ interface LowEventSink {
|
|
|
524
471
|
* (`normalizeDepth`, `normalizeMaxBreadth`, `maxValueLength`, `normalizeToSize`, the
|
|
525
472
|
* stack-frame limit and the linked-errors limit) with defaults tuned for an authentication
|
|
526
473
|
* event stream rather than an error monitor. Every value is clamped to {@link RAW_ERROR_BOUNDS};
|
|
527
|
-
* invalid values fall back to the default.
|
|
474
|
+
* invalid values fall back to the default. A fixed 1024-node budget per depth attempt and
|
|
475
|
+
* incremental text-byte accounting also bound work before the final JSON-size check.
|
|
528
476
|
*/
|
|
529
477
|
type SerializeRawErrorOptions = {
|
|
530
478
|
/** Include `stack` strings. Default false. */
|
|
@@ -611,6 +559,28 @@ declare function resolveRawErrorLimits(options?: SerializeRawErrorOptions): Limi
|
|
|
611
559
|
*/
|
|
612
560
|
declare function serializeRawError(value: unknown, options?: SerializeRawErrorOptions): RawErrorEnvelope | undefined;
|
|
613
561
|
|
|
562
|
+
/** Sink that escalates a diagnostic message to the telemetry stream. */
|
|
563
|
+
type TelemetrySink = (level: TelemetryLevel, message: string) => void;
|
|
564
|
+
interface Logger {
|
|
565
|
+
debug(message: string, ...args: unknown[]): void;
|
|
566
|
+
info(message: string, ...args: unknown[]): void;
|
|
567
|
+
warn(message: string, ...args: unknown[]): void;
|
|
568
|
+
error(message: string, ...args: unknown[]): void;
|
|
569
|
+
critical(message: string, ...args: unknown[]): void;
|
|
570
|
+
/**
|
|
571
|
+
* Escalate a diagnostic message to the telemetry stream, if a sink is attached (no-op otherwise).
|
|
572
|
+
* Unlike the level methods, telemetry is delivered to the backend regardless of the `debug` flag.
|
|
573
|
+
* Optional so an integrator-provided custom logger stays valid without implementing it.
|
|
574
|
+
*/
|
|
575
|
+
reportTelemetry?(level: TelemetryLevel, message: string): void;
|
|
576
|
+
/** Attach (or clear) the telemetry sink. Called once by the tracker after the queue exists. */
|
|
577
|
+
setTelemetrySink?(sink: TelemetrySink | undefined): void;
|
|
578
|
+
}
|
|
579
|
+
interface CreateLoggerOptions {
|
|
580
|
+
debug: boolean;
|
|
581
|
+
}
|
|
582
|
+
declare function createLogger(options: CreateLoggerOptions): Logger;
|
|
583
|
+
|
|
614
584
|
/** Ceremony context lease on the shared observer. Never installs its own window listeners. */
|
|
615
585
|
declare class LowEventWindowTracker {
|
|
616
586
|
private logger;
|
|
@@ -634,6 +604,8 @@ declare const CEREMONY_LOW_EVENT_TAIL_MS = 1500;
|
|
|
634
604
|
*
|
|
635
605
|
* Use `rawError` when a library error contains useful context beyond its classified name,
|
|
636
606
|
* code and message, such as a nested cause, an error array or a response status.
|
|
607
|
+
* Serialization requires SDK config `rawErrors: true` (default true). Config refreshes apply
|
|
608
|
+
* to subsequent errors; diagnostics already queued are unchanged.
|
|
637
609
|
* It is emitted as a bounded `{ type, value }` envelope in `stepData.rawError` for raw-event
|
|
638
610
|
* inspection. The envelope type describes the JavaScript value; the library's own fields
|
|
639
611
|
* stay inside value. See {@link serializeRawError} for serialization limits.
|
|
@@ -726,6 +698,61 @@ declare abstract class OperationFull {
|
|
|
726
698
|
protected defineStep<TStart = {}, TFinished = {}, TTypedError = never>(stepName: string, ignoreAsInteractionOnStart?: boolean): StepHelper<TStart, TFinished, TTypedError>;
|
|
727
699
|
}
|
|
728
700
|
|
|
701
|
+
/** Shared configuration for direct key signing and authority registration. */
|
|
702
|
+
type KeyOperationConfig = {
|
|
703
|
+
/** Reserved for future variants; no spec types are currently defined. */
|
|
704
|
+
explicitSpecType?: undefined;
|
|
705
|
+
};
|
|
706
|
+
declare class KeySigningOperationFull extends OperationFull {
|
|
707
|
+
/** Resolve an eligible key and prepare the input for an actual signing attempt. */
|
|
708
|
+
readonly prepare: StepHelper;
|
|
709
|
+
/** Sign and assemble the usable signed artifact. Does not include submitting it. */
|
|
710
|
+
readonly sign: StepHelper;
|
|
711
|
+
constructor(tracker: CorbadoTracker, config?: KeyOperationConfig);
|
|
712
|
+
}
|
|
713
|
+
declare class KeyRegistrationOperationFull extends OperationFull {
|
|
714
|
+
/** Build the request that will establish the key's authority. */
|
|
715
|
+
readonly prepare: StepHelper;
|
|
716
|
+
/** Submit and await acceptance: finish only when the key is authorized and usable. */
|
|
717
|
+
readonly postResponse: StepHelper;
|
|
718
|
+
constructor(tracker: CorbadoTracker, config?: KeyOperationConfig);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
type WindowCaptureContext = Pick<LowEvent, "subflowStartEventId" | "fieldRole" | "initiator"> & {
|
|
722
|
+
sessionId?: string;
|
|
723
|
+
};
|
|
724
|
+
/** One passive observer per tracker. Field/ceremony collectors register context, not DOM listeners. */
|
|
725
|
+
declare class SharedWindowObserver {
|
|
726
|
+
private logger;
|
|
727
|
+
private enqueue;
|
|
728
|
+
private flushKeepalive;
|
|
729
|
+
private inputs;
|
|
730
|
+
private ceremonies;
|
|
731
|
+
private removers;
|
|
732
|
+
private lastBlur?;
|
|
733
|
+
private bracket?;
|
|
734
|
+
private unrelatedPointerAt;
|
|
735
|
+
private destroyed;
|
|
736
|
+
private viewportContext;
|
|
737
|
+
private resize;
|
|
738
|
+
private scroll;
|
|
739
|
+
constructor(logger: Logger, enqueue: (low: LowEvent, sessionId?: string) => void, flushKeepalive: () => void);
|
|
740
|
+
registerInputs(fields: readonly HTMLInputElement[], context: () => WindowCaptureContext, flush: () => void): () => void;
|
|
741
|
+
beginCeremony(context: WindowCaptureContext): {
|
|
742
|
+
settle: (tailMs: number) => void;
|
|
743
|
+
destroy: () => void;
|
|
744
|
+
};
|
|
745
|
+
private context;
|
|
746
|
+
private findInput;
|
|
747
|
+
/** Flush all registered input batches before a high-level lifecycle boundary. */
|
|
748
|
+
flushInputs(): void;
|
|
749
|
+
private emit;
|
|
750
|
+
private listen;
|
|
751
|
+
private extendViewport;
|
|
752
|
+
private observeNavigation;
|
|
753
|
+
destroy(): void;
|
|
754
|
+
}
|
|
755
|
+
|
|
729
756
|
type PasskeyOperationLoginExplicitSpecType = "passkey-cui" | "passkey-known-identifier" | "passkey-no-identifier"
|
|
730
757
|
/**
|
|
731
758
|
* The `-auto` variants are the same two ceremonies started by the integration rather than by a
|
|
@@ -1631,6 +1658,52 @@ declare class CorbadoTracker {
|
|
|
1631
1658
|
provideDataOperationFull(config?: ProvideDataOperationConfig): ProvideDataOperationFull;
|
|
1632
1659
|
socialLoginOperationFull(config?: SocialLoginOperationConfig): SocialLoginOperationFull;
|
|
1633
1660
|
appConfirmationOperationFull(config?: AppConfirmationOperationConfig): AppConfirmationOperationFull;
|
|
1661
|
+
/**
|
|
1662
|
+
* Track direct key signing outside WebAuthn through prepare and sign.
|
|
1663
|
+
*
|
|
1664
|
+
* @param config - Optional configuration; explicitSpecType may only be undefined for now.
|
|
1665
|
+
* @remarks
|
|
1666
|
+
* Start prepare when resolving the eligible key and input for an actual attempt, not background
|
|
1667
|
+
* prefetch. Although system-driven, that work is meaningful interaction for classification.
|
|
1668
|
+
* Construction alone does not establish interaction. Finish sign only when the usable signed
|
|
1669
|
+
* artifact is ready, including assembly. Submission is outside this operation. Report failures
|
|
1670
|
+
* on the affected step using error(error). Never include key material, signatures or proofs.
|
|
1671
|
+
* WebAuthn assertions continue to use passkeyLoginFullOperation.
|
|
1672
|
+
* @example
|
|
1673
|
+
* ```ts
|
|
1674
|
+
* const signing = tracker.keySigningOperationFull();
|
|
1675
|
+
* signing.prepare.start({});
|
|
1676
|
+
* // Resolve an eligible key and prepare the signing input.
|
|
1677
|
+
* signing.prepare.finished({});
|
|
1678
|
+
* signing.sign.start({});
|
|
1679
|
+
* // Sign and assemble the artifact returned to the caller.
|
|
1680
|
+
* signing.sign.finished({});
|
|
1681
|
+
* ```
|
|
1682
|
+
*/
|
|
1683
|
+
keySigningOperationFull(config?: KeyOperationConfig): KeySigningOperationFull;
|
|
1684
|
+
/**
|
|
1685
|
+
* Track establishing a key's authority through prepare and postResponse.
|
|
1686
|
+
*
|
|
1687
|
+
* @param config - Optional configuration; explicitSpecType may only be undefined for now.
|
|
1688
|
+
* @remarks
|
|
1689
|
+
* Start prepare when building an actual registration request, not background prefetch.
|
|
1690
|
+
* This system-driven work is meaningful interaction; construction alone is not.
|
|
1691
|
+
* postResponse covers submission and acceptance. Finish only when the key is authorized and
|
|
1692
|
+
* usable, not merely when submission returns. Report rejection, transport, execution or timeout
|
|
1693
|
+
* errors on the affected step using error(error). Never include key material or proofs.
|
|
1694
|
+
* Credential creation and any authorizing WebAuthn assertion are separate operations.
|
|
1695
|
+
* @example
|
|
1696
|
+
* ```ts
|
|
1697
|
+
* const registration = tracker.keyRegistrationOperationFull();
|
|
1698
|
+
* registration.prepare.start({});
|
|
1699
|
+
* // Build the registration request.
|
|
1700
|
+
* registration.prepare.finished({});
|
|
1701
|
+
* registration.postResponse.start({});
|
|
1702
|
+
* // Submit and await evidence that the authority is usable.
|
|
1703
|
+
* registration.postResponse.finished({});
|
|
1704
|
+
* ```
|
|
1705
|
+
*/
|
|
1706
|
+
keyRegistrationOperationFull(config?: KeyOperationConfig): KeyRegistrationOperationFull;
|
|
1634
1707
|
captchaOperationFull(config?: CaptchaOperationConfig): CaptchaOperationFull;
|
|
1635
1708
|
/**
|
|
1636
1709
|
* Track a device-trust check through getOptions, ceremony and postResponse.
|
|
@@ -2277,4 +2350,4 @@ declare function logInfo(message: string): void;
|
|
|
2277
2350
|
declare function logError(message: string): void;
|
|
2278
2351
|
declare function destroy(): Promise<void>;
|
|
2279
2352
|
|
|
2280
|
-
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, sanitizeAssertionResponse, sanitizeCreationOptions, sanitizeCreationResponse, sanitizeRequestOptions, serializeRawError, setExperiment, setExperiments, setUser, telemetry };
|
|
2353
|
+
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, type KeyOperationConfig, KeyRegistrationOperationFull, KeySigningOperationFull, 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, sanitizeAssertionResponse, sanitizeCreationOptions, sanitizeCreationResponse, sanitizeRequestOptions, serializeRawError, setExperiment, setExperiments, setUser, telemetry };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ type EventType = "predefined" | "custom" | "error" | "identify";
|
|
|
6
6
|
type AuthMethodType = "identifier-email"
|
|
7
7
|
/** Neutral "enter an identifier" choice; the identifier kind is the provide-identifier spec type. */
|
|
8
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";
|
|
9
|
+
type SubflowType = "key-signing" | "key-registration" | "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";
|
|
10
10
|
type FlowType = "login" | "signup" | "recovery" | "enrollment" | (string & {});
|
|
11
11
|
type SocialLoginProviderType = "google" | "apple" | "facebook" | "github" | "microsoft" | "other";
|
|
12
12
|
declare enum AuthEventName {
|
|
@@ -343,6 +343,8 @@ type ObserveSdkConfigSnapshot = {
|
|
|
343
343
|
/** Server config version this load is running; empty string when running the built-in defaults. */
|
|
344
344
|
readonly version: string;
|
|
345
345
|
readonly aap: string;
|
|
346
|
+
/** Whether explicitly supplied raw error diagnostics are serialized. Defaults to true. */
|
|
347
|
+
readonly rawErrors: boolean;
|
|
346
348
|
};
|
|
347
349
|
/**
|
|
348
350
|
* Resolved browser SDK reliability policy. Init overrides take precedence over server policy and defaults.
|
|
@@ -432,6 +434,8 @@ interface SdkReliabilityConfig {
|
|
|
432
434
|
* run permanently.
|
|
433
435
|
*/
|
|
434
436
|
deviceInfoTiming: boolean;
|
|
437
|
+
/** Serialize explicitly supplied raw error diagnostics. Defaults to true; refreshes apply to subsequent errors. Already queued events are unchanged. */
|
|
438
|
+
rawErrors: boolean;
|
|
435
439
|
/**
|
|
436
440
|
* How far autocapture may attach when another integration already holds the surface it
|
|
437
441
|
* instruments.
|
|
@@ -445,63 +449,6 @@ type SdkReliabilityConfigOverrides = Partial<Omit<SdkReliabilityConfig, "retry">
|
|
|
445
449
|
retry?: Partial<SdkRetryConfig>;
|
|
446
450
|
};
|
|
447
451
|
|
|
448
|
-
/** Sink that escalates a diagnostic message to the telemetry stream. */
|
|
449
|
-
type TelemetrySink = (level: TelemetryLevel, message: string) => void;
|
|
450
|
-
interface Logger {
|
|
451
|
-
debug(message: string, ...args: unknown[]): void;
|
|
452
|
-
info(message: string, ...args: unknown[]): void;
|
|
453
|
-
warn(message: string, ...args: unknown[]): void;
|
|
454
|
-
error(message: string, ...args: unknown[]): void;
|
|
455
|
-
critical(message: string, ...args: unknown[]): void;
|
|
456
|
-
/**
|
|
457
|
-
* Escalate a diagnostic message to the telemetry stream, if a sink is attached (no-op otherwise).
|
|
458
|
-
* Unlike the level methods, telemetry is delivered to the backend regardless of the `debug` flag.
|
|
459
|
-
* Optional so an integrator-provided custom logger stays valid without implementing it.
|
|
460
|
-
*/
|
|
461
|
-
reportTelemetry?(level: TelemetryLevel, message: string): void;
|
|
462
|
-
/** Attach (or clear) the telemetry sink. Called once by the tracker after the queue exists. */
|
|
463
|
-
setTelemetrySink?(sink: TelemetrySink | undefined): void;
|
|
464
|
-
}
|
|
465
|
-
interface CreateLoggerOptions {
|
|
466
|
-
debug: boolean;
|
|
467
|
-
}
|
|
468
|
-
declare function createLogger(options: CreateLoggerOptions): Logger;
|
|
469
|
-
|
|
470
|
-
type WindowCaptureContext = Pick<LowEvent, "subflowStartEventId" | "fieldRole" | "initiator"> & {
|
|
471
|
-
sessionId?: string;
|
|
472
|
-
};
|
|
473
|
-
/** One passive observer per tracker. Field/ceremony collectors register context, not DOM listeners. */
|
|
474
|
-
declare class SharedWindowObserver {
|
|
475
|
-
private logger;
|
|
476
|
-
private enqueue;
|
|
477
|
-
private flushKeepalive;
|
|
478
|
-
private inputs;
|
|
479
|
-
private ceremonies;
|
|
480
|
-
private removers;
|
|
481
|
-
private lastBlur?;
|
|
482
|
-
private bracket?;
|
|
483
|
-
private unrelatedPointerAt;
|
|
484
|
-
private destroyed;
|
|
485
|
-
private viewportContext;
|
|
486
|
-
private resize;
|
|
487
|
-
private scroll;
|
|
488
|
-
constructor(logger: Logger, enqueue: (low: LowEvent, sessionId?: string) => void, flushKeepalive: () => void);
|
|
489
|
-
registerInputs(fields: readonly HTMLInputElement[], context: () => WindowCaptureContext, flush: () => void): () => void;
|
|
490
|
-
beginCeremony(context: WindowCaptureContext): {
|
|
491
|
-
settle: (tailMs: number) => void;
|
|
492
|
-
destroy: () => void;
|
|
493
|
-
};
|
|
494
|
-
private context;
|
|
495
|
-
private findInput;
|
|
496
|
-
/** Flush all registered input batches before a high-level lifecycle boundary. */
|
|
497
|
-
flushInputs(): void;
|
|
498
|
-
private emit;
|
|
499
|
-
private listen;
|
|
500
|
-
private extendViewport;
|
|
501
|
-
private observeNavigation;
|
|
502
|
-
destroy(): void;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
452
|
/**
|
|
506
453
|
* Where low events go. `flushKeepalive` is requested on `pagehide` teardown so lows batched after
|
|
507
454
|
* the queue's own lifecycle flush still get out; operations wire it to the client's
|
|
@@ -524,7 +471,8 @@ interface LowEventSink {
|
|
|
524
471
|
* (`normalizeDepth`, `normalizeMaxBreadth`, `maxValueLength`, `normalizeToSize`, the
|
|
525
472
|
* stack-frame limit and the linked-errors limit) with defaults tuned for an authentication
|
|
526
473
|
* event stream rather than an error monitor. Every value is clamped to {@link RAW_ERROR_BOUNDS};
|
|
527
|
-
* invalid values fall back to the default.
|
|
474
|
+
* invalid values fall back to the default. A fixed 1024-node budget per depth attempt and
|
|
475
|
+
* incremental text-byte accounting also bound work before the final JSON-size check.
|
|
528
476
|
*/
|
|
529
477
|
type SerializeRawErrorOptions = {
|
|
530
478
|
/** Include `stack` strings. Default false. */
|
|
@@ -611,6 +559,28 @@ declare function resolveRawErrorLimits(options?: SerializeRawErrorOptions): Limi
|
|
|
611
559
|
*/
|
|
612
560
|
declare function serializeRawError(value: unknown, options?: SerializeRawErrorOptions): RawErrorEnvelope | undefined;
|
|
613
561
|
|
|
562
|
+
/** Sink that escalates a diagnostic message to the telemetry stream. */
|
|
563
|
+
type TelemetrySink = (level: TelemetryLevel, message: string) => void;
|
|
564
|
+
interface Logger {
|
|
565
|
+
debug(message: string, ...args: unknown[]): void;
|
|
566
|
+
info(message: string, ...args: unknown[]): void;
|
|
567
|
+
warn(message: string, ...args: unknown[]): void;
|
|
568
|
+
error(message: string, ...args: unknown[]): void;
|
|
569
|
+
critical(message: string, ...args: unknown[]): void;
|
|
570
|
+
/**
|
|
571
|
+
* Escalate a diagnostic message to the telemetry stream, if a sink is attached (no-op otherwise).
|
|
572
|
+
* Unlike the level methods, telemetry is delivered to the backend regardless of the `debug` flag.
|
|
573
|
+
* Optional so an integrator-provided custom logger stays valid without implementing it.
|
|
574
|
+
*/
|
|
575
|
+
reportTelemetry?(level: TelemetryLevel, message: string): void;
|
|
576
|
+
/** Attach (or clear) the telemetry sink. Called once by the tracker after the queue exists. */
|
|
577
|
+
setTelemetrySink?(sink: TelemetrySink | undefined): void;
|
|
578
|
+
}
|
|
579
|
+
interface CreateLoggerOptions {
|
|
580
|
+
debug: boolean;
|
|
581
|
+
}
|
|
582
|
+
declare function createLogger(options: CreateLoggerOptions): Logger;
|
|
583
|
+
|
|
614
584
|
/** Ceremony context lease on the shared observer. Never installs its own window listeners. */
|
|
615
585
|
declare class LowEventWindowTracker {
|
|
616
586
|
private logger;
|
|
@@ -634,6 +604,8 @@ declare const CEREMONY_LOW_EVENT_TAIL_MS = 1500;
|
|
|
634
604
|
*
|
|
635
605
|
* Use `rawError` when a library error contains useful context beyond its classified name,
|
|
636
606
|
* code and message, such as a nested cause, an error array or a response status.
|
|
607
|
+
* Serialization requires SDK config `rawErrors: true` (default true). Config refreshes apply
|
|
608
|
+
* to subsequent errors; diagnostics already queued are unchanged.
|
|
637
609
|
* It is emitted as a bounded `{ type, value }` envelope in `stepData.rawError` for raw-event
|
|
638
610
|
* inspection. The envelope type describes the JavaScript value; the library's own fields
|
|
639
611
|
* stay inside value. See {@link serializeRawError} for serialization limits.
|
|
@@ -726,6 +698,61 @@ declare abstract class OperationFull {
|
|
|
726
698
|
protected defineStep<TStart = {}, TFinished = {}, TTypedError = never>(stepName: string, ignoreAsInteractionOnStart?: boolean): StepHelper<TStart, TFinished, TTypedError>;
|
|
727
699
|
}
|
|
728
700
|
|
|
701
|
+
/** Shared configuration for direct key signing and authority registration. */
|
|
702
|
+
type KeyOperationConfig = {
|
|
703
|
+
/** Reserved for future variants; no spec types are currently defined. */
|
|
704
|
+
explicitSpecType?: undefined;
|
|
705
|
+
};
|
|
706
|
+
declare class KeySigningOperationFull extends OperationFull {
|
|
707
|
+
/** Resolve an eligible key and prepare the input for an actual signing attempt. */
|
|
708
|
+
readonly prepare: StepHelper;
|
|
709
|
+
/** Sign and assemble the usable signed artifact. Does not include submitting it. */
|
|
710
|
+
readonly sign: StepHelper;
|
|
711
|
+
constructor(tracker: CorbadoTracker, config?: KeyOperationConfig);
|
|
712
|
+
}
|
|
713
|
+
declare class KeyRegistrationOperationFull extends OperationFull {
|
|
714
|
+
/** Build the request that will establish the key's authority. */
|
|
715
|
+
readonly prepare: StepHelper;
|
|
716
|
+
/** Submit and await acceptance: finish only when the key is authorized and usable. */
|
|
717
|
+
readonly postResponse: StepHelper;
|
|
718
|
+
constructor(tracker: CorbadoTracker, config?: KeyOperationConfig);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
type WindowCaptureContext = Pick<LowEvent, "subflowStartEventId" | "fieldRole" | "initiator"> & {
|
|
722
|
+
sessionId?: string;
|
|
723
|
+
};
|
|
724
|
+
/** One passive observer per tracker. Field/ceremony collectors register context, not DOM listeners. */
|
|
725
|
+
declare class SharedWindowObserver {
|
|
726
|
+
private logger;
|
|
727
|
+
private enqueue;
|
|
728
|
+
private flushKeepalive;
|
|
729
|
+
private inputs;
|
|
730
|
+
private ceremonies;
|
|
731
|
+
private removers;
|
|
732
|
+
private lastBlur?;
|
|
733
|
+
private bracket?;
|
|
734
|
+
private unrelatedPointerAt;
|
|
735
|
+
private destroyed;
|
|
736
|
+
private viewportContext;
|
|
737
|
+
private resize;
|
|
738
|
+
private scroll;
|
|
739
|
+
constructor(logger: Logger, enqueue: (low: LowEvent, sessionId?: string) => void, flushKeepalive: () => void);
|
|
740
|
+
registerInputs(fields: readonly HTMLInputElement[], context: () => WindowCaptureContext, flush: () => void): () => void;
|
|
741
|
+
beginCeremony(context: WindowCaptureContext): {
|
|
742
|
+
settle: (tailMs: number) => void;
|
|
743
|
+
destroy: () => void;
|
|
744
|
+
};
|
|
745
|
+
private context;
|
|
746
|
+
private findInput;
|
|
747
|
+
/** Flush all registered input batches before a high-level lifecycle boundary. */
|
|
748
|
+
flushInputs(): void;
|
|
749
|
+
private emit;
|
|
750
|
+
private listen;
|
|
751
|
+
private extendViewport;
|
|
752
|
+
private observeNavigation;
|
|
753
|
+
destroy(): void;
|
|
754
|
+
}
|
|
755
|
+
|
|
729
756
|
type PasskeyOperationLoginExplicitSpecType = "passkey-cui" | "passkey-known-identifier" | "passkey-no-identifier"
|
|
730
757
|
/**
|
|
731
758
|
* The `-auto` variants are the same two ceremonies started by the integration rather than by a
|
|
@@ -1631,6 +1658,52 @@ declare class CorbadoTracker {
|
|
|
1631
1658
|
provideDataOperationFull(config?: ProvideDataOperationConfig): ProvideDataOperationFull;
|
|
1632
1659
|
socialLoginOperationFull(config?: SocialLoginOperationConfig): SocialLoginOperationFull;
|
|
1633
1660
|
appConfirmationOperationFull(config?: AppConfirmationOperationConfig): AppConfirmationOperationFull;
|
|
1661
|
+
/**
|
|
1662
|
+
* Track direct key signing outside WebAuthn through prepare and sign.
|
|
1663
|
+
*
|
|
1664
|
+
* @param config - Optional configuration; explicitSpecType may only be undefined for now.
|
|
1665
|
+
* @remarks
|
|
1666
|
+
* Start prepare when resolving the eligible key and input for an actual attempt, not background
|
|
1667
|
+
* prefetch. Although system-driven, that work is meaningful interaction for classification.
|
|
1668
|
+
* Construction alone does not establish interaction. Finish sign only when the usable signed
|
|
1669
|
+
* artifact is ready, including assembly. Submission is outside this operation. Report failures
|
|
1670
|
+
* on the affected step using error(error). Never include key material, signatures or proofs.
|
|
1671
|
+
* WebAuthn assertions continue to use passkeyLoginFullOperation.
|
|
1672
|
+
* @example
|
|
1673
|
+
* ```ts
|
|
1674
|
+
* const signing = tracker.keySigningOperationFull();
|
|
1675
|
+
* signing.prepare.start({});
|
|
1676
|
+
* // Resolve an eligible key and prepare the signing input.
|
|
1677
|
+
* signing.prepare.finished({});
|
|
1678
|
+
* signing.sign.start({});
|
|
1679
|
+
* // Sign and assemble the artifact returned to the caller.
|
|
1680
|
+
* signing.sign.finished({});
|
|
1681
|
+
* ```
|
|
1682
|
+
*/
|
|
1683
|
+
keySigningOperationFull(config?: KeyOperationConfig): KeySigningOperationFull;
|
|
1684
|
+
/**
|
|
1685
|
+
* Track establishing a key's authority through prepare and postResponse.
|
|
1686
|
+
*
|
|
1687
|
+
* @param config - Optional configuration; explicitSpecType may only be undefined for now.
|
|
1688
|
+
* @remarks
|
|
1689
|
+
* Start prepare when building an actual registration request, not background prefetch.
|
|
1690
|
+
* This system-driven work is meaningful interaction; construction alone is not.
|
|
1691
|
+
* postResponse covers submission and acceptance. Finish only when the key is authorized and
|
|
1692
|
+
* usable, not merely when submission returns. Report rejection, transport, execution or timeout
|
|
1693
|
+
* errors on the affected step using error(error). Never include key material or proofs.
|
|
1694
|
+
* Credential creation and any authorizing WebAuthn assertion are separate operations.
|
|
1695
|
+
* @example
|
|
1696
|
+
* ```ts
|
|
1697
|
+
* const registration = tracker.keyRegistrationOperationFull();
|
|
1698
|
+
* registration.prepare.start({});
|
|
1699
|
+
* // Build the registration request.
|
|
1700
|
+
* registration.prepare.finished({});
|
|
1701
|
+
* registration.postResponse.start({});
|
|
1702
|
+
* // Submit and await evidence that the authority is usable.
|
|
1703
|
+
* registration.postResponse.finished({});
|
|
1704
|
+
* ```
|
|
1705
|
+
*/
|
|
1706
|
+
keyRegistrationOperationFull(config?: KeyOperationConfig): KeyRegistrationOperationFull;
|
|
1634
1707
|
captchaOperationFull(config?: CaptchaOperationConfig): CaptchaOperationFull;
|
|
1635
1708
|
/**
|
|
1636
1709
|
* Track a device-trust check through getOptions, ceremony and postResponse.
|
|
@@ -2277,4 +2350,4 @@ declare function logInfo(message: string): void;
|
|
|
2277
2350
|
declare function logError(message: string): void;
|
|
2278
2351
|
declare function destroy(): Promise<void>;
|
|
2279
2352
|
|
|
2280
|
-
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, sanitizeAssertionResponse, sanitizeCreationOptions, sanitizeCreationResponse, sanitizeRequestOptions, serializeRawError, setExperiment, setExperiments, setUser, telemetry };
|
|
2353
|
+
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, type KeyOperationConfig, KeyRegistrationOperationFull, KeySigningOperationFull, 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, sanitizeAssertionResponse, sanitizeCreationOptions, sanitizeCreationResponse, sanitizeRequestOptions, serializeRawError, setExperiment, setExperiments, setUser, telemetry };
|