@mopay/node-sdk 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -77,6 +77,8 @@ MoPayCheckout.open({
77
77
  width: 520,
78
78
  height: 760,
79
79
  resizable: true,
80
+ closeOnRedirect: true,
81
+ redirectAfterClose: true,
80
82
  onSuccess: () => {
81
83
  // UI feedback only. Do not deliver value here.
82
84
  },
@@ -100,6 +102,129 @@ The SDK only accepts `postMessage` events from the checkout URL origin, and only
100
102
 
101
103
  If your checkout iframe can redirect back to a merchant-owned completion page, pass that exact origin in `allowedOrigins`. The checkout URL origin is always trusted automatically.
102
104
 
105
+ ### Closing Checkout After Redirect
106
+
107
+ The SDK cannot inspect or interrupt a cross-origin iframe while it is still on MoPay, 3DS, or a bank page. The standard pattern is to make your `redirectUrl` a small merchant-owned bridge page. Once the iframe or popup reaches that page, the bridge page notifies the parent SDK, then the SDK can close the dialog or popup and optionally redirect the main merchant page.
108
+
109
+ Merchant page:
110
+
111
+ ```js
112
+ MoPayCheckout.open({
113
+ checkoutUrl: session.checkoutUrl,
114
+ allowedOrigins: [window.location.origin],
115
+ closeOnRedirect: true,
116
+ redirectAfterClose: true,
117
+ });
118
+ ```
119
+
120
+ Completion bridge page:
121
+
122
+ ```html
123
+ <script type="module">
124
+ import { MoPayCheckout } from "/sdk/index.js";
125
+
126
+ MoPayCheckout.completeRedirect({
127
+ redirectTo: `/payment-success${window.location.search}`,
128
+ });
129
+ </script>
130
+ ```
131
+
132
+ If `redirectAfterClose` is `true`, the SDK uses the `redirectTo` value from the bridge message. You can also pass a fixed URL string or a function:
133
+
134
+ ```js
135
+ MoPayCheckout.open({
136
+ checkoutUrl,
137
+ closeOnRedirect: true,
138
+ redirectAfterClose: (message) => `/orders/${message.reference}`,
139
+ });
140
+ ```
141
+
142
+ Use `closeOnRedirect: true` without `redirectAfterClose` if you want to close the iframe or popup but keep the main merchant page where it is.
143
+
144
+ ## Redirect URL Handling
145
+
146
+ Your `redirectUrl` belongs to your merchant application, not the browser SDK. Make the route accept both redirect shapes:
147
+
148
+ - `GET /payment-complete?status=success&sessionId=...`
149
+ - `POST /payment-complete` with `Content-Type: application/x-www-form-urlencoded`
150
+
151
+ Some checkout or 3DS flows return with a form POST, so a GET-only route can show a broken iframe or browser error even when the payment completed.
152
+
153
+ Express example:
154
+
155
+ ```ts
156
+ import express from "express";
157
+ import { MoPay, parseRedirect } from "@mopay/node-sdk";
158
+
159
+ const app = express();
160
+ const mopay = new MoPay({ apiKey: process.env.MOPAY_API_KEY! });
161
+
162
+ app.use(express.urlencoded({ extended: false }));
163
+
164
+ app.all("/payment-complete", async (req, res) => {
165
+ const params = new URLSearchParams();
166
+
167
+ for (const [key, value] of Object.entries(req.query)) {
168
+ if (value !== undefined) params.set(key, String(value));
169
+ }
170
+
171
+ if (req.body && typeof req.body === "object") {
172
+ for (const [key, value] of Object.entries(req.body)) {
173
+ if (value !== undefined) params.set(key, String(value));
174
+ }
175
+ }
176
+
177
+ const redirect = parseRedirect(params);
178
+ const verified = await mopay.getTransaction(redirect.sessionId);
179
+
180
+ if (mopay.isSuccessful(verified)) {
181
+ // Mark the order paid. Do not rely only on the redirect parameters.
182
+ }
183
+
184
+ res.redirect(303, `/payment-complete?${params.toString()}`);
185
+ });
186
+ ```
187
+
188
+ Next.js App Router example:
189
+
190
+ ```ts
191
+ import { NextResponse } from "next/server";
192
+ import { MoPay, parseRedirect } from "@mopay/node-sdk";
193
+
194
+ const mopay = new MoPay({ apiKey: process.env.MOPAY_API_KEY! });
195
+
196
+ export async function GET(request: Request) {
197
+ return handleRedirect(request);
198
+ }
199
+
200
+ export async function POST(request: Request) {
201
+ return handleRedirect(request);
202
+ }
203
+
204
+ async function handleRedirect(request: Request) {
205
+ const url = new URL(request.url);
206
+ const params = new URLSearchParams(url.searchParams);
207
+
208
+ if (request.method === "POST") {
209
+ const body = await request.formData();
210
+ for (const [key, value] of body.entries()) {
211
+ params.set(key, String(value));
212
+ }
213
+ }
214
+
215
+ const redirect = parseRedirect(params);
216
+ const verified = await mopay.getTransaction(redirect.sessionId);
217
+
218
+ if (mopay.isSuccessful(verified)) {
219
+ // Mark the order paid. Do not deliver value from frontend callbacks alone.
220
+ }
221
+
222
+ return NextResponse.redirect(new URL(`/payment-complete?${params.toString()}`, url), 303);
223
+ }
224
+ ```
225
+
226
+ For iframe checkout, your completion page can call `MoPayCheckout.completeRedirect(...)` or `window.parent.postMessage(...)` so the checkout dialog updates the merchant UI. Treat that message as UI feedback only; fulfilment should still depend on webhooks or `mopay.getTransaction(sessionId)`.
227
+
103
228
  ## Verify A Redirect
104
229
 
105
230
  Redirect parameters are useful for routing your user, but they should not be treated as the final source of truth. Always verify with MoPay from your backend.
@@ -169,6 +294,12 @@ Opens the hosted checkout page in `popup`, `dialog`, or `redirect` mode.
169
294
 
170
295
  Accepts `checkoutUrl`, `checkout_url`, `checkoutToken`, or `checkout_token`. `checkoutUrl` is the same value as the documented `paymentUrl` returned by `createPaymentSession`.
171
296
 
297
+ Set `closeOnRedirect: true` to close the dialog or popup when a trusted merchant completion page sends a `mopay.checkout.redirect`, `mopay.checkout.close`, or terminal status message. Set `redirectAfterClose` to `true`, a URL string, a `URL`, or a function if the main merchant page should navigate after the checkout frame closes.
298
+
299
+ ### `MoPayCheckout.completeRedirect(options)`
300
+
301
+ Browser helper for the merchant-owned completion page. It reads MoPay redirect query parameters from `window.location.search`, posts a `mopay.checkout.redirect` message to `window.parent` and `window.opener`, and returns the posted message.
302
+
172
303
  ### `mopay.checkout(params, options)`
173
304
 
174
305
  Convenience method that creates a session and opens the checkout dialog. Use this only from a trusted environment because it requires the secret API key.
@@ -1,6 +1,8 @@
1
- import type { CheckoutHandle, CheckoutOptions, MoPayCheckoutOpenOptions } from "./types.js";
1
+ import type { CheckoutHandle, CheckoutMessage, CheckoutOptions, CheckoutRedirectCompleteOptions, MoPayCheckoutOpenOptions } from "./types.js";
2
2
  export declare function checkout(paymentUrl: string, options?: CheckoutOptions): CheckoutHandle;
3
3
  export declare class MoPayCheckout {
4
4
  static open(options: MoPayCheckoutOpenOptions): CheckoutHandle;
5
+ static completeRedirect(options?: CheckoutRedirectCompleteOptions): CheckoutMessage;
5
6
  }
7
+ export declare function completeRedirect(options?: CheckoutRedirectCompleteOptions): CheckoutMessage;
6
8
  //# sourceMappingURL=checkout.d.ts.map
package/dist/checkout.js CHANGED
@@ -32,6 +32,23 @@ export class MoPayCheckout {
32
32
  options.onOpen?.(handle);
33
33
  return handle;
34
34
  }
35
+ static completeRedirect(options = {}) {
36
+ return completeRedirect(options);
37
+ }
38
+ }
39
+ export function completeRedirect(options = {}) {
40
+ const message = buildRedirectMessage(options);
41
+ const targetOrigin = options.targetOrigin || window.location.origin;
42
+ if (window.parent && window.parent !== window) {
43
+ window.parent.postMessage(message, targetOrigin);
44
+ }
45
+ if (window.opener && !window.opener.closed) {
46
+ window.opener.postMessage(message, targetOrigin);
47
+ }
48
+ if (options.closeWindow) {
49
+ window.close();
50
+ }
51
+ return message;
35
52
  }
36
53
  function openPopup(paymentUrl, options, controller) {
37
54
  const width = options.width || DEFAULT_POPUP_WIDTH;
@@ -54,19 +71,31 @@ function openPopup(paymentUrl, options, controller) {
54
71
  throw new Error("MoPay checkout popup was blocked by the browser");
55
72
  }
56
73
  controller.setSource(popup);
74
+ let closed = false;
57
75
  const timer = window.setInterval(() => {
58
76
  if (popup.closed) {
59
- window.clearInterval(timer);
60
- controller.destroy();
61
- options.onClose?.();
77
+ finish(true);
62
78
  }
63
79
  }, 500);
80
+ const finish = (notify) => {
81
+ if (closed) {
82
+ return;
83
+ }
84
+ closed = true;
85
+ window.clearInterval(timer);
86
+ controller.destroy();
87
+ if (!popup.closed) {
88
+ popup.close();
89
+ }
90
+ if (notify) {
91
+ options.onClose?.();
92
+ }
93
+ };
94
+ controller.setCloseHandler(() => finish(true));
64
95
  return {
65
96
  mode: "popup",
66
97
  close: () => {
67
- window.clearInterval(timer);
68
- controller.destroy();
69
- popup.close();
98
+ finish(false);
70
99
  },
71
100
  };
72
101
  }
@@ -115,10 +144,16 @@ function openDialog(paymentUrl, options, controller) {
115
144
  options.onClose?.();
116
145
  }, { once: true });
117
146
  dialog.showModal();
118
- return {
147
+ const handle = {
119
148
  mode: "dialog",
120
- close: () => dialog.close(),
149
+ close: () => {
150
+ if (dialog.open) {
151
+ dialog.close();
152
+ }
153
+ },
121
154
  };
155
+ controller.setCloseHandler(handle.close);
156
+ return handle;
122
157
  }
123
158
  function injectDialogStyles() {
124
159
  if (document.getElementById(CHECKOUT_STYLE_ID)) {
@@ -267,6 +302,8 @@ class CheckoutMessageController {
267
302
  options;
268
303
  trustedOrigins;
269
304
  source = null;
305
+ closeHandler = null;
306
+ handledRedirect = false;
270
307
  constructor(options, trustedOrigins) {
271
308
  this.options = options;
272
309
  this.trustedOrigins = trustedOrigins;
@@ -275,6 +312,9 @@ class CheckoutMessageController {
275
312
  setSource(source) {
276
313
  this.source = source;
277
314
  }
315
+ setCloseHandler(closeHandler) {
316
+ this.closeHandler = closeHandler;
317
+ }
278
318
  destroy() {
279
319
  window.removeEventListener("message", this.handleMessage);
280
320
  }
@@ -304,6 +344,17 @@ class CheckoutMessageController {
304
344
  this.options.onPending?.(message);
305
345
  break;
306
346
  }
347
+ if (shouldCloseAfterRedirect(message, this.options) && !this.handledRedirect) {
348
+ this.handledRedirect = true;
349
+ const redirectTo = resolveRedirectAfterClose(message, this.options);
350
+ this.closeHandler?.();
351
+ if (redirectTo) {
352
+ window.setTimeout(() => {
353
+ const target = this.options.target || window;
354
+ target.location.href = redirectTo;
355
+ }, 0);
356
+ }
357
+ }
307
358
  };
308
359
  }
309
360
  function normalizeCheckoutMessage(data) {
@@ -325,10 +376,61 @@ function normalizeCheckoutMessage(data) {
325
376
  reference: asString(record.reference),
326
377
  amount: asString(record.amount),
327
378
  paymentMethod: asString(record.paymentMethod),
379
+ redirectTo: asString(record.redirectTo ?? record.redirectUrl ?? record.returnUrl),
328
380
  error: asString(record.error),
329
381
  raw: data,
330
382
  };
331
383
  }
384
+ function shouldCloseAfterRedirect(message, options) {
385
+ if (!options.closeOnRedirect && !options.redirectAfterClose) {
386
+ return false;
387
+ }
388
+ return isRedirectMessage(message) || isTerminalStatus(message.status);
389
+ }
390
+ function isRedirectMessage(message) {
391
+ return message.type === "mopay.checkout.redirect"
392
+ || message.type === "mopay.checkout.close"
393
+ || Boolean(message.redirectTo);
394
+ }
395
+ function isTerminalStatus(status) {
396
+ return status === "success" || status === "failed" || status === "cancelled";
397
+ }
398
+ function resolveRedirectAfterClose(message, options) {
399
+ const redirectAfterClose = options.redirectAfterClose;
400
+ if (!redirectAfterClose) {
401
+ return undefined;
402
+ }
403
+ if (redirectAfterClose === true) {
404
+ return message.redirectTo;
405
+ }
406
+ if (typeof redirectAfterClose === "string") {
407
+ return redirectAfterClose;
408
+ }
409
+ if (redirectAfterClose instanceof URL) {
410
+ return redirectAfterClose.href;
411
+ }
412
+ const resolved = redirectAfterClose(message);
413
+ if (!resolved) {
414
+ return undefined;
415
+ }
416
+ return resolved instanceof URL ? resolved.href : resolved;
417
+ }
418
+ function buildRedirectMessage(options) {
419
+ const params = new URLSearchParams(window.location.search);
420
+ const raw = Object.fromEntries(params.entries());
421
+ return {
422
+ type: options.type || "mopay.checkout.redirect",
423
+ status: normalizeStatus(asString(raw.status)),
424
+ sessionId: asString(raw.sessionId),
425
+ transactionId: asString(raw.transactionId),
426
+ reference: asString(raw.reference),
427
+ amount: asString(raw.amount),
428
+ paymentMethod: asString(raw.paymentMethod),
429
+ redirectTo: options.redirectTo ? String(options.redirectTo) : undefined,
430
+ error: asString(raw.error),
431
+ raw,
432
+ };
433
+ }
332
434
  function parseMessageData(data) {
333
435
  if (typeof data !== "string") {
334
436
  return data;
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ declare class MoPay extends Base {
15
15
  export default MoPay;
16
16
  export { MoPay, MoPay as Mopay };
17
17
  export { MoPayAPIError, MoPayValidationError } from "./errors.js";
18
- export { checkout, MoPayCheckout, } from "./checkout.js";
18
+ export { checkout, completeRedirect, MoPayCheckout, } from "./checkout.js";
19
19
  export { formatAmount, isValidReference, parseRedirect, validateCreatePaymentSessionParams, } from "./utils.js";
20
- export type { CreatePaymentSessionParams, CreatePaymentSessionResponse, CheckoutHandle, CheckoutFlowOptions, CheckoutMode, CheckoutMessage, CheckoutOptions, ErrorResponse, FetchLike, MoPayConfig, MoPayCheckoutOpenOptions, PaymentFrequency, PaymentMethod, RequestOptions, RedirectStatus, RetrieveSessionResponse, Session, SessionStatus, TransactionStatus, VerifiedRedirect, WaitForSessionOptions, } from "./types.js";
20
+ export type { CreatePaymentSessionParams, CreatePaymentSessionResponse, CheckoutHandle, CheckoutFlowOptions, CheckoutMode, CheckoutMessage, CheckoutOptions, CheckoutRedirectAfterClose, CheckoutRedirectCompleteOptions, ErrorResponse, FetchLike, MoPayConfig, MoPayCheckoutOpenOptions, PaymentFrequency, PaymentMethod, RequestOptions, RedirectStatus, RetrieveSessionResponse, Session, SessionStatus, TransactionStatus, VerifiedRedirect, WaitForSessionOptions, } from "./types.js";
21
21
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -54,5 +54,5 @@ applyMixins(MoPay, [Payments, Sessions, Redirects]);
54
54
  export default MoPay;
55
55
  export { MoPay, MoPay as Mopay };
56
56
  export { MoPayAPIError, MoPayValidationError } from "./errors.js";
57
- export { checkout, MoPayCheckout, } from "./checkout.js";
57
+ export { checkout, completeRedirect, MoPayCheckout, } from "./checkout.js";
58
58
  export { formatAmount, isValidReference, parseRedirect, validateCreatePaymentSessionParams, } from "./utils.js";
package/dist/types.d.ts CHANGED
@@ -85,9 +85,11 @@ export interface CheckoutMessage {
85
85
  reference?: string;
86
86
  amount?: string;
87
87
  paymentMethod?: PaymentMethod;
88
+ redirectTo?: string;
88
89
  error?: string;
89
90
  raw: unknown;
90
91
  }
92
+ export type CheckoutRedirectAfterClose = boolean | string | URL | ((message: CheckoutMessage) => string | URL | false | null | undefined);
91
93
  export interface CheckoutOptions {
92
94
  mode?: CheckoutMode;
93
95
  target?: Window;
@@ -100,6 +102,8 @@ export interface CheckoutOptions {
100
102
  maxHeight?: number;
101
103
  resizable?: boolean;
102
104
  closeButtonLabel?: string;
105
+ closeOnRedirect?: boolean;
106
+ redirectAfterClose?: CheckoutRedirectAfterClose;
103
107
  onOpen?: (checkout: CheckoutHandle) => void;
104
108
  onClose?: () => void;
105
109
  onMessage?: (message: CheckoutMessage) => void;
@@ -121,6 +125,12 @@ export interface MoPayCheckoutOpenOptions extends CheckoutOptions {
121
125
  allowedOrigin?: string;
122
126
  allowedOrigins?: string[];
123
127
  }
128
+ export interface CheckoutRedirectCompleteOptions {
129
+ type?: string;
130
+ targetOrigin?: string;
131
+ redirectTo?: string | URL;
132
+ closeWindow?: boolean;
133
+ }
124
134
  export interface CheckoutFlowOptions extends CheckoutOptions, RequestOptions {
125
135
  onSessionCreated?: (session: CreatePaymentSessionResponse) => void;
126
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mopay/node-sdk",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Official TypeScript SDK for the MoPay payment API.",
5
5
  "type": "module",
6
6
  "source": "src/index.ts",
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,eAAe,EAGf,WAAW,EACX,cAAc,EACf,MAAM,YAAY,CAAC;AAKpB,8BAAsB,IAAI;IACxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAkB;gBAEtC,MAAM,EAAE,WAAW;IAa/B,SAAS,CAAC,yBAAyB,IAAI,eAAe;cAItC,OAAO,CAAC,CAAC,EACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,WAAgB,EACzB,cAAc,GAAE,cAAmB,GAClC,OAAO,CAAC,CAAC,CAAC;CAuDd"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../src/checkout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EACf,wBAAwB,EACzB,MAAM,YAAY,CAAC;AAUpB,wBAAgB,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,cAAc,CAE1F;AAED,qBAAa,aAAa;IACxB,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,wBAAwB,GAAG,cAAc;CA6B/D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;gBAGzB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAO;CAO3E;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,IAAI,0BAA0B;CACxC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WA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CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,EAAE,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EACL,QAAQ,EACR,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,kCAAkC,GACnC,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,0BAA0B,EAC1B,4BAA4B,EAC5B,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,aAAa,EACb,SAAS,EACT,WAAW,EACX,wBAAwB,EACxB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,cAAc,EACd,uBAAuB,EACvB,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/payments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,EACV,0BAA0B,EAC1B,4BAA4B,EAC5B,cAAc,EACf,MAAM,aAAa,CAAC;AAKrB,qBAAa,QAAS,SAAQ,IAAI;IAChC,oBAAoB,CAClB,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,4BAA4B,CAAC;IAOxC,aAAa,CACX,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,4BAA4B,CAAC;CAGzC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/redirects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGrF,qBAAa,SAAU,SAAQ,IAAI;IACjC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,gBAAgB;IAI/F,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,cAAc;CAGxE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sessions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACvB,OAAO,EACP,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAOrB,qBAAa,QAAS,SAAQ,IAAI;IAChC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAU9F,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAIzF,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAI7F,YAAY,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,GAAG,OAAO;IAK3D,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAKlF,cAAc,CAClB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,uBAAuB,CAAC;CAmBpC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,UAA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