@incodetech/core 0.0.0-dev-20260428-bb133cd → 0.0.0-dev-20260428-b98ce65

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/index.esm.js CHANGED
@@ -1,9 +1,9 @@
1
- import { a as setup, n as isConfigured, r as reset } from "./setup-C-yXR1rb.esm.js";
1
+ import { a as setup, n as isConfigured, r as reset } from "./setup-BrSU6pl_.esm.js";
2
2
  import "./BaseWasmProvider-DJVllLC1.esm.js";
3
3
  import "./WasmUtilProvider-C1QSkwNV.esm.js";
4
4
  import "./api-BSXEhIP9.esm.js";
5
5
  import "./events-CMA7Inmi.esm.js";
6
- import "./session-CVnn78wp.esm.js";
6
+ import "./session-C7H4cHVe.esm.js";
7
7
  import "./IpifyProvider-VUtQbLEw.esm.js";
8
8
  import "./browserSimulation-DkgWRpm9.esm.js";
9
9
 
@@ -3,7 +3,7 @@ import "./Actor-BW-sqJw1.js";
3
3
  import "./camera-8mZXnNHU.js";
4
4
  import "./types-ClH8UoEK.js";
5
5
  import { a as RegulationTypes } from "./types-CqgOGNlq.js";
6
- import * as xstate1090 from "xstate";
6
+ import * as xstate325 from "xstate";
7
7
 
8
8
  //#region src/modules/mandatory-consent/types.d.ts
9
9
  type MandatoryConsentConfig = {
@@ -30,7 +30,7 @@ type MandatoryConsentContext = {
30
30
  type MandatoryConsentInput = {
31
31
  config: MandatoryConsentConfig;
32
32
  };
33
- declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentContext, {
33
+ declare const mandatoryConsentMachine: xstate325.StateMachine<MandatoryConsentContext, {
34
34
  type: "LOAD";
35
35
  } | {
36
36
  type: "TOGGLE";
@@ -43,53 +43,53 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
43
43
  } | {
44
44
  type: "RESET";
45
45
  }, {
46
- [x: string]: xstate1090.ActorRefFromLogic<xstate1090.PromiseActorLogic<FetchMandatoryConsentResponse, {
46
+ [x: string]: xstate325.ActorRefFromLogic<xstate325.PromiseActorLogic<FetchMandatoryConsentResponse, {
47
47
  config: MandatoryConsentConfig;
48
- }, xstate1090.EventObject>> | xstate1090.ActorRefFromLogic<xstate1090.PromiseActorLogic<void, {
48
+ }, xstate325.EventObject>> | xstate325.ActorRefFromLogic<xstate325.PromiseActorLogic<void, {
49
49
  consentId: string;
50
50
  isSigned: boolean;
51
- }, xstate1090.EventObject>> | undefined;
52
- }, xstate1090.Values<{
51
+ }, xstate325.EventObject>> | undefined;
52
+ }, xstate325.Values<{
53
53
  fetchConsent: {
54
54
  src: "fetchConsent";
55
- logic: xstate1090.PromiseActorLogic<FetchMandatoryConsentResponse, {
55
+ logic: xstate325.PromiseActorLogic<FetchMandatoryConsentResponse, {
56
56
  config: MandatoryConsentConfig;
57
- }, xstate1090.EventObject>;
57
+ }, xstate325.EventObject>;
58
58
  id: string | undefined;
59
59
  };
60
60
  submitConsent: {
61
61
  src: "submitConsent";
62
- logic: xstate1090.PromiseActorLogic<void, {
62
+ logic: xstate325.PromiseActorLogic<void, {
63
63
  consentId: string;
64
64
  isSigned: boolean;
65
- }, xstate1090.EventObject>;
65
+ }, xstate325.EventObject>;
66
66
  id: string | undefined;
67
67
  };
68
- }>, xstate1090.Values<{
68
+ }>, xstate325.Values<{
69
69
  setConsent: {
70
70
  type: "setConsent";
71
- params: xstate1090.NonReducibleUnknown;
71
+ params: xstate325.NonReducibleUnknown;
72
+ };
73
+ toggleSigned: {
74
+ type: "toggleSigned";
75
+ params: xstate325.NonReducibleUnknown;
72
76
  };
73
77
  setError: {
74
78
  type: "setError";
75
- params: xstate1090.NonReducibleUnknown;
79
+ params: xstate325.NonReducibleUnknown;
76
80
  };
77
81
  clearError: {
78
82
  type: "clearError";
79
- params: xstate1090.NonReducibleUnknown;
83
+ params: xstate325.NonReducibleUnknown;
80
84
  };
81
85
  resetContext: {
82
86
  type: "resetContext";
83
- params: xstate1090.NonReducibleUnknown;
84
- };
85
- toggleSigned: {
86
- type: "toggleSigned";
87
- params: xstate1090.NonReducibleUnknown;
87
+ params: xstate325.NonReducibleUnknown;
88
88
  };
89
89
  }>, {
90
90
  type: "canSubmit";
91
91
  params: unknown;
92
- }, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput, xstate1090.NonReducibleUnknown, xstate1090.EventObject, xstate1090.MetaObject, {
92
+ }, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput, xstate325.NonReducibleUnknown, xstate325.EventObject, xstate325.MetaObject, {
93
93
  readonly id: "mandatoryConsent";
94
94
  readonly initial: "idle";
95
95
  readonly context: ({
@@ -98,70 +98,70 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
98
98
  spawn: {
99
99
  <TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
100
100
  src: "fetchConsent";
101
- logic: xstate1090.PromiseActorLogic<FetchMandatoryConsentResponse, {
101
+ logic: xstate325.PromiseActorLogic<FetchMandatoryConsentResponse, {
102
102
  config: MandatoryConsentConfig;
103
- }, xstate1090.EventObject>;
103
+ }, xstate325.EventObject>;
104
104
  id: string | undefined;
105
105
  } extends infer T ? T extends {
106
106
  src: "fetchConsent";
107
- logic: xstate1090.PromiseActorLogic<FetchMandatoryConsentResponse, {
107
+ logic: xstate325.PromiseActorLogic<FetchMandatoryConsentResponse, {
108
108
  config: MandatoryConsentConfig;
109
- }, xstate1090.EventObject>;
109
+ }, xstate325.EventObject>;
110
110
  id: string | undefined;
111
111
  } ? T extends {
112
112
  src: TSrc;
113
- } ? xstate1090.ConditionalRequired<[options?: ({
113
+ } ? xstate325.ConditionalRequired<[options?: ({
114
114
  id?: T["id"] | undefined;
115
115
  systemId?: string;
116
- input?: xstate1090.InputFrom<T["logic"]> | undefined;
116
+ input?: xstate325.InputFrom<T["logic"]> | undefined;
117
117
  syncSnapshot?: boolean;
118
- } & { [K in xstate1090.RequiredActorOptions<T>]: unknown }) | undefined], xstate1090.IsNotNever<xstate1090.RequiredActorOptions<T>>> : never : never : never) | ({
118
+ } & { [K in xstate325.RequiredActorOptions<T>]: unknown }) | undefined], xstate325.IsNotNever<xstate325.RequiredActorOptions<T>>> : never : never : never) | ({
119
119
  src: "submitConsent";
120
- logic: xstate1090.PromiseActorLogic<void, {
120
+ logic: xstate325.PromiseActorLogic<void, {
121
121
  consentId: string;
122
122
  isSigned: boolean;
123
- }, xstate1090.EventObject>;
123
+ }, xstate325.EventObject>;
124
124
  id: string | undefined;
125
125
  } extends infer T_1 ? T_1 extends {
126
126
  src: "submitConsent";
127
- logic: xstate1090.PromiseActorLogic<void, {
127
+ logic: xstate325.PromiseActorLogic<void, {
128
128
  consentId: string;
129
129
  isSigned: boolean;
130
- }, xstate1090.EventObject>;
130
+ }, xstate325.EventObject>;
131
131
  id: string | undefined;
132
132
  } ? T_1 extends {
133
133
  src: TSrc;
134
- } ? xstate1090.ConditionalRequired<[options?: ({
134
+ } ? xstate325.ConditionalRequired<[options?: ({
135
135
  id?: T_1["id"] | undefined;
136
136
  systemId?: string;
137
- input?: xstate1090.InputFrom<T_1["logic"]> | undefined;
137
+ input?: xstate325.InputFrom<T_1["logic"]> | undefined;
138
138
  syncSnapshot?: boolean;
139
- } & { [K_1 in xstate1090.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate1090.IsNotNever<xstate1090.RequiredActorOptions<T_1>>> : never : never : never)): xstate1090.ActorRefFromLogic<xstate1090.GetConcreteByKey<xstate1090.Values<{
139
+ } & { [K_1 in xstate325.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate325.IsNotNever<xstate325.RequiredActorOptions<T_1>>> : never : never : never)): xstate325.ActorRefFromLogic<xstate325.GetConcreteByKey<xstate325.Values<{
140
140
  fetchConsent: {
141
141
  src: "fetchConsent";
142
- logic: xstate1090.PromiseActorLogic<FetchMandatoryConsentResponse, {
142
+ logic: xstate325.PromiseActorLogic<FetchMandatoryConsentResponse, {
143
143
  config: MandatoryConsentConfig;
144
- }, xstate1090.EventObject>;
144
+ }, xstate325.EventObject>;
145
145
  id: string | undefined;
146
146
  };
147
147
  submitConsent: {
148
148
  src: "submitConsent";
149
- logic: xstate1090.PromiseActorLogic<void, {
149
+ logic: xstate325.PromiseActorLogic<void, {
150
150
  consentId: string;
151
151
  isSigned: boolean;
152
- }, xstate1090.EventObject>;
152
+ }, xstate325.EventObject>;
153
153
  id: string | undefined;
154
154
  };
155
155
  }>, "src", TSrc>["logic"]>;
156
- <TLogic extends xstate1090.AnyActorLogic>(src: TLogic, ...[options]: xstate1090.ConditionalRequired<[options?: ({
156
+ <TLogic extends xstate325.AnyActorLogic>(src: TLogic, ...[options]: xstate325.ConditionalRequired<[options?: ({
157
157
  id?: never;
158
158
  systemId?: string;
159
- input?: xstate1090.InputFrom<TLogic> | undefined;
159
+ input?: xstate325.InputFrom<TLogic> | undefined;
160
160
  syncSnapshot?: boolean;
161
- } & { [K in xstate1090.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate1090.IsNotNever<xstate1090.RequiredLogicInput<TLogic>>>): xstate1090.ActorRefFromLogic<TLogic>;
161
+ } & { [K in xstate325.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate325.IsNotNever<xstate325.RequiredLogicInput<TLogic>>>): xstate325.ActorRefFromLogic<TLogic>;
162
162
  };
163
163
  input: MandatoryConsentInput;
164
- self: xstate1090.ActorRef<xstate1090.MachineSnapshot<MandatoryConsentContext, {
164
+ self: xstate325.ActorRef<xstate325.MachineSnapshot<MandatoryConsentContext, {
165
165
  type: "LOAD";
166
166
  } | {
167
167
  type: "TOGGLE";
@@ -173,7 +173,7 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
173
173
  type: "RETRY";
174
174
  } | {
175
175
  type: "RESET";
176
- }, Record<string, xstate1090.AnyActorRef | undefined>, xstate1090.StateValue, string, unknown, any, any>, {
176
+ }, Record<string, xstate325.AnyActorRef | undefined>, xstate325.StateValue, string, unknown, any, any>, {
177
177
  type: "LOAD";
178
178
  } | {
179
179
  type: "TOGGLE";
@@ -185,7 +185,7 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
185
185
  type: "RETRY";
186
186
  } | {
187
187
  type: "RESET";
188
- }, xstate1090.AnyEventObject>;
188
+ }, xstate325.AnyEventObject>;
189
189
  }) => {
190
190
  config: MandatoryConsentConfig;
191
191
  consent: undefined;
@@ -222,7 +222,7 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
222
222
  } | {
223
223
  type: "RESET";
224
224
  };
225
- self: xstate1090.ActorRef<xstate1090.MachineSnapshot<MandatoryConsentContext, {
225
+ self: xstate325.ActorRef<xstate325.MachineSnapshot<MandatoryConsentContext, {
226
226
  type: "LOAD";
227
227
  } | {
228
228
  type: "TOGGLE";
@@ -234,7 +234,7 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
234
234
  type: "RETRY";
235
235
  } | {
236
236
  type: "RESET";
237
- }, Record<string, xstate1090.AnyActorRef>, xstate1090.StateValue, string, unknown, any, any>, {
237
+ }, Record<string, xstate325.AnyActorRef>, xstate325.StateValue, string, unknown, any, any>, {
238
238
  type: "LOAD";
239
239
  } | {
240
240
  type: "TOGGLE";
@@ -246,7 +246,7 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
246
246
  type: "RETRY";
247
247
  } | {
248
248
  type: "RESET";
249
- }, xstate1090.AnyEventObject>;
249
+ }, xstate325.AnyEventObject>;
250
250
  }) => {
251
251
  config: MandatoryConsentConfig;
252
252
  };
@@ -299,7 +299,7 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
299
299
  } | {
300
300
  type: "RESET";
301
301
  };
302
- self: xstate1090.ActorRef<xstate1090.MachineSnapshot<MandatoryConsentContext, {
302
+ self: xstate325.ActorRef<xstate325.MachineSnapshot<MandatoryConsentContext, {
303
303
  type: "LOAD";
304
304
  } | {
305
305
  type: "TOGGLE";
@@ -311,7 +311,7 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
311
311
  type: "RETRY";
312
312
  } | {
313
313
  type: "RESET";
314
- }, Record<string, xstate1090.AnyActorRef>, xstate1090.StateValue, string, unknown, any, any>, {
314
+ }, Record<string, xstate325.AnyActorRef>, xstate325.StateValue, string, unknown, any, any>, {
315
315
  type: "LOAD";
316
316
  } | {
317
317
  type: "TOGGLE";
@@ -323,7 +323,7 @@ declare const mandatoryConsentMachine: xstate1090.StateMachine<MandatoryConsentC
323
323
  type: "RETRY";
324
324
  } | {
325
325
  type: "RESET";
326
- }, xstate1090.AnyEventObject>;
326
+ }, xstate325.AnyEventObject>;
327
327
  }) => {
328
328
  consentId: string;
329
329
  isSigned: boolean;
@@ -1,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-uUcXOI3u.js";
2
2
  import "./Actor-BW-sqJw1.js";
3
- import { c as ConsentKey, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-B5cJ2B7C.js";
3
+ import { c as ConsentKey, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-DvosGSCu.js";
4
4
 
5
5
  //#region src/modules/qe-signature/index.d.ts
6
6
 
@@ -4,6 +4,16 @@ import { n as resetIpifyCache, r as BrowserEnvironmentProvider, t as IpifyProvid
4
4
  import { t as isBrowserSimulation } from "./browserSimulation-DkgWRpm9.esm.js";
5
5
 
6
6
  //#region src/internal/session/sessionService.ts
7
+ /**
8
+ * HTTP status codes the QR validation endpoint emits, keyed by their semantic
9
+ * name. Hosts switch on these to render distinct messaging — `invalidQRuuid`
10
+ * for an unknown/expired link, `onboardingUrlAlreadyUsed` for a one-time link
11
+ * that has already been consumed.
12
+ */
13
+ const QR_VALIDATION_ERROR_CODES = {
14
+ invalidQRuuid: 4081,
15
+ onboardingUrlAlreadyUsed: 4083
16
+ };
7
17
  var QrValidationError = class extends Error {
8
18
  constructor(status, statusText) {
9
19
  super(`POST ${endpoints.qrValidateUuid} failed: ${status} ${statusText}`);
@@ -73,6 +83,64 @@ async function validateQrUuid(options, signal) {
73
83
  if (!res.ok) throw new QrValidationError(res.status, res.statusText);
74
84
  return res.data;
75
85
  }
86
+ /**
87
+ * One-shot QR phishing-resistance helper.
88
+ *
89
+ * When `urlUuid` is a non-empty string, burns the stale value via
90
+ * `validateQrUuid`, invokes `onRefreshed` with the fresh value, and returns
91
+ * it so callers can forward it into `createSession`. When `urlUuid` is
92
+ * absent, returns `undefined` without making any network call.
93
+ *
94
+ * Consolidates the rotation + callback logic shared by Flow self-loading and
95
+ * Workflow token-mode bootstraps.
96
+ *
97
+ * @throws {QrValidationError} When the server rejects the validation request.
98
+ */
99
+ async function refreshQrUrlUuid(options, signal) {
100
+ if (typeof options.urlUuid !== "string" || options.urlUuid.length === 0) return;
101
+ const result = await validateQrUuid({
102
+ onboardingId: options.onboardingId ?? null,
103
+ urlUuid: options.urlUuid
104
+ }, signal);
105
+ options.onRefreshed?.(result.urlUuid);
106
+ return result.urlUuid;
107
+ }
108
+ /**
109
+ * Validates and rotates a QR anti-phishing `urlUuid` (when present), then
110
+ * creates a session bound to the refreshed value. When `urlUuid` is absent,
111
+ * behaves identically to {@link createSession}.
112
+ *
113
+ * Use this when the host owns session creation and wants the SDK to handle
114
+ * phishing-resistance rotation in a single call. For raw control, compose
115
+ * `refreshQrUrlUuid` and `createSession` directly.
116
+ *
117
+ * @throws {QrValidationError} When the server rejects the QR validation step.
118
+ *
119
+ * @example
120
+ * ```ts
121
+ * const session = await bootstrapSession(apiKey, {
122
+ * configurationId,
123
+ * urlUuid,
124
+ * onUrlUuidRefreshed: (refreshed) => {
125
+ * const url = new URL(window.location.href);
126
+ * url.searchParams.set('url_uuid', refreshed);
127
+ * window.history.replaceState({}, '', url);
128
+ * },
129
+ * });
130
+ * ```
131
+ */
132
+ async function bootstrapSession(apiKey, options, signal) {
133
+ const { onUrlUuidRefreshed, ...createSessionOptions } = options;
134
+ const refreshedUrlUuid = await refreshQrUrlUuid({
135
+ urlUuid: options.urlUuid,
136
+ onboardingId: options.uuid ?? null,
137
+ onRefreshed: onUrlUuidRefreshed
138
+ }, signal);
139
+ return createSession(apiKey, {
140
+ ...createSessionOptions,
141
+ urlUuid: refreshedUrlUuid
142
+ }, signal);
143
+ }
76
144
 
77
145
  //#endregion
78
146
  //#region ../../node_modules/.pnpm/ua-parser-js@2.0.9/node_modules/ua-parser-js/src/main/ua-parser.mjs
@@ -3119,4 +3187,4 @@ function resetSessionInit() {
3119
3187
  }
3120
3188
 
3121
3189
  //#endregion
3122
- export { FingerprintProvider as a, createSession as c, resetSessionInit as i, validateQrUuid as l, getSessionFingerprintResult as n, getDeviceFingerprintInfo as o, initializeSession as r, QrValidationError as s, getDisableIpify as t };
3190
+ export { FingerprintProvider as a, QrValidationError as c, refreshQrUrlUuid as d, validateQrUuid as f, resetSessionInit as i, bootstrapSession as l, getSessionFingerprintResult as n, getDeviceFingerprintInfo as o, initializeSession as r, QR_VALIDATION_ERROR_CODES as s, getDisableIpify as t, createSession as u };
package/dist/session.d.ts CHANGED
@@ -33,6 +33,30 @@ type ValidateQrUuidOptions = {
33
33
  type QrValidationResult = {
34
34
  urlUuid: string;
35
35
  };
36
+ /**
37
+ * HTTP status codes the QR validation endpoint emits, keyed by their semantic
38
+ * name. Hosts switch on these to render distinct messaging — `invalidQRuuid`
39
+ * for an unknown/expired link, `onboardingUrlAlreadyUsed` for a one-time link
40
+ * that has already been consumed.
41
+ */
42
+ declare const QR_VALIDATION_ERROR_CODES: {
43
+ readonly invalidQRuuid: 4081;
44
+ readonly onboardingUrlAlreadyUsed: 4083;
45
+ };
46
+ type QrValidationErrorCode = (typeof QR_VALIDATION_ERROR_CODES)[keyof typeof QR_VALIDATION_ERROR_CODES];
47
+ type RefreshQrUrlUuidOptions = {
48
+ /** QR anti-phishing token from the incoming URL. When empty/undefined, the call is a no-op. */
49
+ urlUuid?: string;
50
+ /** Onboarding session UUID, if known. Pass `null` or omit when the caller has no session yet. */
51
+ onboardingId?: string | null;
52
+ /** Invoked with the refreshed `urlUuid` once the server rotates it. */
53
+ onRefreshed?: (urlUuid: string) => void;
54
+ };
55
+ type BootstrapSessionOptions = CreateSessionOptions & {
56
+ /** Invoked with the rotated `urlUuid` after `validateQrUuid` succeeds. Hosts
57
+ * typically use this to update the address bar via `history.replaceState`. */
58
+ onUrlUuidRefreshed?: (urlUuid: string) => void;
59
+ };
36
60
  declare class QrValidationError extends Error {
37
61
  readonly status: number;
38
62
  readonly statusText: string;
@@ -70,5 +94,44 @@ declare function createSession(apiKey: string, options: CreateSessionOptions, si
70
94
  * @throws {QrValidationError} When the server rejects the validation request.
71
95
  */
72
96
  declare function validateQrUuid(options: ValidateQrUuidOptions, signal?: AbortSignal): Promise<QrValidationResult>;
97
+ /**
98
+ * One-shot QR phishing-resistance helper.
99
+ *
100
+ * When `urlUuid` is a non-empty string, burns the stale value via
101
+ * `validateQrUuid`, invokes `onRefreshed` with the fresh value, and returns
102
+ * it so callers can forward it into `createSession`. When `urlUuid` is
103
+ * absent, returns `undefined` without making any network call.
104
+ *
105
+ * Consolidates the rotation + callback logic shared by Flow self-loading and
106
+ * Workflow token-mode bootstraps.
107
+ *
108
+ * @throws {QrValidationError} When the server rejects the validation request.
109
+ */
110
+ declare function refreshQrUrlUuid(options: RefreshQrUrlUuidOptions, signal?: AbortSignal): Promise<string | undefined>;
111
+ /**
112
+ * Validates and rotates a QR anti-phishing `urlUuid` (when present), then
113
+ * creates a session bound to the refreshed value. When `urlUuid` is absent,
114
+ * behaves identically to {@link createSession}.
115
+ *
116
+ * Use this when the host owns session creation and wants the SDK to handle
117
+ * phishing-resistance rotation in a single call. For raw control, compose
118
+ * `refreshQrUrlUuid` and `createSession` directly.
119
+ *
120
+ * @throws {QrValidationError} When the server rejects the QR validation step.
121
+ *
122
+ * @example
123
+ * ```ts
124
+ * const session = await bootstrapSession(apiKey, {
125
+ * configurationId,
126
+ * urlUuid,
127
+ * onUrlUuidRefreshed: (refreshed) => {
128
+ * const url = new URL(window.location.href);
129
+ * url.searchParams.set('url_uuid', refreshed);
130
+ * window.history.replaceState({}, '', url);
131
+ * },
132
+ * });
133
+ * ```
134
+ */
135
+ declare function bootstrapSession(apiKey: string, options: BootstrapSessionOptions, signal?: AbortSignal): Promise<Session>;
73
136
  //#endregion
74
- export { type CreateSessionOptions, type FinishStatus, type GetFinishStatusFn, QrValidationError, type QrValidationResult, type Session, type ValidateQrUuidOptions, createSession, getFinishStatus, validateQrUuid };
137
+ export { type BootstrapSessionOptions, type CreateSessionOptions, type FinishStatus, type GetFinishStatusFn, QR_VALIDATION_ERROR_CODES, QrValidationError, type QrValidationErrorCode, type QrValidationResult, type RefreshQrUrlUuidOptions, type Session, type ValidateQrUuidOptions, bootstrapSession, createSession, getFinishStatus, refreshQrUrlUuid, validateQrUuid };
@@ -1,8 +1,8 @@
1
1
  import "./api-BSXEhIP9.esm.js";
2
2
  import "./events-CMA7Inmi.esm.js";
3
- import { c as createSession, l as validateQrUuid, s as QrValidationError } from "./session-CVnn78wp.esm.js";
3
+ import { c as QrValidationError, d as refreshQrUrlUuid, f as validateQrUuid, l as bootstrapSession, s as QR_VALIDATION_ERROR_CODES, u as createSession } from "./session-C7H4cHVe.esm.js";
4
4
  import "./IpifyProvider-VUtQbLEw.esm.js";
5
5
  import "./browserSimulation-DkgWRpm9.esm.js";
6
6
  import { t as getFinishStatus } from "./flowCompletionService-35cyRGQ2.esm.js";
7
7
 
8
- export { QrValidationError, createSession, getFinishStatus, validateQrUuid };
8
+ export { QR_VALIDATION_ERROR_CODES, QrValidationError, bootstrapSession, createSession, getFinishStatus, refreshQrUrlUuid, validateQrUuid };
@@ -2,7 +2,7 @@ import { n as warmupWasm } from "./BaseWasmProvider-DJVllLC1.esm.js";
2
2
  import { t as WasmUtilProvider } from "./WasmUtilProvider-C1QSkwNV.esm.js";
3
3
  import { a as resetApi, i as isApiConfigured, o as setClient, s as setToken } from "./api-BSXEhIP9.esm.js";
4
4
  import { h as flushEventQueue } from "./events-CMA7Inmi.esm.js";
5
- import { i as resetSessionInit, r as initializeSession } from "./session-CVnn78wp.esm.js";
5
+ import { i as resetSessionInit, r as initializeSession } from "./session-C7H4cHVe.esm.js";
6
6
 
7
7
  //#region ../infra/src/http/createApi.ts
8
8
  var FetchHttpError = class extends Error {
package/dist/wasm.esm.js CHANGED
@@ -1,9 +1,9 @@
1
- import { c as resolveWasmConfig, i as setWasmConfig, o as DEFAULT_WASM_VERSION, s as buildDefaultWasmConfig, t as initializeWasmUtil } from "./setup-C-yXR1rb.esm.js";
1
+ import { c as resolveWasmConfig, i as setWasmConfig, o as DEFAULT_WASM_VERSION, s as buildDefaultWasmConfig, t as initializeWasmUtil } from "./setup-BrSU6pl_.esm.js";
2
2
  import { n as warmupWasm } from "./BaseWasmProvider-DJVllLC1.esm.js";
3
3
  import "./WasmUtilProvider-C1QSkwNV.esm.js";
4
4
  import "./api-BSXEhIP9.esm.js";
5
5
  import "./events-CMA7Inmi.esm.js";
6
- import "./session-CVnn78wp.esm.js";
6
+ import "./session-C7H4cHVe.esm.js";
7
7
  import "./IpifyProvider-VUtQbLEw.esm.js";
8
8
  import "./browserSimulation-DkgWRpm9.esm.js";
9
9