@cimplify/sdk 0.101.1 → 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-QPRI2NII.js → chunk-2P4KXFB6.js} +6 -0
- package/dist/{chunk-4G5UWFC3.mjs → chunk-3V4DVXV3.mjs} +6 -1
- package/dist/{chunk-YHPMFTMN.mjs → chunk-C2JSNJUC.mjs} +406 -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-7H6IL7CX.mjs → chunk-H7ACMHM3.mjs} +40 -15
- 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-ICCCSVN3.js → chunk-QOWPGS7Z.js} +42 -16
- package/dist/{chunk-YDA46OZ6.js → chunk-R6OLQ33I.js} +560 -80
- package/dist/{chunk-H5SSGN7W.js → chunk-VIL6IQCG.js} +408 -97
- package/dist/{chunk-O3YUHLZL.mjs → chunk-VNPEYLB2.mjs} +5 -0
- package/dist/{client-Db554902.d.ts → client-BfpNjJ_a.d.mts} +93 -299
- package/dist/{client-CdTx7X_X.d.mts → client-DHBwvh7U.d.ts} +93 -299
- package/dist/{client-WkUcvRvO.d.mts → client-DpqRobY9.d.mts} +2 -2
- package/dist/{client-D40kI8z2.d.ts → client-Dqg2mc-7.d.ts} +2 -2
- package/dist/{index-D3UXgAYl.d.ts → index-C8uDqLwJ.d.ts} +14 -4
- package/dist/{index-BjWUkYgY.d.mts → index-e2y6AK70.d.mts} +14 -4
- package/dist/index.d.mts +92 -8
- package/dist/index.d.ts +92 -8
- package/dist/index.js +225 -188
- package/dist/index.mjs +7 -6
- package/dist/link-cuNVYc2s.d.mts +297 -0
- package/dist/link-cuNVYc2s.d.ts +297 -0
- package/dist/mock/cli.mjs +412 -94
- package/dist/mock/library.js +412 -94
- package/dist/mock/library.mjs +412 -94
- package/dist/mock/msw.js +412 -94
- package/dist/mock/msw.mjs +412 -94
- package/dist/{product-DwKdC_to.d.mts → payment-H5LoIvXU.d.mts} +207 -7
- package/dist/{product-DwKdC_to.d.ts → payment-H5LoIvXU.d.ts} +207 -7
- package/dist/{price-CiQUd_XX.d.mts → price-BvePgDXe.d.mts} +1 -1
- package/dist/{price-D9EOj8y8.d.ts → price-C2RqscMY.d.ts} +1 -1
- package/dist/react.d.mts +6 -4
- package/dist/react.d.ts +6 -4
- package/dist/react.js +203 -198
- package/dist/react.mjs +11 -6
- package/dist/{server-CeDb93WA.d.ts → server-C7FyLdrz.d.mts} +11 -9
- package/dist/{server-D-nSkrUr.d.mts → 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 +175 -45
- package/dist/testing.d.ts +175 -45
- package/dist/testing.js +86 -81
- 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-CRqjGrx6.d.mts +0 -113
- package/dist/payment-DO1Z1Ip6.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();
|
|
@@ -473,6 +473,12 @@ var CartItemSchema = registerSchema(
|
|
|
473
473
|
}
|
|
474
474
|
);
|
|
475
475
|
var assertCartItem = makeAssertion(CartItemSchema, "cartItem");
|
|
476
|
+
var TaxPriceDisplayModeSchema = zod.z.enum([
|
|
477
|
+
"unspecified",
|
|
478
|
+
"gross_required",
|
|
479
|
+
"gross_and_net",
|
|
480
|
+
"net_allowed"
|
|
481
|
+
]);
|
|
476
482
|
var CartPricingSchema = registerSchema(
|
|
477
483
|
zod.z.object({
|
|
478
484
|
subtotal: MoneySchema,
|
|
@@ -484,6 +490,7 @@ var CartPricingSchema = registerSchema(
|
|
|
484
490
|
tax_rate: MoneySchema.optional(),
|
|
485
491
|
service_charge_rate: MoneySchema.optional(),
|
|
486
492
|
tax_inclusive: zod.z.boolean(),
|
|
493
|
+
price_display_mode: TaxPriceDisplayModeSchema.optional(),
|
|
487
494
|
deposit_required: zod.z.boolean(),
|
|
488
495
|
deposit_amount: MoneySchema
|
|
489
496
|
}),
|
|
@@ -549,31 +556,49 @@ var CheckoutBodySchema = registerSchema(
|
|
|
549
556
|
}
|
|
550
557
|
);
|
|
551
558
|
var assertCheckoutBody = makeAssertion(CheckoutBodySchema, "checkoutBody");
|
|
552
|
-
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
|
+
]);
|
|
553
570
|
var NextActionSchema = zod.z.discriminatedUnion("type", [
|
|
554
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
|
+
}),
|
|
555
578
|
zod.z.object({ type: zod.z.literal("redirect"), authorization_url: zod.z.string() }),
|
|
556
579
|
zod.z.object({
|
|
557
580
|
type: zod.z.literal("authorization"),
|
|
558
|
-
authorization_type:
|
|
559
|
-
display_text: zod.z.string().
|
|
560
|
-
})
|
|
581
|
+
authorization_type: AuthorizationTypeSchema,
|
|
582
|
+
display_text: zod.z.string().nullish()
|
|
583
|
+
}),
|
|
584
|
+
zod.z.object({ type: zod.z.literal("poll") })
|
|
561
585
|
]);
|
|
562
586
|
var CheckoutResponseSchema = registerSchema(
|
|
563
587
|
zod.z.looseObject({
|
|
564
588
|
order_id: zod.z.string().min(1),
|
|
565
589
|
order_number: zod.z.string().min(1),
|
|
590
|
+
payment_id: zod.z.string().nullish(),
|
|
566
591
|
payment_status: zod.z.string().min(1),
|
|
567
|
-
payment_reference: zod.z.string().
|
|
592
|
+
payment_reference: zod.z.string().nullish(),
|
|
568
593
|
requires_authorization: zod.z.boolean(),
|
|
569
|
-
authorization_type: AuthorizationTypeSchema.
|
|
594
|
+
authorization_type: AuthorizationTypeSchema.nullish(),
|
|
570
595
|
next_action: NextActionSchema,
|
|
571
|
-
provider: zod.z.string().
|
|
572
|
-
authorization_url: zod.z.string().
|
|
573
|
-
display_text: zod.z.string().
|
|
574
|
-
bill_token: zod.z.string().
|
|
575
|
-
client_secret: zod.z.string().
|
|
576
|
-
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()
|
|
577
602
|
}),
|
|
578
603
|
{
|
|
579
604
|
id: "CheckoutResponse",
|
|
@@ -600,7 +625,7 @@ async function toForwardedRequest(input, init) {
|
|
|
600
625
|
};
|
|
601
626
|
}
|
|
602
627
|
function createTestClient(options = {}) {
|
|
603
|
-
const mock =
|
|
628
|
+
const mock = chunkVIL6IQCG_js.createMockApp(options);
|
|
604
629
|
let sessionToken;
|
|
605
630
|
const fetchImpl = async (input, init) => {
|
|
606
631
|
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : input.url;
|
|
@@ -619,7 +644,7 @@ function createTestClient(options = {}) {
|
|
|
619
644
|
if (echoed) sessionToken = echoed;
|
|
620
645
|
return res;
|
|
621
646
|
};
|
|
622
|
-
const client =
|
|
647
|
+
const client = chunkR6OLQ33I_js.createCimplifyClient({
|
|
623
648
|
baseUrl: TEST_BASE_URL,
|
|
624
649
|
// Link mock lives at /v1/link on the same Hono app, so point the SDK's
|
|
625
650
|
// separate Link transport at the same TEST_BASE_URL.
|
|
@@ -740,6 +765,7 @@ exports.SchemaViolationError = SchemaViolationError;
|
|
|
740
765
|
exports.SeedNameSchema = SeedNameSchema;
|
|
741
766
|
exports.SelectedAddOnOptionSchema = SelectedAddOnOptionSchema;
|
|
742
767
|
exports.ServiceStatusSchema = ServiceStatusSchema;
|
|
768
|
+
exports.TaxPriceDisplayModeSchema = TaxPriceDisplayModeSchema;
|
|
743
769
|
exports.TimestampSchema = TimestampSchema;
|
|
744
770
|
exports.VariantDetailsSchema = VariantDetailsSchema;
|
|
745
771
|
exports.VariantDisplayAttributeSchema = VariantDisplayAttributeSchema;
|