@cimplify/sdk 0.107.0 → 0.107.1

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.
Files changed (64) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/advanced.js +22 -22
  4. package/dist/advanced.mjs +3 -3
  5. package/dist/{catalogue-C4xKpirp.d.ts → catalogue-AmW4XjaN.d.ts} +2 -1
  6. package/dist/{catalogue-BohD-jU_.d.mts → catalogue-rWd71Xi-.d.mts} +2 -1
  7. package/dist/{chunk-AVXA4F6G.js → chunk-ANT574FD.js} +29 -0
  8. package/dist/{chunk-W4ZFZPPY.js → chunk-CEML2737.js} +152 -147
  9. package/dist/{chunk-NYDVVNZI.mjs → chunk-JRGK3NXR.mjs} +1 -1
  10. package/dist/{chunk-NJYR6GGM.mjs → chunk-KG3WT4PR.mjs} +29 -1
  11. package/dist/{chunk-IWZKCL3P.mjs → chunk-NZMU7UUA.mjs} +3 -3
  12. package/dist/{chunk-HKCB73AJ.js → chunk-ONII7K3T.js} +177 -177
  13. package/dist/{chunk-2I6YKE6Q.mjs → chunk-OTPLI3JY.mjs} +2 -2
  14. package/dist/{chunk-P4HYAV3L.mjs → chunk-T4OU77DM.mjs} +7 -2
  15. package/dist/{chunk-73HY36Z7.js → chunk-THSYGWUA.js} +70 -70
  16. package/dist/{chunk-NX5YBQZP.js → chunk-UVRPC2P7.js} +73 -62
  17. package/dist/{chunk-UYFTOIFW.js → chunk-V32BCG7M.js} +6 -6
  18. package/dist/{chunk-MKZXZDHE.mjs → chunk-XBL3TMPC.mjs} +14 -3
  19. package/dist/{client-BBFfAtn4.d.mts → client-DlTJ2hUM.d.mts} +2 -2
  20. package/dist/{client-ByURQZM9.d.ts → client-ni-CfOSO.d.ts} +2 -2
  21. package/dist/{elements-Dtqe9Ekd.d.mts → elements-BF1Y4aOi.d.mts} +92 -6
  22. package/dist/{elements-Dtqe9Ekd.d.ts → elements-BF1Y4aOi.d.ts} +92 -6
  23. package/dist/{index-DFqDU6yU.d.ts → index-CZ0bJm6k.d.ts} +2 -2
  24. package/dist/{index-B6mukQYB.d.mts → index-DML_W635.d.mts} +2 -2
  25. package/dist/{index-CvLuAMjQ.d.ts → index-DU7vffby.d.ts} +2 -2
  26. package/dist/{index-7oz-hVVA.d.mts → index-DopYJKDL.d.mts} +2 -2
  27. package/dist/index.d.mts +7 -7
  28. package/dist/index.d.ts +7 -7
  29. package/dist/index.js +156 -152
  30. package/dist/index.mjs +5 -5
  31. package/dist/mock/cli.mjs +16 -2
  32. package/dist/mock/library.js +16 -2
  33. package/dist/mock/library.mjs +16 -2
  34. package/dist/mock/msw.js +16 -2
  35. package/dist/mock/msw.mjs +16 -2
  36. package/dist/{price-B4jL81ef.d.ts → price-B5t2mpsE.d.ts} +1 -1
  37. package/dist/{price-Pyq-vlrm.d.mts → price-DI_U5oXU.d.mts} +1 -1
  38. package/dist/react.d.mts +3 -3
  39. package/dist/react.d.ts +3 -3
  40. package/dist/react.js +151 -151
  41. package/dist/react.mjs +4 -4
  42. package/dist/{server-Cowuvfbr.d.ts → server-BItJAUTD.d.ts} +1 -1
  43. package/dist/{server-KilvZJU0.d.mts → server-Dq70vD7z.d.mts} +1 -1
  44. package/dist/server.d.mts +3 -3
  45. package/dist/server.d.ts +3 -3
  46. package/dist/server.js +10 -10
  47. package/dist/server.mjs +4 -4
  48. package/dist/testing/msw.d.mts +2 -2
  49. package/dist/testing/msw.d.ts +2 -2
  50. package/dist/testing/msw.js +3 -3
  51. package/dist/testing/msw.mjs +2 -2
  52. package/dist/testing/suite.d.mts +5 -5
  53. package/dist/testing/suite.d.ts +5 -5
  54. package/dist/testing/suite.js +26 -26
  55. package/dist/testing/suite.mjs +6 -6
  56. package/dist/testing.d.mts +4 -4
  57. package/dist/testing.d.ts +4 -4
  58. package/dist/testing.js +118 -118
  59. package/dist/testing.mjs +7 -7
  60. package/dist/utils.d.mts +3 -3
  61. package/dist/utils.d.ts +3 -3
  62. package/dist/utils.js +32 -32
  63. package/dist/utils.mjs +2 -2
  64. 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-P4HYAV3L.mjs';
3
+ export { ActivityService, CimplifyClient, DeliveryService, HostedPurchaseIntentService, PURCHASE_INTENT_ROUTE, PlacesService, PurchaseIntentResolver, PurchaseIntentService, SESSION_CHANGE_SOURCE, SessionService, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-T4OU77DM.mjs';
4
4
  import './chunk-U4MW6PYU.mjs';
5
- import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-2I6YKE6Q.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, createDefaultPaymentAuthorizationAdapterRegistry, createElements, createPurchaseIntentConfirmation, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, intentIdempotencyKey as purchaseIntentIdempotencyKey, purchaseIntentRequiresPaymentOption, selectPurchaseIntentPaymentOption, startSignIn, toNullable, tryCatch, unwrap } from './chunk-2I6YKE6Q.mjs';
5
+ import { getAuthorizationEndpoint, DEFAULT_ISSUER, generatePkce, generateState } from './chunk-OTPLI3JY.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, createDefaultPaymentAuthorizationAdapterRegistry, createElements, createPurchaseIntentConfirmation, err, flatMap, fromPromise, generateIdempotencyKey, getOrElse, isErr, isOk, mapError, mapResult, ok, intentIdempotencyKey as purchaseIntentIdempotencyKey, purchaseIntentRequiresPaymentOption, selectPurchaseIntentPaymentOption, startSignIn, toNullable, tryCatch, unwrap } from './chunk-OTPLI3JY.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-NYDVVNZI.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, ZERO, currencyCode, enrichError, getErrorHint, isCimplifyError, isIdempotencyMismatchError, isQuoteConflictRequiringConsent, isQuoteError, isRetryableError, isSupportedCurrency, money, moneyFromNumber } from './chunk-NJYR6GGM.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-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 || cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
7377
- return { status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE, intent_id: intent.id };
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();
@@ -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 || cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
6199
- return { status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE, intent_id: intent.id };
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();
@@ -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 || cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
6197
- return { status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE, intent_id: intent.id };
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 || cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
6197
- return { status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE, intent_id: intent.id };
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 || cart.status !== MOCK_PURCHASE_INTENT.CART_STATUS.ACTIVE) {
6195
- return { status: PURCHASE_INTENT_CONFIRM_STATUS.SOURCE_UNAVAILABLE, intent_id: intent.id };
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-Dtqe9Ekd.js';
1
+ import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './elements-BF1Y4aOi.js';
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-Dtqe9Ekd.mjs';
1
+ import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './elements-BF1Y4aOi.mjs';
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-BohD-jU_.mjs';
6
- import { g as CheckoutTermsView, cQ as OrderType, dL as ProcessCheckoutResult, aW as CheckoutStatus, aX as CheckoutStatusContext, C as CurrencyCode, P as Product, de as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cI as Money, a as ChosenPrice, a1 as BundleSelectionInput, b6 as ComponentSelectionInput, a0 as BundleSelectionData, bf as CompositeSelectionData, d as Collection, dU as ProductTaxonomy, eJ as TaxonomyWithChildren, dV as ProductTimeProfile, by as Deal, dQ as ProductDealInfo, bI as DiscountValidation, a3 as BundleSummary, bd as CompositePriceResult, eE as SubscriptionWithDetails, eD as SubscriptionStatus, eA as Subscription, bm as CustomAttributeDefinition, dZ as PropertyFacet, dP as ProductBillingPlan, f1 as VariantView, eX as VariantAxisWithValues, w as AddressInfo, J as AuthenticatedData, c4 as ElementsOptions, dp as PaymentMethodInfo, c2 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, s as AddOnWithOptions, Z as BundleComponentView, _ as BundlePriceType, bb as CompositeGroupView, bL as DisplayCart, dR as ProductInputField, x as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, R as BoundaryKind, es as SchedulingMode, bA as DepositType, bn as CustomAttributeValue, dS as ProductProperty, ei as QuantityPricingTier } from './elements-Dtqe9Ekd.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-rWd71Xi-.mjs';
6
+ import { g as CheckoutTermsView, cQ as OrderType, dL as ProcessCheckoutResult, aW as CheckoutStatus, aX as CheckoutStatusContext, C as CurrencyCode, P as Product, de as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cI as Money, a as ChosenPrice, a1 as BundleSelectionInput, b6 as ComponentSelectionInput, a0 as BundleSelectionData, bf as CompositeSelectionData, d as Collection, dU as ProductTaxonomy, eL as TaxonomyWithChildren, dV as ProductTimeProfile, by as Deal, dQ as ProductDealInfo, bI as DiscountValidation, a3 as BundleSummary, bd as CompositePriceResult, eG as SubscriptionWithDetails, eF as SubscriptionStatus, eC as Subscription, bm as CustomAttributeDefinition, dZ as PropertyFacet, dP as ProductBillingPlan, f3 as VariantView, eZ as VariantAxisWithValues, w as AddressInfo, J as AuthenticatedData, c4 as ElementsOptions, dp as PaymentMethodInfo, c2 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, s as AddOnWithOptions, Z as BundleComponentView, _ as BundlePriceType, bb as CompositeGroupView, bL as DisplayCart, dR as ProductInputField, x as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, R as BoundaryKind, et as SchedulingMode, bA as DepositType, bn as CustomAttributeValue, dS as ProductProperty, ei as QuantityPricingTier } from './elements-BF1Y4aOi.mjs';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
- import { P as ProductWithPrice } from './price-Pyq-vlrm.mjs';
8
+ import { P as ProductWithPrice } from './price-DI_U5oXU.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-C4xKpirp.js';
6
- import { g as CheckoutTermsView, cQ as OrderType, dL as ProcessCheckoutResult, aW as CheckoutStatus, aX as CheckoutStatusContext, C as CurrencyCode, P as Product, de as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cI as Money, a as ChosenPrice, a1 as BundleSelectionInput, b6 as ComponentSelectionInput, a0 as BundleSelectionData, bf as CompositeSelectionData, d as Collection, dU as ProductTaxonomy, eJ as TaxonomyWithChildren, dV as ProductTimeProfile, by as Deal, dQ as ProductDealInfo, bI as DiscountValidation, a3 as BundleSummary, bd as CompositePriceResult, eE as SubscriptionWithDetails, eD as SubscriptionStatus, eA as Subscription, bm as CustomAttributeDefinition, dZ as PropertyFacet, dP as ProductBillingPlan, f1 as VariantView, eX as VariantAxisWithValues, w as AddressInfo, J as AuthenticatedData, c4 as ElementsOptions, dp as PaymentMethodInfo, c2 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, s as AddOnWithOptions, Z as BundleComponentView, _ as BundlePriceType, bb as CompositeGroupView, bL as DisplayCart, dR as ProductInputField, x as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, R as BoundaryKind, es as SchedulingMode, bA as DepositType, bn as CustomAttributeValue, dS as ProductProperty, ei as QuantityPricingTier } from './elements-Dtqe9Ekd.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-AmW4XjaN.js';
6
+ import { g as CheckoutTermsView, cQ as OrderType, dL as ProcessCheckoutResult, aW as CheckoutStatus, aX as CheckoutStatusContext, C as CurrencyCode, P as Product, de as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cI as Money, a as ChosenPrice, a1 as BundleSelectionInput, b6 as ComponentSelectionInput, a0 as BundleSelectionData, bf as CompositeSelectionData, d as Collection, dU as ProductTaxonomy, eL as TaxonomyWithChildren, dV as ProductTimeProfile, by as Deal, dQ as ProductDealInfo, bI as DiscountValidation, a3 as BundleSummary, bd as CompositePriceResult, eG as SubscriptionWithDetails, eF as SubscriptionStatus, eC as Subscription, bm as CustomAttributeDefinition, dZ as PropertyFacet, dP as ProductBillingPlan, f3 as VariantView, eZ as VariantAxisWithValues, w as AddressInfo, J as AuthenticatedData, c4 as ElementsOptions, dp as PaymentMethodInfo, c2 as ElementsCheckoutResult, dK as ProcessCheckoutOptions, s as AddOnWithOptions, Z as BundleComponentView, _ as BundlePriceType, bb as CompositeGroupView, bL as DisplayCart, dR as ProductInputField, x as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, R as BoundaryKind, et as SchedulingMode, bA as DepositType, bn as CustomAttributeValue, dS as ProductProperty, ei as QuantityPricingTier } from './elements-BF1Y4aOi.js';
7
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
8
- import { P as ProductWithPrice } from './price-B4jL81ef.js';
8
+ import { P as ProductWithPrice } from './price-B5t2mpsE.js';
9
9
  import { ClassValue } from 'clsx';
10
10
  import { Matcher } from 'react-day-picker';
11
11