@cimplify/sdk 0.107.0 → 0.108.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 +22 -22
- package/dist/advanced.mjs +3 -3
- package/dist/{catalogue-BohD-jU_.d.mts → catalogue-B4eLL8Mi.d.ts} +2 -1
- package/dist/{catalogue-C4xKpirp.d.ts → catalogue-OT89_Ifs.d.mts} +2 -1
- package/dist/{chunk-73HY36Z7.js → chunk-5QW7CQBA.js} +70 -70
- package/dist/{chunk-AVXA4F6G.js → chunk-ANT574FD.js} +29 -0
- package/dist/{chunk-W4ZFZPPY.js → chunk-EDK3LNM6.js} +152 -147
- package/dist/{chunk-HKCB73AJ.js → chunk-F7J3HK27.js} +211 -177
- package/dist/{chunk-NYDVVNZI.mjs → chunk-JRGK3NXR.mjs} +1 -1
- package/dist/{chunk-IWZKCL3P.mjs → chunk-JVODCGFP.mjs} +3 -3
- package/dist/{chunk-NJYR6GGM.mjs → chunk-KG3WT4PR.mjs} +29 -1
- package/dist/{chunk-P4HYAV3L.mjs → chunk-SUCE7FWA.mjs} +7 -2
- package/dist/{chunk-2I6YKE6Q.mjs → chunk-U6ACF76H.mjs} +36 -3
- package/dist/{chunk-NX5YBQZP.js → chunk-UVRPC2P7.js} +73 -62
- package/dist/{chunk-UYFTOIFW.js → chunk-V32BCG7M.js} +6 -6
- package/dist/{chunk-MKZXZDHE.mjs → chunk-XBL3TMPC.mjs} +14 -3
- package/dist/{client-ByURQZM9.d.ts → client-B878xeAP.d.ts} +2 -2
- package/dist/{client-BBFfAtn4.d.mts → client-BSP9U1O1.d.mts} +2 -2
- package/dist/{elements-Dtqe9Ekd.d.mts → elements-Bty6Qs_N.d.mts} +117 -6
- package/dist/{elements-Dtqe9Ekd.d.ts → elements-Bty6Qs_N.d.ts} +117 -6
- package/dist/{index-DFqDU6yU.d.ts → index-B7oA_1XI.d.ts} +2 -2
- package/dist/{index-B6mukQYB.d.mts → index-CQStGb3B.d.mts} +2 -2
- package/dist/{index-CvLuAMjQ.d.ts → index-DJwXmoaP.d.ts} +2 -2
- package/dist/{index-7oz-hVVA.d.mts → index-DhUSTAhT.d.mts} +2 -2
- package/dist/index.d.mts +21 -8
- package/dist/index.d.ts +21 -8
- package/dist/index.js +160 -152
- package/dist/index.mjs +5 -5
- package/dist/mock/cli.mjs +16 -2
- package/dist/mock/library.js +16 -2
- package/dist/mock/library.mjs +16 -2
- package/dist/mock/msw.js +16 -2
- package/dist/mock/msw.mjs +16 -2
- package/dist/{price-Pyq-vlrm.d.mts → price-CSztR02F.d.mts} +1 -1
- package/dist/{price-B4jL81ef.d.ts → price-C_vasx9A.d.ts} +1 -1
- package/dist/react.d.mts +3 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.js +151 -151
- package/dist/react.mjs +4 -4
- package/dist/{server-Cowuvfbr.d.ts → server-B6dW7-Lj.d.mts} +1 -1
- package/dist/{server-KilvZJU0.d.mts → server-Dckg4Vdr.d.ts} +1 -1
- package/dist/server.d.mts +3 -3
- package/dist/server.d.ts +3 -3
- package/dist/server.js +10 -10
- package/dist/server.mjs +4 -4
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +3 -3
- package/dist/testing/msw.mjs +2 -2
- package/dist/testing/suite.d.mts +5 -5
- package/dist/testing/suite.d.ts +5 -5
- package/dist/testing/suite.js +26 -26
- package/dist/testing/suite.mjs +6 -6
- package/dist/testing.d.mts +4 -4
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +118 -118
- package/dist/testing.mjs +7 -7
- package/dist/utils.d.mts +3 -3
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +32 -32
- package/dist/utils.mjs +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { BOUNDARY_KIND, CIMPLIFY_CDN_HOSTS, DEFAULT_CDN_BASE_URL, DURATION_UNIT, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT, allGalleryImages, assetUrl, chatMessageCards, displaysGrossPrices, getVariantDisplayName, isCimplifyAsset, isMultiDayService, priceBasisLabel, resolveGallery, serviceBillingMultiplier, stayLength, stayPeriods } from './chunk-3V4DVXV3.mjs';
|
|
2
2
|
export { isValidPhoneForContext, normalizePhoneToE164, resolvePhoneCountryCode } from './chunk-YOIVZ6OA.mjs';
|
|
3
|
-
export { ActivityService, CimplifyClient, DeliveryService, HostedPurchaseIntentService, PURCHASE_INTENT_ROUTE, PlacesService, PurchaseIntentResolver, PurchaseIntentService, SESSION_CHANGE_SOURCE, SessionService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-
|
|
3
|
+
export { ActivityService, CimplifyClient, DeliveryService, HostedPurchaseIntentService, PURCHASE_INTENT_ROUTE, PlacesService, PurchaseIntentResolver, PurchaseIntentService, SESSION_CHANGE_SOURCE, SessionService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-SUCE7FWA.mjs';
|
|
4
4
|
import './chunk-U4MW6PYU.mjs';
|
|
5
|
-
import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-
|
|
6
|
-
export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, PAYMENT_AUTHORIZATION_OUTCOME_STATUS, PAYMENT_AUTHORIZATION_PROVIDER, PaymentAuthorizationAdapterRegistry, PaystackAuthorizationAdapter, SchedulingService, StripeAuthorizationAdapter, clearIntentIdempotencyKey as clearPurchaseIntentIdempotencyKey, combine, combineObject, createDefaultPaymentAuthorizationAdapterRegistry, createElements, createPurchaseIntentConfirmation, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, intentIdempotencyKey as purchaseIntentIdempotencyKey, purchaseIntentRequiresPaymentOption, selectPurchaseIntentPaymentOption, startSignIn, toNullable, tryCatch, unwrap } from './chunk-
|
|
5
|
+
import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-U6ACF76H.mjs';
|
|
6
|
+
export { AuthService, BusinessService, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyElement, CimplifyElements, ELEMENTS_AUTH_CONTACT_TYPES, ELEMENTS_AUTH_MODES, ELEMENTS_AUTH_PROMPTS, ELEMENT_TYPES, EVENT_TYPES, FxService, InventoryService, LinkService, LiteService, MESSAGE_TYPES, OrderQueries, PAYMENT_AUTHORIZATION_OUTCOME_STATUS, PAYMENT_AUTHORIZATION_PROVIDER, PaymentAuthorizationAdapterRegistry, PaystackAuthorizationAdapter, SchedulingService, StripeAuthorizationAdapter, clearIntentIdempotencyKey as clearPurchaseIntentIdempotencyKey, combine, combineObject, confirmationForUnchangedReplacement, createDefaultPaymentAuthorizationAdapterRegistry, createElements, createPurchaseIntentConfirmation, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, intentIdempotencyKey as purchaseIntentIdempotencyKey, purchaseIntentRequiresPaymentOption, selectPurchaseIntentPaymentOption, startSignIn, toNullable, tryCatch, unwrap } from './chunk-U6ACF76H.mjs';
|
|
7
7
|
export { AUTHORIZATION_TYPE, AUTH_MUTATION, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_NEXT_ACTION, CHECKOUT_ORDER_RESULT_STATUS, CHECKOUT_STATUS, CHECKOUT_STEP, CONTACT_TYPE, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, LINK_MUTATION, LINK_QUERY, MAX_PAYMENT_AUTHORIZATION_STEPS, MOBILE_MONEY_PROVIDER, ORDER_MUTATION, ORDER_TYPE, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE } from './chunk-33VCYWVL.mjs';
|
|
8
|
-
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, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice, paymentAuthorizationUrl, purchaseIntentMobileMoneyNetwork } from './chunk-
|
|
9
|
-
export { CHECKOUT_COMPLIANCE_LANE, CHECKOUT_COMPLIANCE_REASON, CHECKOUT_INVALIDATION_REASON, CHECKOUT_MATERIAL_TERMS_COMPONENT, CHECKOUT_PROTECTION_STATUS, CHECKOUT_PURCHASE_SURFACE, CHECKOUT_TERMS_COMPONENT, CHECKOUT_TERMS_DELTA_KIND, CimplifyError, ERROR_HINTS, ErrorCode, IdempotencyMismatchError, LEGACY_CHECKOUT_PAYMENT_METHOD_ALIAS, LEGACY_CHECKOUT_PAYMENT_STATUS, MOBILE_MONEY_TENDER_AUTHORITY_KIND, NATIVE_PURCHASE_PLATFORM, PAYMENT_COLLECTION_MODE, PAYMENT_INSTRUMENT_DISPLAY_KIND, PAYMENT_OPTION_NEXT_ACTION, PAYMENT_OPTION_STATUS, PURCHASE_DISPOSITION, PURCHASE_INTENT_ACTION_DECISION, PURCHASE_INTENT_CONFIRM_STATUS, PURCHASE_INTENT_ERROR_CODE, PURCHASE_INTENT_LINE_CONFIGURATION_KIND, PURCHASE_INTENT_MOBILE_MONEY_NETWORK, PURCHASE_INTENT_OFFER_KIND, PURCHASE_INTENT_PAYMENT_METHOD, PURCHASE_INTENT_PAYMENT_PROVIDER, PURCHASE_INTENT_RESOLUTION_KIND, PURCHASE_INTENT_RESOLVE_STATUS, PURCHASE_INTENT_SELLABLE_KIND, PURCHASE_INTENT_SOURCE_KIND, PURCHASE_INTENT_STATUS, PURCHASE_SURFACE, PURCHASING_PRINCIPAL_KIND, ZERO, currencyCode, enrichError, getErrorHint, isCimplifyError, isIdempotencyMismatchError, isQuoteConflictRequiringConsent, isQuoteError, isRetryableError, isSupportedCurrency, money, moneyFromNumber } from './chunk-
|
|
8
|
+
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, hasTaxInfo, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isTaxInclusive, normalizePaymentResponse, normalizeStatusResponse, parsePrice, paymentAuthorizationUrl, purchaseIntentMobileMoneyNetwork } from './chunk-JRGK3NXR.mjs';
|
|
9
|
+
export { CHECKOUT_COMPLIANCE_LANE, CHECKOUT_COMPLIANCE_REASON, CHECKOUT_INVALIDATION_REASON, CHECKOUT_MATERIAL_TERMS_COMPONENT, CHECKOUT_PROTECTION_STATUS, CHECKOUT_PURCHASE_SURFACE, CHECKOUT_TERMS_COMPONENT, CHECKOUT_TERMS_DELTA_KIND, CimplifyError, ERROR_HINTS, ErrorCode, IdempotencyMismatchError, LEGACY_CHECKOUT_PAYMENT_METHOD_ALIAS, LEGACY_CHECKOUT_PAYMENT_STATUS, MOBILE_MONEY_TENDER_AUTHORITY_KIND, NATIVE_PURCHASE_PLATFORM, PAYMENT_COLLECTION_MODE, PAYMENT_INSTRUMENT_DISPLAY_KIND, PAYMENT_OPTION_NEXT_ACTION, PAYMENT_OPTION_STATUS, PURCHASE_DISPOSITION, PURCHASE_INTENT_ACTION_DECISION, PURCHASE_INTENT_CONFIRM_STATUS, PURCHASE_INTENT_ERROR_CODE, PURCHASE_INTENT_LINE_CONFIGURATION_KIND, PURCHASE_INTENT_MOBILE_MONEY_NETWORK, PURCHASE_INTENT_OFFER_KIND, PURCHASE_INTENT_PAYMENT_METHOD, PURCHASE_INTENT_PAYMENT_PROVIDER, PURCHASE_INTENT_RESOLUTION_KIND, PURCHASE_INTENT_RESOLVE_STATUS, PURCHASE_INTENT_SELLABLE_KIND, PURCHASE_INTENT_SOURCE_KIND, PURCHASE_INTENT_STATUS, PURCHASE_SURFACE, PURCHASING_PRINCIPAL_KIND, SOURCE_REFUSAL, ZERO, currencyCode, enrichError, getErrorHint, isCimplifyError, isIdempotencyMismatchError, isQuoteConflictRequiringConsent, isQuoteError, isRetryableError, isSupportedCurrency, money, moneyFromNumber } from './chunk-KG3WT4PR.mjs';
|
|
10
10
|
import './chunk-3G6RQLXK.mjs';
|
|
11
11
|
|
|
12
12
|
// src/silent-sign-in.ts
|
package/dist/mock/cli.mjs
CHANGED
|
@@ -3602,6 +3602,9 @@ var PURCHASE_INTENT_CONFIRM_STATUS = {
|
|
|
3602
3602
|
SELECTION_UNAVAILABLE: "selection_unavailable",
|
|
3603
3603
|
SOURCE_UNAVAILABLE: "source_unavailable"
|
|
3604
3604
|
};
|
|
3605
|
+
var SOURCE_REFUSAL = {
|
|
3606
|
+
CART_NOT_ACTIVE: "cart_not_active",
|
|
3607
|
+
SOURCE_NOT_FOUND: "source_not_found"};
|
|
3605
3608
|
|
|
3606
3609
|
// src/mock/routes/v1.ts
|
|
3607
3610
|
var PURCHASE_INTENT_ROUTE = {
|
|
@@ -7373,8 +7376,19 @@ function createPurchaseIntentMockService(options) {
|
|
|
7373
7376
|
const checkoutInput = intent.mint_request.checkout;
|
|
7374
7377
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
7375
7378
|
const cart = registry.carts.get(intent.mint_request.source.cart_id);
|
|
7376
|
-
if (!cart
|
|
7377
|
-
return {
|
|
7379
|
+
if (!cart) {
|
|
7380
|
+
return {
|
|
7381
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
7382
|
+
intent_id: intent.id,
|
|
7383
|
+
reason: SOURCE_REFUSAL.SOURCE_NOT_FOUND
|
|
7384
|
+
};
|
|
7385
|
+
}
|
|
7386
|
+
if (cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
|
|
7387
|
+
return {
|
|
7388
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
7389
|
+
intent_id: intent.id,
|
|
7390
|
+
reason: SOURCE_REFUSAL.CART_NOT_ACTIVE
|
|
7391
|
+
};
|
|
7378
7392
|
}
|
|
7379
7393
|
const attemptId = ids.raw(MOCK_PURCHASE_INTENT.ID_PREFIX.ATTEMPT);
|
|
7380
7394
|
const orderId = ids.order();
|
package/dist/mock/library.js
CHANGED
|
@@ -2424,6 +2424,9 @@ var PURCHASE_INTENT_CONFIRM_STATUS = {
|
|
|
2424
2424
|
SELECTION_UNAVAILABLE: "selection_unavailable",
|
|
2425
2425
|
SOURCE_UNAVAILABLE: "source_unavailable"
|
|
2426
2426
|
};
|
|
2427
|
+
var SOURCE_REFUSAL = {
|
|
2428
|
+
CART_NOT_ACTIVE: "cart_not_active",
|
|
2429
|
+
SOURCE_NOT_FOUND: "source_not_found"};
|
|
2427
2430
|
|
|
2428
2431
|
// src/mock/routes/v1.ts
|
|
2429
2432
|
var PURCHASE_INTENT_ROUTE = {
|
|
@@ -6195,8 +6198,19 @@ function createPurchaseIntentMockService(options) {
|
|
|
6195
6198
|
const checkoutInput = intent.mint_request.checkout;
|
|
6196
6199
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
6197
6200
|
const cart = registry.carts.get(intent.mint_request.source.cart_id);
|
|
6198
|
-
if (!cart
|
|
6199
|
-
return {
|
|
6201
|
+
if (!cart) {
|
|
6202
|
+
return {
|
|
6203
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
6204
|
+
intent_id: intent.id,
|
|
6205
|
+
reason: SOURCE_REFUSAL.SOURCE_NOT_FOUND
|
|
6206
|
+
};
|
|
6207
|
+
}
|
|
6208
|
+
if (cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
|
|
6209
|
+
return {
|
|
6210
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
6211
|
+
intent_id: intent.id,
|
|
6212
|
+
reason: SOURCE_REFUSAL.CART_NOT_ACTIVE
|
|
6213
|
+
};
|
|
6200
6214
|
}
|
|
6201
6215
|
const attemptId = ids.raw(MOCK_PURCHASE_INTENT.ID_PREFIX.ATTEMPT);
|
|
6202
6216
|
const orderId = ids.order();
|
package/dist/mock/library.mjs
CHANGED
|
@@ -2422,6 +2422,9 @@ var PURCHASE_INTENT_CONFIRM_STATUS = {
|
|
|
2422
2422
|
SELECTION_UNAVAILABLE: "selection_unavailable",
|
|
2423
2423
|
SOURCE_UNAVAILABLE: "source_unavailable"
|
|
2424
2424
|
};
|
|
2425
|
+
var SOURCE_REFUSAL = {
|
|
2426
|
+
CART_NOT_ACTIVE: "cart_not_active",
|
|
2427
|
+
SOURCE_NOT_FOUND: "source_not_found"};
|
|
2425
2428
|
|
|
2426
2429
|
// src/mock/routes/v1.ts
|
|
2427
2430
|
var PURCHASE_INTENT_ROUTE = {
|
|
@@ -6193,8 +6196,19 @@ function createPurchaseIntentMockService(options) {
|
|
|
6193
6196
|
const checkoutInput = intent.mint_request.checkout;
|
|
6194
6197
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
6195
6198
|
const cart = registry.carts.get(intent.mint_request.source.cart_id);
|
|
6196
|
-
if (!cart
|
|
6197
|
-
return {
|
|
6199
|
+
if (!cart) {
|
|
6200
|
+
return {
|
|
6201
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
6202
|
+
intent_id: intent.id,
|
|
6203
|
+
reason: SOURCE_REFUSAL.SOURCE_NOT_FOUND
|
|
6204
|
+
};
|
|
6205
|
+
}
|
|
6206
|
+
if (cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
|
|
6207
|
+
return {
|
|
6208
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
6209
|
+
intent_id: intent.id,
|
|
6210
|
+
reason: SOURCE_REFUSAL.CART_NOT_ACTIVE
|
|
6211
|
+
};
|
|
6198
6212
|
}
|
|
6199
6213
|
const attemptId = ids.raw(MOCK_PURCHASE_INTENT.ID_PREFIX.ATTEMPT);
|
|
6200
6214
|
const orderId = ids.order();
|
package/dist/mock/msw.js
CHANGED
|
@@ -2422,6 +2422,9 @@ var PURCHASE_INTENT_CONFIRM_STATUS = {
|
|
|
2422
2422
|
SELECTION_UNAVAILABLE: "selection_unavailable",
|
|
2423
2423
|
SOURCE_UNAVAILABLE: "source_unavailable"
|
|
2424
2424
|
};
|
|
2425
|
+
var SOURCE_REFUSAL = {
|
|
2426
|
+
CART_NOT_ACTIVE: "cart_not_active",
|
|
2427
|
+
SOURCE_NOT_FOUND: "source_not_found"};
|
|
2425
2428
|
|
|
2426
2429
|
// src/mock/routes/v1.ts
|
|
2427
2430
|
var PURCHASE_INTENT_ROUTE = {
|
|
@@ -6193,8 +6196,19 @@ function createPurchaseIntentMockService(options) {
|
|
|
6193
6196
|
const checkoutInput = intent.mint_request.checkout;
|
|
6194
6197
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
6195
6198
|
const cart = registry.carts.get(intent.mint_request.source.cart_id);
|
|
6196
|
-
if (!cart
|
|
6197
|
-
return {
|
|
6199
|
+
if (!cart) {
|
|
6200
|
+
return {
|
|
6201
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
6202
|
+
intent_id: intent.id,
|
|
6203
|
+
reason: SOURCE_REFUSAL.SOURCE_NOT_FOUND
|
|
6204
|
+
};
|
|
6205
|
+
}
|
|
6206
|
+
if (cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
|
|
6207
|
+
return {
|
|
6208
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
6209
|
+
intent_id: intent.id,
|
|
6210
|
+
reason: SOURCE_REFUSAL.CART_NOT_ACTIVE
|
|
6211
|
+
};
|
|
6198
6212
|
}
|
|
6199
6213
|
const attemptId = ids.raw(MOCK_PURCHASE_INTENT.ID_PREFIX.ATTEMPT);
|
|
6200
6214
|
const orderId = ids.order();
|
package/dist/mock/msw.mjs
CHANGED
|
@@ -2420,6 +2420,9 @@ var PURCHASE_INTENT_CONFIRM_STATUS = {
|
|
|
2420
2420
|
SELECTION_UNAVAILABLE: "selection_unavailable",
|
|
2421
2421
|
SOURCE_UNAVAILABLE: "source_unavailable"
|
|
2422
2422
|
};
|
|
2423
|
+
var SOURCE_REFUSAL = {
|
|
2424
|
+
CART_NOT_ACTIVE: "cart_not_active",
|
|
2425
|
+
SOURCE_NOT_FOUND: "source_not_found"};
|
|
2423
2426
|
|
|
2424
2427
|
// src/mock/routes/v1.ts
|
|
2425
2428
|
var PURCHASE_INTENT_ROUTE = {
|
|
@@ -6191,8 +6194,19 @@ function createPurchaseIntentMockService(options) {
|
|
|
6191
6194
|
const checkoutInput = intent.mint_request.checkout;
|
|
6192
6195
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
6193
6196
|
const cart = registry.carts.get(intent.mint_request.source.cart_id);
|
|
6194
|
-
if (!cart
|
|
6195
|
-
return {
|
|
6197
|
+
if (!cart) {
|
|
6198
|
+
return {
|
|
6199
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
6200
|
+
intent_id: intent.id,
|
|
6201
|
+
reason: SOURCE_REFUSAL.SOURCE_NOT_FOUND
|
|
6202
|
+
};
|
|
6203
|
+
}
|
|
6204
|
+
if (cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
|
|
6205
|
+
return {
|
|
6206
|
+
status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE,
|
|
6207
|
+
intent_id: intent.id,
|
|
6208
|
+
reason: SOURCE_REFUSAL.CART_NOT_ACTIVE
|
|
6209
|
+
};
|
|
6196
6210
|
}
|
|
6197
6211
|
const attemptId = ids.raw(MOCK_PURCHASE_INTENT.ID_PREFIX.ATTEMPT);
|
|
6198
6212
|
const orderId = ids.order();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './elements-
|
|
1
|
+
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './elements-Bty6Qs_N.mjs';
|
|
2
2
|
|
|
3
3
|
interface ProductWithPrice {
|
|
4
4
|
price_info?: ChosenPrice;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './elements-
|
|
1
|
+
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './elements-Bty6Qs_N.js';
|
|
2
2
|
|
|
3
3
|
interface ProductWithPrice {
|
|
4
4
|
price_info?: ChosenPrice;
|
package/dist/react.d.mts
CHANGED
|
@@ -2,10 +2,10 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode, PointerEvent, MouseEvent } from 'react';
|
|
3
3
|
import { d as AdSlot, c as AdPosition, a as AdContextValue, S as SignInOptions } from './sign-in-DQlIdqsi.mjs';
|
|
4
4
|
export { A as AdConfig, g as getVariantDisplayName } from './sign-in-DQlIdqsi.mjs';
|
|
5
|
-
import { C as CimplifyClient, aj as EnrichedOrderItem, ai as EnrichedOrder, u as Business, aN as Location, bQ as ReorderResult, be as OrderStatus, aV as Order, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bs as PriceQuote, bG as QuoteUiMessage, c8 as Service, p as AvailableSlot, a8 as DayAvailability, a5 as CustomerBooking, F as CancelBookingResult, h as ActivityStateResponse, ci as SessionMessage, A as ActivityRecommendation, aa as DeliveryFeeResponse, ae as DeliveryOptionsResponse, aw as FxRateResponse, cs as StoreCreditBalance, cu as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cm as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-
|
|
6
|
-
import {
|
|
5
|
+
import { C as CimplifyClient, aj as EnrichedOrderItem, ai as EnrichedOrder, u as Business, aN as Location, bQ as ReorderResult, be as OrderStatus, aV as Order, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bs as PriceQuote, bG as QuoteUiMessage, c8 as Service, p as AvailableSlot, a8 as DayAvailability, a5 as CustomerBooking, F as CancelBookingResult, h as ActivityStateResponse, ci as SessionMessage, A as ActivityRecommendation, aa as DeliveryFeeResponse, ae as DeliveryOptionsResponse, aw as FxRateResponse, cs as StoreCreditBalance, cu as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cm as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-OT89_Ifs.mjs';
|
|
6
|
+
import { j as CheckoutTermsView, cR as OrderType, dL as ProcessCheckoutResult, aY as CheckoutStatus, aZ as CheckoutStatusContext, C as CurrencyCode, P as Product, de as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cJ as Money, a as ChosenPrice, a3 as BundleSelectionInput, b8 as ComponentSelectionInput, a2 as BundleSelectionData, bh as CompositeSelectionData, d as Collection, dU as ProductTaxonomy, eL as TaxonomyWithChildren, dV as ProductTimeProfile, bz as Deal, dQ as ProductDealInfo, bJ as DiscountValidation, a5 as BundleSummary, bf as CompositePriceResult, eG as SubscriptionWithDetails, eF as SubscriptionStatus, eC as Subscription, bn as CustomAttributeDefinition, dZ as PropertyFacet, dP as ProductBillingPlan, f3 as VariantView, eZ as VariantAxisWithValues, y as AddressInfo, L as AuthenticatedData, c5 as ElementsOptions, dp as PaymentMethodInfo, c3 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, u as AddOnWithOptions, $ as BundleComponentView, a0 as BundlePriceType, bd as CompositeGroupView, bM as DisplayCart, dR as ProductInputField, z as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, W as BoundaryKind, et as SchedulingMode, bB as DepositType, bo as CustomAttributeValue, dS as ProductProperty, ei as QuantityPricingTier } from './elements-Bty6Qs_N.mjs';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import { P as ProductWithPrice } from './price-
|
|
8
|
+
import { P as ProductWithPrice } from './price-CSztR02F.mjs';
|
|
9
9
|
import { ClassValue } from 'clsx';
|
|
10
10
|
import { Matcher } from 'react-day-picker';
|
|
11
11
|
|
package/dist/react.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import * as React$1 from 'react';
|
|
|
2
2
|
import React__default, { ReactNode, PointerEvent, MouseEvent } from 'react';
|
|
3
3
|
import { d as AdSlot, c as AdPosition, a as AdContextValue, S as SignInOptions } from './sign-in-DQlIdqsi.js';
|
|
4
4
|
export { A as AdConfig, g as getVariantDisplayName } from './sign-in-DQlIdqsi.js';
|
|
5
|
-
import { C as CimplifyClient, aj as EnrichedOrderItem, ai as EnrichedOrder, u as Business, aN as Location, bQ as ReorderResult, be as OrderStatus, aV as Order, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bs as PriceQuote, bG as QuoteUiMessage, c8 as Service, p as AvailableSlot, a8 as DayAvailability, a5 as CustomerBooking, F as CancelBookingResult, h as ActivityStateResponse, ci as SessionMessage, A as ActivityRecommendation, aa as DeliveryFeeResponse, ae as DeliveryOptionsResponse, aw as FxRateResponse, cs as StoreCreditBalance, cu as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cm as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-
|
|
6
|
-
import {
|
|
5
|
+
import { C as CimplifyClient, aj as EnrichedOrderItem, ai as EnrichedOrder, u as Business, aN as Location, bQ as ReorderResult, be as OrderStatus, aV as Order, bC as QuoteBundleSelectionInput, bD as QuoteCompositeSelectionInput, bs as PriceQuote, bG as QuoteUiMessage, c8 as Service, p as AvailableSlot, a8 as DayAvailability, a5 as CustomerBooking, F as CancelBookingResult, h as ActivityStateResponse, ci as SessionMessage, A as ActivityRecommendation, aa as DeliveryFeeResponse, ae as DeliveryOptionsResponse, aw as FxRateResponse, cs as StoreCreditBalance, cu as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cm as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-B4eLL8Mi.js';
|
|
6
|
+
import { j as CheckoutTermsView, cR as OrderType, dL as ProcessCheckoutResult, aY as CheckoutStatus, aZ as CheckoutStatusContext, C as CurrencyCode, P as Product, de as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cJ as Money, a as ChosenPrice, a3 as BundleSelectionInput, b8 as ComponentSelectionInput, a2 as BundleSelectionData, bh as CompositeSelectionData, d as Collection, dU as ProductTaxonomy, eL as TaxonomyWithChildren, dV as ProductTimeProfile, bz as Deal, dQ as ProductDealInfo, bJ as DiscountValidation, a5 as BundleSummary, bf as CompositePriceResult, eG as SubscriptionWithDetails, eF as SubscriptionStatus, eC as Subscription, bn as CustomAttributeDefinition, dZ as PropertyFacet, dP as ProductBillingPlan, f3 as VariantView, eZ as VariantAxisWithValues, y as AddressInfo, L as AuthenticatedData, c5 as ElementsOptions, dp as PaymentMethodInfo, c3 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, u as AddOnWithOptions, $ as BundleComponentView, a0 as BundlePriceType, bd as CompositeGroupView, bM as DisplayCart, dR as ProductInputField, z as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, W as BoundaryKind, et as SchedulingMode, bB as DepositType, bo as CustomAttributeValue, dS as ProductProperty, ei as QuantityPricingTier } from './elements-Bty6Qs_N.js';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import { P as ProductWithPrice } from './price-
|
|
8
|
+
import { P as ProductWithPrice } from './price-C_vasx9A.js';
|
|
9
9
|
import { ClassValue } from 'clsx';
|
|
10
10
|
import { Matcher } from 'react-day-picker';
|
|
11
11
|
|