@cimplify/sdk 0.84.0 → 0.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advanced.d.mts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +22 -22
- package/dist/advanced.mjs +3 -3
- package/dist/{chunk-I6RE4BKH.mjs → chunk-A2GXDCSI.mjs} +2 -2
- package/dist/{chunk-XA3ZNR75.js → chunk-AETVRBKI.js} +1 -1
- package/dist/{chunk-PLTP6HWW.mjs → chunk-D6JWYYTG.mjs} +20 -20
- package/dist/{chunk-ODEPW244.js → chunk-ESGKWRQS.js} +4 -4
- package/dist/{chunk-GFM5JW45.js → chunk-HJEKXCG2.js} +62 -62
- package/dist/{chunk-AMZXALF6.mjs → chunk-K5EN2W2Q.mjs} +1 -1
- package/dist/{chunk-TD3AY34U.mjs → chunk-KFLGQGMC.mjs} +3 -3
- package/dist/{chunk-NWUEWUX2.mjs → chunk-MRL53WP6.mjs} +2 -2
- package/dist/{chunk-7BM56JET.mjs → chunk-NN3WC7XZ.mjs} +3 -3
- package/dist/{chunk-7Y2O3E4D.js → chunk-PTPOQVXS.js} +5 -5
- package/dist/{chunk-HPN5R3K2.js → chunk-VUG4HTUM.js} +23 -23
- package/dist/{chunk-FKBXZ2A6.js → chunk-X4UNISYG.js} +22 -22
- package/dist/{client-CINi3Dw3.d.ts → client-BQSRj4iK.d.mts} +528 -539
- package/dist/{client-Ba4Hng9i.d.mts → client-BdI24jUT.d.ts} +528 -539
- package/dist/{client-D8AjO8jb.d.ts → client-CMJO_8zo.d.ts} +2 -2
- package/dist/{client-BjUJapti.d.mts → client-DowGNrTh.d.mts} +2 -2
- package/dist/{index-DCPxHjbj.d.ts → index-BRwHpMY-.d.ts} +3 -3
- package/dist/{index-9Bl-zBAI.d.mts → index-DLb_Ldl6.d.mts} +3 -3
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +117 -117
- package/dist/index.mjs +5 -5
- package/dist/mock/cli.mjs +659 -355
- package/dist/mock/library.js +20 -20
- package/dist/mock/library.mjs +20 -20
- package/dist/mock/msw.js +20 -20
- package/dist/mock/msw.mjs +20 -20
- package/dist/{payment-BVv9leS_.d.ts → payment-BA7KNBxg.d.ts} +3 -3
- package/dist/{payment-D61iGd0o.d.mts → payment-CFev-fOE.d.mts} +3 -3
- package/dist/{price-BYWCHYO5.d.ts → price-BNhGVB5q.d.ts} +3 -1
- package/dist/{price-Cthq6nPb.d.mts → price-nRxqVNGq.d.mts} +3 -1
- package/dist/product-BGxIfTqJ.d.mts +5400 -0
- package/dist/product-BGxIfTqJ.d.ts +5400 -0
- package/dist/react.d.mts +22 -7
- package/dist/react.d.ts +22 -7
- package/dist/react.js +177 -155
- package/dist/react.mjs +57 -36
- package/dist/{server-BjQ0xWmc.d.mts → server-9u0LiG5U.d.mts} +1 -1
- package/dist/{server-DDaQIYLa.d.ts → server-BH7DTaaz.d.ts} +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +10 -10
- package/dist/server.mjs +4 -4
- package/dist/styles.css +1 -1
- package/dist/testing/msw.d.mts +2 -2
- package/dist/testing/msw.d.ts +2 -2
- package/dist/testing/msw.js +3 -3
- package/dist/testing/msw.mjs +2 -2
- package/dist/testing/suite.d.mts +6 -6
- package/dist/testing/suite.d.ts +6 -6
- package/dist/testing/suite.js +25 -25
- package/dist/testing/suite.mjs +6 -6
- package/dist/testing.d.mts +5 -5
- package/dist/testing.d.ts +5 -5
- package/dist/testing.js +81 -81
- package/dist/testing.mjs +7 -7
- package/dist/utils.d.mts +4 -4
- package/dist/utils.d.ts +4 -4
- package/dist/utils.js +29 -29
- package/dist/utils.mjs +2 -2
- package/package.json +25 -22
- package/registry/currency-selector.json +1 -1
- package/registry/digital-product-card.json +1 -1
- package/registry/digital-product-layout.json +1 -1
- package/dist/product-2MAoE0kZ.d.mts +0 -1570
- package/dist/product-2MAoE0kZ.d.ts +0 -1570
|
@@ -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,
|
|
2
|
-
import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-
|
|
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, bQ as components, bi as SchedulingMode, at as DurationUnit, bm as Subscription, bq as SubscriptionWithDetails } from './product-BGxIfTqJ.mjs';
|
|
2
|
+
import { a as AuthorizationType, c as PaymentMethod, I as InitializePaymentResult, S as SubmitAuthorizationInput, i as PaymentStatusResponse } from './payment-CFev-fOE.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
|
|
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
|
-
|
|
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,474 @@ interface AuthResponse {
|
|
|
1017
1025
|
message: string;
|
|
1018
1026
|
}
|
|
1019
1027
|
|
|
1020
|
-
type
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
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
|
|
1030
|
-
|
|
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
|
|
1033
|
-
region
|
|
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
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
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
|
|
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
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
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
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
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
|
|
1142
|
+
interface ElementsCheckoutData {
|
|
1134
1143
|
cart_id: string;
|
|
1135
|
-
order_type
|
|
1144
|
+
order_type?: OrderType;
|
|
1136
1145
|
location_id?: string;
|
|
1137
|
-
notes?: string;
|
|
1138
1146
|
scheduled_time?: string;
|
|
1139
1147
|
tip_amount?: number;
|
|
1140
|
-
|
|
1141
|
-
pay_currency?: CurrencyCode;
|
|
1142
|
-
timeout_ms?: number;
|
|
1143
|
-
on_status_change?: (status: CheckoutStatus, context: CheckoutStatusContext) => void;
|
|
1148
|
+
notes?: string;
|
|
1144
1149
|
}
|
|
1145
|
-
interface
|
|
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
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
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 orderTokenParam;
|
|
1478
|
+
process(data: CheckoutFormData): Promise<Result<CheckoutResult, CimplifyError>>;
|
|
1479
|
+
initializePayment(_orderId: string, _method: PaymentMethod): Promise<Result<InitializePaymentResult, CimplifyError>>;
|
|
1480
|
+
submitAuthorization(input: SubmitAuthorizationInput): Promise<Result<CheckoutResult, CimplifyError>>;
|
|
1481
|
+
pollPaymentStatus(orderId: string): Promise<Result<PaymentStatusResponse, CimplifyError>>;
|
|
1482
|
+
updateOrderCustomer(orderId: string, customer: CheckoutCustomerInfo): Promise<Result<Order, CimplifyError>>;
|
|
1483
|
+
verifyPayment(orderId: string): Promise<Result<Order, CimplifyError>>;
|
|
1484
|
+
processAndResolve(data: CheckoutFormData & ProcessAndResolveOptions): Promise<Result<ProcessCheckoutResult, CimplifyError>>;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
interface BusinessDetailsDTO {
|
|
1488
|
+
name: string;
|
|
1489
|
+
logo_url?: string;
|
|
1490
|
+
contact_email?: string;
|
|
1491
|
+
contact_phone?: string;
|
|
1492
|
+
}
|
|
1493
|
+
interface OrderCustomerInfo {
|
|
1494
|
+
id?: string;
|
|
1495
|
+
name?: string;
|
|
1199
1496
|
email?: string;
|
|
1200
1497
|
phone?: string;
|
|
1201
1498
|
notes?: string[];
|
|
@@ -1216,6 +1513,11 @@ interface PaymentInfoDTO {
|
|
|
1216
1513
|
currency: string;
|
|
1217
1514
|
amount_to_pay: AmountToPay;
|
|
1218
1515
|
paid_via_group: boolean;
|
|
1516
|
+
/** Outstanding amount still owed (money string); with `state` lets clients
|
|
1517
|
+
* render a partial (deposit) payment. */
|
|
1518
|
+
balance_due: Money;
|
|
1519
|
+
deposit_required: boolean;
|
|
1520
|
+
deposit_amount: Money;
|
|
1219
1521
|
}
|
|
1220
1522
|
interface FulfillmentSummaryDTO {
|
|
1221
1523
|
fulfillment_type: FulfillmentType;
|
|
@@ -1307,8 +1609,9 @@ interface EnrichedOrder {
|
|
|
1307
1609
|
user_friendly_id: string;
|
|
1308
1610
|
business_id: string;
|
|
1309
1611
|
order_type: string;
|
|
1310
|
-
|
|
1612
|
+
origin: Origin;
|
|
1311
1613
|
status: OrderStatus;
|
|
1614
|
+
lifecycle_phase: LifecyclePhase;
|
|
1312
1615
|
bill_token?: string;
|
|
1313
1616
|
tracking_token?: string;
|
|
1314
1617
|
tracking_link?: string;
|
|
@@ -1322,6 +1625,8 @@ interface EnrichedOrder {
|
|
|
1322
1625
|
staff: OrderStaffInfo;
|
|
1323
1626
|
discounts: OrderDiscountInfo;
|
|
1324
1627
|
group_order_info?: GroupOrderInfo;
|
|
1628
|
+
approval_status?: string;
|
|
1629
|
+
fulfillment_rollup?: OrderFulfillmentSummary | null;
|
|
1325
1630
|
metadata?: Record<string, unknown>;
|
|
1326
1631
|
}
|
|
1327
1632
|
|
|
@@ -1498,7 +1803,6 @@ declare class AuthService {
|
|
|
1498
1803
|
updateProfile(input: UpdateProfileInput): Promise<Result<UpdateProfileResult, CimplifyError>>;
|
|
1499
1804
|
}
|
|
1500
1805
|
|
|
1501
|
-
type BusinessType = "eatery" | "retail" | "service" | "other" | "system" | "unset";
|
|
1502
1806
|
interface BusinessPreferences {
|
|
1503
1807
|
[key: string]: unknown;
|
|
1504
1808
|
}
|
|
@@ -1506,9 +1810,10 @@ interface Business {
|
|
|
1506
1810
|
id: string;
|
|
1507
1811
|
name: string;
|
|
1508
1812
|
handle: string;
|
|
1509
|
-
business_type: BusinessType;
|
|
1510
1813
|
email: string;
|
|
1511
1814
|
default_currency: CurrencyCode;
|
|
1815
|
+
default_country: string;
|
|
1816
|
+
default_timezone: string;
|
|
1512
1817
|
default_phone?: string;
|
|
1513
1818
|
default_address?: string;
|
|
1514
1819
|
default_offers_table_service: boolean;
|
|
@@ -1524,8 +1829,6 @@ interface Business {
|
|
|
1524
1829
|
is_online_only: boolean;
|
|
1525
1830
|
enabled_payment_types: string[];
|
|
1526
1831
|
default_location_settings: Record<string, unknown>;
|
|
1527
|
-
country_code?: string;
|
|
1528
|
-
timezone?: string;
|
|
1529
1832
|
metadata?: Record<string, unknown>;
|
|
1530
1833
|
}
|
|
1531
1834
|
interface LocationTaxBehavior {
|
|
@@ -1665,24 +1968,10 @@ declare class BusinessService {
|
|
|
1665
1968
|
getBootstrap(opts?: ReadRequestOptions): Promise<Result<StorefrontBootstrap, CimplifyError>>;
|
|
1666
1969
|
}
|
|
1667
1970
|
|
|
1668
|
-
type
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
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
|
-
}
|
|
1971
|
+
type S$1 = components["schemas"];
|
|
1972
|
+
type StockStatus = S$1["StockStatus"];
|
|
1973
|
+
type StockLevel = S$1["StockLevelResponse"];
|
|
1974
|
+
type AvailabilityResult = S$1["AvailabilityResponse"];
|
|
1686
1975
|
|
|
1687
1976
|
declare class InventoryService {
|
|
1688
1977
|
private client;
|
|
@@ -1962,30 +2251,19 @@ declare class LiteService {
|
|
|
1962
2251
|
getMenuByCategory(categoryId: string): Promise<Result<Product[], CimplifyError>>;
|
|
1963
2252
|
}
|
|
1964
2253
|
|
|
2254
|
+
type S = components["schemas"];
|
|
1965
2255
|
interface FxQuoteRequest {
|
|
1966
2256
|
from: CurrencyCode;
|
|
1967
2257
|
to: CurrencyCode;
|
|
1968
2258
|
amount: Money;
|
|
1969
2259
|
}
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
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
|
-
}
|
|
2260
|
+
/** `POST /v1/fx/lock-quote` response — backend `LockedFxQuote`. Decimal fields
|
|
2261
|
+
* (rate/inverse_rate/amounts) arrive as strings; coerce before arithmetic. */
|
|
2262
|
+
type FxQuote = S["LockedFxQuote"];
|
|
2263
|
+
/** `GET /v1/fx/rate` response — backend `FxQuote` (the indicative rate). Uses
|
|
2264
|
+
* `from_currency`/`to_currency` (not `from`/`to`) and string Decimal rates. */
|
|
2265
|
+
type FxRateResponse = S["FxQuote"];
|
|
2266
|
+
type FxQuoteStatus = S["FxQuoteStatus"];
|
|
1989
2267
|
|
|
1990
2268
|
interface IdempotencyOption$3 {
|
|
1991
2269
|
idempotencyKey?: string;
|
|
@@ -2184,355 +2462,66 @@ interface DeliveryOptionsResponse {
|
|
|
2184
2462
|
interface GetDeliveryOptionsParams {
|
|
2185
2463
|
country?: string;
|
|
2186
2464
|
/** Cart goods total — drives free-over thresholds and zone minimums. */
|
|
2187
|
-
orderValue?: Money;
|
|
2188
|
-
}
|
|
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;
|
|
2465
|
+
orderValue?: Money;
|
|
2323
2466
|
}
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2467
|
+
declare class DeliveryService {
|
|
2468
|
+
private client;
|
|
2469
|
+
constructor(client: CimplifyClient);
|
|
2470
|
+
getFee(dropoffLat: number, dropoffLng: number, country?: string): Promise<Result<DeliveryFeeResponse, CimplifyError>>;
|
|
2471
|
+
/** The full delivery menu for an address. Pass the selected option's
|
|
2472
|
+
* `rate_id` as `delivery_rate_id` when processing checkout. */
|
|
2473
|
+
getOptions(dropoffLat: number, dropoffLng: number, opts?: GetDeliveryOptionsParams): Promise<Result<DeliveryOptionsResponse, CimplifyError>>;
|
|
2331
2474
|
}
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2475
|
+
|
|
2476
|
+
type SenderType = "customer" | "agent" | "system" | "bot";
|
|
2477
|
+
type ContentType = "text" | "image" | "video" | "audio" | "document" | "interactive";
|
|
2478
|
+
interface ChatMessage {
|
|
2479
|
+
id: string;
|
|
2480
|
+
sender_type: SenderType;
|
|
2481
|
+
content: string;
|
|
2482
|
+
content_type: ContentType;
|
|
2483
|
+
attachments: ChatAttachment[];
|
|
2484
|
+
metadata: Record<string, unknown>;
|
|
2485
|
+
created_at: string;
|
|
2336
2486
|
}
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
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;
|
|
2487
|
+
interface ChatAttachment {
|
|
2488
|
+
url: string;
|
|
2489
|
+
mime_type: string | null;
|
|
2490
|
+
filename: string | null;
|
|
2361
2491
|
}
|
|
2362
|
-
interface
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2492
|
+
interface ChatConversation {
|
|
2493
|
+
id: string;
|
|
2494
|
+
status: "open" | "assigned" | "waiting" | "resolved" | "closed";
|
|
2495
|
+
ai_enabled: boolean;
|
|
2496
|
+
message_count: number;
|
|
2497
|
+
created_at: string;
|
|
2498
|
+
last_message_at: string | null;
|
|
2369
2499
|
}
|
|
2370
|
-
interface
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
id: string;
|
|
2374
|
-
status: string;
|
|
2375
|
-
total: string;
|
|
2376
|
-
};
|
|
2377
|
-
error?: {
|
|
2378
|
-
code: string;
|
|
2379
|
-
message: string;
|
|
2380
|
-
};
|
|
2500
|
+
interface ChatConversationResponse {
|
|
2501
|
+
conversation: ChatConversation;
|
|
2502
|
+
messages: ChatMessage[];
|
|
2381
2503
|
}
|
|
2382
|
-
interface
|
|
2383
|
-
|
|
2384
|
-
|
|
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;
|
|
2504
|
+
interface ChatWidgetStarter {
|
|
2505
|
+
icon?: string;
|
|
2506
|
+
text: string;
|
|
2402
2507
|
}
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
requires_delivery?: boolean;
|
|
2508
|
+
|
|
2509
|
+
interface IdempotencyOption {
|
|
2510
|
+
idempotencyKey?: string;
|
|
2511
|
+
}
|
|
2512
|
+
declare class SupportService {
|
|
2513
|
+
private client;
|
|
2514
|
+
constructor(client: CimplifyClient);
|
|
2515
|
+
/** Open (or resume) the customer's widget conversation. */
|
|
2516
|
+
openConversation(opts?: IdempotencyOption): Promise<Result<ChatConversationResponse, CimplifyError>>;
|
|
2517
|
+
/** Send a message in the active conversation. */
|
|
2518
|
+
sendMessage(content: string, opts?: IdempotencyOption): Promise<Result<ChatMessage, CimplifyError>>;
|
|
2519
|
+
/** Poll for new messages since the given cursor. */
|
|
2520
|
+
getMessages(options?: {
|
|
2521
|
+
after?: string;
|
|
2522
|
+
limit?: number;
|
|
2523
|
+
}): Promise<Result<ChatMessage[], CimplifyError>>;
|
|
2420
2524
|
}
|
|
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
2525
|
|
|
2537
2526
|
declare class CimplifyElements {
|
|
2538
2527
|
private client;
|
|
@@ -2753,4 +2742,4 @@ declare class CimplifyClient {
|
|
|
2753
2742
|
}
|
|
2754
2743
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2755
2744
|
|
|
2756
|
-
export { type
|
|
2745
|
+
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 Service 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 Result as cS, type RetryEvent as cT, type RevokeAllSessionsResult as cU, type RevokeSessionResult as cV, type Room as cW, type SchedulingMetadata as cX, type SchedulingResult as cY, SchedulingService as cZ, type SenderType 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 ServiceAvailabilityParams as d0, type ServiceAvailabilityResult as d1, type ServiceCharge as d2, type ServiceNotes as d3, type ServiceScheduleRequest as d4, type ServiceStatus as d5, type SessionActivityData as d6, type SessionChangeEvent as d7, type SessionMessage as d8, type SlotResourceInfo 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 SlotStaffInfo as da, type Staff as db, type StaffAssignment as dc, type StaffRole as dd, type StaffScheduleItem as de, type StockLevel as df, type StockStatus as dg, type StoreCreditBalance as dh, StoreCreditQueries as di, type StorefrontBootstrap as dj, SubscriptionService as dk, SupportService as dl, type Table as dm, type TableInfo 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 };
|