@cimplify/sdk 0.104.1 → 0.106.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-BlQ85Uma.d.mts → catalogue-CB44dO-g.d.mts} +4 -1
- package/dist/{catalogue-C8TqOj9K.d.ts → catalogue-lUdp-1hu.d.ts} +4 -1
- package/dist/{checkout-BqK9XUz5.d.mts → checkout-XoV4HNg2.d.mts} +311 -31
- package/dist/{checkout-BqK9XUz5.d.ts → checkout-XoV4HNg2.d.ts} +311 -31
- package/dist/{chunk-L5SNEU2O.mjs → chunk-3BTMAWL7.mjs} +47 -15
- package/dist/{chunk-BWEIMKLF.js → chunk-7SEOB5UW.js} +108 -76
- package/dist/{chunk-SFUJMS5E.js → chunk-AVXA4F6G.js} +33 -1
- package/dist/{chunk-UFOWPN3D.mjs → chunk-DPVDLMLI.mjs} +8 -13
- package/dist/{chunk-DQEXY542.js → chunk-H2WXUTMT.js} +211 -189
- package/dist/{chunk-6G3ANKQA.mjs → chunk-L4XKIMUO.mjs} +8 -1
- package/dist/{chunk-HYFA67A7.js → chunk-NJK3THWT.js} +67 -60
- package/dist/{chunk-RBNBSQI7.mjs → chunk-NJYR6GGM.mjs} +29 -2
- package/dist/{chunk-U54CWUUT.mjs → chunk-NYDVVNZI.mjs} +1 -1
- package/dist/{chunk-V4457OKB.mjs → chunk-RQT5BZ2Y.mjs} +36 -14
- package/dist/{chunk-XAUSDMMZ.js → chunk-UYFTOIFW.js} +6 -6
- package/dist/{chunk-WXREIBFW.js → chunk-YARZTZTB.js} +141 -146
- package/dist/{client-DhXeiUrf.d.ts → client-BQ_8FtA4.d.ts} +12 -2
- package/dist/{client-mXiUrV4X.d.mts → client-BWe1KWMf.d.mts} +12 -2
- package/dist/{index-DPWI5XcU.d.ts → index-C0k9om1S.d.ts} +2 -2
- package/dist/{index-B0AdZvrM.d.mts → index-DRMBo26v.d.mts} +2 -2
- package/dist/{index-CK8Nk5uQ.d.ts → index-DweR60Cv.d.ts} +2 -2
- package/dist/{index-DVfUh-ci.d.mts → index-aIQzSiP_.d.mts} +2 -2
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +166 -146
- package/dist/index.mjs +5 -5
- package/dist/mock/cli.mjs +9 -0
- package/dist/mock/library.js +9 -0
- package/dist/mock/library.mjs +9 -0
- package/dist/mock/msw.js +9 -0
- package/dist/mock/msw.mjs +9 -0
- package/dist/{price-BUDv1rI7.d.mts → price-CUGIYRtD.d.mts} +1 -1
- package/dist/{price-6hQIIac9.d.ts → price-De-sxcuj.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-DJ0mSs9i.d.mts → server-7soMMUgP.d.ts} +3 -2
- package/dist/{server-DSTX76Ki.d.ts → server-DDEJ7e9s.d.mts} +3 -2
- 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 -25
- package/dist/testing/suite.mjs +7 -6
- package/dist/testing.d.mts +315 -8
- package/dist/testing.d.ts +315 -8
- 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, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-
|
|
3
|
+
export { ActivityService, CimplifyClient, DeliveryService, HostedPurchaseIntentService, PURCHASE_INTENT_ROUTE, PlacesService, PurchaseIntentResolver, PurchaseIntentService, SESSION_CHANGE_SOURCE, StoreCreditQueries, SubscriptionService, SupportService, UploadService, createCimplifyClient } from './chunk-DPVDLMLI.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-RQT5BZ2Y.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-RQT5BZ2Y.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_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, PAYMENT_COLLECTION_MODE, PAYMENT_INSTRUMENT_DISPLAY_KIND, PAYMENT_OPTION_NEXT_ACTION, PAYMENT_OPTION_STATUS, 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, 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-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';
|
|
10
10
|
import './chunk-3G6RQLXK.mjs';
|
|
11
11
|
|
|
12
12
|
// src/silent-sign-in.ts
|
package/dist/mock/cli.mjs
CHANGED
|
@@ -3583,6 +3583,8 @@ var PAYMENT_OPTION_NEXT_ACTION = {
|
|
|
3583
3583
|
PROVIDER_APPROVAL: "provider_approval"};
|
|
3584
3584
|
var LEGACY_CHECKOUT_PAYMENT_STATUS = {
|
|
3585
3585
|
SUCCEEDED: "succeeded"};
|
|
3586
|
+
var CHECKOUT_PROTECTION_STATUS = {
|
|
3587
|
+
PROTECTED: "protected"};
|
|
3586
3588
|
var CHECKOUT_TERMS_COMPONENT = {
|
|
3587
3589
|
DUE_NOW: "due_now"};
|
|
3588
3590
|
var CHECKOUT_TERMS_DELTA_KIND = {
|
|
@@ -6942,6 +6944,10 @@ function createPaymentService(options) {
|
|
|
6942
6944
|
// src/mock/domain/purchase-intent.ts
|
|
6943
6945
|
var INTENT_LIFETIME_MS = 15 * 60 * 1e3;
|
|
6944
6946
|
var ZERO_MONEY = "0.00";
|
|
6947
|
+
var MOCK_PROTECTION = {
|
|
6948
|
+
status: CHECKOUT_PROTECTION_STATUS.PROTECTED,
|
|
6949
|
+
message: "Covered by Cimplify Protection"
|
|
6950
|
+
};
|
|
6945
6951
|
var PURCHASE_INTENT_MOBILE_MONEY_NETWORKS = new Set(
|
|
6946
6952
|
Object.values(PURCHASE_INTENT_MOBILE_MONEY_NETWORK)
|
|
6947
6953
|
);
|
|
@@ -7006,6 +7012,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
7006
7012
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
7007
7013
|
customer_debit_amount: normalizedAmount,
|
|
7008
7014
|
currency: normalizedCurrency,
|
|
7015
|
+
protection: MOCK_PROTECTION,
|
|
7009
7016
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
7010
7017
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
7011
7018
|
expires_at: expiresAt
|
|
@@ -7020,6 +7027,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
7020
7027
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
7021
7028
|
customer_debit_amount: normalizedAmount,
|
|
7022
7029
|
currency: normalizedCurrency,
|
|
7030
|
+
protection: MOCK_PROTECTION,
|
|
7023
7031
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
7024
7032
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
7025
7033
|
expires_at: expiresAt
|
|
@@ -7151,6 +7159,7 @@ function createPurchaseIntentMockService(options) {
|
|
|
7151
7159
|
}
|
|
7152
7160
|
const checkoutInput = request.checkout;
|
|
7153
7161
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
7162
|
+
if (!checkoutInput.address_info) throw validation("Checkout address_info is required");
|
|
7154
7163
|
assertSupportedTenderPreference(request);
|
|
7155
7164
|
const cart = registry.carts.get(request.source.cart_id);
|
|
7156
7165
|
if (!cart) throw notFound(`Cart ${request.source.cart_id} not found`);
|
package/dist/mock/library.js
CHANGED
|
@@ -2405,6 +2405,8 @@ var PAYMENT_OPTION_NEXT_ACTION = {
|
|
|
2405
2405
|
PROVIDER_APPROVAL: "provider_approval"};
|
|
2406
2406
|
var LEGACY_CHECKOUT_PAYMENT_STATUS = {
|
|
2407
2407
|
SUCCEEDED: "succeeded"};
|
|
2408
|
+
var CHECKOUT_PROTECTION_STATUS = {
|
|
2409
|
+
PROTECTED: "protected"};
|
|
2408
2410
|
var CHECKOUT_TERMS_COMPONENT = {
|
|
2409
2411
|
DUE_NOW: "due_now"};
|
|
2410
2412
|
var CHECKOUT_TERMS_DELTA_KIND = {
|
|
@@ -5764,6 +5766,10 @@ function createPaymentService(options) {
|
|
|
5764
5766
|
// src/mock/domain/purchase-intent.ts
|
|
5765
5767
|
var INTENT_LIFETIME_MS = 15 * 60 * 1e3;
|
|
5766
5768
|
var ZERO_MONEY = "0.00";
|
|
5769
|
+
var MOCK_PROTECTION = {
|
|
5770
|
+
status: CHECKOUT_PROTECTION_STATUS.PROTECTED,
|
|
5771
|
+
message: "Covered by Cimplify Protection"
|
|
5772
|
+
};
|
|
5767
5773
|
var PURCHASE_INTENT_MOBILE_MONEY_NETWORKS = new Set(
|
|
5768
5774
|
Object.values(PURCHASE_INTENT_MOBILE_MONEY_NETWORK)
|
|
5769
5775
|
);
|
|
@@ -5828,6 +5834,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
5828
5834
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
5829
5835
|
customer_debit_amount: normalizedAmount,
|
|
5830
5836
|
currency: normalizedCurrency,
|
|
5837
|
+
protection: MOCK_PROTECTION,
|
|
5831
5838
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
5832
5839
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
5833
5840
|
expires_at: expiresAt
|
|
@@ -5842,6 +5849,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
5842
5849
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
5843
5850
|
customer_debit_amount: normalizedAmount,
|
|
5844
5851
|
currency: normalizedCurrency,
|
|
5852
|
+
protection: MOCK_PROTECTION,
|
|
5845
5853
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
5846
5854
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
5847
5855
|
expires_at: expiresAt
|
|
@@ -5973,6 +5981,7 @@ function createPurchaseIntentMockService(options) {
|
|
|
5973
5981
|
}
|
|
5974
5982
|
const checkoutInput = request.checkout;
|
|
5975
5983
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
5984
|
+
if (!checkoutInput.address_info) throw validation("Checkout address_info is required");
|
|
5976
5985
|
assertSupportedTenderPreference(request);
|
|
5977
5986
|
const cart = registry.carts.get(request.source.cart_id);
|
|
5978
5987
|
if (!cart) throw notFound(`Cart ${request.source.cart_id} not found`);
|
package/dist/mock/library.mjs
CHANGED
|
@@ -2403,6 +2403,8 @@ var PAYMENT_OPTION_NEXT_ACTION = {
|
|
|
2403
2403
|
PROVIDER_APPROVAL: "provider_approval"};
|
|
2404
2404
|
var LEGACY_CHECKOUT_PAYMENT_STATUS = {
|
|
2405
2405
|
SUCCEEDED: "succeeded"};
|
|
2406
|
+
var CHECKOUT_PROTECTION_STATUS = {
|
|
2407
|
+
PROTECTED: "protected"};
|
|
2406
2408
|
var CHECKOUT_TERMS_COMPONENT = {
|
|
2407
2409
|
DUE_NOW: "due_now"};
|
|
2408
2410
|
var CHECKOUT_TERMS_DELTA_KIND = {
|
|
@@ -5762,6 +5764,10 @@ function createPaymentService(options) {
|
|
|
5762
5764
|
// src/mock/domain/purchase-intent.ts
|
|
5763
5765
|
var INTENT_LIFETIME_MS = 15 * 60 * 1e3;
|
|
5764
5766
|
var ZERO_MONEY = "0.00";
|
|
5767
|
+
var MOCK_PROTECTION = {
|
|
5768
|
+
status: CHECKOUT_PROTECTION_STATUS.PROTECTED,
|
|
5769
|
+
message: "Covered by Cimplify Protection"
|
|
5770
|
+
};
|
|
5765
5771
|
var PURCHASE_INTENT_MOBILE_MONEY_NETWORKS = new Set(
|
|
5766
5772
|
Object.values(PURCHASE_INTENT_MOBILE_MONEY_NETWORK)
|
|
5767
5773
|
);
|
|
@@ -5826,6 +5832,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
5826
5832
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
5827
5833
|
customer_debit_amount: normalizedAmount,
|
|
5828
5834
|
currency: normalizedCurrency,
|
|
5835
|
+
protection: MOCK_PROTECTION,
|
|
5829
5836
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
5830
5837
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
5831
5838
|
expires_at: expiresAt
|
|
@@ -5840,6 +5847,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
5840
5847
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
5841
5848
|
customer_debit_amount: normalizedAmount,
|
|
5842
5849
|
currency: normalizedCurrency,
|
|
5850
|
+
protection: MOCK_PROTECTION,
|
|
5843
5851
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
5844
5852
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
5845
5853
|
expires_at: expiresAt
|
|
@@ -5971,6 +5979,7 @@ function createPurchaseIntentMockService(options) {
|
|
|
5971
5979
|
}
|
|
5972
5980
|
const checkoutInput = request.checkout;
|
|
5973
5981
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
5982
|
+
if (!checkoutInput.address_info) throw validation("Checkout address_info is required");
|
|
5974
5983
|
assertSupportedTenderPreference(request);
|
|
5975
5984
|
const cart = registry.carts.get(request.source.cart_id);
|
|
5976
5985
|
if (!cart) throw notFound(`Cart ${request.source.cart_id} not found`);
|
package/dist/mock/msw.js
CHANGED
|
@@ -2403,6 +2403,8 @@ var PAYMENT_OPTION_NEXT_ACTION = {
|
|
|
2403
2403
|
PROVIDER_APPROVAL: "provider_approval"};
|
|
2404
2404
|
var LEGACY_CHECKOUT_PAYMENT_STATUS = {
|
|
2405
2405
|
SUCCEEDED: "succeeded"};
|
|
2406
|
+
var CHECKOUT_PROTECTION_STATUS = {
|
|
2407
|
+
PROTECTED: "protected"};
|
|
2406
2408
|
var CHECKOUT_TERMS_COMPONENT = {
|
|
2407
2409
|
DUE_NOW: "due_now"};
|
|
2408
2410
|
var CHECKOUT_TERMS_DELTA_KIND = {
|
|
@@ -5762,6 +5764,10 @@ function createPaymentService(options) {
|
|
|
5762
5764
|
// src/mock/domain/purchase-intent.ts
|
|
5763
5765
|
var INTENT_LIFETIME_MS = 15 * 60 * 1e3;
|
|
5764
5766
|
var ZERO_MONEY = "0.00";
|
|
5767
|
+
var MOCK_PROTECTION = {
|
|
5768
|
+
status: CHECKOUT_PROTECTION_STATUS.PROTECTED,
|
|
5769
|
+
message: "Covered by Cimplify Protection"
|
|
5770
|
+
};
|
|
5765
5771
|
var PURCHASE_INTENT_MOBILE_MONEY_NETWORKS = new Set(
|
|
5766
5772
|
Object.values(PURCHASE_INTENT_MOBILE_MONEY_NETWORK)
|
|
5767
5773
|
);
|
|
@@ -5826,6 +5832,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
5826
5832
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
5827
5833
|
customer_debit_amount: normalizedAmount,
|
|
5828
5834
|
currency: normalizedCurrency,
|
|
5835
|
+
protection: MOCK_PROTECTION,
|
|
5829
5836
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
5830
5837
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
5831
5838
|
expires_at: expiresAt
|
|
@@ -5840,6 +5847,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
5840
5847
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
5841
5848
|
customer_debit_amount: normalizedAmount,
|
|
5842
5849
|
currency: normalizedCurrency,
|
|
5850
|
+
protection: MOCK_PROTECTION,
|
|
5843
5851
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
5844
5852
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
5845
5853
|
expires_at: expiresAt
|
|
@@ -5971,6 +5979,7 @@ function createPurchaseIntentMockService(options) {
|
|
|
5971
5979
|
}
|
|
5972
5980
|
const checkoutInput = request.checkout;
|
|
5973
5981
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
5982
|
+
if (!checkoutInput.address_info) throw validation("Checkout address_info is required");
|
|
5974
5983
|
assertSupportedTenderPreference(request);
|
|
5975
5984
|
const cart = registry.carts.get(request.source.cart_id);
|
|
5976
5985
|
if (!cart) throw notFound(`Cart ${request.source.cart_id} not found`);
|
package/dist/mock/msw.mjs
CHANGED
|
@@ -2401,6 +2401,8 @@ var PAYMENT_OPTION_NEXT_ACTION = {
|
|
|
2401
2401
|
PROVIDER_APPROVAL: "provider_approval"};
|
|
2402
2402
|
var LEGACY_CHECKOUT_PAYMENT_STATUS = {
|
|
2403
2403
|
SUCCEEDED: "succeeded"};
|
|
2404
|
+
var CHECKOUT_PROTECTION_STATUS = {
|
|
2405
|
+
PROTECTED: "protected"};
|
|
2404
2406
|
var CHECKOUT_TERMS_COMPONENT = {
|
|
2405
2407
|
DUE_NOW: "due_now"};
|
|
2406
2408
|
var CHECKOUT_TERMS_DELTA_KIND = {
|
|
@@ -5760,6 +5762,10 @@ function createPaymentService(options) {
|
|
|
5760
5762
|
// src/mock/domain/purchase-intent.ts
|
|
5761
5763
|
var INTENT_LIFETIME_MS = 15 * 60 * 1e3;
|
|
5762
5764
|
var ZERO_MONEY = "0.00";
|
|
5765
|
+
var MOCK_PROTECTION = {
|
|
5766
|
+
status: CHECKOUT_PROTECTION_STATUS.PROTECTED,
|
|
5767
|
+
message: "Covered by Cimplify Protection"
|
|
5768
|
+
};
|
|
5763
5769
|
var PURCHASE_INTENT_MOBILE_MONEY_NETWORKS = new Set(
|
|
5764
5770
|
Object.values(PURCHASE_INTENT_MOBILE_MONEY_NETWORK)
|
|
5765
5771
|
);
|
|
@@ -5824,6 +5830,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
5824
5830
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
5825
5831
|
customer_debit_amount: normalizedAmount,
|
|
5826
5832
|
currency: normalizedCurrency,
|
|
5833
|
+
protection: MOCK_PROTECTION,
|
|
5827
5834
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
5828
5835
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
5829
5836
|
expires_at: expiresAt
|
|
@@ -5838,6 +5845,7 @@ function paymentOptions(intentId, currency, amount, expiresAt) {
|
|
|
5838
5845
|
fee_amount: wireMoney(ZERO_MONEY),
|
|
5839
5846
|
customer_debit_amount: normalizedAmount,
|
|
5840
5847
|
currency: normalizedCurrency,
|
|
5848
|
+
protection: MOCK_PROTECTION,
|
|
5841
5849
|
status: PAYMENT_OPTION_STATUS.ELIGIBLE,
|
|
5842
5850
|
expected_next_action: PAYMENT_OPTION_NEXT_ACTION.PROVIDER_APPROVAL,
|
|
5843
5851
|
expires_at: expiresAt
|
|
@@ -5969,6 +5977,7 @@ function createPurchaseIntentMockService(options) {
|
|
|
5969
5977
|
}
|
|
5970
5978
|
const checkoutInput = request.checkout;
|
|
5971
5979
|
if (!checkoutInput) throw validation("Cart checkout input is required");
|
|
5980
|
+
if (!checkoutInput.address_info) throw validation("Checkout address_info is required");
|
|
5972
5981
|
assertSupportedTenderPreference(request);
|
|
5973
5982
|
const cart = registry.carts.get(request.source.cart_id);
|
|
5974
5983
|
if (!cart) throw notFound(`Cart ${request.source.cart_id} not found`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './checkout-
|
|
1
|
+
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './checkout-XoV4HNg2.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 './checkout-
|
|
1
|
+
import { C as CurrencyCode, a as ChosenPrice, S as SaleInfo, U as UpcomingSale } from './checkout-XoV4HNg2.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, cr as StoreCreditBalance, ct as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cl as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-
|
|
6
|
-
import { g as CheckoutTermsView,
|
|
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, cr as StoreCreditBalance, ct as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cl as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-CB44dO-g.mjs';
|
|
6
|
+
import { g as CheckoutTermsView, cP as OrderType, dK as ProcessCheckoutResult, aW as CheckoutStatus, aX as CheckoutStatusContext, C as CurrencyCode, P as Product, dd as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cH as Money, a as ChosenPrice, a1 as BundleSelectionInput, b5 as ComponentSelectionInput, a0 as BundleSelectionData, be as CompositeSelectionData, d as Collection, dT as ProductTaxonomy, eI as TaxonomyWithChildren, dU as ProductTimeProfile, bx as Deal, dP as ProductDealInfo, bH as DiscountValidation, a3 as BundleSummary, bc as CompositePriceResult, eD as SubscriptionWithDetails, eC as SubscriptionStatus, ez as Subscription, bl as CustomAttributeDefinition, dY as PropertyFacet, dO as ProductBillingPlan, f0 as VariantView, eW as VariantAxisWithValues, w as AddressInfo, J as AuthenticatedData, c3 as ElementsOptions, dn as PaymentMethodInfo, c1 as ElementsCheckoutResult, dJ as ProcessCheckoutOptions, s as AddOnWithOptions, Z as BundleComponentView, _ as BundlePriceType, ba as CompositeGroupView, bK as DisplayCart, dQ as ProductInputField, x as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, R as BoundaryKind, er as SchedulingMode, bz as DepositType, bm as CustomAttributeValue, dR as ProductProperty, eh as QuantityPricingTier } from './checkout-XoV4HNg2.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-CUGIYRtD.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, cr as StoreCreditBalance, ct as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cl as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-
|
|
6
|
-
import { g as CheckoutTermsView,
|
|
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, cr as StoreCreditBalance, ct as StorefrontBootstrap, W as ChatWidgetStarter, T as ChatMessage, V as ChatUploadAttachment, a1 as CimplifyElements, O as ChatAttachment, aG as LineItem, cl as Staff, c2 as Room, U as ChatReplyContext } from './catalogue-lUdp-1hu.js';
|
|
6
|
+
import { g as CheckoutTermsView, cP as OrderType, dK as ProcessCheckoutResult, aW as CheckoutStatus, aX as CheckoutStatusContext, C as CurrencyCode, P as Product, dd as Pagination, c as CimplifyError, e as ProductWithDetails, b as Category, cH as Money, a as ChosenPrice, a1 as BundleSelectionInput, b5 as ComponentSelectionInput, a0 as BundleSelectionData, be as CompositeSelectionData, d as Collection, dT as ProductTaxonomy, eI as TaxonomyWithChildren, dU as ProductTimeProfile, bx as Deal, dP as ProductDealInfo, bH as DiscountValidation, a3 as BundleSummary, bc as CompositePriceResult, eD as SubscriptionWithDetails, eC as SubscriptionStatus, ez as Subscription, bl as CustomAttributeDefinition, dY as PropertyFacet, dO as ProductBillingPlan, f0 as VariantView, eW as VariantAxisWithValues, w as AddressInfo, J as AuthenticatedData, c3 as ElementsOptions, dn as PaymentMethodInfo, c1 as ElementsCheckoutResult, dJ as ProcessCheckoutOptions, s as AddOnWithOptions, Z as BundleComponentView, _ as BundlePriceType, ba as CompositeGroupView, bK as DisplayCart, dQ as ProductInputField, x as AddressValue, S as SaleInfo, U as UpcomingSale, D as DurationUnit, R as BoundaryKind, er as SchedulingMode, bz as DepositType, bm as CustomAttributeValue, dR as ProductProperty, eh as QuantityPricingTier } from './checkout-XoV4HNg2.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-De-sxcuj.js';
|
|
9
9
|
import { ClassValue } from 'clsx';
|
|
10
10
|
import { Matcher } from 'react-day-picker';
|
|
11
11
|
|