arky-sdk 0.7.93 → 0.7.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -19
- package/dist/admin.cjs +2327 -0
- package/dist/admin.cjs.map +1 -0
- package/dist/admin.d.cts +3 -0
- package/dist/admin.d.ts +3 -0
- package/dist/admin.js +2325 -0
- package/dist/admin.js.map +1 -0
- package/dist/index.cjs +581 -585
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +447 -305
- package/dist/index.d.ts +447 -305
- package/dist/index.js +581 -585
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +1352 -0
- package/dist/storefront.cjs.map +1 -0
- package/dist/storefront.d.cts +3 -0
- package/dist/storefront.d.ts +3 -0
- package/dist/storefront.js +1349 -0
- package/dist/storefront.js.map +1 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2280 -2117
- package/dist/types.d.ts +2280 -2117
- package/dist/types.js.map +1 -1
- package/package.json +13 -5
package/dist/types.d.cts
CHANGED
|
@@ -1,2477 +1,2640 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
interface CreateLocationParams {
|
|
2
|
+
key: string;
|
|
3
|
+
address: Address;
|
|
4
|
+
is_pickup_location?: boolean;
|
|
4
5
|
}
|
|
5
|
-
interface
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
interface UpdateLocationParams {
|
|
7
|
+
id: string;
|
|
8
|
+
key: string;
|
|
9
|
+
address: Address;
|
|
10
|
+
is_pickup_location?: boolean;
|
|
10
11
|
}
|
|
11
|
-
interface
|
|
12
|
-
|
|
13
|
-
mode_snapshot?: string;
|
|
14
|
-
rate_bps: number;
|
|
15
|
-
lines: BookingPaymentTaxLine[];
|
|
12
|
+
interface DeleteLocationParams {
|
|
13
|
+
id: string;
|
|
16
14
|
}
|
|
17
|
-
interface
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
interface CreateMarketParams {
|
|
16
|
+
key: string;
|
|
17
|
+
currency: string;
|
|
18
|
+
tax_mode: 'inclusive' | 'exclusive';
|
|
19
|
+
payment_methods?: PaymentMethod[];
|
|
20
|
+
zones?: Zone[];
|
|
22
21
|
}
|
|
23
|
-
interface
|
|
22
|
+
interface UpdateMarketParams {
|
|
24
23
|
id: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
key?: string;
|
|
25
|
+
currency?: string;
|
|
26
|
+
tax_mode?: 'inclusive' | 'exclusive';
|
|
27
|
+
payment_methods?: PaymentMethod[];
|
|
28
|
+
zones?: Zone[];
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
type: 'stripe';
|
|
31
|
-
customer_id: string;
|
|
32
|
-
payment_intent_id?: string;
|
|
33
|
-
};
|
|
34
|
-
interface BookingPaymentRefund {
|
|
30
|
+
interface DeleteMarketParams {
|
|
35
31
|
id: string;
|
|
36
|
-
total: number;
|
|
37
|
-
provider_refund_id?: string;
|
|
38
|
-
status: string;
|
|
39
|
-
created_at: number;
|
|
40
|
-
}
|
|
41
|
-
interface BookingPayment {
|
|
42
|
-
currency: string;
|
|
43
|
-
market: string;
|
|
44
|
-
subtotal: number;
|
|
45
|
-
discount: number;
|
|
46
|
-
total: number;
|
|
47
|
-
paid: number;
|
|
48
|
-
tax?: BookingPaymentTax;
|
|
49
|
-
promo_code?: BookingPaymentPromoCode;
|
|
50
|
-
provider?: BookingPaymentProvider;
|
|
51
|
-
refunds: BookingPaymentRefund[];
|
|
52
|
-
payment_method_id?: string;
|
|
53
|
-
method_type: PaymentMethodType;
|
|
54
32
|
}
|
|
55
|
-
interface
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
33
|
+
interface RequestOptions<T = any> {
|
|
34
|
+
headers?: Record<string, string>;
|
|
35
|
+
params?: Record<string, any>;
|
|
36
|
+
transformRequest?: (data: any) => any;
|
|
37
|
+
onSuccess?: (ctx: {
|
|
38
|
+
data: T;
|
|
39
|
+
method: string;
|
|
40
|
+
url: string;
|
|
41
|
+
status: number;
|
|
42
|
+
request?: any;
|
|
43
|
+
duration_ms?: number;
|
|
44
|
+
request_id?: string | null;
|
|
45
|
+
}) => void | Promise<void>;
|
|
46
|
+
onError?: (ctx: {
|
|
47
|
+
error: any;
|
|
48
|
+
method: string;
|
|
49
|
+
url: string;
|
|
50
|
+
status?: number;
|
|
51
|
+
request?: any;
|
|
52
|
+
response?: any;
|
|
53
|
+
duration_ms?: number;
|
|
54
|
+
request_id?: string | null;
|
|
55
|
+
aborted?: boolean;
|
|
56
|
+
}) => void | Promise<void>;
|
|
60
57
|
}
|
|
61
|
-
interface
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
scope?: string;
|
|
58
|
+
interface EshopItem {
|
|
59
|
+
product_id: string;
|
|
60
|
+
variant_id: string;
|
|
61
|
+
quantity: number;
|
|
66
62
|
}
|
|
67
|
-
interface
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
interface EshopQuoteItem {
|
|
64
|
+
product_id: string;
|
|
65
|
+
variant_id: string;
|
|
66
|
+
quantity: number;
|
|
67
|
+
price?: Price;
|
|
72
68
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
created_at: number;
|
|
69
|
+
interface GetQuoteParams {
|
|
70
|
+
store_id?: string;
|
|
71
|
+
market?: string;
|
|
72
|
+
items: EshopQuoteItem[];
|
|
73
|
+
shipping_address?: Address;
|
|
74
|
+
forms?: FormEntry[];
|
|
75
|
+
payment_method_id?: string;
|
|
76
|
+
promo_code?: string;
|
|
77
|
+
shipping_method_id?: string;
|
|
78
|
+
location?: ZoneLocation;
|
|
84
79
|
}
|
|
85
|
-
interface
|
|
86
|
-
|
|
87
|
-
market
|
|
88
|
-
|
|
89
|
-
shipping: number;
|
|
90
|
-
discount: number;
|
|
91
|
-
total: number;
|
|
92
|
-
paid: number;
|
|
93
|
-
tax?: OrderPaymentTax;
|
|
94
|
-
promo_code?: OrderPaymentPromoCode;
|
|
95
|
-
provider?: OrderPaymentProvider;
|
|
96
|
-
refunds: OrderPaymentRefund[];
|
|
97
|
-
zone_id?: string;
|
|
80
|
+
interface OrderCheckoutParams {
|
|
81
|
+
store_id?: string;
|
|
82
|
+
market?: string;
|
|
83
|
+
items: EshopItem[];
|
|
98
84
|
payment_method_id?: string;
|
|
85
|
+
shipping_address?: Address;
|
|
86
|
+
billing_address?: Address;
|
|
87
|
+
forms?: FormEntry[];
|
|
88
|
+
promo_code_id?: string;
|
|
99
89
|
shipping_method_id?: string;
|
|
100
|
-
method_type: PaymentMethodType;
|
|
101
90
|
}
|
|
102
|
-
interface
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
91
|
+
interface GetProductsParams {
|
|
92
|
+
store_id?: string;
|
|
93
|
+
ids?: string[];
|
|
94
|
+
taxonomy_query?: TaxonomyQuery[];
|
|
95
|
+
match_all?: boolean;
|
|
96
|
+
status?: ProductStatus;
|
|
97
|
+
query?: string | number;
|
|
98
|
+
limit?: number;
|
|
99
|
+
cursor?: string;
|
|
100
|
+
sort_field?: string;
|
|
101
|
+
sort_direction?: 'asc' | 'desc';
|
|
102
|
+
created_at_from?: number | null;
|
|
103
|
+
created_at_to?: number | null;
|
|
107
104
|
}
|
|
108
|
-
interface
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
expires_at?: number;
|
|
105
|
+
interface GetNodesParams {
|
|
106
|
+
store_id?: string;
|
|
107
|
+
ids?: string[];
|
|
108
|
+
parent_id?: string;
|
|
109
|
+
key?: string;
|
|
110
|
+
limit?: number;
|
|
111
|
+
cursor?: string;
|
|
112
|
+
query?: string | number;
|
|
113
|
+
status?: NodeStatus;
|
|
114
|
+
sort_field?: string;
|
|
115
|
+
sort_direction?: 'asc' | 'desc';
|
|
116
|
+
created_at_from?: number;
|
|
117
|
+
created_at_to?: number;
|
|
122
118
|
}
|
|
123
|
-
interface
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
total: number;
|
|
131
|
-
shipping_method: ShippingMethod | null;
|
|
132
|
-
payment_method: PaymentMethod | null;
|
|
133
|
-
payment_methods: PaymentMethod[];
|
|
134
|
-
promo_code: PromoCodeValidation | null;
|
|
135
|
-
payment: OrderPayment;
|
|
136
|
-
charge_amount: number;
|
|
137
|
-
id?: string;
|
|
138
|
-
expires_at?: number;
|
|
119
|
+
interface CreateNodeParams {
|
|
120
|
+
store_id?: string;
|
|
121
|
+
key: string;
|
|
122
|
+
parent_id?: string | null;
|
|
123
|
+
blocks?: Block[];
|
|
124
|
+
taxonomies?: TaxonomyEntry[];
|
|
125
|
+
slug?: Record<string, string>;
|
|
139
126
|
}
|
|
140
|
-
interface
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
127
|
+
interface UpdateNodeParams {
|
|
128
|
+
id: string;
|
|
129
|
+
store_id?: string;
|
|
130
|
+
key?: string;
|
|
131
|
+
parent_id?: string | null;
|
|
132
|
+
blocks?: Block[];
|
|
133
|
+
taxonomies?: TaxonomyEntry[];
|
|
134
|
+
status?: NodeStatus;
|
|
135
|
+
slug?: Record<string, string>;
|
|
146
136
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
interface GetNodeParams {
|
|
138
|
+
id?: string;
|
|
139
|
+
slug?: string;
|
|
140
|
+
key?: string;
|
|
141
|
+
store_id?: string;
|
|
151
142
|
}
|
|
152
|
-
interface
|
|
153
|
-
type: string;
|
|
143
|
+
interface DeleteNodeParams {
|
|
154
144
|
id: string;
|
|
145
|
+
store_id?: string;
|
|
155
146
|
}
|
|
156
|
-
interface
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
providers: PriceProvider[];
|
|
147
|
+
interface GetNodeChildrenParams {
|
|
148
|
+
id: string;
|
|
149
|
+
store_id?: string;
|
|
150
|
+
limit?: number;
|
|
151
|
+
cursor?: string;
|
|
162
152
|
}
|
|
163
|
-
interface
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
street2?: string | null;
|
|
168
|
-
city: string;
|
|
169
|
-
state: string;
|
|
170
|
-
postal_code: string;
|
|
171
|
-
country: string;
|
|
172
|
-
phone?: string | null;
|
|
173
|
-
email?: string | null;
|
|
153
|
+
interface UploadStoreMediaParams {
|
|
154
|
+
store_id?: string;
|
|
155
|
+
files?: File[];
|
|
156
|
+
urls?: string[];
|
|
174
157
|
}
|
|
175
|
-
interface
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
lon: number;
|
|
179
|
-
} | null;
|
|
180
|
-
label?: string | null;
|
|
158
|
+
interface DeleteStoreMediaParams {
|
|
159
|
+
id: string;
|
|
160
|
+
media_id: string;
|
|
181
161
|
}
|
|
182
|
-
interface
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
city?: string | null;
|
|
186
|
-
postal_code?: string | null;
|
|
162
|
+
interface GetMediaParams {
|
|
163
|
+
media_id: string;
|
|
164
|
+
store_id?: string;
|
|
187
165
|
}
|
|
188
|
-
interface
|
|
166
|
+
interface UpdateMediaParams {
|
|
167
|
+
media_id: string;
|
|
168
|
+
store_id?: string;
|
|
169
|
+
slug?: Record<string, string>;
|
|
170
|
+
}
|
|
171
|
+
interface GetStoreMediaParams {
|
|
172
|
+
store_id?: string;
|
|
173
|
+
cursor?: string | null;
|
|
174
|
+
limit: number;
|
|
175
|
+
ids?: string[];
|
|
176
|
+
query?: string;
|
|
177
|
+
mime_type?: string;
|
|
178
|
+
sort_field?: string;
|
|
179
|
+
sort_direction?: 'asc' | 'desc';
|
|
180
|
+
}
|
|
181
|
+
interface LoginAccountParams {
|
|
182
|
+
email?: string;
|
|
183
|
+
provider: string;
|
|
184
|
+
token?: string;
|
|
185
|
+
}
|
|
186
|
+
interface MagicLinkRequestParams {
|
|
187
|
+
email: string;
|
|
188
|
+
store_id?: string;
|
|
189
|
+
}
|
|
190
|
+
interface MagicLinkVerifyParams {
|
|
191
|
+
email: string;
|
|
192
|
+
code: string;
|
|
193
|
+
}
|
|
194
|
+
interface GetServicesParams {
|
|
195
|
+
store_id?: string;
|
|
196
|
+
ids?: string[];
|
|
197
|
+
provider_id?: string;
|
|
198
|
+
limit?: number;
|
|
199
|
+
cursor?: string;
|
|
200
|
+
query?: string | number;
|
|
201
|
+
status?: BookingServiceStatus;
|
|
202
|
+
sort_field?: string;
|
|
203
|
+
sort_direction?: 'asc' | 'desc';
|
|
204
|
+
created_at_from?: number;
|
|
205
|
+
created_at_to?: number;
|
|
206
|
+
taxonomy_query?: TaxonomyQuery[];
|
|
207
|
+
match_all?: boolean;
|
|
208
|
+
from?: number;
|
|
209
|
+
to?: number;
|
|
210
|
+
}
|
|
211
|
+
interface BookingCreatePart {
|
|
212
|
+
service_id: string;
|
|
213
|
+
provider_id: string;
|
|
214
|
+
slots: SlotRange[];
|
|
215
|
+
forms: FormEntry[];
|
|
216
|
+
}
|
|
217
|
+
interface BookingCheckoutParams {
|
|
218
|
+
store_id?: string;
|
|
219
|
+
market?: string;
|
|
220
|
+
items: BookingCreatePart[];
|
|
221
|
+
payment_method_id?: string;
|
|
222
|
+
forms?: FormEntry[];
|
|
223
|
+
promo_code_id?: string;
|
|
224
|
+
}
|
|
225
|
+
interface SlotRange {
|
|
226
|
+
from: number;
|
|
227
|
+
to: number;
|
|
228
|
+
}
|
|
229
|
+
interface BookingQuoteItem {
|
|
230
|
+
service_id: string;
|
|
231
|
+
provider_id: string;
|
|
232
|
+
slots: SlotRange[];
|
|
233
|
+
price?: Price;
|
|
234
|
+
}
|
|
235
|
+
interface GetBookingQuoteParams {
|
|
236
|
+
store_id?: string;
|
|
237
|
+
market?: string;
|
|
238
|
+
items: BookingQuoteItem[];
|
|
239
|
+
payment_method_id?: string;
|
|
240
|
+
promo_code?: string;
|
|
241
|
+
}
|
|
242
|
+
interface TimelinePoint {
|
|
243
|
+
timestamp: number;
|
|
244
|
+
booked: number;
|
|
245
|
+
}
|
|
246
|
+
interface ProviderWithTimeline {
|
|
247
|
+
id: string;
|
|
248
|
+
key: string;
|
|
249
|
+
store_id: string;
|
|
250
|
+
slug: Record<string, string>;
|
|
251
|
+
status: BookingProviderStatus;
|
|
252
|
+
blocks: Block[];
|
|
253
|
+
taxonomies: TaxonomyEntry[];
|
|
254
|
+
created_at: number;
|
|
255
|
+
updated_at: number;
|
|
256
|
+
working_days?: WorkingDay[];
|
|
257
|
+
specific_dates?: SpecificDate[];
|
|
258
|
+
timeline: TimelinePoint[];
|
|
259
|
+
}
|
|
260
|
+
interface GetAnalyticsParams {
|
|
261
|
+
metrics?: string[];
|
|
262
|
+
period?: string;
|
|
263
|
+
start_date?: string;
|
|
264
|
+
end_date?: string;
|
|
265
|
+
interval?: string;
|
|
266
|
+
}
|
|
267
|
+
interface GetAnalyticsHealthParams {
|
|
268
|
+
}
|
|
269
|
+
interface TrackEmailOpenParams {
|
|
270
|
+
tracking_pixel_id: string;
|
|
271
|
+
}
|
|
272
|
+
interface GetDeliveryStatsParams {
|
|
273
|
+
}
|
|
274
|
+
type StoreRole = 'admin' | 'owner' | 'super';
|
|
275
|
+
interface Discount {
|
|
276
|
+
type: "items_percentage" | "items_fixed" | "shipping_percentage";
|
|
277
|
+
market_id: string;
|
|
278
|
+
bps?: number;
|
|
279
|
+
amount?: number;
|
|
280
|
+
}
|
|
281
|
+
interface Condition {
|
|
282
|
+
type: "products" | "services" | "min_order_amount" | "date_range" | "max_uses" | "max_uses_per_user";
|
|
283
|
+
value: string[] | number | {
|
|
284
|
+
start?: number;
|
|
285
|
+
end?: number;
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
interface CreatePromoCodeParams {
|
|
289
|
+
store_id?: string;
|
|
290
|
+
code: string;
|
|
291
|
+
discounts: Discount[];
|
|
292
|
+
conditions: Condition[];
|
|
293
|
+
}
|
|
294
|
+
interface UpdatePromoCodeParams {
|
|
295
|
+
id: string;
|
|
296
|
+
store_id?: string;
|
|
297
|
+
code: string;
|
|
298
|
+
discounts: Discount[];
|
|
299
|
+
conditions: Condition[];
|
|
300
|
+
status?: PromoCodeStatus;
|
|
301
|
+
}
|
|
302
|
+
interface DeletePromoCodeParams {
|
|
303
|
+
id: string;
|
|
304
|
+
store_id?: string;
|
|
305
|
+
}
|
|
306
|
+
interface GetPromoCodeParams {
|
|
307
|
+
id: string;
|
|
308
|
+
store_id?: string;
|
|
309
|
+
}
|
|
310
|
+
interface GetPromoCodesParams {
|
|
311
|
+
store_id?: string;
|
|
312
|
+
query?: string | number;
|
|
313
|
+
status?: PromoCodeStatus;
|
|
314
|
+
limit?: number;
|
|
315
|
+
cursor?: string;
|
|
316
|
+
sort_field?: string;
|
|
317
|
+
sort_direction?: 'asc' | 'desc';
|
|
318
|
+
created_at_from?: number;
|
|
319
|
+
created_at_to?: number;
|
|
320
|
+
starts_at_from?: number;
|
|
321
|
+
starts_at_to?: number;
|
|
322
|
+
expires_at_from?: number;
|
|
323
|
+
expires_at_to?: number;
|
|
324
|
+
}
|
|
325
|
+
interface CreateStoreParams {
|
|
326
|
+
key: string;
|
|
327
|
+
timezone: string;
|
|
328
|
+
billing_email: string;
|
|
329
|
+
languages?: Language[];
|
|
330
|
+
emails?: StoreEmails;
|
|
331
|
+
}
|
|
332
|
+
interface UpdateStoreParams {
|
|
333
|
+
id: string;
|
|
334
|
+
key?: string;
|
|
335
|
+
timezone?: string;
|
|
336
|
+
languages?: Language[];
|
|
337
|
+
emails?: StoreEmails;
|
|
338
|
+
}
|
|
339
|
+
interface DeleteStoreParams {
|
|
340
|
+
id: string;
|
|
341
|
+
}
|
|
342
|
+
interface GetStoreParams {
|
|
343
|
+
}
|
|
344
|
+
interface SubscribeParams {
|
|
345
|
+
store_id?: string;
|
|
346
|
+
plan_id: string;
|
|
347
|
+
success_url: string;
|
|
348
|
+
cancel_url: string;
|
|
349
|
+
}
|
|
350
|
+
interface CreatePortalSessionParams {
|
|
351
|
+
store_id?: string;
|
|
352
|
+
return_url: string;
|
|
353
|
+
}
|
|
354
|
+
interface InviteUserParams {
|
|
355
|
+
email: string;
|
|
356
|
+
role?: StoreRole;
|
|
357
|
+
}
|
|
358
|
+
interface RemoveMemberParams {
|
|
359
|
+
account_id: string;
|
|
360
|
+
}
|
|
361
|
+
interface HandleInvitationParams {
|
|
362
|
+
token: string;
|
|
363
|
+
action: string;
|
|
364
|
+
store_id?: string;
|
|
365
|
+
}
|
|
366
|
+
interface TestWebhookParams {
|
|
367
|
+
webhook: Webhook;
|
|
368
|
+
}
|
|
369
|
+
interface CreateProductVariantInput {
|
|
370
|
+
sku?: string;
|
|
371
|
+
prices: Price[];
|
|
372
|
+
inventory: ProductInventory[];
|
|
373
|
+
attributes: Block[];
|
|
374
|
+
weight?: number;
|
|
375
|
+
}
|
|
376
|
+
interface UpdateProductVariantInput {
|
|
377
|
+
id: string;
|
|
378
|
+
sku?: string | null;
|
|
379
|
+
prices?: Price[];
|
|
380
|
+
inventory?: ProductInventory[];
|
|
381
|
+
attributes?: Block[];
|
|
382
|
+
weight?: number | null;
|
|
383
|
+
}
|
|
384
|
+
interface CreateProductParams {
|
|
385
|
+
store_id?: string;
|
|
386
|
+
key: string;
|
|
387
|
+
slug?: Record<string, string>;
|
|
388
|
+
blocks?: Block[];
|
|
389
|
+
taxonomies?: TaxonomyEntry[];
|
|
390
|
+
variants?: CreateProductVariantInput[];
|
|
391
|
+
}
|
|
392
|
+
interface UpdateProductParams {
|
|
393
|
+
id: string;
|
|
394
|
+
store_id?: string;
|
|
395
|
+
key?: string;
|
|
396
|
+
slug?: Record<string, string>;
|
|
397
|
+
blocks?: Block[];
|
|
398
|
+
taxonomies?: TaxonomyEntry[];
|
|
399
|
+
variants?: UpdateProductVariantInput[];
|
|
400
|
+
status?: ProductStatus;
|
|
401
|
+
}
|
|
402
|
+
interface DeleteProductParams {
|
|
403
|
+
id: string;
|
|
404
|
+
store_id?: string;
|
|
405
|
+
}
|
|
406
|
+
interface GetProductParams {
|
|
407
|
+
id?: string;
|
|
408
|
+
slug?: string;
|
|
409
|
+
store_id?: string;
|
|
410
|
+
}
|
|
411
|
+
interface GetOrderParams {
|
|
189
412
|
id: string;
|
|
413
|
+
store_id?: string;
|
|
414
|
+
}
|
|
415
|
+
interface GetOrdersParams {
|
|
416
|
+
store_id?: string;
|
|
417
|
+
customer_id?: string;
|
|
418
|
+
item_statuses?: string[];
|
|
419
|
+
product_ids?: string[];
|
|
420
|
+
verified?: boolean;
|
|
421
|
+
query?: string | number | null;
|
|
422
|
+
limit?: number | null;
|
|
423
|
+
cursor?: string | null;
|
|
424
|
+
sort_field?: string | null;
|
|
425
|
+
sort_direction?: 'asc' | 'desc' | null;
|
|
426
|
+
created_at_from?: number | null;
|
|
427
|
+
created_at_to?: number | null;
|
|
428
|
+
audience_id?: string;
|
|
429
|
+
}
|
|
430
|
+
interface OrderUpdateItem {
|
|
190
431
|
product_id: string;
|
|
191
432
|
variant_id: string;
|
|
192
|
-
product_name: string;
|
|
193
|
-
product_slug: string;
|
|
194
|
-
variant_attributes: Record<string, any>;
|
|
195
|
-
price: Price;
|
|
196
433
|
quantity: number;
|
|
197
|
-
added_at: number;
|
|
198
|
-
max_stock?: number;
|
|
199
434
|
}
|
|
200
|
-
interface
|
|
435
|
+
interface UpdateOrderParams {
|
|
436
|
+
id: string;
|
|
437
|
+
store_id?: string;
|
|
438
|
+
confirm?: boolean;
|
|
439
|
+
cancel?: boolean;
|
|
440
|
+
shipping_address?: Address | null;
|
|
441
|
+
billing_address?: Address | null;
|
|
442
|
+
forms?: FormEntry[];
|
|
443
|
+
items?: OrderUpdateItem[];
|
|
444
|
+
payment?: OrderPayment;
|
|
445
|
+
}
|
|
446
|
+
interface CreateOrderParams {
|
|
447
|
+
store_id?: string;
|
|
448
|
+
market?: string;
|
|
449
|
+
customer_id?: string;
|
|
450
|
+
forms?: FormEntry[];
|
|
451
|
+
items: OrderUpdateItem[];
|
|
452
|
+
shipping_address?: Address;
|
|
453
|
+
billing_address?: Address;
|
|
454
|
+
}
|
|
455
|
+
interface CreateBookingParams {
|
|
456
|
+
store_id?: string;
|
|
457
|
+
market?: string;
|
|
458
|
+
customer_id?: string;
|
|
459
|
+
forms?: FormEntry[];
|
|
460
|
+
items: BookingCreatePart[];
|
|
461
|
+
payment_method_id?: string;
|
|
462
|
+
promo_code?: string;
|
|
463
|
+
}
|
|
464
|
+
interface BookingUpdateItem {
|
|
201
465
|
id: string;
|
|
202
466
|
service_id: string;
|
|
203
|
-
|
|
204
|
-
date: string;
|
|
467
|
+
provider_id: string;
|
|
205
468
|
from: number;
|
|
206
469
|
to: number;
|
|
207
|
-
|
|
208
|
-
provider_id?: string;
|
|
209
|
-
forms: any[];
|
|
470
|
+
forms: FormEntry[];
|
|
210
471
|
}
|
|
211
|
-
|
|
212
|
-
type: 'stripe';
|
|
213
|
-
secret_key?: string;
|
|
214
|
-
publishable_key: string;
|
|
215
|
-
webhook_secret?: string;
|
|
216
|
-
currency: string;
|
|
217
|
-
} | {
|
|
218
|
-
type: 'shippo';
|
|
219
|
-
api_token?: string;
|
|
220
|
-
} | {
|
|
221
|
-
type: 'google';
|
|
222
|
-
client_id?: string;
|
|
223
|
-
client_secret?: string;
|
|
224
|
-
access_token?: string;
|
|
225
|
-
refresh_token?: string;
|
|
226
|
-
token_expires_at?: number;
|
|
227
|
-
scopes: string[];
|
|
228
|
-
account_email?: string | null;
|
|
229
|
-
connected_at: number;
|
|
230
|
-
} | {
|
|
231
|
-
type: 'telegram_bot';
|
|
232
|
-
bot_token?: string;
|
|
233
|
-
} | {
|
|
234
|
-
type: 'deep_seek';
|
|
235
|
-
api_key?: string;
|
|
236
|
-
model?: string;
|
|
237
|
-
} | {
|
|
238
|
-
type: 'open_ai';
|
|
239
|
-
api_key?: string;
|
|
240
|
-
model?: string;
|
|
241
|
-
} | {
|
|
242
|
-
type: 'slack';
|
|
243
|
-
api_key?: string;
|
|
244
|
-
} | {
|
|
245
|
-
type: 'discord';
|
|
246
|
-
api_key?: string;
|
|
247
|
-
} | {
|
|
248
|
-
type: 'whats_app';
|
|
249
|
-
api_key?: string;
|
|
250
|
-
} | {
|
|
251
|
-
type: 'resend';
|
|
252
|
-
api_key?: string;
|
|
253
|
-
} | {
|
|
254
|
-
type: 'send_grid';
|
|
255
|
-
api_key?: string;
|
|
256
|
-
} | {
|
|
257
|
-
type: 'airtable';
|
|
258
|
-
api_key?: string;
|
|
259
|
-
} | {
|
|
260
|
-
type: 'linear';
|
|
261
|
-
api_key?: string;
|
|
262
|
-
} | {
|
|
263
|
-
type: 'git_hub';
|
|
264
|
-
api_key?: string;
|
|
265
|
-
} | {
|
|
266
|
-
type: 'git_lab';
|
|
267
|
-
api_key?: string;
|
|
268
|
-
} | {
|
|
269
|
-
type: 'dropbox';
|
|
270
|
-
api_key?: string;
|
|
271
|
-
} | {
|
|
272
|
-
type: 'hub_spot';
|
|
273
|
-
api_key?: string;
|
|
274
|
-
} | {
|
|
275
|
-
type: 'monday';
|
|
276
|
-
api_key?: string;
|
|
277
|
-
} | {
|
|
278
|
-
type: 'click_up';
|
|
279
|
-
api_key?: string;
|
|
280
|
-
} | {
|
|
281
|
-
type: 'pipedrive';
|
|
282
|
-
api_key?: string;
|
|
283
|
-
} | {
|
|
284
|
-
type: 'calendly';
|
|
285
|
-
api_key?: string;
|
|
286
|
-
} | {
|
|
287
|
-
type: 'typeform';
|
|
288
|
-
api_key?: string;
|
|
289
|
-
} | {
|
|
290
|
-
type: 'webflow';
|
|
291
|
-
api_key?: string;
|
|
292
|
-
} | {
|
|
293
|
-
type: 'trello';
|
|
294
|
-
api_key?: string;
|
|
295
|
-
} | {
|
|
296
|
-
type: 'replicate';
|
|
297
|
-
api_key?: string;
|
|
298
|
-
} | {
|
|
299
|
-
type: 'asana';
|
|
300
|
-
api_key?: string;
|
|
301
|
-
} | {
|
|
302
|
-
type: 'brevo';
|
|
303
|
-
api_key?: string;
|
|
304
|
-
} | {
|
|
305
|
-
type: 'intercom';
|
|
306
|
-
api_key?: string;
|
|
307
|
-
} | {
|
|
308
|
-
type: 'notion';
|
|
309
|
-
api_key?: string;
|
|
310
|
-
} | {
|
|
311
|
-
type: 'eleven_labs';
|
|
312
|
-
api_key?: string;
|
|
313
|
-
} | {
|
|
314
|
-
type: 'active_campaign';
|
|
315
|
-
api_key?: string;
|
|
316
|
-
account_url: string;
|
|
317
|
-
} | {
|
|
318
|
-
type: 'shopify';
|
|
319
|
-
api_key?: string;
|
|
320
|
-
store_domain: string;
|
|
321
|
-
} | {
|
|
322
|
-
type: 'supabase';
|
|
323
|
-
api_key?: string;
|
|
324
|
-
project_url: string;
|
|
325
|
-
} | {
|
|
326
|
-
type: 'mailchimp';
|
|
327
|
-
api_key?: string;
|
|
328
|
-
} | {
|
|
329
|
-
type: 'twilio';
|
|
330
|
-
account_sid?: string;
|
|
331
|
-
auth_token?: string;
|
|
332
|
-
} | {
|
|
333
|
-
type: 'jira';
|
|
334
|
-
email?: string;
|
|
335
|
-
api_token?: string;
|
|
336
|
-
domain: string;
|
|
337
|
-
} | {
|
|
338
|
-
type: 'woo_commerce';
|
|
339
|
-
consumer_key?: string;
|
|
340
|
-
consumer_secret?: string;
|
|
341
|
-
store_url: string;
|
|
342
|
-
} | {
|
|
343
|
-
type: 'freshdesk';
|
|
344
|
-
api_key?: string;
|
|
345
|
-
domain: string;
|
|
346
|
-
} | {
|
|
347
|
-
type: 'zendesk';
|
|
348
|
-
api_token?: string;
|
|
349
|
-
email?: string;
|
|
350
|
-
subdomain: string;
|
|
351
|
-
} | {
|
|
352
|
-
type: 'salesforce';
|
|
353
|
-
access_token?: string;
|
|
354
|
-
instance_url: string;
|
|
355
|
-
} | {
|
|
356
|
-
type: 'zoom';
|
|
357
|
-
api_key?: string;
|
|
358
|
-
} | {
|
|
359
|
-
type: 'microsoft_teams';
|
|
360
|
-
api_key?: string;
|
|
361
|
-
} | {
|
|
362
|
-
type: 'firebase';
|
|
363
|
-
api_key?: string;
|
|
364
|
-
} | {
|
|
365
|
-
type: 'arky';
|
|
366
|
-
api_key?: string;
|
|
367
|
-
} | {
|
|
368
|
-
type: 'vercel_deploy_hook';
|
|
369
|
-
url?: string;
|
|
370
|
-
} | {
|
|
371
|
-
type: 'netlify_deploy_hook';
|
|
372
|
-
url?: string;
|
|
373
|
-
} | {
|
|
374
|
-
type: 'cloudflare_deploy_hook';
|
|
375
|
-
url?: string;
|
|
376
|
-
} | {
|
|
377
|
-
type: 'custom_deploy_hook';
|
|
378
|
-
url?: string;
|
|
379
|
-
};
|
|
380
|
-
interface Integration {
|
|
472
|
+
interface UpdateBookingParams {
|
|
381
473
|
id: string;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
updated_at: number;
|
|
474
|
+
store_id?: string;
|
|
475
|
+
forms?: FormEntry[];
|
|
476
|
+
items?: BookingUpdateItem[];
|
|
477
|
+
payment?: BookingPayment;
|
|
387
478
|
}
|
|
388
|
-
interface
|
|
389
|
-
|
|
390
|
-
|
|
479
|
+
interface CreateProviderParams {
|
|
480
|
+
store_id?: string;
|
|
481
|
+
key: string;
|
|
482
|
+
slug?: Record<string, string>;
|
|
483
|
+
status?: BookingProviderStatus;
|
|
484
|
+
blocks?: Block[];
|
|
485
|
+
taxonomies?: TaxonomyEntry[];
|
|
391
486
|
}
|
|
392
|
-
interface
|
|
487
|
+
interface UpdateProviderParams {
|
|
393
488
|
id: string;
|
|
394
|
-
|
|
489
|
+
store_id?: string;
|
|
490
|
+
key?: string;
|
|
491
|
+
slug?: Record<string, string>;
|
|
492
|
+
status?: BookingProviderStatus;
|
|
493
|
+
blocks?: Block[];
|
|
494
|
+
taxonomies?: TaxonomyEntry[];
|
|
395
495
|
}
|
|
396
|
-
interface
|
|
496
|
+
interface DeleteProviderParams {
|
|
397
497
|
id: string;
|
|
398
|
-
|
|
399
|
-
eta_text: string;
|
|
400
|
-
location_id?: string;
|
|
401
|
-
integration_id?: string;
|
|
402
|
-
amount: number;
|
|
403
|
-
free_above?: number;
|
|
404
|
-
weight_tiers?: ShippingWeightTier[];
|
|
498
|
+
store_id?: string;
|
|
405
499
|
}
|
|
406
|
-
interface
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
updated_at: number;
|
|
500
|
+
interface ServiceProviderInput {
|
|
501
|
+
provider_id: string;
|
|
502
|
+
store_id?: string;
|
|
503
|
+
prices?: Price[];
|
|
504
|
+
durations?: ServiceDuration[];
|
|
505
|
+
working_days: WorkingDay[];
|
|
506
|
+
specific_dates: SpecificDate[];
|
|
414
507
|
}
|
|
415
|
-
interface
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
508
|
+
interface CreateServiceParams {
|
|
509
|
+
store_id?: string;
|
|
510
|
+
key: string;
|
|
511
|
+
slug?: Record<string, string>;
|
|
512
|
+
blocks?: Block[];
|
|
513
|
+
taxonomies?: TaxonomyEntry[];
|
|
514
|
+
location?: ZoneLocation;
|
|
515
|
+
status?: BookingServiceStatus;
|
|
419
516
|
}
|
|
420
|
-
interface
|
|
517
|
+
interface UpdateServiceParams {
|
|
421
518
|
id: string;
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
519
|
+
store_id?: string;
|
|
520
|
+
key?: string;
|
|
521
|
+
slug?: Record<string, string>;
|
|
522
|
+
blocks?: Block[];
|
|
523
|
+
taxonomies?: TaxonomyEntry[];
|
|
524
|
+
location?: ZoneLocation | null;
|
|
525
|
+
status?: BookingServiceStatus;
|
|
429
526
|
}
|
|
430
|
-
interface
|
|
527
|
+
interface CreateServiceProviderParams {
|
|
528
|
+
store_id?: string;
|
|
529
|
+
service_id: string;
|
|
530
|
+
provider_id: string;
|
|
531
|
+
working_days: WorkingDay[];
|
|
532
|
+
specific_dates: SpecificDate[];
|
|
533
|
+
prices?: Price[];
|
|
534
|
+
durations?: ServiceDuration[];
|
|
535
|
+
slot_interval: number;
|
|
536
|
+
forms?: FormEntry[];
|
|
537
|
+
reminders?: number[];
|
|
538
|
+
min_advance?: number;
|
|
539
|
+
max_advance?: number;
|
|
540
|
+
}
|
|
541
|
+
interface UpdateServiceProviderParams {
|
|
542
|
+
store_id?: string;
|
|
431
543
|
id: string;
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
544
|
+
working_days?: WorkingDay[];
|
|
545
|
+
specific_dates?: SpecificDate[];
|
|
546
|
+
prices?: Price[];
|
|
547
|
+
durations?: ServiceDuration[];
|
|
548
|
+
slot_interval?: number;
|
|
549
|
+
forms?: FormEntry[];
|
|
550
|
+
reminders?: number[];
|
|
551
|
+
min_advance?: number;
|
|
552
|
+
max_advance?: number;
|
|
440
553
|
}
|
|
441
|
-
interface
|
|
554
|
+
interface DeleteServiceProviderParams {
|
|
555
|
+
store_id?: string;
|
|
442
556
|
id: string;
|
|
443
557
|
}
|
|
444
|
-
interface
|
|
445
|
-
|
|
446
|
-
|
|
558
|
+
interface FindServiceProvidersParams {
|
|
559
|
+
store_id?: string;
|
|
560
|
+
service_id?: string;
|
|
561
|
+
provider_id?: string;
|
|
447
562
|
}
|
|
448
|
-
|
|
449
|
-
event: 'node.created';
|
|
450
|
-
parent_id?: string;
|
|
451
|
-
} | {
|
|
452
|
-
event: 'node.updated';
|
|
453
|
-
key?: string;
|
|
454
|
-
} | {
|
|
455
|
-
event: 'node.deleted';
|
|
456
|
-
key?: string;
|
|
457
|
-
} | {
|
|
458
|
-
event: 'order.created';
|
|
459
|
-
} | {
|
|
460
|
-
event: 'order.updated';
|
|
461
|
-
} | {
|
|
462
|
-
event: 'order.confirmed';
|
|
463
|
-
} | {
|
|
464
|
-
event: 'order.payment_received';
|
|
465
|
-
} | {
|
|
466
|
-
event: 'order.payment_failed';
|
|
467
|
-
} | {
|
|
468
|
-
event: 'order.refunded';
|
|
469
|
-
} | {
|
|
470
|
-
event: 'order.cancelled';
|
|
471
|
-
} | {
|
|
472
|
-
event: 'order.shipment_created';
|
|
473
|
-
} | {
|
|
474
|
-
event: 'order.shipment_in_transit';
|
|
475
|
-
} | {
|
|
476
|
-
event: 'order.shipment_out_for_delivery';
|
|
477
|
-
} | {
|
|
478
|
-
event: 'order.shipment_delivered';
|
|
479
|
-
} | {
|
|
480
|
-
event: 'order.shipment_failed';
|
|
481
|
-
} | {
|
|
482
|
-
event: 'order.shipment_returned';
|
|
483
|
-
} | {
|
|
484
|
-
event: 'order.shipment_status_changed';
|
|
485
|
-
} | {
|
|
486
|
-
event: 'booking.created';
|
|
487
|
-
} | {
|
|
488
|
-
event: 'booking.updated';
|
|
489
|
-
} | {
|
|
490
|
-
event: 'booking.payment_received';
|
|
491
|
-
} | {
|
|
492
|
-
event: 'booking.payment_failed';
|
|
493
|
-
} | {
|
|
494
|
-
event: 'booking.refunded';
|
|
495
|
-
} | {
|
|
496
|
-
event: 'booking.cancelled';
|
|
497
|
-
} | {
|
|
498
|
-
event: 'booking.item_cancelled';
|
|
499
|
-
} | {
|
|
500
|
-
event: 'booking.reminder';
|
|
501
|
-
} | {
|
|
502
|
-
event: 'product.created';
|
|
503
|
-
} | {
|
|
504
|
-
event: 'product.updated';
|
|
505
|
-
} | {
|
|
506
|
-
event: 'product.deleted';
|
|
507
|
-
} | {
|
|
508
|
-
event: 'provider.created';
|
|
509
|
-
} | {
|
|
510
|
-
event: 'provider.updated';
|
|
511
|
-
} | {
|
|
512
|
-
event: 'provider.deleted';
|
|
513
|
-
} | {
|
|
514
|
-
event: 'service.created';
|
|
515
|
-
} | {
|
|
516
|
-
event: 'service.updated';
|
|
517
|
-
} | {
|
|
518
|
-
event: 'service.deleted';
|
|
519
|
-
} | {
|
|
520
|
-
event: 'media.created';
|
|
521
|
-
} | {
|
|
522
|
-
event: 'media.deleted';
|
|
523
|
-
} | {
|
|
524
|
-
event: 'business.created';
|
|
525
|
-
} | {
|
|
526
|
-
event: 'business.updated';
|
|
527
|
-
} | {
|
|
528
|
-
event: 'business.deleted';
|
|
529
|
-
} | {
|
|
530
|
-
event: 'audience.created';
|
|
531
|
-
} | {
|
|
532
|
-
event: 'audience.updated';
|
|
533
|
-
} | {
|
|
534
|
-
event: 'audience.deleted';
|
|
535
|
-
};
|
|
536
|
-
interface Webhook {
|
|
563
|
+
interface DeleteServiceParams {
|
|
537
564
|
id: string;
|
|
538
|
-
|
|
539
|
-
key: string;
|
|
540
|
-
url: string;
|
|
541
|
-
events: WebhookEventSubscription[];
|
|
542
|
-
headers: Record<string, string>;
|
|
543
|
-
secret: string;
|
|
544
|
-
enabled: boolean;
|
|
545
|
-
created_at: number;
|
|
546
|
-
updated_at: number;
|
|
565
|
+
store_id?: string;
|
|
547
566
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
567
|
+
interface GetServiceParams {
|
|
568
|
+
id?: string;
|
|
569
|
+
slug?: string;
|
|
570
|
+
store_id?: string;
|
|
571
|
+
}
|
|
572
|
+
interface GetProvidersParams {
|
|
573
|
+
store_id?: string;
|
|
574
|
+
service_id?: string;
|
|
575
|
+
ids?: string[];
|
|
576
|
+
taxonomy_query?: TaxonomyQuery[];
|
|
577
|
+
match_all?: boolean;
|
|
578
|
+
query?: string | number | null;
|
|
579
|
+
status?: BookingProviderStatus;
|
|
580
|
+
limit?: number;
|
|
581
|
+
cursor?: string;
|
|
582
|
+
sort_field?: string | null;
|
|
583
|
+
sort_direction?: 'asc' | 'desc' | null;
|
|
584
|
+
created_at_from?: number | null;
|
|
585
|
+
created_at_to?: number | null;
|
|
586
|
+
from?: number;
|
|
587
|
+
to?: number;
|
|
588
|
+
}
|
|
589
|
+
interface GetProviderParams {
|
|
590
|
+
id?: string;
|
|
591
|
+
slug?: string;
|
|
592
|
+
store_id?: string;
|
|
560
593
|
}
|
|
561
|
-
interface
|
|
594
|
+
interface GetBookingParams {
|
|
562
595
|
id: string;
|
|
563
|
-
|
|
564
|
-
plan_id: string;
|
|
565
|
-
pending_plan_id: string | null;
|
|
566
|
-
payment: BusinessSubscriptionPayment;
|
|
567
|
-
status: BusinessSubscriptionStatus;
|
|
568
|
-
start_date: number;
|
|
569
|
-
end_date: number;
|
|
570
|
-
token: string;
|
|
571
|
-
source: BusinessSubscriptionSource;
|
|
596
|
+
store_id?: string;
|
|
572
597
|
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
subscription_id?: string;
|
|
579
|
-
price_id?: string;
|
|
580
|
-
};
|
|
581
|
-
interface AudienceSubscriptionPayment {
|
|
582
|
-
currency: string;
|
|
583
|
-
market: string;
|
|
584
|
-
provider?: AudienceSubscriptionProvider;
|
|
598
|
+
interface CancelBookingItemParams {
|
|
599
|
+
store_id?: string;
|
|
600
|
+
booking_id: string;
|
|
601
|
+
item_id: string;
|
|
602
|
+
reason?: string;
|
|
585
603
|
}
|
|
586
|
-
interface
|
|
604
|
+
interface SearchBookingsParams {
|
|
605
|
+
store_id?: string;
|
|
606
|
+
customer_id?: string;
|
|
607
|
+
service_ids?: string[];
|
|
608
|
+
provider_ids?: string[];
|
|
609
|
+
from?: number;
|
|
610
|
+
to?: number;
|
|
611
|
+
item_statuses?: string[];
|
|
612
|
+
sort_field?: string;
|
|
613
|
+
sort_order?: string;
|
|
614
|
+
limit?: number;
|
|
615
|
+
cursor?: string;
|
|
616
|
+
verified?: boolean;
|
|
617
|
+
query?: string | number;
|
|
618
|
+
audience_id?: string;
|
|
619
|
+
}
|
|
620
|
+
interface AccountAddress {
|
|
621
|
+
label?: string;
|
|
622
|
+
address: Address;
|
|
623
|
+
}
|
|
624
|
+
interface AccountApiToken {
|
|
587
625
|
id: string;
|
|
588
|
-
|
|
589
|
-
customer_id: string;
|
|
590
|
-
audience_id: string;
|
|
591
|
-
plan_id: string;
|
|
592
|
-
pending_plan_id: string | null;
|
|
593
|
-
payment: AudienceSubscriptionPayment;
|
|
594
|
-
status: AudienceSubscriptionStatus;
|
|
595
|
-
start_date: number;
|
|
596
|
-
end_date: number;
|
|
626
|
+
name: string;
|
|
597
627
|
token: string;
|
|
598
|
-
source: AudienceSubscriptionSource;
|
|
599
628
|
created_at: number;
|
|
600
|
-
|
|
629
|
+
last_used_at?: number;
|
|
601
630
|
}
|
|
602
|
-
interface
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
languages?: Language[];
|
|
607
|
-
emails?: BusinessEmails;
|
|
608
|
-
subscription?: BusinessSubscription;
|
|
609
|
-
counts?: Record<string, number>;
|
|
631
|
+
interface UpdateAccountProfileParams {
|
|
632
|
+
phone_numbers?: string[];
|
|
633
|
+
addresses?: AccountAddress[];
|
|
634
|
+
api_tokens?: AccountApiToken[] | null;
|
|
610
635
|
}
|
|
611
|
-
interface
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
loading: boolean;
|
|
617
|
-
error: string | null;
|
|
636
|
+
interface SearchAccountsParams {
|
|
637
|
+
limit?: number;
|
|
638
|
+
cursor?: string | null;
|
|
639
|
+
query?: string | number;
|
|
640
|
+
owner?: string;
|
|
618
641
|
}
|
|
619
|
-
interface
|
|
620
|
-
|
|
642
|
+
interface DeleteAccountParams {
|
|
643
|
+
}
|
|
644
|
+
interface TriggerNotificationParams {
|
|
645
|
+
channel: string;
|
|
646
|
+
store_id: string;
|
|
647
|
+
email_template_id?: string;
|
|
648
|
+
recipients?: string[];
|
|
649
|
+
audience_id?: string;
|
|
650
|
+
vars?: Record<string, any>;
|
|
651
|
+
}
|
|
652
|
+
interface GetEmailTemplatesParams {
|
|
653
|
+
store_id?: string;
|
|
654
|
+
ids?: string[];
|
|
655
|
+
key?: string;
|
|
656
|
+
limit?: number;
|
|
657
|
+
cursor?: string;
|
|
658
|
+
query?: string | number;
|
|
659
|
+
status?: EmailTemplateStatus;
|
|
660
|
+
sort_field?: string;
|
|
661
|
+
sort_direction?: "asc" | "desc";
|
|
662
|
+
created_at_from?: number;
|
|
663
|
+
created_at_to?: number;
|
|
664
|
+
}
|
|
665
|
+
interface CreateEmailTemplateParams {
|
|
666
|
+
store_id?: string;
|
|
621
667
|
key: string;
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
668
|
+
subject?: Record<string, string>;
|
|
669
|
+
body?: string;
|
|
670
|
+
from_name: string;
|
|
671
|
+
from_email: string;
|
|
672
|
+
reply_to?: string;
|
|
673
|
+
preheader?: string;
|
|
625
674
|
}
|
|
626
|
-
|
|
627
|
-
interface TaxonomySchema {
|
|
675
|
+
interface UpdateEmailTemplateParams {
|
|
628
676
|
id: string;
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
677
|
+
store_id?: string;
|
|
678
|
+
key?: string;
|
|
679
|
+
subject?: Record<string, string>;
|
|
680
|
+
body?: string;
|
|
681
|
+
from_name?: string;
|
|
682
|
+
from_email?: string;
|
|
683
|
+
reply_to?: string;
|
|
684
|
+
preheader?: string;
|
|
685
|
+
status?: EmailTemplateStatus;
|
|
634
686
|
}
|
|
635
|
-
interface
|
|
687
|
+
interface GetEmailTemplateParams {
|
|
688
|
+
id?: string;
|
|
689
|
+
key?: string;
|
|
690
|
+
store_id?: string;
|
|
691
|
+
}
|
|
692
|
+
interface DeleteEmailTemplateParams {
|
|
636
693
|
id: string;
|
|
637
|
-
|
|
638
|
-
type: TaxonomySchemaType;
|
|
639
|
-
value: any;
|
|
694
|
+
store_id?: string;
|
|
640
695
|
}
|
|
641
|
-
interface
|
|
696
|
+
interface GetFormsParams {
|
|
697
|
+
store_id?: string;
|
|
698
|
+
ids?: string[];
|
|
699
|
+
key?: string;
|
|
700
|
+
limit?: number;
|
|
701
|
+
cursor?: string;
|
|
702
|
+
query?: string | number;
|
|
703
|
+
status?: FormStatus;
|
|
704
|
+
sort_field?: string;
|
|
705
|
+
sort_direction?: "asc" | "desc";
|
|
706
|
+
created_at_from?: number;
|
|
707
|
+
created_at_to?: number;
|
|
708
|
+
}
|
|
709
|
+
interface CreateFormParams {
|
|
710
|
+
store_id?: string;
|
|
642
711
|
key: string;
|
|
643
|
-
|
|
644
|
-
operation?: string;
|
|
645
|
-
value: any;
|
|
646
|
-
center?: {
|
|
647
|
-
lat: number;
|
|
648
|
-
lon: number;
|
|
649
|
-
};
|
|
650
|
-
radius?: number;
|
|
712
|
+
schema?: FormSchema[];
|
|
651
713
|
}
|
|
652
|
-
interface
|
|
653
|
-
|
|
654
|
-
|
|
714
|
+
interface UpdateFormParams {
|
|
715
|
+
id: string;
|
|
716
|
+
store_id?: string;
|
|
717
|
+
key?: string;
|
|
718
|
+
schema?: FormSchema[];
|
|
719
|
+
status?: FormStatus;
|
|
655
720
|
}
|
|
656
|
-
interface
|
|
657
|
-
|
|
658
|
-
|
|
721
|
+
interface GetFormParams {
|
|
722
|
+
id?: string;
|
|
723
|
+
key?: string;
|
|
724
|
+
store_id?: string;
|
|
659
725
|
}
|
|
660
|
-
|
|
661
|
-
interface FormSchema {
|
|
726
|
+
interface DeleteFormParams {
|
|
662
727
|
id: string;
|
|
663
|
-
|
|
664
|
-
type: FormSchemaType;
|
|
665
|
-
required?: boolean;
|
|
666
|
-
min?: number | null;
|
|
667
|
-
max?: number | null;
|
|
668
|
-
options?: string[];
|
|
728
|
+
store_id?: string;
|
|
669
729
|
}
|
|
670
|
-
|
|
671
|
-
|
|
730
|
+
interface SubmitFormParams {
|
|
731
|
+
form_id: string;
|
|
732
|
+
store_id?: string;
|
|
733
|
+
fields: FormField[];
|
|
734
|
+
}
|
|
735
|
+
interface GetFormSubmissionsParams {
|
|
736
|
+
form_id: string;
|
|
737
|
+
store_id?: string;
|
|
738
|
+
query?: string | number;
|
|
739
|
+
limit?: number;
|
|
740
|
+
cursor?: string;
|
|
741
|
+
sort_field?: string;
|
|
742
|
+
sort_direction?: "asc" | "desc";
|
|
743
|
+
created_at_from?: number;
|
|
744
|
+
created_at_to?: number;
|
|
745
|
+
}
|
|
746
|
+
interface GetFormSubmissionParams {
|
|
672
747
|
id: string;
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
value?: any;
|
|
748
|
+
form_id: string;
|
|
749
|
+
store_id?: string;
|
|
676
750
|
}
|
|
677
|
-
interface
|
|
751
|
+
interface UpdateFormSubmissionParams {
|
|
752
|
+
id: string;
|
|
678
753
|
form_id: string;
|
|
754
|
+
store_id?: string;
|
|
679
755
|
fields: FormField[];
|
|
680
756
|
}
|
|
681
|
-
|
|
682
|
-
|
|
757
|
+
interface GetTaxonomiesParams {
|
|
758
|
+
store_id?: string;
|
|
759
|
+
parent_id?: string;
|
|
760
|
+
ids?: string[];
|
|
761
|
+
key?: string;
|
|
762
|
+
limit?: number;
|
|
763
|
+
cursor?: string;
|
|
764
|
+
query?: string | number;
|
|
765
|
+
status?: TaxonomyStatus;
|
|
766
|
+
sort_field?: string;
|
|
767
|
+
sort_direction?: "asc" | "desc";
|
|
768
|
+
created_at_from?: number;
|
|
769
|
+
created_at_to?: number;
|
|
683
770
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
771
|
+
interface CreateTaxonomyParams {
|
|
772
|
+
store_id?: string;
|
|
773
|
+
key: string;
|
|
774
|
+
parent_id?: string | null;
|
|
775
|
+
schema?: TaxonomySchema[];
|
|
689
776
|
}
|
|
690
|
-
|
|
691
|
-
interface MediaResolution {
|
|
777
|
+
interface UpdateTaxonomyParams {
|
|
692
778
|
id: string;
|
|
693
|
-
|
|
694
|
-
|
|
779
|
+
store_id?: string;
|
|
780
|
+
key?: string;
|
|
781
|
+
parent_id?: string | null;
|
|
782
|
+
schema?: TaxonomySchema[];
|
|
783
|
+
status?: TaxonomyStatus;
|
|
695
784
|
}
|
|
696
|
-
interface
|
|
785
|
+
interface GetTaxonomyParams {
|
|
786
|
+
id?: string;
|
|
787
|
+
key?: string;
|
|
788
|
+
store_id?: string;
|
|
789
|
+
}
|
|
790
|
+
interface DeleteTaxonomyParams {
|
|
697
791
|
id: string;
|
|
698
|
-
|
|
699
|
-
[key: string]: MediaResolution;
|
|
700
|
-
};
|
|
701
|
-
mime_type: string;
|
|
702
|
-
title?: string | null;
|
|
703
|
-
description?: string | null;
|
|
704
|
-
alt?: string | null;
|
|
705
|
-
entity: string;
|
|
706
|
-
metadata?: string | null;
|
|
707
|
-
created_at: number;
|
|
708
|
-
slug: Record<string, string>;
|
|
792
|
+
store_id?: string;
|
|
709
793
|
}
|
|
710
|
-
interface
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
794
|
+
interface GetTaxonomyChildrenParams {
|
|
795
|
+
id: string;
|
|
796
|
+
store_id?: string;
|
|
797
|
+
}
|
|
798
|
+
interface GetMeParams {
|
|
799
|
+
}
|
|
800
|
+
interface LogoutParams {
|
|
801
|
+
}
|
|
802
|
+
interface GetStoresParams {
|
|
803
|
+
query?: string | number;
|
|
804
|
+
limit?: number;
|
|
714
805
|
cursor?: string;
|
|
715
|
-
|
|
806
|
+
sort_field?: string;
|
|
807
|
+
sort_direction?: "asc" | "desc";
|
|
716
808
|
}
|
|
717
|
-
interface
|
|
718
|
-
data: T[];
|
|
719
|
-
meta?: {
|
|
720
|
-
total: number;
|
|
721
|
-
page: number;
|
|
722
|
-
per_page: number;
|
|
723
|
-
};
|
|
809
|
+
interface GetSubscriptionPlansParams {
|
|
724
810
|
}
|
|
725
|
-
interface
|
|
726
|
-
|
|
727
|
-
total_steps: number;
|
|
728
|
-
steps: Record<number, {
|
|
729
|
-
name: string;
|
|
730
|
-
label_key: string;
|
|
731
|
-
}>;
|
|
732
|
-
weekdays: string[];
|
|
733
|
-
month_year: string;
|
|
734
|
-
days: any[];
|
|
735
|
-
current: Date;
|
|
736
|
-
selected_date: string | null;
|
|
737
|
-
slots: any[];
|
|
738
|
-
selected_slot: any | null;
|
|
739
|
-
selected_provider: any | null;
|
|
740
|
-
providers: any[];
|
|
741
|
-
loading: boolean;
|
|
742
|
-
start_date: string | null;
|
|
743
|
-
end_date: string | null;
|
|
744
|
-
guest_token: string | null;
|
|
745
|
-
service: any | null;
|
|
746
|
-
business: Business | null;
|
|
747
|
-
currency: string;
|
|
748
|
-
booking_forms: FormEntry[];
|
|
749
|
-
api_url: string;
|
|
750
|
-
business_id: string;
|
|
751
|
-
timezone: string;
|
|
752
|
-
tz_groups: any;
|
|
753
|
-
items: BookingCartItem[];
|
|
754
|
-
allowed_payment_methods: string[];
|
|
755
|
-
payment_config: {
|
|
756
|
-
provider: {
|
|
757
|
-
publishable_key: string;
|
|
758
|
-
currency: string;
|
|
759
|
-
} | null;
|
|
760
|
-
enabled: boolean;
|
|
761
|
-
};
|
|
811
|
+
interface SetupAnalyticsParams {
|
|
812
|
+
store_id?: string;
|
|
762
813
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
type BookingCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
776
|
-
type OrderCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
777
|
-
type BookingItemStatus = {
|
|
778
|
-
status: 'pending';
|
|
779
|
-
expires_at: number;
|
|
780
|
-
} | {
|
|
781
|
-
status: 'confirmed';
|
|
782
|
-
} | {
|
|
783
|
-
status: 'cancelled';
|
|
784
|
-
reason: BookingCancellationReason;
|
|
785
|
-
};
|
|
786
|
-
type OrderItemStatus = {
|
|
787
|
-
status: 'pending';
|
|
788
|
-
expires_at: number;
|
|
789
|
-
} | {
|
|
790
|
-
status: 'confirmed';
|
|
791
|
-
} | {
|
|
792
|
-
status: 'cancelled';
|
|
793
|
-
reason: OrderCancellationReason;
|
|
794
|
-
};
|
|
795
|
-
type BookingPaymentStatus = {
|
|
796
|
-
status: 'pending';
|
|
797
|
-
at: number;
|
|
798
|
-
} | {
|
|
799
|
-
status: 'authorized';
|
|
800
|
-
at: number;
|
|
801
|
-
amount: number;
|
|
802
|
-
} | {
|
|
803
|
-
status: 'captured';
|
|
804
|
-
at: number;
|
|
805
|
-
amount: number;
|
|
806
|
-
} | {
|
|
807
|
-
status: 'failed';
|
|
808
|
-
at: number;
|
|
809
|
-
reason?: string;
|
|
810
|
-
};
|
|
811
|
-
type OrderPaymentStatus = {
|
|
812
|
-
status: 'pending';
|
|
813
|
-
at: number;
|
|
814
|
-
} | {
|
|
815
|
-
status: 'authorized';
|
|
816
|
-
at: number;
|
|
814
|
+
interface GetStoreMediaParams2 {
|
|
815
|
+
id: string;
|
|
816
|
+
cursor?: string | null;
|
|
817
|
+
limit: number;
|
|
818
|
+
ids?: string[];
|
|
819
|
+
query?: string | number;
|
|
820
|
+
mime_type?: string;
|
|
821
|
+
sort_field?: string;
|
|
822
|
+
sort_direction?: 'asc' | 'desc';
|
|
823
|
+
}
|
|
824
|
+
interface ProcessBookingRefundParams {
|
|
825
|
+
id: string;
|
|
817
826
|
amount: number;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
|
|
827
|
+
}
|
|
828
|
+
interface ProcessOrderRefundParams {
|
|
829
|
+
id: string;
|
|
821
830
|
amount: number;
|
|
822
|
-
} | {
|
|
823
|
-
status: 'failed';
|
|
824
|
-
at: number;
|
|
825
|
-
reason?: string;
|
|
826
|
-
};
|
|
827
|
-
interface BookingItemSnapshot {
|
|
828
|
-
service_key: string;
|
|
829
|
-
provider_key: string;
|
|
830
|
-
price: Price;
|
|
831
831
|
}
|
|
832
|
-
|
|
832
|
+
type SystemTemplateKey = "system:booking-store-update" | "system:booking-customer-update" | "system:user-invitation" | "system:order-status-update" | "system:user-confirmation" | "system:forgot-password";
|
|
833
|
+
interface GetAvailabilityParams {
|
|
834
|
+
store_id?: string;
|
|
835
|
+
service_id: string;
|
|
833
836
|
from: number;
|
|
834
837
|
to: number;
|
|
838
|
+
provider_id?: string;
|
|
835
839
|
}
|
|
836
|
-
interface
|
|
837
|
-
id: string;
|
|
838
|
-
service_id: string;
|
|
839
|
-
provider_id: string;
|
|
840
|
-
business_id: string;
|
|
841
|
-
booking_id: string;
|
|
840
|
+
interface AvailabilitySlot {
|
|
842
841
|
from: number;
|
|
843
842
|
to: number;
|
|
844
|
-
|
|
845
|
-
snapshot: BookingItemSnapshot;
|
|
846
|
-
status: BookingItemStatus;
|
|
843
|
+
spots: number;
|
|
847
844
|
}
|
|
848
|
-
interface
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
customer_id: string;
|
|
852
|
-
verified: boolean;
|
|
853
|
-
forms: FormEntry[];
|
|
854
|
-
business_id: string;
|
|
855
|
-
service_ids: string[];
|
|
856
|
-
provider_ids: string[];
|
|
857
|
-
payment: BookingPayment;
|
|
858
|
-
business?: Business;
|
|
859
|
-
account?: any;
|
|
860
|
-
items: BookingItem[];
|
|
861
|
-
audience_id?: string;
|
|
862
|
-
history?: {
|
|
863
|
-
action: string;
|
|
864
|
-
reason?: string;
|
|
865
|
-
timestamp: number;
|
|
866
|
-
}[];
|
|
867
|
-
fired_reminders: number[];
|
|
868
|
-
created_at: number;
|
|
869
|
-
last_modified: number;
|
|
845
|
+
interface DaySlots {
|
|
846
|
+
date: string;
|
|
847
|
+
slots: AvailabilitySlot[];
|
|
870
848
|
}
|
|
871
|
-
interface
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
parent_id?: string | null;
|
|
876
|
-
blocks: Block[];
|
|
877
|
-
taxonomies: TaxonomyEntry[];
|
|
878
|
-
status: NodeStatus;
|
|
879
|
-
slug: Record<string, string>;
|
|
880
|
-
children: Node[];
|
|
881
|
-
created_at: number;
|
|
882
|
-
updated_at: number;
|
|
849
|
+
interface ProviderAvailability {
|
|
850
|
+
provider_id: string;
|
|
851
|
+
provider_key: string;
|
|
852
|
+
days: DaySlots[];
|
|
883
853
|
}
|
|
884
|
-
interface
|
|
854
|
+
interface AvailabilityResponse {
|
|
855
|
+
from: number;
|
|
856
|
+
to: number;
|
|
857
|
+
providers: ProviderAvailability[];
|
|
858
|
+
}
|
|
859
|
+
interface Slot {
|
|
885
860
|
id: string;
|
|
861
|
+
service_id: string;
|
|
862
|
+
provider_id: string;
|
|
863
|
+
from: number;
|
|
864
|
+
to: number;
|
|
865
|
+
time_text: string;
|
|
866
|
+
date_text: string;
|
|
867
|
+
}
|
|
868
|
+
interface CreateWorkflowParams {
|
|
869
|
+
store_id?: string;
|
|
886
870
|
key: string;
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
from_email: string;
|
|
892
|
-
reply_to?: string;
|
|
893
|
-
preheader?: string;
|
|
894
|
-
status: EmailTemplateStatus;
|
|
895
|
-
created_at: number;
|
|
896
|
-
updated_at: number;
|
|
871
|
+
status?: WorkflowStatus;
|
|
872
|
+
nodes: Record<string, WorkflowNode>;
|
|
873
|
+
edges: WorkflowEdge[];
|
|
874
|
+
schedule?: string;
|
|
897
875
|
}
|
|
898
|
-
interface
|
|
876
|
+
interface UpdateWorkflowParams {
|
|
899
877
|
id: string;
|
|
878
|
+
store_id?: string;
|
|
900
879
|
key: string;
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
updated_at: number;
|
|
880
|
+
status?: WorkflowStatus;
|
|
881
|
+
nodes: Record<string, WorkflowNode>;
|
|
882
|
+
edges: WorkflowEdge[];
|
|
883
|
+
schedule?: string;
|
|
906
884
|
}
|
|
907
|
-
interface
|
|
885
|
+
interface DeleteWorkflowParams {
|
|
908
886
|
id: string;
|
|
909
|
-
|
|
910
|
-
business_id: string;
|
|
911
|
-
fields: FormField[];
|
|
912
|
-
created_at: number;
|
|
887
|
+
store_id?: string;
|
|
913
888
|
}
|
|
914
|
-
interface
|
|
889
|
+
interface GetWorkflowParams {
|
|
915
890
|
id: string;
|
|
916
|
-
|
|
917
|
-
business_id: string;
|
|
918
|
-
parent_id?: string | null;
|
|
919
|
-
schema?: TaxonomySchema[];
|
|
920
|
-
status: TaxonomyStatus;
|
|
921
|
-
created_at: number;
|
|
922
|
-
updated_at: number;
|
|
891
|
+
store_id?: string;
|
|
923
892
|
}
|
|
924
|
-
interface
|
|
925
|
-
|
|
926
|
-
|
|
893
|
+
interface GetWorkflowsParams {
|
|
894
|
+
store_id?: string;
|
|
895
|
+
ids?: string[];
|
|
896
|
+
query?: string | number;
|
|
897
|
+
status?: WorkflowStatus;
|
|
898
|
+
limit?: number;
|
|
899
|
+
cursor?: string;
|
|
900
|
+
sort_field?: string;
|
|
901
|
+
sort_direction?: 'asc' | 'desc';
|
|
902
|
+
created_at_from?: number;
|
|
903
|
+
created_at_to?: number;
|
|
927
904
|
}
|
|
928
|
-
interface
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
prices: Price[];
|
|
932
|
-
durations: ServiceDuration[];
|
|
933
|
-
audience_ids: string[];
|
|
934
|
-
working_days: Array<{
|
|
935
|
-
day: string;
|
|
936
|
-
working_hours: Array<{
|
|
937
|
-
from: number;
|
|
938
|
-
to: number;
|
|
939
|
-
}>;
|
|
940
|
-
}>;
|
|
941
|
-
specific_dates: Array<{
|
|
942
|
-
date: number;
|
|
943
|
-
working_hours: Array<{
|
|
944
|
-
from: number;
|
|
945
|
-
to: number;
|
|
946
|
-
}>;
|
|
947
|
-
}>;
|
|
948
|
-
slot_interval: number;
|
|
949
|
-
min_advance: number;
|
|
950
|
-
max_advance: number;
|
|
951
|
-
reminders: number[];
|
|
952
|
-
forms?: FormEntry[];
|
|
905
|
+
interface TriggerWorkflowParams {
|
|
906
|
+
secret: string;
|
|
907
|
+
input?: Record<string, unknown>;
|
|
953
908
|
}
|
|
954
|
-
interface
|
|
955
|
-
|
|
909
|
+
interface GetWorkflowExecutionsParams {
|
|
910
|
+
workflow_id: string;
|
|
911
|
+
store_id?: string;
|
|
912
|
+
status?: ExecutionStatus;
|
|
913
|
+
limit?: number;
|
|
914
|
+
cursor?: string;
|
|
915
|
+
}
|
|
916
|
+
interface GetWorkflowExecutionParams {
|
|
917
|
+
workflow_id: string;
|
|
918
|
+
execution_id: string;
|
|
919
|
+
store_id?: string;
|
|
920
|
+
}
|
|
921
|
+
interface CreateAudienceParams {
|
|
956
922
|
key: string;
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
blocks: Block[];
|
|
960
|
-
taxonomies: TaxonomyEntry[];
|
|
961
|
-
created_at: number;
|
|
962
|
-
updated_at: number;
|
|
963
|
-
status: BookingServiceStatus;
|
|
923
|
+
type?: AudienceType;
|
|
924
|
+
confirm_template_id?: string;
|
|
964
925
|
}
|
|
965
|
-
interface
|
|
966
|
-
|
|
967
|
-
|
|
926
|
+
interface UpdateAudienceParams {
|
|
927
|
+
id: string;
|
|
928
|
+
key?: string;
|
|
929
|
+
status?: AudienceStatus;
|
|
930
|
+
confirm_template_id?: string;
|
|
931
|
+
}
|
|
932
|
+
interface GetAudienceParams {
|
|
933
|
+
id?: string;
|
|
934
|
+
key?: string;
|
|
935
|
+
}
|
|
936
|
+
interface GetAudiencesParams {
|
|
937
|
+
store_id?: string;
|
|
938
|
+
ids?: string[];
|
|
939
|
+
status?: AudienceStatus;
|
|
940
|
+
query?: string | number;
|
|
941
|
+
limit?: number;
|
|
942
|
+
cursor?: string;
|
|
968
943
|
}
|
|
969
|
-
interface
|
|
944
|
+
interface SubscribeAudienceParams {
|
|
970
945
|
id: string;
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
blocks: Block[];
|
|
977
|
-
taxonomies: TaxonomyEntry[];
|
|
978
|
-
timeline: ProviderTimelinePoint[];
|
|
979
|
-
created_at: number;
|
|
980
|
-
updated_at: number;
|
|
946
|
+
customer_id: string;
|
|
947
|
+
price_id?: string;
|
|
948
|
+
success_url?: string;
|
|
949
|
+
cancel_url?: string;
|
|
950
|
+
confirm_url?: string;
|
|
981
951
|
}
|
|
982
|
-
interface
|
|
983
|
-
|
|
984
|
-
target: string;
|
|
985
|
-
output: string;
|
|
986
|
-
back_edge: boolean;
|
|
952
|
+
interface DeleteAudienceParams {
|
|
953
|
+
id: string;
|
|
987
954
|
}
|
|
988
|
-
interface
|
|
955
|
+
interface GetAudienceSubscribersParams {
|
|
989
956
|
id: string;
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
secret: string;
|
|
993
|
-
status: WorkflowStatus;
|
|
994
|
-
nodes: Record<string, WorkflowNode>;
|
|
995
|
-
edges: WorkflowEdge[];
|
|
996
|
-
schedule?: string;
|
|
997
|
-
created_at: number;
|
|
998
|
-
updated_at: number;
|
|
957
|
+
limit?: number;
|
|
958
|
+
cursor?: string;
|
|
999
959
|
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
960
|
+
interface AudienceSubscriber {
|
|
961
|
+
customer_id: string;
|
|
962
|
+
email: string;
|
|
963
|
+
subscribed_at?: number;
|
|
964
|
+
source?: AudienceSubscriptionSource;
|
|
965
|
+
status?: AudienceSubscriptionStatus;
|
|
1006
966
|
}
|
|
1007
|
-
interface
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
url: string;
|
|
1011
|
-
headers?: Record<string, string>;
|
|
1012
|
-
body?: any;
|
|
1013
|
-
timeout_ms?: number;
|
|
1014
|
-
integration_id?: string;
|
|
1015
|
-
integration_provider_id?: string;
|
|
1016
|
-
delay_ms?: number;
|
|
1017
|
-
retries?: number;
|
|
1018
|
-
retry_delay_ms?: number;
|
|
967
|
+
interface RemoveAudienceSubscriberParams {
|
|
968
|
+
id: string;
|
|
969
|
+
customer_id: string;
|
|
1019
970
|
}
|
|
1020
|
-
interface
|
|
1021
|
-
|
|
971
|
+
interface AddAudienceSubscriberParams {
|
|
972
|
+
id: string;
|
|
973
|
+
customer_id: string;
|
|
1022
974
|
}
|
|
1023
|
-
interface
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
delay_ms?: number;
|
|
975
|
+
interface AddAudienceSubscriberResponse {
|
|
976
|
+
subscriber: AudienceSubscriber | null;
|
|
977
|
+
skipped: boolean;
|
|
1027
978
|
}
|
|
1028
|
-
interface
|
|
1029
|
-
|
|
979
|
+
interface OAuthConnectParams {
|
|
980
|
+
store_id: string;
|
|
981
|
+
provider: string;
|
|
1030
982
|
code: string;
|
|
1031
|
-
|
|
983
|
+
redirect_uri: string;
|
|
1032
984
|
}
|
|
1033
|
-
interface
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
delay_ms?: number;
|
|
985
|
+
interface OAuthDisconnectParams {
|
|
986
|
+
store_id: string;
|
|
987
|
+
provider: string;
|
|
1037
988
|
}
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
interface NodeResult {
|
|
1041
|
-
output: any;
|
|
1042
|
-
route: string;
|
|
1043
|
-
started_at: number;
|
|
1044
|
-
completed_at: number;
|
|
1045
|
-
duration_ms: number;
|
|
1046
|
-
error?: string;
|
|
989
|
+
interface ListIntegrationsParams {
|
|
990
|
+
store_id: string;
|
|
1047
991
|
}
|
|
1048
|
-
interface
|
|
992
|
+
interface GetIntegrationParams {
|
|
993
|
+
store_id: string;
|
|
1049
994
|
id: string;
|
|
1050
|
-
workflow_id: string;
|
|
1051
|
-
business_id: string;
|
|
1052
|
-
status: ExecutionStatus;
|
|
1053
|
-
input: Record<string, any>;
|
|
1054
|
-
results: Record<string, NodeResult>;
|
|
1055
|
-
error?: string;
|
|
1056
|
-
scheduled_at: number;
|
|
1057
|
-
started_at: number;
|
|
1058
|
-
completed_at?: number;
|
|
1059
|
-
created_at: number;
|
|
1060
|
-
updated_at: number;
|
|
1061
995
|
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
} | {
|
|
1065
|
-
type: 'confirmation';
|
|
1066
|
-
confirm_template_id: string;
|
|
1067
|
-
} | {
|
|
1068
|
-
type: 'paid';
|
|
1069
|
-
prices: SubscriptionPrice[];
|
|
1070
|
-
payment_integration_id?: string;
|
|
1071
|
-
};
|
|
1072
|
-
interface Audience {
|
|
1073
|
-
id: string;
|
|
1074
|
-
business_id: string;
|
|
996
|
+
interface CreateIntegrationParams {
|
|
997
|
+
store_id: string;
|
|
1075
998
|
key: string;
|
|
1076
|
-
|
|
1077
|
-
type: AudienceType;
|
|
1078
|
-
}
|
|
1079
|
-
interface AudienceAccessResponse {
|
|
1080
|
-
has_access: boolean;
|
|
1081
|
-
subscription?: AudienceSubscription;
|
|
999
|
+
provider: IntegrationProvider;
|
|
1082
1000
|
}
|
|
1083
|
-
interface
|
|
1084
|
-
|
|
1085
|
-
|
|
1001
|
+
interface UpdateIntegrationParams {
|
|
1002
|
+
store_id: string;
|
|
1003
|
+
id: string;
|
|
1004
|
+
key?: string;
|
|
1005
|
+
provider?: IntegrationProvider;
|
|
1086
1006
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
} | {
|
|
1090
|
-
action: 'order_updated';
|
|
1091
|
-
} | {
|
|
1092
|
-
action: 'order_confirmed';
|
|
1093
|
-
} | {
|
|
1094
|
-
action: 'order_payment_received';
|
|
1095
|
-
data: {
|
|
1096
|
-
amount: number;
|
|
1097
|
-
currency: string;
|
|
1098
|
-
};
|
|
1099
|
-
} | {
|
|
1100
|
-
action: 'order_payment_failed';
|
|
1101
|
-
data: {
|
|
1102
|
-
reason?: string;
|
|
1103
|
-
};
|
|
1104
|
-
} | {
|
|
1105
|
-
action: 'order_refunded';
|
|
1106
|
-
data: {
|
|
1107
|
-
amount: number;
|
|
1108
|
-
currency: string;
|
|
1109
|
-
reason?: string;
|
|
1110
|
-
};
|
|
1111
|
-
} | {
|
|
1112
|
-
action: 'order_cancelled';
|
|
1113
|
-
data: {
|
|
1114
|
-
reason?: string;
|
|
1115
|
-
};
|
|
1116
|
-
} | {
|
|
1117
|
-
action: 'order_shipment_created';
|
|
1118
|
-
data: {
|
|
1119
|
-
shipment_id: string;
|
|
1120
|
-
};
|
|
1121
|
-
} | {
|
|
1122
|
-
action: 'order_shipment_in_transit';
|
|
1123
|
-
data: {
|
|
1124
|
-
shipment_id: string;
|
|
1125
|
-
};
|
|
1126
|
-
} | {
|
|
1127
|
-
action: 'order_shipment_out_for_delivery';
|
|
1128
|
-
data: {
|
|
1129
|
-
shipment_id: string;
|
|
1130
|
-
};
|
|
1131
|
-
} | {
|
|
1132
|
-
action: 'order_shipment_delivered';
|
|
1133
|
-
data: {
|
|
1134
|
-
shipment_id: string;
|
|
1135
|
-
};
|
|
1136
|
-
} | {
|
|
1137
|
-
action: 'order_shipment_failed';
|
|
1138
|
-
data: {
|
|
1139
|
-
shipment_id: string;
|
|
1140
|
-
reason?: string;
|
|
1141
|
-
};
|
|
1142
|
-
} | {
|
|
1143
|
-
action: 'order_shipment_returned';
|
|
1144
|
-
data: {
|
|
1145
|
-
shipment_id: string;
|
|
1146
|
-
};
|
|
1147
|
-
} | {
|
|
1148
|
-
action: 'order_shipment_status_changed';
|
|
1149
|
-
data: {
|
|
1150
|
-
shipment_id: string;
|
|
1151
|
-
from: string;
|
|
1152
|
-
to: string;
|
|
1153
|
-
};
|
|
1154
|
-
} | {
|
|
1155
|
-
action: 'booking_created';
|
|
1156
|
-
} | {
|
|
1157
|
-
action: 'booking_updated';
|
|
1158
|
-
} | {
|
|
1159
|
-
action: 'booking_payment_received';
|
|
1160
|
-
data: {
|
|
1161
|
-
amount: number;
|
|
1162
|
-
currency: string;
|
|
1163
|
-
};
|
|
1164
|
-
} | {
|
|
1165
|
-
action: 'booking_payment_failed';
|
|
1166
|
-
data: {
|
|
1167
|
-
reason?: string;
|
|
1168
|
-
};
|
|
1169
|
-
} | {
|
|
1170
|
-
action: 'booking_refunded';
|
|
1171
|
-
data: {
|
|
1172
|
-
amount: number;
|
|
1173
|
-
currency: string;
|
|
1174
|
-
reason?: string;
|
|
1175
|
-
};
|
|
1176
|
-
} | {
|
|
1177
|
-
action: 'booking_cancelled';
|
|
1178
|
-
data: {
|
|
1179
|
-
reason?: string;
|
|
1180
|
-
};
|
|
1181
|
-
} | {
|
|
1182
|
-
action: 'booking_item_cancelled';
|
|
1183
|
-
data: {
|
|
1184
|
-
item_id: string;
|
|
1185
|
-
refund_amount: number;
|
|
1186
|
-
};
|
|
1187
|
-
} | {
|
|
1188
|
-
action: 'product_created';
|
|
1189
|
-
} | {
|
|
1190
|
-
action: 'product_updated';
|
|
1191
|
-
} | {
|
|
1192
|
-
action: 'product_deleted';
|
|
1193
|
-
} | {
|
|
1194
|
-
action: 'node_created';
|
|
1195
|
-
} | {
|
|
1196
|
-
action: 'node_updated';
|
|
1197
|
-
} | {
|
|
1198
|
-
action: 'node_deleted';
|
|
1199
|
-
} | {
|
|
1200
|
-
action: 'provider_created';
|
|
1201
|
-
} | {
|
|
1202
|
-
action: 'provider_updated';
|
|
1203
|
-
} | {
|
|
1204
|
-
action: 'provider_deleted';
|
|
1205
|
-
} | {
|
|
1206
|
-
action: 'service_created';
|
|
1207
|
-
} | {
|
|
1208
|
-
action: 'service_updated';
|
|
1209
|
-
} | {
|
|
1210
|
-
action: 'service_deleted';
|
|
1211
|
-
} | {
|
|
1212
|
-
action: 'account_created';
|
|
1213
|
-
} | {
|
|
1214
|
-
action: 'account_updated';
|
|
1215
|
-
} | {
|
|
1216
|
-
action: 'account_deleted';
|
|
1217
|
-
} | {
|
|
1218
|
-
action: 'media_created';
|
|
1219
|
-
} | {
|
|
1220
|
-
action: 'media_deleted';
|
|
1221
|
-
} | {
|
|
1222
|
-
action: 'business_created';
|
|
1223
|
-
} | {
|
|
1224
|
-
action: 'business_updated';
|
|
1225
|
-
} | {
|
|
1226
|
-
action: 'business_deleted';
|
|
1227
|
-
} | {
|
|
1228
|
-
action: 'audience_created';
|
|
1229
|
-
} | {
|
|
1230
|
-
action: 'audience_updated';
|
|
1231
|
-
} | {
|
|
1232
|
-
action: 'audience_deleted';
|
|
1233
|
-
};
|
|
1234
|
-
interface Event {
|
|
1007
|
+
interface DeleteIntegrationParams {
|
|
1008
|
+
store_id: string;
|
|
1235
1009
|
id: string;
|
|
1236
|
-
entity: string;
|
|
1237
|
-
event: EventAction;
|
|
1238
|
-
actor: string;
|
|
1239
|
-
created_at: number;
|
|
1240
1010
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
carrier: string;
|
|
1244
|
-
service: string;
|
|
1245
|
-
tracking_number?: string | null;
|
|
1246
|
-
tracking_url?: string | null;
|
|
1247
|
-
label_url?: string | null;
|
|
1248
|
-
status: ShippingStatus;
|
|
1011
|
+
interface ListWebhooksParams {
|
|
1012
|
+
store_id: string;
|
|
1249
1013
|
}
|
|
1250
|
-
interface
|
|
1251
|
-
|
|
1252
|
-
|
|
1014
|
+
interface CreateWebhookParams {
|
|
1015
|
+
store_id: string;
|
|
1016
|
+
key: string;
|
|
1017
|
+
url: string;
|
|
1018
|
+
events: WebhookEventSubscription[];
|
|
1019
|
+
headers: Record<string, string>;
|
|
1020
|
+
secret: string;
|
|
1021
|
+
enabled: boolean;
|
|
1253
1022
|
}
|
|
1254
|
-
interface
|
|
1023
|
+
interface UpdateWebhookParams {
|
|
1024
|
+
store_id: string;
|
|
1255
1025
|
id: string;
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
label_url?: string | null;
|
|
1263
|
-
status: ShippingStatus;
|
|
1264
|
-
created_at: number;
|
|
1265
|
-
updated_at: number;
|
|
1026
|
+
key: string;
|
|
1027
|
+
url: string;
|
|
1028
|
+
events: WebhookEventSubscription[];
|
|
1029
|
+
headers: Record<string, string>;
|
|
1030
|
+
secret: string;
|
|
1031
|
+
enabled: boolean;
|
|
1266
1032
|
}
|
|
1267
|
-
interface
|
|
1033
|
+
interface DeleteWebhookParams {
|
|
1034
|
+
store_id: string;
|
|
1268
1035
|
id: string;
|
|
1269
|
-
provider: string;
|
|
1270
|
-
carrier: string;
|
|
1271
|
-
service: string;
|
|
1272
|
-
display_name: string;
|
|
1273
|
-
amount: number;
|
|
1274
|
-
currency: string;
|
|
1275
|
-
estimated_days?: number | null;
|
|
1276
1036
|
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
mass_unit: 'oz' | 'lb' | 'g' | 'kg';
|
|
1037
|
+
interface GetShippingRatesParams {
|
|
1038
|
+
order_id: string;
|
|
1039
|
+
shipping_provider_id: string;
|
|
1040
|
+
from_address: Address;
|
|
1041
|
+
to_address: Address;
|
|
1042
|
+
parcel: Parcel;
|
|
1043
|
+
customs_declaration?: CustomsDeclaration;
|
|
1285
1044
|
}
|
|
1286
|
-
interface
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
label_url: string;
|
|
1045
|
+
interface ShipParams {
|
|
1046
|
+
order_id: string;
|
|
1047
|
+
rate_id: string;
|
|
1290
1048
|
carrier: string;
|
|
1291
1049
|
service: string;
|
|
1050
|
+
location_id: string;
|
|
1051
|
+
lines: ShipmentLine[];
|
|
1292
1052
|
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1053
|
+
type AgentStatus = 'active' | 'draft' | 'archived';
|
|
1054
|
+
interface CreateAgentParams {
|
|
1055
|
+
store_id?: string;
|
|
1056
|
+
key: string;
|
|
1057
|
+
prompt: string;
|
|
1058
|
+
status?: AgentStatus;
|
|
1059
|
+
model_id: string;
|
|
1060
|
+
channel_ids?: string[];
|
|
1298
1061
|
}
|
|
1299
|
-
interface
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
net_weight: string;
|
|
1303
|
-
mass_unit: string;
|
|
1304
|
-
value_amount: string;
|
|
1305
|
-
value_currency: string;
|
|
1306
|
-
origin_country: string;
|
|
1307
|
-
tariff_number?: string | null;
|
|
1308
|
-
}
|
|
1309
|
-
interface CustomsDeclaration {
|
|
1310
|
-
contents_type: string;
|
|
1311
|
-
contents_explanation?: string | null;
|
|
1312
|
-
non_delivery_option: string;
|
|
1313
|
-
certify: boolean;
|
|
1314
|
-
certify_signer: string;
|
|
1315
|
-
items: CustomsItem[];
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
interface CreateLocationParams {
|
|
1062
|
+
interface UpdateAgentParams {
|
|
1063
|
+
id: string;
|
|
1064
|
+
store_id?: string;
|
|
1319
1065
|
key: string;
|
|
1320
|
-
|
|
1321
|
-
|
|
1066
|
+
prompt: string;
|
|
1067
|
+
status: AgentStatus;
|
|
1068
|
+
model_id: string;
|
|
1069
|
+
channel_ids?: string[];
|
|
1322
1070
|
}
|
|
1323
|
-
interface
|
|
1071
|
+
interface DeleteAgentParams {
|
|
1324
1072
|
id: string;
|
|
1325
|
-
|
|
1326
|
-
address: Address;
|
|
1327
|
-
is_pickup_location?: boolean;
|
|
1073
|
+
store_id?: string;
|
|
1328
1074
|
}
|
|
1329
|
-
interface
|
|
1075
|
+
interface GetAgentParams {
|
|
1330
1076
|
id: string;
|
|
1077
|
+
store_id?: string;
|
|
1331
1078
|
}
|
|
1332
|
-
interface
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
payment_methods?: PaymentMethod[];
|
|
1337
|
-
zones?: Zone[];
|
|
1079
|
+
interface GetAgentsParams {
|
|
1080
|
+
store_id?: string;
|
|
1081
|
+
limit?: number;
|
|
1082
|
+
cursor?: string;
|
|
1338
1083
|
}
|
|
1339
|
-
interface
|
|
1084
|
+
interface RunAgentParams {
|
|
1340
1085
|
id: string;
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
zones?: Zone[];
|
|
1086
|
+
store_id?: string;
|
|
1087
|
+
message: string;
|
|
1088
|
+
chat_id?: string;
|
|
1089
|
+
direct?: boolean;
|
|
1346
1090
|
}
|
|
1347
|
-
interface
|
|
1091
|
+
interface GetAgentChatsParams {
|
|
1348
1092
|
id: string;
|
|
1349
|
-
|
|
1350
|
-
interface RequestOptions<T = any> {
|
|
1351
|
-
headers?: Record<string, string>;
|
|
1352
|
-
params?: Record<string, any>;
|
|
1353
|
-
transformRequest?: (data: any) => any;
|
|
1354
|
-
onSuccess?: (ctx: {
|
|
1355
|
-
data: T;
|
|
1356
|
-
method: string;
|
|
1357
|
-
url: string;
|
|
1358
|
-
status: number;
|
|
1359
|
-
request?: any;
|
|
1360
|
-
duration_ms?: number;
|
|
1361
|
-
request_id?: string | null;
|
|
1362
|
-
}) => void | Promise<void>;
|
|
1363
|
-
onError?: (ctx: {
|
|
1364
|
-
error: any;
|
|
1365
|
-
method: string;
|
|
1366
|
-
url: string;
|
|
1367
|
-
status?: number;
|
|
1368
|
-
request?: any;
|
|
1369
|
-
response?: any;
|
|
1370
|
-
duration_ms?: number;
|
|
1371
|
-
request_id?: string | null;
|
|
1372
|
-
aborted?: boolean;
|
|
1373
|
-
}) => void | Promise<void>;
|
|
1374
|
-
}
|
|
1375
|
-
interface EshopItem {
|
|
1376
|
-
product_id: string;
|
|
1377
|
-
variant_id: string;
|
|
1378
|
-
quantity: number;
|
|
1379
|
-
}
|
|
1380
|
-
interface GetQuoteParams {
|
|
1381
|
-
items: EshopItem[];
|
|
1382
|
-
payment_method_id?: string;
|
|
1383
|
-
shipping_method_id?: string;
|
|
1384
|
-
promo_code?: string;
|
|
1385
|
-
blocks?: any[];
|
|
1386
|
-
location?: ZoneLocation;
|
|
1387
|
-
}
|
|
1388
|
-
interface OrderCheckoutParams {
|
|
1389
|
-
items: EshopItem[];
|
|
1390
|
-
payment_method_id?: string;
|
|
1391
|
-
blocks?: any[];
|
|
1392
|
-
shipping_method_id: string;
|
|
1393
|
-
promo_code_id?: string;
|
|
1394
|
-
shipping_address?: Address;
|
|
1395
|
-
billing_address?: Address;
|
|
1396
|
-
}
|
|
1397
|
-
interface GetProductsParams {
|
|
1398
|
-
business_id?: string;
|
|
1399
|
-
ids?: string[];
|
|
1400
|
-
taxonomy_query?: any[];
|
|
1401
|
-
status?: string;
|
|
1093
|
+
store_id?: string;
|
|
1402
1094
|
limit?: number;
|
|
1403
1095
|
cursor?: string;
|
|
1404
|
-
query?: string;
|
|
1405
|
-
statuses?: string[];
|
|
1406
|
-
sort_field?: string;
|
|
1407
|
-
sort_direction?: string;
|
|
1408
|
-
created_at_from?: number | null;
|
|
1409
|
-
created_at_to?: number | null;
|
|
1410
1096
|
}
|
|
1411
|
-
interface
|
|
1412
|
-
|
|
1413
|
-
|
|
1097
|
+
interface GetStoreChatsParams {
|
|
1098
|
+
store_id?: string;
|
|
1099
|
+
agent_id?: string;
|
|
1100
|
+
status?: AgentChatStatus;
|
|
1101
|
+
query?: string | number;
|
|
1102
|
+
sort_field?: string;
|
|
1103
|
+
sort_direction?: 'asc' | 'desc';
|
|
1414
1104
|
limit?: number;
|
|
1415
1105
|
cursor?: string;
|
|
1416
|
-
ids?: string[];
|
|
1417
|
-
query?: string;
|
|
1418
|
-
type?: string;
|
|
1419
|
-
key?: string;
|
|
1420
|
-
statuses?: string[];
|
|
1421
|
-
sort_field?: string;
|
|
1422
|
-
sort_direction?: string;
|
|
1423
|
-
created_at_from?: string;
|
|
1424
|
-
created_at_to?: string;
|
|
1425
|
-
}
|
|
1426
|
-
interface CreateNodeParams {
|
|
1427
|
-
business_id?: string;
|
|
1428
|
-
key: string;
|
|
1429
|
-
parent_id?: string | null;
|
|
1430
|
-
blocks?: any[];
|
|
1431
|
-
filters?: any[];
|
|
1432
|
-
slug?: Record<string, string>;
|
|
1433
|
-
audience_ids?: string[];
|
|
1434
|
-
status?: string;
|
|
1435
1106
|
}
|
|
1436
|
-
interface
|
|
1107
|
+
interface GetAgentChatParams {
|
|
1437
1108
|
id: string;
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
parent_id?: string | null;
|
|
1441
|
-
blocks?: any[];
|
|
1442
|
-
filters?: any[];
|
|
1443
|
-
slug?: Record<string, string>;
|
|
1444
|
-
audience_ids?: string[];
|
|
1445
|
-
status?: string;
|
|
1109
|
+
store_id?: string;
|
|
1110
|
+
chat_id: string;
|
|
1446
1111
|
}
|
|
1447
|
-
interface
|
|
1448
|
-
id
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1112
|
+
interface UpdateAgentChatParams {
|
|
1113
|
+
id: string;
|
|
1114
|
+
store_id?: string;
|
|
1115
|
+
chat_id: string;
|
|
1116
|
+
status: 'active' | 'archived';
|
|
1452
1117
|
}
|
|
1453
|
-
interface
|
|
1118
|
+
interface RateAgentChatParams {
|
|
1454
1119
|
id: string;
|
|
1455
|
-
|
|
1120
|
+
store_id?: string;
|
|
1121
|
+
chat_id: string;
|
|
1122
|
+
rating: number;
|
|
1123
|
+
comment?: string;
|
|
1456
1124
|
}
|
|
1457
|
-
interface
|
|
1125
|
+
interface AuthToken {
|
|
1458
1126
|
id: string;
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1127
|
+
access_token: string;
|
|
1128
|
+
refresh_token: string;
|
|
1129
|
+
access_expires_at: number;
|
|
1130
|
+
refresh_expires_at: number;
|
|
1131
|
+
created_at: number;
|
|
1132
|
+
is_verified: boolean;
|
|
1462
1133
|
}
|
|
1463
|
-
interface
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
urls?: string[];
|
|
1134
|
+
interface CustomerInfo {
|
|
1135
|
+
id: string;
|
|
1136
|
+
verified: boolean;
|
|
1467
1137
|
}
|
|
1468
|
-
interface
|
|
1138
|
+
interface CustomerAuthToken {
|
|
1469
1139
|
id: string;
|
|
1470
|
-
|
|
1140
|
+
token: string;
|
|
1141
|
+
created_at: number;
|
|
1471
1142
|
}
|
|
1472
|
-
interface
|
|
1473
|
-
|
|
1474
|
-
|
|
1143
|
+
interface CustomerVerificationCode {
|
|
1144
|
+
code: string;
|
|
1145
|
+
created_at: number;
|
|
1146
|
+
used: boolean;
|
|
1147
|
+
store_id?: string | null;
|
|
1475
1148
|
}
|
|
1476
|
-
interface
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
slug?: Record<string, string>;
|
|
1149
|
+
interface PromoUsage {
|
|
1150
|
+
promo_code_id: string;
|
|
1151
|
+
uses: number;
|
|
1480
1152
|
}
|
|
1481
|
-
interface
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1153
|
+
interface Customer {
|
|
1154
|
+
id: string;
|
|
1155
|
+
store_id: string;
|
|
1156
|
+
email: string | null;
|
|
1157
|
+
verified: boolean;
|
|
1158
|
+
status: CustomerStatus;
|
|
1159
|
+
promo_usage: PromoUsage[];
|
|
1160
|
+
taxonomies: TaxonomyEntry[];
|
|
1161
|
+
auth_tokens: CustomerAuthToken[];
|
|
1162
|
+
verification_codes: CustomerVerificationCode[];
|
|
1163
|
+
created_at: number;
|
|
1164
|
+
updated_at: number;
|
|
1490
1165
|
}
|
|
1491
|
-
interface
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1166
|
+
interface CustomerDetail extends Customer {
|
|
1167
|
+
orders: Order[];
|
|
1168
|
+
bookings: Booking[];
|
|
1169
|
+
audience_subscriptions: AudienceSubscription[];
|
|
1495
1170
|
}
|
|
1496
|
-
interface
|
|
1171
|
+
interface SetCustomerEmailParams {
|
|
1497
1172
|
email: string;
|
|
1498
|
-
|
|
1173
|
+
store_id?: string;
|
|
1499
1174
|
}
|
|
1500
|
-
interface
|
|
1175
|
+
interface CreateCustomerParams {
|
|
1176
|
+
store_id?: string;
|
|
1501
1177
|
email: string;
|
|
1502
|
-
|
|
1178
|
+
taxonomies?: TaxonomyEntry[];
|
|
1503
1179
|
}
|
|
1504
|
-
interface
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1180
|
+
interface UpdateCustomerParams {
|
|
1181
|
+
id: string;
|
|
1182
|
+
store_id?: string;
|
|
1183
|
+
email?: string;
|
|
1184
|
+
taxonomies?: TaxonomyEntry[];
|
|
1185
|
+
status?: CustomerStatus;
|
|
1186
|
+
}
|
|
1187
|
+
interface GetCustomerParams {
|
|
1188
|
+
id: string;
|
|
1189
|
+
store_id?: string;
|
|
1190
|
+
}
|
|
1191
|
+
interface FindCustomersParams {
|
|
1192
|
+
store_id?: string;
|
|
1193
|
+
query?: string | number;
|
|
1508
1194
|
limit?: number;
|
|
1509
1195
|
cursor?: string;
|
|
1510
|
-
query?: string;
|
|
1511
|
-
ids?: string[];
|
|
1512
|
-
statuses?: string[];
|
|
1513
1196
|
sort_field?: string;
|
|
1514
|
-
sort_direction?:
|
|
1197
|
+
sort_direction?: 'asc' | 'desc';
|
|
1515
1198
|
}
|
|
1516
|
-
interface
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
forms?: any[];
|
|
1521
|
-
promo_code_id?: string;
|
|
1199
|
+
interface MergeCustomersParams {
|
|
1200
|
+
target_id: string;
|
|
1201
|
+
source_id: string;
|
|
1202
|
+
store_id?: string;
|
|
1522
1203
|
}
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1204
|
+
|
|
1205
|
+
declare enum PaymentMethodType {
|
|
1206
|
+
Cash = "cash",
|
|
1207
|
+
CreditCard = "credit_card"
|
|
1526
1208
|
}
|
|
1527
|
-
interface
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1209
|
+
interface PaymentTaxLine {
|
|
1210
|
+
rate_bps: number;
|
|
1211
|
+
amount: number;
|
|
1212
|
+
label?: string;
|
|
1213
|
+
scope?: string;
|
|
1531
1214
|
}
|
|
1532
|
-
interface
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1215
|
+
interface BookingPaymentTax {
|
|
1216
|
+
amount: number;
|
|
1217
|
+
mode_snapshot?: string;
|
|
1218
|
+
rate_bps: number;
|
|
1219
|
+
lines: BookingPaymentTaxLine[];
|
|
1537
1220
|
}
|
|
1538
|
-
interface
|
|
1539
|
-
|
|
1540
|
-
|
|
1221
|
+
interface BookingPaymentTaxLine {
|
|
1222
|
+
rate_bps: number;
|
|
1223
|
+
amount: number;
|
|
1224
|
+
label?: string;
|
|
1225
|
+
scope?: string;
|
|
1541
1226
|
}
|
|
1542
|
-
interface
|
|
1543
|
-
|
|
1544
|
-
|
|
1227
|
+
interface BookingPaymentPromoCode {
|
|
1228
|
+
id: string;
|
|
1229
|
+
code: string;
|
|
1230
|
+
type: string;
|
|
1231
|
+
value: number;
|
|
1545
1232
|
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
working_hours: WorkingHour[];
|
|
1553
|
-
}
|
|
1554
|
-
interface ProviderWithTimeline {
|
|
1233
|
+
type BookingPaymentProvider = {
|
|
1234
|
+
type: 'stripe';
|
|
1235
|
+
customer_id: string;
|
|
1236
|
+
payment_intent_id?: string;
|
|
1237
|
+
};
|
|
1238
|
+
interface BookingPaymentRefund {
|
|
1555
1239
|
id: string;
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
status: BookingProviderStatus;
|
|
1560
|
-
audience_ids: string[];
|
|
1561
|
-
blocks: Block[];
|
|
1240
|
+
total: number;
|
|
1241
|
+
provider_refund_id?: string;
|
|
1242
|
+
status: string;
|
|
1562
1243
|
created_at: number;
|
|
1563
|
-
updated_at: number;
|
|
1564
|
-
working_days?: WorkingDay[];
|
|
1565
|
-
specific_dates?: SpecificDate[];
|
|
1566
|
-
timeline: TimelinePoint[];
|
|
1567
1244
|
}
|
|
1568
|
-
interface
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1245
|
+
interface BookingPayment {
|
|
1246
|
+
currency: string;
|
|
1247
|
+
market: string;
|
|
1248
|
+
subtotal: number;
|
|
1249
|
+
discount: number;
|
|
1250
|
+
total: number;
|
|
1251
|
+
paid: number;
|
|
1252
|
+
tax?: BookingPaymentTax;
|
|
1253
|
+
promo_code?: BookingPaymentPromoCode;
|
|
1254
|
+
provider?: BookingPaymentProvider;
|
|
1255
|
+
refunds: BookingPaymentRefund[];
|
|
1256
|
+
payment_method_id?: string;
|
|
1257
|
+
method_type: PaymentMethodType;
|
|
1578
1258
|
}
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
amount?: number;
|
|
1259
|
+
interface OrderPaymentTax {
|
|
1260
|
+
amount: number;
|
|
1261
|
+
mode_snapshot?: string;
|
|
1262
|
+
rate_bps: number;
|
|
1263
|
+
lines: OrderPaymentTaxLine[];
|
|
1585
1264
|
}
|
|
1586
|
-
interface
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
};
|
|
1265
|
+
interface OrderPaymentTaxLine {
|
|
1266
|
+
rate_bps: number;
|
|
1267
|
+
amount: number;
|
|
1268
|
+
label?: string;
|
|
1269
|
+
scope?: string;
|
|
1592
1270
|
}
|
|
1593
|
-
interface
|
|
1594
|
-
|
|
1271
|
+
interface OrderPaymentPromoCode {
|
|
1272
|
+
id: string;
|
|
1595
1273
|
code: string;
|
|
1596
|
-
|
|
1597
|
-
|
|
1274
|
+
type: string;
|
|
1275
|
+
value: number;
|
|
1598
1276
|
}
|
|
1599
|
-
|
|
1277
|
+
type OrderPaymentProvider = {
|
|
1278
|
+
type: 'stripe';
|
|
1279
|
+
customer_id: string;
|
|
1280
|
+
payment_intent_id?: string;
|
|
1281
|
+
};
|
|
1282
|
+
interface OrderPaymentRefund {
|
|
1600
1283
|
id: string;
|
|
1601
|
-
|
|
1284
|
+
total: number;
|
|
1285
|
+
provider_refund_id?: string;
|
|
1286
|
+
status: string;
|
|
1287
|
+
created_at: number;
|
|
1288
|
+
}
|
|
1289
|
+
interface OrderPayment {
|
|
1290
|
+
currency: string;
|
|
1291
|
+
market: string;
|
|
1292
|
+
subtotal: number;
|
|
1293
|
+
shipping: number;
|
|
1294
|
+
discount: number;
|
|
1295
|
+
total: number;
|
|
1296
|
+
paid: number;
|
|
1297
|
+
tax?: OrderPaymentTax;
|
|
1298
|
+
promo_code?: OrderPaymentPromoCode;
|
|
1299
|
+
provider?: OrderPaymentProvider;
|
|
1300
|
+
refunds: OrderPaymentRefund[];
|
|
1301
|
+
zone_id?: string;
|
|
1302
|
+
payment_method_id?: string;
|
|
1303
|
+
shipping_method_id?: string;
|
|
1304
|
+
method_type: PaymentMethodType;
|
|
1305
|
+
}
|
|
1306
|
+
interface PromoCodeValidation {
|
|
1307
|
+
promo_code_id: string;
|
|
1602
1308
|
code: string;
|
|
1603
1309
|
discounts: Discount[];
|
|
1604
1310
|
conditions: Condition[];
|
|
1605
|
-
status?: PromoCodeStatus;
|
|
1606
1311
|
}
|
|
1607
|
-
interface
|
|
1608
|
-
|
|
1609
|
-
|
|
1312
|
+
interface BookingQuote {
|
|
1313
|
+
market: string;
|
|
1314
|
+
zone: Zone | null;
|
|
1315
|
+
subtotal: number;
|
|
1316
|
+
discount: number;
|
|
1317
|
+
tax: number;
|
|
1318
|
+
total: number;
|
|
1319
|
+
payment_method: PaymentMethod | null;
|
|
1320
|
+
payment_methods: PaymentMethod[];
|
|
1321
|
+
promo_code: PromoCodeValidation | null;
|
|
1322
|
+
payment: BookingPayment;
|
|
1323
|
+
charge_amount: number;
|
|
1324
|
+
id?: string;
|
|
1325
|
+
expires_at?: number;
|
|
1610
1326
|
}
|
|
1611
|
-
interface
|
|
1612
|
-
|
|
1613
|
-
|
|
1327
|
+
interface OrderQuote {
|
|
1328
|
+
market: string;
|
|
1329
|
+
zone: Zone | null;
|
|
1330
|
+
subtotal: number;
|
|
1331
|
+
shipping: number;
|
|
1332
|
+
discount: number;
|
|
1333
|
+
tax: number;
|
|
1334
|
+
total: number;
|
|
1335
|
+
shipping_method: ShippingMethod | null;
|
|
1336
|
+
payment_method: PaymentMethod | null;
|
|
1337
|
+
payment_methods: PaymentMethod[];
|
|
1338
|
+
promo_code: PromoCodeValidation | null;
|
|
1339
|
+
payment: OrderPayment;
|
|
1340
|
+
charge_amount: number;
|
|
1341
|
+
id?: string;
|
|
1342
|
+
expires_at?: number;
|
|
1614
1343
|
}
|
|
1615
|
-
interface
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
sort_field?: string;
|
|
1622
|
-
sort_direction?: string;
|
|
1623
|
-
created_at_from?: string;
|
|
1624
|
-
created_at_to?: string;
|
|
1625
|
-
starts_at_from?: string;
|
|
1626
|
-
starts_at_to?: string;
|
|
1627
|
-
expires_at_from?: string;
|
|
1628
|
-
expires_at_to?: string;
|
|
1629
|
-
}
|
|
1630
|
-
interface CreateBusinessParams {
|
|
1631
|
-
key: string;
|
|
1632
|
-
slug?: string;
|
|
1633
|
-
description?: string;
|
|
1634
|
-
email?: string;
|
|
1635
|
-
phone?: string;
|
|
1636
|
-
website?: string;
|
|
1637
|
-
address?: any;
|
|
1638
|
-
settings?: any;
|
|
1639
|
-
[key: string]: any;
|
|
1344
|
+
interface Price {
|
|
1345
|
+
currency: string;
|
|
1346
|
+
market: string;
|
|
1347
|
+
amount: number;
|
|
1348
|
+
compare_at?: number;
|
|
1349
|
+
audience_id?: string;
|
|
1640
1350
|
}
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
configs: any;
|
|
1351
|
+
type IntervalPeriod = 'month' | 'year';
|
|
1352
|
+
interface SubscriptionInterval {
|
|
1353
|
+
period: IntervalPeriod;
|
|
1354
|
+
count: number;
|
|
1646
1355
|
}
|
|
1647
|
-
interface
|
|
1356
|
+
interface PriceProvider {
|
|
1357
|
+
type: string;
|
|
1648
1358
|
id: string;
|
|
1649
1359
|
}
|
|
1650
|
-
interface
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
cancel_url: string;
|
|
1657
|
-
}
|
|
1658
|
-
interface CreatePortalSessionParams {
|
|
1659
|
-
business_id?: string;
|
|
1660
|
-
return_url: string;
|
|
1661
|
-
}
|
|
1662
|
-
interface InviteUserParams {
|
|
1663
|
-
email: string;
|
|
1664
|
-
role?: BusinessRole;
|
|
1665
|
-
}
|
|
1666
|
-
interface RemoveMemberParams {
|
|
1667
|
-
account_id: string;
|
|
1668
|
-
}
|
|
1669
|
-
interface HandleInvitationParams {
|
|
1670
|
-
token: string;
|
|
1671
|
-
action: string;
|
|
1672
|
-
business_id?: string;
|
|
1673
|
-
}
|
|
1674
|
-
interface TestWebhookParams {
|
|
1675
|
-
webhook: any;
|
|
1360
|
+
interface SubscriptionPrice {
|
|
1361
|
+
currency: string;
|
|
1362
|
+
amount: number;
|
|
1363
|
+
compare_at?: number;
|
|
1364
|
+
interval?: SubscriptionInterval;
|
|
1365
|
+
providers: PriceProvider[];
|
|
1676
1366
|
}
|
|
1677
|
-
interface
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1367
|
+
interface Address {
|
|
1368
|
+
name?: string | null;
|
|
1369
|
+
company?: string | null;
|
|
1370
|
+
street1?: string | null;
|
|
1371
|
+
street2?: string | null;
|
|
1372
|
+
city?: string | null;
|
|
1373
|
+
state?: string | null;
|
|
1374
|
+
postal_code?: string | null;
|
|
1375
|
+
country?: string | null;
|
|
1376
|
+
phone?: string | null;
|
|
1377
|
+
email?: string | null;
|
|
1687
1378
|
}
|
|
1688
|
-
interface
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
blocks?: any[];
|
|
1695
|
-
taxonomies?: any[];
|
|
1696
|
-
variants?: any[];
|
|
1697
|
-
status?: string;
|
|
1698
|
-
[key: string]: any;
|
|
1379
|
+
interface GeoLocation {
|
|
1380
|
+
coordinates?: {
|
|
1381
|
+
lat: number;
|
|
1382
|
+
lon: number;
|
|
1383
|
+
} | null;
|
|
1384
|
+
label?: string | null;
|
|
1699
1385
|
}
|
|
1700
|
-
interface
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1386
|
+
interface ZoneLocation {
|
|
1387
|
+
country?: string | null;
|
|
1388
|
+
state?: string | null;
|
|
1389
|
+
city?: string | null;
|
|
1390
|
+
postal_code?: string | null;
|
|
1704
1391
|
}
|
|
1705
|
-
interface
|
|
1392
|
+
interface EshopCartItem {
|
|
1706
1393
|
id: string;
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
cursor?: string | null;
|
|
1717
|
-
sort_field?: string | null;
|
|
1718
|
-
sort_direction?: string | null;
|
|
1719
|
-
created_at_from?: string | null;
|
|
1720
|
-
created_at_to?: string | null;
|
|
1394
|
+
product_id: string;
|
|
1395
|
+
variant_id: string;
|
|
1396
|
+
product_name: string;
|
|
1397
|
+
product_slug: string;
|
|
1398
|
+
variant_attributes: Record<string, any>;
|
|
1399
|
+
price: Price;
|
|
1400
|
+
quantity: number;
|
|
1401
|
+
added_at: number;
|
|
1402
|
+
max_stock?: number;
|
|
1721
1403
|
}
|
|
1722
|
-
interface
|
|
1404
|
+
interface BookingCartItem {
|
|
1723
1405
|
id: string;
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
cancel?: boolean;
|
|
1733
|
-
}
|
|
1734
|
-
interface CreateOrderParams {
|
|
1735
|
-
business_id?: string;
|
|
1736
|
-
[key: string]: any;
|
|
1737
|
-
}
|
|
1738
|
-
interface CreateBookingParams {
|
|
1739
|
-
business_id?: string;
|
|
1740
|
-
[key: string]: any;
|
|
1406
|
+
service_id: string;
|
|
1407
|
+
service_name: string;
|
|
1408
|
+
date: string;
|
|
1409
|
+
from: number;
|
|
1410
|
+
to: number;
|
|
1411
|
+
time_text: string;
|
|
1412
|
+
provider_id?: string;
|
|
1413
|
+
forms: FormEntry[];
|
|
1741
1414
|
}
|
|
1742
|
-
|
|
1415
|
+
type IntegrationProvider = {
|
|
1416
|
+
type: 'stripe';
|
|
1417
|
+
secret_key?: string;
|
|
1418
|
+
publishable_key: string;
|
|
1419
|
+
webhook_secret?: string;
|
|
1420
|
+
currency: string;
|
|
1421
|
+
} | {
|
|
1422
|
+
type: 'shippo';
|
|
1423
|
+
api_token?: string;
|
|
1424
|
+
} | {
|
|
1425
|
+
type: 'google';
|
|
1426
|
+
client_id?: string;
|
|
1427
|
+
client_secret?: string;
|
|
1428
|
+
access_token?: string;
|
|
1429
|
+
refresh_token?: string;
|
|
1430
|
+
token_expires_at?: number;
|
|
1431
|
+
scopes: string[];
|
|
1432
|
+
account_email?: string | null;
|
|
1433
|
+
connected_at: number;
|
|
1434
|
+
} | {
|
|
1435
|
+
type: 'telegram_bot';
|
|
1436
|
+
bot_token?: string;
|
|
1437
|
+
} | {
|
|
1438
|
+
type: 'deep_seek';
|
|
1439
|
+
api_key?: string;
|
|
1440
|
+
model?: string;
|
|
1441
|
+
} | {
|
|
1442
|
+
type: 'open_ai';
|
|
1443
|
+
api_key?: string;
|
|
1444
|
+
model?: string;
|
|
1445
|
+
} | {
|
|
1446
|
+
type: 'slack';
|
|
1447
|
+
api_key?: string;
|
|
1448
|
+
} | {
|
|
1449
|
+
type: 'discord';
|
|
1450
|
+
api_key?: string;
|
|
1451
|
+
} | {
|
|
1452
|
+
type: 'whats_app';
|
|
1453
|
+
api_key?: string;
|
|
1454
|
+
} | {
|
|
1455
|
+
type: 'resend';
|
|
1456
|
+
api_key?: string;
|
|
1457
|
+
} | {
|
|
1458
|
+
type: 'send_grid';
|
|
1459
|
+
api_key?: string;
|
|
1460
|
+
} | {
|
|
1461
|
+
type: 'airtable';
|
|
1462
|
+
api_key?: string;
|
|
1463
|
+
} | {
|
|
1464
|
+
type: 'linear';
|
|
1465
|
+
api_key?: string;
|
|
1466
|
+
} | {
|
|
1467
|
+
type: 'git_hub';
|
|
1468
|
+
api_key?: string;
|
|
1469
|
+
} | {
|
|
1470
|
+
type: 'git_lab';
|
|
1471
|
+
api_key?: string;
|
|
1472
|
+
} | {
|
|
1473
|
+
type: 'dropbox';
|
|
1474
|
+
api_key?: string;
|
|
1475
|
+
} | {
|
|
1476
|
+
type: 'hub_spot';
|
|
1477
|
+
api_key?: string;
|
|
1478
|
+
} | {
|
|
1479
|
+
type: 'monday';
|
|
1480
|
+
api_key?: string;
|
|
1481
|
+
} | {
|
|
1482
|
+
type: 'click_up';
|
|
1483
|
+
api_key?: string;
|
|
1484
|
+
} | {
|
|
1485
|
+
type: 'pipedrive';
|
|
1486
|
+
api_key?: string;
|
|
1487
|
+
} | {
|
|
1488
|
+
type: 'calendly';
|
|
1489
|
+
api_key?: string;
|
|
1490
|
+
} | {
|
|
1491
|
+
type: 'typeform';
|
|
1492
|
+
api_key?: string;
|
|
1493
|
+
} | {
|
|
1494
|
+
type: 'webflow';
|
|
1495
|
+
api_key?: string;
|
|
1496
|
+
} | {
|
|
1497
|
+
type: 'trello';
|
|
1498
|
+
api_key?: string;
|
|
1499
|
+
} | {
|
|
1500
|
+
type: 'replicate';
|
|
1501
|
+
api_key?: string;
|
|
1502
|
+
} | {
|
|
1503
|
+
type: 'asana';
|
|
1504
|
+
api_key?: string;
|
|
1505
|
+
} | {
|
|
1506
|
+
type: 'brevo';
|
|
1507
|
+
api_key?: string;
|
|
1508
|
+
} | {
|
|
1509
|
+
type: 'intercom';
|
|
1510
|
+
api_key?: string;
|
|
1511
|
+
} | {
|
|
1512
|
+
type: 'notion';
|
|
1513
|
+
api_key?: string;
|
|
1514
|
+
} | {
|
|
1515
|
+
type: 'eleven_labs';
|
|
1516
|
+
api_key?: string;
|
|
1517
|
+
} | {
|
|
1518
|
+
type: 'active_campaign';
|
|
1519
|
+
api_key?: string;
|
|
1520
|
+
account_url: string;
|
|
1521
|
+
} | {
|
|
1522
|
+
type: 'shopify';
|
|
1523
|
+
api_key?: string;
|
|
1524
|
+
store_domain: string;
|
|
1525
|
+
} | {
|
|
1526
|
+
type: 'supabase';
|
|
1527
|
+
api_key?: string;
|
|
1528
|
+
project_url: string;
|
|
1529
|
+
} | {
|
|
1530
|
+
type: 'mailchimp';
|
|
1531
|
+
api_key?: string;
|
|
1532
|
+
} | {
|
|
1533
|
+
type: 'twilio';
|
|
1534
|
+
account_sid?: string;
|
|
1535
|
+
auth_token?: string;
|
|
1536
|
+
} | {
|
|
1537
|
+
type: 'jira';
|
|
1538
|
+
email?: string;
|
|
1539
|
+
api_token?: string;
|
|
1540
|
+
domain: string;
|
|
1541
|
+
} | {
|
|
1542
|
+
type: 'woo_commerce';
|
|
1543
|
+
consumer_key?: string;
|
|
1544
|
+
consumer_secret?: string;
|
|
1545
|
+
store_url: string;
|
|
1546
|
+
} | {
|
|
1547
|
+
type: 'freshdesk';
|
|
1548
|
+
api_key?: string;
|
|
1549
|
+
domain: string;
|
|
1550
|
+
} | {
|
|
1551
|
+
type: 'zendesk';
|
|
1552
|
+
api_token?: string;
|
|
1553
|
+
email?: string;
|
|
1554
|
+
subdomain: string;
|
|
1555
|
+
} | {
|
|
1556
|
+
type: 'salesforce';
|
|
1557
|
+
access_token?: string;
|
|
1558
|
+
instance_url: string;
|
|
1559
|
+
} | {
|
|
1560
|
+
type: 'zoom';
|
|
1561
|
+
api_key?: string;
|
|
1562
|
+
} | {
|
|
1563
|
+
type: 'microsoft_teams';
|
|
1564
|
+
api_key?: string;
|
|
1565
|
+
} | {
|
|
1566
|
+
type: 'firebase';
|
|
1567
|
+
api_key?: string;
|
|
1568
|
+
} | {
|
|
1569
|
+
type: 'arky';
|
|
1570
|
+
api_key?: string;
|
|
1571
|
+
} | {
|
|
1572
|
+
type: 'vercel_deploy_hook';
|
|
1573
|
+
url?: string;
|
|
1574
|
+
} | {
|
|
1575
|
+
type: 'netlify_deploy_hook';
|
|
1576
|
+
url?: string;
|
|
1577
|
+
} | {
|
|
1578
|
+
type: 'cloudflare_deploy_hook';
|
|
1579
|
+
url?: string;
|
|
1580
|
+
} | {
|
|
1581
|
+
type: 'custom_deploy_hook';
|
|
1582
|
+
url?: string;
|
|
1583
|
+
};
|
|
1584
|
+
interface Integration {
|
|
1743
1585
|
id: string;
|
|
1744
|
-
|
|
1745
|
-
forms?: any;
|
|
1746
|
-
items?: any;
|
|
1747
|
-
payment?: Partial<BookingPayment> | null;
|
|
1748
|
-
[key: string]: any;
|
|
1749
|
-
}
|
|
1750
|
-
interface CreateProviderParams {
|
|
1751
|
-
business_id?: string;
|
|
1586
|
+
store_id: string;
|
|
1752
1587
|
key: string;
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
status?: BookingProviderStatus;
|
|
1757
|
-
[key: string]: any;
|
|
1588
|
+
provider: IntegrationProvider;
|
|
1589
|
+
created_at: number;
|
|
1590
|
+
updated_at: number;
|
|
1758
1591
|
}
|
|
1759
|
-
interface
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
key?: string;
|
|
1763
|
-
audience_ids?: string[];
|
|
1764
|
-
blocks?: any[];
|
|
1765
|
-
taxonomies?: any[];
|
|
1766
|
-
status?: BookingProviderStatus;
|
|
1767
|
-
[key: string]: any;
|
|
1592
|
+
interface ShippingWeightTier {
|
|
1593
|
+
up_to_grams: number;
|
|
1594
|
+
amount: number;
|
|
1768
1595
|
}
|
|
1769
|
-
interface
|
|
1596
|
+
interface PaymentMethod {
|
|
1770
1597
|
id: string;
|
|
1771
|
-
|
|
1772
|
-
}
|
|
1773
|
-
interface ServiceProviderInput {
|
|
1774
|
-
provider_id: string;
|
|
1775
|
-
business_id?: string;
|
|
1776
|
-
prices?: any[];
|
|
1777
|
-
durations?: any[];
|
|
1778
|
-
working_days: WorkingDay[];
|
|
1779
|
-
specific_dates: SpecificDate[];
|
|
1598
|
+
integration_id?: string;
|
|
1780
1599
|
}
|
|
1781
|
-
interface
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1600
|
+
interface ShippingMethod {
|
|
1601
|
+
id: string;
|
|
1602
|
+
taxable: boolean;
|
|
1603
|
+
eta_text: string;
|
|
1604
|
+
location_id?: string;
|
|
1605
|
+
integration_id?: string;
|
|
1606
|
+
amount: number;
|
|
1607
|
+
free_above?: number;
|
|
1608
|
+
weight_tiers?: ShippingWeightTier[];
|
|
1788
1609
|
}
|
|
1789
|
-
interface
|
|
1610
|
+
interface Location {
|
|
1790
1611
|
id: string;
|
|
1791
|
-
|
|
1792
|
-
key
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1612
|
+
store_id: string;
|
|
1613
|
+
key: string;
|
|
1614
|
+
address: Address;
|
|
1615
|
+
is_pickup_location: boolean;
|
|
1616
|
+
created_at: number;
|
|
1617
|
+
updated_at: number;
|
|
1797
1618
|
}
|
|
1798
|
-
interface
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
working_days: WorkingDay[];
|
|
1803
|
-
specific_dates: SpecificDate[];
|
|
1804
|
-
prices?: any[];
|
|
1805
|
-
durations?: any[];
|
|
1806
|
-
slot_interval: number;
|
|
1807
|
-
min_advance?: number;
|
|
1808
|
-
max_advance?: number;
|
|
1809
|
-
reminders?: number[];
|
|
1619
|
+
interface InventoryLevel {
|
|
1620
|
+
location_id: string;
|
|
1621
|
+
available: number;
|
|
1622
|
+
reserved: number;
|
|
1810
1623
|
}
|
|
1811
|
-
interface
|
|
1812
|
-
business_id?: string;
|
|
1624
|
+
interface ProductInventory {
|
|
1813
1625
|
id: string;
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
reminders?: number[];
|
|
1626
|
+
store_id: string;
|
|
1627
|
+
product_id: string;
|
|
1628
|
+
variant_id: string;
|
|
1629
|
+
location_id: string;
|
|
1630
|
+
available: number;
|
|
1631
|
+
reserved: number;
|
|
1632
|
+
updated_at: number;
|
|
1822
1633
|
}
|
|
1823
|
-
interface
|
|
1824
|
-
business_id?: string;
|
|
1634
|
+
interface ProductVariant {
|
|
1825
1635
|
id: string;
|
|
1636
|
+
sku?: string;
|
|
1637
|
+
prices: Price[];
|
|
1638
|
+
inventory: ProductInventory[];
|
|
1639
|
+
attributes: Block[];
|
|
1640
|
+
weight?: number;
|
|
1826
1641
|
}
|
|
1827
|
-
interface
|
|
1828
|
-
business_id?: string;
|
|
1829
|
-
service_id?: string;
|
|
1830
|
-
provider_id?: string;
|
|
1831
|
-
}
|
|
1832
|
-
interface DeleteServiceParams {
|
|
1642
|
+
interface Product {
|
|
1833
1643
|
id: string;
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1644
|
+
store_id: string;
|
|
1645
|
+
key: string;
|
|
1646
|
+
slug: Record<string, string>;
|
|
1647
|
+
blocks: Block[];
|
|
1648
|
+
taxonomies: TaxonomyEntry[];
|
|
1649
|
+
variants: ProductVariant[];
|
|
1650
|
+
status: ProductStatus;
|
|
1651
|
+
created_at: number;
|
|
1652
|
+
updated_at: number;
|
|
1840
1653
|
}
|
|
1841
|
-
interface
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
query?: string | null;
|
|
1847
|
-
statuses?: string[] | null;
|
|
1848
|
-
limit?: number;
|
|
1849
|
-
cursor?: string;
|
|
1850
|
-
sort_field?: string | null;
|
|
1851
|
-
sort_direction?: string | null;
|
|
1852
|
-
created_at_from?: string | null;
|
|
1853
|
-
created_at_to?: string | null;
|
|
1654
|
+
interface GalleryItem {
|
|
1655
|
+
id: string;
|
|
1656
|
+
url: string;
|
|
1657
|
+
alt?: string;
|
|
1658
|
+
caption?: string;
|
|
1854
1659
|
}
|
|
1855
|
-
interface
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1660
|
+
interface OrderItemSnapshot {
|
|
1661
|
+
product_key: string;
|
|
1662
|
+
variant_sku?: string;
|
|
1663
|
+
variant_attributes: Block[];
|
|
1664
|
+
price: Price;
|
|
1859
1665
|
}
|
|
1860
|
-
interface
|
|
1666
|
+
interface OrderItem {
|
|
1861
1667
|
id: string;
|
|
1862
|
-
|
|
1668
|
+
product_id: string;
|
|
1669
|
+
variant_id: string;
|
|
1670
|
+
quantity: number;
|
|
1671
|
+
location_id?: string;
|
|
1672
|
+
snapshot: OrderItemSnapshot;
|
|
1673
|
+
status: OrderItemStatus;
|
|
1863
1674
|
}
|
|
1864
|
-
interface
|
|
1865
|
-
|
|
1866
|
-
booking_id: string;
|
|
1867
|
-
item_id: string;
|
|
1675
|
+
interface HistoryEntry {
|
|
1676
|
+
action: string;
|
|
1868
1677
|
reason?: string;
|
|
1678
|
+
timestamp: number;
|
|
1869
1679
|
}
|
|
1870
|
-
interface
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
addresses?: any[];
|
|
1887
|
-
api_tokens?: any[] | null;
|
|
1888
|
-
}
|
|
1889
|
-
interface SearchAccountsParams {
|
|
1890
|
-
limit?: number;
|
|
1891
|
-
cursor?: string | null;
|
|
1892
|
-
query?: string;
|
|
1893
|
-
owner?: string;
|
|
1680
|
+
interface Order {
|
|
1681
|
+
id: string;
|
|
1682
|
+
number: string;
|
|
1683
|
+
store_id: string;
|
|
1684
|
+
customer_id: string;
|
|
1685
|
+
verified: boolean;
|
|
1686
|
+
items: OrderItem[];
|
|
1687
|
+
payment: OrderPayment;
|
|
1688
|
+
shipping_address?: Address;
|
|
1689
|
+
billing_address?: Address;
|
|
1690
|
+
forms: FormEntry[];
|
|
1691
|
+
shipments: Shipment[];
|
|
1692
|
+
history: HistoryEntry[];
|
|
1693
|
+
audience_id?: string;
|
|
1694
|
+
created_at: number;
|
|
1695
|
+
updated_at: number;
|
|
1894
1696
|
}
|
|
1895
|
-
interface
|
|
1697
|
+
interface Zone {
|
|
1698
|
+
id: string;
|
|
1699
|
+
store_id: string;
|
|
1700
|
+
market_id: string;
|
|
1701
|
+
countries: string[];
|
|
1702
|
+
states: string[];
|
|
1703
|
+
postal_codes: string[];
|
|
1704
|
+
tax_bps: number;
|
|
1705
|
+
shipping_methods: ShippingMethod[];
|
|
1896
1706
|
}
|
|
1897
|
-
interface
|
|
1898
|
-
|
|
1707
|
+
interface Market {
|
|
1708
|
+
id: string;
|
|
1709
|
+
store_id: string;
|
|
1710
|
+
key: string;
|
|
1711
|
+
currency: string;
|
|
1712
|
+
tax_mode: "exclusive" | "inclusive";
|
|
1713
|
+
payment_methods: PaymentMethod[];
|
|
1714
|
+
zones: Zone[];
|
|
1715
|
+
created_at: number;
|
|
1716
|
+
updated_at: number;
|
|
1899
1717
|
}
|
|
1900
|
-
interface
|
|
1901
|
-
|
|
1718
|
+
interface Language {
|
|
1719
|
+
id: string;
|
|
1902
1720
|
}
|
|
1903
|
-
interface
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
email_template_id?: string;
|
|
1907
|
-
recipients?: string[];
|
|
1908
|
-
audience_id?: string;
|
|
1909
|
-
vars?: Record<string, any>;
|
|
1721
|
+
interface StoreEmails {
|
|
1722
|
+
billing: string;
|
|
1723
|
+
support: string;
|
|
1910
1724
|
}
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
query?: string;
|
|
1725
|
+
type WebhookEventSubscription = {
|
|
1726
|
+
event: 'node.created';
|
|
1727
|
+
parent_id?: string;
|
|
1728
|
+
} | {
|
|
1729
|
+
event: 'node.updated';
|
|
1917
1730
|
key?: string;
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1731
|
+
} | {
|
|
1732
|
+
event: 'node.deleted';
|
|
1733
|
+
key?: string;
|
|
1734
|
+
} | {
|
|
1735
|
+
event: 'order.created';
|
|
1736
|
+
} | {
|
|
1737
|
+
event: 'order.updated';
|
|
1738
|
+
} | {
|
|
1739
|
+
event: 'order.confirmed';
|
|
1740
|
+
} | {
|
|
1741
|
+
event: 'order.payment_received';
|
|
1742
|
+
} | {
|
|
1743
|
+
event: 'order.payment_failed';
|
|
1744
|
+
} | {
|
|
1745
|
+
event: 'order.refunded';
|
|
1746
|
+
} | {
|
|
1747
|
+
event: 'order.cancelled';
|
|
1748
|
+
} | {
|
|
1749
|
+
event: 'order.shipment_created';
|
|
1750
|
+
} | {
|
|
1751
|
+
event: 'order.shipment_in_transit';
|
|
1752
|
+
} | {
|
|
1753
|
+
event: 'order.shipment_out_for_delivery';
|
|
1754
|
+
} | {
|
|
1755
|
+
event: 'order.shipment_delivered';
|
|
1756
|
+
} | {
|
|
1757
|
+
event: 'order.shipment_failed';
|
|
1758
|
+
} | {
|
|
1759
|
+
event: 'order.shipment_returned';
|
|
1760
|
+
} | {
|
|
1761
|
+
event: 'order.shipment_status_changed';
|
|
1762
|
+
} | {
|
|
1763
|
+
event: 'booking.created';
|
|
1764
|
+
} | {
|
|
1765
|
+
event: 'booking.updated';
|
|
1766
|
+
} | {
|
|
1767
|
+
event: 'booking.payment_received';
|
|
1768
|
+
} | {
|
|
1769
|
+
event: 'booking.payment_failed';
|
|
1770
|
+
} | {
|
|
1771
|
+
event: 'booking.refunded';
|
|
1772
|
+
} | {
|
|
1773
|
+
event: 'booking.cancelled';
|
|
1774
|
+
} | {
|
|
1775
|
+
event: 'booking.item_cancelled';
|
|
1776
|
+
} | {
|
|
1777
|
+
event: 'booking.reminder';
|
|
1778
|
+
} | {
|
|
1779
|
+
event: 'product.created';
|
|
1780
|
+
} | {
|
|
1781
|
+
event: 'product.updated';
|
|
1782
|
+
} | {
|
|
1783
|
+
event: 'product.deleted';
|
|
1784
|
+
} | {
|
|
1785
|
+
event: 'provider.created';
|
|
1786
|
+
} | {
|
|
1787
|
+
event: 'provider.updated';
|
|
1788
|
+
} | {
|
|
1789
|
+
event: 'provider.deleted';
|
|
1790
|
+
} | {
|
|
1791
|
+
event: 'service.created';
|
|
1792
|
+
} | {
|
|
1793
|
+
event: 'service.updated';
|
|
1794
|
+
} | {
|
|
1795
|
+
event: 'service.deleted';
|
|
1796
|
+
} | {
|
|
1797
|
+
event: 'media.created';
|
|
1798
|
+
} | {
|
|
1799
|
+
event: 'media.deleted';
|
|
1800
|
+
} | {
|
|
1801
|
+
event: 'store.created';
|
|
1802
|
+
} | {
|
|
1803
|
+
event: 'store.updated';
|
|
1804
|
+
} | {
|
|
1805
|
+
event: 'store.deleted';
|
|
1806
|
+
} | {
|
|
1807
|
+
event: 'audience.created';
|
|
1808
|
+
} | {
|
|
1809
|
+
event: 'audience.updated';
|
|
1810
|
+
} | {
|
|
1811
|
+
event: 'audience.deleted';
|
|
1812
|
+
};
|
|
1813
|
+
interface Webhook {
|
|
1935
1814
|
id: string;
|
|
1936
|
-
|
|
1937
|
-
key
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1815
|
+
store_id: string;
|
|
1816
|
+
key: string;
|
|
1817
|
+
url: string;
|
|
1818
|
+
events: WebhookEventSubscription[];
|
|
1819
|
+
headers: Record<string, string>;
|
|
1820
|
+
secret: string;
|
|
1821
|
+
enabled: boolean;
|
|
1822
|
+
created_at: number;
|
|
1823
|
+
updated_at: number;
|
|
1945
1824
|
}
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1825
|
+
type StoreSubscriptionStatus = 'pending' | 'active' | 'cancellation_scheduled' | 'cancelled' | 'expired';
|
|
1826
|
+
type StoreSubscriptionSource = 'signup' | 'admin' | 'import';
|
|
1827
|
+
type StoreSubscriptionProvider = {
|
|
1828
|
+
type: 'stripe';
|
|
1829
|
+
customer_id: string;
|
|
1830
|
+
subscription_id?: string;
|
|
1831
|
+
price_id?: string;
|
|
1832
|
+
};
|
|
1833
|
+
interface StoreSubscriptionPayment {
|
|
1834
|
+
currency: string;
|
|
1835
|
+
market: string;
|
|
1836
|
+
provider?: StoreSubscriptionProvider;
|
|
1950
1837
|
}
|
|
1951
|
-
interface
|
|
1838
|
+
interface StoreSubscription {
|
|
1952
1839
|
id: string;
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
status?: string;
|
|
1963
|
-
sort_field?: string;
|
|
1964
|
-
sort_direction?: "asc" | "desc";
|
|
1965
|
-
created_at_from?: number;
|
|
1966
|
-
created_at_to?: number;
|
|
1840
|
+
target: string;
|
|
1841
|
+
plan_id: string;
|
|
1842
|
+
pending_plan_id: string | null;
|
|
1843
|
+
payment: StoreSubscriptionPayment;
|
|
1844
|
+
status: StoreSubscriptionStatus;
|
|
1845
|
+
start_date: number;
|
|
1846
|
+
end_date: number;
|
|
1847
|
+
token: string;
|
|
1848
|
+
source: StoreSubscriptionSource;
|
|
1967
1849
|
}
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1850
|
+
type AudienceSubscriptionStatus = 'pending' | 'active' | 'cancellation_scheduled' | 'cancelled' | 'expired';
|
|
1851
|
+
type AudienceSubscriptionSource = 'signup' | 'admin' | 'import';
|
|
1852
|
+
type AudienceSubscriptionProvider = {
|
|
1853
|
+
type: 'stripe';
|
|
1854
|
+
customer_id: string;
|
|
1855
|
+
subscription_id?: string;
|
|
1856
|
+
price_id?: string;
|
|
1857
|
+
};
|
|
1858
|
+
interface AudienceSubscriptionPayment {
|
|
1859
|
+
currency: string;
|
|
1860
|
+
market: string;
|
|
1861
|
+
provider?: AudienceSubscriptionProvider;
|
|
1972
1862
|
}
|
|
1973
|
-
interface
|
|
1863
|
+
interface AudienceSubscription {
|
|
1974
1864
|
id: string;
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1865
|
+
store_id: string;
|
|
1866
|
+
customer_id: string;
|
|
1867
|
+
audience_id: string;
|
|
1868
|
+
plan_id: string;
|
|
1869
|
+
pending_plan_id: string | null;
|
|
1870
|
+
payment: AudienceSubscriptionPayment;
|
|
1871
|
+
status: AudienceSubscriptionStatus;
|
|
1872
|
+
start_date: number;
|
|
1873
|
+
end_date: number;
|
|
1874
|
+
token: string;
|
|
1875
|
+
source: AudienceSubscriptionSource;
|
|
1876
|
+
created_at: number;
|
|
1877
|
+
updated_at: number;
|
|
1984
1878
|
}
|
|
1985
|
-
interface
|
|
1879
|
+
interface Store {
|
|
1986
1880
|
id: string;
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1881
|
+
key: string;
|
|
1882
|
+
timezone: string;
|
|
1883
|
+
languages?: Language[];
|
|
1884
|
+
emails?: StoreEmails;
|
|
1885
|
+
subscription?: StoreSubscription;
|
|
1886
|
+
counts?: Record<string, number>;
|
|
1993
1887
|
}
|
|
1994
|
-
interface
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
sort_direction?: "asc" | "desc";
|
|
2002
|
-
created_at_from?: number;
|
|
2003
|
-
created_at_to?: number;
|
|
1888
|
+
interface EshopStoreState {
|
|
1889
|
+
store_id: string;
|
|
1890
|
+
selected_shipping_method_id: string | null;
|
|
1891
|
+
user_token: string | null;
|
|
1892
|
+
processing_checkout: boolean;
|
|
1893
|
+
loading: boolean;
|
|
1894
|
+
error: string | null;
|
|
2004
1895
|
}
|
|
2005
|
-
interface
|
|
1896
|
+
interface Block {
|
|
2006
1897
|
id: string;
|
|
2007
|
-
|
|
2008
|
-
|
|
1898
|
+
key: string;
|
|
1899
|
+
type: string;
|
|
1900
|
+
properties?: any;
|
|
1901
|
+
value?: any;
|
|
2009
1902
|
}
|
|
2010
|
-
|
|
1903
|
+
type TaxonomySchemaType = "text" | "number" | "boolean" | "geo_location";
|
|
1904
|
+
interface TaxonomySchema {
|
|
2011
1905
|
id: string;
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
1906
|
+
key: string;
|
|
1907
|
+
type: TaxonomySchemaType;
|
|
1908
|
+
value?: string[];
|
|
1909
|
+
min?: number | null;
|
|
1910
|
+
max?: number | null;
|
|
2015
1911
|
}
|
|
2016
|
-
interface
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
ids?: string[];
|
|
2022
|
-
query?: string;
|
|
2023
|
-
key?: string;
|
|
2024
|
-
status?: string;
|
|
2025
|
-
sort_field?: string;
|
|
2026
|
-
sort_direction?: "asc" | "desc";
|
|
2027
|
-
created_at_from?: number;
|
|
2028
|
-
created_at_to?: number;
|
|
1912
|
+
interface TaxonomyField {
|
|
1913
|
+
id: string;
|
|
1914
|
+
key: string;
|
|
1915
|
+
type: TaxonomySchemaType;
|
|
1916
|
+
value: any;
|
|
2029
1917
|
}
|
|
2030
|
-
interface
|
|
2031
|
-
business_id?: string;
|
|
1918
|
+
interface TaxonomyFieldQuery {
|
|
2032
1919
|
key: string;
|
|
2033
|
-
|
|
2034
|
-
|
|
1920
|
+
type: TaxonomySchemaType;
|
|
1921
|
+
operation?: string;
|
|
1922
|
+
value: any;
|
|
1923
|
+
center?: {
|
|
1924
|
+
lat: number;
|
|
1925
|
+
lon: number;
|
|
1926
|
+
};
|
|
1927
|
+
radius?: number;
|
|
2035
1928
|
}
|
|
2036
|
-
interface
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
key?: string;
|
|
2040
|
-
parent_id?: string | null;
|
|
2041
|
-
schema?: any[];
|
|
2042
|
-
status?: string;
|
|
1929
|
+
interface TaxonomyEntry {
|
|
1930
|
+
taxonomy_id: string;
|
|
1931
|
+
fields: TaxonomyField[];
|
|
2043
1932
|
}
|
|
2044
|
-
interface
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
business_id?: string;
|
|
1933
|
+
interface TaxonomyQuery {
|
|
1934
|
+
taxonomy_id: string;
|
|
1935
|
+
query: TaxonomyFieldQuery[];
|
|
2048
1936
|
}
|
|
2049
|
-
|
|
1937
|
+
type FormSchemaType = "text" | "number" | "boolean" | "date" | "geo_location" | "select";
|
|
1938
|
+
interface FormSchema {
|
|
2050
1939
|
id: string;
|
|
2051
|
-
|
|
1940
|
+
key: string;
|
|
1941
|
+
type: FormSchemaType;
|
|
1942
|
+
required?: boolean;
|
|
1943
|
+
min?: number | null;
|
|
1944
|
+
max?: number | null;
|
|
1945
|
+
options?: string[];
|
|
2052
1946
|
}
|
|
2053
|
-
|
|
1947
|
+
type FormFieldType = "text" | "number" | "boolean" | "date" | "geo_location" | "select";
|
|
1948
|
+
interface FormField {
|
|
2054
1949
|
id: string;
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
}
|
|
2059
|
-
interface LogoutParams {
|
|
2060
|
-
}
|
|
2061
|
-
interface GetBusinessesParams {
|
|
2062
|
-
query?: string;
|
|
2063
|
-
limit?: number;
|
|
2064
|
-
cursor?: string;
|
|
2065
|
-
sort_field?: string;
|
|
2066
|
-
sort_direction?: "asc" | "desc";
|
|
2067
|
-
}
|
|
2068
|
-
interface GetSubscriptionPlansParams {
|
|
2069
|
-
}
|
|
2070
|
-
interface SetupAnalyticsParams {
|
|
2071
|
-
[key: string]: any;
|
|
1950
|
+
key: string;
|
|
1951
|
+
type: FormFieldType;
|
|
1952
|
+
value?: any;
|
|
2072
1953
|
}
|
|
2073
|
-
interface
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
limit: number;
|
|
2077
|
-
ids?: string[];
|
|
2078
|
-
query?: string;
|
|
2079
|
-
mime_type?: string;
|
|
2080
|
-
sort_field?: string;
|
|
2081
|
-
sort_direction?: 'asc' | 'desc';
|
|
1954
|
+
interface FormEntry {
|
|
1955
|
+
form_id: string;
|
|
1956
|
+
fields: FormField[];
|
|
2082
1957
|
}
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
business_id?: string;
|
|
1958
|
+
type BlockType = "text" | "localized_text" | "number" | "boolean" | "list" | "map" | "relationship_entry" | "relationship_media" | "markdown" | "geo_location";
|
|
1959
|
+
interface GeoLocationBlockProperties {
|
|
2086
1960
|
}
|
|
2087
|
-
|
|
2088
|
-
|
|
1961
|
+
type GeoLocationValue = GeoLocation;
|
|
1962
|
+
interface GeoLocationBlock extends Block {
|
|
1963
|
+
type: "geo_location";
|
|
1964
|
+
properties: GeoLocationBlockProperties;
|
|
1965
|
+
value: GeoLocation | null;
|
|
2089
1966
|
}
|
|
2090
|
-
|
|
1967
|
+
type Access = 'public' | 'private';
|
|
1968
|
+
interface MediaResolution {
|
|
2091
1969
|
id: string;
|
|
2092
|
-
|
|
1970
|
+
size: string;
|
|
1971
|
+
url: string;
|
|
2093
1972
|
}
|
|
2094
|
-
interface
|
|
1973
|
+
interface Media {
|
|
2095
1974
|
id: string;
|
|
2096
|
-
|
|
1975
|
+
resolutions: {
|
|
1976
|
+
[key: string]: MediaResolution;
|
|
1977
|
+
};
|
|
1978
|
+
mime_type: string;
|
|
1979
|
+
title?: string | null;
|
|
1980
|
+
description?: string | null;
|
|
1981
|
+
alt?: string | null;
|
|
1982
|
+
entity: string;
|
|
1983
|
+
metadata?: string | null;
|
|
1984
|
+
created_at: number;
|
|
1985
|
+
slug: Record<string, string>;
|
|
2097
1986
|
}
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
provider_id?: string;
|
|
1987
|
+
interface ApiResponse<T> {
|
|
1988
|
+
success: boolean;
|
|
1989
|
+
data?: T;
|
|
1990
|
+
error?: string;
|
|
1991
|
+
cursor?: string;
|
|
1992
|
+
total?: number;
|
|
2105
1993
|
}
|
|
2106
|
-
interface
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
1994
|
+
interface PaginatedResponse<T> {
|
|
1995
|
+
data: T[];
|
|
1996
|
+
meta?: {
|
|
1997
|
+
total: number;
|
|
1998
|
+
page: number;
|
|
1999
|
+
per_page: number;
|
|
2000
|
+
};
|
|
2110
2001
|
}
|
|
2111
|
-
interface
|
|
2112
|
-
|
|
2113
|
-
|
|
2002
|
+
interface BookingStoreState {
|
|
2003
|
+
current_step: number;
|
|
2004
|
+
total_steps: number;
|
|
2005
|
+
steps: Record<number, {
|
|
2006
|
+
name: string;
|
|
2007
|
+
label_key: string;
|
|
2008
|
+
}>;
|
|
2009
|
+
weekdays: string[];
|
|
2010
|
+
month_year: string;
|
|
2011
|
+
days: any[];
|
|
2012
|
+
current: Date;
|
|
2013
|
+
selected_date: string | null;
|
|
2014
|
+
slots: any[];
|
|
2015
|
+
selected_slot: any | null;
|
|
2016
|
+
selected_provider: any | null;
|
|
2017
|
+
providers: any[];
|
|
2018
|
+
loading: boolean;
|
|
2019
|
+
start_date: string | null;
|
|
2020
|
+
end_date: string | null;
|
|
2021
|
+
guest_token: string | null;
|
|
2022
|
+
service: any | null;
|
|
2023
|
+
store: Store | null;
|
|
2024
|
+
currency: string;
|
|
2025
|
+
booking_forms: FormEntry[];
|
|
2026
|
+
api_url: string;
|
|
2027
|
+
store_id: string;
|
|
2028
|
+
timezone: string;
|
|
2029
|
+
tz_groups: any;
|
|
2030
|
+
items: BookingCartItem[];
|
|
2031
|
+
allowed_payment_methods: string[];
|
|
2032
|
+
payment_config: {
|
|
2033
|
+
provider: {
|
|
2034
|
+
publishable_key: string;
|
|
2035
|
+
currency: string;
|
|
2036
|
+
} | null;
|
|
2037
|
+
enabled: boolean;
|
|
2038
|
+
};
|
|
2114
2039
|
}
|
|
2115
|
-
|
|
2116
|
-
|
|
2040
|
+
type BookingServiceStatus = 'active' | 'draft' | 'archived';
|
|
2041
|
+
type BookingProviderStatus = 'active' | 'draft' | 'archived';
|
|
2042
|
+
type ProductStatus = 'active' | 'draft' | 'archived';
|
|
2043
|
+
type CustomerStatus = 'active' | 'draft' | 'archived';
|
|
2044
|
+
type AudienceStatus = 'active' | 'draft' | 'archived';
|
|
2045
|
+
type AgentChatStatus = 'active' | 'draft' | 'archived';
|
|
2046
|
+
type WorkflowStatus = 'active' | 'draft' | 'archived';
|
|
2047
|
+
type PromoCodeStatus = 'active' | 'draft' | 'archived';
|
|
2048
|
+
type NodeStatus = 'active' | 'draft' | 'archived';
|
|
2049
|
+
type EmailTemplateStatus = 'active' | 'draft' | 'archived';
|
|
2050
|
+
type FormStatus = 'active' | 'draft' | 'archived';
|
|
2051
|
+
type TaxonomyStatus = 'active' | 'draft' | 'archived';
|
|
2052
|
+
type BookingCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
2053
|
+
type OrderCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
2054
|
+
type BookingItemStatus = {
|
|
2055
|
+
status: 'pending';
|
|
2056
|
+
expires_at: number;
|
|
2057
|
+
} | {
|
|
2058
|
+
status: 'confirmed';
|
|
2059
|
+
} | {
|
|
2060
|
+
status: 'cancelled';
|
|
2061
|
+
reason: BookingCancellationReason;
|
|
2062
|
+
};
|
|
2063
|
+
type OrderItemStatus = {
|
|
2064
|
+
status: 'pending';
|
|
2065
|
+
expires_at: number;
|
|
2066
|
+
} | {
|
|
2067
|
+
status: 'confirmed';
|
|
2068
|
+
} | {
|
|
2069
|
+
status: 'cancelled';
|
|
2070
|
+
reason: OrderCancellationReason;
|
|
2071
|
+
};
|
|
2072
|
+
type BookingPaymentStatus = {
|
|
2073
|
+
status: 'pending';
|
|
2074
|
+
at: number;
|
|
2075
|
+
} | {
|
|
2076
|
+
status: 'authorized';
|
|
2077
|
+
at: number;
|
|
2078
|
+
amount: number;
|
|
2079
|
+
} | {
|
|
2080
|
+
status: 'captured';
|
|
2081
|
+
at: number;
|
|
2082
|
+
amount: number;
|
|
2083
|
+
} | {
|
|
2084
|
+
status: 'failed';
|
|
2085
|
+
at: number;
|
|
2086
|
+
reason?: string;
|
|
2087
|
+
};
|
|
2088
|
+
type OrderPaymentStatus = {
|
|
2089
|
+
status: 'pending';
|
|
2090
|
+
at: number;
|
|
2091
|
+
} | {
|
|
2092
|
+
status: 'authorized';
|
|
2093
|
+
at: number;
|
|
2094
|
+
amount: number;
|
|
2095
|
+
} | {
|
|
2096
|
+
status: 'captured';
|
|
2097
|
+
at: number;
|
|
2098
|
+
amount: number;
|
|
2099
|
+
} | {
|
|
2100
|
+
status: 'failed';
|
|
2101
|
+
at: number;
|
|
2102
|
+
reason?: string;
|
|
2103
|
+
};
|
|
2104
|
+
interface BookingItemSnapshot {
|
|
2105
|
+
service_key: string;
|
|
2117
2106
|
provider_key: string;
|
|
2118
|
-
|
|
2107
|
+
price: Price;
|
|
2119
2108
|
}
|
|
2120
|
-
interface
|
|
2109
|
+
interface TimeRange {
|
|
2121
2110
|
from: number;
|
|
2122
2111
|
to: number;
|
|
2123
|
-
providers: ProviderAvailability[];
|
|
2124
2112
|
}
|
|
2125
|
-
interface
|
|
2113
|
+
interface BookingItem {
|
|
2126
2114
|
id: string;
|
|
2127
2115
|
service_id: string;
|
|
2128
2116
|
provider_id: string;
|
|
2117
|
+
store_id: string;
|
|
2118
|
+
booking_id: string;
|
|
2129
2119
|
from: number;
|
|
2130
2120
|
to: number;
|
|
2131
|
-
|
|
2132
|
-
|
|
2121
|
+
forms: FormEntry[];
|
|
2122
|
+
snapshot: BookingItemSnapshot;
|
|
2123
|
+
status: BookingItemStatus;
|
|
2133
2124
|
}
|
|
2134
|
-
interface
|
|
2135
|
-
|
|
2125
|
+
interface Booking {
|
|
2126
|
+
id: string;
|
|
2127
|
+
number: string;
|
|
2128
|
+
customer_id: string;
|
|
2129
|
+
verified: boolean;
|
|
2130
|
+
forms: FormEntry[];
|
|
2131
|
+
store_id: string;
|
|
2132
|
+
service_ids: string[];
|
|
2133
|
+
provider_ids: string[];
|
|
2134
|
+
payment: BookingPayment;
|
|
2135
|
+
store?: Store;
|
|
2136
|
+
account?: any;
|
|
2137
|
+
items: BookingItem[];
|
|
2138
|
+
audience_id?: string;
|
|
2139
|
+
history?: {
|
|
2140
|
+
action: string;
|
|
2141
|
+
reason?: string;
|
|
2142
|
+
timestamp: number;
|
|
2143
|
+
}[];
|
|
2144
|
+
fired_reminders: number[];
|
|
2145
|
+
created_at: number;
|
|
2146
|
+
last_modified: number;
|
|
2147
|
+
}
|
|
2148
|
+
interface Node {
|
|
2149
|
+
id: string;
|
|
2136
2150
|
key: string;
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2151
|
+
store_id: string;
|
|
2152
|
+
parent_id?: string | null;
|
|
2153
|
+
blocks: Block[];
|
|
2154
|
+
taxonomies: TaxonomyEntry[];
|
|
2155
|
+
status: NodeStatus;
|
|
2156
|
+
slug: Record<string, string>;
|
|
2157
|
+
children: Node[];
|
|
2158
|
+
created_at: number;
|
|
2159
|
+
updated_at: number;
|
|
2141
2160
|
}
|
|
2142
|
-
interface
|
|
2161
|
+
interface EmailTemplate {
|
|
2143
2162
|
id: string;
|
|
2144
|
-
business_id?: string;
|
|
2145
2163
|
key: string;
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2164
|
+
store_id: string;
|
|
2165
|
+
subject: Record<string, string>;
|
|
2166
|
+
body: string;
|
|
2167
|
+
from_name: string;
|
|
2168
|
+
from_email: string;
|
|
2169
|
+
reply_to?: string;
|
|
2170
|
+
preheader?: string;
|
|
2171
|
+
status: EmailTemplateStatus;
|
|
2172
|
+
created_at: number;
|
|
2173
|
+
updated_at: number;
|
|
2150
2174
|
}
|
|
2151
|
-
interface
|
|
2175
|
+
interface Form {
|
|
2152
2176
|
id: string;
|
|
2153
|
-
|
|
2177
|
+
key: string;
|
|
2178
|
+
store_id: string;
|
|
2179
|
+
schema: FormSchema[];
|
|
2180
|
+
status: FormStatus;
|
|
2181
|
+
created_at: number;
|
|
2182
|
+
updated_at: number;
|
|
2154
2183
|
}
|
|
2155
|
-
interface
|
|
2184
|
+
interface FormSubmission {
|
|
2156
2185
|
id: string;
|
|
2157
|
-
|
|
2186
|
+
form_id: string;
|
|
2187
|
+
store_id: string;
|
|
2188
|
+
fields: FormField[];
|
|
2189
|
+
created_at: number;
|
|
2158
2190
|
}
|
|
2159
|
-
interface
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
created_at_from?: number;
|
|
2169
|
-
created_at_to?: number;
|
|
2191
|
+
interface Taxonomy {
|
|
2192
|
+
id: string;
|
|
2193
|
+
key: string;
|
|
2194
|
+
store_id: string;
|
|
2195
|
+
parent_id?: string | null;
|
|
2196
|
+
schema?: TaxonomySchema[];
|
|
2197
|
+
status: TaxonomyStatus;
|
|
2198
|
+
created_at: number;
|
|
2199
|
+
updated_at: number;
|
|
2170
2200
|
}
|
|
2171
|
-
interface
|
|
2172
|
-
|
|
2173
|
-
|
|
2201
|
+
interface ServiceDuration {
|
|
2202
|
+
duration: number;
|
|
2203
|
+
is_pause: boolean;
|
|
2174
2204
|
}
|
|
2175
|
-
interface
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
status?: string;
|
|
2179
|
-
limit?: number;
|
|
2180
|
-
cursor?: string;
|
|
2205
|
+
interface WorkingHour {
|
|
2206
|
+
from: number;
|
|
2207
|
+
to: number;
|
|
2181
2208
|
}
|
|
2182
|
-
interface
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
business_id?: string;
|
|
2209
|
+
interface WorkingDay {
|
|
2210
|
+
day: string;
|
|
2211
|
+
working_hours: WorkingHour[];
|
|
2186
2212
|
}
|
|
2187
|
-
interface
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
confirm_template_id?: string;
|
|
2213
|
+
interface SpecificDate {
|
|
2214
|
+
date: number;
|
|
2215
|
+
working_hours: WorkingHour[];
|
|
2191
2216
|
}
|
|
2192
|
-
interface
|
|
2217
|
+
interface ServiceProvider {
|
|
2193
2218
|
id: string;
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2219
|
+
service_id: string;
|
|
2220
|
+
provider_id: string;
|
|
2221
|
+
store_id: string;
|
|
2222
|
+
working_days: WorkingDay[];
|
|
2223
|
+
specific_dates: SpecificDate[];
|
|
2224
|
+
prices: Price[];
|
|
2225
|
+
durations: ServiceDuration[];
|
|
2226
|
+
slot_interval: number;
|
|
2227
|
+
forms: FormEntry[];
|
|
2228
|
+
reminders: number[];
|
|
2229
|
+
min_advance: number;
|
|
2230
|
+
max_advance: number;
|
|
2231
|
+
created_at: number;
|
|
2232
|
+
updated_at: number;
|
|
2197
2233
|
}
|
|
2198
|
-
interface
|
|
2199
|
-
id
|
|
2200
|
-
key
|
|
2234
|
+
interface BookingService {
|
|
2235
|
+
id: string;
|
|
2236
|
+
key: string;
|
|
2237
|
+
slug: Record<string, string>;
|
|
2238
|
+
store_id: string;
|
|
2239
|
+
blocks: Block[];
|
|
2240
|
+
taxonomies: TaxonomyEntry[];
|
|
2241
|
+
created_at: number;
|
|
2242
|
+
updated_at: number;
|
|
2243
|
+
status: BookingServiceStatus;
|
|
2201
2244
|
}
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
limit?: number;
|
|
2207
|
-
cursor?: string;
|
|
2245
|
+
type Service = BookingService;
|
|
2246
|
+
interface ProviderTimelinePoint {
|
|
2247
|
+
timestamp: number;
|
|
2248
|
+
booked: number;
|
|
2208
2249
|
}
|
|
2209
|
-
interface
|
|
2250
|
+
interface BookingProvider {
|
|
2210
2251
|
id: string;
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2252
|
+
key: string;
|
|
2253
|
+
slug: Record<string, string>;
|
|
2254
|
+
store_id: string;
|
|
2255
|
+
status: BookingProviderStatus;
|
|
2256
|
+
blocks: Block[];
|
|
2257
|
+
taxonomies: TaxonomyEntry[];
|
|
2258
|
+
timeline: ProviderTimelinePoint[];
|
|
2259
|
+
created_at: number;
|
|
2260
|
+
updated_at: number;
|
|
2216
2261
|
}
|
|
2217
|
-
|
|
2218
|
-
|
|
2262
|
+
type Provider = BookingProvider;
|
|
2263
|
+
interface WorkflowEdge {
|
|
2264
|
+
source: string;
|
|
2265
|
+
target: string;
|
|
2266
|
+
output: string;
|
|
2267
|
+
back_edge: boolean;
|
|
2219
2268
|
}
|
|
2220
|
-
interface
|
|
2269
|
+
interface Workflow {
|
|
2221
2270
|
id: string;
|
|
2222
|
-
|
|
2223
|
-
|
|
2271
|
+
key: string;
|
|
2272
|
+
store_id: string;
|
|
2273
|
+
secret: string;
|
|
2274
|
+
status: WorkflowStatus;
|
|
2275
|
+
nodes: Record<string, WorkflowNode>;
|
|
2276
|
+
edges: WorkflowEdge[];
|
|
2277
|
+
schedule?: string;
|
|
2278
|
+
created_at: number;
|
|
2279
|
+
updated_at: number;
|
|
2224
2280
|
}
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2281
|
+
type WorkflowNode = WorkflowTriggerNode | WorkflowHttpNode | WorkflowSwitchNode | WorkflowTransformNode | WorkflowLoopNode;
|
|
2282
|
+
interface WorkflowTriggerNode {
|
|
2283
|
+
type: 'trigger';
|
|
2284
|
+
event?: string;
|
|
2285
|
+
delay_ms?: number;
|
|
2286
|
+
schema?: Block[];
|
|
2231
2287
|
}
|
|
2232
|
-
interface
|
|
2233
|
-
|
|
2234
|
-
|
|
2288
|
+
interface WorkflowHttpNode {
|
|
2289
|
+
type: 'http';
|
|
2290
|
+
method: WorkflowHttpMethod;
|
|
2291
|
+
url: string;
|
|
2292
|
+
headers?: Record<string, string>;
|
|
2293
|
+
body?: any;
|
|
2294
|
+
timeout_ms?: number;
|
|
2295
|
+
integration_id?: string;
|
|
2296
|
+
integration_provider_id?: string;
|
|
2297
|
+
delay_ms?: number;
|
|
2298
|
+
retries?: number;
|
|
2299
|
+
retry_delay_ms?: number;
|
|
2235
2300
|
}
|
|
2236
|
-
interface
|
|
2237
|
-
|
|
2238
|
-
customer_id: string;
|
|
2301
|
+
interface WorkflowSwitchRule {
|
|
2302
|
+
condition: string;
|
|
2239
2303
|
}
|
|
2240
|
-
interface
|
|
2241
|
-
|
|
2242
|
-
|
|
2304
|
+
interface WorkflowSwitchNode {
|
|
2305
|
+
type: 'switch';
|
|
2306
|
+
rules: WorkflowSwitchRule[];
|
|
2307
|
+
delay_ms?: number;
|
|
2243
2308
|
}
|
|
2244
|
-
interface
|
|
2245
|
-
|
|
2246
|
-
provider: string;
|
|
2309
|
+
interface WorkflowTransformNode {
|
|
2310
|
+
type: 'transform';
|
|
2247
2311
|
code: string;
|
|
2248
|
-
|
|
2312
|
+
delay_ms?: number;
|
|
2249
2313
|
}
|
|
2250
|
-
interface
|
|
2251
|
-
|
|
2252
|
-
|
|
2314
|
+
interface WorkflowLoopNode {
|
|
2315
|
+
type: 'loop';
|
|
2316
|
+
expression: string;
|
|
2317
|
+
delay_ms?: number;
|
|
2253
2318
|
}
|
|
2254
|
-
|
|
2255
|
-
|
|
2319
|
+
type WorkflowHttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
2320
|
+
type ExecutionStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
2321
|
+
interface NodeResult {
|
|
2322
|
+
output: any;
|
|
2323
|
+
route: string;
|
|
2324
|
+
started_at: number;
|
|
2325
|
+
completed_at: number;
|
|
2326
|
+
duration_ms: number;
|
|
2327
|
+
error?: string;
|
|
2256
2328
|
}
|
|
2257
|
-
interface
|
|
2258
|
-
business_id: string;
|
|
2329
|
+
interface WorkflowExecution {
|
|
2259
2330
|
id: string;
|
|
2331
|
+
workflow_id: string;
|
|
2332
|
+
store_id: string;
|
|
2333
|
+
status: ExecutionStatus;
|
|
2334
|
+
input: Record<string, any>;
|
|
2335
|
+
results: Record<string, NodeResult>;
|
|
2336
|
+
error?: string;
|
|
2337
|
+
scheduled_at: number;
|
|
2338
|
+
started_at: number;
|
|
2339
|
+
completed_at?: number;
|
|
2340
|
+
created_at: number;
|
|
2341
|
+
updated_at: number;
|
|
2260
2342
|
}
|
|
2261
|
-
|
|
2262
|
-
|
|
2343
|
+
type AudienceType = {
|
|
2344
|
+
type: 'standard';
|
|
2345
|
+
} | {
|
|
2346
|
+
type: 'confirmation';
|
|
2347
|
+
confirm_template_id: string;
|
|
2348
|
+
} | {
|
|
2349
|
+
type: 'paid';
|
|
2350
|
+
prices: SubscriptionPrice[];
|
|
2351
|
+
payment_integration_id?: string;
|
|
2352
|
+
};
|
|
2353
|
+
interface Audience {
|
|
2354
|
+
id: string;
|
|
2355
|
+
store_id: string;
|
|
2263
2356
|
key: string;
|
|
2264
|
-
|
|
2357
|
+
status: AudienceStatus;
|
|
2358
|
+
type: AudienceType;
|
|
2265
2359
|
}
|
|
2266
|
-
interface
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
key?: string;
|
|
2270
|
-
provider?: IntegrationProvider;
|
|
2360
|
+
interface AudienceAccessResponse {
|
|
2361
|
+
has_access: boolean;
|
|
2362
|
+
subscription?: AudienceSubscription;
|
|
2271
2363
|
}
|
|
2272
|
-
interface
|
|
2273
|
-
|
|
2364
|
+
interface AudienceSubscribeResponse {
|
|
2365
|
+
checkout_url?: string;
|
|
2366
|
+
subscription?: AudienceSubscription;
|
|
2367
|
+
}
|
|
2368
|
+
type EventAction = {
|
|
2369
|
+
action: 'order_created';
|
|
2370
|
+
} | {
|
|
2371
|
+
action: 'order_updated';
|
|
2372
|
+
} | {
|
|
2373
|
+
action: 'order_confirmed';
|
|
2374
|
+
} | {
|
|
2375
|
+
action: 'order_payment_received';
|
|
2376
|
+
data: {
|
|
2377
|
+
amount: number;
|
|
2378
|
+
currency: string;
|
|
2379
|
+
};
|
|
2380
|
+
} | {
|
|
2381
|
+
action: 'order_payment_failed';
|
|
2382
|
+
data: {
|
|
2383
|
+
reason?: string;
|
|
2384
|
+
};
|
|
2385
|
+
} | {
|
|
2386
|
+
action: 'order_refunded';
|
|
2387
|
+
data: {
|
|
2388
|
+
amount: number;
|
|
2389
|
+
currency: string;
|
|
2390
|
+
reason?: string;
|
|
2391
|
+
};
|
|
2392
|
+
} | {
|
|
2393
|
+
action: 'order_cancelled';
|
|
2394
|
+
data: {
|
|
2395
|
+
reason?: string;
|
|
2396
|
+
};
|
|
2397
|
+
} | {
|
|
2398
|
+
action: 'order_shipment_created';
|
|
2399
|
+
data: {
|
|
2400
|
+
shipment_id: string;
|
|
2401
|
+
};
|
|
2402
|
+
} | {
|
|
2403
|
+
action: 'order_shipment_in_transit';
|
|
2404
|
+
data: {
|
|
2405
|
+
shipment_id: string;
|
|
2406
|
+
};
|
|
2407
|
+
} | {
|
|
2408
|
+
action: 'order_shipment_out_for_delivery';
|
|
2409
|
+
data: {
|
|
2410
|
+
shipment_id: string;
|
|
2411
|
+
};
|
|
2412
|
+
} | {
|
|
2413
|
+
action: 'order_shipment_delivered';
|
|
2414
|
+
data: {
|
|
2415
|
+
shipment_id: string;
|
|
2416
|
+
};
|
|
2417
|
+
} | {
|
|
2418
|
+
action: 'order_shipment_failed';
|
|
2419
|
+
data: {
|
|
2420
|
+
shipment_id: string;
|
|
2421
|
+
reason?: string;
|
|
2422
|
+
};
|
|
2423
|
+
} | {
|
|
2424
|
+
action: 'order_shipment_returned';
|
|
2425
|
+
data: {
|
|
2426
|
+
shipment_id: string;
|
|
2427
|
+
};
|
|
2428
|
+
} | {
|
|
2429
|
+
action: 'order_shipment_status_changed';
|
|
2430
|
+
data: {
|
|
2431
|
+
shipment_id: string;
|
|
2432
|
+
from: string;
|
|
2433
|
+
to: string;
|
|
2434
|
+
};
|
|
2435
|
+
} | {
|
|
2436
|
+
action: 'booking_created';
|
|
2437
|
+
} | {
|
|
2438
|
+
action: 'booking_updated';
|
|
2439
|
+
} | {
|
|
2440
|
+
action: 'booking_payment_received';
|
|
2441
|
+
data: {
|
|
2442
|
+
amount: number;
|
|
2443
|
+
currency: string;
|
|
2444
|
+
};
|
|
2445
|
+
} | {
|
|
2446
|
+
action: 'booking_payment_failed';
|
|
2447
|
+
data: {
|
|
2448
|
+
reason?: string;
|
|
2449
|
+
};
|
|
2450
|
+
} | {
|
|
2451
|
+
action: 'booking_refunded';
|
|
2452
|
+
data: {
|
|
2453
|
+
amount: number;
|
|
2454
|
+
currency: string;
|
|
2455
|
+
reason?: string;
|
|
2456
|
+
};
|
|
2457
|
+
} | {
|
|
2458
|
+
action: 'booking_cancelled';
|
|
2459
|
+
data: {
|
|
2460
|
+
reason?: string;
|
|
2461
|
+
};
|
|
2462
|
+
} | {
|
|
2463
|
+
action: 'booking_item_cancelled';
|
|
2464
|
+
data: {
|
|
2465
|
+
item_id: string;
|
|
2466
|
+
refund_amount: number;
|
|
2467
|
+
};
|
|
2468
|
+
} | {
|
|
2469
|
+
action: 'product_created';
|
|
2470
|
+
} | {
|
|
2471
|
+
action: 'product_updated';
|
|
2472
|
+
} | {
|
|
2473
|
+
action: 'product_deleted';
|
|
2474
|
+
} | {
|
|
2475
|
+
action: 'node_created';
|
|
2476
|
+
} | {
|
|
2477
|
+
action: 'node_updated';
|
|
2478
|
+
} | {
|
|
2479
|
+
action: 'node_deleted';
|
|
2480
|
+
} | {
|
|
2481
|
+
action: 'provider_created';
|
|
2482
|
+
} | {
|
|
2483
|
+
action: 'provider_updated';
|
|
2484
|
+
} | {
|
|
2485
|
+
action: 'provider_deleted';
|
|
2486
|
+
} | {
|
|
2487
|
+
action: 'service_created';
|
|
2488
|
+
} | {
|
|
2489
|
+
action: 'service_updated';
|
|
2490
|
+
} | {
|
|
2491
|
+
action: 'service_deleted';
|
|
2492
|
+
} | {
|
|
2493
|
+
action: 'account_created';
|
|
2494
|
+
} | {
|
|
2495
|
+
action: 'account_updated';
|
|
2496
|
+
} | {
|
|
2497
|
+
action: 'account_deleted';
|
|
2498
|
+
} | {
|
|
2499
|
+
action: 'media_created';
|
|
2500
|
+
} | {
|
|
2501
|
+
action: 'media_deleted';
|
|
2502
|
+
} | {
|
|
2503
|
+
action: 'store_created';
|
|
2504
|
+
} | {
|
|
2505
|
+
action: 'store_updated';
|
|
2506
|
+
} | {
|
|
2507
|
+
action: 'store_deleted';
|
|
2508
|
+
} | {
|
|
2509
|
+
action: 'audience_created';
|
|
2510
|
+
} | {
|
|
2511
|
+
action: 'audience_updated';
|
|
2512
|
+
} | {
|
|
2513
|
+
action: 'audience_deleted';
|
|
2514
|
+
};
|
|
2515
|
+
interface Event {
|
|
2274
2516
|
id: string;
|
|
2517
|
+
entity: string;
|
|
2518
|
+
event: EventAction;
|
|
2519
|
+
actor: string;
|
|
2520
|
+
created_at: number;
|
|
2275
2521
|
}
|
|
2276
|
-
|
|
2277
|
-
|
|
2522
|
+
type ShippingStatus = 'pending' | 'label_created' | 'in_transit' | 'out_for_delivery' | 'delivered' | 'failed' | 'returned';
|
|
2523
|
+
interface OrderShipping {
|
|
2524
|
+
carrier: string;
|
|
2525
|
+
service: string;
|
|
2526
|
+
tracking_number?: string | null;
|
|
2527
|
+
tracking_url?: string | null;
|
|
2528
|
+
label_url?: string | null;
|
|
2529
|
+
status: ShippingStatus;
|
|
2278
2530
|
}
|
|
2279
|
-
interface
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
url: string;
|
|
2283
|
-
events: WebhookEventSubscription[];
|
|
2284
|
-
headers: Record<string, string>;
|
|
2285
|
-
secret: string;
|
|
2286
|
-
enabled: boolean;
|
|
2531
|
+
interface ShipmentLine {
|
|
2532
|
+
order_item_id: string;
|
|
2533
|
+
quantity: number;
|
|
2287
2534
|
}
|
|
2288
|
-
interface
|
|
2289
|
-
business_id: string;
|
|
2535
|
+
interface Shipment {
|
|
2290
2536
|
id: string;
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2537
|
+
location_id: string;
|
|
2538
|
+
lines: ShipmentLine[];
|
|
2539
|
+
carrier?: string | null;
|
|
2540
|
+
service?: string | null;
|
|
2541
|
+
tracking_number?: string | null;
|
|
2542
|
+
tracking_url?: string | null;
|
|
2543
|
+
label_url?: string | null;
|
|
2544
|
+
status: ShippingStatus;
|
|
2545
|
+
created_at: number;
|
|
2546
|
+
updated_at: number;
|
|
2297
2547
|
}
|
|
2298
|
-
interface
|
|
2299
|
-
business_id: string;
|
|
2548
|
+
interface ShippingRate {
|
|
2300
2549
|
id: string;
|
|
2550
|
+
provider: string;
|
|
2551
|
+
carrier: string;
|
|
2552
|
+
service: string;
|
|
2553
|
+
display_name: string;
|
|
2554
|
+
amount: number;
|
|
2555
|
+
currency: string;
|
|
2556
|
+
estimated_days?: number | null;
|
|
2301
2557
|
}
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2558
|
+
type ShippingAddress = Address;
|
|
2559
|
+
interface Parcel {
|
|
2560
|
+
length: number;
|
|
2561
|
+
width: number;
|
|
2562
|
+
height: number;
|
|
2563
|
+
weight: number;
|
|
2564
|
+
distance_unit: 'in' | 'cm';
|
|
2565
|
+
mass_unit: 'oz' | 'lb' | 'g' | 'kg';
|
|
2309
2566
|
}
|
|
2310
|
-
interface
|
|
2311
|
-
|
|
2312
|
-
|
|
2567
|
+
interface PurchaseLabelResult {
|
|
2568
|
+
tracking_number: string;
|
|
2569
|
+
tracking_url?: string | null;
|
|
2570
|
+
label_url: string;
|
|
2313
2571
|
carrier: string;
|
|
2314
2572
|
service: string;
|
|
2315
|
-
location_id: string;
|
|
2316
|
-
lines: ShipmentLine[];
|
|
2317
2573
|
}
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
status?: AgentStatus;
|
|
2324
|
-
model_id: string;
|
|
2325
|
-
channel_ids?: string[];
|
|
2574
|
+
interface ShipResult {
|
|
2575
|
+
shipment_id: string;
|
|
2576
|
+
tracking_number: string;
|
|
2577
|
+
tracking_url?: string | null;
|
|
2578
|
+
label_url: string;
|
|
2326
2579
|
}
|
|
2327
|
-
interface
|
|
2580
|
+
interface CustomsItem {
|
|
2581
|
+
description: string;
|
|
2582
|
+
quantity: number;
|
|
2583
|
+
net_weight: string;
|
|
2584
|
+
mass_unit: string;
|
|
2585
|
+
value_amount: string;
|
|
2586
|
+
value_currency: string;
|
|
2587
|
+
origin_country: string;
|
|
2588
|
+
tariff_number?: string | null;
|
|
2589
|
+
}
|
|
2590
|
+
interface CustomsDeclaration {
|
|
2591
|
+
contents_type: string;
|
|
2592
|
+
contents_explanation?: string | null;
|
|
2593
|
+
non_delivery_option: string;
|
|
2594
|
+
certify: boolean;
|
|
2595
|
+
certify_signer: string;
|
|
2596
|
+
items: CustomsItem[];
|
|
2597
|
+
}
|
|
2598
|
+
interface Agent {
|
|
2328
2599
|
id: string;
|
|
2329
|
-
|
|
2600
|
+
store_id: string;
|
|
2330
2601
|
key: string;
|
|
2331
2602
|
prompt: string;
|
|
2332
2603
|
status: AgentStatus;
|
|
2333
2604
|
model_id: string;
|
|
2334
|
-
channel_ids
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
id: string;
|
|
2338
|
-
business_id?: string;
|
|
2339
|
-
}
|
|
2340
|
-
interface GetAgentParams {
|
|
2341
|
-
id: string;
|
|
2342
|
-
business_id?: string;
|
|
2343
|
-
}
|
|
2344
|
-
interface GetAgentsParams {
|
|
2345
|
-
business_id?: string;
|
|
2346
|
-
limit?: number;
|
|
2347
|
-
cursor?: string;
|
|
2605
|
+
channel_ids: string[];
|
|
2606
|
+
created_at: number;
|
|
2607
|
+
updated_at: number;
|
|
2348
2608
|
}
|
|
2349
|
-
interface
|
|
2609
|
+
interface AgentChat {
|
|
2350
2610
|
id: string;
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2611
|
+
store_id: string;
|
|
2612
|
+
agent_id: string;
|
|
2613
|
+
account_id: string;
|
|
2614
|
+
status: AgentChatStatus;
|
|
2615
|
+
rating?: number;
|
|
2616
|
+
rating_comment?: string;
|
|
2617
|
+
created_at: number;
|
|
2618
|
+
updated_at: number;
|
|
2355
2619
|
}
|
|
2356
|
-
interface
|
|
2620
|
+
interface AgentChatMessage {
|
|
2357
2621
|
id: string;
|
|
2358
|
-
|
|
2359
|
-
limit?: number;
|
|
2360
|
-
cursor?: string;
|
|
2361
|
-
}
|
|
2362
|
-
interface GetBusinessChatsParams {
|
|
2363
|
-
business_id?: string;
|
|
2622
|
+
store_id: string;
|
|
2364
2623
|
agent_id?: string;
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
sort_field?: string;
|
|
2368
|
-
sort_direction?: 'asc' | 'desc';
|
|
2369
|
-
limit?: number;
|
|
2370
|
-
cursor?: string;
|
|
2371
|
-
}
|
|
2372
|
-
interface GetAgentChatParams {
|
|
2373
|
-
id: string;
|
|
2374
|
-
business_id?: string;
|
|
2375
|
-
chat_id: string;
|
|
2376
|
-
}
|
|
2377
|
-
interface UpdateAgentChatParams {
|
|
2378
|
-
id: string;
|
|
2379
|
-
business_id?: string;
|
|
2380
|
-
chat_id: string;
|
|
2381
|
-
status: 'active' | 'archived';
|
|
2382
|
-
}
|
|
2383
|
-
interface RateAgentChatParams {
|
|
2384
|
-
id: string;
|
|
2385
|
-
business_id?: string;
|
|
2386
|
-
chat_id: string;
|
|
2387
|
-
rating: number;
|
|
2388
|
-
comment?: string;
|
|
2389
|
-
}
|
|
2390
|
-
interface AuthToken {
|
|
2391
|
-
id: string;
|
|
2392
|
-
access_token: string;
|
|
2393
|
-
refresh_token: string;
|
|
2394
|
-
access_expires_at: number;
|
|
2395
|
-
refresh_expires_at: number;
|
|
2624
|
+
chat_id?: string;
|
|
2625
|
+
message: string;
|
|
2396
2626
|
created_at: number;
|
|
2397
|
-
last_used_at: number;
|
|
2398
|
-
is_verified: boolean;
|
|
2399
|
-
}
|
|
2400
|
-
interface CustomerInfo {
|
|
2401
|
-
id: string;
|
|
2402
|
-
verified: boolean;
|
|
2403
2627
|
}
|
|
2404
|
-
interface
|
|
2628
|
+
interface PromoCode {
|
|
2405
2629
|
id: string;
|
|
2406
|
-
|
|
2407
|
-
refresh_token: string;
|
|
2408
|
-
access_expires_at: number;
|
|
2409
|
-
refresh_expires_at: number;
|
|
2410
|
-
created_at: number;
|
|
2411
|
-
last_used_at: number;
|
|
2412
|
-
is_verified: boolean;
|
|
2413
|
-
user_agent?: string | null;
|
|
2414
|
-
}
|
|
2415
|
-
interface CustomerVerificationCode {
|
|
2630
|
+
store_id: string;
|
|
2416
2631
|
code: string;
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
}
|
|
2421
|
-
interface PromoUsage {
|
|
2422
|
-
promo_code_id: string;
|
|
2632
|
+
discounts: Discount[];
|
|
2633
|
+
conditions: Condition[];
|
|
2634
|
+
status: PromoCodeStatus;
|
|
2423
2635
|
uses: number;
|
|
2424
|
-
}
|
|
2425
|
-
interface Customer {
|
|
2426
|
-
id: string;
|
|
2427
|
-
business_id: string;
|
|
2428
|
-
emails: string[];
|
|
2429
|
-
status: 'active' | 'archived';
|
|
2430
|
-
promo_usage: PromoUsage[];
|
|
2431
|
-
blocks: Block[];
|
|
2432
|
-
taxonomies: TaxonomyEntry[];
|
|
2433
|
-
auth_tokens: CustomerAuthToken[];
|
|
2434
|
-
verification_codes: CustomerVerificationCode[];
|
|
2435
|
-
addresses: Address[];
|
|
2436
|
-
audience_subscriptions: any[];
|
|
2437
2636
|
created_at: number;
|
|
2438
2637
|
updated_at: number;
|
|
2439
2638
|
}
|
|
2440
|
-
interface ConnectCustomerParams {
|
|
2441
|
-
email: string;
|
|
2442
|
-
business_id?: string;
|
|
2443
|
-
}
|
|
2444
|
-
interface CreateCustomerParams {
|
|
2445
|
-
business_id?: string;
|
|
2446
|
-
email: string;
|
|
2447
|
-
blocks?: Block[];
|
|
2448
|
-
taxonomies?: TaxonomyEntry[];
|
|
2449
|
-
}
|
|
2450
|
-
interface UpdateCustomerParams {
|
|
2451
|
-
id: string;
|
|
2452
|
-
business_id?: string;
|
|
2453
|
-
emails?: string[];
|
|
2454
|
-
blocks?: Block[];
|
|
2455
|
-
taxonomies?: TaxonomyEntry[];
|
|
2456
|
-
status?: 'active' | 'archived';
|
|
2457
|
-
addresses?: Address[];
|
|
2458
|
-
}
|
|
2459
|
-
interface GetCustomerParams {
|
|
2460
|
-
id: string;
|
|
2461
|
-
business_id?: string;
|
|
2462
|
-
}
|
|
2463
|
-
interface FindCustomersParams {
|
|
2464
|
-
business_id?: string;
|
|
2465
|
-
query?: string;
|
|
2466
|
-
limit?: number;
|
|
2467
|
-
cursor?: string;
|
|
2468
|
-
sort_field?: string;
|
|
2469
|
-
sort_direction?: string;
|
|
2470
|
-
}
|
|
2471
|
-
interface MergeCustomersParams {
|
|
2472
|
-
target_id: string;
|
|
2473
|
-
source_id: string;
|
|
2474
|
-
business_id?: string;
|
|
2475
|
-
}
|
|
2476
2639
|
|
|
2477
|
-
export { type Access, type AddAudienceSubscriberParams, type AddAudienceSubscriberResponse, type Address, type AgentChatStatus, type AgentStatus, type ApiResponse, type Audience, type AudienceAccessResponse, type AudienceStatus, type AudienceSubscribeResponse, type AudienceSubscriber, type AudienceSubscription, type AudienceSubscriptionPayment, type AudienceSubscriptionProvider, type AudienceSubscriptionSource, type AudienceSubscriptionStatus, type AudienceType, type AuthToken, type AvailabilityResponse, type AvailabilitySlot, type Block, type BlockType, type Booking, type BookingCancellationReason, type BookingCartItem, type BookingCheckoutParams, type BookingItem, type BookingItemSnapshot, type BookingItemStatus, type BookingPayment, type BookingPaymentPromoCode, type BookingPaymentProvider, type BookingPaymentRefund, type BookingPaymentStatus, type BookingPaymentTax, type BookingPaymentTaxLine, type
|
|
2640
|
+
export { type Access, type AccountAddress, type AccountApiToken, type AddAudienceSubscriberParams, type AddAudienceSubscriberResponse, type Address, type Agent, type AgentChat, type AgentChatMessage, type AgentChatStatus, type AgentStatus, type ApiResponse, type Audience, type AudienceAccessResponse, type AudienceStatus, type AudienceSubscribeResponse, type AudienceSubscriber, type AudienceSubscription, type AudienceSubscriptionPayment, type AudienceSubscriptionProvider, type AudienceSubscriptionSource, type AudienceSubscriptionStatus, type AudienceType, type AuthToken, type AvailabilityResponse, type AvailabilitySlot, type Block, type BlockType, type Booking, type BookingCancellationReason, type BookingCartItem, type BookingCheckoutParams, type BookingCreatePart, type BookingItem, type BookingItemSnapshot, type BookingItemStatus, type BookingPayment, type BookingPaymentPromoCode, type BookingPaymentProvider, type BookingPaymentRefund, type BookingPaymentStatus, type BookingPaymentTax, type BookingPaymentTaxLine, type BookingProvider, type BookingProviderStatus, type BookingQuote, type BookingQuoteItem, type BookingService, type BookingServiceStatus, type BookingStoreState, type BookingUpdateItem, type CancelBookingItemParams, type Condition, type CreateAgentParams, type CreateAudienceParams, type CreateBookingParams, type CreateCustomerParams, type CreateEmailTemplateParams, type CreateFormParams, type CreateIntegrationParams, type CreateLocationParams, type CreateMarketParams, type CreateNodeParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreateProductVariantInput, type CreatePromoCodeParams, type CreateProviderParams, type CreateServiceParams, type CreateServiceProviderParams, type CreateStoreParams, type CreateTaxonomyParams, type CreateWebhookParams, type CreateWorkflowParams, type Customer, type CustomerAuthToken, type CustomerDetail, type CustomerInfo, type CustomerStatus, type CustomerVerificationCode, type CustomsDeclaration, type CustomsItem, type DaySlots, type DeleteAccountParams, type DeleteAgentParams, type DeleteAudienceParams, type DeleteEmailTemplateParams, type DeleteFormParams, type DeleteIntegrationParams, type DeleteLocationParams, type DeleteMarketParams, type DeleteNodeParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteServiceParams, type DeleteServiceProviderParams, type DeleteStoreMediaParams, type DeleteStoreParams, type DeleteTaxonomyParams, type DeleteWebhookParams, type DeleteWorkflowParams, type Discount, type EmailTemplate, type EmailTemplateStatus, type EshopCartItem, type EshopItem, type EshopQuoteItem, type EshopStoreState, type Event, type EventAction, type ExecutionStatus, type FindCustomersParams, type FindServiceProvidersParams, type Form, type FormEntry, type FormField, type FormFieldType, type FormSchema, type FormSchemaType, type FormStatus, type FormSubmission, type GalleryItem, type GeoLocation, type GeoLocationBlock, type GeoLocationBlockProperties, type GeoLocationValue, type GetAgentChatParams, type GetAgentChatsParams, type GetAgentParams, type GetAgentsParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAudienceParams, type GetAudienceSubscribersParams, type GetAudiencesParams, type GetAvailabilityParams, type GetBookingParams, type GetBookingQuoteParams, type GetCustomerParams, type GetDeliveryStatsParams, type GetEmailTemplateParams, type GetEmailTemplatesParams, type GetFormParams, type GetFormSubmissionParams, type GetFormSubmissionsParams, type GetFormsParams, type GetIntegrationParams, type GetMeParams, type GetMediaParams, type GetNodeChildrenParams, type GetNodeParams, type GetNodesParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetServiceParams, type GetServicesParams, type GetShippingRatesParams, type GetStoreChatsParams, type GetStoreMediaParams, type GetStoreMediaParams2, type GetStoreParams, type GetStoresParams, type GetSubscriptionPlansParams, type GetTaxonomiesParams, type GetTaxonomyChildrenParams, type GetTaxonomyParams, type GetWorkflowExecutionParams, type GetWorkflowExecutionsParams, type GetWorkflowParams, type GetWorkflowsParams, type HandleInvitationParams, type HistoryEntry, type Integration, type IntegrationProvider, type IntervalPeriod, type InventoryLevel, type InviteUserParams, type Language, type ListIntegrationsParams, type ListWebhooksParams, type Location, type LoginAccountParams, type LogoutParams, type MagicLinkRequestParams, type MagicLinkVerifyParams, type Market, type Media, type MediaResolution, type MergeCustomersParams, type Node, type NodeResult, type NodeStatus, type OAuthConnectParams, type OAuthDisconnectParams, type Order, type OrderCancellationReason, type OrderCheckoutParams, type OrderItem, type OrderItemSnapshot, type OrderItemStatus, type OrderPayment, type OrderPaymentPromoCode, type OrderPaymentProvider, type OrderPaymentRefund, type OrderPaymentStatus, type OrderPaymentTax, type OrderPaymentTaxLine, type OrderQuote, type OrderShipping, type OrderUpdateItem, type PaginatedResponse, type Parcel, type PaymentMethod, PaymentMethodType, type PaymentTaxLine, type Price, type PriceProvider, type ProcessBookingRefundParams, type ProcessOrderRefundParams, type Product, type ProductInventory, type ProductStatus, type ProductVariant, type PromoCode, type PromoCodeStatus, type PromoCodeValidation, type PromoUsage, type Provider, type ProviderAvailability, type ProviderTimelinePoint, type ProviderWithTimeline, type PurchaseLabelResult, type RateAgentChatParams, type RemoveAudienceSubscriberParams, type RemoveMemberParams, type RequestOptions, type RunAgentParams, type SearchAccountsParams, type SearchBookingsParams, type Service, type ServiceDuration, type ServiceProvider, type ServiceProviderInput, type SetCustomerEmailParams, type SetupAnalyticsParams, type ShipParams, type ShipResult, type Shipment, type ShipmentLine, type ShippingAddress, type ShippingMethod, type ShippingRate, type ShippingStatus, type ShippingWeightTier, type Slot, type SlotRange, type SpecificDate, type Store, type StoreEmails, type StoreRole, type StoreSubscription, type StoreSubscriptionPayment, type StoreSubscriptionProvider, type StoreSubscriptionSource, type StoreSubscriptionStatus, type SubmitFormParams, type SubscribeAudienceParams, type SubscribeParams, type SubscriptionInterval, type SubscriptionPrice, type SystemTemplateKey, type Taxonomy, type TaxonomyEntry, type TaxonomyField, type TaxonomyFieldQuery, type TaxonomyQuery, type TaxonomySchema, type TaxonomySchemaType, type TaxonomyStatus, type TestWebhookParams, type TimeRange, type TimelinePoint, type TrackEmailOpenParams, type TriggerNotificationParams, type TriggerWorkflowParams, type UpdateAccountProfileParams, type UpdateAgentChatParams, type UpdateAgentParams, type UpdateAudienceParams, type UpdateBookingParams, type UpdateCustomerParams, type UpdateEmailTemplateParams, type UpdateFormParams, type UpdateFormSubmissionParams, type UpdateIntegrationParams, type UpdateLocationParams, type UpdateMarketParams, type UpdateMediaParams, type UpdateNodeParams, type UpdateOrderParams, type UpdateProductParams, type UpdateProductVariantInput, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateServiceParams, type UpdateServiceProviderParams, type UpdateStoreParams, type UpdateTaxonomyParams, type UpdateWebhookParams, type UpdateWorkflowParams, type UploadStoreMediaParams, type Webhook, type WebhookEventSubscription, type Workflow, type WorkflowEdge, type WorkflowExecution, type WorkflowHttpMethod, type WorkflowHttpNode, type WorkflowLoopNode, type WorkflowNode, type WorkflowStatus, type WorkflowSwitchNode, type WorkflowSwitchRule, type WorkflowTransformNode, type WorkflowTriggerNode, type WorkingDay, type WorkingHour, type Zone, type ZoneLocation };
|