@cimplify/sdk 0.6.8 → 0.6.9
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 +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +12 -14
- package/dist/advanced.mjs +12 -14
- package/dist/{client-D4vA6FY_.d.ts → client-COpV6Yuu.d.ts} +3 -0
- package/dist/{client-FQUyv41r.d.mts → client-vmXPt1j0.d.mts} +3 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -10
- package/dist/index.mjs +18 -10
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +18 -17
- package/dist/react.mjs +18 -17
- package/package.json +1 -1
package/dist/advanced.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-vmXPt1j0.mjs';
|
|
2
2
|
import './payment-Cu75tmUc.mjs';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-COpV6Yuu.js';
|
|
2
2
|
import './payment-Cu75tmUc.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
package/dist/advanced.js
CHANGED
|
@@ -630,9 +630,6 @@ var CartOperations = class {
|
|
|
630
630
|
|
|
631
631
|
// src/constants.ts
|
|
632
632
|
var LINK_QUERY = {
|
|
633
|
-
DATA: "link.data",
|
|
634
|
-
ADDRESSES: "link.addresses",
|
|
635
|
-
MOBILE_MONEY: "link.mobile_money",
|
|
636
633
|
PREFERENCES: "link.preferences"};
|
|
637
634
|
var LINK_MUTATION = {
|
|
638
635
|
CHECK_STATUS: "link.check_status",
|
|
@@ -641,12 +638,8 @@ var LINK_MUTATION = {
|
|
|
641
638
|
UPDATE_PREFERENCES: "link.update_preferences",
|
|
642
639
|
CREATE_ADDRESS: "link.create_address",
|
|
643
640
|
UPDATE_ADDRESS: "link.update_address",
|
|
644
|
-
DELETE_ADDRESS: "link.delete_address",
|
|
645
|
-
SET_DEFAULT_ADDRESS: "link.set_default_address",
|
|
646
641
|
TRACK_ADDRESS_USAGE: "link.track_address_usage",
|
|
647
642
|
CREATE_MOBILE_MONEY: "link.create_mobile_money",
|
|
648
|
-
DELETE_MOBILE_MONEY: "link.delete_mobile_money",
|
|
649
|
-
SET_DEFAULT_MOBILE_MONEY: "link.set_default_mobile_money",
|
|
650
643
|
TRACK_MOBILE_MONEY_USAGE: "link.track_mobile_money_usage",
|
|
651
644
|
VERIFY_MOBILE_MONEY: "link.verify_mobile_money"};
|
|
652
645
|
var AUTH_MUTATION = {
|
|
@@ -1597,6 +1590,9 @@ var LinkService = class {
|
|
|
1597
1590
|
constructor(client) {
|
|
1598
1591
|
this.client = client;
|
|
1599
1592
|
}
|
|
1593
|
+
async getProfile() {
|
|
1594
|
+
return safe5(this.client.linkGet("/v1/link/profile"));
|
|
1595
|
+
}
|
|
1600
1596
|
async requestOtp(input) {
|
|
1601
1597
|
return safe5(this.client.linkPost("/v1/link/auth/request-otp", input));
|
|
1602
1598
|
}
|
|
@@ -1624,13 +1620,13 @@ var LinkService = class {
|
|
|
1624
1620
|
);
|
|
1625
1621
|
}
|
|
1626
1622
|
async getLinkData() {
|
|
1627
|
-
return safe5(this.client.
|
|
1623
|
+
return safe5(this.client.linkGet("/v1/link/data"));
|
|
1628
1624
|
}
|
|
1629
1625
|
async getAddresses() {
|
|
1630
|
-
return safe5(this.client.
|
|
1626
|
+
return safe5(this.client.linkGet("/v1/link/addresses"));
|
|
1631
1627
|
}
|
|
1632
1628
|
async getMobileMoney() {
|
|
1633
|
-
return safe5(this.client.
|
|
1629
|
+
return safe5(this.client.linkGet("/v1/link/mobile-money"));
|
|
1634
1630
|
}
|
|
1635
1631
|
async getPreferences() {
|
|
1636
1632
|
return safe5(this.client.query(LINK_QUERY.PREFERENCES));
|
|
@@ -1653,10 +1649,10 @@ var LinkService = class {
|
|
|
1653
1649
|
return safe5(this.client.call(LINK_MUTATION.UPDATE_ADDRESS, input));
|
|
1654
1650
|
}
|
|
1655
1651
|
async deleteAddress(addressId) {
|
|
1656
|
-
return safe5(this.client.
|
|
1652
|
+
return safe5(this.client.linkDelete(`/v1/link/addresses/${addressId}`));
|
|
1657
1653
|
}
|
|
1658
1654
|
async setDefaultAddress(addressId) {
|
|
1659
|
-
return safe5(this.client.
|
|
1655
|
+
return safe5(this.client.linkPost(`/v1/link/addresses/${addressId}/default`));
|
|
1660
1656
|
}
|
|
1661
1657
|
async trackAddressUsage(addressId) {
|
|
1662
1658
|
return safe5(
|
|
@@ -1669,11 +1665,13 @@ var LinkService = class {
|
|
|
1669
1665
|
return safe5(this.client.call(LINK_MUTATION.CREATE_MOBILE_MONEY, input));
|
|
1670
1666
|
}
|
|
1671
1667
|
async deleteMobileMoney(mobileMoneyId) {
|
|
1672
|
-
return safe5(
|
|
1668
|
+
return safe5(
|
|
1669
|
+
this.client.linkDelete(`/v1/link/mobile-money/${mobileMoneyId}`)
|
|
1670
|
+
);
|
|
1673
1671
|
}
|
|
1674
1672
|
async setDefaultMobileMoney(mobileMoneyId) {
|
|
1675
1673
|
return safe5(
|
|
1676
|
-
this.client.
|
|
1674
|
+
this.client.linkPost(`/v1/link/mobile-money/${mobileMoneyId}/default`)
|
|
1677
1675
|
);
|
|
1678
1676
|
}
|
|
1679
1677
|
async trackMobileMoneyUsage(mobileMoneyId) {
|
package/dist/advanced.mjs
CHANGED
|
@@ -628,9 +628,6 @@ var CartOperations = class {
|
|
|
628
628
|
|
|
629
629
|
// src/constants.ts
|
|
630
630
|
var LINK_QUERY = {
|
|
631
|
-
DATA: "link.data",
|
|
632
|
-
ADDRESSES: "link.addresses",
|
|
633
|
-
MOBILE_MONEY: "link.mobile_money",
|
|
634
631
|
PREFERENCES: "link.preferences"};
|
|
635
632
|
var LINK_MUTATION = {
|
|
636
633
|
CHECK_STATUS: "link.check_status",
|
|
@@ -639,12 +636,8 @@ var LINK_MUTATION = {
|
|
|
639
636
|
UPDATE_PREFERENCES: "link.update_preferences",
|
|
640
637
|
CREATE_ADDRESS: "link.create_address",
|
|
641
638
|
UPDATE_ADDRESS: "link.update_address",
|
|
642
|
-
DELETE_ADDRESS: "link.delete_address",
|
|
643
|
-
SET_DEFAULT_ADDRESS: "link.set_default_address",
|
|
644
639
|
TRACK_ADDRESS_USAGE: "link.track_address_usage",
|
|
645
640
|
CREATE_MOBILE_MONEY: "link.create_mobile_money",
|
|
646
|
-
DELETE_MOBILE_MONEY: "link.delete_mobile_money",
|
|
647
|
-
SET_DEFAULT_MOBILE_MONEY: "link.set_default_mobile_money",
|
|
648
641
|
TRACK_MOBILE_MONEY_USAGE: "link.track_mobile_money_usage",
|
|
649
642
|
VERIFY_MOBILE_MONEY: "link.verify_mobile_money"};
|
|
650
643
|
var AUTH_MUTATION = {
|
|
@@ -1595,6 +1588,9 @@ var LinkService = class {
|
|
|
1595
1588
|
constructor(client) {
|
|
1596
1589
|
this.client = client;
|
|
1597
1590
|
}
|
|
1591
|
+
async getProfile() {
|
|
1592
|
+
return safe5(this.client.linkGet("/v1/link/profile"));
|
|
1593
|
+
}
|
|
1598
1594
|
async requestOtp(input) {
|
|
1599
1595
|
return safe5(this.client.linkPost("/v1/link/auth/request-otp", input));
|
|
1600
1596
|
}
|
|
@@ -1622,13 +1618,13 @@ var LinkService = class {
|
|
|
1622
1618
|
);
|
|
1623
1619
|
}
|
|
1624
1620
|
async getLinkData() {
|
|
1625
|
-
return safe5(this.client.
|
|
1621
|
+
return safe5(this.client.linkGet("/v1/link/data"));
|
|
1626
1622
|
}
|
|
1627
1623
|
async getAddresses() {
|
|
1628
|
-
return safe5(this.client.
|
|
1624
|
+
return safe5(this.client.linkGet("/v1/link/addresses"));
|
|
1629
1625
|
}
|
|
1630
1626
|
async getMobileMoney() {
|
|
1631
|
-
return safe5(this.client.
|
|
1627
|
+
return safe5(this.client.linkGet("/v1/link/mobile-money"));
|
|
1632
1628
|
}
|
|
1633
1629
|
async getPreferences() {
|
|
1634
1630
|
return safe5(this.client.query(LINK_QUERY.PREFERENCES));
|
|
@@ -1651,10 +1647,10 @@ var LinkService = class {
|
|
|
1651
1647
|
return safe5(this.client.call(LINK_MUTATION.UPDATE_ADDRESS, input));
|
|
1652
1648
|
}
|
|
1653
1649
|
async deleteAddress(addressId) {
|
|
1654
|
-
return safe5(this.client.
|
|
1650
|
+
return safe5(this.client.linkDelete(`/v1/link/addresses/${addressId}`));
|
|
1655
1651
|
}
|
|
1656
1652
|
async setDefaultAddress(addressId) {
|
|
1657
|
-
return safe5(this.client.
|
|
1653
|
+
return safe5(this.client.linkPost(`/v1/link/addresses/${addressId}/default`));
|
|
1658
1654
|
}
|
|
1659
1655
|
async trackAddressUsage(addressId) {
|
|
1660
1656
|
return safe5(
|
|
@@ -1667,11 +1663,13 @@ var LinkService = class {
|
|
|
1667
1663
|
return safe5(this.client.call(LINK_MUTATION.CREATE_MOBILE_MONEY, input));
|
|
1668
1664
|
}
|
|
1669
1665
|
async deleteMobileMoney(mobileMoneyId) {
|
|
1670
|
-
return safe5(
|
|
1666
|
+
return safe5(
|
|
1667
|
+
this.client.linkDelete(`/v1/link/mobile-money/${mobileMoneyId}`)
|
|
1668
|
+
);
|
|
1671
1669
|
}
|
|
1672
1670
|
async setDefaultMobileMoney(mobileMoneyId) {
|
|
1673
1671
|
return safe5(
|
|
1674
|
-
this.client.
|
|
1672
|
+
this.client.linkPost(`/v1/link/mobile-money/${mobileMoneyId}/default`)
|
|
1675
1673
|
);
|
|
1676
1674
|
}
|
|
1677
1675
|
async trackMobileMoneyUsage(mobileMoneyId) {
|
|
@@ -2141,6 +2141,7 @@ interface SuccessResult$2 {
|
|
|
2141
2141
|
declare class LinkService {
|
|
2142
2142
|
private client;
|
|
2143
2143
|
constructor(client: CimplifyClient);
|
|
2144
|
+
getProfile(): Promise<Result<LinkData["customer"], CimplifyError>>;
|
|
2144
2145
|
requestOtp(input: RequestOtpInput): Promise<Result<SuccessResult$2, CimplifyError>>;
|
|
2145
2146
|
verifyOtp(input: VerifyOtpInput): Promise<Result<AuthResponse, CimplifyError>>;
|
|
2146
2147
|
logout(): Promise<Result<SuccessResult$2, CimplifyError>>;
|
|
@@ -3172,6 +3173,8 @@ declare function createElements(client: CimplifyClient, businessId?: string, opt
|
|
|
3172
3173
|
interface CimplifyConfig {
|
|
3173
3174
|
publicKey?: string;
|
|
3174
3175
|
credentials?: RequestCredentials;
|
|
3176
|
+
/** Disable console warning when no public key is provided (for Link REST-only portal usage). */
|
|
3177
|
+
suppressPublicKeyWarning?: boolean;
|
|
3175
3178
|
/** Request timeout in milliseconds (default: 30000) */
|
|
3176
3179
|
timeout?: number;
|
|
3177
3180
|
/** Maximum retry attempts for retryable errors (default: 3) */
|
|
@@ -2141,6 +2141,7 @@ interface SuccessResult$2 {
|
|
|
2141
2141
|
declare class LinkService {
|
|
2142
2142
|
private client;
|
|
2143
2143
|
constructor(client: CimplifyClient);
|
|
2144
|
+
getProfile(): Promise<Result<LinkData["customer"], CimplifyError>>;
|
|
2144
2145
|
requestOtp(input: RequestOtpInput): Promise<Result<SuccessResult$2, CimplifyError>>;
|
|
2145
2146
|
verifyOtp(input: VerifyOtpInput): Promise<Result<AuthResponse, CimplifyError>>;
|
|
2146
2147
|
logout(): Promise<Result<SuccessResult$2, CimplifyError>>;
|
|
@@ -3172,6 +3173,8 @@ declare function createElements(client: CimplifyClient, businessId?: string, opt
|
|
|
3172
3173
|
interface CimplifyConfig {
|
|
3173
3174
|
publicKey?: string;
|
|
3174
3175
|
credentials?: RequestCredentials;
|
|
3176
|
+
/** Disable console warning when no public key is provided (for Link REST-only portal usage). */
|
|
3177
|
+
suppressPublicKeyWarning?: boolean;
|
|
3175
3178
|
/** Request timeout in milliseconds (default: 30000) */
|
|
3176
3179
|
timeout?: number;
|
|
3177
3180
|
/** Maximum retry attempts for retryable errors (default: 3) */
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, aV as AddOn, bE as AddOnDetails, b_ as AddOnGroupDetails, aX as AddOnOption, bZ as AddOnOptionDetails, aY as AddOnOptionPrice, aW as AddOnWithOptions, c3 as AddToCartInput, dN as AddressData, ed as AddressInfo, bt as AdjustmentType, ch as AmountToPay, bA as AppliedDiscount, dY as AuthResponse, A as AuthService, m as AuthStatus, ef as AuthenticatedCustomer, eh as AuthenticatedData, dB as AvailabilityCheck, dC as AvailabilityResult, di as AvailableSlot, bz as BenefitType, dl as Booking, dc as BookingRequirementOverride, dk as BookingStatus, dm as BookingWithDetails, cB as BufferTimes, b4 as Bundle, b8 as BundleComponentData, b9 as BundleComponentInfo, b3 as BundlePriceType, b6 as BundleProduct, bJ as BundleSelectionData, bH as BundleSelectionInput, bI as BundleStoredSelection, b5 as BundleSummary, b7 as BundleWithDetails, cQ as Business, d2 as BusinessHours, cP as BusinessPreferences, B as BusinessService, d1 as BusinessSettings, cO as BusinessType, c$ as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, dr as CancelBookingInput, cv as CancelOrderInput, cD as CancellationPolicy, bO as Cart, bF as CartAddOn, br as CartChannel, bP as CartItem, c0 as CartItemDetails, i as CartOperations, bq as CartStatus, c5 as CartSummary, bQ as CartTotals, b as CatalogueQueries, a_ as Category, d3 as CategoryInfo, a$ as CategorySummary, o as ChangePasswordInput, dp as CheckSlotAvailabilityInput, d$ as CheckoutAddressInfo, e1 as CheckoutCustomerInfo, X as CheckoutFormData, ct as CheckoutInput, J as CheckoutMode, j as CheckoutOperations, N as CheckoutOrderType, V as CheckoutPaymentMethod, Y as CheckoutResult, j as CheckoutService, a0 as CheckoutStatus, a1 as CheckoutStatusContext, W as CheckoutStep, by as ChosenPrice, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, b0 as Collection, b2 as CollectionProduct, b1 as CollectionSummary, bf as ComponentGroup, bg as ComponentGroupWithComponents, bk as ComponentPriceBreakdown, bi as ComponentSelectionInput, bc as ComponentSourceType, bd as Composite, bh as CompositeComponent, bL as CompositePriceBreakdown, bj as CompositePriceResult, ba as CompositePricingMode, bM as CompositeSelectionData, bi as CompositeSelectionInput, bK as CompositeStoredSelection, be as CompositeWithDetails, a5 as ContactType, dJ as CreateAddressInput, dL as CreateMobileMoneyInput, dE as Customer, dF as CustomerAddress, dH as CustomerLinkPreferences, dG as CustomerMobileMoney, cA as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, dj as DayAvailability, cK as DepositResult, aJ as DepositType, a4 as DeviceType, aI as DigitalProductType, bB as DiscountBreakdown, bC as DiscountDetails, bT as DisplayAddOn, bU as DisplayAddOnOption, bR as DisplayCart, bS as DisplayCartItem, x as ELEMENT_TYPES, E as EVENT_TYPES, ec as ElementAppearance, em as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, ei as ElementsCheckoutData, ej as ElementsCheckoutResult, eg as ElementsCustomerInfo, y as ElementsOptions, dP as EnrollAndLinkOrderInput, dS as EnrollAndLinkOrderResult, dM as EnrollmentData, aq as Err, cg as FeeBearerType, F as FetchQuoteInput, ce as FulfillmentLink, cd as FulfillmentStatus, cc as FulfillmentType, e3 as FxQuote, e2 as FxQuoteRequest, e4 as FxRateResponse, r as FxService, dn as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, bb as GroupPricingBehavior, el as IframeToParentMessage, I as InventoryService, dD as InventorySummary, aG as InventoryType, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, bN as LineConfiguration, ci as LineItem, c9 as LineType, dI as LinkData, dR as LinkEnrollResult, L as LinkService, dT as LinkSession, dQ as LinkStatusResult, s as LiteBootstrap, q as LiteService, cT as Location, cN as LocationAppointment, bn as LocationProductPrice, dA as LocationStock, cR as LocationTaxBehavior, cS as LocationTaxOverrides, cW as LocationTimeProfile, d0 as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, dO as MobileMoneyData, e0 as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, eb as ObservabilityHooks, ap as Ok, cj as Order, c8 as OrderChannel, cs as OrderFilter, cf as OrderFulfillmentSummary, cm as OrderGroup, cq as OrderGroupDetails, cn as OrderGroupPayment, cl as OrderGroupPaymentState, cp as OrderGroupPaymentSummary, ck as OrderHistory, ca as OrderLineState, cb as OrderLineStatus, cr as OrderPaymentEvent, O as OrderQueries, co as OrderSplitDetail, c6 as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, ek as ParentToIframeMessage, ee as PaymentMethodInfo, c7 as PaymentState, d_ as PickupTime, dZ as PickupTimeType, bm as Price, bu as PriceAdjustment, bx as PriceDecisionPath, bl as PriceEntryType, bw as PricePathTaxInfo, P as PriceQuote, bs as PriceSource, cF as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, aL as Product, aZ as ProductAddOn, bo as ProductAvailability, dy as ProductStock, bp as ProductTimeProfile, aF as ProductType, aN as ProductVariant, aS as ProductVariantValue, aM as ProductWithDetails, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, cw as RefundOrderInput, cz as ReminderMethod, cC as ReminderSettings, e5 as RequestContext, e8 as RequestErrorEvent, dW as RequestOtpInput, e6 as RequestStartEvent, e7 as RequestSuccessEvent, dq as RescheduleBookingInput, cI as ResourceAssignment, d9 as ResourceAvailabilityException, d8 as ResourceAvailabilityRule, dd as ResourceType, ao as Result, e9 as RetryEvent, dV as RevokeAllSessionsResult, dU as RevokeSessionResult, cY as Room, aK as SalesChannel, cG as SchedulingMetadata, cJ as SchedulingResult, p as SchedulingService, S as SearchOptions, bD as SelectedAddOnOption, de as Service, d5 as ServiceAvailabilityException, ds as ServiceAvailabilityParams, dt as ServiceAvailabilityResult, d4 as ServiceAvailabilityRule, cZ as ServiceCharge, cE as ServiceNotes, cL as ServiceScheduleRequest, db as ServiceStaffRequirement, cx as ServiceStatus, df as ServiceWithStaff, ea as SessionChangeEvent, dg as Staff, cH as StaffAssignment, d7 as StaffAvailabilityException, d6 as StaffAvailabilityRule, da as StaffBookingProfile, cy as StaffRole, cM as StaffScheduleItem, dw as Stock, dx as StockLevel, du as StockOwnershipType, dv as StockStatus, c_ as StorefrontBootstrap, cX as Table, T as TableInfo, bv as TaxPathComponent, cU as TimeRange, cV as TimeRanges, dh as TimeSlot, c1 as UICart, bV as UICartBusiness, bX as UICartCustomer, bW as UICartLocation, bY as UICartPricing, c2 as UICartResponse, dK as UpdateAddressInput, c4 as UpdateCartItemInput, cu as UpdateOrderStatusInput, U as UpdateProfileInput, aP as VariantAxis, aU as VariantAxisSelection, aR as VariantAxisValue, aQ as VariantAxisWithValues, bG as VariantDetails, b$ as VariantDetailsDTO, aO as VariantDisplayAttribute, aT as VariantLocationAvailability, dz as VariantStock, aH as VariantStrategy, dX as VerifyOtpInput, aD as combine, aE as combineObject, c as createCimplifyClient, w as createElements, as as err, ax as flatMap, aB as fromPromise, k as generateIdempotencyKey, ay as getOrElse, au as isErr, at as isOk, aw as mapError, av as mapResult, ar as ok, aA as toNullable, aC as tryCatch, az as unwrap } from './client-
|
|
1
|
+
export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, aV as AddOn, bE as AddOnDetails, b_ as AddOnGroupDetails, aX as AddOnOption, bZ as AddOnOptionDetails, aY as AddOnOptionPrice, aW as AddOnWithOptions, c3 as AddToCartInput, dN as AddressData, ed as AddressInfo, bt as AdjustmentType, ch as AmountToPay, bA as AppliedDiscount, dY as AuthResponse, A as AuthService, m as AuthStatus, ef as AuthenticatedCustomer, eh as AuthenticatedData, dB as AvailabilityCheck, dC as AvailabilityResult, di as AvailableSlot, bz as BenefitType, dl as Booking, dc as BookingRequirementOverride, dk as BookingStatus, dm as BookingWithDetails, cB as BufferTimes, b4 as Bundle, b8 as BundleComponentData, b9 as BundleComponentInfo, b3 as BundlePriceType, b6 as BundleProduct, bJ as BundleSelectionData, bH as BundleSelectionInput, bI as BundleStoredSelection, b5 as BundleSummary, b7 as BundleWithDetails, cQ as Business, d2 as BusinessHours, cP as BusinessPreferences, B as BusinessService, d1 as BusinessSettings, cO as BusinessType, c$ as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, dr as CancelBookingInput, cv as CancelOrderInput, cD as CancellationPolicy, bO as Cart, bF as CartAddOn, br as CartChannel, bP as CartItem, c0 as CartItemDetails, i as CartOperations, bq as CartStatus, c5 as CartSummary, bQ as CartTotals, b as CatalogueQueries, a_ as Category, d3 as CategoryInfo, a$ as CategorySummary, o as ChangePasswordInput, dp as CheckSlotAvailabilityInput, d$ as CheckoutAddressInfo, e1 as CheckoutCustomerInfo, X as CheckoutFormData, ct as CheckoutInput, J as CheckoutMode, j as CheckoutOperations, N as CheckoutOrderType, V as CheckoutPaymentMethod, Y as CheckoutResult, j as CheckoutService, a0 as CheckoutStatus, a1 as CheckoutStatusContext, W as CheckoutStep, by as ChosenPrice, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, b0 as Collection, b2 as CollectionProduct, b1 as CollectionSummary, bf as ComponentGroup, bg as ComponentGroupWithComponents, bk as ComponentPriceBreakdown, bi as ComponentSelectionInput, bc as ComponentSourceType, bd as Composite, bh as CompositeComponent, bL as CompositePriceBreakdown, bj as CompositePriceResult, ba as CompositePricingMode, bM as CompositeSelectionData, bi as CompositeSelectionInput, bK as CompositeStoredSelection, be as CompositeWithDetails, a5 as ContactType, dJ as CreateAddressInput, dL as CreateMobileMoneyInput, dE as Customer, dF as CustomerAddress, dH as CustomerLinkPreferences, dG as CustomerMobileMoney, cA as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, dj as DayAvailability, cK as DepositResult, aJ as DepositType, a4 as DeviceType, aI as DigitalProductType, bB as DiscountBreakdown, bC as DiscountDetails, bT as DisplayAddOn, bU as DisplayAddOnOption, bR as DisplayCart, bS as DisplayCartItem, x as ELEMENT_TYPES, E as EVENT_TYPES, ec as ElementAppearance, em as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, ei as ElementsCheckoutData, ej as ElementsCheckoutResult, eg as ElementsCustomerInfo, y as ElementsOptions, dP as EnrollAndLinkOrderInput, dS as EnrollAndLinkOrderResult, dM as EnrollmentData, aq as Err, cg as FeeBearerType, F as FetchQuoteInput, ce as FulfillmentLink, cd as FulfillmentStatus, cc as FulfillmentType, e3 as FxQuote, e2 as FxQuoteRequest, e4 as FxRateResponse, r as FxService, dn as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, bb as GroupPricingBehavior, el as IframeToParentMessage, I as InventoryService, dD as InventorySummary, aG as InventoryType, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, bN as LineConfiguration, ci as LineItem, c9 as LineType, dI as LinkData, dR as LinkEnrollResult, L as LinkService, dT as LinkSession, dQ as LinkStatusResult, s as LiteBootstrap, q as LiteService, cT as Location, cN as LocationAppointment, bn as LocationProductPrice, dA as LocationStock, cR as LocationTaxBehavior, cS as LocationTaxOverrides, cW as LocationTimeProfile, d0 as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, dO as MobileMoneyData, e0 as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, eb as ObservabilityHooks, ap as Ok, cj as Order, c8 as OrderChannel, cs as OrderFilter, cf as OrderFulfillmentSummary, cm as OrderGroup, cq as OrderGroupDetails, cn as OrderGroupPayment, cl as OrderGroupPaymentState, cp as OrderGroupPaymentSummary, ck as OrderHistory, ca as OrderLineState, cb as OrderLineStatus, cr as OrderPaymentEvent, O as OrderQueries, co as OrderSplitDetail, c6 as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, ek as ParentToIframeMessage, ee as PaymentMethodInfo, c7 as PaymentState, d_ as PickupTime, dZ as PickupTimeType, bm as Price, bu as PriceAdjustment, bx as PriceDecisionPath, bl as PriceEntryType, bw as PricePathTaxInfo, P as PriceQuote, bs as PriceSource, cF as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, aL as Product, aZ as ProductAddOn, bo as ProductAvailability, dy as ProductStock, bp as ProductTimeProfile, aF as ProductType, aN as ProductVariant, aS as ProductVariantValue, aM as ProductWithDetails, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, cw as RefundOrderInput, cz as ReminderMethod, cC as ReminderSettings, e5 as RequestContext, e8 as RequestErrorEvent, dW as RequestOtpInput, e6 as RequestStartEvent, e7 as RequestSuccessEvent, dq as RescheduleBookingInput, cI as ResourceAssignment, d9 as ResourceAvailabilityException, d8 as ResourceAvailabilityRule, dd as ResourceType, ao as Result, e9 as RetryEvent, dV as RevokeAllSessionsResult, dU as RevokeSessionResult, cY as Room, aK as SalesChannel, cG as SchedulingMetadata, cJ as SchedulingResult, p as SchedulingService, S as SearchOptions, bD as SelectedAddOnOption, de as Service, d5 as ServiceAvailabilityException, ds as ServiceAvailabilityParams, dt as ServiceAvailabilityResult, d4 as ServiceAvailabilityRule, cZ as ServiceCharge, cE as ServiceNotes, cL as ServiceScheduleRequest, db as ServiceStaffRequirement, cx as ServiceStatus, df as ServiceWithStaff, ea as SessionChangeEvent, dg as Staff, cH as StaffAssignment, d7 as StaffAvailabilityException, d6 as StaffAvailabilityRule, da as StaffBookingProfile, cy as StaffRole, cM as StaffScheduleItem, dw as Stock, dx as StockLevel, du as StockOwnershipType, dv as StockStatus, c_ as StorefrontBootstrap, cX as Table, T as TableInfo, bv as TaxPathComponent, cU as TimeRange, cV as TimeRanges, dh as TimeSlot, c1 as UICart, bV as UICartBusiness, bX as UICartCustomer, bW as UICartLocation, bY as UICartPricing, c2 as UICartResponse, dK as UpdateAddressInput, c4 as UpdateCartItemInput, cu as UpdateOrderStatusInput, U as UpdateProfileInput, aP as VariantAxis, aU as VariantAxisSelection, aR as VariantAxisValue, aQ as VariantAxisWithValues, bG as VariantDetails, b$ as VariantDetailsDTO, aO as VariantDisplayAttribute, aT as VariantLocationAvailability, dz as VariantStock, aH as VariantStrategy, dX as VerifyOtpInput, aD as combine, aE as combineObject, c as createCimplifyClient, w as createElements, as as err, ax as flatMap, aB as fromPromise, k as generateIdempotencyKey, ay as getOrElse, au as isErr, at as isOk, aw as mapError, av as mapResult, ar as ok, aA as toNullable, aC as tryCatch, az as unwrap } from './client-vmXPt1j0.mjs';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.mjs';
|
|
3
3
|
import { A as ApiError } from './payment-Cu75tmUc.mjs';
|
|
4
4
|
export { q as AuthorizationType, h as CimplifyError, b as Currency, C as CurrencyCode, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, I as InitializePaymentResult, M as Money, d as Pagination, P as PaginationParams, t as Payment, w as PaymentErrorDetails, s as PaymentMethod, p as PaymentMethodType, r as PaymentProcessingState, o as PaymentProvider, u as PaymentResponse, n as PaymentStatus, v as PaymentStatusResponse, S as SubmitAuthorizationInput, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, i as isCimplifyError, l as isRetryableError, m as money, a as moneyFromNumber } from './payment-Cu75tmUc.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, aV as AddOn, bE as AddOnDetails, b_ as AddOnGroupDetails, aX as AddOnOption, bZ as AddOnOptionDetails, aY as AddOnOptionPrice, aW as AddOnWithOptions, c3 as AddToCartInput, dN as AddressData, ed as AddressInfo, bt as AdjustmentType, ch as AmountToPay, bA as AppliedDiscount, dY as AuthResponse, A as AuthService, m as AuthStatus, ef as AuthenticatedCustomer, eh as AuthenticatedData, dB as AvailabilityCheck, dC as AvailabilityResult, di as AvailableSlot, bz as BenefitType, dl as Booking, dc as BookingRequirementOverride, dk as BookingStatus, dm as BookingWithDetails, cB as BufferTimes, b4 as Bundle, b8 as BundleComponentData, b9 as BundleComponentInfo, b3 as BundlePriceType, b6 as BundleProduct, bJ as BundleSelectionData, bH as BundleSelectionInput, bI as BundleStoredSelection, b5 as BundleSummary, b7 as BundleWithDetails, cQ as Business, d2 as BusinessHours, cP as BusinessPreferences, B as BusinessService, d1 as BusinessSettings, cO as BusinessType, c$ as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, dr as CancelBookingInput, cv as CancelOrderInput, cD as CancellationPolicy, bO as Cart, bF as CartAddOn, br as CartChannel, bP as CartItem, c0 as CartItemDetails, i as CartOperations, bq as CartStatus, c5 as CartSummary, bQ as CartTotals, b as CatalogueQueries, a_ as Category, d3 as CategoryInfo, a$ as CategorySummary, o as ChangePasswordInput, dp as CheckSlotAvailabilityInput, d$ as CheckoutAddressInfo, e1 as CheckoutCustomerInfo, X as CheckoutFormData, ct as CheckoutInput, J as CheckoutMode, j as CheckoutOperations, N as CheckoutOrderType, V as CheckoutPaymentMethod, Y as CheckoutResult, j as CheckoutService, a0 as CheckoutStatus, a1 as CheckoutStatusContext, W as CheckoutStep, by as ChosenPrice, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, b0 as Collection, b2 as CollectionProduct, b1 as CollectionSummary, bf as ComponentGroup, bg as ComponentGroupWithComponents, bk as ComponentPriceBreakdown, bi as ComponentSelectionInput, bc as ComponentSourceType, bd as Composite, bh as CompositeComponent, bL as CompositePriceBreakdown, bj as CompositePriceResult, ba as CompositePricingMode, bM as CompositeSelectionData, bi as CompositeSelectionInput, bK as CompositeStoredSelection, be as CompositeWithDetails, a5 as ContactType, dJ as CreateAddressInput, dL as CreateMobileMoneyInput, dE as Customer, dF as CustomerAddress, dH as CustomerLinkPreferences, dG as CustomerMobileMoney, cA as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, dj as DayAvailability, cK as DepositResult, aJ as DepositType, a4 as DeviceType, aI as DigitalProductType, bB as DiscountBreakdown, bC as DiscountDetails, bT as DisplayAddOn, bU as DisplayAddOnOption, bR as DisplayCart, bS as DisplayCartItem, x as ELEMENT_TYPES, E as EVENT_TYPES, ec as ElementAppearance, em as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, ei as ElementsCheckoutData, ej as ElementsCheckoutResult, eg as ElementsCustomerInfo, y as ElementsOptions, dP as EnrollAndLinkOrderInput, dS as EnrollAndLinkOrderResult, dM as EnrollmentData, aq as Err, cg as FeeBearerType, F as FetchQuoteInput, ce as FulfillmentLink, cd as FulfillmentStatus, cc as FulfillmentType, e3 as FxQuote, e2 as FxQuoteRequest, e4 as FxRateResponse, r as FxService, dn as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, bb as GroupPricingBehavior, el as IframeToParentMessage, I as InventoryService, dD as InventorySummary, aG as InventoryType, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, bN as LineConfiguration, ci as LineItem, c9 as LineType, dI as LinkData, dR as LinkEnrollResult, L as LinkService, dT as LinkSession, dQ as LinkStatusResult, s as LiteBootstrap, q as LiteService, cT as Location, cN as LocationAppointment, bn as LocationProductPrice, dA as LocationStock, cR as LocationTaxBehavior, cS as LocationTaxOverrides, cW as LocationTimeProfile, d0 as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, dO as MobileMoneyData, e0 as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, eb as ObservabilityHooks, ap as Ok, cj as Order, c8 as OrderChannel, cs as OrderFilter, cf as OrderFulfillmentSummary, cm as OrderGroup, cq as OrderGroupDetails, cn as OrderGroupPayment, cl as OrderGroupPaymentState, cp as OrderGroupPaymentSummary, ck as OrderHistory, ca as OrderLineState, cb as OrderLineStatus, cr as OrderPaymentEvent, O as OrderQueries, co as OrderSplitDetail, c6 as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, ek as ParentToIframeMessage, ee as PaymentMethodInfo, c7 as PaymentState, d_ as PickupTime, dZ as PickupTimeType, bm as Price, bu as PriceAdjustment, bx as PriceDecisionPath, bl as PriceEntryType, bw as PricePathTaxInfo, P as PriceQuote, bs as PriceSource, cF as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, aL as Product, aZ as ProductAddOn, bo as ProductAvailability, dy as ProductStock, bp as ProductTimeProfile, aF as ProductType, aN as ProductVariant, aS as ProductVariantValue, aM as ProductWithDetails, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, cw as RefundOrderInput, cz as ReminderMethod, cC as ReminderSettings, e5 as RequestContext, e8 as RequestErrorEvent, dW as RequestOtpInput, e6 as RequestStartEvent, e7 as RequestSuccessEvent, dq as RescheduleBookingInput, cI as ResourceAssignment, d9 as ResourceAvailabilityException, d8 as ResourceAvailabilityRule, dd as ResourceType, ao as Result, e9 as RetryEvent, dV as RevokeAllSessionsResult, dU as RevokeSessionResult, cY as Room, aK as SalesChannel, cG as SchedulingMetadata, cJ as SchedulingResult, p as SchedulingService, S as SearchOptions, bD as SelectedAddOnOption, de as Service, d5 as ServiceAvailabilityException, ds as ServiceAvailabilityParams, dt as ServiceAvailabilityResult, d4 as ServiceAvailabilityRule, cZ as ServiceCharge, cE as ServiceNotes, cL as ServiceScheduleRequest, db as ServiceStaffRequirement, cx as ServiceStatus, df as ServiceWithStaff, ea as SessionChangeEvent, dg as Staff, cH as StaffAssignment, d7 as StaffAvailabilityException, d6 as StaffAvailabilityRule, da as StaffBookingProfile, cy as StaffRole, cM as StaffScheduleItem, dw as Stock, dx as StockLevel, du as StockOwnershipType, dv as StockStatus, c_ as StorefrontBootstrap, cX as Table, T as TableInfo, bv as TaxPathComponent, cU as TimeRange, cV as TimeRanges, dh as TimeSlot, c1 as UICart, bV as UICartBusiness, bX as UICartCustomer, bW as UICartLocation, bY as UICartPricing, c2 as UICartResponse, dK as UpdateAddressInput, c4 as UpdateCartItemInput, cu as UpdateOrderStatusInput, U as UpdateProfileInput, aP as VariantAxis, aU as VariantAxisSelection, aR as VariantAxisValue, aQ as VariantAxisWithValues, bG as VariantDetails, b$ as VariantDetailsDTO, aO as VariantDisplayAttribute, aT as VariantLocationAvailability, dz as VariantStock, aH as VariantStrategy, dX as VerifyOtpInput, aD as combine, aE as combineObject, c as createCimplifyClient, w as createElements, as as err, ax as flatMap, aB as fromPromise, k as generateIdempotencyKey, ay as getOrElse, au as isErr, at as isOk, aw as mapError, av as mapResult, ar as ok, aA as toNullable, aC as tryCatch, az as unwrap } from './client-
|
|
1
|
+
export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, aV as AddOn, bE as AddOnDetails, b_ as AddOnGroupDetails, aX as AddOnOption, bZ as AddOnOptionDetails, aY as AddOnOptionPrice, aW as AddOnWithOptions, c3 as AddToCartInput, dN as AddressData, ed as AddressInfo, bt as AdjustmentType, ch as AmountToPay, bA as AppliedDiscount, dY as AuthResponse, A as AuthService, m as AuthStatus, ef as AuthenticatedCustomer, eh as AuthenticatedData, dB as AvailabilityCheck, dC as AvailabilityResult, di as AvailableSlot, bz as BenefitType, dl as Booking, dc as BookingRequirementOverride, dk as BookingStatus, dm as BookingWithDetails, cB as BufferTimes, b4 as Bundle, b8 as BundleComponentData, b9 as BundleComponentInfo, b3 as BundlePriceType, b6 as BundleProduct, bJ as BundleSelectionData, bH as BundleSelectionInput, bI as BundleStoredSelection, b5 as BundleSummary, b7 as BundleWithDetails, cQ as Business, d2 as BusinessHours, cP as BusinessPreferences, B as BusinessService, d1 as BusinessSettings, cO as BusinessType, c$ as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, dr as CancelBookingInput, cv as CancelOrderInput, cD as CancellationPolicy, bO as Cart, bF as CartAddOn, br as CartChannel, bP as CartItem, c0 as CartItemDetails, i as CartOperations, bq as CartStatus, c5 as CartSummary, bQ as CartTotals, b as CatalogueQueries, a_ as Category, d3 as CategoryInfo, a$ as CategorySummary, o as ChangePasswordInput, dp as CheckSlotAvailabilityInput, d$ as CheckoutAddressInfo, e1 as CheckoutCustomerInfo, X as CheckoutFormData, ct as CheckoutInput, J as CheckoutMode, j as CheckoutOperations, N as CheckoutOrderType, V as CheckoutPaymentMethod, Y as CheckoutResult, j as CheckoutService, a0 as CheckoutStatus, a1 as CheckoutStatusContext, W as CheckoutStep, by as ChosenPrice, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, b0 as Collection, b2 as CollectionProduct, b1 as CollectionSummary, bf as ComponentGroup, bg as ComponentGroupWithComponents, bk as ComponentPriceBreakdown, bi as ComponentSelectionInput, bc as ComponentSourceType, bd as Composite, bh as CompositeComponent, bL as CompositePriceBreakdown, bj as CompositePriceResult, ba as CompositePricingMode, bM as CompositeSelectionData, bi as CompositeSelectionInput, bK as CompositeStoredSelection, be as CompositeWithDetails, a5 as ContactType, dJ as CreateAddressInput, dL as CreateMobileMoneyInput, dE as Customer, dF as CustomerAddress, dH as CustomerLinkPreferences, dG as CustomerMobileMoney, cA as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, dj as DayAvailability, cK as DepositResult, aJ as DepositType, a4 as DeviceType, aI as DigitalProductType, bB as DiscountBreakdown, bC as DiscountDetails, bT as DisplayAddOn, bU as DisplayAddOnOption, bR as DisplayCart, bS as DisplayCartItem, x as ELEMENT_TYPES, E as EVENT_TYPES, ec as ElementAppearance, em as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, ei as ElementsCheckoutData, ej as ElementsCheckoutResult, eg as ElementsCustomerInfo, y as ElementsOptions, dP as EnrollAndLinkOrderInput, dS as EnrollAndLinkOrderResult, dM as EnrollmentData, aq as Err, cg as FeeBearerType, F as FetchQuoteInput, ce as FulfillmentLink, cd as FulfillmentStatus, cc as FulfillmentType, e3 as FxQuote, e2 as FxQuoteRequest, e4 as FxRateResponse, r as FxService, dn as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, bb as GroupPricingBehavior, el as IframeToParentMessage, I as InventoryService, dD as InventorySummary, aG as InventoryType, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, bN as LineConfiguration, ci as LineItem, c9 as LineType, dI as LinkData, dR as LinkEnrollResult, L as LinkService, dT as LinkSession, dQ as LinkStatusResult, s as LiteBootstrap, q as LiteService, cT as Location, cN as LocationAppointment, bn as LocationProductPrice, dA as LocationStock, cR as LocationTaxBehavior, cS as LocationTaxOverrides, cW as LocationTimeProfile, d0 as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, dO as MobileMoneyData, e0 as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, eb as ObservabilityHooks, ap as Ok, cj as Order, c8 as OrderChannel, cs as OrderFilter, cf as OrderFulfillmentSummary, cm as OrderGroup, cq as OrderGroupDetails, cn as OrderGroupPayment, cl as OrderGroupPaymentState, cp as OrderGroupPaymentSummary, ck as OrderHistory, ca as OrderLineState, cb as OrderLineStatus, cr as OrderPaymentEvent, O as OrderQueries, co as OrderSplitDetail, c6 as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, ek as ParentToIframeMessage, ee as PaymentMethodInfo, c7 as PaymentState, d_ as PickupTime, dZ as PickupTimeType, bm as Price, bu as PriceAdjustment, bx as PriceDecisionPath, bl as PriceEntryType, bw as PricePathTaxInfo, P as PriceQuote, bs as PriceSource, cF as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, aL as Product, aZ as ProductAddOn, bo as ProductAvailability, dy as ProductStock, bp as ProductTimeProfile, aF as ProductType, aN as ProductVariant, aS as ProductVariantValue, aM as ProductWithDetails, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, cw as RefundOrderInput, cz as ReminderMethod, cC as ReminderSettings, e5 as RequestContext, e8 as RequestErrorEvent, dW as RequestOtpInput, e6 as RequestStartEvent, e7 as RequestSuccessEvent, dq as RescheduleBookingInput, cI as ResourceAssignment, d9 as ResourceAvailabilityException, d8 as ResourceAvailabilityRule, dd as ResourceType, ao as Result, e9 as RetryEvent, dV as RevokeAllSessionsResult, dU as RevokeSessionResult, cY as Room, aK as SalesChannel, cG as SchedulingMetadata, cJ as SchedulingResult, p as SchedulingService, S as SearchOptions, bD as SelectedAddOnOption, de as Service, d5 as ServiceAvailabilityException, ds as ServiceAvailabilityParams, dt as ServiceAvailabilityResult, d4 as ServiceAvailabilityRule, cZ as ServiceCharge, cE as ServiceNotes, cL as ServiceScheduleRequest, db as ServiceStaffRequirement, cx as ServiceStatus, df as ServiceWithStaff, ea as SessionChangeEvent, dg as Staff, cH as StaffAssignment, d7 as StaffAvailabilityException, d6 as StaffAvailabilityRule, da as StaffBookingProfile, cy as StaffRole, cM as StaffScheduleItem, dw as Stock, dx as StockLevel, du as StockOwnershipType, dv as StockStatus, c_ as StorefrontBootstrap, cX as Table, T as TableInfo, bv as TaxPathComponent, cU as TimeRange, cV as TimeRanges, dh as TimeSlot, c1 as UICart, bV as UICartBusiness, bX as UICartCustomer, bW as UICartLocation, bY as UICartPricing, c2 as UICartResponse, dK as UpdateAddressInput, c4 as UpdateCartItemInput, cu as UpdateOrderStatusInput, U as UpdateProfileInput, aP as VariantAxis, aU as VariantAxisSelection, aR as VariantAxisValue, aQ as VariantAxisWithValues, bG as VariantDetails, b$ as VariantDetailsDTO, aO as VariantDisplayAttribute, aT as VariantLocationAvailability, dz as VariantStock, aH as VariantStrategy, dX as VerifyOtpInput, aD as combine, aE as combineObject, c as createCimplifyClient, w as createElements, as as err, ax as flatMap, aB as fromPromise, k as generateIdempotencyKey, ay as getOrElse, au as isErr, at as isOk, aw as mapError, av as mapResult, ar as ok, aA as toNullable, aC as tryCatch, az as unwrap } from './client-COpV6Yuu.js';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.js';
|
|
3
3
|
import { A as ApiError } from './payment-Cu75tmUc.js';
|
|
4
4
|
export { q as AuthorizationType, h as CimplifyError, b as Currency, C as CurrencyCode, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, I as InitializePaymentResult, M as Money, d as Pagination, P as PaginationParams, t as Payment, w as PaymentErrorDetails, s as PaymentMethod, p as PaymentMethodType, r as PaymentProcessingState, o as PaymentProvider, u as PaymentResponse, n as PaymentStatus, v as PaymentStatusResponse, S as SubmitAuthorizationInput, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, i as isCimplifyError, l as isRetryableError, m as money, a as moneyFromNumber } from './payment-Cu75tmUc.js';
|
package/dist/index.js
CHANGED
|
@@ -2085,6 +2085,9 @@ var LinkService = class {
|
|
|
2085
2085
|
constructor(client) {
|
|
2086
2086
|
this.client = client;
|
|
2087
2087
|
}
|
|
2088
|
+
async getProfile() {
|
|
2089
|
+
return safe5(this.client.linkGet("/v1/link/profile"));
|
|
2090
|
+
}
|
|
2088
2091
|
async requestOtp(input) {
|
|
2089
2092
|
return safe5(this.client.linkPost("/v1/link/auth/request-otp", input));
|
|
2090
2093
|
}
|
|
@@ -2112,13 +2115,13 @@ var LinkService = class {
|
|
|
2112
2115
|
);
|
|
2113
2116
|
}
|
|
2114
2117
|
async getLinkData() {
|
|
2115
|
-
return safe5(this.client.
|
|
2118
|
+
return safe5(this.client.linkGet("/v1/link/data"));
|
|
2116
2119
|
}
|
|
2117
2120
|
async getAddresses() {
|
|
2118
|
-
return safe5(this.client.
|
|
2121
|
+
return safe5(this.client.linkGet("/v1/link/addresses"));
|
|
2119
2122
|
}
|
|
2120
2123
|
async getMobileMoney() {
|
|
2121
|
-
return safe5(this.client.
|
|
2124
|
+
return safe5(this.client.linkGet("/v1/link/mobile-money"));
|
|
2122
2125
|
}
|
|
2123
2126
|
async getPreferences() {
|
|
2124
2127
|
return safe5(this.client.query(LINK_QUERY.PREFERENCES));
|
|
@@ -2141,10 +2144,10 @@ var LinkService = class {
|
|
|
2141
2144
|
return safe5(this.client.call(LINK_MUTATION.UPDATE_ADDRESS, input));
|
|
2142
2145
|
}
|
|
2143
2146
|
async deleteAddress(addressId) {
|
|
2144
|
-
return safe5(this.client.
|
|
2147
|
+
return safe5(this.client.linkDelete(`/v1/link/addresses/${addressId}`));
|
|
2145
2148
|
}
|
|
2146
2149
|
async setDefaultAddress(addressId) {
|
|
2147
|
-
return safe5(this.client.
|
|
2150
|
+
return safe5(this.client.linkPost(`/v1/link/addresses/${addressId}/default`));
|
|
2148
2151
|
}
|
|
2149
2152
|
async trackAddressUsage(addressId) {
|
|
2150
2153
|
return safe5(
|
|
@@ -2157,11 +2160,13 @@ var LinkService = class {
|
|
|
2157
2160
|
return safe5(this.client.call(LINK_MUTATION.CREATE_MOBILE_MONEY, input));
|
|
2158
2161
|
}
|
|
2159
2162
|
async deleteMobileMoney(mobileMoneyId) {
|
|
2160
|
-
return safe5(
|
|
2163
|
+
return safe5(
|
|
2164
|
+
this.client.linkDelete(`/v1/link/mobile-money/${mobileMoneyId}`)
|
|
2165
|
+
);
|
|
2161
2166
|
}
|
|
2162
2167
|
async setDefaultMobileMoney(mobileMoneyId) {
|
|
2163
2168
|
return safe5(
|
|
2164
|
-
this.client.
|
|
2169
|
+
this.client.linkPost(`/v1/link/mobile-money/${mobileMoneyId}/default`)
|
|
2165
2170
|
);
|
|
2166
2171
|
}
|
|
2167
2172
|
async trackMobileMoneyUsage(mobileMoneyId) {
|
|
@@ -3326,7 +3331,7 @@ var CimplifyClient = class {
|
|
|
3326
3331
|
this.retryDelay = config.retryDelay ?? DEFAULT_RETRY_DELAY_MS;
|
|
3327
3332
|
this.hooks = config.hooks ?? {};
|
|
3328
3333
|
this.accessToken = this.loadAccessToken();
|
|
3329
|
-
if (!this.publicKey) {
|
|
3334
|
+
if (!this.publicKey && !config.suppressPublicKeyWarning) {
|
|
3330
3335
|
console.warn(
|
|
3331
3336
|
'[Cimplify] No public key found. Set NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY in your environment, or pass { publicKey: "pk_..." } to createCimplifyClient().'
|
|
3332
3337
|
);
|
|
@@ -3439,9 +3444,12 @@ var CimplifyClient = class {
|
|
|
3439
3444
|
}
|
|
3440
3445
|
getHeaders() {
|
|
3441
3446
|
const headers = {
|
|
3442
|
-
"Content-Type": "application/json"
|
|
3443
|
-
"X-API-Key": this.publicKey
|
|
3447
|
+
"Content-Type": "application/json"
|
|
3444
3448
|
};
|
|
3449
|
+
const trimmedPublicKey = this.publicKey.trim();
|
|
3450
|
+
if (trimmedPublicKey) {
|
|
3451
|
+
headers["X-API-Key"] = trimmedPublicKey;
|
|
3452
|
+
}
|
|
3445
3453
|
if (this.accessToken) {
|
|
3446
3454
|
headers["Authorization"] = `Bearer ${this.accessToken}`;
|
|
3447
3455
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2083,6 +2083,9 @@ var LinkService = class {
|
|
|
2083
2083
|
constructor(client) {
|
|
2084
2084
|
this.client = client;
|
|
2085
2085
|
}
|
|
2086
|
+
async getProfile() {
|
|
2087
|
+
return safe5(this.client.linkGet("/v1/link/profile"));
|
|
2088
|
+
}
|
|
2086
2089
|
async requestOtp(input) {
|
|
2087
2090
|
return safe5(this.client.linkPost("/v1/link/auth/request-otp", input));
|
|
2088
2091
|
}
|
|
@@ -2110,13 +2113,13 @@ var LinkService = class {
|
|
|
2110
2113
|
);
|
|
2111
2114
|
}
|
|
2112
2115
|
async getLinkData() {
|
|
2113
|
-
return safe5(this.client.
|
|
2116
|
+
return safe5(this.client.linkGet("/v1/link/data"));
|
|
2114
2117
|
}
|
|
2115
2118
|
async getAddresses() {
|
|
2116
|
-
return safe5(this.client.
|
|
2119
|
+
return safe5(this.client.linkGet("/v1/link/addresses"));
|
|
2117
2120
|
}
|
|
2118
2121
|
async getMobileMoney() {
|
|
2119
|
-
return safe5(this.client.
|
|
2122
|
+
return safe5(this.client.linkGet("/v1/link/mobile-money"));
|
|
2120
2123
|
}
|
|
2121
2124
|
async getPreferences() {
|
|
2122
2125
|
return safe5(this.client.query(LINK_QUERY.PREFERENCES));
|
|
@@ -2139,10 +2142,10 @@ var LinkService = class {
|
|
|
2139
2142
|
return safe5(this.client.call(LINK_MUTATION.UPDATE_ADDRESS, input));
|
|
2140
2143
|
}
|
|
2141
2144
|
async deleteAddress(addressId) {
|
|
2142
|
-
return safe5(this.client.
|
|
2145
|
+
return safe5(this.client.linkDelete(`/v1/link/addresses/${addressId}`));
|
|
2143
2146
|
}
|
|
2144
2147
|
async setDefaultAddress(addressId) {
|
|
2145
|
-
return safe5(this.client.
|
|
2148
|
+
return safe5(this.client.linkPost(`/v1/link/addresses/${addressId}/default`));
|
|
2146
2149
|
}
|
|
2147
2150
|
async trackAddressUsage(addressId) {
|
|
2148
2151
|
return safe5(
|
|
@@ -2155,11 +2158,13 @@ var LinkService = class {
|
|
|
2155
2158
|
return safe5(this.client.call(LINK_MUTATION.CREATE_MOBILE_MONEY, input));
|
|
2156
2159
|
}
|
|
2157
2160
|
async deleteMobileMoney(mobileMoneyId) {
|
|
2158
|
-
return safe5(
|
|
2161
|
+
return safe5(
|
|
2162
|
+
this.client.linkDelete(`/v1/link/mobile-money/${mobileMoneyId}`)
|
|
2163
|
+
);
|
|
2159
2164
|
}
|
|
2160
2165
|
async setDefaultMobileMoney(mobileMoneyId) {
|
|
2161
2166
|
return safe5(
|
|
2162
|
-
this.client.
|
|
2167
|
+
this.client.linkPost(`/v1/link/mobile-money/${mobileMoneyId}/default`)
|
|
2163
2168
|
);
|
|
2164
2169
|
}
|
|
2165
2170
|
async trackMobileMoneyUsage(mobileMoneyId) {
|
|
@@ -3324,7 +3329,7 @@ var CimplifyClient = class {
|
|
|
3324
3329
|
this.retryDelay = config.retryDelay ?? DEFAULT_RETRY_DELAY_MS;
|
|
3325
3330
|
this.hooks = config.hooks ?? {};
|
|
3326
3331
|
this.accessToken = this.loadAccessToken();
|
|
3327
|
-
if (!this.publicKey) {
|
|
3332
|
+
if (!this.publicKey && !config.suppressPublicKeyWarning) {
|
|
3328
3333
|
console.warn(
|
|
3329
3334
|
'[Cimplify] No public key found. Set NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY in your environment, or pass { publicKey: "pk_..." } to createCimplifyClient().'
|
|
3330
3335
|
);
|
|
@@ -3437,9 +3442,12 @@ var CimplifyClient = class {
|
|
|
3437
3442
|
}
|
|
3438
3443
|
getHeaders() {
|
|
3439
3444
|
const headers = {
|
|
3440
|
-
"Content-Type": "application/json"
|
|
3441
|
-
"X-API-Key": this.publicKey
|
|
3445
|
+
"Content-Type": "application/json"
|
|
3442
3446
|
};
|
|
3447
|
+
const trimmedPublicKey = this.publicKey.trim();
|
|
3448
|
+
if (trimmedPublicKey) {
|
|
3449
|
+
headers["X-API-Key"] = trimmedPublicKey;
|
|
3450
|
+
}
|
|
3443
3451
|
if (this.accessToken) {
|
|
3444
3452
|
headers["Authorization"] = `Bearer ${this.accessToken}`;
|
|
3445
3453
|
}
|
package/dist/react.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, cT as Location, cQ as Business, aL as Product, aM as ProductWithDetails, a_ as Category, bH as BundleSelectionInput, bi as ComponentSelectionInput, cj as Order, b0 as Collection, b7 as BundleWithDetails, be as CompositeWithDetails, bj as CompositePriceResult, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, eh as AuthenticatedData, ed as AddressInfo, ee as PaymentMethodInfo, ej as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-
|
|
1
|
+
import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, cT as Location, cQ as Business, aL as Product, aM as ProductWithDetails, a_ as Category, bH as BundleSelectionInput, bi as ComponentSelectionInput, cj as Order, b0 as Collection, b7 as BundleWithDetails, be as CompositeWithDetails, bj as CompositePriceResult, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, eh as AuthenticatedData, ed as AddressInfo, ee as PaymentMethodInfo, ej as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-vmXPt1j0.mjs';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { h as CimplifyError, C as CurrencyCode } from './payment-Cu75tmUc.mjs';
|
|
4
4
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.mjs';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, cT as Location, cQ as Business, aL as Product, aM as ProductWithDetails, a_ as Category, bH as BundleSelectionInput, bi as ComponentSelectionInput, cj as Order, b0 as Collection, b7 as BundleWithDetails, be as CompositeWithDetails, bj as CompositePriceResult, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, eh as AuthenticatedData, ed as AddressInfo, ee as PaymentMethodInfo, ej as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-
|
|
1
|
+
import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, cT as Location, cQ as Business, aL as Product, aM as ProductWithDetails, a_ as Category, bH as BundleSelectionInput, bi as ComponentSelectionInput, cj as Order, b0 as Collection, b7 as BundleWithDetails, be as CompositeWithDetails, bj as CompositePriceResult, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, eh as AuthenticatedData, ed as AddressInfo, ee as PaymentMethodInfo, ej as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-COpV6Yuu.js';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { h as CimplifyError, C as CurrencyCode } from './payment-Cu75tmUc.js';
|
|
4
4
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.js';
|
package/dist/react.js
CHANGED
|
@@ -1283,9 +1283,6 @@ var CartOperations = class {
|
|
|
1283
1283
|
|
|
1284
1284
|
// src/constants.ts
|
|
1285
1285
|
var LINK_QUERY = {
|
|
1286
|
-
DATA: "link.data",
|
|
1287
|
-
ADDRESSES: "link.addresses",
|
|
1288
|
-
MOBILE_MONEY: "link.mobile_money",
|
|
1289
1286
|
PREFERENCES: "link.preferences"};
|
|
1290
1287
|
var LINK_MUTATION = {
|
|
1291
1288
|
CHECK_STATUS: "link.check_status",
|
|
@@ -1294,12 +1291,8 @@ var LINK_MUTATION = {
|
|
|
1294
1291
|
UPDATE_PREFERENCES: "link.update_preferences",
|
|
1295
1292
|
CREATE_ADDRESS: "link.create_address",
|
|
1296
1293
|
UPDATE_ADDRESS: "link.update_address",
|
|
1297
|
-
DELETE_ADDRESS: "link.delete_address",
|
|
1298
|
-
SET_DEFAULT_ADDRESS: "link.set_default_address",
|
|
1299
1294
|
TRACK_ADDRESS_USAGE: "link.track_address_usage",
|
|
1300
1295
|
CREATE_MOBILE_MONEY: "link.create_mobile_money",
|
|
1301
|
-
DELETE_MOBILE_MONEY: "link.delete_mobile_money",
|
|
1302
|
-
SET_DEFAULT_MOBILE_MONEY: "link.set_default_mobile_money",
|
|
1303
1296
|
TRACK_MOBILE_MONEY_USAGE: "link.track_mobile_money_usage",
|
|
1304
1297
|
VERIFY_MOBILE_MONEY: "link.verify_mobile_money"};
|
|
1305
1298
|
var AUTH_MUTATION = {
|
|
@@ -2263,6 +2256,9 @@ var LinkService = class {
|
|
|
2263
2256
|
constructor(client) {
|
|
2264
2257
|
this.client = client;
|
|
2265
2258
|
}
|
|
2259
|
+
async getProfile() {
|
|
2260
|
+
return safe5(this.client.linkGet("/v1/link/profile"));
|
|
2261
|
+
}
|
|
2266
2262
|
async requestOtp(input) {
|
|
2267
2263
|
return safe5(this.client.linkPost("/v1/link/auth/request-otp", input));
|
|
2268
2264
|
}
|
|
@@ -2290,13 +2286,13 @@ var LinkService = class {
|
|
|
2290
2286
|
);
|
|
2291
2287
|
}
|
|
2292
2288
|
async getLinkData() {
|
|
2293
|
-
return safe5(this.client.
|
|
2289
|
+
return safe5(this.client.linkGet("/v1/link/data"));
|
|
2294
2290
|
}
|
|
2295
2291
|
async getAddresses() {
|
|
2296
|
-
return safe5(this.client.
|
|
2292
|
+
return safe5(this.client.linkGet("/v1/link/addresses"));
|
|
2297
2293
|
}
|
|
2298
2294
|
async getMobileMoney() {
|
|
2299
|
-
return safe5(this.client.
|
|
2295
|
+
return safe5(this.client.linkGet("/v1/link/mobile-money"));
|
|
2300
2296
|
}
|
|
2301
2297
|
async getPreferences() {
|
|
2302
2298
|
return safe5(this.client.query(LINK_QUERY.PREFERENCES));
|
|
@@ -2319,10 +2315,10 @@ var LinkService = class {
|
|
|
2319
2315
|
return safe5(this.client.call(LINK_MUTATION.UPDATE_ADDRESS, input));
|
|
2320
2316
|
}
|
|
2321
2317
|
async deleteAddress(addressId) {
|
|
2322
|
-
return safe5(this.client.
|
|
2318
|
+
return safe5(this.client.linkDelete(`/v1/link/addresses/${addressId}`));
|
|
2323
2319
|
}
|
|
2324
2320
|
async setDefaultAddress(addressId) {
|
|
2325
|
-
return safe5(this.client.
|
|
2321
|
+
return safe5(this.client.linkPost(`/v1/link/addresses/${addressId}/default`));
|
|
2326
2322
|
}
|
|
2327
2323
|
async trackAddressUsage(addressId) {
|
|
2328
2324
|
return safe5(
|
|
@@ -2335,11 +2331,13 @@ var LinkService = class {
|
|
|
2335
2331
|
return safe5(this.client.call(LINK_MUTATION.CREATE_MOBILE_MONEY, input));
|
|
2336
2332
|
}
|
|
2337
2333
|
async deleteMobileMoney(mobileMoneyId) {
|
|
2338
|
-
return safe5(
|
|
2334
|
+
return safe5(
|
|
2335
|
+
this.client.linkDelete(`/v1/link/mobile-money/${mobileMoneyId}`)
|
|
2336
|
+
);
|
|
2339
2337
|
}
|
|
2340
2338
|
async setDefaultMobileMoney(mobileMoneyId) {
|
|
2341
2339
|
return safe5(
|
|
2342
|
-
this.client.
|
|
2340
|
+
this.client.linkPost(`/v1/link/mobile-money/${mobileMoneyId}/default`)
|
|
2343
2341
|
);
|
|
2344
2342
|
}
|
|
2345
2343
|
async trackMobileMoneyUsage(mobileMoneyId) {
|
|
@@ -3465,7 +3463,7 @@ var CimplifyClient = class {
|
|
|
3465
3463
|
this.retryDelay = config.retryDelay ?? DEFAULT_RETRY_DELAY_MS;
|
|
3466
3464
|
this.hooks = config.hooks ?? {};
|
|
3467
3465
|
this.accessToken = this.loadAccessToken();
|
|
3468
|
-
if (!this.publicKey) {
|
|
3466
|
+
if (!this.publicKey && !config.suppressPublicKeyWarning) {
|
|
3469
3467
|
console.warn(
|
|
3470
3468
|
'[Cimplify] No public key found. Set NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY in your environment, or pass { publicKey: "pk_..." } to createCimplifyClient().'
|
|
3471
3469
|
);
|
|
@@ -3578,9 +3576,12 @@ var CimplifyClient = class {
|
|
|
3578
3576
|
}
|
|
3579
3577
|
getHeaders() {
|
|
3580
3578
|
const headers = {
|
|
3581
|
-
"Content-Type": "application/json"
|
|
3582
|
-
"X-API-Key": this.publicKey
|
|
3579
|
+
"Content-Type": "application/json"
|
|
3583
3580
|
};
|
|
3581
|
+
const trimmedPublicKey = this.publicKey.trim();
|
|
3582
|
+
if (trimmedPublicKey) {
|
|
3583
|
+
headers["X-API-Key"] = trimmedPublicKey;
|
|
3584
|
+
}
|
|
3584
3585
|
if (this.accessToken) {
|
|
3585
3586
|
headers["Authorization"] = `Bearer ${this.accessToken}`;
|
|
3586
3587
|
}
|
package/dist/react.mjs
CHANGED
|
@@ -1281,9 +1281,6 @@ var CartOperations = class {
|
|
|
1281
1281
|
|
|
1282
1282
|
// src/constants.ts
|
|
1283
1283
|
var LINK_QUERY = {
|
|
1284
|
-
DATA: "link.data",
|
|
1285
|
-
ADDRESSES: "link.addresses",
|
|
1286
|
-
MOBILE_MONEY: "link.mobile_money",
|
|
1287
1284
|
PREFERENCES: "link.preferences"};
|
|
1288
1285
|
var LINK_MUTATION = {
|
|
1289
1286
|
CHECK_STATUS: "link.check_status",
|
|
@@ -1292,12 +1289,8 @@ var LINK_MUTATION = {
|
|
|
1292
1289
|
UPDATE_PREFERENCES: "link.update_preferences",
|
|
1293
1290
|
CREATE_ADDRESS: "link.create_address",
|
|
1294
1291
|
UPDATE_ADDRESS: "link.update_address",
|
|
1295
|
-
DELETE_ADDRESS: "link.delete_address",
|
|
1296
|
-
SET_DEFAULT_ADDRESS: "link.set_default_address",
|
|
1297
1292
|
TRACK_ADDRESS_USAGE: "link.track_address_usage",
|
|
1298
1293
|
CREATE_MOBILE_MONEY: "link.create_mobile_money",
|
|
1299
|
-
DELETE_MOBILE_MONEY: "link.delete_mobile_money",
|
|
1300
|
-
SET_DEFAULT_MOBILE_MONEY: "link.set_default_mobile_money",
|
|
1301
1294
|
TRACK_MOBILE_MONEY_USAGE: "link.track_mobile_money_usage",
|
|
1302
1295
|
VERIFY_MOBILE_MONEY: "link.verify_mobile_money"};
|
|
1303
1296
|
var AUTH_MUTATION = {
|
|
@@ -2261,6 +2254,9 @@ var LinkService = class {
|
|
|
2261
2254
|
constructor(client) {
|
|
2262
2255
|
this.client = client;
|
|
2263
2256
|
}
|
|
2257
|
+
async getProfile() {
|
|
2258
|
+
return safe5(this.client.linkGet("/v1/link/profile"));
|
|
2259
|
+
}
|
|
2264
2260
|
async requestOtp(input) {
|
|
2265
2261
|
return safe5(this.client.linkPost("/v1/link/auth/request-otp", input));
|
|
2266
2262
|
}
|
|
@@ -2288,13 +2284,13 @@ var LinkService = class {
|
|
|
2288
2284
|
);
|
|
2289
2285
|
}
|
|
2290
2286
|
async getLinkData() {
|
|
2291
|
-
return safe5(this.client.
|
|
2287
|
+
return safe5(this.client.linkGet("/v1/link/data"));
|
|
2292
2288
|
}
|
|
2293
2289
|
async getAddresses() {
|
|
2294
|
-
return safe5(this.client.
|
|
2290
|
+
return safe5(this.client.linkGet("/v1/link/addresses"));
|
|
2295
2291
|
}
|
|
2296
2292
|
async getMobileMoney() {
|
|
2297
|
-
return safe5(this.client.
|
|
2293
|
+
return safe5(this.client.linkGet("/v1/link/mobile-money"));
|
|
2298
2294
|
}
|
|
2299
2295
|
async getPreferences() {
|
|
2300
2296
|
return safe5(this.client.query(LINK_QUERY.PREFERENCES));
|
|
@@ -2317,10 +2313,10 @@ var LinkService = class {
|
|
|
2317
2313
|
return safe5(this.client.call(LINK_MUTATION.UPDATE_ADDRESS, input));
|
|
2318
2314
|
}
|
|
2319
2315
|
async deleteAddress(addressId) {
|
|
2320
|
-
return safe5(this.client.
|
|
2316
|
+
return safe5(this.client.linkDelete(`/v1/link/addresses/${addressId}`));
|
|
2321
2317
|
}
|
|
2322
2318
|
async setDefaultAddress(addressId) {
|
|
2323
|
-
return safe5(this.client.
|
|
2319
|
+
return safe5(this.client.linkPost(`/v1/link/addresses/${addressId}/default`));
|
|
2324
2320
|
}
|
|
2325
2321
|
async trackAddressUsage(addressId) {
|
|
2326
2322
|
return safe5(
|
|
@@ -2333,11 +2329,13 @@ var LinkService = class {
|
|
|
2333
2329
|
return safe5(this.client.call(LINK_MUTATION.CREATE_MOBILE_MONEY, input));
|
|
2334
2330
|
}
|
|
2335
2331
|
async deleteMobileMoney(mobileMoneyId) {
|
|
2336
|
-
return safe5(
|
|
2332
|
+
return safe5(
|
|
2333
|
+
this.client.linkDelete(`/v1/link/mobile-money/${mobileMoneyId}`)
|
|
2334
|
+
);
|
|
2337
2335
|
}
|
|
2338
2336
|
async setDefaultMobileMoney(mobileMoneyId) {
|
|
2339
2337
|
return safe5(
|
|
2340
|
-
this.client.
|
|
2338
|
+
this.client.linkPost(`/v1/link/mobile-money/${mobileMoneyId}/default`)
|
|
2341
2339
|
);
|
|
2342
2340
|
}
|
|
2343
2341
|
async trackMobileMoneyUsage(mobileMoneyId) {
|
|
@@ -3463,7 +3461,7 @@ var CimplifyClient = class {
|
|
|
3463
3461
|
this.retryDelay = config.retryDelay ?? DEFAULT_RETRY_DELAY_MS;
|
|
3464
3462
|
this.hooks = config.hooks ?? {};
|
|
3465
3463
|
this.accessToken = this.loadAccessToken();
|
|
3466
|
-
if (!this.publicKey) {
|
|
3464
|
+
if (!this.publicKey && !config.suppressPublicKeyWarning) {
|
|
3467
3465
|
console.warn(
|
|
3468
3466
|
'[Cimplify] No public key found. Set NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY in your environment, or pass { publicKey: "pk_..." } to createCimplifyClient().'
|
|
3469
3467
|
);
|
|
@@ -3576,9 +3574,12 @@ var CimplifyClient = class {
|
|
|
3576
3574
|
}
|
|
3577
3575
|
getHeaders() {
|
|
3578
3576
|
const headers = {
|
|
3579
|
-
"Content-Type": "application/json"
|
|
3580
|
-
"X-API-Key": this.publicKey
|
|
3577
|
+
"Content-Type": "application/json"
|
|
3581
3578
|
};
|
|
3579
|
+
const trimmedPublicKey = this.publicKey.trim();
|
|
3580
|
+
if (trimmedPublicKey) {
|
|
3581
|
+
headers["X-API-Key"] = trimmedPublicKey;
|
|
3582
|
+
}
|
|
3582
3583
|
if (this.accessToken) {
|
|
3583
3584
|
headers["Authorization"] = `Bearer ${this.accessToken}`;
|
|
3584
3585
|
}
|