@cimplify/sdk 0.6.12 → 0.7.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/README.md CHANGED
@@ -20,7 +20,9 @@ import { createCimplifyClient } from "@cimplify/sdk";
20
20
  const cimplify = createCimplifyClient();
21
21
 
22
22
  // Fetch products
23
- const products = await cimplify.catalogue.getProducts();
23
+ const productsResult = await cimplify.catalogue.getProducts();
24
+ if (!productsResult.ok) throw productsResult.error;
25
+ const products = productsResult.value.items;
24
26
 
25
27
  // Add to cart
26
28
  await cimplify.cart.addItem({ item_id: "product-id", quantity: 1 });
@@ -40,8 +42,11 @@ const cart = await cimplify.cart.get();
40
42
 
41
43
  ```typescript
42
44
  // Products
43
- const products = await cimplify.catalogue.getProducts();
44
- const featured = await cimplify.catalogue.getProducts({ featured: true, limit: 10 });
45
+ const productsResult = await cimplify.catalogue.getProducts();
46
+ const featuredResult = await cimplify.catalogue.getProducts({ featured: true, limit: 10 });
47
+ if (!productsResult.ok || !featuredResult.ok) throw new Error("Failed to fetch products");
48
+ const products = productsResult.value.items;
49
+ const featured = featuredResult.value.items;
45
50
  const product = await cimplify.catalogue.getProduct("product-id");
46
51
  const product = await cimplify.catalogue.getProductBySlug("my-product");
47
52
 
@@ -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-BIbWQK7v.mjs';
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-hccS_JMl.mjs';
2
2
  import './payment-CLIWNMaP.mjs';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
@@ -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-2Rmdqutj.js';
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-CyBNao15.js';
2
2
  import './payment-CLIWNMaP.js';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
package/dist/advanced.js CHANGED
@@ -347,11 +347,6 @@ var CatalogueQueries = class {
347
347
  this.client = client;
348
348
  }
349
349
  async getProducts(options) {
350
- const result = await this.getProductsWithMeta(options);
351
- if (!result.ok) return result;
352
- return ok(result.value.items);
353
- }
354
- async getProductsWithMeta(options) {
355
350
  let query2 = "products";
356
351
  const filters = [];
357
352
  if (options?.category) {
@@ -734,7 +729,7 @@ var CatalogueQueries = class {
734
729
  limit: options?.limit ?? 20
735
730
  });
736
731
  if (!result.ok) return result;
737
- return ok(result.value);
732
+ return ok(result.value.items);
738
733
  }
739
734
  async searchProducts(query2, options) {
740
735
  return this.search(query2, options);
package/dist/advanced.mjs CHANGED
@@ -345,11 +345,6 @@ var CatalogueQueries = class {
345
345
  this.client = client;
346
346
  }
347
347
  async getProducts(options) {
348
- const result = await this.getProductsWithMeta(options);
349
- if (!result.ok) return result;
350
- return ok(result.value.items);
351
- }
352
- async getProductsWithMeta(options) {
353
348
  let query2 = "products";
354
349
  const filters = [];
355
350
  if (options?.category) {
@@ -732,7 +727,7 @@ var CatalogueQueries = class {
732
727
  limit: options?.limit ?? 20
733
728
  });
734
729
  if (!result.ok) return result;
735
- return ok(result.value);
730
+ return ok(result.value.items);
736
731
  }
737
732
  async searchProducts(query2, options) {
738
733
  return this.search(query2, options);
@@ -349,8 +349,7 @@ interface RefreshQuoteResult {
349
349
  declare class CatalogueQueries {
350
350
  private client;
351
351
  constructor(client: CimplifyClient);
352
- getProducts(options?: GetProductsOptions): Promise<Result<Product[], CimplifyError>>;
353
- getProductsWithMeta(options?: GetProductsOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
352
+ getProducts(options?: GetProductsOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
354
353
  getProduct(id: string): Promise<Result<ProductWithDetails, CimplifyError>>;
355
354
  getProductBySlug(slug: string): Promise<Result<ProductWithDetails, CimplifyError>>;
356
355
  getVariants(productId: string): Promise<Result<ProductVariant[], CimplifyError>>;
@@ -349,8 +349,7 @@ interface RefreshQuoteResult {
349
349
  declare class CatalogueQueries {
350
350
  private client;
351
351
  constructor(client: CimplifyClient);
352
- getProducts(options?: GetProductsOptions): Promise<Result<Product[], CimplifyError>>;
353
- getProductsWithMeta(options?: GetProductsOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
352
+ getProducts(options?: GetProductsOptions): Promise<Result<CatalogueResult<Product>, CimplifyError>>;
354
353
  getProduct(id: string): Promise<Result<ProductWithDetails, CimplifyError>>;
355
354
  getProductBySlug(slug: string): Promise<Result<ProductWithDetails, CimplifyError>>;
356
355
  getVariants(productId: string): Promise<Result<ProductVariant[], CimplifyError>>;
@@ -8,23 +8,17 @@ import { an as ChosenPrice, C as CurrencyCode, ak as TaxPathComponent, al as Pri
8
8
 
9
9
  /**
10
10
  * Individual tax component (e.g., VAT, NHIL, GETFund)
11
- */
12
- /**
13
11
  * @deprecated Use `TaxPathComponent` from `types/cart` instead.
14
12
  */
15
13
  type TaxComponent = TaxPathComponent;
16
14
  /**
17
15
  * Complete tax information from a pricing response
18
- */
19
- /**
20
16
  * @deprecated Use `PricePathTaxInfo` from `types/cart` instead.
21
17
  */
22
18
  type TaxInfo = PricePathTaxInfo;
23
19
  /**
24
20
  * Price information in snake_case format (as returned from backend)
25
21
  * Used by components that work with raw API responses
26
- */
27
- /**
28
22
  * @deprecated Use `ChosenPrice` from `types/cart` instead.
29
23
  */
30
24
  type PriceInfo = ChosenPrice;
@@ -8,23 +8,17 @@ import { an as ChosenPrice, C as CurrencyCode, ak as TaxPathComponent, al as Pri
8
8
 
9
9
  /**
10
10
  * Individual tax component (e.g., VAT, NHIL, GETFund)
11
- */
12
- /**
13
11
  * @deprecated Use `TaxPathComponent` from `types/cart` instead.
14
12
  */
15
13
  type TaxComponent = TaxPathComponent;
16
14
  /**
17
15
  * Complete tax information from a pricing response
18
- */
19
- /**
20
16
  * @deprecated Use `PricePathTaxInfo` from `types/cart` instead.
21
17
  */
22
18
  type TaxInfo = PricePathTaxInfo;
23
19
  /**
24
20
  * Price information in snake_case format (as returned from backend)
25
21
  * Used by components that work with raw API responses
26
- */
27
- /**
28
22
  * @deprecated Use `ChosenPrice` from `types/cart` instead.
29
23
  */
30
24
  type PriceInfo = ChosenPrice;
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, ck as AddressData, cM as AddressInfo, aR as AmountToPay, cv as AuthResponse, A as AuthService, m as AuthStatus, cO as AuthenticatedCustomer, cQ as AuthenticatedData, c8 as AvailabilityCheck, c9 as AvailabilityResult, bS as AvailableSlot, bV as Booking, bM as BookingRequirementOverride, bU as BookingStatus, bW as BookingWithDetails, b9 as BufferTimes, bo as Business, bC as BusinessHours, bn as BusinessPreferences, B as BusinessService, bB as BusinessSettings, bm as BusinessType, bz as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, b_ as CancelBookingInput, b3 as CancelOrderInput, bb as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aF as CatalogueResult, bD as CategoryInfo, o as ChangePasswordInput, bY as CheckSlotAvailabilityInput, cy as CheckoutAddressInfo, cA as CheckoutCustomerInfo, X as CheckoutFormData, b1 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, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, a5 as ContactType, cg as CreateAddressInput, ci as CreateMobileMoneyInput, cb as Customer, cc as CustomerAddress, ce as CustomerLinkPreferences, cd as CustomerMobileMoney, b8 as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, bT as DayAvailability, bi as DepositResult, a4 as DeviceType, x as ELEMENT_TYPES, E as EVENT_TYPES, cL as ElementAppearance, cV as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, cR as ElementsCheckoutData, cS as ElementsCheckoutResult, cP as ElementsCustomerInfo, y as ElementsOptions, cm as EnrollAndLinkOrderInput, cp as EnrollAndLinkOrderResult, cj as EnrollmentData, aq as Err, aQ as FeeBearerType, F as FetchQuoteInput, aO as FulfillmentLink, aN as FulfillmentStatus, aM as FulfillmentType, cC as FxQuote, cB as FxQuoteRequest, cD as FxRateResponse, r as FxService, bX as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cU as IframeToParentMessage, I as InventoryService, ca as InventorySummary, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, aS as LineItem, aJ as LineType, cf as LinkData, co as LinkEnrollResult, L as LinkService, cq as LinkSession, cn as LinkStatusResult, s as LiteBootstrap, q as LiteService, br as Location, bl as LocationAppointment, c7 as LocationStock, bp as LocationTaxBehavior, bq as LocationTaxOverrides, bu as LocationTimeProfile, bA as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, cl as MobileMoneyData, cz as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, cK as ObservabilityHooks, ap as Ok, aT as Order, aI as OrderChannel, b0 as OrderFilter, aP as OrderFulfillmentSummary, aW as OrderGroup, a_ as OrderGroupDetails, aX as OrderGroupPayment, aV as OrderGroupPaymentState, aZ as OrderGroupPaymentSummary, aU as OrderHistory, aK as OrderLineState, aL as OrderLineStatus, a$ as OrderPaymentEvent, O as OrderQueries, aY as OrderSplitDetail, aG as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, cT as ParentToIframeMessage, cN as PaymentMethodInfo, aH as PaymentState, cx as PickupTime, cw as PickupTimeType, P as PriceQuote, bd as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, c5 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b4 as RefundOrderInput, b7 as ReminderMethod, ba as ReminderSettings, cE as RequestContext, cH as RequestErrorEvent, ct as RequestOtpInput, cF as RequestStartEvent, cG as RequestSuccessEvent, bZ as RescheduleBookingInput, bg as ResourceAssignment, bJ as ResourceAvailabilityException, bI as ResourceAvailabilityRule, bN as ResourceType, ao as Result, cI as RetryEvent, cs as RevokeAllSessionsResult, cr as RevokeSessionResult, bw as Room, be as SchedulingMetadata, bh as SchedulingResult, p as SchedulingService, S as SearchOptions, bO as Service, bF as ServiceAvailabilityException, b$ as ServiceAvailabilityParams, c0 as ServiceAvailabilityResult, bE as ServiceAvailabilityRule, bx as ServiceCharge, bc as ServiceNotes, bj as ServiceScheduleRequest, bL as ServiceStaffRequirement, b5 as ServiceStatus, bP as ServiceWithStaff, cJ as SessionChangeEvent, bQ as Staff, bf as StaffAssignment, bH as StaffAvailabilityException, bG as StaffAvailabilityRule, bK as StaffBookingProfile, b6 as StaffRole, bk as StaffScheduleItem, c3 as Stock, c4 as StockLevel, c1 as StockOwnershipType, c2 as StockStatus, by as StorefrontBootstrap, bv as Table, T as TableInfo, bs as TimeRange, bt as TimeRanges, bR as TimeSlot, ch as UpdateAddressInput, b2 as UpdateOrderStatusInput, U as UpdateProfileInput, c6 as VariantStock, cu 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-BIbWQK7v.mjs';
1
+ export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, ck as AddressData, cM as AddressInfo, aR as AmountToPay, cv as AuthResponse, A as AuthService, m as AuthStatus, cO as AuthenticatedCustomer, cQ as AuthenticatedData, c8 as AvailabilityCheck, c9 as AvailabilityResult, bS as AvailableSlot, bV as Booking, bM as BookingRequirementOverride, bU as BookingStatus, bW as BookingWithDetails, b9 as BufferTimes, bo as Business, bC as BusinessHours, bn as BusinessPreferences, B as BusinessService, bB as BusinessSettings, bm as BusinessType, bz as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, b_ as CancelBookingInput, b3 as CancelOrderInput, bb as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aF as CatalogueResult, bD as CategoryInfo, o as ChangePasswordInput, bY as CheckSlotAvailabilityInput, cy as CheckoutAddressInfo, cA as CheckoutCustomerInfo, X as CheckoutFormData, b1 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, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, a5 as ContactType, cg as CreateAddressInput, ci as CreateMobileMoneyInput, cb as Customer, cc as CustomerAddress, ce as CustomerLinkPreferences, cd as CustomerMobileMoney, b8 as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, bT as DayAvailability, bi as DepositResult, a4 as DeviceType, x as ELEMENT_TYPES, E as EVENT_TYPES, cL as ElementAppearance, cV as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, cR as ElementsCheckoutData, cS as ElementsCheckoutResult, cP as ElementsCustomerInfo, y as ElementsOptions, cm as EnrollAndLinkOrderInput, cp as EnrollAndLinkOrderResult, cj as EnrollmentData, aq as Err, aQ as FeeBearerType, F as FetchQuoteInput, aO as FulfillmentLink, aN as FulfillmentStatus, aM as FulfillmentType, cC as FxQuote, cB as FxQuoteRequest, cD as FxRateResponse, r as FxService, bX as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cU as IframeToParentMessage, I as InventoryService, ca as InventorySummary, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, aS as LineItem, aJ as LineType, cf as LinkData, co as LinkEnrollResult, L as LinkService, cq as LinkSession, cn as LinkStatusResult, s as LiteBootstrap, q as LiteService, br as Location, bl as LocationAppointment, c7 as LocationStock, bp as LocationTaxBehavior, bq as LocationTaxOverrides, bu as LocationTimeProfile, bA as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, cl as MobileMoneyData, cz as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, cK as ObservabilityHooks, ap as Ok, aT as Order, aI as OrderChannel, b0 as OrderFilter, aP as OrderFulfillmentSummary, aW as OrderGroup, a_ as OrderGroupDetails, aX as OrderGroupPayment, aV as OrderGroupPaymentState, aZ as OrderGroupPaymentSummary, aU as OrderHistory, aK as OrderLineState, aL as OrderLineStatus, a$ as OrderPaymentEvent, O as OrderQueries, aY as OrderSplitDetail, aG as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, cT as ParentToIframeMessage, cN as PaymentMethodInfo, aH as PaymentState, cx as PickupTime, cw as PickupTimeType, P as PriceQuote, bd as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, c5 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b4 as RefundOrderInput, b7 as ReminderMethod, ba as ReminderSettings, cE as RequestContext, cH as RequestErrorEvent, ct as RequestOtpInput, cF as RequestStartEvent, cG as RequestSuccessEvent, bZ as RescheduleBookingInput, bg as ResourceAssignment, bJ as ResourceAvailabilityException, bI as ResourceAvailabilityRule, bN as ResourceType, ao as Result, cI as RetryEvent, cs as RevokeAllSessionsResult, cr as RevokeSessionResult, bw as Room, be as SchedulingMetadata, bh as SchedulingResult, p as SchedulingService, S as SearchOptions, bO as Service, bF as ServiceAvailabilityException, b$ as ServiceAvailabilityParams, c0 as ServiceAvailabilityResult, bE as ServiceAvailabilityRule, bx as ServiceCharge, bc as ServiceNotes, bj as ServiceScheduleRequest, bL as ServiceStaffRequirement, b5 as ServiceStatus, bP as ServiceWithStaff, cJ as SessionChangeEvent, bQ as Staff, bf as StaffAssignment, bH as StaffAvailabilityException, bG as StaffAvailabilityRule, bK as StaffBookingProfile, b6 as StaffRole, bk as StaffScheduleItem, c3 as Stock, c4 as StockLevel, c1 as StockOwnershipType, c2 as StockStatus, by as StorefrontBootstrap, bv as Table, T as TableInfo, bs as TimeRange, bt as TimeRanges, bR as TimeSlot, ch as UpdateAddressInput, b2 as UpdateOrderStatusInput, U as UpdateProfileInput, c6 as VariantStock, cu 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-hccS_JMl.mjs';
2
2
  export { QueryBuilder, query } from './advanced.mjs';
3
3
  import { A as ApiError } from './payment-CLIWNMaP.mjs';
4
4
  export { B as AddOn, at as AddOnDetails, aP as AddOnGroupDetails, G as AddOnOption, aO as AddOnOptionDetails, H as AddOnOptionPrice, F as AddOnWithOptions, aU as AddToCartInput, ai as AdjustmentType, ap as AppliedDiscount, a_ as AuthorizationType, ao as BenefitType, T as Bundle, Y as BundleComponentData, _ as BundleComponentInfo, R as BundlePriceType, W as BundleProduct, ay as BundleSelectionData, aw as BundleSelectionInput, ax as BundleStoredSelection, U as BundleSummary, X as BundleWithDetails, aD as Cart, au as CartAddOn, ag as CartChannel, aE as CartItem, aR as CartItemDetails, af as CartStatus, aW as CartSummary, aF as CartTotals, K as Category, L as CategorySummary, an as ChosenPrice, h as CimplifyError, N as Collection, Q as CollectionProduct, O as CollectionSummary, a4 as ComponentGroup, a5 as ComponentGroupWithComponents, a9 as ComponentPriceBreakdown, a7 as ComponentSelectionInput, a1 as ComponentSourceType, a2 as Composite, a6 as CompositeComponent, aA as CompositePriceBreakdown, a8 as CompositePriceResult, $ as CompositePricingMode, aB as CompositeSelectionData, a7 as CompositeSelectionInput, az as CompositeStoredSelection, a3 as CompositeWithDetails, b as Currency, C as CurrencyCode, p as DepositType, D as DigitalProductType, aq as DiscountBreakdown, ar as DiscountDetails, aI as DisplayAddOn, aJ as DisplayAddOnOption, aG as DisplayCart, aH as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a0 as GroupPricingBehavior, b2 as InitializePaymentResult, I as InventoryType, aC as LineConfiguration, ac as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b1 as Payment, b5 as PaymentErrorDetails, b0 as PaymentMethod, aZ as PaymentMethodType, a$ as PaymentProcessingState, aY as PaymentProvider, b3 as PaymentResponse, aX as PaymentStatus, b4 as PaymentStatusResponse, ab as Price, aj as PriceAdjustment, am as PriceDecisionPath, aa as PriceEntryType, al as PricePathTaxInfo, ah as PriceSource, q as Product, J as ProductAddOn, ad as ProductAvailability, o as ProductRenderHint, ae as ProductTimeProfile, n as ProductType, s as ProductVariant, x as ProductVariantValue, r as ProductWithDetails, S as SalesChannel, as as SelectedAddOnOption, b6 as SubmitAuthorizationInput, ak as TaxPathComponent, aS as UICart, aK as UICartBusiness, aM as UICartCustomer, aL as UICartLocation, aN as UICartPricing, aT as UICartResponse, aV as UpdateCartItemInput, u as VariantAxis, z as VariantAxisSelection, w as VariantAxisValue, v as VariantAxisWithValues, av as VariantDetails, aQ as VariantDetailsDTO, t as VariantDisplayAttribute, y as VariantLocationAvailability, V as VariantStrategy, 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-CLIWNMaP.mjs';
5
- export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-Dqaywky7.mjs';
5
+ export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-mrKi_VbR.mjs';
6
6
  export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme } from './ads-t3FBTU8p.mjs';
7
7
 
8
8
  /** Context sent with every request to scope operations to a specific location/branch */
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, ck as AddressData, cM as AddressInfo, aR as AmountToPay, cv as AuthResponse, A as AuthService, m as AuthStatus, cO as AuthenticatedCustomer, cQ as AuthenticatedData, c8 as AvailabilityCheck, c9 as AvailabilityResult, bS as AvailableSlot, bV as Booking, bM as BookingRequirementOverride, bU as BookingStatus, bW as BookingWithDetails, b9 as BufferTimes, bo as Business, bC as BusinessHours, bn as BusinessPreferences, B as BusinessService, bB as BusinessSettings, bm as BusinessType, bz as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, b_ as CancelBookingInput, b3 as CancelOrderInput, bb as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aF as CatalogueResult, bD as CategoryInfo, o as ChangePasswordInput, bY as CheckSlotAvailabilityInput, cy as CheckoutAddressInfo, cA as CheckoutCustomerInfo, X as CheckoutFormData, b1 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, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, a5 as ContactType, cg as CreateAddressInput, ci as CreateMobileMoneyInput, cb as Customer, cc as CustomerAddress, ce as CustomerLinkPreferences, cd as CustomerMobileMoney, b8 as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, bT as DayAvailability, bi as DepositResult, a4 as DeviceType, x as ELEMENT_TYPES, E as EVENT_TYPES, cL as ElementAppearance, cV as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, cR as ElementsCheckoutData, cS as ElementsCheckoutResult, cP as ElementsCustomerInfo, y as ElementsOptions, cm as EnrollAndLinkOrderInput, cp as EnrollAndLinkOrderResult, cj as EnrollmentData, aq as Err, aQ as FeeBearerType, F as FetchQuoteInput, aO as FulfillmentLink, aN as FulfillmentStatus, aM as FulfillmentType, cC as FxQuote, cB as FxQuoteRequest, cD as FxRateResponse, r as FxService, bX as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cU as IframeToParentMessage, I as InventoryService, ca as InventorySummary, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, aS as LineItem, aJ as LineType, cf as LinkData, co as LinkEnrollResult, L as LinkService, cq as LinkSession, cn as LinkStatusResult, s as LiteBootstrap, q as LiteService, br as Location, bl as LocationAppointment, c7 as LocationStock, bp as LocationTaxBehavior, bq as LocationTaxOverrides, bu as LocationTimeProfile, bA as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, cl as MobileMoneyData, cz as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, cK as ObservabilityHooks, ap as Ok, aT as Order, aI as OrderChannel, b0 as OrderFilter, aP as OrderFulfillmentSummary, aW as OrderGroup, a_ as OrderGroupDetails, aX as OrderGroupPayment, aV as OrderGroupPaymentState, aZ as OrderGroupPaymentSummary, aU as OrderHistory, aK as OrderLineState, aL as OrderLineStatus, a$ as OrderPaymentEvent, O as OrderQueries, aY as OrderSplitDetail, aG as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, cT as ParentToIframeMessage, cN as PaymentMethodInfo, aH as PaymentState, cx as PickupTime, cw as PickupTimeType, P as PriceQuote, bd as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, c5 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b4 as RefundOrderInput, b7 as ReminderMethod, ba as ReminderSettings, cE as RequestContext, cH as RequestErrorEvent, ct as RequestOtpInput, cF as RequestStartEvent, cG as RequestSuccessEvent, bZ as RescheduleBookingInput, bg as ResourceAssignment, bJ as ResourceAvailabilityException, bI as ResourceAvailabilityRule, bN as ResourceType, ao as Result, cI as RetryEvent, cs as RevokeAllSessionsResult, cr as RevokeSessionResult, bw as Room, be as SchedulingMetadata, bh as SchedulingResult, p as SchedulingService, S as SearchOptions, bO as Service, bF as ServiceAvailabilityException, b$ as ServiceAvailabilityParams, c0 as ServiceAvailabilityResult, bE as ServiceAvailabilityRule, bx as ServiceCharge, bc as ServiceNotes, bj as ServiceScheduleRequest, bL as ServiceStaffRequirement, b5 as ServiceStatus, bP as ServiceWithStaff, cJ as SessionChangeEvent, bQ as Staff, bf as StaffAssignment, bH as StaffAvailabilityException, bG as StaffAvailabilityRule, bK as StaffBookingProfile, b6 as StaffRole, bk as StaffScheduleItem, c3 as Stock, c4 as StockLevel, c1 as StockOwnershipType, c2 as StockStatus, by as StorefrontBootstrap, bv as Table, T as TableInfo, bs as TimeRange, bt as TimeRanges, bR as TimeSlot, ch as UpdateAddressInput, b2 as UpdateOrderStatusInput, U as UpdateProfileInput, c6 as VariantStock, cu 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-2Rmdqutj.js';
1
+ export { ad as AUTHORIZATION_TYPE, ai as AUTH_MUTATION, a2 as AbortablePromise, ck as AddressData, cM as AddressInfo, aR as AmountToPay, cv as AuthResponse, A as AuthService, m as AuthStatus, cO as AuthenticatedCustomer, cQ as AuthenticatedData, c8 as AvailabilityCheck, c9 as AvailabilityResult, bS as AvailableSlot, bV as Booking, bM as BookingRequirementOverride, bU as BookingStatus, bW as BookingWithDetails, b9 as BufferTimes, bo as Business, bC as BusinessHours, bn as BusinessPreferences, B as BusinessService, bB as BusinessSettings, bm as BusinessType, bz as BusinessWithLocations, a6 as CHECKOUT_MODE, aj as CHECKOUT_MUTATION, a9 as CHECKOUT_STEP, af as CONTACT_TYPE, b_ as CancelBookingInput, b3 as CancelOrderInput, bb as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aF as CatalogueResult, bD as CategoryInfo, o as ChangePasswordInput, bY as CheckSlotAvailabilityInput, cy as CheckoutAddressInfo, cA as CheckoutCustomerInfo, X as CheckoutFormData, b1 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, C as CimplifyClient, a as CimplifyConfig, v as CimplifyElement, u as CimplifyElements, a5 as ContactType, cg as CreateAddressInput, ci as CreateMobileMoneyInput, cb as Customer, cc as CustomerAddress, ce as CustomerLinkPreferences, cd as CustomerMobileMoney, b8 as CustomerServicePreferences, an as DEFAULT_COUNTRY, am as DEFAULT_CURRENCY, ae as DEVICE_TYPE, bT as DayAvailability, bi as DepositResult, a4 as DeviceType, x as ELEMENT_TYPES, E as EVENT_TYPES, cL as ElementAppearance, cV as ElementEventHandler, H as ElementEventType, z as ElementOptions, D as ElementType, cR as ElementsCheckoutData, cS as ElementsCheckoutResult, cP as ElementsCustomerInfo, y as ElementsOptions, cm as EnrollAndLinkOrderInput, cp as EnrollAndLinkOrderResult, cj as EnrollmentData, aq as Err, aQ as FeeBearerType, F as FetchQuoteInput, aO as FulfillmentLink, aN as FulfillmentStatus, aM as FulfillmentType, cC as FxQuote, cB as FxQuoteRequest, cD as FxRateResponse, r as FxService, bX as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cU as IframeToParentMessage, I as InventoryService, ca as InventorySummary, K as KitchenOrderItem, t as KitchenOrderResult, ah as LINK_MUTATION, ag as LINK_QUERY, aS as LineItem, aJ as LineType, cf as LinkData, co as LinkEnrollResult, L as LinkService, cq as LinkSession, cn as LinkStatusResult, s as LiteBootstrap, q as LiteService, br as Location, bl as LocationAppointment, c7 as LocationStock, bp as LocationTaxBehavior, bq as LocationTaxOverrides, bu as LocationTimeProfile, bA as LocationWithDetails, M as MESSAGE_TYPES, ac as MOBILE_MONEY_PROVIDER, cl as MobileMoneyData, cz as MobileMoneyDetails, a3 as MobileMoneyProvider, al as ORDER_MUTATION, a7 as ORDER_TYPE, cK as ObservabilityHooks, ap as Ok, aT as Order, aI as OrderChannel, b0 as OrderFilter, aP as OrderFulfillmentSummary, aW as OrderGroup, a_ as OrderGroupDetails, aX as OrderGroupPayment, aV as OrderGroupPaymentState, aZ as OrderGroupPaymentSummary, aU as OrderHistory, aK as OrderLineState, aL as OrderLineStatus, a$ as OrderPaymentEvent, O as OrderQueries, aY as OrderSplitDetail, aG as OrderStatus, n as OtpResult, a8 as PAYMENT_METHOD, ak as PAYMENT_MUTATION, aa as PAYMENT_STATE, ab as PICKUP_TIME_TYPE, cT as ParentToIframeMessage, cN as PaymentMethodInfo, aH as PaymentState, cx as PickupTime, cw as PickupTimeType, P as PriceQuote, bd as PricingOverrides, $ as ProcessAndResolveOptions, Z as ProcessCheckoutOptions, _ as ProcessCheckoutResult, c5 as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b4 as RefundOrderInput, b7 as ReminderMethod, ba as ReminderSettings, cE as RequestContext, cH as RequestErrorEvent, ct as RequestOtpInput, cF as RequestStartEvent, cG as RequestSuccessEvent, bZ as RescheduleBookingInput, bg as ResourceAssignment, bJ as ResourceAvailabilityException, bI as ResourceAvailabilityRule, bN as ResourceType, ao as Result, cI as RetryEvent, cs as RevokeAllSessionsResult, cr as RevokeSessionResult, bw as Room, be as SchedulingMetadata, bh as SchedulingResult, p as SchedulingService, S as SearchOptions, bO as Service, bF as ServiceAvailabilityException, b$ as ServiceAvailabilityParams, c0 as ServiceAvailabilityResult, bE as ServiceAvailabilityRule, bx as ServiceCharge, bc as ServiceNotes, bj as ServiceScheduleRequest, bL as ServiceStaffRequirement, b5 as ServiceStatus, bP as ServiceWithStaff, cJ as SessionChangeEvent, bQ as Staff, bf as StaffAssignment, bH as StaffAvailabilityException, bG as StaffAvailabilityRule, bK as StaffBookingProfile, b6 as StaffRole, bk as StaffScheduleItem, c3 as Stock, c4 as StockLevel, c1 as StockOwnershipType, c2 as StockStatus, by as StorefrontBootstrap, bv as Table, T as TableInfo, bs as TimeRange, bt as TimeRanges, bR as TimeSlot, ch as UpdateAddressInput, b2 as UpdateOrderStatusInput, U as UpdateProfileInput, c6 as VariantStock, cu 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-CyBNao15.js';
2
2
  export { QueryBuilder, query } from './advanced.js';
3
3
  import { A as ApiError } from './payment-CLIWNMaP.js';
4
4
  export { B as AddOn, at as AddOnDetails, aP as AddOnGroupDetails, G as AddOnOption, aO as AddOnOptionDetails, H as AddOnOptionPrice, F as AddOnWithOptions, aU as AddToCartInput, ai as AdjustmentType, ap as AppliedDiscount, a_ as AuthorizationType, ao as BenefitType, T as Bundle, Y as BundleComponentData, _ as BundleComponentInfo, R as BundlePriceType, W as BundleProduct, ay as BundleSelectionData, aw as BundleSelectionInput, ax as BundleStoredSelection, U as BundleSummary, X as BundleWithDetails, aD as Cart, au as CartAddOn, ag as CartChannel, aE as CartItem, aR as CartItemDetails, af as CartStatus, aW as CartSummary, aF as CartTotals, K as Category, L as CategorySummary, an as ChosenPrice, h as CimplifyError, N as Collection, Q as CollectionProduct, O as CollectionSummary, a4 as ComponentGroup, a5 as ComponentGroupWithComponents, a9 as ComponentPriceBreakdown, a7 as ComponentSelectionInput, a1 as ComponentSourceType, a2 as Composite, a6 as CompositeComponent, aA as CompositePriceBreakdown, a8 as CompositePriceResult, $ as CompositePricingMode, aB as CompositeSelectionData, a7 as CompositeSelectionInput, az as CompositeStoredSelection, a3 as CompositeWithDetails, b as Currency, C as CurrencyCode, p as DepositType, D as DigitalProductType, aq as DiscountBreakdown, ar as DiscountDetails, aI as DisplayAddOn, aJ as DisplayAddOnOption, aG as DisplayCart, aH as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a0 as GroupPricingBehavior, b2 as InitializePaymentResult, I as InventoryType, aC as LineConfiguration, ac as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b1 as Payment, b5 as PaymentErrorDetails, b0 as PaymentMethod, aZ as PaymentMethodType, a$ as PaymentProcessingState, aY as PaymentProvider, b3 as PaymentResponse, aX as PaymentStatus, b4 as PaymentStatusResponse, ab as Price, aj as PriceAdjustment, am as PriceDecisionPath, aa as PriceEntryType, al as PricePathTaxInfo, ah as PriceSource, q as Product, J as ProductAddOn, ad as ProductAvailability, o as ProductRenderHint, ae as ProductTimeProfile, n as ProductType, s as ProductVariant, x as ProductVariantValue, r as ProductWithDetails, S as SalesChannel, as as SelectedAddOnOption, b6 as SubmitAuthorizationInput, ak as TaxPathComponent, aS as UICart, aK as UICartBusiness, aM as UICartCustomer, aL as UICartLocation, aN as UICartPricing, aT as UICartResponse, aV as UpdateCartItemInput, u as VariantAxis, z as VariantAxisSelection, w as VariantAxisValue, v as VariantAxisWithValues, av as VariantDetails, aQ as VariantDetailsDTO, t as VariantDisplayAttribute, y as VariantLocationAvailability, V as VariantStrategy, 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-CLIWNMaP.js';
5
- export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-DAztg_LQ.js';
5
+ export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-B_JHO-ER.js';
6
6
  export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme } from './ads-t3FBTU8p.js';
7
7
 
8
8
  /** Context sent with every request to scope operations to a specific location/branch */
package/dist/index.js CHANGED
@@ -463,11 +463,6 @@ var CatalogueQueries = class {
463
463
  this.client = client;
464
464
  }
465
465
  async getProducts(options) {
466
- const result = await this.getProductsWithMeta(options);
467
- if (!result.ok) return result;
468
- return ok(result.value.items);
469
- }
470
- async getProductsWithMeta(options) {
471
466
  let query2 = "products";
472
467
  const filters = [];
473
468
  if (options?.category) {
@@ -850,7 +845,7 @@ var CatalogueQueries = class {
850
845
  limit: options?.limit ?? 20
851
846
  });
852
847
  if (!result.ok) return result;
853
- return ok(result.value);
848
+ return ok(result.value.items);
854
849
  }
855
850
  async searchProducts(query2, options) {
856
851
  return this.search(query2, options);
package/dist/index.mjs CHANGED
@@ -461,11 +461,6 @@ var CatalogueQueries = class {
461
461
  this.client = client;
462
462
  }
463
463
  async getProducts(options) {
464
- const result = await this.getProductsWithMeta(options);
465
- if (!result.ok) return result;
466
- return ok(result.value.items);
467
- }
468
- async getProductsWithMeta(options) {
469
464
  let query2 = "products";
470
465
  const filters = [];
471
466
  if (options?.category) {
@@ -848,7 +843,7 @@ var CatalogueQueries = class {
848
843
  limit: options?.limit ?? 20
849
844
  });
850
845
  if (!result.ok) return result;
851
- return ok(result.value);
846
+ return ok(result.value.items);
852
847
  }
853
848
  async searchProducts(query2, options) {
854
849
  return this.search(query2, options);
package/dist/react.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, br as Location, bo as Business, aT as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, cQ as AuthenticatedData, cM as AddressInfo, cN as PaymentMethodInfo, cS as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-BIbWQK7v.mjs';
1
+ import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, br as Location, bo as Business, aT as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, cQ as AuthenticatedData, cM as AddressInfo, cN as PaymentMethodInfo, cS as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-hccS_JMl.mjs';
2
2
  import React, { ReactNode } from 'react';
3
- import { q as Product, h as CimplifyError, r as ProductWithDetails, K as Category, aw as BundleSelectionInput, a7 as ComponentSelectionInput, N as Collection, X as BundleWithDetails, a3 as CompositeWithDetails, a8 as CompositePriceResult, C as CurrencyCode } from './payment-CLIWNMaP.mjs';
3
+ import { q as Product, d as Pagination, h as CimplifyError, r as ProductWithDetails, K as Category, aw as BundleSelectionInput, a7 as ComponentSelectionInput, N as Collection, X as BundleWithDetails, a3 as CompositeWithDetails, a8 as CompositePriceResult, C as CurrencyCode } from './payment-CLIWNMaP.mjs';
4
4
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.mjs';
5
5
  export { c as AdConfig } from './ads-t3FBTU8p.mjs';
6
6
 
@@ -107,6 +107,9 @@ interface UseProductsOptions {
107
107
  }
108
108
  interface UseProductsResult {
109
109
  products: Product[];
110
+ is_complete: boolean;
111
+ total_available?: number;
112
+ pagination?: Pagination;
110
113
  isLoading: boolean;
111
114
  error: CimplifyError | null;
112
115
  refetch: () => Promise<void>;
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, br as Location, bo as Business, aT as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, cQ as AuthenticatedData, cM as AddressInfo, cN as PaymentMethodInfo, cS as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-2Rmdqutj.js';
1
+ import { C as CimplifyClient, _ as ProcessCheckoutResult, a0 as CheckoutStatus, a1 as CheckoutStatusContext, br as Location, bo as Business, aT as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, u as CimplifyElements, y as ElementsOptions, cQ as AuthenticatedData, cM as AddressInfo, cN as PaymentMethodInfo, cS as ElementsCheckoutResult, Z as ProcessCheckoutOptions } from './client-CyBNao15.js';
2
2
  import React, { ReactNode } from 'react';
3
- import { q as Product, h as CimplifyError, r as ProductWithDetails, K as Category, aw as BundleSelectionInput, a7 as ComponentSelectionInput, N as Collection, X as BundleWithDetails, a3 as CompositeWithDetails, a8 as CompositePriceResult, C as CurrencyCode } from './payment-CLIWNMaP.js';
3
+ import { q as Product, d as Pagination, h as CimplifyError, r as ProductWithDetails, K as Category, aw as BundleSelectionInput, a7 as ComponentSelectionInput, N as Collection, X as BundleWithDetails, a3 as CompositeWithDetails, a8 as CompositePriceResult, C as CurrencyCode } from './payment-CLIWNMaP.js';
4
4
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.js';
5
5
  export { c as AdConfig } from './ads-t3FBTU8p.js';
6
6
 
@@ -107,6 +107,9 @@ interface UseProductsOptions {
107
107
  }
108
108
  interface UseProductsResult {
109
109
  products: Product[];
110
+ is_complete: boolean;
111
+ total_available?: number;
112
+ pagination?: Pagination;
110
113
  isLoading: boolean;
111
114
  error: CimplifyError | null;
112
115
  refetch: () => Promise<void>;
package/dist/react.js CHANGED
@@ -999,11 +999,6 @@ var CatalogueQueries = class {
999
999
  this.client = client;
1000
1000
  }
1001
1001
  async getProducts(options) {
1002
- const result = await this.getProductsWithMeta(options);
1003
- if (!result.ok) return result;
1004
- return ok(result.value.items);
1005
- }
1006
- async getProductsWithMeta(options) {
1007
1002
  let query = "products";
1008
1003
  const filters = [];
1009
1004
  if (options?.category) {
@@ -1386,7 +1381,7 @@ var CatalogueQueries = class {
1386
1381
  limit: options?.limit ?? 20
1387
1382
  });
1388
1383
  if (!result.ok) return result;
1389
- return ok(result.value);
1384
+ return ok(result.value.items);
1390
1385
  }
1391
1386
  async searchProducts(query, options) {
1392
1387
  return this.search(query, options);
@@ -4582,6 +4577,9 @@ function useProducts(options = {}) {
4582
4577
  );
4583
4578
  const cached = productsCache.get(cacheKey);
4584
4579
  const [products, setProducts] = react.useState(cached?.products ?? []);
4580
+ const [isComplete, setIsComplete] = react.useState(cached?.is_complete ?? true);
4581
+ const [totalAvailable, setTotalAvailable] = react.useState(cached?.total_available);
4582
+ const [pagination, setPagination] = react.useState(cached?.pagination);
4585
4583
  const [isLoading, setIsLoading] = react.useState(enabled && !cached);
4586
4584
  const [error, setError] = react.useState(null);
4587
4585
  react.useEffect(() => {
@@ -4603,6 +4601,9 @@ function useProducts(options = {}) {
4603
4601
  const cacheEntry = productsCache.get(cacheKey);
4604
4602
  if (cacheEntry) {
4605
4603
  setProducts(cacheEntry.products);
4604
+ setIsComplete(cacheEntry.is_complete);
4605
+ setTotalAvailable(cacheEntry.total_available);
4606
+ setPagination(cacheEntry.pagination);
4606
4607
  setIsLoading(false);
4607
4608
  return;
4608
4609
  }
@@ -4626,9 +4627,17 @@ function useProducts(options = {}) {
4626
4627
  );
4627
4628
  }
4628
4629
  const value = await promise;
4629
- productsCache.set(cacheKey, { products: value });
4630
+ productsCache.set(cacheKey, {
4631
+ products: value.items,
4632
+ is_complete: value.is_complete,
4633
+ total_available: value.total_available,
4634
+ pagination: value.pagination
4635
+ });
4630
4636
  if (nextRequestId === requestIdRef.current) {
4631
- setProducts(value);
4637
+ setProducts(value.items);
4638
+ setIsComplete(value.is_complete);
4639
+ setTotalAvailable(value.total_available);
4640
+ setPagination(value.pagination);
4632
4641
  setError(null);
4633
4642
  }
4634
4643
  } catch (loadError) {
@@ -4650,7 +4659,15 @@ function useProducts(options = {}) {
4650
4659
  productsCache.delete(cacheKey);
4651
4660
  await load(true);
4652
4661
  }, [cacheKey, load]);
4653
- return { products, isLoading, error, refetch };
4662
+ return {
4663
+ products,
4664
+ is_complete: isComplete,
4665
+ total_available: totalAvailable,
4666
+ pagination,
4667
+ isLoading,
4668
+ error,
4669
+ refetch
4670
+ };
4654
4671
  }
4655
4672
  var productCache = /* @__PURE__ */ new Map();
4656
4673
  var productInflight = /* @__PURE__ */ new Map();
package/dist/react.mjs CHANGED
@@ -997,11 +997,6 @@ var CatalogueQueries = class {
997
997
  this.client = client;
998
998
  }
999
999
  async getProducts(options) {
1000
- const result = await this.getProductsWithMeta(options);
1001
- if (!result.ok) return result;
1002
- return ok(result.value.items);
1003
- }
1004
- async getProductsWithMeta(options) {
1005
1000
  let query = "products";
1006
1001
  const filters = [];
1007
1002
  if (options?.category) {
@@ -1384,7 +1379,7 @@ var CatalogueQueries = class {
1384
1379
  limit: options?.limit ?? 20
1385
1380
  });
1386
1381
  if (!result.ok) return result;
1387
- return ok(result.value);
1382
+ return ok(result.value.items);
1388
1383
  }
1389
1384
  async searchProducts(query, options) {
1390
1385
  return this.search(query, options);
@@ -4580,6 +4575,9 @@ function useProducts(options = {}) {
4580
4575
  );
4581
4576
  const cached = productsCache.get(cacheKey);
4582
4577
  const [products, setProducts] = useState(cached?.products ?? []);
4578
+ const [isComplete, setIsComplete] = useState(cached?.is_complete ?? true);
4579
+ const [totalAvailable, setTotalAvailable] = useState(cached?.total_available);
4580
+ const [pagination, setPagination] = useState(cached?.pagination);
4583
4581
  const [isLoading, setIsLoading] = useState(enabled && !cached);
4584
4582
  const [error, setError] = useState(null);
4585
4583
  useEffect(() => {
@@ -4601,6 +4599,9 @@ function useProducts(options = {}) {
4601
4599
  const cacheEntry = productsCache.get(cacheKey);
4602
4600
  if (cacheEntry) {
4603
4601
  setProducts(cacheEntry.products);
4602
+ setIsComplete(cacheEntry.is_complete);
4603
+ setTotalAvailable(cacheEntry.total_available);
4604
+ setPagination(cacheEntry.pagination);
4604
4605
  setIsLoading(false);
4605
4606
  return;
4606
4607
  }
@@ -4624,9 +4625,17 @@ function useProducts(options = {}) {
4624
4625
  );
4625
4626
  }
4626
4627
  const value = await promise;
4627
- productsCache.set(cacheKey, { products: value });
4628
+ productsCache.set(cacheKey, {
4629
+ products: value.items,
4630
+ is_complete: value.is_complete,
4631
+ total_available: value.total_available,
4632
+ pagination: value.pagination
4633
+ });
4628
4634
  if (nextRequestId === requestIdRef.current) {
4629
- setProducts(value);
4635
+ setProducts(value.items);
4636
+ setIsComplete(value.is_complete);
4637
+ setTotalAvailable(value.total_available);
4638
+ setPagination(value.pagination);
4630
4639
  setError(null);
4631
4640
  }
4632
4641
  } catch (loadError) {
@@ -4648,7 +4657,15 @@ function useProducts(options = {}) {
4648
4657
  productsCache.delete(cacheKey);
4649
4658
  await load(true);
4650
4659
  }, [cacheKey, load]);
4651
- return { products, isLoading, error, refetch };
4660
+ return {
4661
+ products,
4662
+ is_complete: isComplete,
4663
+ total_available: totalAvailable,
4664
+ pagination,
4665
+ isLoading,
4666
+ error,
4667
+ refetch
4668
+ };
4652
4669
  }
4653
4670
  var productCache = /* @__PURE__ */ new Map();
4654
4671
  var productInflight = /* @__PURE__ */ new Map();
package/dist/utils.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-Dqaywky7.mjs';
1
+ export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-mrKi_VbR.mjs';
2
2
  import './payment-CLIWNMaP.mjs';
package/dist/utils.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-DAztg_LQ.js';
1
+ export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-B_JHO-ER.js';
2
2
  import './payment-CLIWNMaP.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cimplify/sdk",
3
- "version": "0.6.12",
3
+ "version": "0.7.0",
4
4
  "description": "Cimplify Commerce SDK for storefronts",
5
5
  "keywords": [
6
6
  "cimplify",