@cimplify/sdk 0.85.0 → 0.87.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.
Files changed (73) hide show
  1. package/dist/advanced.d.mts +3 -3
  2. package/dist/advanced.d.ts +3 -3
  3. package/dist/advanced.js +22 -22
  4. package/dist/advanced.mjs +3 -3
  5. package/dist/{chunk-XA3ZNR75.js → chunk-AETVRBKI.js} +1 -1
  6. package/dist/{chunk-GIFVSWYJ.mjs → chunk-APBLFZ2I.mjs} +5 -5
  7. package/dist/{chunk-HPN5R3K2.js → chunk-FWEF2DHR.js} +80 -28
  8. package/dist/{chunk-DU4IX2I2.mjs → chunk-J7JDCPNW.mjs} +2 -2
  9. package/dist/{chunk-AMZXALF6.mjs → chunk-K5EN2W2Q.mjs} +1 -1
  10. package/dist/{chunk-TD3AY34U.mjs → chunk-KFLGQGMC.mjs} +3 -3
  11. package/dist/{chunk-E6T5VJMG.mjs → chunk-OZDDHSIB.mjs} +9 -1
  12. package/dist/{chunk-GFM5JW45.js → chunk-P3352VXA.js} +62 -62
  13. package/dist/{chunk-7Y2O3E4D.js → chunk-PTPOQVXS.js} +5 -5
  14. package/dist/{chunk-A6J7W6DH.js → chunk-PWDX5N2M.js} +4 -4
  15. package/dist/{chunk-NWUEWUX2.mjs → chunk-RCGSHS2Q.mjs} +2 -2
  16. package/dist/{chunk-NWTCBGJ2.js → chunk-ROBTTS3Q.js} +7 -7
  17. package/dist/{chunk-IQLJJW2H.js → chunk-T7Z25EY4.js} +9 -0
  18. package/dist/{chunk-7BM56JET.mjs → chunk-U57TYZLD.mjs} +60 -8
  19. package/dist/{client-WKKxIiF1.d.ts → client-BIt37FjS.d.mts} +541 -542
  20. package/dist/{client-BEhIE0Dm.d.mts → client-BMOdyC1F.d.mts} +2 -2
  21. package/dist/{client-BT5gaiGR.d.ts → client-BvWtk822.d.ts} +2 -2
  22. package/dist/{client-DLtwQ-jI.d.mts → client-Dfl6WY2F.d.ts} +541 -542
  23. package/dist/{index-DZz6hdrT.d.mts → index-BxOJ3BLn.d.mts} +3 -3
  24. package/dist/{index-BrC1x2kK.d.ts → index-DW6JifS1.d.ts} +3 -3
  25. package/dist/index.d.mts +6 -6
  26. package/dist/index.d.ts +6 -6
  27. package/dist/index.js +133 -129
  28. package/dist/index.mjs +6 -6
  29. package/dist/mock/cli.mjs +5 -5
  30. package/dist/mock/library.js +5 -5
  31. package/dist/mock/library.mjs +5 -5
  32. package/dist/mock/msw.js +5 -5
  33. package/dist/mock/msw.mjs +5 -5
  34. package/dist/{payment-D1f3ZQPC.d.ts → payment-CLp__KpE.d.mts} +3 -3
  35. package/dist/{payment-Dh-6cRcV.d.mts → payment-DJrvivO_.d.ts} +3 -3
  36. package/dist/{price-CQdOJoX-.d.ts → price-B7_UzClY.d.ts} +1 -1
  37. package/dist/{price-4T7dlhxM.d.mts → price-Ddk8Vr8z.d.mts} +1 -1
  38. package/dist/product-C0Lr81ze.d.mts +5439 -0
  39. package/dist/product-C0Lr81ze.d.ts +5439 -0
  40. package/dist/react.d.mts +24 -7
  41. package/dist/react.d.ts +24 -7
  42. package/dist/react.js +224 -186
  43. package/dist/react.mjs +57 -22
  44. package/dist/{server-DjK98UW-.d.mts → server-0TnEJt8U.d.mts} +2 -2
  45. package/dist/{server-DvThXldo.d.ts → server-P2G43ENi.d.ts} +2 -2
  46. package/dist/server.d.mts +4 -4
  47. package/dist/server.d.ts +4 -4
  48. package/dist/server.js +10 -10
  49. package/dist/server.mjs +4 -4
  50. package/dist/styles.css +1 -1
  51. package/dist/testing/msw.d.mts +2 -2
  52. package/dist/testing/msw.d.ts +2 -2
  53. package/dist/testing/msw.js +3 -3
  54. package/dist/testing/msw.mjs +2 -2
  55. package/dist/testing/suite.d.mts +6 -6
  56. package/dist/testing/suite.d.ts +6 -6
  57. package/dist/testing/suite.js +25 -25
  58. package/dist/testing/suite.mjs +6 -6
  59. package/dist/testing.d.mts +5 -5
  60. package/dist/testing.d.ts +5 -5
  61. package/dist/testing.js +81 -81
  62. package/dist/testing.mjs +7 -7
  63. package/dist/utils.d.mts +4 -4
  64. package/dist/utils.d.ts +4 -4
  65. package/dist/utils.js +29 -29
  66. package/dist/utils.mjs +2 -2
  67. package/package.json +5 -2
  68. package/registry/currency-selector.json +1 -1
  69. package/registry/digital-product-card.json +1 -1
  70. package/registry/digital-product-layout.json +1 -1
  71. package/registry/product-card.json +1 -1
  72. package/dist/product-RJMIdCAf.d.mts +0 -1582
  73. package/dist/product-RJMIdCAf.d.ts +0 -1582
@@ -1,5 +1,5 @@
1
- import { T as CimplifyError, Q as Category, aX as Product, f as AddOnWithOptions, aO as Pagination, b9 as ProductWithDetails, b7 as ProductVariant, bD as VariantAxis, bE as VariantAxisSelection, A as AddOn, U as Collection, E as BundleSummary, s as Bundle, a1 as Composite, $ as ComponentSelectionInput, a6 as CompositePriceResult, S as ChosenPrice, b4 as ProductTaxonomy, bv as TaxonomyWithChildren, av as EligiblePlansQuery, a$ as ProductBillingPlan, b5 as ProductTimeProfile, a_ as ProductAvailabilityNow, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, bs as TagsResponse, ac as CustomAttributeDefinition, ad as CustomAttributeValue, ba as PropertyFacet, bu as TaxonomyAttributeTemplate, aH as KnowledgeArticle, bw as UICart, J as CartItem, O as CartSummary, g as AddToCartInput, L as CartMutationResult, bC as UpdateCartItemInput, am as DiscountDetails, aM as Money, ab as CurrencyCode, aI as LineConfiguration, bJ as VariantDetails, bK as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, z as BundleSelectionData, a8 as CompositeSelectionData, ae as CustomerInputValue, bi as SchedulingMode, at as DurationUnit, bm as Subscription, bq as SubscriptionWithDetails } from './product-RJMIdCAf.js';
2
- import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-D1f3ZQPC.js';
1
+ import { V as CimplifyError, S as Category, aZ as Product, f as AddOnWithOptions, aQ as Pagination, bb as ProductWithDetails, b9 as ProductVariant, bF as VariantAxis, bG as VariantAxisSelection, A as AddOn, W as Collection, G as BundleSummary, u as Bundle, a3 as Composite, a1 as ComponentSelectionInput, a8 as CompositePriceResult, U as ChosenPrice, b6 as ProductTaxonomy, bx as TaxonomyWithChildren, ax as EligiblePlansQuery, b1 as ProductBillingPlan, b7 as ProductTimeProfile, b0 as ProductAvailabilityNow, aj as Deal, b2 as ProductDealInfo, ap as DiscountValidation, bu as TagsResponse, ae as CustomAttributeDefinition, af as CustomAttributeValue, bc as PropertyFacet, bw as TaxonomyAttributeTemplate, aJ as KnowledgeArticle, by as UICart, L as CartItem, Q as CartSummary, g as AddToCartInput, N as CartMutationResult, bE as UpdateCartItemInput, ao as DiscountDetails, aO as Money, ad as CurrencyCode, aK as LineConfiguration, bL as VariantDetails, bM as VariantDetailsDTO, a as AddOnDetails, d as AddOnOptionDetails, b as AddOnGroupDetails, D as BundleSelectionData, aa as CompositeSelectionData, ag as CustomerInputValue, bS as components, bk as SchedulingMode, av as DurationUnit, bo as Subscription, bs as SubscriptionWithDetails } from './product-C0Lr81ze.mjs';
2
+ import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-CLp__KpE.mjs';
3
3
 
4
4
  interface RequestContext {
5
5
  method: "GET" | "POST" | "PATCH" | "DELETE";
@@ -337,7 +337,14 @@ declare class CartOperations {
337
337
 
338
338
  type OrderStatus = "pending" | "created" | "confirmed" | "in_preparation" | "ready_to_serve" | "partially_served" | "served" | "delivered" | "picked_up" | "completed" | "cancelled" | "refunded";
339
339
  type PaymentState = "not_paid" | "partially_paid" | "paid" | "partially_refunded" | "refunded";
340
- type OrderChannel = "qr" | "taker" | "staff" | "web" | "dashboard" | "tap" | "chat";
340
+ type OriginChannel = "web" | "qr" | "desk" | "tap" | "chat" | "whatsapp" | "instagram" | "telegram" | "messenger" | "sms" | "email" | "agent";
341
+ type OriginActor = "customer" | "staff" | "agent" | "system";
342
+ interface Origin {
343
+ channel: OriginChannel;
344
+ channel_ref?: string;
345
+ actor: OriginActor;
346
+ }
347
+ type LifecyclePhase = "draft" | "open" | "completed" | "cancelled";
341
348
  type LineType = "product" | "service" | "bundle" | "composite" | "digital";
342
349
  type OrderLineState = "pending" | "in_preparation" | "checked_out" | "ready" | "served" | "completed" | {
343
350
  partially_served: {
@@ -401,8 +408,9 @@ interface LineItem {
401
408
  interface Order {
402
409
  id: string;
403
410
  business_id: string;
404
- channel: OrderChannel;
411
+ origin: Origin;
405
412
  status: OrderStatus;
413
+ lifecycle_phase: LifecyclePhase;
406
414
  payment_state: PaymentState;
407
415
  order_type: string;
408
416
  placed_by?: string;
@@ -434,7 +442,6 @@ interface Order {
434
442
  room_number?: string;
435
443
  resource_id?: string;
436
444
  location_id?: string;
437
- was_placed_by_staff: boolean;
438
445
  modified_by_staff: boolean;
439
446
  delivery_required: boolean;
440
447
  customer_will_pick_up: boolean;
@@ -464,6 +471,7 @@ interface Order {
464
471
  payment_terms_id?: string;
465
472
  price_list_id?: string;
466
473
  approval_status?: string;
474
+ fulfillment_rollup?: OrderFulfillmentSummary | null;
467
475
  version: number;
468
476
  total_quantity: number;
469
477
  items: LineItem[];
@@ -1017,185 +1025,475 @@ interface AuthResponse {
1017
1025
  message: string;
1018
1026
  }
1019
1027
 
1020
- type CheckoutMode = (typeof CHECKOUT_MODE)[keyof typeof CHECKOUT_MODE];
1021
- type CheckoutOrderType = (typeof ORDER_TYPE)[keyof typeof ORDER_TYPE];
1022
- type CheckoutPaymentMethod = (typeof PAYMENT_METHOD)[keyof typeof PAYMENT_METHOD];
1023
- type CheckoutStep = (typeof CHECKOUT_STEP)[keyof typeof CHECKOUT_STEP];
1024
- type PickupTimeType = (typeof PICKUP_TIME_TYPE)[keyof typeof PICKUP_TIME_TYPE];
1025
- interface PickupTime {
1026
- type: PickupTimeType;
1027
- scheduled_time?: string;
1028
+ type OrderType = "delivery" | "pickup" | "dine-in" | "walk-in";
1029
+ declare const ELEMENT_TYPES: {
1030
+ readonly AUTH: "auth";
1031
+ readonly ADDRESS: "address";
1032
+ readonly PAYMENT: "payment";
1033
+ readonly CHECKOUT: "checkout";
1034
+ readonly ACCOUNT: "account";
1035
+ };
1036
+ type ElementType = (typeof ELEMENT_TYPES)[keyof typeof ELEMENT_TYPES];
1037
+ declare const MESSAGE_TYPES: {
1038
+ readonly INIT: "init";
1039
+ readonly SET_TOKEN: "set_token";
1040
+ readonly SET_CART: "set_cart";
1041
+ readonly GET_DATA: "get_data";
1042
+ readonly NAVIGATE: "navigate";
1043
+ readonly REFRESH_TOKEN: "refresh_token";
1044
+ readonly LOGOUT: "logout";
1045
+ readonly PROCESS_CHECKOUT: "process_checkout";
1046
+ readonly ABORT_CHECKOUT: "abort_checkout";
1047
+ readonly READY: "ready";
1048
+ readonly HEIGHT_CHANGE: "height_change";
1049
+ readonly ERROR: "error";
1050
+ readonly ADDRESS_CHANGED: "address_changed";
1051
+ readonly ADDRESS_SELECTED: "address_selected";
1052
+ readonly PAYMENT_METHOD_SELECTED: "payment_method_selected";
1053
+ readonly LOGOUT_COMPLETE: "logout_complete";
1054
+ readonly AUTH_REQUESTED: "auth_requested";
1055
+ readonly CONTACT_PROVIDED: "contact_provided";
1056
+ readonly CHECKOUT_STATUS: "checkout_status";
1057
+ readonly CHECKOUT_COMPLETE: "checkout_complete";
1058
+ readonly ORDER_TYPE_CHANGED: "order_type_changed";
1059
+ readonly REQUEST_SUBMIT: "request_submit";
1060
+ };
1061
+ interface ElementsOptions {
1062
+ linkUrl?: string;
1063
+ appearance?: ElementAppearance;
1064
+ auth?: ElementsAuthOptions;
1028
1065
  }
1029
- interface CheckoutAddressInfo {
1030
- street_address?: string;
1066
+ interface ElementsAuthOptions {
1067
+ clientId?: string;
1068
+ redirectUri?: string;
1069
+ callbackUri?: string;
1070
+ scope?: string;
1071
+ issuer?: string;
1072
+ authUrl?: string;
1073
+ }
1074
+ interface ElementAppearance {
1075
+ theme?: "light" | "dark";
1076
+ variables?: {
1077
+ primaryColor?: string;
1078
+ fontFamily?: string;
1079
+ borderRadius?: string;
1080
+ };
1081
+ }
1082
+ interface ElementOptions {
1083
+ mode?: "shipping" | "billing";
1084
+ prefillEmail?: string;
1085
+ amount?: number;
1086
+ currency?: CurrencyCode;
1087
+ orderTypes?: OrderType[];
1088
+ defaultOrderType?: OrderType;
1089
+ submitLabel?: string;
1090
+ }
1091
+ interface AddressInfo {
1092
+ id?: string;
1093
+ latitude?: number;
1094
+ longitude?: number;
1095
+ street_address: string;
1031
1096
  apartment?: string;
1032
- city?: string;
1033
- region?: string;
1097
+ city: string;
1098
+ region: string;
1034
1099
  postal_code?: string;
1035
1100
  country?: string;
1036
1101
  delivery_instructions?: string;
1037
1102
  phone_for_delivery?: string;
1038
- latitude?: number;
1039
- longitude?: number;
1040
- pickup_time?: string;
1041
- guest_count?: number;
1042
- seating_time?: string;
1043
- seating_requests?: string;
1044
1103
  }
1045
- interface MobileMoneyDetails {
1046
- phone_number: string;
1047
- provider: MobileMoneyProvider;
1048
- provider_other?: string;
1104
+ interface PaymentMethodInfo {
1105
+ id?: string;
1106
+ type: "mobile_money" | "card" | "cash";
1107
+ provider?: string;
1108
+ last_four?: string;
1109
+ phone_number?: string;
1110
+ label?: string;
1049
1111
  }
1050
- interface CheckoutCustomerInfo {
1112
+ interface AuthenticatedCustomer {
1051
1113
  name: string;
1052
- email: string;
1053
- phone: string;
1054
- notes?: string;
1055
- save_details: boolean;
1056
- }
1057
- interface CheckoutFormData {
1058
- cart_id: string;
1059
- location_id?: string;
1060
- customer: CheckoutCustomerInfo;
1061
- order_type: CheckoutOrderType;
1062
- address_info: CheckoutAddressInfo;
1063
- /** Named delivery rate the customer selected (from `delivery.getOptions`).
1064
- * Selection only — the fee is always recomputed server-side. Omit for the
1065
- * merchant's default option. */
1066
- delivery_rate_id?: string;
1067
- payment_method: string;
1068
- mobile_money_details?: MobileMoneyDetails;
1069
- special_instructions?: string;
1070
- link_address_id?: string;
1071
- link_payment_method_id?: string;
1072
- idempotency_key?: string;
1073
- metadata?: Record<string, unknown>;
1074
- pay_currency?: CurrencyCode;
1075
- fx_quote_id?: string;
1076
- /** Apply the shopper's available store credit (capped at the amount owed) as a
1077
- * fee-exempt tender before charging the rail. */
1078
- use_store_credit?: boolean;
1079
- /** Store-credit voucher / gift code to claim into the wallet and apply to this
1080
- * order. Presenting a code implies applying store credit. */
1081
- voucher_code?: string;
1114
+ email: string | null;
1115
+ phone: string | null;
1082
1116
  }
1083
- type NextAction = {
1084
- type: "none";
1085
- } | {
1086
- type: "card_popup";
1087
- provider: string;
1088
- client_secret: string;
1089
- public_key: string;
1090
- } | {
1091
- type: "redirect";
1092
- authorization_url: string;
1093
- } | {
1094
- type: "authorization";
1095
- authorization_type: AuthorizationType;
1096
- display_text?: string;
1097
- } | {
1098
- type: "poll";
1117
+ type ElementsCustomerInfo = {
1118
+ name: string;
1119
+ email: string | null;
1120
+ phone: string | null;
1121
+ } | null;
1122
+ declare const ELEMENTS_AUTH_CONTACT_TYPES: {
1123
+ readonly EMAIL: "email";
1124
+ readonly PHONE: "phone";
1099
1125
  };
1100
- interface CheckoutResult {
1101
- order_id: string;
1102
- order_number: string;
1103
- bill_token?: string;
1104
- payment_reference?: string;
1105
- payment_status: string;
1106
- requires_authorization: boolean;
1107
- authorization_type?: AuthorizationType;
1108
- authorization_url?: string;
1109
- display_text?: string;
1110
- provider?: string;
1111
- client_secret?: string;
1112
- public_key?: string;
1113
- next_action?: NextAction;
1114
- fx?: {
1115
- base_currency: CurrencyCode;
1116
- base_amount: Money;
1117
- pay_currency: CurrencyCode;
1118
- pay_amount: Money;
1119
- rate: number;
1120
- quote_id: string;
1121
- };
1122
- }
1123
- type CheckoutStatus = "preparing" | "recovering" | "processing" | "awaiting_authorization" | "polling" | "finalizing" | "success" | "failed";
1124
- interface CheckoutStatusContext {
1125
- display_text?: string;
1126
- authorization_type?: "otp" | "pin" | "phone" | "birthday" | "address";
1127
- poll_attempt?: number;
1128
- max_poll_attempts?: number;
1129
- order_id?: string;
1130
- order_number?: string;
1131
- provider?: string;
1126
+ type ElementsAuthContactType = (typeof ELEMENTS_AUTH_CONTACT_TYPES)[keyof typeof ELEMENTS_AUTH_CONTACT_TYPES];
1127
+ declare const ELEMENTS_AUTH_PROMPTS: {
1128
+ readonly LOGIN: "login";
1129
+ };
1130
+ type ElementsAuthPrompt = (typeof ELEMENTS_AUTH_PROMPTS)[keyof typeof ELEMENTS_AUTH_PROMPTS];
1131
+ declare const ELEMENTS_AUTH_MODES: {
1132
+ readonly CHECKOUT: "checkout";
1133
+ readonly DEFAULT: "default";
1134
+ };
1135
+ type ElementsAuthMode = (typeof ELEMENTS_AUTH_MODES)[keyof typeof ELEMENTS_AUTH_MODES];
1136
+ interface AuthenticatedData {
1137
+ accountId: string;
1138
+ customerId: string;
1139
+ token: string;
1140
+ customer: AuthenticatedCustomer;
1132
1141
  }
1133
- interface ProcessCheckoutOptions {
1142
+ interface ElementsCheckoutData {
1134
1143
  cart_id: string;
1135
- order_type: "delivery" | "pickup" | "dine_in";
1144
+ order_type?: OrderType;
1136
1145
  location_id?: string;
1137
- notes?: string;
1138
1146
  scheduled_time?: string;
1139
1147
  tip_amount?: number;
1140
- enroll_in_link?: boolean;
1141
- pay_currency?: CurrencyCode;
1142
- timeout_ms?: number;
1143
- on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void;
1148
+ notes?: string;
1144
1149
  }
1145
- interface ProcessCheckoutResult {
1150
+ interface ElementsCheckoutResult {
1146
1151
  success: boolean;
1147
1152
  order?: {
1148
1153
  id: string;
1149
- order_number: string;
1150
1154
  status: string;
1151
1155
  total: string;
1152
- currency: CurrencyCode;
1153
1156
  };
1154
1157
  error?: {
1155
1158
  code: string;
1156
1159
  message: string;
1157
- recoverable: boolean;
1158
- docs_url?: string;
1159
- suggestion?: string;
1160
1160
  };
1161
- enrolled_in_link?: boolean;
1162
- }
1163
- interface ProcessAndResolveOptions {
1164
- enroll_in_link?: boolean;
1165
- allow_popups?: boolean;
1166
- poll_interval_ms?: number;
1167
- max_poll_attempts?: number;
1168
- on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void;
1169
- on_authorization_required?: (type: "otp" | "pin" | "phone" | "birthday" | "address", submit: (code: string) => Promise<void>) => void | Promise<void>;
1170
- return_url?: string;
1171
- signal?: AbortSignal;
1172
- }
1173
- type AbortablePromise<T> = Promise<T> & {
1174
- abort: () => void;
1175
- };
1176
-
1177
- declare class CheckoutService {
1178
- private client;
1179
- constructor(client: CimplifyClient);
1180
- private orderTokenParam;
1181
- process(data: CheckoutFormData): Promise<Result<CheckoutResult, CimplifyError>>;
1182
- initializePayment(_orderId: string, _method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
1183
- submitAuthorization(input: SubmitAuthorizationInput): Promise<Result<CheckoutResult, CimplifyError>>;
1184
- pollPaymentStatus(orderId: string): Promise<Result<PaymentStatusResponse, CimplifyError>>;
1185
- updateOrderCustomer(orderId: string, customer: CheckoutCustomerInfo): Promise<Result<Order, CimplifyError>>;
1186
- verifyPayment(orderId: string): Promise<Result<Order, CimplifyError>>;
1187
- processAndResolve(data: CheckoutFormData & ProcessAndResolveOptions): Promise<Result<ProcessCheckoutResult, CimplifyError>>;
1188
1161
  }
1189
-
1190
- interface BusinessDetailsDTO {
1162
+ interface CheckoutCartItem {
1191
1163
  name: string;
1192
- logo_url?: string;
1193
- contact_email?: string;
1194
- contact_phone?: string;
1195
- }
1196
- interface OrderCustomerInfo {
1197
- id?: string;
1198
- name?: string;
1164
+ quantity: number;
1165
+ unit_price: string;
1166
+ total_price: string;
1167
+ image_url?: string;
1168
+ line_type: "simple" | "service" | "bundle" | "composite" | "digital";
1169
+ variant_name?: string;
1170
+ scheduled_start?: string;
1171
+ scheduled_end?: string;
1172
+ selections?: {
1173
+ name: string;
1174
+ quantity: number;
1175
+ variant_name?: string;
1176
+ }[];
1177
+ add_ons?: {
1178
+ name: string;
1179
+ price: string;
1180
+ }[];
1181
+ special_instructions?: string;
1182
+ }
1183
+ interface CheckoutCartData {
1184
+ items: CheckoutCartItem[];
1185
+ subtotal: string;
1186
+ tax_amount: string;
1187
+ total_discounts: string;
1188
+ service_charge: string;
1189
+ total: string;
1190
+ currency: string;
1191
+ /** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is already
1192
+ * inside `subtotal`/`total`. Checkout labels it "included" rather than
1193
+ * summing it onto the total. */
1194
+ tax_inclusive: boolean;
1195
+ /** Deposit due now when the cart has deposit-eligible service items, so the
1196
+ * checkout can offer "pay deposit now, balance later". Absent/0 otherwise. */
1197
+ deposit_required?: boolean;
1198
+ deposit_amount?: string;
1199
+ requires_delivery?: boolean;
1200
+ }
1201
+ type ParentToIframeMessage = {
1202
+ type: typeof MESSAGE_TYPES.INIT;
1203
+ businessId: string;
1204
+ publicKey: string;
1205
+ prefillEmail?: string;
1206
+ appearance?: ElementAppearance;
1207
+ orderTypes?: OrderType[];
1208
+ defaultOrderType?: OrderType;
1209
+ renderSubmitButton?: boolean;
1210
+ submitLabel?: string;
1211
+ token?: string;
1212
+ merchantName?: string;
1213
+ } | {
1214
+ type: typeof MESSAGE_TYPES.SET_TOKEN;
1215
+ token: string;
1216
+ } | {
1217
+ type: typeof MESSAGE_TYPES.NAVIGATE;
1218
+ path: string;
1219
+ } | {
1220
+ type: typeof MESSAGE_TYPES.SET_CART;
1221
+ cart: CheckoutCartData;
1222
+ } | {
1223
+ type: typeof MESSAGE_TYPES.GET_DATA;
1224
+ } | {
1225
+ type: typeof MESSAGE_TYPES.REFRESH_TOKEN;
1226
+ } | {
1227
+ type: typeof MESSAGE_TYPES.LOGOUT;
1228
+ } | {
1229
+ type: typeof MESSAGE_TYPES.PROCESS_CHECKOUT;
1230
+ cart_id: string;
1231
+ order_type?: OrderType;
1232
+ location_id?: string;
1233
+ notes?: string;
1234
+ scheduled_time?: string;
1235
+ tip_amount?: number;
1236
+ pay_currency?: CurrencyCode;
1237
+ enroll_in_link?: boolean;
1238
+ address?: AddressInfo;
1239
+ customer?: ElementsCustomerInfo;
1240
+ account_id?: string;
1241
+ customer_id?: string;
1242
+ } | {
1243
+ type: typeof MESSAGE_TYPES.ABORT_CHECKOUT;
1244
+ };
1245
+ type IframeToParentMessage = {
1246
+ type: typeof MESSAGE_TYPES.READY;
1247
+ height: number;
1248
+ } | {
1249
+ type: typeof MESSAGE_TYPES.HEIGHT_CHANGE;
1250
+ height: number;
1251
+ } | {
1252
+ type: typeof MESSAGE_TYPES.CONTACT_PROVIDED;
1253
+ contact: string;
1254
+ contactType: ElementsAuthContactType;
1255
+ } | {
1256
+ type: typeof MESSAGE_TYPES.ERROR;
1257
+ code: string;
1258
+ message: string;
1259
+ } | {
1260
+ type: typeof MESSAGE_TYPES.ADDRESS_CHANGED;
1261
+ address: AddressInfo;
1262
+ saveToLink: boolean;
1263
+ } | {
1264
+ type: typeof MESSAGE_TYPES.ADDRESS_SELECTED;
1265
+ address: AddressInfo;
1266
+ } | {
1267
+ type: typeof MESSAGE_TYPES.PAYMENT_METHOD_SELECTED;
1268
+ method: PaymentMethodInfo;
1269
+ saveToLink: boolean;
1270
+ } | {
1271
+ type: typeof MESSAGE_TYPES.LOGOUT_COMPLETE;
1272
+ } | {
1273
+ type: typeof MESSAGE_TYPES.AUTH_REQUESTED;
1274
+ loginHint?: string;
1275
+ contactType?: ElementsAuthContactType;
1276
+ mode?: ElementsAuthMode;
1277
+ prompt?: ElementsAuthPrompt;
1278
+ } | {
1279
+ type: typeof MESSAGE_TYPES.CHECKOUT_STATUS;
1280
+ status: CheckoutStatus;
1281
+ context: CheckoutStatusContext;
1282
+ } | {
1283
+ type: typeof MESSAGE_TYPES.CHECKOUT_COMPLETE;
1284
+ success: boolean;
1285
+ order?: {
1286
+ id: string;
1287
+ order_number: string;
1288
+ status: string;
1289
+ total: string;
1290
+ currency: CurrencyCode;
1291
+ };
1292
+ error?: {
1293
+ code: string;
1294
+ message: string;
1295
+ recoverable: boolean;
1296
+ };
1297
+ enrolled_in_link?: boolean;
1298
+ } | {
1299
+ type: typeof MESSAGE_TYPES.ORDER_TYPE_CHANGED;
1300
+ orderType: OrderType;
1301
+ } | {
1302
+ type: typeof MESSAGE_TYPES.REQUEST_SUBMIT;
1303
+ };
1304
+ declare const EVENT_TYPES: {
1305
+ readonly READY: "ready";
1306
+ readonly AUTHENTICATED: "authenticated";
1307
+ readonly ERROR: "error";
1308
+ readonly CHANGE: "change";
1309
+ readonly BLUR: "blur";
1310
+ readonly FOCUS: "focus";
1311
+ readonly ORDER_TYPE_CHANGED: "order_type_changed";
1312
+ readonly REQUEST_SUBMIT: "request_submit";
1313
+ };
1314
+ type ElementEventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
1315
+ type ElementEventHandler<T = unknown> = (data: T) => void;
1316
+
1317
+ type CheckoutMode = (typeof CHECKOUT_MODE)[keyof typeof CHECKOUT_MODE];
1318
+ type CheckoutOrderType = (typeof ORDER_TYPE)[keyof typeof ORDER_TYPE];
1319
+ type CheckoutPaymentMethod = (typeof PAYMENT_METHOD)[keyof typeof PAYMENT_METHOD];
1320
+ type CheckoutStep = (typeof CHECKOUT_STEP)[keyof typeof CHECKOUT_STEP];
1321
+ type PickupTimeType = (typeof PICKUP_TIME_TYPE)[keyof typeof PICKUP_TIME_TYPE];
1322
+ interface PickupTime {
1323
+ type: PickupTimeType;
1324
+ scheduled_time?: string;
1325
+ }
1326
+ interface CheckoutAddressInfo {
1327
+ street_address?: string;
1328
+ apartment?: string;
1329
+ city?: string;
1330
+ region?: string;
1331
+ postal_code?: string;
1332
+ country?: string;
1333
+ delivery_instructions?: string;
1334
+ phone_for_delivery?: string;
1335
+ latitude?: number;
1336
+ longitude?: number;
1337
+ pickup_time?: string;
1338
+ guest_count?: number;
1339
+ seating_time?: string;
1340
+ seating_requests?: string;
1341
+ }
1342
+ interface MobileMoneyDetails {
1343
+ phone_number: string;
1344
+ provider: MobileMoneyProvider;
1345
+ provider_other?: string;
1346
+ }
1347
+ interface CheckoutCustomerInfo {
1348
+ name: string;
1349
+ email: string;
1350
+ phone: string;
1351
+ notes?: string;
1352
+ save_details: boolean;
1353
+ }
1354
+ interface CheckoutFormData {
1355
+ cart_id: string;
1356
+ location_id?: string;
1357
+ customer: CheckoutCustomerInfo;
1358
+ order_type: CheckoutOrderType;
1359
+ address_info: CheckoutAddressInfo;
1360
+ /** Named delivery rate the customer selected (from `delivery.getOptions`).
1361
+ * Selection only — the fee is always recomputed server-side. Omit for the
1362
+ * merchant's default option. */
1363
+ delivery_rate_id?: string;
1364
+ payment_method: string;
1365
+ mobile_money_details?: MobileMoneyDetails;
1366
+ special_instructions?: string;
1367
+ link_address_id?: string;
1368
+ link_payment_method_id?: string;
1369
+ idempotency_key?: string;
1370
+ metadata?: Record<string, unknown>;
1371
+ pay_currency?: CurrencyCode;
1372
+ fx_quote_id?: string;
1373
+ /** Apply the shopper's available store credit (capped at the amount owed) as a
1374
+ * fee-exempt tender before charging the rail. */
1375
+ use_store_credit?: boolean;
1376
+ /** Store-credit voucher / gift code to claim into the wallet and apply to this
1377
+ * order. Presenting a code implies applying store credit. */
1378
+ voucher_code?: string;
1379
+ }
1380
+ type NextAction = {
1381
+ type: "none";
1382
+ } | {
1383
+ type: "card_popup";
1384
+ provider: string;
1385
+ client_secret: string;
1386
+ public_key: string;
1387
+ } | {
1388
+ type: "redirect";
1389
+ authorization_url: string;
1390
+ } | {
1391
+ type: "authorization";
1392
+ authorization_type: AuthorizationType;
1393
+ display_text?: string;
1394
+ } | {
1395
+ type: "poll";
1396
+ };
1397
+ interface CheckoutResult {
1398
+ order_id: string;
1399
+ order_number: string;
1400
+ bill_token?: string;
1401
+ payment_reference?: string;
1402
+ payment_status: string;
1403
+ requires_authorization: boolean;
1404
+ authorization_type?: AuthorizationType;
1405
+ authorization_url?: string;
1406
+ display_text?: string;
1407
+ provider?: string;
1408
+ client_secret?: string;
1409
+ public_key?: string;
1410
+ next_action?: NextAction;
1411
+ fx?: {
1412
+ base_currency: CurrencyCode;
1413
+ base_amount: Money;
1414
+ pay_currency: CurrencyCode;
1415
+ pay_amount: Money;
1416
+ rate: number;
1417
+ quote_id: string;
1418
+ };
1419
+ }
1420
+ type CheckoutStatus = "preparing" | "recovering" | "processing" | "awaiting_authorization" | "polling" | "finalizing" | "success" | "failed";
1421
+ interface CheckoutStatusContext {
1422
+ display_text?: string;
1423
+ authorization_type?: "otp" | "pin" | "phone" | "birthday" | "address";
1424
+ poll_attempt?: number;
1425
+ max_poll_attempts?: number;
1426
+ order_id?: string;
1427
+ order_number?: string;
1428
+ provider?: string;
1429
+ }
1430
+ interface ProcessCheckoutOptions {
1431
+ cart_id: string;
1432
+ order_type: OrderType;
1433
+ location_id?: string;
1434
+ notes?: string;
1435
+ scheduled_time?: string;
1436
+ tip_amount?: number;
1437
+ enroll_in_link?: boolean;
1438
+ pay_currency?: CurrencyCode;
1439
+ timeout_ms?: number;
1440
+ on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void;
1441
+ }
1442
+ interface ProcessCheckoutResult {
1443
+ success: boolean;
1444
+ order?: {
1445
+ id: string;
1446
+ order_number: string;
1447
+ status: string;
1448
+ total: string;
1449
+ currency: CurrencyCode;
1450
+ };
1451
+ error?: {
1452
+ code: string;
1453
+ message: string;
1454
+ recoverable: boolean;
1455
+ docs_url?: string;
1456
+ suggestion?: string;
1457
+ };
1458
+ enrolled_in_link?: boolean;
1459
+ }
1460
+ interface ProcessAndResolveOptions {
1461
+ enroll_in_link?: boolean;
1462
+ allow_popups?: boolean;
1463
+ poll_interval_ms?: number;
1464
+ max_poll_attempts?: number;
1465
+ on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void;
1466
+ on_authorization_required?: (type: "otp" | "pin" | "phone" | "birthday" | "address", submit: (code: string) => Promise<void>) => void | Promise<void>;
1467
+ return_url?: string;
1468
+ signal?: AbortSignal;
1469
+ }
1470
+ type AbortablePromise<T> = Promise<T> & {
1471
+ abort: () => void;
1472
+ };
1473
+
1474
+ declare class CheckoutService {
1475
+ private client;
1476
+ constructor(client: CimplifyClient);
1477
+ private validateCheckoutData;
1478
+ private orderTokenParam;
1479
+ process(data: CheckoutFormData): Promise<Result<CheckoutResult, CimplifyError>>;
1480
+ initializePayment(_orderId: string, _method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
1481
+ submitAuthorization(input: SubmitAuthorizationInput): Promise<Result<CheckoutResult, CimplifyError>>;
1482
+ pollPaymentStatus(orderId: string): Promise<Result<PaymentStatusResponse, CimplifyError>>;
1483
+ updateOrderCustomer(orderId: string, customer: CheckoutCustomerInfo): Promise<Result<Order, CimplifyError>>;
1484
+ verifyPayment(orderId: string): Promise<Result<Order, CimplifyError>>;
1485
+ processAndResolve(data: CheckoutFormData & ProcessAndResolveOptions): Promise<Result<ProcessCheckoutResult, CimplifyError>>;
1486
+ }
1487
+
1488
+ interface BusinessDetailsDTO {
1489
+ name: string;
1490
+ logo_url?: string;
1491
+ contact_email?: string;
1492
+ contact_phone?: string;
1493
+ }
1494
+ interface OrderCustomerInfo {
1495
+ id?: string;
1496
+ name?: string;
1199
1497
  email?: string;
1200
1498
  phone?: string;
1201
1499
  notes?: string[];
@@ -1216,6 +1514,11 @@ interface PaymentInfoDTO {
1216
1514
  currency: string;
1217
1515
  amount_to_pay: AmountToPay;
1218
1516
  paid_via_group: boolean;
1517
+ /** Outstanding amount still owed (money string); with `state` lets clients
1518
+ * render a partial (deposit) payment. */
1519
+ balance_due: Money;
1520
+ deposit_required: boolean;
1521
+ deposit_amount: Money;
1219
1522
  }
1220
1523
  interface FulfillmentSummaryDTO {
1221
1524
  fulfillment_type: FulfillmentType;
@@ -1307,8 +1610,9 @@ interface EnrichedOrder {
1307
1610
  user_friendly_id: string;
1308
1611
  business_id: string;
1309
1612
  order_type: string;
1310
- channel: OrderChannel;
1613
+ origin: Origin;
1311
1614
  status: OrderStatus;
1615
+ lifecycle_phase: LifecyclePhase;
1312
1616
  bill_token?: string;
1313
1617
  tracking_token?: string;
1314
1618
  tracking_link?: string;
@@ -1322,6 +1626,8 @@ interface EnrichedOrder {
1322
1626
  staff: OrderStaffInfo;
1323
1627
  discounts: OrderDiscountInfo;
1324
1628
  group_order_info?: GroupOrderInfo;
1629
+ approval_status?: string;
1630
+ fulfillment_rollup?: OrderFulfillmentSummary | null;
1325
1631
  metadata?: Record<string, unknown>;
1326
1632
  }
1327
1633
 
@@ -1498,7 +1804,6 @@ declare class AuthService {
1498
1804
  updateProfile(input: UpdateProfileInput): Promise<Result<UpdateProfileResult, CimplifyError>>;
1499
1805
  }
1500
1806
 
1501
- type BusinessType = "eatery" | "retail" | "service" | "other" | "system" | "unset";
1502
1807
  interface BusinessPreferences {
1503
1808
  [key: string]: unknown;
1504
1809
  }
@@ -1506,9 +1811,10 @@ interface Business {
1506
1811
  id: string;
1507
1812
  name: string;
1508
1813
  handle: string;
1509
- business_type: BusinessType;
1510
1814
  email: string;
1511
1815
  default_currency: CurrencyCode;
1816
+ default_country: string;
1817
+ default_timezone: string;
1512
1818
  default_phone?: string;
1513
1819
  default_address?: string;
1514
1820
  default_offers_table_service: boolean;
@@ -1524,8 +1830,6 @@ interface Business {
1524
1830
  is_online_only: boolean;
1525
1831
  enabled_payment_types: string[];
1526
1832
  default_location_settings: Record<string, unknown>;
1527
- country_code?: string;
1528
- timezone?: string;
1529
1833
  metadata?: Record<string, unknown>;
1530
1834
  }
1531
1835
  interface LocationTaxBehavior {
@@ -1665,24 +1969,10 @@ declare class BusinessService {
1665
1969
  getBootstrap(opts?: ReadRequestOptions): Promise<Result<StorefrontBootstrap, CimplifyError>>;
1666
1970
  }
1667
1971
 
1668
- type StockStatus = "in_stock" | "low_stock" | "out_of_stock";
1669
- interface StockLevel {
1670
- product_id: string;
1671
- variant_id?: string;
1672
- location_id?: string;
1673
- /** Absent when the backend cannot compute a real count for this product/location. */
1674
- available_quantity?: number;
1675
- status: StockStatus;
1676
- last_updated: string;
1677
- }
1678
- interface AvailabilityResult {
1679
- product_id: string;
1680
- variant_id?: string;
1681
- is_available: boolean;
1682
- available_quantity: number;
1683
- requested_quantity: number;
1684
- shortfall?: number;
1685
- }
1972
+ type S$1 = components["schemas"];
1973
+ type StockStatus = S$1["StockStatus"];
1974
+ type StockLevel = S$1["StockLevelResponse"];
1975
+ type AvailabilityResult = S$1["AvailabilityResponse"];
1686
1976
 
1687
1977
  declare class InventoryService {
1688
1978
  private client;
@@ -1943,49 +2233,38 @@ interface LiteBootstrap {
1943
2233
  categories: LiteBootstrapCategory[];
1944
2234
  location?: LiteBootstrapLocation | null;
1945
2235
  }
1946
- interface LiteTable {
2236
+ interface LiteResource {
1947
2237
  id: string;
1948
2238
  name: string;
1949
2239
  location_id?: string | null;
1950
2240
  }
1951
- interface LiteTableResponse {
1952
- table: LiteTable;
2241
+ interface LiteResourceResponse {
2242
+ resource: LiteResource;
1953
2243
  tab: Record<string, unknown> | null;
1954
2244
  }
1955
- type TableInfo = LiteTableResponse;
2245
+ type ResourceInfo = LiteResourceResponse;
1956
2246
  declare class LiteService {
1957
2247
  private client;
1958
2248
  constructor(client: CimplifyClient);
1959
2249
  getBootstrap(): Promise<Result<LiteBootstrap, CimplifyError>>;
1960
- getTable(tableId: string): Promise<Result<LiteTableResponse, CimplifyError>>;
2250
+ getResource(resourceId: string): Promise<Result<LiteResourceResponse, CimplifyError>>;
1961
2251
  getMenu(): Promise<Result<Product[], CimplifyError>>;
1962
2252
  getMenuByCategory(categoryId: string): Promise<Result<Product[], CimplifyError>>;
1963
2253
  }
1964
2254
 
2255
+ type S = components["schemas"];
1965
2256
  interface FxQuoteRequest {
1966
2257
  from: CurrencyCode;
1967
2258
  to: CurrencyCode;
1968
2259
  amount: Money;
1969
2260
  }
1970
- interface FxQuote {
1971
- id: string;
1972
- base_currency: CurrencyCode;
1973
- pay_currency: CurrencyCode;
1974
- rate: number;
1975
- inverse_rate: number;
1976
- base_amount: Money;
1977
- converted_amount: Money;
1978
- quoted_at: string;
1979
- valid_until: string;
1980
- }
1981
- interface FxRateResponse {
1982
- from: CurrencyCode;
1983
- to: CurrencyCode;
1984
- rate: number;
1985
- inverse_rate: number;
1986
- quoted_at: string;
1987
- valid_until: string;
1988
- }
2261
+ /** `POST /v1/fx/lock-quote` response — backend `LockedFxQuote`. Decimal fields
2262
+ * (rate/inverse_rate/amounts) arrive as strings; coerce before arithmetic. */
2263
+ type FxQuote = S["LockedFxQuote"];
2264
+ /** `GET /v1/fx/rate` response — backend `FxQuote` (the indicative rate). Uses
2265
+ * `from_currency`/`to_currency` (not `from`/`to`) and string Decimal rates. */
2266
+ type FxRateResponse = S["FxQuote"];
2267
+ type FxQuoteStatus = S["FxQuoteStatus"];
1989
2268
 
1990
2269
  interface IdempotencyOption$3 {
1991
2270
  idempotencyKey?: string;
@@ -2186,353 +2465,64 @@ interface GetDeliveryOptionsParams {
2186
2465
  /** Cart goods total — drives free-over thresholds and zone minimums. */
2187
2466
  orderValue?: Money;
2188
2467
  }
2189
- declare class DeliveryService {
2190
- private client;
2191
- constructor(client: CimplifyClient);
2192
- getFee(dropoffLat: number, dropoffLng: number, country?: string): Promise<Result<DeliveryFeeResponse, CimplifyError>>;
2193
- /** The full delivery menu for an address. Pass the selected option's
2194
- * `rate_id` as `delivery_rate_id` when processing checkout. */
2195
- getOptions(dropoffLat: number, dropoffLng: number, opts?: GetDeliveryOptionsParams): Promise<Result<DeliveryOptionsResponse, CimplifyError>>;
2196
- }
2197
-
2198
- type SenderType = "customer" | "agent" | "system" | "bot";
2199
- type ContentType = "text" | "image" | "video" | "audio" | "document" | "interactive";
2200
- interface ChatMessage {
2201
- id: string;
2202
- sender_type: SenderType;
2203
- content: string;
2204
- content_type: ContentType;
2205
- attachments: ChatAttachment[];
2206
- metadata: Record<string, unknown>;
2207
- created_at: string;
2208
- }
2209
- interface ChatAttachment {
2210
- url: string;
2211
- mime_type: string | null;
2212
- filename: string | null;
2213
- }
2214
- interface ChatConversation {
2215
- id: string;
2216
- status: "open" | "assigned" | "waiting" | "resolved" | "closed";
2217
- ai_enabled: boolean;
2218
- message_count: number;
2219
- created_at: string;
2220
- last_message_at: string | null;
2221
- }
2222
- interface ChatConversationResponse {
2223
- conversation: ChatConversation;
2224
- messages: ChatMessage[];
2225
- }
2226
- interface ChatWidgetStarter {
2227
- icon?: string;
2228
- text: string;
2229
- }
2230
-
2231
- interface IdempotencyOption {
2232
- idempotencyKey?: string;
2233
- }
2234
- declare class SupportService {
2235
- private client;
2236
- constructor(client: CimplifyClient);
2237
- /** Open (or resume) the customer's widget conversation. */
2238
- openConversation(opts?: IdempotencyOption): Promise<Result<ChatConversationResponse, CimplifyError>>;
2239
- /** Send a message in the active conversation. */
2240
- sendMessage(content: string, opts?: IdempotencyOption): Promise<Result<ChatMessage, CimplifyError>>;
2241
- /** Poll for new messages since the given cursor. */
2242
- getMessages(options?: {
2243
- after?: string;
2244
- limit?: number;
2245
- }): Promise<Result<ChatMessage[], CimplifyError>>;
2246
- }
2247
-
2248
- type OrderType = "delivery" | "pickup" | "dine_in";
2249
- declare const ELEMENT_TYPES: {
2250
- readonly AUTH: "auth";
2251
- readonly ADDRESS: "address";
2252
- readonly PAYMENT: "payment";
2253
- readonly CHECKOUT: "checkout";
2254
- readonly ACCOUNT: "account";
2255
- };
2256
- type ElementType = (typeof ELEMENT_TYPES)[keyof typeof ELEMENT_TYPES];
2257
- declare const MESSAGE_TYPES: {
2258
- readonly INIT: "init";
2259
- readonly SET_TOKEN: "set_token";
2260
- readonly SET_CART: "set_cart";
2261
- readonly GET_DATA: "get_data";
2262
- readonly NAVIGATE: "navigate";
2263
- readonly REFRESH_TOKEN: "refresh_token";
2264
- readonly LOGOUT: "logout";
2265
- readonly PROCESS_CHECKOUT: "process_checkout";
2266
- readonly ABORT_CHECKOUT: "abort_checkout";
2267
- readonly READY: "ready";
2268
- readonly HEIGHT_CHANGE: "height_change";
2269
- readonly ERROR: "error";
2270
- readonly ADDRESS_CHANGED: "address_changed";
2271
- readonly ADDRESS_SELECTED: "address_selected";
2272
- readonly PAYMENT_METHOD_SELECTED: "payment_method_selected";
2273
- readonly LOGOUT_COMPLETE: "logout_complete";
2274
- readonly AUTH_REQUESTED: "auth_requested";
2275
- readonly CONTACT_PROVIDED: "contact_provided";
2276
- readonly CHECKOUT_STATUS: "checkout_status";
2277
- readonly CHECKOUT_COMPLETE: "checkout_complete";
2278
- readonly ORDER_TYPE_CHANGED: "order_type_changed";
2279
- readonly REQUEST_SUBMIT: "request_submit";
2280
- };
2281
- interface ElementsOptions {
2282
- linkUrl?: string;
2283
- appearance?: ElementAppearance;
2284
- auth?: ElementsAuthOptions;
2285
- }
2286
- interface ElementsAuthOptions {
2287
- clientId?: string;
2288
- redirectUri?: string;
2289
- callbackUri?: string;
2290
- scope?: string;
2291
- issuer?: string;
2292
- authUrl?: string;
2293
- }
2294
- interface ElementAppearance {
2295
- theme?: "light" | "dark";
2296
- variables?: {
2297
- primaryColor?: string;
2298
- fontFamily?: string;
2299
- borderRadius?: string;
2300
- };
2301
- }
2302
- interface ElementOptions {
2303
- mode?: "shipping" | "billing";
2304
- prefillEmail?: string;
2305
- amount?: number;
2306
- currency?: CurrencyCode;
2307
- orderTypes?: OrderType[];
2308
- defaultOrderType?: OrderType;
2309
- submitLabel?: string;
2310
- }
2311
- interface AddressInfo {
2312
- id?: string;
2313
- latitude?: number;
2314
- longitude?: number;
2315
- street_address: string;
2316
- apartment?: string;
2317
- city: string;
2318
- region: string;
2319
- postal_code?: string;
2320
- country?: string;
2321
- delivery_instructions?: string;
2322
- phone_for_delivery?: string;
2468
+ declare class DeliveryService {
2469
+ private client;
2470
+ constructor(client: CimplifyClient);
2471
+ getFee(dropoffLat: number, dropoffLng: number, country?: string): Promise<Result<DeliveryFeeResponse, CimplifyError>>;
2472
+ /** The full delivery menu for an address. Pass the selected option's
2473
+ * `rate_id` as `delivery_rate_id` when processing checkout. */
2474
+ getOptions(dropoffLat: number, dropoffLng: number, opts?: GetDeliveryOptionsParams): Promise<Result<DeliveryOptionsResponse, CimplifyError>>;
2323
2475
  }
2324
- interface PaymentMethodInfo {
2325
- id?: string;
2326
- type: "mobile_money" | "card" | "cash";
2327
- provider?: string;
2328
- last_four?: string;
2329
- phone_number?: string;
2330
- label?: string;
2476
+
2477
+ type SenderType = "customer" | "agent" | "system" | "bot";
2478
+ type ContentType = "text" | "image" | "video" | "audio" | "document" | "interactive";
2479
+ interface ChatMessage {
2480
+ id: string;
2481
+ sender_type: SenderType;
2482
+ content: string;
2483
+ content_type: ContentType;
2484
+ attachments: ChatAttachment[];
2485
+ metadata: Record<string, unknown>;
2486
+ created_at: string;
2331
2487
  }
2332
- interface AuthenticatedCustomer {
2333
- name: string;
2334
- email: string | null;
2335
- phone: string | null;
2488
+ interface ChatAttachment {
2489
+ url: string;
2490
+ mime_type: string | null;
2491
+ filename: string | null;
2336
2492
  }
2337
- type ElementsCustomerInfo = {
2338
- name: string;
2339
- email: string | null;
2340
- phone: string | null;
2341
- } | null;
2342
- declare const ELEMENTS_AUTH_CONTACT_TYPES: {
2343
- readonly EMAIL: "email";
2344
- readonly PHONE: "phone";
2345
- };
2346
- type ElementsAuthContactType = (typeof ELEMENTS_AUTH_CONTACT_TYPES)[keyof typeof ELEMENTS_AUTH_CONTACT_TYPES];
2347
- declare const ELEMENTS_AUTH_PROMPTS: {
2348
- readonly LOGIN: "login";
2349
- };
2350
- type ElementsAuthPrompt = (typeof ELEMENTS_AUTH_PROMPTS)[keyof typeof ELEMENTS_AUTH_PROMPTS];
2351
- declare const ELEMENTS_AUTH_MODES: {
2352
- readonly CHECKOUT: "checkout";
2353
- readonly DEFAULT: "default";
2354
- };
2355
- type ElementsAuthMode = (typeof ELEMENTS_AUTH_MODES)[keyof typeof ELEMENTS_AUTH_MODES];
2356
- interface AuthenticatedData {
2357
- accountId: string;
2358
- customerId: string;
2359
- token: string;
2360
- customer: AuthenticatedCustomer;
2493
+ interface ChatConversation {
2494
+ id: string;
2495
+ status: "open" | "assigned" | "waiting" | "resolved" | "closed";
2496
+ ai_enabled: boolean;
2497
+ message_count: number;
2498
+ created_at: string;
2499
+ last_message_at: string | null;
2361
2500
  }
2362
- interface ElementsCheckoutData {
2363
- cart_id: string;
2364
- order_type?: "delivery" | "pickup" | "dine_in";
2365
- location_id?: string;
2366
- scheduled_time?: string;
2367
- tip_amount?: number;
2368
- notes?: string;
2501
+ interface ChatConversationResponse {
2502
+ conversation: ChatConversation;
2503
+ messages: ChatMessage[];
2369
2504
  }
2370
- interface ElementsCheckoutResult {
2371
- success: boolean;
2372
- order?: {
2373
- id: string;
2374
- status: string;
2375
- total: string;
2376
- };
2377
- error?: {
2378
- code: string;
2379
- message: string;
2380
- };
2505
+ interface ChatWidgetStarter {
2506
+ icon?: string;
2507
+ text: string;
2381
2508
  }
2382
- interface CheckoutCartItem {
2383
- name: string;
2384
- quantity: number;
2385
- unit_price: string;
2386
- total_price: string;
2387
- image_url?: string;
2388
- line_type: "simple" | "service" | "bundle" | "composite" | "digital";
2389
- variant_name?: string;
2390
- scheduled_start?: string;
2391
- scheduled_end?: string;
2392
- selections?: {
2393
- name: string;
2394
- quantity: number;
2395
- variant_name?: string;
2396
- }[];
2397
- add_ons?: {
2398
- name: string;
2399
- price: string;
2400
- }[];
2401
- special_instructions?: string;
2509
+
2510
+ interface IdempotencyOption {
2511
+ idempotencyKey?: string;
2402
2512
  }
2403
- interface CheckoutCartData {
2404
- items: CheckoutCartItem[];
2405
- subtotal: string;
2406
- tax_amount: string;
2407
- total_discounts: string;
2408
- service_charge: string;
2409
- total: string;
2410
- currency: string;
2411
- /** Tax is baked into the prices (e.g. Ghana VAT), so `tax_amount` is already
2412
- * inside `subtotal`/`total`. Checkout labels it "included" rather than
2413
- * summing it onto the total. */
2414
- tax_inclusive: boolean;
2415
- /** Deposit due now when the cart has deposit-eligible service items, so the
2416
- * checkout can offer "pay deposit now, balance later". Absent/0 otherwise. */
2417
- deposit_required?: boolean;
2418
- deposit_amount?: string;
2419
- requires_delivery?: boolean;
2513
+ declare class SupportService {
2514
+ private client;
2515
+ constructor(client: CimplifyClient);
2516
+ /** Open (or resume) the customer's widget conversation. */
2517
+ openConversation(opts?: IdempotencyOption): Promise<Result<ChatConversationResponse, CimplifyError>>;
2518
+ /** Send a message in the active conversation. */
2519
+ sendMessage(content: string, opts?: IdempotencyOption): Promise<Result<ChatMessage, CimplifyError>>;
2520
+ /** Poll for new messages since the given cursor. */
2521
+ getMessages(options?: {
2522
+ after?: string;
2523
+ limit?: number;
2524
+ }): Promise<Result<ChatMessage[], CimplifyError>>;
2420
2525
  }
2421
- type ParentToIframeMessage = {
2422
- type: typeof MESSAGE_TYPES.INIT;
2423
- businessId: string;
2424
- publicKey: string;
2425
- prefillEmail?: string;
2426
- appearance?: ElementAppearance;
2427
- orderTypes?: OrderType[];
2428
- defaultOrderType?: OrderType;
2429
- renderSubmitButton?: boolean;
2430
- submitLabel?: string;
2431
- token?: string;
2432
- merchantName?: string;
2433
- } | {
2434
- type: typeof MESSAGE_TYPES.SET_TOKEN;
2435
- token: string;
2436
- } | {
2437
- type: typeof MESSAGE_TYPES.NAVIGATE;
2438
- path: string;
2439
- } | {
2440
- type: typeof MESSAGE_TYPES.SET_CART;
2441
- cart: CheckoutCartData;
2442
- } | {
2443
- type: typeof MESSAGE_TYPES.GET_DATA;
2444
- } | {
2445
- type: typeof MESSAGE_TYPES.REFRESH_TOKEN;
2446
- } | {
2447
- type: typeof MESSAGE_TYPES.LOGOUT;
2448
- } | {
2449
- type: typeof MESSAGE_TYPES.PROCESS_CHECKOUT;
2450
- cart_id: string;
2451
- order_type?: OrderType;
2452
- location_id?: string;
2453
- notes?: string;
2454
- scheduled_time?: string;
2455
- tip_amount?: number;
2456
- pay_currency?: CurrencyCode;
2457
- enroll_in_link?: boolean;
2458
- address?: AddressInfo;
2459
- customer?: ElementsCustomerInfo;
2460
- account_id?: string;
2461
- customer_id?: string;
2462
- } | {
2463
- type: typeof MESSAGE_TYPES.ABORT_CHECKOUT;
2464
- };
2465
- type IframeToParentMessage = {
2466
- type: typeof MESSAGE_TYPES.READY;
2467
- height: number;
2468
- } | {
2469
- type: typeof MESSAGE_TYPES.HEIGHT_CHANGE;
2470
- height: number;
2471
- } | {
2472
- type: typeof MESSAGE_TYPES.CONTACT_PROVIDED;
2473
- contact: string;
2474
- contactType: ElementsAuthContactType;
2475
- } | {
2476
- type: typeof MESSAGE_TYPES.ERROR;
2477
- code: string;
2478
- message: string;
2479
- } | {
2480
- type: typeof MESSAGE_TYPES.ADDRESS_CHANGED;
2481
- address: AddressInfo;
2482
- saveToLink: boolean;
2483
- } | {
2484
- type: typeof MESSAGE_TYPES.ADDRESS_SELECTED;
2485
- address: AddressInfo;
2486
- } | {
2487
- type: typeof MESSAGE_TYPES.PAYMENT_METHOD_SELECTED;
2488
- method: PaymentMethodInfo;
2489
- saveToLink: boolean;
2490
- } | {
2491
- type: typeof MESSAGE_TYPES.LOGOUT_COMPLETE;
2492
- } | {
2493
- type: typeof MESSAGE_TYPES.AUTH_REQUESTED;
2494
- loginHint?: string;
2495
- contactType?: ElementsAuthContactType;
2496
- mode?: ElementsAuthMode;
2497
- prompt?: ElementsAuthPrompt;
2498
- } | {
2499
- type: typeof MESSAGE_TYPES.CHECKOUT_STATUS;
2500
- status: CheckoutStatus;
2501
- context: CheckoutStatusContext;
2502
- } | {
2503
- type: typeof MESSAGE_TYPES.CHECKOUT_COMPLETE;
2504
- success: boolean;
2505
- order?: {
2506
- id: string;
2507
- order_number: string;
2508
- status: string;
2509
- total: string;
2510
- currency: CurrencyCode;
2511
- };
2512
- error?: {
2513
- code: string;
2514
- message: string;
2515
- recoverable: boolean;
2516
- };
2517
- enrolled_in_link?: boolean;
2518
- } | {
2519
- type: typeof MESSAGE_TYPES.ORDER_TYPE_CHANGED;
2520
- orderType: OrderType;
2521
- } | {
2522
- type: typeof MESSAGE_TYPES.REQUEST_SUBMIT;
2523
- };
2524
- declare const EVENT_TYPES: {
2525
- readonly READY: "ready";
2526
- readonly AUTHENTICATED: "authenticated";
2527
- readonly ERROR: "error";
2528
- readonly CHANGE: "change";
2529
- readonly BLUR: "blur";
2530
- readonly FOCUS: "focus";
2531
- readonly ORDER_TYPE_CHANGED: "order_type_changed";
2532
- readonly REQUEST_SUBMIT: "request_submit";
2533
- };
2534
- type ElementEventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
2535
- type ElementEventHandler<T = unknown> = (data: T) => void;
2536
2526
 
2537
2527
  declare class CimplifyElements {
2538
2528
  private client;
@@ -2591,8 +2581,17 @@ declare class CimplifyElement {
2591
2581
  private eventHandlers;
2592
2582
  private resolvers;
2593
2583
  private boundHandleMessage;
2584
+ private boundHandleResize;
2585
+ private lastReportedHeight;
2594
2586
  private listening;
2595
2587
  constructor(type: ElementType, businessId: string | null, linkUrl: string, options: ElementOptions, parent: CimplifyElements);
2588
+ /**
2589
+ * Size the iframe to the element's reported content height. The checkout can
2590
+ * exceed the viewport, so cap it at the viewport height — the checkout then
2591
+ * scrolls internally instead of growing (and scrolling) the host page. Other
2592
+ * element types size to content as before.
2593
+ */
2594
+ private applyHeight;
2596
2595
  mount(container: string | HTMLElement): void;
2597
2596
  destroy(): void;
2598
2597
  on(event: ElementEventType, handler: ElementEventHandler): void;
@@ -2753,4 +2752,4 @@ declare class CimplifyClient {
2753
2752
  }
2754
2753
  declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
2755
2754
 
2756
- export { type CheckoutAddressInfo as $, AUTHORIZATION_TYPE as A, type Booking as B, BusinessService as C, type BusinessSettings as D, type BusinessType as E, type BusinessWithLocations as F, CHECKOUT_MODE as G, CHECKOUT_MUTATION as H, CHECKOUT_STEP as I, CONTACT_TYPE as J, type CacheOptions as K, type CancelBookingInput as L, type CancelBookingResult as M, type CancelOrderInput as N, type CancellationPolicy as O, CartOperations as P, CatalogueQueries as Q, type CatalogueResult as R, type CatalogueSnapshot as S, type CategoryInfo as T, type ChatAttachment as U, type ChatConversation as V, type ChatConversationResponse as W, type ChatMessage as X, type ChatWidgetStarter as Y, type CheckSlotAvailabilityInput as Z, type CheckSlotAvailabilityResult as _, AUTH_MUTATION as a, type Err as a$, type CheckoutCartData as a0, type CheckoutCartItem as a1, type CheckoutCustomerInfo as a2, type CheckoutFormData as a3, type CheckoutInput as a4, type CheckoutMode as a5, type CheckoutOrderType as a6, type CheckoutPaymentMethod as a7, type CheckoutResult as a8, CheckoutService as a9, DeliveryService as aA, type DepositResult as aB, type DeviceType as aC, type DismissMessageResponse as aD, ELEMENTS_AUTH_CONTACT_TYPES as aE, ELEMENTS_AUTH_MODES as aF, ELEMENTS_AUTH_PROMPTS as aG, ELEMENT_TYPES as aH, EVENT_TYPES as aI, type ElementAppearance as aJ, type ElementEventHandler as aK, type ElementEventType as aL, type ElementOptions as aM, type ElementType as aN, type ElementsAuthContactType as aO, type ElementsAuthMode as aP, type ElementsAuthOptions as aQ, type ElementsAuthPrompt as aR, type ElementsCheckoutData as aS, type ElementsCheckoutResult as aT, type ElementsCustomerInfo as aU, type ElementsOptions as aV, type EnrichedOrder as aW, type EnrichedOrderItem as aX, type EnrollAndLinkOrderInput as aY, type EnrollAndLinkOrderResult as aZ, type EnrollmentData as a_, type CheckoutStatus as aa, type CheckoutStatusContext as ab, type CheckoutStep as ac, CimplifyClient as ad, type CimplifyConfig as ae, CimplifyElement as af, CimplifyElements as ag, type ContactType as ah, type ContentType as ai, type CreateAddressInput as aj, type CreateMobileMoneyInput as ak, type Customer as al, type CustomerAddress as am, type CustomerBooking as an, type CustomerBookingServiceItem as ao, type CustomerLinkPreferences as ap, type CustomerMobileMoney as aq, type CustomerServicePreferences as ar, DEFAULT_COUNTRY as as, DEFAULT_CURRENCY as at, DEVICE_TYPE as au, type DayAvailability as av, type DeliveryFeeDetails as aw, type DeliveryFeeResponse as ax, type DeliveryOption as ay, type DeliveryOptionsResponse as az, type AbortablePromise as b, OrderQueries as b$, type FeeBearerType as b0, type FetchQuoteInput as b1, type FulfillmentLink as b2, type FulfillmentStatus as b3, type FulfillmentSummaryDTO as b4, type FulfillmentType as b5, type FxQuote as b6, type FxQuoteRequest as b7, type FxRateResponse as b8, FxService as b9, type MobileMoneyData as bA, type MobileMoneyDetails as bB, type MobileMoneyProvider as bC, type NextAction as bD, ORDER_MUTATION as bE, ORDER_TYPE as bF, type ObservabilityHooks as bG, type Ok as bH, type Order as bI, type OrderChannel as bJ, type OrderCustomerInfo as bK, type OrderDiscountInfo as bL, type OrderFilter as bM, type OrderFulfillmentSummary as bN, type OrderGroup as bO, type OrderGroupDetails as bP, type OrderGroupPayment as bQ, type OrderGroupPaymentState as bR, type OrderGroupPaymentStatus as bS, type OrderGroupPaymentSummary as bT, type OrderGroupStatus as bU, type OrderHistory as bV, type OrderLineState as bW, type OrderLineStatus as bX, type OrderLocationInfo as bY, type OrderPaymentEvent as bZ, type OrderPricingView as b_, type GetAvailableSlotsInput as ba, type GetDeliveryOptionsParams as bb, type GetOrdersOptions as bc, type GetProductsOptions as bd, type GroupOrderInfo as be, type IframeToParentMessage as bf, InventoryService as bg, LINK_MUTATION as bh, LINK_QUERY as bi, type LineItem as bj, type LineType as bk, type LinkData as bl, type LinkEnrollResult as bm, LinkService as bn, type LinkSession as bo, type LinkStatusResult as bp, type LiteBootstrap as bq, LiteService as br, type Location as bs, type LocationBooking as bt, type LocationTaxBehavior as bu, type LocationTaxOverrides as bv, type LocationTimeProfile as bw, type LocationWithDetails as bx, MESSAGE_TYPES as by, MOBILE_MONEY_PROVIDER as bz, type ActivityRecommendation as c, type ServiceCharge as c$, type OrderSplitDetail as c0, type OrderStaffInfo as c1, type OrderStatus as c2, type OrderTimestampsDTO as c3, type OrderType as c4, type OtpResult as c5, PAYMENT_METHOD as c6, PAYMENT_MUTATION as c7, PAYMENT_STATE as c8, PICKUP_TIME_TYPE as c9, type RelationType as cA, type ReminderMethod as cB, type ReminderSettings as cC, type ReorderResult as cD, type RequestContext as cE, type RequestErrorEvent as cF, type RequestOptions as cG, type RequestOtpInput as cH, type RequestSource as cI, type RequestStartEvent as cJ, type RequestSuccessEvent as cK, type RescheduleBookingInput as cL, type RescheduleBookingResult as cM, type RescheduleHistoryRecord as cN, type ResourceAssignment as cO, type Result as cP, type RetryEvent as cQ, type RevokeAllSessionsResult as cR, type RevokeSessionResult as cS, type Room as cT, type SchedulingMetadata as cU, type SchedulingResult as cV, SchedulingService as cW, type SenderType as cX, type Service as cY, type ServiceAvailabilityParams as cZ, type ServiceAvailabilityResult as c_, type ParentToIframeMessage as ca, type PaymentInfoDTO as cb, type PaymentMethodInfo as cc, type PaymentState as cd, type PickupTime as ce, type PickupTimeType as cf, type PlaceDetailsResponse as cg, PlacesService as ch, type PriceQuote as ci, type PricingOverrides as cj, type ProcessAndResolveOptions as ck, type ProcessCheckoutOptions as cl, type ProcessCheckoutResult as cm, type ProviderResolutionSource as cn, type QuoteBundleSelectionInput as co, type QuoteCompositeSelectionInput as cp, type QuoteDynamicBuckets as cq, type QuoteStatus as cr, type QuoteUiMessage as cs, type ReadRequestOptions as ct, type RefreshQuoteInput as cu, type RefreshQuoteResult as cv, type RefundOrderInput as cw, type RelatedCandidate as cx, type RelatedProduct as cy, type RelatedProductsEnrichment as cz, type ActivityRecommendationsResponse as d, type ServiceNotes as d0, type ServiceScheduleRequest as d1, type ServiceStatus as d2, type SessionActivityData as d3, type SessionChangeEvent as d4, type SessionMessage as d5, type SlotResourceInfo as d6, type SlotStaffInfo as d7, type Staff as d8, type StaffAssignment as d9, createCimplifyClient as dA, createElements as dB, err as dC, flatMap as dD, fromPromise as dE, getOrElse as dF, isErr as dG, isOk as dH, mapError as dI, mapResult as dJ, ok as dK, toNullable as dL, tryCatch as dM, unwrap as dN, type StaffRole as da, type StaffScheduleItem as db, type StockLevel as dc, type StockStatus as dd, type StoreCreditBalance as de, StoreCreditQueries as df, type StorefrontBootstrap as dg, SubscriptionService as dh, SupportService as di, type Table as dj, type TableInfo as dk, type TimeRange as dl, type TimeRanges as dm, type TimeSlot as dn, type TrackCategoryViewOptions as dp, type TrackProductViewOptions as dq, type UpdateAddressInput as dr, type UpdateOrderStatusInput as ds, type UpdateProfileInput as dt, type UploadInitResponse as du, type UploadResult as dv, UploadService as dw, type VerifyOtpInput as dx, combine as dy, combineObject as dz, ActivityService as e, type ActivityStateResponse as f, type AddressData as g, type AddressInfo as h, type AmountToPay as i, type AuthResponse as j, AuthService as k, type AuthStatus as l, type AuthenticatedCustomer as m, type AuthenticatedData as n, type AutocompletePrediction as o, type AutocompleteResponse as p, type AvailabilityResult as q, type AvailableSlot as r, type BookingModificationType as s, type BookingStatus as t, type BookingWithDetails as u, type BufferTimes as v, type Business as w, type BusinessDetailsDTO as x, type BusinessHours as y, type BusinessPreferences as z };
2755
+ export { type CheckoutCartData as $, AUTHORIZATION_TYPE as A, type Booking as B, BusinessService as C, type BusinessSettings as D, type BusinessWithLocations as E, CHECKOUT_MODE as F, CHECKOUT_MUTATION as G, CHECKOUT_STEP as H, CONTACT_TYPE as I, type CacheOptions as J, type CancelBookingInput as K, type CancelBookingResult as L, type CancelOrderInput as M, type CancellationPolicy as N, CartOperations as O, CatalogueQueries as P, type CatalogueResult as Q, type CatalogueSnapshot as R, type CategoryInfo as S, type ChatAttachment as T, type ChatConversation as U, type ChatConversationResponse as V, type ChatMessage as W, type ChatWidgetStarter as X, type CheckSlotAvailabilityInput as Y, type CheckSlotAvailabilityResult as Z, type CheckoutAddressInfo as _, AUTH_MUTATION as a, type FeeBearerType as a$, type CheckoutCartItem as a0, type CheckoutCustomerInfo as a1, type CheckoutFormData as a2, type CheckoutInput as a3, type CheckoutMode as a4, type CheckoutOrderType as a5, type CheckoutPaymentMethod as a6, type CheckoutResult as a7, CheckoutService as a8, type CheckoutStatus as a9, type DepositResult as aA, type DeviceType as aB, type DismissMessageResponse as aC, ELEMENTS_AUTH_CONTACT_TYPES as aD, ELEMENTS_AUTH_MODES as aE, ELEMENTS_AUTH_PROMPTS as aF, ELEMENT_TYPES as aG, EVENT_TYPES as aH, type ElementAppearance as aI, type ElementEventHandler as aJ, type ElementEventType as aK, type ElementOptions as aL, type ElementType as aM, type ElementsAuthContactType as aN, type ElementsAuthMode as aO, type ElementsAuthOptions as aP, type ElementsAuthPrompt as aQ, type ElementsCheckoutData as aR, type ElementsCheckoutResult as aS, type ElementsCustomerInfo as aT, type ElementsOptions as aU, type EnrichedOrder as aV, type EnrichedOrderItem as aW, type EnrollAndLinkOrderInput as aX, type EnrollAndLinkOrderResult as aY, type EnrollmentData as aZ, type Err as a_, type CheckoutStatusContext as aa, type CheckoutStep as ab, CimplifyClient as ac, type CimplifyConfig as ad, CimplifyElement as ae, CimplifyElements as af, type ContactType as ag, type ContentType as ah, type CreateAddressInput as ai, type CreateMobileMoneyInput as aj, type Customer as ak, type CustomerAddress as al, type CustomerBooking as am, type CustomerBookingServiceItem as an, type CustomerLinkPreferences as ao, type CustomerMobileMoney as ap, type CustomerServicePreferences as aq, DEFAULT_COUNTRY as ar, DEFAULT_CURRENCY as as, DEVICE_TYPE as at, type DayAvailability as au, type DeliveryFeeDetails as av, type DeliveryFeeResponse as aw, type DeliveryOption as ax, type DeliveryOptionsResponse as ay, DeliveryService as az, type AbortablePromise as b, OrderQueries as b$, type FetchQuoteInput as b0, type FulfillmentLink as b1, type FulfillmentStatus as b2, type FulfillmentSummaryDTO as b3, type FulfillmentType as b4, type FxQuote as b5, type FxQuoteRequest as b6, type FxQuoteStatus as b7, type FxRateResponse as b8, FxService as b9, MOBILE_MONEY_PROVIDER as bA, type MobileMoneyData as bB, type MobileMoneyDetails as bC, type MobileMoneyProvider as bD, type NextAction as bE, ORDER_MUTATION as bF, ORDER_TYPE as bG, type ObservabilityHooks as bH, type Ok as bI, type Order as bJ, type OrderCustomerInfo as bK, type OrderDiscountInfo as bL, type OrderFilter as bM, type OrderFulfillmentSummary as bN, type OrderGroup as bO, type OrderGroupDetails as bP, type OrderGroupPayment as bQ, type OrderGroupPaymentState as bR, type OrderGroupPaymentStatus as bS, type OrderGroupPaymentSummary as bT, type OrderGroupStatus as bU, type OrderHistory as bV, type OrderLineState as bW, type OrderLineStatus as bX, type OrderLocationInfo as bY, type OrderPaymentEvent as bZ, type OrderPricingView as b_, type GetAvailableSlotsInput as ba, type GetDeliveryOptionsParams as bb, type GetOrdersOptions as bc, type GetProductsOptions as bd, type GroupOrderInfo as be, type IframeToParentMessage as bf, InventoryService as bg, LINK_MUTATION as bh, LINK_QUERY as bi, type LifecyclePhase as bj, type LineItem as bk, type LineType as bl, type LinkData as bm, type LinkEnrollResult as bn, LinkService as bo, type LinkSession as bp, type LinkStatusResult as bq, type LiteBootstrap as br, LiteService as bs, type Location as bt, type LocationBooking as bu, type LocationTaxBehavior as bv, type LocationTaxOverrides as bw, type LocationTimeProfile as bx, type LocationWithDetails as by, MESSAGE_TYPES as bz, type ActivityRecommendation as c, type SenderType as c$, type OrderSplitDetail as c0, type OrderStaffInfo as c1, type OrderStatus as c2, type OrderTimestampsDTO as c3, type OrderType as c4, type Origin as c5, type OriginActor as c6, type OriginChannel as c7, type OtpResult as c8, PAYMENT_METHOD as c9, type RelatedCandidate as cA, type RelatedProduct as cB, type RelatedProductsEnrichment as cC, type RelationType as cD, type ReminderMethod as cE, type ReminderSettings as cF, type ReorderResult as cG, type RequestContext as cH, type RequestErrorEvent as cI, type RequestOptions as cJ, type RequestOtpInput as cK, type RequestSource as cL, type RequestStartEvent as cM, type RequestSuccessEvent as cN, type RescheduleBookingInput as cO, type RescheduleBookingResult as cP, type RescheduleHistoryRecord as cQ, type ResourceAssignment as cR, type ResourceInfo as cS, type Result as cT, type RetryEvent as cU, type RevokeAllSessionsResult as cV, type RevokeSessionResult as cW, type Room as cX, type SchedulingMetadata as cY, type SchedulingResult as cZ, SchedulingService as c_, PAYMENT_MUTATION as ca, PAYMENT_STATE as cb, PICKUP_TIME_TYPE as cc, type ParentToIframeMessage as cd, type PaymentInfoDTO as ce, type PaymentMethodInfo as cf, type PaymentState as cg, type PickupTime as ch, type PickupTimeType as ci, type PlaceDetailsResponse as cj, PlacesService as ck, type PriceQuote as cl, type PricingOverrides as cm, type ProcessAndResolveOptions as cn, type ProcessCheckoutOptions as co, type ProcessCheckoutResult as cp, type ProviderResolutionSource as cq, type QuoteBundleSelectionInput as cr, type QuoteCompositeSelectionInput as cs, type QuoteDynamicBuckets as ct, type QuoteStatus as cu, type QuoteUiMessage as cv, type ReadRequestOptions as cw, type RefreshQuoteInput as cx, type RefreshQuoteResult as cy, type RefundOrderInput as cz, type ActivityRecommendationsResponse as d, type Service as d0, type ServiceAvailabilityParams as d1, type ServiceAvailabilityResult as d2, type ServiceCharge as d3, type ServiceNotes as d4, type ServiceScheduleRequest as d5, type ServiceStatus as d6, type SessionActivityData as d7, type SessionChangeEvent as d8, type SessionMessage as d9, type VerifyOtpInput as dA, combine as dB, combineObject as dC, createCimplifyClient as dD, createElements as dE, err as dF, flatMap as dG, fromPromise as dH, getOrElse as dI, isErr as dJ, isOk as dK, mapError as dL, mapResult as dM, ok as dN, toNullable as dO, tryCatch as dP, unwrap as dQ, type SlotResourceInfo as da, type SlotStaffInfo as db, type Staff as dc, type StaffAssignment as dd, type StaffRole as de, type StaffScheduleItem as df, type StockLevel as dg, type StockStatus as dh, type StoreCreditBalance as di, StoreCreditQueries as dj, type StorefrontBootstrap as dk, SubscriptionService as dl, SupportService as dm, type Table as dn, type TimeRange as dp, type TimeRanges as dq, type TimeSlot as dr, type TrackCategoryViewOptions as ds, type TrackProductViewOptions as dt, type UpdateAddressInput as du, type UpdateOrderStatusInput as dv, type UpdateProfileInput as dw, type UploadInitResponse as dx, type UploadResult as dy, UploadService as dz, ActivityService as e, type ActivityStateResponse as f, type AddressData as g, type AddressInfo as h, type AmountToPay as i, type AuthResponse as j, AuthService as k, type AuthStatus as l, type AuthenticatedCustomer as m, type AuthenticatedData as n, type AutocompletePrediction as o, type AutocompleteResponse as p, type AvailabilityResult as q, type AvailableSlot as r, type BookingModificationType as s, type BookingStatus as t, type BookingWithDetails as u, type BufferTimes as v, type Business as w, type BusinessDetailsDTO as x, type BusinessHours as y, type BusinessPreferences as z };