@cimplify/sdk 0.2.3 → 0.2.5

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/index.d.mts CHANGED
@@ -15,18 +15,81 @@ interface Pagination {
15
15
  page_size: number;
16
16
  total_pages: number;
17
17
  }
18
+ /** Strongly-typed error codes for better DX */
19
+ declare const ErrorCode: {
20
+ readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
21
+ readonly NETWORK_ERROR: "NETWORK_ERROR";
22
+ readonly TIMEOUT: "TIMEOUT";
23
+ readonly UNAUTHORIZED: "UNAUTHORIZED";
24
+ readonly FORBIDDEN: "FORBIDDEN";
25
+ readonly NOT_FOUND: "NOT_FOUND";
26
+ readonly VALIDATION_ERROR: "VALIDATION_ERROR";
27
+ readonly CART_EMPTY: "CART_EMPTY";
28
+ readonly CART_EXPIRED: "CART_EXPIRED";
29
+ readonly CART_NOT_FOUND: "CART_NOT_FOUND";
30
+ readonly ITEM_UNAVAILABLE: "ITEM_UNAVAILABLE";
31
+ readonly VARIANT_NOT_FOUND: "VARIANT_NOT_FOUND";
32
+ readonly VARIANT_OUT_OF_STOCK: "VARIANT_OUT_OF_STOCK";
33
+ readonly ADDON_REQUIRED: "ADDON_REQUIRED";
34
+ readonly ADDON_MAX_EXCEEDED: "ADDON_MAX_EXCEEDED";
35
+ readonly CHECKOUT_VALIDATION_FAILED: "CHECKOUT_VALIDATION_FAILED";
36
+ readonly DELIVERY_ADDRESS_REQUIRED: "DELIVERY_ADDRESS_REQUIRED";
37
+ readonly CUSTOMER_INFO_REQUIRED: "CUSTOMER_INFO_REQUIRED";
38
+ readonly PAYMENT_FAILED: "PAYMENT_FAILED";
39
+ readonly PAYMENT_CANCELLED: "PAYMENT_CANCELLED";
40
+ readonly INSUFFICIENT_FUNDS: "INSUFFICIENT_FUNDS";
41
+ readonly CARD_DECLINED: "CARD_DECLINED";
42
+ readonly INVALID_OTP: "INVALID_OTP";
43
+ readonly OTP_EXPIRED: "OTP_EXPIRED";
44
+ readonly AUTHORIZATION_FAILED: "AUTHORIZATION_FAILED";
45
+ readonly PAYMENT_ACTION_NOT_COMPLETED: "PAYMENT_ACTION_NOT_COMPLETED";
46
+ readonly SLOT_UNAVAILABLE: "SLOT_UNAVAILABLE";
47
+ readonly BOOKING_CONFLICT: "BOOKING_CONFLICT";
48
+ readonly SERVICE_NOT_FOUND: "SERVICE_NOT_FOUND";
49
+ readonly OUT_OF_STOCK: "OUT_OF_STOCK";
50
+ readonly INSUFFICIENT_QUANTITY: "INSUFFICIENT_QUANTITY";
51
+ };
52
+ type ErrorCodeType = (typeof ErrorCode)[keyof typeof ErrorCode];
18
53
  /** API error structure */
19
54
  interface ApiError {
20
55
  code: string;
21
56
  message: string;
22
57
  retryable: boolean;
23
58
  }
24
- /** Custom error class for SDK errors */
59
+ /**
60
+ * Custom error class for SDK errors with typed error codes.
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * try {
65
+ * await client.cart.addItem({ item_id: "prod_123" });
66
+ * } catch (error) {
67
+ * if (isCimplifyError(error)) {
68
+ * switch (error.code) {
69
+ * case ErrorCode.ITEM_UNAVAILABLE:
70
+ * toast.error("This item is no longer available");
71
+ * break;
72
+ * case ErrorCode.VARIANT_OUT_OF_STOCK:
73
+ * toast.error("Selected option is out of stock");
74
+ * break;
75
+ * default:
76
+ * toast.error(error.message);
77
+ * }
78
+ * }
79
+ * }
80
+ * ```
81
+ */
25
82
  declare class CimplifyError extends Error {
26
83
  code: string;
27
84
  retryable: boolean;
28
85
  constructor(code: string, message: string, retryable?: boolean);
86
+ /** User-friendly message safe to display */
87
+ get userMessage(): string;
29
88
  }
89
+ /** Type guard for CimplifyError */
90
+ declare function isCimplifyError(error: unknown): error is CimplifyError;
91
+ /** Check if error is retryable */
92
+ declare function isRetryableError(error: unknown): boolean;
30
93
 
31
94
  type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
32
95
  type InventoryType = "one_to_one" | "composition" | "none";
@@ -1699,9 +1762,8 @@ interface CheckoutResult {
1699
1762
  authorization_url?: string;
1700
1763
  display_text?: string;
1701
1764
  provider?: string;
1702
- access_code?: string;
1703
- public_key?: string;
1704
1765
  client_secret?: string;
1766
+ public_key?: string;
1705
1767
  }
1706
1768
 
1707
1769
  declare class CheckoutService {
@@ -2972,4 +3034,4 @@ interface ApiResponse<T> {
2972
3034
  metadata?: ResponseMetadata;
2973
3035
  }
2974
3036
 
2975
- export { AUTHORIZATION_TYPE, AUTH_MUTATION, type AddOn, type AddOnDetails, type AddOnGroupDetails, type AddOnOption, type AddOnOptionDetails, type AddOnOptionPrice, type AddOnWithOptions, type AddToCartInput, type AddressData, type AdjustmentType, type AmountToPay, type ApiError, type ApiResponse, type AppliedDiscount, type AuthResponse, AuthService, type AuthStatus, type AuthorizationType, type AvailabilityCheck, type AvailabilityResult, type AvailableSlot, type BenefitType, type Booking, type BookingRequirementOverride, type BookingStatus, type BookingWithDetails, type BufferTimes, type Bundle, type BundleComponentData, type BundleComponentInfo, type BundlePriceType, type BundleProduct, type BundleSelectionData, type BundleSelectionInput, type BundleStoredSelection, type BundleSummary, type BundleWithDetails, type Business, type BusinessHours, type BusinessPreferences, BusinessService, type BusinessSettings, type BusinessType, type BusinessWithLocations, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CURRENCY_SYMBOLS, type CancelBookingInput, type CancelOrderInput, type CancellationPolicy, type Cart, type CartAddOn, type CartChannel, type CartItem, type CartItemDetails, CartOperations, type CartStatus, type CartSummary, type CartTotals, CatalogueQueries, type Category, type CategoryInfo, type CategorySummary, type ChangePasswordInput, type CheckSlotAvailabilityInput, type CheckoutAddressInfo, type CheckoutCustomerInfo, type CheckoutFormData, type CheckoutInput, type CheckoutMode, CheckoutService as CheckoutOperations, type CheckoutOrderType, type CheckoutPaymentMethod, type CheckoutResult, CheckoutService, type CheckoutStep, type ChosenPrice, CimplifyClient, type CimplifyConfig, CimplifyError, type Collection, type CollectionProduct, type CollectionSummary, type ComponentGroup, type ComponentGroupWithComponents, type ComponentPriceBreakdown, type ComponentSelectionInput, type ComponentSourceType, type Composite, type CompositeComponent, type CompositePriceBreakdown, type CompositePriceResult, type CompositePricingMode, type CompositeSelectionData, type ComponentSelectionInput as CompositeSelectionInput, type CompositeStoredSelection, type CompositeWithDetails, type ContactType, type CreateAddressInput, type CreateMobileMoneyInput, type Currency, type Customer, type CustomerAddress, type CustomerLinkPreferences, type CustomerMobileMoney, type CustomerServicePreferences, DEFAULT_COUNTRY, DEFAULT_CURRENCY, type DayAvailability, type DepositResult, type DepositType, type DeviceType, type DigitalProductType, type DiscountBreakdown, type DiscountDetails, type DisplayAddOn, type DisplayAddOnOption, type DisplayCart, type DisplayCartItem, type EnrollAndLinkOrderInput, type EnrollAndLinkOrderResult, type EnrollmentData, type FeeBearerType, type FormatCompactOptions, type FormatPriceOptions, type FulfillmentLink, type FulfillmentStatus, type FulfillmentType, type GetAvailableSlotsInput, type GetOrdersOptions, type GetProductsOptions, type GroupPricingBehavior, type InitializePaymentResult, InventoryService, type InventorySummary, type InventoryType, type KitchenOrderItem, type KitchenOrderResult, LINK_MUTATION, LINK_QUERY, type LineConfiguration, type LineItem, type LineType, type LinkData, type LinkEnrollResult, LinkService, type LinkSession, type LinkStatusResult, type LiteBootstrap, LiteService, type Location, type LocationAppointment, type LocationProductPrice, type LocationStock, type LocationTaxBehavior, type LocationTaxOverrides, type LocationTimeProfile, type LocationWithDetails, MOBILE_MONEY_PROVIDER, MOBILE_MONEY_PROVIDERS, type MobileMoneyData, type MobileMoneyDetails, type MobileMoneyProvider, type Money, type MutationRequest, ORDER_MUTATION, ORDER_TYPE, type Order, type OrderChannel, type OrderFilter, type OrderFulfillmentSummary, type OrderGroup, type OrderGroupDetails, type OrderGroupPayment, type OrderGroupPaymentState, type OrderGroupPaymentSummary, type OrderHistory, type OrderLineState, type OrderLineStatus, type OrderPaymentEvent, OrderQueries, type OrderSplitDetail, type OrderStatus, type OtpResult, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, type Pagination, type PaginationParams, type ParsedPrice, type Payment, type PaymentErrorDetails, type PaymentMethod, type PaymentMethodType, type PaymentProcessingState, type PaymentProvider, type PaymentResponse, type PaymentState, type PaymentStatus, type PaymentStatusResponse, type PickupTime, type PickupTimeType, type Price, type PriceAdjustment, type PriceDecisionPath, type PriceEntryType, type PriceInfo, type PricePathTaxInfo, type PriceSource, type PricingOverrides, type Product, type ProductAddOn, type ProductAvailability, type ProductStock, type ProductTimeProfile, type ProductType, type ProductVariant, type ProductVariantValue, type ProductWithDetails, type ProductWithPrice, QueryBuilder, type QueryRequest, type RefundOrderInput, type ReminderMethod, type ReminderSettings, type RequestOtpInput, type RescheduleBookingInput, type ResourceAssignment, type ResourceAvailabilityException, type ResourceAvailabilityRule, type ResourceType, type ResponseMetadata, type RevokeAllSessionsResult, type RevokeSessionResult, type Room, type SalesChannel, type SchedulingMetadata, type SchedulingResult, SchedulingService, type SearchOptions, type SelectedAddOnOption, type Service, type ServiceAvailabilityException, type ServiceAvailabilityParams, type ServiceAvailabilityResult, type ServiceAvailabilityRule, type ServiceCharge, type ServiceNotes, type ServiceScheduleRequest, type ServiceStaffRequirement, type ServiceStatus, type ServiceWithStaff, type Staff, type StaffAssignment, type StaffAvailabilityException, type StaffAvailabilityRule, type StaffBookingProfile, type StaffRole, type StaffScheduleItem, type Stock, type StockLevel, type StockOwnershipType, type StockStatus, type StorefrontBootstrap, type SubmitAuthorizationInput, type Table, type TableInfo, type TaxComponent, type TaxInfo, type TaxPathComponent, type TimeRange, type TimeRanges, type TimeSlot, type UICart, type UICartBusiness, type UICartCustomer, type UICartLocation, type UICartPricing, type UpdateAddressInput, type UpdateCartItemInput, type UpdateOrderStatusInput, type UpdateProfileInput, type VariantAxis, type VariantAxisSelection, type VariantAxisValue, type VariantAxisWithValues, type VariantDetails, type VariantDetailsDTO, type VariantDisplayAttribute, type VariantLocationAvailability, type VariantStock, type VariantStrategy, type VerifyOtpInput, categorizePaymentError, createCimplifyClient, detectMobileMoneyProvider, extractPriceInfo, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, isOnSale, normalizePaymentResponse, normalizeStatusResponse, parsePrice, parsePricePath, parsedPriceToPriceInfo, query };
3037
+ export { AUTHORIZATION_TYPE, AUTH_MUTATION, type AddOn, type AddOnDetails, type AddOnGroupDetails, type AddOnOption, type AddOnOptionDetails, type AddOnOptionPrice, type AddOnWithOptions, type AddToCartInput, type AddressData, type AdjustmentType, type AmountToPay, type ApiError, type ApiResponse, type AppliedDiscount, type AuthResponse, AuthService, type AuthStatus, type AuthorizationType, type AvailabilityCheck, type AvailabilityResult, type AvailableSlot, type BenefitType, type Booking, type BookingRequirementOverride, type BookingStatus, type BookingWithDetails, type BufferTimes, type Bundle, type BundleComponentData, type BundleComponentInfo, type BundlePriceType, type BundleProduct, type BundleSelectionData, type BundleSelectionInput, type BundleStoredSelection, type BundleSummary, type BundleWithDetails, type Business, type BusinessHours, type BusinessPreferences, BusinessService, type BusinessSettings, type BusinessType, type BusinessWithLocations, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CURRENCY_SYMBOLS, type CancelBookingInput, type CancelOrderInput, type CancellationPolicy, type Cart, type CartAddOn, type CartChannel, type CartItem, type CartItemDetails, CartOperations, type CartStatus, type CartSummary, type CartTotals, CatalogueQueries, type Category, type CategoryInfo, type CategorySummary, type ChangePasswordInput, type CheckSlotAvailabilityInput, type CheckoutAddressInfo, type CheckoutCustomerInfo, type CheckoutFormData, type CheckoutInput, type CheckoutMode, CheckoutService as CheckoutOperations, type CheckoutOrderType, type CheckoutPaymentMethod, type CheckoutResult, CheckoutService, type CheckoutStep, type ChosenPrice, CimplifyClient, type CimplifyConfig, CimplifyError, type Collection, type CollectionProduct, type CollectionSummary, type ComponentGroup, type ComponentGroupWithComponents, type ComponentPriceBreakdown, type ComponentSelectionInput, type ComponentSourceType, type Composite, type CompositeComponent, type CompositePriceBreakdown, type CompositePriceResult, type CompositePricingMode, type CompositeSelectionData, type ComponentSelectionInput as CompositeSelectionInput, type CompositeStoredSelection, type CompositeWithDetails, type ContactType, type CreateAddressInput, type CreateMobileMoneyInput, type Currency, type Customer, type CustomerAddress, type CustomerLinkPreferences, type CustomerMobileMoney, type CustomerServicePreferences, DEFAULT_COUNTRY, DEFAULT_CURRENCY, type DayAvailability, type DepositResult, type DepositType, type DeviceType, type DigitalProductType, type DiscountBreakdown, type DiscountDetails, type DisplayAddOn, type DisplayAddOnOption, type DisplayCart, type DisplayCartItem, type EnrollAndLinkOrderInput, type EnrollAndLinkOrderResult, type EnrollmentData, ErrorCode, type ErrorCodeType, type FeeBearerType, type FormatCompactOptions, type FormatPriceOptions, type FulfillmentLink, type FulfillmentStatus, type FulfillmentType, type GetAvailableSlotsInput, type GetOrdersOptions, type GetProductsOptions, type GroupPricingBehavior, type InitializePaymentResult, InventoryService, type InventorySummary, type InventoryType, type KitchenOrderItem, type KitchenOrderResult, LINK_MUTATION, LINK_QUERY, type LineConfiguration, type LineItem, type LineType, type LinkData, type LinkEnrollResult, LinkService, type LinkSession, type LinkStatusResult, type LiteBootstrap, LiteService, type Location, type LocationAppointment, type LocationProductPrice, type LocationStock, type LocationTaxBehavior, type LocationTaxOverrides, type LocationTimeProfile, type LocationWithDetails, MOBILE_MONEY_PROVIDER, MOBILE_MONEY_PROVIDERS, type MobileMoneyData, type MobileMoneyDetails, type MobileMoneyProvider, type Money, type MutationRequest, ORDER_MUTATION, ORDER_TYPE, type Order, type OrderChannel, type OrderFilter, type OrderFulfillmentSummary, type OrderGroup, type OrderGroupDetails, type OrderGroupPayment, type OrderGroupPaymentState, type OrderGroupPaymentSummary, type OrderHistory, type OrderLineState, type OrderLineStatus, type OrderPaymentEvent, OrderQueries, type OrderSplitDetail, type OrderStatus, type OtpResult, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, type Pagination, type PaginationParams, type ParsedPrice, type Payment, type PaymentErrorDetails, type PaymentMethod, type PaymentMethodType, type PaymentProcessingState, type PaymentProvider, type PaymentResponse, type PaymentState, type PaymentStatus, type PaymentStatusResponse, type PickupTime, type PickupTimeType, type Price, type PriceAdjustment, type PriceDecisionPath, type PriceEntryType, type PriceInfo, type PricePathTaxInfo, type PriceSource, type PricingOverrides, type Product, type ProductAddOn, type ProductAvailability, type ProductStock, type ProductTimeProfile, type ProductType, type ProductVariant, type ProductVariantValue, type ProductWithDetails, type ProductWithPrice, QueryBuilder, type QueryRequest, type RefundOrderInput, type ReminderMethod, type ReminderSettings, type RequestOtpInput, type RescheduleBookingInput, type ResourceAssignment, type ResourceAvailabilityException, type ResourceAvailabilityRule, type ResourceType, type ResponseMetadata, type RevokeAllSessionsResult, type RevokeSessionResult, type Room, type SalesChannel, type SchedulingMetadata, type SchedulingResult, SchedulingService, type SearchOptions, type SelectedAddOnOption, type Service, type ServiceAvailabilityException, type ServiceAvailabilityParams, type ServiceAvailabilityResult, type ServiceAvailabilityRule, type ServiceCharge, type ServiceNotes, type ServiceScheduleRequest, type ServiceStaffRequirement, type ServiceStatus, type ServiceWithStaff, type Staff, type StaffAssignment, type StaffAvailabilityException, type StaffAvailabilityRule, type StaffBookingProfile, type StaffRole, type StaffScheduleItem, type Stock, type StockLevel, type StockOwnershipType, type StockStatus, type StorefrontBootstrap, type SubmitAuthorizationInput, type Table, type TableInfo, type TaxComponent, type TaxInfo, type TaxPathComponent, type TimeRange, type TimeRanges, type TimeSlot, type UICart, type UICartBusiness, type UICartCustomer, type UICartLocation, type UICartPricing, type UpdateAddressInput, type UpdateCartItemInput, type UpdateOrderStatusInput, type UpdateProfileInput, type VariantAxis, type VariantAxisSelection, type VariantAxisValue, type VariantAxisWithValues, type VariantDetails, type VariantDetailsDTO, type VariantDisplayAttribute, type VariantLocationAvailability, type VariantStock, type VariantStrategy, type VerifyOtpInput, categorizePaymentError, createCimplifyClient, detectMobileMoneyProvider, extractPriceInfo, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, isCimplifyError, isOnSale, isRetryableError, normalizePaymentResponse, normalizeStatusResponse, parsePrice, parsePricePath, parsedPriceToPriceInfo, query };
package/dist/index.d.ts CHANGED
@@ -15,18 +15,81 @@ interface Pagination {
15
15
  page_size: number;
16
16
  total_pages: number;
17
17
  }
18
+ /** Strongly-typed error codes for better DX */
19
+ declare const ErrorCode: {
20
+ readonly UNKNOWN_ERROR: "UNKNOWN_ERROR";
21
+ readonly NETWORK_ERROR: "NETWORK_ERROR";
22
+ readonly TIMEOUT: "TIMEOUT";
23
+ readonly UNAUTHORIZED: "UNAUTHORIZED";
24
+ readonly FORBIDDEN: "FORBIDDEN";
25
+ readonly NOT_FOUND: "NOT_FOUND";
26
+ readonly VALIDATION_ERROR: "VALIDATION_ERROR";
27
+ readonly CART_EMPTY: "CART_EMPTY";
28
+ readonly CART_EXPIRED: "CART_EXPIRED";
29
+ readonly CART_NOT_FOUND: "CART_NOT_FOUND";
30
+ readonly ITEM_UNAVAILABLE: "ITEM_UNAVAILABLE";
31
+ readonly VARIANT_NOT_FOUND: "VARIANT_NOT_FOUND";
32
+ readonly VARIANT_OUT_OF_STOCK: "VARIANT_OUT_OF_STOCK";
33
+ readonly ADDON_REQUIRED: "ADDON_REQUIRED";
34
+ readonly ADDON_MAX_EXCEEDED: "ADDON_MAX_EXCEEDED";
35
+ readonly CHECKOUT_VALIDATION_FAILED: "CHECKOUT_VALIDATION_FAILED";
36
+ readonly DELIVERY_ADDRESS_REQUIRED: "DELIVERY_ADDRESS_REQUIRED";
37
+ readonly CUSTOMER_INFO_REQUIRED: "CUSTOMER_INFO_REQUIRED";
38
+ readonly PAYMENT_FAILED: "PAYMENT_FAILED";
39
+ readonly PAYMENT_CANCELLED: "PAYMENT_CANCELLED";
40
+ readonly INSUFFICIENT_FUNDS: "INSUFFICIENT_FUNDS";
41
+ readonly CARD_DECLINED: "CARD_DECLINED";
42
+ readonly INVALID_OTP: "INVALID_OTP";
43
+ readonly OTP_EXPIRED: "OTP_EXPIRED";
44
+ readonly AUTHORIZATION_FAILED: "AUTHORIZATION_FAILED";
45
+ readonly PAYMENT_ACTION_NOT_COMPLETED: "PAYMENT_ACTION_NOT_COMPLETED";
46
+ readonly SLOT_UNAVAILABLE: "SLOT_UNAVAILABLE";
47
+ readonly BOOKING_CONFLICT: "BOOKING_CONFLICT";
48
+ readonly SERVICE_NOT_FOUND: "SERVICE_NOT_FOUND";
49
+ readonly OUT_OF_STOCK: "OUT_OF_STOCK";
50
+ readonly INSUFFICIENT_QUANTITY: "INSUFFICIENT_QUANTITY";
51
+ };
52
+ type ErrorCodeType = (typeof ErrorCode)[keyof typeof ErrorCode];
18
53
  /** API error structure */
19
54
  interface ApiError {
20
55
  code: string;
21
56
  message: string;
22
57
  retryable: boolean;
23
58
  }
24
- /** Custom error class for SDK errors */
59
+ /**
60
+ * Custom error class for SDK errors with typed error codes.
61
+ *
62
+ * @example
63
+ * ```typescript
64
+ * try {
65
+ * await client.cart.addItem({ item_id: "prod_123" });
66
+ * } catch (error) {
67
+ * if (isCimplifyError(error)) {
68
+ * switch (error.code) {
69
+ * case ErrorCode.ITEM_UNAVAILABLE:
70
+ * toast.error("This item is no longer available");
71
+ * break;
72
+ * case ErrorCode.VARIANT_OUT_OF_STOCK:
73
+ * toast.error("Selected option is out of stock");
74
+ * break;
75
+ * default:
76
+ * toast.error(error.message);
77
+ * }
78
+ * }
79
+ * }
80
+ * ```
81
+ */
25
82
  declare class CimplifyError extends Error {
26
83
  code: string;
27
84
  retryable: boolean;
28
85
  constructor(code: string, message: string, retryable?: boolean);
86
+ /** User-friendly message safe to display */
87
+ get userMessage(): string;
29
88
  }
89
+ /** Type guard for CimplifyError */
90
+ declare function isCimplifyError(error: unknown): error is CimplifyError;
91
+ /** Check if error is retryable */
92
+ declare function isRetryableError(error: unknown): boolean;
30
93
 
31
94
  type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
32
95
  type InventoryType = "one_to_one" | "composition" | "none";
@@ -1699,9 +1762,8 @@ interface CheckoutResult {
1699
1762
  authorization_url?: string;
1700
1763
  display_text?: string;
1701
1764
  provider?: string;
1702
- access_code?: string;
1703
- public_key?: string;
1704
1765
  client_secret?: string;
1766
+ public_key?: string;
1705
1767
  }
1706
1768
 
1707
1769
  declare class CheckoutService {
@@ -2972,4 +3034,4 @@ interface ApiResponse<T> {
2972
3034
  metadata?: ResponseMetadata;
2973
3035
  }
2974
3036
 
2975
- export { AUTHORIZATION_TYPE, AUTH_MUTATION, type AddOn, type AddOnDetails, type AddOnGroupDetails, type AddOnOption, type AddOnOptionDetails, type AddOnOptionPrice, type AddOnWithOptions, type AddToCartInput, type AddressData, type AdjustmentType, type AmountToPay, type ApiError, type ApiResponse, type AppliedDiscount, type AuthResponse, AuthService, type AuthStatus, type AuthorizationType, type AvailabilityCheck, type AvailabilityResult, type AvailableSlot, type BenefitType, type Booking, type BookingRequirementOverride, type BookingStatus, type BookingWithDetails, type BufferTimes, type Bundle, type BundleComponentData, type BundleComponentInfo, type BundlePriceType, type BundleProduct, type BundleSelectionData, type BundleSelectionInput, type BundleStoredSelection, type BundleSummary, type BundleWithDetails, type Business, type BusinessHours, type BusinessPreferences, BusinessService, type BusinessSettings, type BusinessType, type BusinessWithLocations, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CURRENCY_SYMBOLS, type CancelBookingInput, type CancelOrderInput, type CancellationPolicy, type Cart, type CartAddOn, type CartChannel, type CartItem, type CartItemDetails, CartOperations, type CartStatus, type CartSummary, type CartTotals, CatalogueQueries, type Category, type CategoryInfo, type CategorySummary, type ChangePasswordInput, type CheckSlotAvailabilityInput, type CheckoutAddressInfo, type CheckoutCustomerInfo, type CheckoutFormData, type CheckoutInput, type CheckoutMode, CheckoutService as CheckoutOperations, type CheckoutOrderType, type CheckoutPaymentMethod, type CheckoutResult, CheckoutService, type CheckoutStep, type ChosenPrice, CimplifyClient, type CimplifyConfig, CimplifyError, type Collection, type CollectionProduct, type CollectionSummary, type ComponentGroup, type ComponentGroupWithComponents, type ComponentPriceBreakdown, type ComponentSelectionInput, type ComponentSourceType, type Composite, type CompositeComponent, type CompositePriceBreakdown, type CompositePriceResult, type CompositePricingMode, type CompositeSelectionData, type ComponentSelectionInput as CompositeSelectionInput, type CompositeStoredSelection, type CompositeWithDetails, type ContactType, type CreateAddressInput, type CreateMobileMoneyInput, type Currency, type Customer, type CustomerAddress, type CustomerLinkPreferences, type CustomerMobileMoney, type CustomerServicePreferences, DEFAULT_COUNTRY, DEFAULT_CURRENCY, type DayAvailability, type DepositResult, type DepositType, type DeviceType, type DigitalProductType, type DiscountBreakdown, type DiscountDetails, type DisplayAddOn, type DisplayAddOnOption, type DisplayCart, type DisplayCartItem, type EnrollAndLinkOrderInput, type EnrollAndLinkOrderResult, type EnrollmentData, type FeeBearerType, type FormatCompactOptions, type FormatPriceOptions, type FulfillmentLink, type FulfillmentStatus, type FulfillmentType, type GetAvailableSlotsInput, type GetOrdersOptions, type GetProductsOptions, type GroupPricingBehavior, type InitializePaymentResult, InventoryService, type InventorySummary, type InventoryType, type KitchenOrderItem, type KitchenOrderResult, LINK_MUTATION, LINK_QUERY, type LineConfiguration, type LineItem, type LineType, type LinkData, type LinkEnrollResult, LinkService, type LinkSession, type LinkStatusResult, type LiteBootstrap, LiteService, type Location, type LocationAppointment, type LocationProductPrice, type LocationStock, type LocationTaxBehavior, type LocationTaxOverrides, type LocationTimeProfile, type LocationWithDetails, MOBILE_MONEY_PROVIDER, MOBILE_MONEY_PROVIDERS, type MobileMoneyData, type MobileMoneyDetails, type MobileMoneyProvider, type Money, type MutationRequest, ORDER_MUTATION, ORDER_TYPE, type Order, type OrderChannel, type OrderFilter, type OrderFulfillmentSummary, type OrderGroup, type OrderGroupDetails, type OrderGroupPayment, type OrderGroupPaymentState, type OrderGroupPaymentSummary, type OrderHistory, type OrderLineState, type OrderLineStatus, type OrderPaymentEvent, OrderQueries, type OrderSplitDetail, type OrderStatus, type OtpResult, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, type Pagination, type PaginationParams, type ParsedPrice, type Payment, type PaymentErrorDetails, type PaymentMethod, type PaymentMethodType, type PaymentProcessingState, type PaymentProvider, type PaymentResponse, type PaymentState, type PaymentStatus, type PaymentStatusResponse, type PickupTime, type PickupTimeType, type Price, type PriceAdjustment, type PriceDecisionPath, type PriceEntryType, type PriceInfo, type PricePathTaxInfo, type PriceSource, type PricingOverrides, type Product, type ProductAddOn, type ProductAvailability, type ProductStock, type ProductTimeProfile, type ProductType, type ProductVariant, type ProductVariantValue, type ProductWithDetails, type ProductWithPrice, QueryBuilder, type QueryRequest, type RefundOrderInput, type ReminderMethod, type ReminderSettings, type RequestOtpInput, type RescheduleBookingInput, type ResourceAssignment, type ResourceAvailabilityException, type ResourceAvailabilityRule, type ResourceType, type ResponseMetadata, type RevokeAllSessionsResult, type RevokeSessionResult, type Room, type SalesChannel, type SchedulingMetadata, type SchedulingResult, SchedulingService, type SearchOptions, type SelectedAddOnOption, type Service, type ServiceAvailabilityException, type ServiceAvailabilityParams, type ServiceAvailabilityResult, type ServiceAvailabilityRule, type ServiceCharge, type ServiceNotes, type ServiceScheduleRequest, type ServiceStaffRequirement, type ServiceStatus, type ServiceWithStaff, type Staff, type StaffAssignment, type StaffAvailabilityException, type StaffAvailabilityRule, type StaffBookingProfile, type StaffRole, type StaffScheduleItem, type Stock, type StockLevel, type StockOwnershipType, type StockStatus, type StorefrontBootstrap, type SubmitAuthorizationInput, type Table, type TableInfo, type TaxComponent, type TaxInfo, type TaxPathComponent, type TimeRange, type TimeRanges, type TimeSlot, type UICart, type UICartBusiness, type UICartCustomer, type UICartLocation, type UICartPricing, type UpdateAddressInput, type UpdateCartItemInput, type UpdateOrderStatusInput, type UpdateProfileInput, type VariantAxis, type VariantAxisSelection, type VariantAxisValue, type VariantAxisWithValues, type VariantDetails, type VariantDetailsDTO, type VariantDisplayAttribute, type VariantLocationAvailability, type VariantStock, type VariantStrategy, type VerifyOtpInput, categorizePaymentError, createCimplifyClient, detectMobileMoneyProvider, extractPriceInfo, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, isOnSale, normalizePaymentResponse, normalizeStatusResponse, parsePrice, parsePricePath, parsedPriceToPriceInfo, query };
3037
+ export { AUTHORIZATION_TYPE, AUTH_MUTATION, type AddOn, type AddOnDetails, type AddOnGroupDetails, type AddOnOption, type AddOnOptionDetails, type AddOnOptionPrice, type AddOnWithOptions, type AddToCartInput, type AddressData, type AdjustmentType, type AmountToPay, type ApiError, type ApiResponse, type AppliedDiscount, type AuthResponse, AuthService, type AuthStatus, type AuthorizationType, type AvailabilityCheck, type AvailabilityResult, type AvailableSlot, type BenefitType, type Booking, type BookingRequirementOverride, type BookingStatus, type BookingWithDetails, type BufferTimes, type Bundle, type BundleComponentData, type BundleComponentInfo, type BundlePriceType, type BundleProduct, type BundleSelectionData, type BundleSelectionInput, type BundleStoredSelection, type BundleSummary, type BundleWithDetails, type Business, type BusinessHours, type BusinessPreferences, BusinessService, type BusinessSettings, type BusinessType, type BusinessWithLocations, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CURRENCY_SYMBOLS, type CancelBookingInput, type CancelOrderInput, type CancellationPolicy, type Cart, type CartAddOn, type CartChannel, type CartItem, type CartItemDetails, CartOperations, type CartStatus, type CartSummary, type CartTotals, CatalogueQueries, type Category, type CategoryInfo, type CategorySummary, type ChangePasswordInput, type CheckSlotAvailabilityInput, type CheckoutAddressInfo, type CheckoutCustomerInfo, type CheckoutFormData, type CheckoutInput, type CheckoutMode, CheckoutService as CheckoutOperations, type CheckoutOrderType, type CheckoutPaymentMethod, type CheckoutResult, CheckoutService, type CheckoutStep, type ChosenPrice, CimplifyClient, type CimplifyConfig, CimplifyError, type Collection, type CollectionProduct, type CollectionSummary, type ComponentGroup, type ComponentGroupWithComponents, type ComponentPriceBreakdown, type ComponentSelectionInput, type ComponentSourceType, type Composite, type CompositeComponent, type CompositePriceBreakdown, type CompositePriceResult, type CompositePricingMode, type CompositeSelectionData, type ComponentSelectionInput as CompositeSelectionInput, type CompositeStoredSelection, type CompositeWithDetails, type ContactType, type CreateAddressInput, type CreateMobileMoneyInput, type Currency, type Customer, type CustomerAddress, type CustomerLinkPreferences, type CustomerMobileMoney, type CustomerServicePreferences, DEFAULT_COUNTRY, DEFAULT_CURRENCY, type DayAvailability, type DepositResult, type DepositType, type DeviceType, type DigitalProductType, type DiscountBreakdown, type DiscountDetails, type DisplayAddOn, type DisplayAddOnOption, type DisplayCart, type DisplayCartItem, type EnrollAndLinkOrderInput, type EnrollAndLinkOrderResult, type EnrollmentData, ErrorCode, type ErrorCodeType, type FeeBearerType, type FormatCompactOptions, type FormatPriceOptions, type FulfillmentLink, type FulfillmentStatus, type FulfillmentType, type GetAvailableSlotsInput, type GetOrdersOptions, type GetProductsOptions, type GroupPricingBehavior, type InitializePaymentResult, InventoryService, type InventorySummary, type InventoryType, type KitchenOrderItem, type KitchenOrderResult, LINK_MUTATION, LINK_QUERY, type LineConfiguration, type LineItem, type LineType, type LinkData, type LinkEnrollResult, LinkService, type LinkSession, type LinkStatusResult, type LiteBootstrap, LiteService, type Location, type LocationAppointment, type LocationProductPrice, type LocationStock, type LocationTaxBehavior, type LocationTaxOverrides, type LocationTimeProfile, type LocationWithDetails, MOBILE_MONEY_PROVIDER, MOBILE_MONEY_PROVIDERS, type MobileMoneyData, type MobileMoneyDetails, type MobileMoneyProvider, type Money, type MutationRequest, ORDER_MUTATION, ORDER_TYPE, type Order, type OrderChannel, type OrderFilter, type OrderFulfillmentSummary, type OrderGroup, type OrderGroupDetails, type OrderGroupPayment, type OrderGroupPaymentState, type OrderGroupPaymentSummary, type OrderHistory, type OrderLineState, type OrderLineStatus, type OrderPaymentEvent, OrderQueries, type OrderSplitDetail, type OrderStatus, type OtpResult, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, type Pagination, type PaginationParams, type ParsedPrice, type Payment, type PaymentErrorDetails, type PaymentMethod, type PaymentMethodType, type PaymentProcessingState, type PaymentProvider, type PaymentResponse, type PaymentState, type PaymentStatus, type PaymentStatusResponse, type PickupTime, type PickupTimeType, type Price, type PriceAdjustment, type PriceDecisionPath, type PriceEntryType, type PriceInfo, type PricePathTaxInfo, type PriceSource, type PricingOverrides, type Product, type ProductAddOn, type ProductAvailability, type ProductStock, type ProductTimeProfile, type ProductType, type ProductVariant, type ProductVariantValue, type ProductWithDetails, type ProductWithPrice, QueryBuilder, type QueryRequest, type RefundOrderInput, type ReminderMethod, type ReminderSettings, type RequestOtpInput, type RescheduleBookingInput, type ResourceAssignment, type ResourceAvailabilityException, type ResourceAvailabilityRule, type ResourceType, type ResponseMetadata, type RevokeAllSessionsResult, type RevokeSessionResult, type Room, type SalesChannel, type SchedulingMetadata, type SchedulingResult, SchedulingService, type SearchOptions, type SelectedAddOnOption, type Service, type ServiceAvailabilityException, type ServiceAvailabilityParams, type ServiceAvailabilityResult, type ServiceAvailabilityRule, type ServiceCharge, type ServiceNotes, type ServiceScheduleRequest, type ServiceStaffRequirement, type ServiceStatus, type ServiceWithStaff, type Staff, type StaffAssignment, type StaffAvailabilityException, type StaffAvailabilityRule, type StaffBookingProfile, type StaffRole, type StaffScheduleItem, type Stock, type StockLevel, type StockOwnershipType, type StockStatus, type StorefrontBootstrap, type SubmitAuthorizationInput, type Table, type TableInfo, type TaxComponent, type TaxInfo, type TaxPathComponent, type TimeRange, type TimeRanges, type TimeSlot, type UICart, type UICartBusiness, type UICartCustomer, type UICartLocation, type UICartPricing, type UpdateAddressInput, type UpdateCartItemInput, type UpdateOrderStatusInput, type UpdateProfileInput, type VariantAxis, type VariantAxisSelection, type VariantAxisValue, type VariantAxisWithValues, type VariantDetails, type VariantDetailsDTO, type VariantDisplayAttribute, type VariantLocationAvailability, type VariantStock, type VariantStrategy, type VerifyOtpInput, categorizePaymentError, createCimplifyClient, detectMobileMoneyProvider, extractPriceInfo, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, isCimplifyError, isOnSale, isRetryableError, normalizePaymentResponse, normalizeStatusResponse, parsePrice, parsePricePath, parsedPriceToPriceInfo, query };
package/dist/index.js CHANGED
@@ -1,6 +1,45 @@
1
1
  'use strict';
2
2
 
3
3
  // src/types/common.ts
4
+ var ErrorCode = {
5
+ // General
6
+ UNKNOWN_ERROR: "UNKNOWN_ERROR",
7
+ NETWORK_ERROR: "NETWORK_ERROR",
8
+ TIMEOUT: "TIMEOUT",
9
+ UNAUTHORIZED: "UNAUTHORIZED",
10
+ FORBIDDEN: "FORBIDDEN",
11
+ NOT_FOUND: "NOT_FOUND",
12
+ VALIDATION_ERROR: "VALIDATION_ERROR",
13
+ // Cart
14
+ CART_EMPTY: "CART_EMPTY",
15
+ CART_EXPIRED: "CART_EXPIRED",
16
+ CART_NOT_FOUND: "CART_NOT_FOUND",
17
+ ITEM_UNAVAILABLE: "ITEM_UNAVAILABLE",
18
+ VARIANT_NOT_FOUND: "VARIANT_NOT_FOUND",
19
+ VARIANT_OUT_OF_STOCK: "VARIANT_OUT_OF_STOCK",
20
+ ADDON_REQUIRED: "ADDON_REQUIRED",
21
+ ADDON_MAX_EXCEEDED: "ADDON_MAX_EXCEEDED",
22
+ // Checkout
23
+ CHECKOUT_VALIDATION_FAILED: "CHECKOUT_VALIDATION_FAILED",
24
+ DELIVERY_ADDRESS_REQUIRED: "DELIVERY_ADDRESS_REQUIRED",
25
+ CUSTOMER_INFO_REQUIRED: "CUSTOMER_INFO_REQUIRED",
26
+ // Payment
27
+ PAYMENT_FAILED: "PAYMENT_FAILED",
28
+ PAYMENT_CANCELLED: "PAYMENT_CANCELLED",
29
+ INSUFFICIENT_FUNDS: "INSUFFICIENT_FUNDS",
30
+ CARD_DECLINED: "CARD_DECLINED",
31
+ INVALID_OTP: "INVALID_OTP",
32
+ OTP_EXPIRED: "OTP_EXPIRED",
33
+ AUTHORIZATION_FAILED: "AUTHORIZATION_FAILED",
34
+ PAYMENT_ACTION_NOT_COMPLETED: "PAYMENT_ACTION_NOT_COMPLETED",
35
+ // Scheduling
36
+ SLOT_UNAVAILABLE: "SLOT_UNAVAILABLE",
37
+ BOOKING_CONFLICT: "BOOKING_CONFLICT",
38
+ SERVICE_NOT_FOUND: "SERVICE_NOT_FOUND",
39
+ // Inventory
40
+ OUT_OF_STOCK: "OUT_OF_STOCK",
41
+ INSUFFICIENT_QUANTITY: "INSUFFICIENT_QUANTITY"
42
+ };
4
43
  var CimplifyError = class extends Error {
5
44
  constructor(code, message, retryable = false) {
6
45
  super(message);
@@ -8,7 +47,24 @@ var CimplifyError = class extends Error {
8
47
  this.retryable = retryable;
9
48
  this.name = "CimplifyError";
10
49
  }
50
+ /** User-friendly message safe to display */
51
+ get userMessage() {
52
+ return this.message;
53
+ }
11
54
  };
55
+ function isCimplifyError(error) {
56
+ return error instanceof CimplifyError;
57
+ }
58
+ function isRetryableError(error) {
59
+ if (isCimplifyError(error)) {
60
+ return error.retryable;
61
+ }
62
+ if (error instanceof Error) {
63
+ const msg = error.message.toLowerCase();
64
+ return msg.includes("network") || msg.includes("timeout") || msg.includes("fetch");
65
+ }
66
+ return false;
67
+ }
12
68
 
13
69
  // src/catalogue.ts
14
70
  var CatalogueQueries = class {
@@ -1744,6 +1800,7 @@ exports.CimplifyClient = CimplifyClient;
1744
1800
  exports.CimplifyError = CimplifyError;
1745
1801
  exports.DEFAULT_COUNTRY = DEFAULT_COUNTRY;
1746
1802
  exports.DEFAULT_CURRENCY = DEFAULT_CURRENCY;
1803
+ exports.ErrorCode = ErrorCode;
1747
1804
  exports.InventoryService = InventoryService;
1748
1805
  exports.LINK_MUTATION = LINK_MUTATION;
1749
1806
  exports.LINK_QUERY = LINK_QUERY;
@@ -1776,7 +1833,9 @@ exports.getDiscountPercentage = getDiscountPercentage;
1776
1833
  exports.getDisplayPrice = getDisplayPrice;
1777
1834
  exports.getMarkupPercentage = getMarkupPercentage;
1778
1835
  exports.getProductCurrency = getProductCurrency;
1836
+ exports.isCimplifyError = isCimplifyError;
1779
1837
  exports.isOnSale = isOnSale;
1838
+ exports.isRetryableError = isRetryableError;
1780
1839
  exports.normalizePaymentResponse = normalizePaymentResponse;
1781
1840
  exports.normalizeStatusResponse = normalizeStatusResponse;
1782
1841
  exports.parsePrice = parsePrice;
package/dist/index.mjs CHANGED
@@ -1,4 +1,43 @@
1
1
  // src/types/common.ts
2
+ var ErrorCode = {
3
+ // General
4
+ UNKNOWN_ERROR: "UNKNOWN_ERROR",
5
+ NETWORK_ERROR: "NETWORK_ERROR",
6
+ TIMEOUT: "TIMEOUT",
7
+ UNAUTHORIZED: "UNAUTHORIZED",
8
+ FORBIDDEN: "FORBIDDEN",
9
+ NOT_FOUND: "NOT_FOUND",
10
+ VALIDATION_ERROR: "VALIDATION_ERROR",
11
+ // Cart
12
+ CART_EMPTY: "CART_EMPTY",
13
+ CART_EXPIRED: "CART_EXPIRED",
14
+ CART_NOT_FOUND: "CART_NOT_FOUND",
15
+ ITEM_UNAVAILABLE: "ITEM_UNAVAILABLE",
16
+ VARIANT_NOT_FOUND: "VARIANT_NOT_FOUND",
17
+ VARIANT_OUT_OF_STOCK: "VARIANT_OUT_OF_STOCK",
18
+ ADDON_REQUIRED: "ADDON_REQUIRED",
19
+ ADDON_MAX_EXCEEDED: "ADDON_MAX_EXCEEDED",
20
+ // Checkout
21
+ CHECKOUT_VALIDATION_FAILED: "CHECKOUT_VALIDATION_FAILED",
22
+ DELIVERY_ADDRESS_REQUIRED: "DELIVERY_ADDRESS_REQUIRED",
23
+ CUSTOMER_INFO_REQUIRED: "CUSTOMER_INFO_REQUIRED",
24
+ // Payment
25
+ PAYMENT_FAILED: "PAYMENT_FAILED",
26
+ PAYMENT_CANCELLED: "PAYMENT_CANCELLED",
27
+ INSUFFICIENT_FUNDS: "INSUFFICIENT_FUNDS",
28
+ CARD_DECLINED: "CARD_DECLINED",
29
+ INVALID_OTP: "INVALID_OTP",
30
+ OTP_EXPIRED: "OTP_EXPIRED",
31
+ AUTHORIZATION_FAILED: "AUTHORIZATION_FAILED",
32
+ PAYMENT_ACTION_NOT_COMPLETED: "PAYMENT_ACTION_NOT_COMPLETED",
33
+ // Scheduling
34
+ SLOT_UNAVAILABLE: "SLOT_UNAVAILABLE",
35
+ BOOKING_CONFLICT: "BOOKING_CONFLICT",
36
+ SERVICE_NOT_FOUND: "SERVICE_NOT_FOUND",
37
+ // Inventory
38
+ OUT_OF_STOCK: "OUT_OF_STOCK",
39
+ INSUFFICIENT_QUANTITY: "INSUFFICIENT_QUANTITY"
40
+ };
2
41
  var CimplifyError = class extends Error {
3
42
  constructor(code, message, retryable = false) {
4
43
  super(message);
@@ -6,7 +45,24 @@ var CimplifyError = class extends Error {
6
45
  this.retryable = retryable;
7
46
  this.name = "CimplifyError";
8
47
  }
48
+ /** User-friendly message safe to display */
49
+ get userMessage() {
50
+ return this.message;
51
+ }
9
52
  };
53
+ function isCimplifyError(error) {
54
+ return error instanceof CimplifyError;
55
+ }
56
+ function isRetryableError(error) {
57
+ if (isCimplifyError(error)) {
58
+ return error.retryable;
59
+ }
60
+ if (error instanceof Error) {
61
+ const msg = error.message.toLowerCase();
62
+ return msg.includes("network") || msg.includes("timeout") || msg.includes("fetch");
63
+ }
64
+ return false;
65
+ }
10
66
 
11
67
  // src/catalogue.ts
12
68
  var CatalogueQueries = class {
@@ -1726,4 +1782,4 @@ function detectMobileMoneyProvider(phoneNumber) {
1726
1782
  return null;
1727
1783
  }
1728
1784
 
1729
- export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CURRENCY_SYMBOLS, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyClient, CimplifyError, DEFAULT_COUNTRY, DEFAULT_CURRENCY, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MOBILE_MONEY_PROVIDER, MOBILE_MONEY_PROVIDERS, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, QueryBuilder, SchedulingService, categorizePaymentError, createCimplifyClient, detectMobileMoneyProvider, extractPriceInfo, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, isOnSale, normalizePaymentResponse, normalizeStatusResponse, parsePrice, parsePricePath, parsedPriceToPriceInfo, query };
1785
+ export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CURRENCY_SYMBOLS, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyClient, CimplifyError, DEFAULT_COUNTRY, DEFAULT_CURRENCY, ErrorCode, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MOBILE_MONEY_PROVIDER, MOBILE_MONEY_PROVIDERS, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, QueryBuilder, SchedulingService, categorizePaymentError, createCimplifyClient, detectMobileMoneyProvider, extractPriceInfo, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatProductPrice, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getMarkupPercentage, getProductCurrency, isCimplifyError, isOnSale, isRetryableError, normalizePaymentResponse, normalizeStatusResponse, parsePrice, parsePricePath, parsedPriceToPriceInfo, query };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cimplify/sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Cimplify Commerce SDK for storefronts",
5
5
  "keywords": [
6
6
  "cimplify",