@cimplify/sdk 0.102.0 → 0.103.0
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/advanced.d.mts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +23 -22
- package/dist/advanced.mjs +4 -3
- package/dist/{chunk-DCMXUKDQ.mjs → chunk-C2JSNJUC.mjs} +404 -95
- package/dist/chunk-CNN7Z2IP.js +125 -0
- package/dist/{chunk-DKLHCZ5M.mjs → chunk-GERXZQSX.mjs} +487 -11
- package/dist/chunk-GOHSXBKW.mjs +105 -0
- package/dist/{chunk-4KNFBPV2.mjs → chunk-H7ACMHM3.mjs} +32 -14
- package/dist/{chunk-Z3K2D3TE.mjs → chunk-J6PNHDHL.mjs} +453 -483
- package/dist/{chunk-NIOUSKQQ.js → chunk-JG5CQNCB.js} +5 -0
- package/dist/{chunk-YER7DIOM.js → chunk-JSWJ4XDE.js} +471 -519
- package/dist/{chunk-DLW3RWRK.mjs → chunk-M4URVKHE.mjs} +46 -12
- package/dist/{chunk-WMEC5JWN.js → chunk-NNG6IFFX.js} +50 -13
- package/dist/{chunk-LOWSMGRT.js → chunk-QOWPGS7Z.js} +34 -16
- package/dist/{chunk-YDA46OZ6.js → chunk-R6OLQ33I.js} +560 -80
- package/dist/{chunk-EAZGA7LD.js → chunk-VIL6IQCG.js} +406 -97
- package/dist/{chunk-O3YUHLZL.mjs → chunk-VNPEYLB2.mjs} +5 -0
- package/dist/{client-B40KFazg.d.ts → client-BfpNjJ_a.d.mts} +90 -299
- package/dist/{client-BizGfqB7.d.mts → client-DHBwvh7U.d.ts} +90 -299
- package/dist/{client-BdErclfU.d.mts → client-DpqRobY9.d.mts} +2 -2
- package/dist/{client-nsiMwuC1.d.ts → client-Dqg2mc-7.d.ts} +2 -2
- package/dist/{index-DpmnI__D.d.mts → index-C8uDqLwJ.d.ts} +14 -4
- package/dist/{index-nEyXWIyR.d.ts → index-e2y6AK70.d.mts} +14 -4
- package/dist/index.d.mts +81 -8
- package/dist/index.d.ts +81 -8
- package/dist/index.js +202 -169
- package/dist/index.mjs +6 -5
- package/dist/link-cuNVYc2s.d.mts +297 -0
- package/dist/link-cuNVYc2s.d.ts +297 -0
- package/dist/mock/cli.mjs +410 -94
- package/dist/mock/library.js +410 -94
- package/dist/mock/library.mjs +410 -94
- package/dist/mock/msw.js +410 -94
- package/dist/mock/msw.mjs +410 -94
- package/dist/{product-Byf0unSy.d.mts → payment-H5LoIvXU.d.mts} +189 -7
- package/dist/{product-Byf0unSy.d.ts → payment-H5LoIvXU.d.ts} +189 -7
- package/dist/{price-CS4E5zLS.d.mts → price-BvePgDXe.d.mts} +1 -1
- package/dist/{price-BstChV9a.d.ts → price-C2RqscMY.d.ts} +1 -1
- package/dist/react.d.mts +4 -4
- package/dist/react.d.ts +4 -4
- package/dist/react.js +141 -140
- package/dist/react.mjs +5 -4
- package/dist/{server-DqbZh8Bk.d.mts → server-C7FyLdrz.d.mts} +11 -9
- package/dist/{server-Cj40R2ZD.d.ts → server-DoXIpSd7.d.ts} +11 -9
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +11 -10
- package/dist/server.mjs +5 -4
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +4 -3
- package/dist/testing/msw.mjs +3 -2
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +26 -25
- package/dist/testing/suite.mjs +7 -6
- package/dist/testing.d.mts +154 -55
- package/dist/testing.d.ts +154 -55
- package/dist/testing.js +83 -82
- package/dist/testing.mjs +8 -7
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/dist/utils.js +37 -29
- package/dist/utils.mjs +2 -2
- package/package.json +7 -1
- package/dist/payment-l0rkieEQ.d.mts +0 -113
- package/dist/payment-vzNnIi1n.d.ts +0 -113
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { moneyFromNumber, money } from './chunk-
|
|
1
|
+
import { moneyFromNumber, money } from './chunk-VNPEYLB2.mjs';
|
|
2
2
|
|
|
3
3
|
// src/utils/price.ts
|
|
4
4
|
var CURRENCY_SYMBOLS = {
|
|
@@ -378,21 +378,22 @@ var PAYMENT_SUCCESS_STATUSES = /* @__PURE__ */ new Set([
|
|
|
378
378
|
"paid",
|
|
379
379
|
"captured",
|
|
380
380
|
"completed",
|
|
381
|
-
"authorized",
|
|
382
381
|
"not_required"
|
|
383
382
|
]);
|
|
384
|
-
var
|
|
383
|
+
var PAYMENT_TERMINAL_FAILURE_STATUSES = [
|
|
385
384
|
"failed",
|
|
386
|
-
"declined",
|
|
387
385
|
"cancelled",
|
|
388
386
|
"voided",
|
|
389
|
-
"
|
|
390
|
-
"
|
|
391
|
-
|
|
387
|
+
"abandoned",
|
|
388
|
+
"refunded",
|
|
389
|
+
"refund_pending",
|
|
390
|
+
"reversed",
|
|
391
|
+
"disputed"
|
|
392
|
+
];
|
|
393
|
+
var PAYMENT_FAILURE_STATUSES = new Set(PAYMENT_TERMINAL_FAILURE_STATUSES);
|
|
392
394
|
var PAYMENT_REQUIRES_ACTION_STATUSES = /* @__PURE__ */ new Set([
|
|
393
395
|
"requires_action",
|
|
394
|
-
"requires_payment_method"
|
|
395
|
-
"requires_capture"
|
|
396
|
+
"requires_payment_method"
|
|
396
397
|
]);
|
|
397
398
|
var PAYMENT_STATUS_ALIAS_MAP = {
|
|
398
399
|
ok: "captured",
|
|
@@ -474,7 +475,7 @@ function normalizeStatusResponse(response) {
|
|
|
474
475
|
const normalizedStatus = normalizePaymentStatusValue(res.status ?? void 0);
|
|
475
476
|
const normalizedAmount = typeof res.amount === "string" ? money(res.amount) : typeof res.amount === "number" && Number.isFinite(res.amount) ? moneyFromNumber(res.amount) : moneyFromNumber(0);
|
|
476
477
|
const normalizedCurrency = typeof res.currency === "string" && res.currency.trim().length > 0 ? res.currency : "";
|
|
477
|
-
const paidValue = res.paid === true;
|
|
478
|
+
const paidValue = res.paid === true && normalizedStatus !== "authorized" && !PAYMENT_REQUIRES_ACTION_STATUSES.has(normalizedStatus) && !PAYMENT_FAILURE_STATUSES.has(normalizedStatus);
|
|
478
479
|
const derivedPaid = paidValue || PAYMENT_SUCCESS_STATUSES.has(normalizedStatus);
|
|
479
480
|
return {
|
|
480
481
|
status: normalizedStatus,
|
|
@@ -486,10 +487,43 @@ function normalizeStatusResponse(response) {
|
|
|
486
487
|
};
|
|
487
488
|
}
|
|
488
489
|
var MOBILE_MONEY_PROVIDERS = {
|
|
489
|
-
mtn: {
|
|
490
|
+
mtn: {
|
|
491
|
+
name: "MTN Mobile Money",
|
|
492
|
+
prefix: ["024", "025", "053", "054", "055", "059"]
|
|
493
|
+
},
|
|
490
494
|
vodafone: { name: "Telecel Cash", prefix: ["020", "050"] },
|
|
491
495
|
airtel: { name: "AirtelTigo Money", prefix: ["026", "027", "056", "057"] }
|
|
492
496
|
};
|
|
497
|
+
var MOBILE_MONEY_PROVIDER_ALIASES = {
|
|
498
|
+
mtn: "mtn",
|
|
499
|
+
mtnmomo: "mtn",
|
|
500
|
+
vod: "telecel",
|
|
501
|
+
vodafone: "telecel",
|
|
502
|
+
telecel: "telecel",
|
|
503
|
+
atl: "airteltigo",
|
|
504
|
+
airtel: "airteltigo",
|
|
505
|
+
tigo: "airteltigo",
|
|
506
|
+
airteltigo: "airteltigo",
|
|
507
|
+
mpesa: "mpesa"
|
|
508
|
+
};
|
|
509
|
+
function canonicalMobileMoneyProvider(provider) {
|
|
510
|
+
if (typeof provider !== "string") return null;
|
|
511
|
+
const normalized = provider.trim().toLowerCase().replace(/[\s_-]+/g, "");
|
|
512
|
+
return MOBILE_MONEY_PROVIDER_ALIASES[normalized] ?? null;
|
|
513
|
+
}
|
|
514
|
+
var LOOPBACK_AUTHORIZATION_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]"]);
|
|
515
|
+
function paymentAuthorizationUrl(value) {
|
|
516
|
+
if (typeof value !== "string" || !value.trim()) return null;
|
|
517
|
+
try {
|
|
518
|
+
const url = new URL(value);
|
|
519
|
+
if (url.protocol === "https:") return url.toString();
|
|
520
|
+
if (url.protocol === "http:" && LOOPBACK_AUTHORIZATION_HOSTS.has(url.hostname)) {
|
|
521
|
+
return url.toString();
|
|
522
|
+
}
|
|
523
|
+
} catch {
|
|
524
|
+
}
|
|
525
|
+
return null;
|
|
526
|
+
}
|
|
493
527
|
function detectMobileMoneyProvider(phoneNumber) {
|
|
494
528
|
const cleaned = phoneNumber.replace(/\D/g, "");
|
|
495
529
|
const networkCode = cleaned.slice(-9, -7);
|
|
@@ -501,4 +535,4 @@ function detectMobileMoneyProvider(phoneNumber) {
|
|
|
501
535
|
return null;
|
|
502
536
|
}
|
|
503
537
|
|
|
504
|
-
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceRange, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getPriceRange, getProductCurrency, getTaxAmount, getUnitPriceAtQuantity, getVariantUnitPrice, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice };
|
|
538
|
+
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, PAYMENT_TERMINAL_FAILURE_STATUSES, canonicalMobileMoneyProvider, categorizePaymentError, detectMobileMoneyProvider, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceRange, formatPriceWithTax, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getPriceRange, getProductCurrency, getTaxAmount, getUnitPriceAtQuantity, getVariantUnitPrice, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice, paymentAuthorizationUrl };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJG5CQNCB_js = require('./chunk-JG5CQNCB.js');
|
|
4
4
|
|
|
5
5
|
// src/utils/price.ts
|
|
6
6
|
var CURRENCY_SYMBOLS = {
|
|
@@ -380,21 +380,22 @@ var PAYMENT_SUCCESS_STATUSES = /* @__PURE__ */ new Set([
|
|
|
380
380
|
"paid",
|
|
381
381
|
"captured",
|
|
382
382
|
"completed",
|
|
383
|
-
"authorized",
|
|
384
383
|
"not_required"
|
|
385
384
|
]);
|
|
386
|
-
var
|
|
385
|
+
var PAYMENT_TERMINAL_FAILURE_STATUSES = [
|
|
387
386
|
"failed",
|
|
388
|
-
"declined",
|
|
389
387
|
"cancelled",
|
|
390
388
|
"voided",
|
|
391
|
-
"
|
|
392
|
-
"
|
|
393
|
-
|
|
389
|
+
"abandoned",
|
|
390
|
+
"refunded",
|
|
391
|
+
"refund_pending",
|
|
392
|
+
"reversed",
|
|
393
|
+
"disputed"
|
|
394
|
+
];
|
|
395
|
+
var PAYMENT_FAILURE_STATUSES = new Set(PAYMENT_TERMINAL_FAILURE_STATUSES);
|
|
394
396
|
var PAYMENT_REQUIRES_ACTION_STATUSES = /* @__PURE__ */ new Set([
|
|
395
397
|
"requires_action",
|
|
396
|
-
"requires_payment_method"
|
|
397
|
-
"requires_capture"
|
|
398
|
+
"requires_payment_method"
|
|
398
399
|
]);
|
|
399
400
|
var PAYMENT_STATUS_ALIAS_MAP = {
|
|
400
401
|
ok: "captured",
|
|
@@ -467,16 +468,16 @@ function normalizeStatusResponse(response) {
|
|
|
467
468
|
return {
|
|
468
469
|
status: "pending",
|
|
469
470
|
paid: false,
|
|
470
|
-
amount:
|
|
471
|
+
amount: chunkJG5CQNCB_js.moneyFromNumber(0),
|
|
471
472
|
currency: "",
|
|
472
473
|
message: "No status available"
|
|
473
474
|
};
|
|
474
475
|
}
|
|
475
476
|
const res = response;
|
|
476
477
|
const normalizedStatus = normalizePaymentStatusValue(res.status ?? void 0);
|
|
477
|
-
const normalizedAmount = typeof res.amount === "string" ?
|
|
478
|
+
const normalizedAmount = typeof res.amount === "string" ? chunkJG5CQNCB_js.money(res.amount) : typeof res.amount === "number" && Number.isFinite(res.amount) ? chunkJG5CQNCB_js.moneyFromNumber(res.amount) : chunkJG5CQNCB_js.moneyFromNumber(0);
|
|
478
479
|
const normalizedCurrency = typeof res.currency === "string" && res.currency.trim().length > 0 ? res.currency : "";
|
|
479
|
-
const paidValue = res.paid === true;
|
|
480
|
+
const paidValue = res.paid === true && normalizedStatus !== "authorized" && !PAYMENT_REQUIRES_ACTION_STATUSES.has(normalizedStatus) && !PAYMENT_FAILURE_STATUSES.has(normalizedStatus);
|
|
480
481
|
const derivedPaid = paidValue || PAYMENT_SUCCESS_STATUSES.has(normalizedStatus);
|
|
481
482
|
return {
|
|
482
483
|
status: normalizedStatus,
|
|
@@ -488,10 +489,43 @@ function normalizeStatusResponse(response) {
|
|
|
488
489
|
};
|
|
489
490
|
}
|
|
490
491
|
var MOBILE_MONEY_PROVIDERS = {
|
|
491
|
-
mtn: {
|
|
492
|
+
mtn: {
|
|
493
|
+
name: "MTN Mobile Money",
|
|
494
|
+
prefix: ["024", "025", "053", "054", "055", "059"]
|
|
495
|
+
},
|
|
492
496
|
vodafone: { name: "Telecel Cash", prefix: ["020", "050"] },
|
|
493
497
|
airtel: { name: "AirtelTigo Money", prefix: ["026", "027", "056", "057"] }
|
|
494
498
|
};
|
|
499
|
+
var MOBILE_MONEY_PROVIDER_ALIASES = {
|
|
500
|
+
mtn: "mtn",
|
|
501
|
+
mtnmomo: "mtn",
|
|
502
|
+
vod: "telecel",
|
|
503
|
+
vodafone: "telecel",
|
|
504
|
+
telecel: "telecel",
|
|
505
|
+
atl: "airteltigo",
|
|
506
|
+
airtel: "airteltigo",
|
|
507
|
+
tigo: "airteltigo",
|
|
508
|
+
airteltigo: "airteltigo",
|
|
509
|
+
mpesa: "mpesa"
|
|
510
|
+
};
|
|
511
|
+
function canonicalMobileMoneyProvider(provider) {
|
|
512
|
+
if (typeof provider !== "string") return null;
|
|
513
|
+
const normalized = provider.trim().toLowerCase().replace(/[\s_-]+/g, "");
|
|
514
|
+
return MOBILE_MONEY_PROVIDER_ALIASES[normalized] ?? null;
|
|
515
|
+
}
|
|
516
|
+
var LOOPBACK_AUTHORIZATION_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]"]);
|
|
517
|
+
function paymentAuthorizationUrl(value) {
|
|
518
|
+
if (typeof value !== "string" || !value.trim()) return null;
|
|
519
|
+
try {
|
|
520
|
+
const url = new URL(value);
|
|
521
|
+
if (url.protocol === "https:") return url.toString();
|
|
522
|
+
if (url.protocol === "http:" && LOOPBACK_AUTHORIZATION_HOSTS.has(url.hostname)) {
|
|
523
|
+
return url.toString();
|
|
524
|
+
}
|
|
525
|
+
} catch {
|
|
526
|
+
}
|
|
527
|
+
return null;
|
|
528
|
+
}
|
|
495
529
|
function detectMobileMoneyProvider(phoneNumber) {
|
|
496
530
|
const cleaned = phoneNumber.replace(/\D/g, "");
|
|
497
531
|
const networkCode = cleaned.slice(-9, -7);
|
|
@@ -505,6 +539,8 @@ function detectMobileMoneyProvider(phoneNumber) {
|
|
|
505
539
|
|
|
506
540
|
exports.CURRENCY_SYMBOLS = CURRENCY_SYMBOLS;
|
|
507
541
|
exports.MOBILE_MONEY_PROVIDERS = MOBILE_MONEY_PROVIDERS;
|
|
542
|
+
exports.PAYMENT_TERMINAL_FAILURE_STATUSES = PAYMENT_TERMINAL_FAILURE_STATUSES;
|
|
543
|
+
exports.canonicalMobileMoneyProvider = canonicalMobileMoneyProvider;
|
|
508
544
|
exports.categorizePaymentError = categorizePaymentError;
|
|
509
545
|
exports.detectMobileMoneyProvider = detectMobileMoneyProvider;
|
|
510
546
|
exports.formatMoney = formatMoney;
|
|
@@ -534,3 +570,4 @@ exports.isTaxInclusive = isTaxInclusive;
|
|
|
534
570
|
exports.normalizePaymentResponse = normalizePaymentResponse;
|
|
535
571
|
exports.normalizeStatusResponse = normalizeStatusResponse;
|
|
536
572
|
exports.parsePrice = parsePrice;
|
|
573
|
+
exports.paymentAuthorizationUrl = paymentAuthorizationUrl;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkVIL6IQCG_js = require('./chunk-VIL6IQCG.js');
|
|
4
|
+
var chunkR6OLQ33I_js = require('./chunk-R6OLQ33I.js');
|
|
5
5
|
var zod = require('zod');
|
|
6
6
|
|
|
7
7
|
var cimplifyRegistry = zod.z.registry();
|
|
@@ -556,31 +556,49 @@ var CheckoutBodySchema = registerSchema(
|
|
|
556
556
|
}
|
|
557
557
|
);
|
|
558
558
|
var assertCheckoutBody = makeAssertion(CheckoutBodySchema, "checkoutBody");
|
|
559
|
-
var AuthorizationTypeSchema = zod.z.
|
|
559
|
+
var AuthorizationTypeSchema = zod.z.union([
|
|
560
|
+
zod.z.enum(["otp", "pin", "phone", "birthday"]),
|
|
561
|
+
zod.z.object({
|
|
562
|
+
address: zod.z.object({
|
|
563
|
+
address: zod.z.string(),
|
|
564
|
+
city: zod.z.string(),
|
|
565
|
+
state: zod.z.string(),
|
|
566
|
+
zip_code: zod.z.string()
|
|
567
|
+
})
|
|
568
|
+
})
|
|
569
|
+
]);
|
|
560
570
|
var NextActionSchema = zod.z.discriminatedUnion("type", [
|
|
561
571
|
zod.z.object({ type: zod.z.literal("none") }),
|
|
572
|
+
zod.z.object({
|
|
573
|
+
type: zod.z.literal("card_popup"),
|
|
574
|
+
provider: zod.z.string().min(1),
|
|
575
|
+
client_secret: zod.z.string().min(1),
|
|
576
|
+
public_key: zod.z.string().min(1)
|
|
577
|
+
}),
|
|
562
578
|
zod.z.object({ type: zod.z.literal("redirect"), authorization_url: zod.z.string() }),
|
|
563
579
|
zod.z.object({
|
|
564
580
|
type: zod.z.literal("authorization"),
|
|
565
|
-
authorization_type:
|
|
566
|
-
display_text: zod.z.string().
|
|
567
|
-
})
|
|
581
|
+
authorization_type: AuthorizationTypeSchema,
|
|
582
|
+
display_text: zod.z.string().nullish()
|
|
583
|
+
}),
|
|
584
|
+
zod.z.object({ type: zod.z.literal("poll") })
|
|
568
585
|
]);
|
|
569
586
|
var CheckoutResponseSchema = registerSchema(
|
|
570
587
|
zod.z.looseObject({
|
|
571
588
|
order_id: zod.z.string().min(1),
|
|
572
589
|
order_number: zod.z.string().min(1),
|
|
590
|
+
payment_id: zod.z.string().nullish(),
|
|
573
591
|
payment_status: zod.z.string().min(1),
|
|
574
|
-
payment_reference: zod.z.string().
|
|
592
|
+
payment_reference: zod.z.string().nullish(),
|
|
575
593
|
requires_authorization: zod.z.boolean(),
|
|
576
|
-
authorization_type: AuthorizationTypeSchema.
|
|
594
|
+
authorization_type: AuthorizationTypeSchema.nullish(),
|
|
577
595
|
next_action: NextActionSchema,
|
|
578
|
-
provider: zod.z.string().
|
|
579
|
-
authorization_url: zod.z.string().
|
|
580
|
-
display_text: zod.z.string().
|
|
581
|
-
bill_token: zod.z.string().
|
|
582
|
-
client_secret: zod.z.string().
|
|
583
|
-
public_key: zod.z.string().
|
|
596
|
+
provider: zod.z.string().nullish(),
|
|
597
|
+
authorization_url: zod.z.string().nullish(),
|
|
598
|
+
display_text: zod.z.string().nullish(),
|
|
599
|
+
bill_token: zod.z.string().nullish(),
|
|
600
|
+
client_secret: zod.z.string().nullish(),
|
|
601
|
+
public_key: zod.z.string().nullish()
|
|
584
602
|
}),
|
|
585
603
|
{
|
|
586
604
|
id: "CheckoutResponse",
|
|
@@ -607,7 +625,7 @@ async function toForwardedRequest(input, init) {
|
|
|
607
625
|
};
|
|
608
626
|
}
|
|
609
627
|
function createTestClient(options = {}) {
|
|
610
|
-
const mock =
|
|
628
|
+
const mock = chunkVIL6IQCG_js.createMockApp(options);
|
|
611
629
|
let sessionToken;
|
|
612
630
|
const fetchImpl = async (input, init) => {
|
|
613
631
|
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
@@ -626,7 +644,7 @@ function createTestClient(options = {}) {
|
|
|
626
644
|
if (echoed) sessionToken = echoed;
|
|
627
645
|
return res;
|
|
628
646
|
};
|
|
629
|
-
const client =
|
|
647
|
+
const client = chunkR6OLQ33I_js.createCimplifyClient({
|
|
630
648
|
baseUrl: TEST_BASE_URL,
|
|
631
649
|
// Link mock lives at /v1/link on the same Hono app, so point the SDK's
|
|
632
650
|
// separate Link transport at the same TEST_BASE_URL.
|