@corbado/observe 0.5.2 → 0.7.0-next.55-c4893f6
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 +54 -5
- package/dist/index.d.ts +54 -5
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -85,7 +85,7 @@ type Conversion = {
|
|
|
85
85
|
} & UserReference;
|
|
86
86
|
type FlowFinished = {
|
|
87
87
|
flowName: FlowType;
|
|
88
|
-
explicitOutcome?: "skipped" | "
|
|
88
|
+
explicitOutcome?: "skipped" | "visible-auto-skip" | "invisble";
|
|
89
89
|
} & UserReference;
|
|
90
90
|
type FlowReset = {
|
|
91
91
|
flowName?: FlowType;
|
|
@@ -374,7 +374,7 @@ declare abstract class OperationFull {
|
|
|
374
374
|
subflowStart(data: any, options?: StepOptions): void;
|
|
375
375
|
trigger(data: SubflowTrigger, options?: StepOptions): void;
|
|
376
376
|
customStep<TStart = {}, TFinished = {}>(stepName: string): StepHelper<TStart, TFinished>;
|
|
377
|
-
protected subflowStepStarted(stepName: string, data: any, options?: StepOptions): void;
|
|
377
|
+
protected subflowStepStarted(stepName: string, data: any, options?: StepOptions, ignoreAsInteraction?: boolean): void;
|
|
378
378
|
protected subflowStepFinished(stepName: string, data: any, options?: StepOptions): void;
|
|
379
379
|
protected subflowStepError(stepName: string, data: any, options?: StepOptions): void;
|
|
380
380
|
/**
|
|
@@ -384,7 +384,7 @@ declare abstract class OperationFull {
|
|
|
384
384
|
* tracker armed.
|
|
385
385
|
*/
|
|
386
386
|
protected withWindowLowEvents<S extends StepHelper<never, never, never>>(step: S, windowTracker: LowEventWindowTracker): S;
|
|
387
|
-
protected defineStep<TStart = {}, TFinished = {}, TTypedError = never>(stepName: string): StepHelper<TStart, TFinished, TTypedError>;
|
|
387
|
+
protected defineStep<TStart = {}, TFinished = {}, TTypedError = never>(stepName: string, ignoreAsInteractionOnStart?: boolean): StepHelper<TStart, TFinished, TTypedError>;
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
type PasskeyOperationLoginExplicitSpecType = "passkey-cui" | "passkey-known-identifier" | "passkey-no-identifier"
|
|
@@ -436,6 +436,16 @@ declare class EmailOtpOperationFull extends OperationFull {
|
|
|
436
436
|
constructor(tracker: CorbadoTracker);
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
+
type SmsOTPOperationSpecType = "sms-otp-login" | "sms-otp-enrollment";
|
|
440
|
+
type SmsOTPOperationPostResponseStart = {
|
|
441
|
+
explicitSpecType?: SmsOTPOperationSpecType;
|
|
442
|
+
};
|
|
443
|
+
declare class SmsOtpOperationFull extends OperationFull {
|
|
444
|
+
readonly postResponse: StepHelper<SmsOTPOperationPostResponseStart>;
|
|
445
|
+
readonly resend: StepHelper;
|
|
446
|
+
constructor(tracker: CorbadoTracker);
|
|
447
|
+
}
|
|
448
|
+
|
|
439
449
|
type EmailLinkOperationSpecType = "email-link-login" | "email-link-enrollment";
|
|
440
450
|
type EmailLinkOperationSendStart = {
|
|
441
451
|
explicitSpecType?: EmailLinkOperationSpecType;
|
|
@@ -479,6 +489,27 @@ type PasswordLoginTypedError = {
|
|
|
479
489
|
code: PasswordLoginTypedErrorCode;
|
|
480
490
|
};
|
|
481
491
|
type PasswordLoginTypedErrorCode = "invalid_password" | "user_not_found" | "account_locked";
|
|
492
|
+
/**
|
|
493
|
+
* Conditional-UI (CUI) passkey login hosted on the password-login subflow. Mirrors the CUI step
|
|
494
|
+
* family of `OperationFullProvideIdentifierWithCUI`, but the steps are emitted under
|
|
495
|
+
* `subflow_type = "password-login"` — for login screens whose only pre-passkey surface is a
|
|
496
|
+
* combined identifier + password form (no standalone provide-identifier step).
|
|
497
|
+
*/
|
|
498
|
+
type PasswordLoginCUISpecType = "passkey-cui";
|
|
499
|
+
type PasswordLoginCUITypedError = {
|
|
500
|
+
code: PasswordLoginCUITypedErrorCode;
|
|
501
|
+
};
|
|
502
|
+
type PasswordLoginCUITypedErrorCode = "cancel_detected";
|
|
503
|
+
type PasswordLoginCUIGetOptionsStart = {
|
|
504
|
+
explicitSpecType?: PasswordLoginCUISpecType;
|
|
505
|
+
};
|
|
506
|
+
type PasswordLoginCUIGetOptionsFinished = {
|
|
507
|
+
explicitSpecType?: PasswordLoginCUISpecType;
|
|
508
|
+
assertionOptions: string;
|
|
509
|
+
};
|
|
510
|
+
type PasswordLoginCUICeremonyStart = {
|
|
511
|
+
explicitSpecType?: PasswordLoginCUISpecType;
|
|
512
|
+
};
|
|
482
513
|
type PasswordLoginAutoTrackConfig = {
|
|
483
514
|
explicitSpecType: "password-known-identifier";
|
|
484
515
|
/** The password input field. */
|
|
@@ -494,7 +525,18 @@ type PasswordLoginAutoTrackConfig = {
|
|
|
494
525
|
identifierInputHtmlField?: HTMLInputElement;
|
|
495
526
|
};
|
|
496
527
|
declare class PasswordLoginOperationFull extends OperationFull {
|
|
528
|
+
readonly clientValidation: StepHelper;
|
|
497
529
|
readonly postResponse: StepHelper<{}, {}, PasswordLoginTypedError>;
|
|
530
|
+
/**
|
|
531
|
+
* Conditional-UI passkey ceremony that runs while the password form is mounted. The three steps
|
|
532
|
+
* are emitted under the same `password-login` subflow so a CUI passkey login on this screen is
|
|
533
|
+
* attributed to password-login rather than a separate subflow.
|
|
534
|
+
*/
|
|
535
|
+
readonly cui: {
|
|
536
|
+
getOptions: StepHelper<PasswordLoginCUIGetOptionsStart, PasswordLoginCUIGetOptionsFinished>;
|
|
537
|
+
ceremony: StepHelper<PasswordLoginCUICeremonyStart, PasskeyLoginCeremonyFinished, PasswordLoginCUITypedError>;
|
|
538
|
+
postResponse: StepHelper;
|
|
539
|
+
};
|
|
498
540
|
private lowEventTracker?;
|
|
499
541
|
constructor(tracker: CorbadoTracker, autoTrackConfig?: PasswordLoginAutoTrackConfig);
|
|
500
542
|
/**
|
|
@@ -559,6 +601,7 @@ declare class OperationFullProvideIdentifierWithCUI {
|
|
|
559
601
|
* in the next major version.
|
|
560
602
|
*/
|
|
561
603
|
trigger: (data: SubflowTrigger, options?: StepOptions) => void;
|
|
604
|
+
clientValidation: StepHelper;
|
|
562
605
|
postResponse: StepHelper<ProvideIdentifierPostResponseStart>;
|
|
563
606
|
};
|
|
564
607
|
constructor(tracker: CorbadoTracker, inputHtmlField?: HTMLInputElement);
|
|
@@ -605,6 +648,8 @@ interface TrackerOptions {
|
|
|
605
648
|
* It will be removed in a future release.
|
|
606
649
|
*/
|
|
607
650
|
flushInterval?: number;
|
|
651
|
+
/** Generates new Observe session ids; returned values must be UUID-compatible. Existing stored sessions are still reused. */
|
|
652
|
+
sessionIdGenerator?: () => string;
|
|
608
653
|
}
|
|
609
654
|
declare class CorbadoTracker {
|
|
610
655
|
private options;
|
|
@@ -676,6 +721,7 @@ declare class CorbadoTracker {
|
|
|
676
721
|
*/
|
|
677
722
|
private resolveExperiments;
|
|
678
723
|
private isTrackingBlocked;
|
|
724
|
+
private createSessionId;
|
|
679
725
|
private getSessionId;
|
|
680
726
|
/**
|
|
681
727
|
* Resolve the session id from localStorage so it survives reloads and is shared across tabs of the
|
|
@@ -842,6 +888,8 @@ declare class CorbadoTracker {
|
|
|
842
888
|
*
|
|
843
889
|
* @param data - Decision identifier, offered options, and optional transition reason.
|
|
844
890
|
* @param tags - Optional key-value tags for filtering and segmentation.
|
|
891
|
+
* @param experiments - Optional per-call experiment assignments.
|
|
892
|
+
* @param options - Optional explicit event timestamp.
|
|
845
893
|
*
|
|
846
894
|
* @example
|
|
847
895
|
* ```typescript
|
|
@@ -851,7 +899,7 @@ declare class CorbadoTracker {
|
|
|
851
899
|
* });
|
|
852
900
|
* ```
|
|
853
901
|
*/
|
|
854
|
-
authMethodsDecisionStarted(data: AuthMethodDecisionStarted, tags?: Record<string, string>, experiments?: Record<string, string>): void;
|
|
902
|
+
authMethodsDecisionStarted(data: AuthMethodDecisionStarted, tags?: Record<string, string>, experiments?: Record<string, string>, options?: Pick<StepOptions, "explicitTimestamp">): void;
|
|
855
903
|
authMethodsDecisionFinished(data: AuthMethodDecisionFinished, tags?: Record<string, string>, experiments?: Record<string, string>): void;
|
|
856
904
|
authDecisionStarted(data: AuthDecisionStarted, tags?: Record<string, string>, experiments?: Record<string, string>): void;
|
|
857
905
|
authDecisionFinished(data: AuthDecisionFinished, tags?: Record<string, string>, experiments?: Record<string, string>): void;
|
|
@@ -886,6 +934,7 @@ declare class CorbadoTracker {
|
|
|
886
934
|
passwordEnrollmentFullOperation(autoTrackConfig?: PasswordEnrollmentAutoTrackConfig): PasswordEnrollmentOperationFull;
|
|
887
935
|
emailLinkOperationFull(): EmailLinkOperationFull;
|
|
888
936
|
emailOtpOperationFull(): EmailOtpOperationFull;
|
|
937
|
+
smsOtpOperationFull(): SmsOtpOperationFull;
|
|
889
938
|
provideIdentifierOperationFull(inputHtmlField?: HTMLInputElement): OperationFullProvideIdentifierWithCUI;
|
|
890
939
|
socialLoginOperationFull(): SocialLoginOperationFull;
|
|
891
940
|
/**
|
|
@@ -1303,4 +1352,4 @@ declare function clearExperiments(): void;
|
|
|
1303
1352
|
declare function getExperiments(): Record<string, string>;
|
|
1304
1353
|
declare function destroy(): Promise<void>;
|
|
1305
1354
|
|
|
1306
|
-
export { 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 ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, 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 JavaScriptHighEntropy, LocalStorage, type Logger, type LowEvent, type MultiFlowReset, type MultiFlowStarted, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, OperationFull, OperationFullProvideIdentifierWithCUI, type OutboxEntry, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, PasskeyEnrollmentOperationFull, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, PasskeyLoginOperationFull, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentAutoTrackConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginAutoTrackConfig, PasswordLoginOperationFull, type PasswordLoginTypedError, type PredefinedEvent, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkRetryConfig, SessionStorage, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type StepHelper, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type UserReference, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, getExperiments, getTracker, init, loadCachedConfig, parseReliabilityConfig, resetSession, setExperiment, setExperiments };
|
|
1355
|
+
export { 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 ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, 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 JavaScriptHighEntropy, LocalStorage, type Logger, type LowEvent, type MultiFlowReset, type MultiFlowStarted, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, OperationFull, OperationFullProvideIdentifierWithCUI, type OutboxEntry, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, PasskeyEnrollmentOperationFull, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, PasskeyLoginOperationFull, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentAutoTrackConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginAutoTrackConfig, type PasswordLoginCUICeremonyStart, type PasswordLoginCUIGetOptionsFinished, type PasswordLoginCUIGetOptionsStart, type PasswordLoginCUISpecType, type PasswordLoginCUITypedError, PasswordLoginOperationFull, type PasswordLoginTypedError, type PredefinedEvent, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkRetryConfig, SessionStorage, type SmsOTPOperationPostResponseStart, type SmsOTPOperationSpecType, SmsOtpOperationFull, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type StepHelper, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type UserReference, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, getExperiments, getTracker, init, loadCachedConfig, parseReliabilityConfig, resetSession, setExperiment, setExperiments };
|
package/dist/index.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ type Conversion = {
|
|
|
85
85
|
} & UserReference;
|
|
86
86
|
type FlowFinished = {
|
|
87
87
|
flowName: FlowType;
|
|
88
|
-
explicitOutcome?: "skipped" | "
|
|
88
|
+
explicitOutcome?: "skipped" | "visible-auto-skip" | "invisble";
|
|
89
89
|
} & UserReference;
|
|
90
90
|
type FlowReset = {
|
|
91
91
|
flowName?: FlowType;
|
|
@@ -374,7 +374,7 @@ declare abstract class OperationFull {
|
|
|
374
374
|
subflowStart(data: any, options?: StepOptions): void;
|
|
375
375
|
trigger(data: SubflowTrigger, options?: StepOptions): void;
|
|
376
376
|
customStep<TStart = {}, TFinished = {}>(stepName: string): StepHelper<TStart, TFinished>;
|
|
377
|
-
protected subflowStepStarted(stepName: string, data: any, options?: StepOptions): void;
|
|
377
|
+
protected subflowStepStarted(stepName: string, data: any, options?: StepOptions, ignoreAsInteraction?: boolean): void;
|
|
378
378
|
protected subflowStepFinished(stepName: string, data: any, options?: StepOptions): void;
|
|
379
379
|
protected subflowStepError(stepName: string, data: any, options?: StepOptions): void;
|
|
380
380
|
/**
|
|
@@ -384,7 +384,7 @@ declare abstract class OperationFull {
|
|
|
384
384
|
* tracker armed.
|
|
385
385
|
*/
|
|
386
386
|
protected withWindowLowEvents<S extends StepHelper<never, never, never>>(step: S, windowTracker: LowEventWindowTracker): S;
|
|
387
|
-
protected defineStep<TStart = {}, TFinished = {}, TTypedError = never>(stepName: string): StepHelper<TStart, TFinished, TTypedError>;
|
|
387
|
+
protected defineStep<TStart = {}, TFinished = {}, TTypedError = never>(stepName: string, ignoreAsInteractionOnStart?: boolean): StepHelper<TStart, TFinished, TTypedError>;
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
type PasskeyOperationLoginExplicitSpecType = "passkey-cui" | "passkey-known-identifier" | "passkey-no-identifier"
|
|
@@ -436,6 +436,16 @@ declare class EmailOtpOperationFull extends OperationFull {
|
|
|
436
436
|
constructor(tracker: CorbadoTracker);
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
+
type SmsOTPOperationSpecType = "sms-otp-login" | "sms-otp-enrollment";
|
|
440
|
+
type SmsOTPOperationPostResponseStart = {
|
|
441
|
+
explicitSpecType?: SmsOTPOperationSpecType;
|
|
442
|
+
};
|
|
443
|
+
declare class SmsOtpOperationFull extends OperationFull {
|
|
444
|
+
readonly postResponse: StepHelper<SmsOTPOperationPostResponseStart>;
|
|
445
|
+
readonly resend: StepHelper;
|
|
446
|
+
constructor(tracker: CorbadoTracker);
|
|
447
|
+
}
|
|
448
|
+
|
|
439
449
|
type EmailLinkOperationSpecType = "email-link-login" | "email-link-enrollment";
|
|
440
450
|
type EmailLinkOperationSendStart = {
|
|
441
451
|
explicitSpecType?: EmailLinkOperationSpecType;
|
|
@@ -479,6 +489,27 @@ type PasswordLoginTypedError = {
|
|
|
479
489
|
code: PasswordLoginTypedErrorCode;
|
|
480
490
|
};
|
|
481
491
|
type PasswordLoginTypedErrorCode = "invalid_password" | "user_not_found" | "account_locked";
|
|
492
|
+
/**
|
|
493
|
+
* Conditional-UI (CUI) passkey login hosted on the password-login subflow. Mirrors the CUI step
|
|
494
|
+
* family of `OperationFullProvideIdentifierWithCUI`, but the steps are emitted under
|
|
495
|
+
* `subflow_type = "password-login"` — for login screens whose only pre-passkey surface is a
|
|
496
|
+
* combined identifier + password form (no standalone provide-identifier step).
|
|
497
|
+
*/
|
|
498
|
+
type PasswordLoginCUISpecType = "passkey-cui";
|
|
499
|
+
type PasswordLoginCUITypedError = {
|
|
500
|
+
code: PasswordLoginCUITypedErrorCode;
|
|
501
|
+
};
|
|
502
|
+
type PasswordLoginCUITypedErrorCode = "cancel_detected";
|
|
503
|
+
type PasswordLoginCUIGetOptionsStart = {
|
|
504
|
+
explicitSpecType?: PasswordLoginCUISpecType;
|
|
505
|
+
};
|
|
506
|
+
type PasswordLoginCUIGetOptionsFinished = {
|
|
507
|
+
explicitSpecType?: PasswordLoginCUISpecType;
|
|
508
|
+
assertionOptions: string;
|
|
509
|
+
};
|
|
510
|
+
type PasswordLoginCUICeremonyStart = {
|
|
511
|
+
explicitSpecType?: PasswordLoginCUISpecType;
|
|
512
|
+
};
|
|
482
513
|
type PasswordLoginAutoTrackConfig = {
|
|
483
514
|
explicitSpecType: "password-known-identifier";
|
|
484
515
|
/** The password input field. */
|
|
@@ -494,7 +525,18 @@ type PasswordLoginAutoTrackConfig = {
|
|
|
494
525
|
identifierInputHtmlField?: HTMLInputElement;
|
|
495
526
|
};
|
|
496
527
|
declare class PasswordLoginOperationFull extends OperationFull {
|
|
528
|
+
readonly clientValidation: StepHelper;
|
|
497
529
|
readonly postResponse: StepHelper<{}, {}, PasswordLoginTypedError>;
|
|
530
|
+
/**
|
|
531
|
+
* Conditional-UI passkey ceremony that runs while the password form is mounted. The three steps
|
|
532
|
+
* are emitted under the same `password-login` subflow so a CUI passkey login on this screen is
|
|
533
|
+
* attributed to password-login rather than a separate subflow.
|
|
534
|
+
*/
|
|
535
|
+
readonly cui: {
|
|
536
|
+
getOptions: StepHelper<PasswordLoginCUIGetOptionsStart, PasswordLoginCUIGetOptionsFinished>;
|
|
537
|
+
ceremony: StepHelper<PasswordLoginCUICeremonyStart, PasskeyLoginCeremonyFinished, PasswordLoginCUITypedError>;
|
|
538
|
+
postResponse: StepHelper;
|
|
539
|
+
};
|
|
498
540
|
private lowEventTracker?;
|
|
499
541
|
constructor(tracker: CorbadoTracker, autoTrackConfig?: PasswordLoginAutoTrackConfig);
|
|
500
542
|
/**
|
|
@@ -559,6 +601,7 @@ declare class OperationFullProvideIdentifierWithCUI {
|
|
|
559
601
|
* in the next major version.
|
|
560
602
|
*/
|
|
561
603
|
trigger: (data: SubflowTrigger, options?: StepOptions) => void;
|
|
604
|
+
clientValidation: StepHelper;
|
|
562
605
|
postResponse: StepHelper<ProvideIdentifierPostResponseStart>;
|
|
563
606
|
};
|
|
564
607
|
constructor(tracker: CorbadoTracker, inputHtmlField?: HTMLInputElement);
|
|
@@ -605,6 +648,8 @@ interface TrackerOptions {
|
|
|
605
648
|
* It will be removed in a future release.
|
|
606
649
|
*/
|
|
607
650
|
flushInterval?: number;
|
|
651
|
+
/** Generates new Observe session ids; returned values must be UUID-compatible. Existing stored sessions are still reused. */
|
|
652
|
+
sessionIdGenerator?: () => string;
|
|
608
653
|
}
|
|
609
654
|
declare class CorbadoTracker {
|
|
610
655
|
private options;
|
|
@@ -676,6 +721,7 @@ declare class CorbadoTracker {
|
|
|
676
721
|
*/
|
|
677
722
|
private resolveExperiments;
|
|
678
723
|
private isTrackingBlocked;
|
|
724
|
+
private createSessionId;
|
|
679
725
|
private getSessionId;
|
|
680
726
|
/**
|
|
681
727
|
* Resolve the session id from localStorage so it survives reloads and is shared across tabs of the
|
|
@@ -842,6 +888,8 @@ declare class CorbadoTracker {
|
|
|
842
888
|
*
|
|
843
889
|
* @param data - Decision identifier, offered options, and optional transition reason.
|
|
844
890
|
* @param tags - Optional key-value tags for filtering and segmentation.
|
|
891
|
+
* @param experiments - Optional per-call experiment assignments.
|
|
892
|
+
* @param options - Optional explicit event timestamp.
|
|
845
893
|
*
|
|
846
894
|
* @example
|
|
847
895
|
* ```typescript
|
|
@@ -851,7 +899,7 @@ declare class CorbadoTracker {
|
|
|
851
899
|
* });
|
|
852
900
|
* ```
|
|
853
901
|
*/
|
|
854
|
-
authMethodsDecisionStarted(data: AuthMethodDecisionStarted, tags?: Record<string, string>, experiments?: Record<string, string>): void;
|
|
902
|
+
authMethodsDecisionStarted(data: AuthMethodDecisionStarted, tags?: Record<string, string>, experiments?: Record<string, string>, options?: Pick<StepOptions, "explicitTimestamp">): void;
|
|
855
903
|
authMethodsDecisionFinished(data: AuthMethodDecisionFinished, tags?: Record<string, string>, experiments?: Record<string, string>): void;
|
|
856
904
|
authDecisionStarted(data: AuthDecisionStarted, tags?: Record<string, string>, experiments?: Record<string, string>): void;
|
|
857
905
|
authDecisionFinished(data: AuthDecisionFinished, tags?: Record<string, string>, experiments?: Record<string, string>): void;
|
|
@@ -886,6 +934,7 @@ declare class CorbadoTracker {
|
|
|
886
934
|
passwordEnrollmentFullOperation(autoTrackConfig?: PasswordEnrollmentAutoTrackConfig): PasswordEnrollmentOperationFull;
|
|
887
935
|
emailLinkOperationFull(): EmailLinkOperationFull;
|
|
888
936
|
emailOtpOperationFull(): EmailOtpOperationFull;
|
|
937
|
+
smsOtpOperationFull(): SmsOtpOperationFull;
|
|
889
938
|
provideIdentifierOperationFull(inputHtmlField?: HTMLInputElement): OperationFullProvideIdentifierWithCUI;
|
|
890
939
|
socialLoginOperationFull(): SocialLoginOperationFull;
|
|
891
940
|
/**
|
|
@@ -1303,4 +1352,4 @@ declare function clearExperiments(): void;
|
|
|
1303
1352
|
declare function getExperiments(): Record<string, string>;
|
|
1304
1353
|
declare function destroy(): Promise<void>;
|
|
1305
1354
|
|
|
1306
|
-
export { 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 ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, 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 JavaScriptHighEntropy, LocalStorage, type Logger, type LowEvent, type MultiFlowReset, type MultiFlowStarted, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, OperationFull, OperationFullProvideIdentifierWithCUI, type OutboxEntry, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, PasskeyEnrollmentOperationFull, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, PasskeyLoginOperationFull, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentAutoTrackConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginAutoTrackConfig, PasswordLoginOperationFull, type PasswordLoginTypedError, type PredefinedEvent, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkRetryConfig, SessionStorage, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type StepHelper, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type UserReference, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, getExperiments, getTracker, init, loadCachedConfig, parseReliabilityConfig, resetSession, setExperiment, setExperiments };
|
|
1355
|
+
export { 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 ClientCapabilities, type ClientEnvHandleMeta, type ClientEnvHandleMetaSource, type Conversion, CookieStorage, CorbadoTracker, type CreateLoggerOptions, type CustomEvent, DEFAULT_FLUSH_INTERVAL_MS, DEFAULT_MAX_ENTRIES, DEFAULT_MAX_SERIALIZED_LENGTH, DEFAULT_RELIABILITY_CONFIG, DEFAULT_SESSION_INACTIVITY_MS, type DeviceInfo, type DeviceInfoCollectionError, type DeviceInfoDataWeb, type DeviceType, EmailLinkOperationFull, type EmailLinkOperationPostResponseStart, type EmailLinkOperationSendStart, type EmailLinkOperationSpecType, 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 JavaScriptHighEntropy, LocalStorage, type Logger, type LowEvent, type MultiFlowReset, type MultiFlowStarted, type NormalizedError, OUTBOX_LOCK_NAME, OUTBOX_STORAGE_KEY, OperationFull, OperationFullProvideIdentifierWithCUI, type OutboxEntry, type PasskeyEnrollmentCeremonyFinished, type PasskeyEnrollmentCeremonyStart, type PasskeyEnrollmentGetOptionsFinished, type PasskeyEnrollmentGetOptionsStart, PasskeyEnrollmentOperationFull, type PasskeyLoginCUIGetOptionsFinished, type PasskeyLoginCUIGetOptionsStart, type PasskeyLoginCUISpecType, type PasskeyLoginCeremonyFinished, type PasskeyLoginCeremonyStart, type PasskeyLoginClientError, type PasskeyLoginFinish, type PasskeyLoginGetOptionsFinished, type PasskeyLoginGetOptionsStart, PasskeyLoginOperationFull, type PasskeyLoginStartable, type PasskeyLoginSubmitted, type PasskeyOperationEnrollmentExplicitSpecType, type PasskeyOperationLoginExplicitSpecType, type PasswordEnrollmentAutoTrackConfig, PasswordEnrollmentOperationFull, type PasswordEnrollmentTypedError, type PasswordLoginAutoTrackConfig, type PasswordLoginCUICeremonyStart, type PasswordLoginCUIGetOptionsFinished, type PasswordLoginCUIGetOptionsStart, type PasswordLoginCUISpecType, type PasswordLoginCUITypedError, PasswordLoginOperationFull, type PasswordLoginTypedError, type PredefinedEvent, type ProvideIdentifierError, type ProvideIdentifierFinish, type ProvideIdentifierPostResponseStart, type ProvideIdentifierSpecType, type ProvideIdentifierStart, type QueueOptions, RequestQueue, SDK_NAME, SDK_VERSION, type SdkInfo, type SdkReliabilityConfig, type SdkRetryConfig, SessionStorage, type SmsOTPOperationPostResponseStart, type SmsOTPOperationSpecType, SmsOtpOperationFull, type SocialLoginExchangeCodeFinished, type SocialLoginExchangeCodeStart, type SocialLoginGetRedirectUrlFinished, type SocialLoginGetRedirectUrlStart, SocialLoginOperationFull, type SocialLoginProviderType, type SocialLoginSpecType, type StepHelper, type StepOptions, type StorageEngine, type SubflowTrigger, type SubflowType, type TrackerOptions, type Transport, type TransportMakeRequestResponse, type TransportOptions, type UserReference, cacheConfig, clearExperiment, clearExperiments, createLogger, destroy, getExperiments, getTracker, init, loadCachedConfig, parseReliabilityConfig, resetSession, setExperiment, setExperiments };
|