@cimplify/sdk 0.110.2 → 0.111.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/CHANGELOG.md +54 -0
- package/README.md +18 -0
- package/dist/advanced.d.mts +4 -4
- package/dist/advanced.d.ts +4 -4
- package/dist/advanced.js +22 -22
- package/dist/advanced.mjs +3 -3
- package/dist/{catalogue-OTuS5zp-.d.ts → catalogue-1QcoGDO6.d.ts} +2 -2
- package/dist/{catalogue-CPTMyBUz.d.mts → catalogue-FdFQiWrU.d.mts} +2 -2
- package/dist/{chunk-SYEO2WV4.mjs → chunk-42JTCWIE.mjs} +3 -3
- package/dist/{chunk-OMTVH334.js → chunk-6QANXRUM.js} +203 -186
- package/dist/{chunk-6ETDAU62.mjs → chunk-B45X3HPO.mjs} +98 -39
- package/dist/{chunk-MKIJQL5Q.js → chunk-CJVEJPIG.js} +69 -69
- package/dist/{chunk-Q2Y3VMKH.js → chunk-ETZDIISN.js} +151 -151
- package/dist/{chunk-GCKWKLZF.mjs → chunk-FT6GFYJL.mjs} +17 -3
- package/dist/{chunk-A36JRXXH.mjs → chunk-KWZHIPRN.mjs} +26 -9
- package/dist/{chunk-SNNEOS5Z.js → chunk-MHDUUSG6.js} +75 -75
- package/dist/{chunk-UCR5HRYM.js → chunk-NFXCKTE2.js} +17 -3
- package/dist/{chunk-DFZWHNRG.js → chunk-QOCHWR4V.js} +105 -42
- package/dist/{chunk-IZDWAL53.mjs → chunk-UJDQQTBS.mjs} +8 -8
- package/dist/{chunk-BTUSVHIE.mjs → chunk-WLSU5QJT.mjs} +2 -2
- package/dist/{client-dqOhP9Nc.d.ts → client-CChON4-x.d.ts} +2 -2
- package/dist/{client-CX_WR0-J.d.mts → client-EeuGm5gj.d.mts} +2 -2
- package/dist/{elements-DdsRig-2.d.mts → elements-ss9xZgRg.d.mts} +27 -1
- package/dist/{elements-DdsRig-2.d.ts → elements-ss9xZgRg.d.ts} +27 -1
- package/dist/index-BB2gjVvA.d.mts +153 -0
- package/dist/index-BEfmBDAH.d.ts +153 -0
- package/dist/{index-B98Xac8e.d.ts → index-DQK8sTfu.d.ts} +2 -2
- package/dist/{index-DbAN_VQE.d.mts → index-DSVkhRmW.d.mts} +2 -2
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +189 -177
- package/dist/index.mjs +8 -8
- package/dist/mock/cli.mjs +25 -10
- package/dist/mock/library.js +25 -10
- package/dist/mock/library.mjs +25 -10
- package/dist/mock/msw.js +25 -10
- package/dist/mock/msw.mjs +25 -10
- package/dist/{price-BOzexBww.d.mts → price-B-w4PwHm.d.mts} +1 -1
- package/dist/{price-C1h9sPxE.d.ts → price-BEvQFNJv.d.ts} +1 -1
- package/dist/react.d.mts +23 -15
- package/dist/react.d.ts +23 -15
- package/dist/react.js +254 -237
- package/dist/react.mjs +128 -111
- package/dist/{scheduling-D2ajXpMC.d.ts → scheduling-D9WwOxbo.d.ts} +1 -1
- package/dist/{scheduling-DSRbbaZb.d.mts → scheduling-DDmrYCr-.d.mts} +1 -1
- package/dist/{server-D29IIuDV.d.ts → server-BiKwxvnf.d.ts} +2 -2
- package/dist/{server-DQMWPnc8.d.mts → server-DPdtl2dd.d.mts} +2 -2
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +10 -10
- package/dist/server.mjs +4 -4
- package/dist/styles.css +1 -1
- package/dist/testing/msw.d.mts +3 -3
- package/dist/testing/msw.d.ts +3 -3
- package/dist/testing/msw.js +3 -3
- package/dist/testing/msw.mjs +2 -2
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +25 -25
- package/dist/testing/suite.mjs +6 -6
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +117 -117
- package/dist/testing.mjs +7 -7
- package/dist/utils.d.mts +3 -3
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +44 -32
- package/dist/utils.mjs +2 -2
- package/package.json +5 -3
- package/registry/cart-summary.json +1 -1
- package/registry/chat-widget.json +1 -1
- package/registry/price.json +1 -1
- package/registry/product-customizer.json +1 -1
- package/registry/search-input.json +1 -1
- package/dist/index-6gkHMGAq.d.mts +0 -86
- package/dist/index-B_ByTtIT.d.ts +0 -86
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PURCHASE_INTENT_MOBILE_MONEY_NETWORK, money } from './chunk-
|
|
1
|
+
import { PURCHASE_INTENT_MOBILE_MONEY_NETWORK, money } from './chunk-FT6GFYJL.mjs';
|
|
2
2
|
|
|
3
3
|
// src/utils/price.ts
|
|
4
4
|
var CURRENCY_SYMBOLS = {
|
|
@@ -75,39 +75,98 @@ var CURRENCY_SYMBOLS = {
|
|
|
75
75
|
function getCurrencySymbol(currencyCode2) {
|
|
76
76
|
return CURRENCY_SYMBOLS[currencyCode2.toUpperCase()] || currencyCode2;
|
|
77
77
|
}
|
|
78
|
+
var PRICE_UNAVAILABLE_LABEL = "Price unavailable", DEFAULT_FORMAT_LOCALE = "en-US", PERCENT_SCALE = 100, ISO_CURRENCY_CODE = /^[A-Z]{3}$/, STANDARD_MINOR_UNIT_DIGITS = 2, ZERO_MINOR_UNIT_DIGITS = 0, THREE_MINOR_UNIT_DIGITS = 3, ZERO_DECIMAL_CURRENCIES = new Set(
|
|
79
|
+
"BIF CLP DJF GNF ISK JPY KMF KRW PYG RWF UGX VND VUV XAF XOF XPF".split(" ")
|
|
80
|
+
), THREE_DECIMAL_CURRENCIES = new Set(
|
|
81
|
+
"BHD IQD JOD KWD LYD OMR TND".split(" ")
|
|
82
|
+
), DECIMAL_BASE = 10, DECIMAL_RADIX = 10n, ROUND_UP_FROM_DIGIT = "5", PLAIN_DECIMAL_MAX_FRACTION_DIGITS = 20, DECIMAL_TEXT = /^([+-]?)(\d*)(?:\.(\d*))?$/, EXPONENT_NOTATION = /e/i, LOCALE_PROBE_VALUE = -1.5;
|
|
83
|
+
function currencyFractionDigits(currency) {
|
|
84
|
+
if (!currency) return null;
|
|
85
|
+
let code = currency.trim().toUpperCase();
|
|
86
|
+
return ISO_CURRENCY_CODE.test(code) ? ZERO_DECIMAL_CURRENCIES.has(code) ? (0) : THREE_DECIMAL_CURRENCIES.has(code) ? (3) : (2) : null;
|
|
87
|
+
}
|
|
88
|
+
function roundToCurrencyDigits(value, currency) {
|
|
89
|
+
let digits = currencyFractionDigits(currency);
|
|
90
|
+
if (digits === null) return value;
|
|
91
|
+
let factor = (10) ** digits;
|
|
92
|
+
return Math.round(value * factor) / factor;
|
|
93
|
+
}
|
|
94
|
+
function numberToDecimalText(value) {
|
|
95
|
+
if (!Number.isFinite(value)) return null;
|
|
96
|
+
let text = String(value);
|
|
97
|
+
return EXPONENT_NOTATION.test(text) ? value.toLocaleString(DEFAULT_FORMAT_LOCALE, {
|
|
98
|
+
useGrouping: false,
|
|
99
|
+
maximumFractionDigits: (20)
|
|
100
|
+
}) : text;
|
|
101
|
+
}
|
|
102
|
+
function roundDecimalText(text, digits) {
|
|
103
|
+
let match = DECIMAL_TEXT.exec(text.trim());
|
|
104
|
+
if (!match) return null;
|
|
105
|
+
let sign = match[1] ?? "", whole = match[2] ?? "", fraction = match[3] ?? "";
|
|
106
|
+
if (whole.length === 0 && fraction.length === 0) return null;
|
|
107
|
+
let kept = fraction.padEnd(digits, "0").slice(0, digits), scaled = BigInt(`${whole || "0"}${kept}`);
|
|
108
|
+
fraction.charAt(digits) >= ROUND_UP_FROM_DIGIT && (scaled += 1n);
|
|
109
|
+
let scale = DECIMAL_RADIX ** BigInt(digits);
|
|
110
|
+
return {
|
|
111
|
+
negative: sign === "-" && scaled !== 0n,
|
|
112
|
+
whole: scaled / scale,
|
|
113
|
+
fraction: digits === 0 ? "" : (scaled % scale).toString().padStart(digits, "0")
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
var symbolsByLocale = /* @__PURE__ */ new Map(), wholeFormatters = /* @__PURE__ */ new Map();
|
|
117
|
+
function localeNumberSymbols(locale) {
|
|
118
|
+
let cached = symbolsByLocale.get(locale);
|
|
119
|
+
if (cached) return cached;
|
|
120
|
+
let formatter = new Intl.NumberFormat(locale, { useGrouping: false }), parts = formatter.formatToParts((-1.5)), symbols = {
|
|
121
|
+
decimal: parts.find((part) => part.type === "decimal")?.value ?? ".",
|
|
122
|
+
minus: parts.find((part) => part.type === "minusSign")?.value ?? "-",
|
|
123
|
+
digits: Array.from({ length: (10) }, (_, digit) => formatter.format(digit))
|
|
124
|
+
};
|
|
125
|
+
return symbolsByLocale.set(locale, symbols), symbols;
|
|
126
|
+
}
|
|
127
|
+
function wholeFormatter(locale, grouping) {
|
|
128
|
+
let key = `${locale}|${grouping ? "grouped" : "plain"}`, cached = wholeFormatters.get(key);
|
|
129
|
+
if (cached) return cached;
|
|
130
|
+
let formatter = new Intl.NumberFormat(locale, { useGrouping: grouping });
|
|
131
|
+
return wholeFormatters.set(key, formatter), formatter;
|
|
132
|
+
}
|
|
133
|
+
function localeDecimalText(rounded, locale, grouping) {
|
|
134
|
+
let symbols = localeNumberSymbols(locale), wholeText = wholeFormatter(locale, grouping).format(rounded.whole), fractionText = Array.from(
|
|
135
|
+
rounded.fraction,
|
|
136
|
+
(digit) => symbols.digits[Number(digit)] ?? digit
|
|
137
|
+
).join(""), body = fractionText.length > 0 ? `${wholeText}${symbols.decimal}${fractionText}` : wholeText;
|
|
138
|
+
return rounded.negative ? `${symbols.minus}${body}` : body;
|
|
139
|
+
}
|
|
140
|
+
function formatCurrencyAmount(amount, currency, options = {}) {
|
|
141
|
+
let digits = currencyFractionDigits(currency);
|
|
142
|
+
if (digits === null || !currency) return null;
|
|
143
|
+
let text = typeof amount == "number" ? numberToDecimalText(amount) : amount;
|
|
144
|
+
if (text === null) return null;
|
|
145
|
+
let rounded = roundDecimalText(text, digits);
|
|
146
|
+
if (!rounded) return null;
|
|
147
|
+
let locale = options.locale ?? DEFAULT_FORMAT_LOCALE, grouping = options.grouping ?? true;
|
|
148
|
+
return `${getCurrencySymbol(currency.trim().toUpperCase())}${localeDecimalText(rounded, locale, grouping)}`;
|
|
149
|
+
}
|
|
78
150
|
function formatNumberCompact(value, decimals = 1) {
|
|
79
151
|
let absValue = Math.abs(value), sign = value < 0 ? "-" : "";
|
|
80
152
|
return absValue >= 1e9 ? `${sign}${(absValue / 1e9).toFixed(decimals)}B` : absValue >= 1e6 ? `${sign}${(absValue / 1e6).toFixed(decimals)}M` : absValue >= 1e3 ? `${sign}${(absValue / 1e3).toFixed(decimals)}K` : `${sign}${absValue.toFixed(decimals)}`;
|
|
81
153
|
}
|
|
82
|
-
function formatPrice(amount, currency
|
|
83
|
-
|
|
84
|
-
if (isNaN(numAmount))
|
|
85
|
-
return `${getCurrencySymbol(currency)}0.00`;
|
|
86
|
-
let symbol = getCurrencySymbol(currency);
|
|
87
|
-
try {
|
|
88
|
-
let formatted = new Intl.NumberFormat(locale, {
|
|
89
|
-
minimumFractionDigits: 2,
|
|
90
|
-
maximumFractionDigits: 2
|
|
91
|
-
}).format(numAmount);
|
|
92
|
-
return `${symbol}${formatted}`;
|
|
93
|
-
} catch {
|
|
94
|
-
return `${symbol}${numAmount.toFixed(2)}`;
|
|
95
|
-
}
|
|
154
|
+
function formatPrice(amount, currency, locale = DEFAULT_FORMAT_LOCALE) {
|
|
155
|
+
return formatCurrencyAmount(amount, currency, { locale }) ?? PRICE_UNAVAILABLE_LABEL;
|
|
96
156
|
}
|
|
97
|
-
function formatPriceAdjustment(amount, currency
|
|
98
|
-
let formatted =
|
|
99
|
-
return amount > 0 ? `+${formatted}` : amount < 0 ? `-${formatted}` : formatted;
|
|
157
|
+
function formatPriceAdjustment(amount, currency, locale = DEFAULT_FORMAT_LOCALE) {
|
|
158
|
+
let formatted = formatCurrencyAmount(Math.abs(amount), currency, { locale });
|
|
159
|
+
return formatted === null ? PRICE_UNAVAILABLE_LABEL : amount > 0 ? `+${formatted}` : amount < 0 ? `-${formatted}` : formatted;
|
|
100
160
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
let
|
|
106
|
-
return Math.abs(
|
|
161
|
+
var COMPACT_THRESHOLD = 1e3;
|
|
162
|
+
function formatPriceCompact(amount, currency, decimals = 1) {
|
|
163
|
+
let exact = formatCurrencyAmount(amount, currency);
|
|
164
|
+
if (exact === null || !currency) return PRICE_UNAVAILABLE_LABEL;
|
|
165
|
+
let magnitude = typeof amount == "number" ? amount : Number.parseFloat(amount);
|
|
166
|
+
return Math.abs(magnitude) < (1e3) ? exact : `${getCurrencySymbol(currency.trim().toUpperCase())}${formatNumberCompact(magnitude, decimals)}`;
|
|
107
167
|
}
|
|
108
|
-
function formatMoney(amount, currency
|
|
109
|
-
|
|
110
|
-
return isNaN(numAmount) ? `${symbol}0.00` : `${symbol}${numAmount.toFixed(2)}`;
|
|
168
|
+
function formatMoney(amount, currency) {
|
|
169
|
+
return formatCurrencyAmount(amount, currency, { grouping: false }) ?? PRICE_UNAVAILABLE_LABEL;
|
|
111
170
|
}
|
|
112
171
|
function parsePrice(value) {
|
|
113
172
|
if (value == null)
|
|
@@ -135,9 +194,9 @@ function getTaxAmount(priceInfo) {
|
|
|
135
194
|
function isTaxInclusive(priceInfo) {
|
|
136
195
|
return priceInfo.tax_info?.is_inclusive === true;
|
|
137
196
|
}
|
|
138
|
-
function formatPriceWithTax(priceInfo, currency
|
|
139
|
-
let finalPrice =
|
|
140
|
-
return hasTaxInfo(priceInfo) ? isTaxInclusive(priceInfo) ? `${finalPrice} (incl. tax)` : `${finalPrice} + ${formatPrice(getTaxAmount(priceInfo), currency)} tax` : finalPrice;
|
|
197
|
+
function formatPriceWithTax(priceInfo, currency) {
|
|
198
|
+
let finalPrice = formatCurrencyAmount(priceInfo.final_price, currency);
|
|
199
|
+
return finalPrice === null ? PRICE_UNAVAILABLE_LABEL : hasTaxInfo(priceInfo) ? isTaxInclusive(priceInfo) ? `${finalPrice} (incl. tax)` : `${finalPrice} + ${formatPrice(getTaxAmount(priceInfo), currency)} tax` : finalPrice;
|
|
141
200
|
}
|
|
142
201
|
function getDisplayPrice(product) {
|
|
143
202
|
return product.sale ? parsePrice(product.sale.price) : product.price_info ? parsePrice(product.price_info.final_price) : product.final_price !== void 0 && product.final_price !== null ? parsePrice(product.final_price) : product.default_price !== void 0 && product.default_price !== null ? parsePrice(product.default_price) : 0;
|
|
@@ -155,18 +214,17 @@ function getDiscountPercentage(product) {
|
|
|
155
214
|
if (product.sale)
|
|
156
215
|
return parsePrice(product.sale.percent_off);
|
|
157
216
|
let basePrice = getBasePrice(product), finalPrice = getDisplayPrice(product);
|
|
158
|
-
return basePrice > finalPrice && basePrice > 0 ? Math.round((basePrice - finalPrice) / basePrice * 100) : 0;
|
|
217
|
+
return basePrice > finalPrice && basePrice > 0 ? Math.round((basePrice - finalPrice) / basePrice * (100)) : 0;
|
|
159
218
|
}
|
|
160
219
|
function getMarkupPercentage(product) {
|
|
161
220
|
let basePrice = getBasePrice(product), finalPrice = getDisplayPrice(product);
|
|
162
|
-
return finalPrice > basePrice && basePrice > 0 ? Math.round((finalPrice - basePrice) / basePrice * 100) : 0;
|
|
221
|
+
return finalPrice > basePrice && basePrice > 0 ? Math.round((finalPrice - basePrice) / basePrice * (100)) : 0;
|
|
163
222
|
}
|
|
164
223
|
function getProductCurrency(product) {
|
|
165
|
-
return product.price_info?.currency
|
|
224
|
+
return product.price_info?.currency || product.currency || void 0;
|
|
166
225
|
}
|
|
167
|
-
function formatProductPrice(product, locale =
|
|
168
|
-
|
|
169
|
-
return formatPrice(price, currency, locale);
|
|
226
|
+
function formatProductPrice(product, locale = DEFAULT_FORMAT_LOCALE) {
|
|
227
|
+
return formatPrice(getDisplayPrice(product), getProductCurrency(product), locale);
|
|
170
228
|
}
|
|
171
229
|
function getUnitPriceAtQuantity(tiers, quantity, fallback) {
|
|
172
230
|
let sorted = [...tiers].sort((a, b) => a.min_quantity - b.min_quantity), matched;
|
|
@@ -187,8 +245,9 @@ function getPriceRange(product) {
|
|
|
187
245
|
}
|
|
188
246
|
return null;
|
|
189
247
|
}
|
|
190
|
-
function formatPriceRange(min, max, currency
|
|
191
|
-
|
|
248
|
+
function formatPriceRange(min, max, currency) {
|
|
249
|
+
let low = formatCurrencyAmount(min, currency), high = formatCurrencyAmount(max, currency);
|
|
250
|
+
return low === null || high === null ? PRICE_UNAVAILABLE_LABEL : `${low} \u2013 ${high}`;
|
|
192
251
|
}
|
|
193
252
|
|
|
194
253
|
// src/utils/payment.ts
|
|
@@ -404,4 +463,4 @@ function detectMobileMoneyProvider(phoneNumber) {
|
|
|
404
463
|
return null;
|
|
405
464
|
}
|
|
406
465
|
|
|
407
|
-
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, purchaseIntentMobileMoneyNetwork };
|
|
466
|
+
export { CURRENCY_SYMBOLS, MOBILE_MONEY_PROVIDERS, PAYMENT_TERMINAL_FAILURE_STATUSES, PRICE_UNAVAILABLE_LABEL, canonicalMobileMoneyProvider, categorizePaymentError, currencyFractionDigits, detectMobileMoneyProvider, formatCurrencyAmount, 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, purchaseIntentMobileMoneyNetwork, roundToCurrencyDigits };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkMHDUUSG6_js = require('./chunk-MHDUUSG6.js');
|
|
4
|
+
var chunkETZDIISN_js = require('./chunk-ETZDIISN.js');
|
|
5
5
|
var chunkGTJWQAGU_js = require('./chunk-GTJWQAGU.js');
|
|
6
|
-
var
|
|
6
|
+
var chunkNFXCKTE2_js = require('./chunk-NFXCKTE2.js');
|
|
7
7
|
var zod = require('zod');
|
|
8
8
|
|
|
9
9
|
// src/mock/seeds/names.ts
|
|
@@ -612,41 +612,41 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
612
612
|
seating_requests: zod.z.string().optional()
|
|
613
613
|
}), PurchaseIntentSourceInputSchema = zod.z.discriminatedUnion("kind", [
|
|
614
614
|
zod.z.object({
|
|
615
|
-
kind: zod.z.literal(
|
|
615
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.PRODUCT),
|
|
616
616
|
product_id: zod.z.string().min(1)
|
|
617
617
|
}).strict(),
|
|
618
618
|
zod.z.object({
|
|
619
|
-
kind: zod.z.literal(
|
|
619
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.COLLECTION),
|
|
620
620
|
collection_id: zod.z.string().min(1)
|
|
621
621
|
}).strict(),
|
|
622
622
|
zod.z.object({
|
|
623
|
-
kind: zod.z.literal(
|
|
623
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.SALE),
|
|
624
624
|
sale_id: zod.z.string().min(1)
|
|
625
625
|
}).strict(),
|
|
626
626
|
zod.z.object({
|
|
627
|
-
kind: zod.z.literal(
|
|
627
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.POST),
|
|
628
628
|
signed_handoff: zod.z.string().min(1)
|
|
629
629
|
}).strict(),
|
|
630
630
|
zod.z.object({
|
|
631
|
-
kind: zod.z.literal(
|
|
631
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.LIVE),
|
|
632
632
|
signed_handoff: zod.z.string().min(1),
|
|
633
633
|
signed_beat_identity: zod.z.string().min(1)
|
|
634
634
|
}).strict(),
|
|
635
635
|
zod.z.object({
|
|
636
|
-
kind: zod.z.literal(
|
|
636
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.CART),
|
|
637
637
|
cart_id: zod.z.string().min(1)
|
|
638
638
|
}).strict(),
|
|
639
639
|
zod.z.object({
|
|
640
|
-
kind: zod.z.literal(
|
|
640
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.CHAT),
|
|
641
641
|
thread_id: zod.z.string().min(1)
|
|
642
642
|
}).strict()
|
|
643
643
|
]), SellableRefSchema = zod.z.object({
|
|
644
|
-
kind: zod.z.enum(
|
|
644
|
+
kind: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_INTENT_SELLABLE_KIND),
|
|
645
645
|
product_id: zod.z.string().min(1),
|
|
646
646
|
variant_id: zod.z.string().nullish(),
|
|
647
647
|
location_id: zod.z.string().min(1)
|
|
648
648
|
}), OfferRefSchema = zod.z.object({
|
|
649
|
-
kind: zod.z.enum(
|
|
649
|
+
kind: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_INTENT_OFFER_KIND),
|
|
650
650
|
id: zod.z.string().min(1),
|
|
651
651
|
version: zod.z.string().min(1)
|
|
652
652
|
}), CustomerInputSchema = zod.z.object({
|
|
@@ -655,7 +655,7 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
655
655
|
field_type: zod.z.string().optional(),
|
|
656
656
|
value: zod.z.unknown()
|
|
657
657
|
}), DirectLineConfigurationSchema = zod.z.object({
|
|
658
|
-
kind: zod.z.literal(
|
|
658
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_LINE_CONFIGURATION_KIND.SIMPLE),
|
|
659
659
|
variant_id: zod.z.string().nullish(),
|
|
660
660
|
add_ons: zod.z.array(zod.z.object({ option_id: zod.z.string().min(1), quantity: zod.z.number().int().positive() })).optional(),
|
|
661
661
|
customer_inputs: zod.z.array(CustomerInputSchema).optional()
|
|
@@ -664,7 +664,7 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
664
664
|
}), PersistedLineConfigurationSchema = zod.z.discriminatedUnion("kind", [
|
|
665
665
|
DirectLineConfigurationSchema,
|
|
666
666
|
zod.z.object({
|
|
667
|
-
kind: zod.z.literal(
|
|
667
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_LINE_CONFIGURATION_KIND.CART),
|
|
668
668
|
configuration: CartLineConfigurationSchema
|
|
669
669
|
})
|
|
670
670
|
]), PurchaseIntentLineInputSchema = zod.z.object({
|
|
@@ -677,19 +677,19 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
677
677
|
delivery_rate_id: zod.z.string().nullish()
|
|
678
678
|
}), PurchaseIntentTenderPreferenceSchema = zod.z.discriminatedUnion("method_kind", [
|
|
679
679
|
zod.z.object({
|
|
680
|
-
method_kind: zod.z.literal(
|
|
680
|
+
method_kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_PAYMENT_METHOD.CARD),
|
|
681
681
|
stored_instrument_id: zod.z.string().optional()
|
|
682
682
|
}).strict(),
|
|
683
683
|
zod.z.object({
|
|
684
|
-
method_kind: zod.z.literal(
|
|
684
|
+
method_kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_PAYMENT_METHOD.MOBILE_MONEY),
|
|
685
685
|
authority: zod.z.discriminatedUnion("authority_kind", [
|
|
686
686
|
zod.z.object({
|
|
687
|
-
authority_kind: zod.z.literal(
|
|
687
|
+
authority_kind: zod.z.literal(chunkNFXCKTE2_js.MOBILE_MONEY_TENDER_AUTHORITY_KIND.TRANSIENT),
|
|
688
688
|
phone_number: zod.z.string().min(1),
|
|
689
|
-
network: zod.z.enum(
|
|
689
|
+
network: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_INTENT_MOBILE_MONEY_NETWORK)
|
|
690
690
|
}).strict(),
|
|
691
691
|
zod.z.object({
|
|
692
|
-
authority_kind: zod.z.literal(
|
|
692
|
+
authority_kind: zod.z.literal(chunkNFXCKTE2_js.MOBILE_MONEY_TENDER_AUTHORITY_KIND.SAVED_REFERENCE),
|
|
693
693
|
stored_instrument_id: zod.z.string().min(1)
|
|
694
694
|
}).strict()
|
|
695
695
|
])
|
|
@@ -719,11 +719,11 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
719
719
|
...MintBaseShape,
|
|
720
720
|
source: zod.z.union([
|
|
721
721
|
zod.z.object({
|
|
722
|
-
kind: zod.z.literal(
|
|
722
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.CART),
|
|
723
723
|
cart_id: zod.z.string().min(1)
|
|
724
724
|
}).strict(),
|
|
725
725
|
zod.z.object({
|
|
726
|
-
kind: zod.z.literal(
|
|
726
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.CHAT),
|
|
727
727
|
thread_id: zod.z.string().min(1)
|
|
728
728
|
}).strict()
|
|
729
729
|
]),
|
|
@@ -733,23 +733,23 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
733
733
|
...MintBaseShape,
|
|
734
734
|
source: zod.z.union([
|
|
735
735
|
zod.z.object({
|
|
736
|
-
kind: zod.z.literal(
|
|
736
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.PRODUCT),
|
|
737
737
|
product_id: zod.z.string().min(1)
|
|
738
738
|
}).strict(),
|
|
739
739
|
zod.z.object({
|
|
740
|
-
kind: zod.z.literal(
|
|
740
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.COLLECTION),
|
|
741
741
|
collection_id: zod.z.string().min(1)
|
|
742
742
|
}).strict(),
|
|
743
743
|
zod.z.object({
|
|
744
|
-
kind: zod.z.literal(
|
|
744
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.SALE),
|
|
745
745
|
sale_id: zod.z.string().min(1)
|
|
746
746
|
}).strict(),
|
|
747
747
|
zod.z.object({
|
|
748
|
-
kind: zod.z.literal(
|
|
748
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.POST),
|
|
749
749
|
signed_handoff: zod.z.string().min(1)
|
|
750
750
|
}).strict(),
|
|
751
751
|
zod.z.object({
|
|
752
|
-
kind: zod.z.literal(
|
|
752
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND.LIVE),
|
|
753
753
|
signed_handoff: zod.z.string().min(1),
|
|
754
754
|
signed_beat_identity: zod.z.string().min(1)
|
|
755
755
|
}).strict()
|
|
@@ -781,50 +781,50 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
781
781
|
entitlement_digest: zod.z.string(),
|
|
782
782
|
cancellation_terms_digest: zod.z.string()
|
|
783
783
|
}), CheckoutComplianceDecisionSchema = zod.z.object({
|
|
784
|
-
disposition: zod.z.enum(
|
|
784
|
+
disposition: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_DISPOSITION).optional(),
|
|
785
785
|
purchase_policy: zod.z.object({
|
|
786
786
|
policy_version: zod.z.number().int(),
|
|
787
|
-
surface: zod.z.enum(
|
|
787
|
+
surface: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_SURFACE),
|
|
788
788
|
market_region: zod.z.string(),
|
|
789
789
|
store_region: zod.z.string().nullish()
|
|
790
790
|
}).nullish(),
|
|
791
791
|
policy_name: zod.z.string().min(1),
|
|
792
792
|
policy_version: zod.z.number().int().positive(),
|
|
793
|
-
lane: zod.z.enum(
|
|
794
|
-
reason_code: zod.z.enum(
|
|
793
|
+
lane: zod.z.enum(chunkNFXCKTE2_js.CHECKOUT_COMPLIANCE_LANE),
|
|
794
|
+
reason_code: zod.z.enum(chunkNFXCKTE2_js.CHECKOUT_COMPLIANCE_REASON),
|
|
795
795
|
evidence_digest: zod.z.string().min(1)
|
|
796
796
|
}), PaymentInstrumentDisplaySchema = zod.z.discriminatedUnion("kind", [
|
|
797
797
|
zod.z.object({
|
|
798
|
-
kind: zod.z.literal(
|
|
798
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PAYMENT_INSTRUMENT_DISPLAY_KIND.CARD),
|
|
799
799
|
brand: zod.z.string(),
|
|
800
800
|
last4: zod.z.string(),
|
|
801
801
|
exp_month: zod.z.number().int().min(1).max(12),
|
|
802
802
|
exp_year: zod.z.number().int().positive()
|
|
803
803
|
}),
|
|
804
804
|
zod.z.object({
|
|
805
|
-
kind: zod.z.literal(
|
|
805
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PAYMENT_INSTRUMENT_DISPLAY_KIND.MOBILE_MONEY),
|
|
806
806
|
network: zod.z.string(),
|
|
807
807
|
masked_number: zod.z.string()
|
|
808
808
|
}),
|
|
809
|
-
zod.z.object({ kind: zod.z.literal(
|
|
809
|
+
zod.z.object({ kind: zod.z.literal(chunkNFXCKTE2_js.PAYMENT_INSTRUMENT_DISPLAY_KIND.ERASED) })
|
|
810
810
|
]), CheckoutProtectionViewSchema = zod.z.object({
|
|
811
|
-
status: zod.z.enum(
|
|
811
|
+
status: zod.z.enum(chunkNFXCKTE2_js.CHECKOUT_PROTECTION_STATUS),
|
|
812
812
|
message: zod.z.string(),
|
|
813
813
|
public_policy_version: zod.z.string().nullish()
|
|
814
814
|
}), PaymentOptionViewSchema = zod.z.object({
|
|
815
815
|
id: zod.z.string().min(1),
|
|
816
816
|
rank: zod.z.number().int().nonnegative(),
|
|
817
|
-
method_kind: zod.z.enum(
|
|
818
|
-
collection_mode: zod.z.enum(
|
|
819
|
-
provider: zod.z.enum(
|
|
817
|
+
method_kind: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_INTENT_PAYMENT_METHOD),
|
|
818
|
+
collection_mode: zod.z.enum(chunkNFXCKTE2_js.PAYMENT_COLLECTION_MODE),
|
|
819
|
+
provider: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_INTENT_PAYMENT_PROVIDER).nullish(),
|
|
820
820
|
instrument: PaymentInstrumentDisplaySchema.nullish(),
|
|
821
821
|
principal_amount: MoneySchema,
|
|
822
822
|
fee_amount: MoneySchema,
|
|
823
823
|
customer_debit_amount: MoneySchema,
|
|
824
824
|
currency: CurrencyCodeSchema,
|
|
825
825
|
protection: CheckoutProtectionViewSchema,
|
|
826
|
-
status: zod.z.enum(
|
|
827
|
-
expected_next_action: zod.z.enum(
|
|
826
|
+
status: zod.z.enum(chunkNFXCKTE2_js.PAYMENT_OPTION_STATUS),
|
|
827
|
+
expected_next_action: zod.z.enum(chunkNFXCKTE2_js.PAYMENT_OPTION_NEXT_ACTION),
|
|
828
828
|
expires_at: IsoDateTimeSchema
|
|
829
829
|
}), CheckoutTermsViewSchema = registerSchema(
|
|
830
830
|
zod.z.object({
|
|
@@ -847,34 +847,34 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
847
847
|
}
|
|
848
848
|
), PurchasingPrincipalSchema = zod.z.discriminatedUnion("kind", [
|
|
849
849
|
zod.z.object({
|
|
850
|
-
kind: zod.z.literal(
|
|
850
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASING_PRINCIPAL_KIND.ACCOUNT),
|
|
851
851
|
account_id: zod.z.string().min(1)
|
|
852
852
|
}).strict(),
|
|
853
853
|
zod.z.object({
|
|
854
|
-
kind: zod.z.literal(
|
|
854
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASING_PRINCIPAL_KIND.BUSINESS),
|
|
855
855
|
business_id: zod.z.string().min(1)
|
|
856
856
|
}).strict(),
|
|
857
|
-
zod.z.object({ kind: zod.z.literal(
|
|
857
|
+
zod.z.object({ kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASING_PRINCIPAL_KIND.GUEST) }).strict(),
|
|
858
858
|
zod.z.object({
|
|
859
|
-
kind: zod.z.literal(
|
|
859
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASING_PRINCIPAL_KIND.RECOGNISED),
|
|
860
860
|
verified: zod.z.boolean()
|
|
861
861
|
}).strict()
|
|
862
862
|
]), CanonicalSourceAuthoritySchema = zod.z.object({
|
|
863
863
|
store_region: zod.z.string().nullish(),
|
|
864
|
-
native_platform: zod.z.enum(
|
|
865
|
-
purchase_surface: zod.z.enum(
|
|
866
|
-
kind: zod.z.enum(
|
|
864
|
+
native_platform: zod.z.enum(chunkNFXCKTE2_js.NATIVE_PURCHASE_PLATFORM).nullish(),
|
|
865
|
+
purchase_surface: zod.z.enum(chunkNFXCKTE2_js.CHECKOUT_PURCHASE_SURFACE).optional(),
|
|
866
|
+
kind: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_INTENT_SOURCE_KIND),
|
|
867
867
|
source_id: zod.z.string().min(1),
|
|
868
868
|
social_post_id: zod.z.string().nullish(),
|
|
869
869
|
source_version: zod.z.string().min(1),
|
|
870
870
|
seller_business_id: zod.z.string().min(1),
|
|
871
871
|
subject: zod.z.discriminatedUnion("kind", [
|
|
872
872
|
zod.z.object({
|
|
873
|
-
kind: zod.z.literal(
|
|
873
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASING_PRINCIPAL_KIND.ACCOUNT),
|
|
874
874
|
account_id: zod.z.string().min(1)
|
|
875
875
|
}).strict(),
|
|
876
876
|
zod.z.object({
|
|
877
|
-
kind: zod.z.literal(
|
|
877
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.PURCHASING_PRINCIPAL_KIND.BUSINESS),
|
|
878
878
|
business_id: zod.z.string().min(1)
|
|
879
879
|
}).strict()
|
|
880
880
|
]),
|
|
@@ -891,12 +891,12 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
891
891
|
currency: CurrencyCodeSchema
|
|
892
892
|
}).strict(), PurchaseIntentViewSchema = registerSchema(
|
|
893
893
|
zod.z.object({
|
|
894
|
-
disposition: zod.z.enum(
|
|
894
|
+
disposition: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_DISPOSITION).optional(),
|
|
895
895
|
id: zod.z.string().min(1),
|
|
896
896
|
seller_business_id: zod.z.string().min(1),
|
|
897
897
|
principal: PurchasingPrincipalSchema.nullish(),
|
|
898
898
|
revision: zod.z.number().int().nonnegative(),
|
|
899
|
-
status: zod.z.enum(
|
|
899
|
+
status: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_INTENT_STATUS),
|
|
900
900
|
source: CanonicalSourceAuthoritySchema,
|
|
901
901
|
lines: zod.z.array(PurchaseIntentLineViewSchema),
|
|
902
902
|
line_pricing: zod.z.array(PurchaseIntentLinePricingViewSchema),
|
|
@@ -964,17 +964,17 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
964
964
|
payment_id: zod.z.string().optional()
|
|
965
965
|
}, TermsDeltaSchema = zod.z.discriminatedUnion("kind", [
|
|
966
966
|
zod.z.object({
|
|
967
|
-
kind: zod.z.literal(
|
|
968
|
-
component: zod.z.enum(
|
|
967
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.CHECKOUT_TERMS_DELTA_KIND.MONEY),
|
|
968
|
+
component: zod.z.enum(chunkNFXCKTE2_js.CHECKOUT_TERMS_COMPONENT),
|
|
969
969
|
accepted: MoneySchema,
|
|
970
970
|
replacement: MoneySchema
|
|
971
971
|
}),
|
|
972
972
|
zod.z.object({
|
|
973
|
-
kind: zod.z.literal(
|
|
974
|
-
component: zod.z.enum(
|
|
973
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.CHECKOUT_TERMS_DELTA_KIND.MATERIAL),
|
|
974
|
+
component: zod.z.enum(chunkNFXCKTE2_js.CHECKOUT_MATERIAL_TERMS_COMPONENT)
|
|
975
975
|
}),
|
|
976
976
|
zod.z.object({
|
|
977
|
-
kind: zod.z.literal(
|
|
977
|
+
kind: zod.z.literal(chunkNFXCKTE2_js.CHECKOUT_TERMS_DELTA_KIND.PAYMENT_OPTION),
|
|
978
978
|
accepted_option_id: zod.z.string().nullish(),
|
|
979
979
|
accepted_customer_debit_amount: MoneySchema,
|
|
980
980
|
replacement_option_id: zod.z.string().nullish(),
|
|
@@ -983,62 +983,62 @@ var CheckoutAddressInfoSchema = zod.z.object({
|
|
|
983
983
|
]), ConfirmPurchaseIntentResponseSchema = registerSchema(
|
|
984
984
|
zod.z.discriminatedUnion("status", [
|
|
985
985
|
zod.z.looseObject({
|
|
986
|
-
status: zod.z.literal(
|
|
986
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.ORDER_CREATED),
|
|
987
987
|
...CommittedResponseShape
|
|
988
988
|
}),
|
|
989
989
|
zod.z.looseObject({
|
|
990
|
-
status: zod.z.literal(
|
|
990
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.COLLECTION_PROCESSING),
|
|
991
991
|
...CommittedResponseShape
|
|
992
992
|
}),
|
|
993
993
|
zod.z.looseObject({
|
|
994
|
-
status: zod.z.literal(
|
|
994
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.PAYMENT_OUTCOME_UNKNOWN),
|
|
995
995
|
...CommittedResponseShape
|
|
996
996
|
}),
|
|
997
997
|
zod.z.looseObject({
|
|
998
|
-
status: zod.z.literal(
|
|
998
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.PAYMENT_FAILED),
|
|
999
999
|
...CommittedResponseShape
|
|
1000
1000
|
}),
|
|
1001
1001
|
zod.z.looseObject({
|
|
1002
|
-
status: zod.z.literal(
|
|
1002
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.REDIRECT_REQUIRED),
|
|
1003
1003
|
...CommittedResponseShape,
|
|
1004
1004
|
authorization_url: zod.z.string().min(1)
|
|
1005
1005
|
}),
|
|
1006
1006
|
zod.z.looseObject({
|
|
1007
|
-
status: zod.z.literal(
|
|
1007
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.CARD_POPUP_REQUIRED),
|
|
1008
1008
|
...CommittedResponseShape,
|
|
1009
|
-
provider: zod.z.enum(
|
|
1009
|
+
provider: zod.z.enum(chunkNFXCKTE2_js.PURCHASE_INTENT_PAYMENT_PROVIDER),
|
|
1010
1010
|
client_secret: zod.z.string().min(1),
|
|
1011
1011
|
public_key: zod.z.string().min(1),
|
|
1012
1012
|
provider_account_id: zod.z.string().min(1).nullish()
|
|
1013
1013
|
}),
|
|
1014
1014
|
zod.z.looseObject({
|
|
1015
|
-
status: zod.z.literal(
|
|
1015
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.AUTHORIZATION_REQUIRED),
|
|
1016
1016
|
...CommittedResponseShape,
|
|
1017
1017
|
authorization_type: AuthorizationTypeSchema,
|
|
1018
1018
|
display_text: zod.z.string().optional()
|
|
1019
1019
|
}),
|
|
1020
1020
|
zod.z.looseObject({
|
|
1021
|
-
status: zod.z.literal(
|
|
1021
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.TERMS_CHANGED),
|
|
1022
1022
|
intent_id: zod.z.string().min(1),
|
|
1023
1023
|
replacement: CheckoutTermsViewSchema,
|
|
1024
1024
|
deltas: zod.z.array(TermsDeltaSchema)
|
|
1025
1025
|
}),
|
|
1026
1026
|
zod.z.looseObject({
|
|
1027
|
-
status: zod.z.literal(
|
|
1027
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.SELECTION_UNAVAILABLE),
|
|
1028
1028
|
intent_id: zod.z.string().min(1),
|
|
1029
1029
|
lines: zod.z.array(
|
|
1030
1030
|
zod.z.object({
|
|
1031
1031
|
line_id: zod.z.string().min(1),
|
|
1032
|
-
reason: zod.z.enum(
|
|
1032
|
+
reason: zod.z.enum(chunkNFXCKTE2_js.CHECKOUT_INVALIDATION_REASON)
|
|
1033
1033
|
})
|
|
1034
1034
|
)
|
|
1035
1035
|
}),
|
|
1036
1036
|
zod.z.looseObject({
|
|
1037
|
-
status: zod.z.literal(
|
|
1037
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.OFFER_ENDED),
|
|
1038
1038
|
intent_id: zod.z.string().min(1)
|
|
1039
1039
|
}),
|
|
1040
1040
|
zod.z.looseObject({
|
|
1041
|
-
status: zod.z.literal(
|
|
1041
|
+
status: zod.z.literal(chunkNFXCKTE2_js.PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE),
|
|
1042
1042
|
intent_id: zod.z.string().min(1)
|
|
1043
1043
|
})
|
|
1044
1044
|
]),
|
|
@@ -1089,7 +1089,7 @@ async function toForwardedRequest(input, init) {
|
|
|
1089
1089
|
};
|
|
1090
1090
|
}
|
|
1091
1091
|
function createTestClient(options = {}) {
|
|
1092
|
-
let mock =
|
|
1092
|
+
let mock = chunkMHDUUSG6_js.createMockApp(options), sessionToken, client = chunkETZDIISN_js.createCimplifyClient({
|
|
1093
1093
|
baseUrl: TEST_BASE_URL,
|
|
1094
1094
|
// Link mock lives at /v1/link on the same Hono app, so point the SDK's
|
|
1095
1095
|
// separate Link transport at the same TEST_BASE_URL.
|