@adtrackify/at-service-common 3.18.4 → 3.18.6

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.
@@ -1,220 +1,504 @@
1
+ export type LineItemFulfillmentStatus = 'fulfilled' | 'not_eligible' | 'partial' | null;
2
+ export type WebhookTopic = 'app/uninstalled' | 'app_subscriptions/update' | 'bulk_operations/finish' | 'carts/create' | 'carts/update' | 'checkouts/create' | 'checkouts/delete' | 'checkouts/update' | 'customers/create' | 'customers/delete' | 'customers/disable' | 'customers/enable' | 'customers/update' | 'draft_orders/create' | 'draft_orders/delete' | 'draft_orders/update' | 'fulfillments/create' | 'fulfillments/update' | 'inventory_items/create' | 'inventory_items/delete' | 'inventory_items/update' | 'inventory_levels/connect' | 'inventory_levels/disconnect' | 'inventory_levels/update' | 'orders/cancelled' | 'orders/create' | 'orders/delete' | 'orders/edited' | 'orders/fulfilled' | 'orders/paid' | 'orders/partially_fulfilled' | 'orders/updated' | 'products/create' | 'products/delete' | 'products/update' | 'refunds/create' | 'shop/update' | 'themes/create' | 'themes/delete' | 'themes/publish' | 'themes/update' | string;
3
+ export type WebhookFormat = 'json' | 'xml';
4
+ export type RecurringApplicationChargeStatus = 'accepted' | 'active' | 'cancelled' | 'declined' | 'expired' | 'frozen' | 'pending';
5
+ export type ProductVariantInventoryPolicy = 'deny' | 'continue';
6
+ export type ProductVariantWeightUnit = 'g' | 'kg' | 'oz' | 'lb';
7
+ export type ProductStatus = 'active' | 'archived' | 'draft';
1
8
  export interface IShop {
9
+ address1: string;
10
+ address2: string;
11
+ city: string;
12
+ country: string;
13
+ country_code: string;
14
+ country_name: string;
15
+ created_at: string;
16
+ county_taxes: string;
17
+ customer_email: string | null;
18
+ currency: string;
19
+ domain: string;
20
+ eligible_for_card_reader_giveaway: boolean;
21
+ eligible_for_payments: boolean;
22
+ enabled_presentment_currencies: string[];
23
+ email: string;
24
+ finances: boolean;
25
+ force_ssl?: boolean;
26
+ google_apps_domain: string | null;
27
+ google_apps_login_enabled: any | null;
28
+ has_discounts: boolean;
29
+ has_gift_cards: boolean;
30
+ has_storefront: boolean;
31
+ iana_timezone: string;
2
32
  id: number;
33
+ latitude: number;
34
+ longitude: number;
35
+ money_format: string;
36
+ money_in_emails_format: string;
37
+ money_with_currency_format: string;
38
+ money_with_currency_in_emails_format: string;
39
+ myshopify_domain: string;
3
40
  name: string;
4
- email: string;
5
- domain: string;
6
- province?: string;
7
- country?: string;
8
- address1?: string;
9
- zip?: string;
10
- city?: string;
11
- source?: string;
12
- phone?: string;
13
- latitude?: number;
14
- longitude?: number;
15
- primary_locale?: string;
16
- address2?: string;
17
- created_at?: string;
18
- updated_at?: string;
19
- country_code?: string;
20
- country_name?: string;
21
- currency?: string;
22
- customer_email?: string;
23
- timezone?: string;
24
- iana_timezone?: string;
25
- shop_owner?: string;
26
- money_format?: string;
27
- money_with_currency_format?: string;
28
- weight_unit?: string;
29
- province_code?: string;
30
- taxes_included?: boolean;
31
- auto_configure_tax_inclusivity?: boolean;
32
- tax_shipping?: boolean;
33
- county_taxes?: boolean;
34
- plan_display_name?: string;
35
- plan_name?: string;
36
- has_discounts?: boolean;
37
- has_gift_cards?: boolean;
38
- myshopify_domain?: string;
39
- google_apps_domain?: string;
40
- google_apps_login_enabled?: boolean;
41
- money_in_emails_format?: string;
42
- money_with_currency_in_emails_format?: string;
43
- eligible_for_payments?: boolean;
44
- requires_extra_payments_agreement?: boolean;
45
- password_enabled?: boolean;
46
- has_storefront?: boolean;
47
- finances?: boolean;
48
- primary_location_id?: number;
49
- checkout_api_supported?: boolean;
50
- multi_location_enabled?: boolean;
51
- setup_required?: boolean;
52
- pre_launch_enabled?: boolean;
53
- enabled_presentment_currencies?: string[];
54
- transactional_sms_disabled?: boolean;
55
- marketing_sms_consent_enabled_at_checkout?: boolean;
41
+ password_enabled: boolean;
42
+ phone: string | null;
43
+ plan_display_name: string;
44
+ plan_name: string;
45
+ pre_launch_enabled: boolean;
46
+ primary_locale: string;
47
+ primary_location_id: number;
48
+ province: string;
49
+ province_code: string;
50
+ requires_extra_payments_agreement: boolean;
51
+ setup_required: boolean;
52
+ shop_owner: string;
53
+ source: string | null;
54
+ tax_shipping: boolean | null;
55
+ taxes_included: true | null;
56
+ timezone: string;
57
+ updated_at: string;
58
+ weight_unit: string;
59
+ zip: string;
56
60
  }
57
61
  export interface IOrder {
58
- id: number;
59
- admin_graphql_api_id?: string;
60
- app_id?: number;
61
- browser_ip?: string;
62
- buyer_accepts_marketing?: boolean;
63
- cancel_reason?: string;
64
- cancelled_at?: string;
65
- cart_token?: string;
66
- checkout_id?: number;
67
- checkout_token?: string;
68
- client_details?: {
69
- accept_language?: string;
70
- browser_height?: number;
71
- browser_ip?: string;
72
- browser_width?: number;
73
- session_hash?: string;
74
- user_agent?: string;
75
- };
76
- closed_at?: string;
77
- confirmation_number?: string;
78
- confirmed?: boolean;
79
- contact_email?: string;
80
- created_at?: string;
81
- currency?: string;
82
- current_subtotal_price?: string;
83
- current_subtotal_price_set?: IMoneySet;
84
- current_total_additional_fees_set?: IMoneySet;
85
- current_total_discounts?: string;
86
- current_total_discounts_set?: IMoneySet;
87
- current_total_duties_set?: IMoneySet;
88
- current_total_price?: string;
89
- current_total_price_set?: IMoneySet;
90
- current_total_tax?: string;
91
- current_total_tax_set?: IMoneySet;
62
+ app_id: number;
63
+ billing_address: IAddress;
64
+ browser_ip: string | null;
65
+ buyer_accepts_marketing: boolean;
66
+ cancel_reason: 'customer' | 'declined' | 'fraud' | 'inventory' | 'other';
67
+ cancelled_at: string | null;
68
+ cart_token: string;
69
+ client_details: IOrderClientDetails;
70
+ closed_at: string | null;
71
+ confirmed: boolean;
72
+ created_at: string;
73
+ currency: string;
74
+ current_subtotal_price: string;
75
+ current_subtotal_price_set: IMoneySet;
76
+ current_total_discounts: string;
77
+ current_total_discounts_set: IMoneySet;
78
+ current_total_duties_set: null | IMoneySet;
79
+ current_total_price: string;
80
+ current_total_price_set: IMoneySet;
81
+ current_total_tax: string;
82
+ current_total_tax_set: IMoneySet;
92
83
  customer?: ICustomer;
93
- customer_locale?: string;
94
- discount_applications?: IDiscountApplication[];
95
- discount_codes?: IDiscountCode[];
96
- email?: string;
97
- estimated_taxes?: boolean;
98
- financial_status?: string;
99
- fulfillment_status?: string;
100
- fulfillments?: IFulfillment[];
101
- landing_site?: string;
102
- landing_site_ref?: string;
103
- line_items?: ILineItem[];
104
- location_id?: number;
105
- merchant_of_record_app_id?: number;
106
- name?: string;
107
- note?: string;
108
- note_attributes?: INoteAttribute[];
109
- number?: number;
110
- order_number?: number;
111
- order_status_url?: string;
112
- original_total_additional_fees_set?: IMoneySet;
113
- original_total_duties_set?: IMoneySet;
114
- payment_gateway_names?: string[];
115
- phone?: string;
116
- po_number?: string;
117
- presentment_currency?: string;
118
- processed_at?: string;
119
- reference?: string;
120
- referring_site?: string;
121
- refunds?: IRefund[];
122
- shipping_address?: IAddress;
123
- billing_address?: IAddress;
124
- shipping_lines?: IShippingLine[];
125
- source_identifier?: string;
126
- source_name?: string;
127
- source_url?: string;
128
- subtotal_price?: string;
129
- subtotal_price_set?: IMoneySet;
130
- tags?: string;
131
- tax_exempt?: boolean;
132
- tax_lines?: ITaxLine[];
133
- taxes_included?: boolean;
134
- test?: boolean;
135
- token?: string;
136
- total_discounts?: string;
137
- total_discounts_set?: IMoneySet;
138
- total_line_items_price?: string;
139
- total_line_items_price_set?: IMoneySet;
140
- total_outstanding?: string;
141
- total_price?: string;
142
- total_price_set?: IMoneySet;
143
- total_shipping_price_set?: IMoneySet;
144
- total_tax?: string;
145
- total_tax_set?: IMoneySet;
146
- total_tip_received?: string;
147
- total_weight?: number;
148
- updated_at?: string;
149
- user_id?: number;
84
+ customer_locale: string;
85
+ discount_applications: IDiscountApplication[];
86
+ discount_codes: IOrderDiscountCode[];
87
+ email: string;
88
+ financial_status: 'authorized' | 'paid' | 'partially_paid' | 'partially_refunded' | 'pending' | 'refunded' | 'voided';
89
+ fulfillments: IFulfillment[];
90
+ fulfillment_status: 'fulfilled' | 'partial' | 'restocked' | null;
91
+ gateway: string;
92
+ id: number;
93
+ landing_site: string;
94
+ line_items: ILineItem[];
95
+ location_id: number | null;
96
+ name: string;
97
+ note: string | null;
98
+ note_attributes: INoteAttribute[];
99
+ number: number;
100
+ order_number: number;
101
+ order_status_url: string;
102
+ payment_details?: IPaymentDetails;
103
+ payment_gateway_names: string[];
104
+ phone: string;
105
+ presentment_currency: string;
106
+ processed_at: string;
107
+ checkout_id: number;
108
+ processing_method: 'checkout' | 'direct' | 'express' | 'manual' | 'offsite';
109
+ referring_site: string;
110
+ refunds: IRefund[];
111
+ shipping_address: IAddress;
112
+ shipping_lines: IShippingLine[];
113
+ source_identifier: string | null;
114
+ source_name: 'web' | 'pos' | 'shopify_draft_order' | 'iphone' | 'android' | string;
115
+ subtotal_price: string;
116
+ subtotal_price_set: IMoneySet;
117
+ tags: string;
118
+ tax_lines: ITaxLine[];
119
+ taxes_included: boolean;
120
+ test: boolean;
121
+ token: string;
122
+ total_discounts: string;
123
+ total_discounts_set: IMoneySet;
124
+ total_line_items_price: string;
125
+ total_line_items_price_set: IMoneySet;
126
+ total_price: string;
127
+ total_price_set: IMoneySet;
128
+ total_shipping_price_set: IMoneySet;
129
+ total_tax: string;
130
+ total_tax_set: IMoneySet;
131
+ total_tip_received: string;
132
+ total_weight: number;
133
+ updated_at: string;
134
+ user_id: number | null;
150
135
  }
151
136
  export interface IProduct {
152
137
  id: number;
153
- title?: string;
154
- body_html?: string;
155
- vendor?: string;
156
- product_type?: string;
157
- created_at?: string;
158
- handle?: string;
159
- updated_at?: string;
160
- published_at?: string;
161
- template_suffix?: string;
162
- published_scope?: string;
163
- tags?: string;
164
- status?: string;
138
+ title: string;
139
+ body_html: string;
140
+ vendor: string;
141
+ product_type: string;
142
+ created_at: string;
143
+ handle: string;
144
+ updated_at: string;
145
+ published_at: string;
146
+ template_suffix: string | null;
147
+ published_scope: string;
148
+ tags: string;
149
+ status: ProductStatus;
150
+ variants: IProductVariant[];
151
+ options: IProductOption[];
152
+ images: IProductImage[];
153
+ image: IProductImage;
154
+ metafields_global_title_tag?: string;
155
+ metafields_global_description_tag?: string;
165
156
  admin_graphql_api_id?: string;
166
- variants?: IVariant[];
167
- options?: IProductOption[];
168
- images?: IProductImage[];
169
- image?: IProductImage;
170
157
  }
171
158
  export interface IRecurringApplicationCharge {
172
159
  id: number;
173
- name?: string;
160
+ name: string;
161
+ price: string;
162
+ status: RecurringApplicationChargeStatus;
163
+ return_url: string;
164
+ billing_on: string | null;
165
+ created_at: string;
166
+ updated_at: string;
167
+ test: boolean | null;
168
+ activated_on: string | null;
169
+ cancelled_on: string | null;
170
+ trial_days: number;
171
+ trial_ends_on: string;
172
+ confirmation_url: string;
173
+ capped_amount: number;
174
+ terms: string;
174
175
  api_client_id?: number;
175
- price?: string;
176
- status?: string;
177
- return_url?: string;
178
- billing_on?: string;
179
- created_at?: string;
180
- updated_at?: string;
181
- test?: boolean;
182
- activated_on?: string;
183
- cancelled_on?: string;
184
- trial_days?: number;
185
- trial_ends_on?: string;
186
176
  decorated_return_url?: string;
187
- confirmation_url?: string;
177
+ balance_used?: number;
178
+ balance_remaining?: number;
179
+ risk_level?: number;
180
+ }
181
+ export interface IUsageCharge {
182
+ id: number;
183
+ description: string;
184
+ price: string;
185
+ created_at: string;
186
+ updated_at: string;
187
+ billing_on: string;
188
+ balance_used: number;
189
+ balance_remaining: number;
190
+ risk_level: number;
191
+ recurring_application_charge_id: number;
192
+ }
193
+ export interface IWebhook {
194
+ id: number;
195
+ address: string;
196
+ topic: WebhookTopic;
197
+ created_at: string;
198
+ updated_at: string;
199
+ format: WebhookFormat;
200
+ fields: string[];
201
+ metafield_namespaces: string[];
202
+ api_version?: string;
203
+ private_metafield_namespaces?: string[];
204
+ }
205
+ export interface ICheckout {
206
+ abandoned_checkout_url: string;
207
+ applied_discount?: ICheckoutDiscount;
208
+ billing_address?: ICustomerAddress;
209
+ buyer_accepts_marketing: boolean;
210
+ buyer_accepts_sms_marketing?: boolean;
211
+ cancel_reason?: 'customer' | 'fraud' | 'inventory' | 'other' | null;
212
+ cart_token: string;
213
+ closed_at: string | null;
214
+ completed_at: string | null;
215
+ created_at: string;
216
+ currency: string;
217
+ customer: ICustomer;
218
+ customer_id: number;
219
+ customer_locale: string;
220
+ device_id: number | null;
221
+ discount_code?: string;
222
+ discount_codes?: ICheckoutDiscount[];
223
+ email: string;
224
+ gateway: string | null;
225
+ gift_cards?: ICheckoutGiftCard;
226
+ id: number;
227
+ landing_site: string;
228
+ line_items: ICheckoutLineItem[];
229
+ location_id: number | null;
230
+ name?: string;
231
+ note: string | null;
232
+ note_attributes: INoteAttribute[];
233
+ order?: ICheckoutOrder;
234
+ payment_due: string;
235
+ payment_url?: string;
236
+ phone: string | null;
237
+ presentment_currency: string;
238
+ referring_site: string;
239
+ request_details?: ICheckoutRequestDetails;
240
+ requires_shipping?: boolean;
241
+ reservation_time?: number;
242
+ reservation_time_left?: number;
243
+ shipping_address: ICustomerAddress;
244
+ shipping_lines: ICheckoutShippingLine[];
245
+ shipping_rates?: ICheckoutShippingRate[];
246
+ shipping_rate?: ICheckoutShippingRate[];
247
+ sms_marketing_phone?: string;
248
+ source?: string;
249
+ source_identifier: string | null;
250
+ source_name: string | null;
251
+ source_url: string | null;
252
+ subtotal_price: string;
253
+ tax_lines: ICheckoutTaxLine[];
254
+ taxes_included: boolean;
255
+ token: string;
256
+ total_discounts: string;
257
+ total_line_items_price: string;
258
+ total_price: string;
259
+ total_tax: string;
260
+ total_weight: number;
261
+ updated_at: string;
262
+ user_id: number | null;
263
+ web_url?: string;
264
+ }
265
+ export type CustomerState = 'declined' | 'disabled' | 'enabled' | 'invited';
266
+ export interface ICustomer {
267
+ accepts_marketing: boolean;
268
+ accepts_marketing_updated_at?: string;
269
+ addresses?: ICustomerAddress[];
270
+ admin_graphql_api_id?: string;
271
+ created_at: string;
272
+ currency: string;
273
+ default_address: ICustomerAddress;
274
+ email: string;
275
+ first_name: string;
276
+ id: number;
277
+ last_name: string;
278
+ last_order_id: number | null;
279
+ last_order_name: string | null;
280
+ marketing_opt_in_level?: string;
281
+ metafield?: IObjectMetafield;
282
+ multipass_identifier: null;
283
+ note: string | null;
284
+ orders_count: number;
285
+ phone: string;
286
+ state: CustomerState;
287
+ tags: string;
288
+ tax_exempt: boolean;
289
+ tax_exemptions?: string[];
290
+ total_spent: string;
291
+ updated_at: string;
292
+ verified_email: boolean;
293
+ }
294
+ export interface ICustomerAddress {
295
+ address1: string;
296
+ address2?: string;
297
+ city: string;
298
+ company: string | null;
299
+ country: string;
300
+ country_code: string;
301
+ country_name: string;
302
+ customer_id: number;
303
+ default: boolean;
304
+ first_name: string;
305
+ id: number;
306
+ last_name: string;
307
+ latitude: number | null;
308
+ longitude: number | null;
309
+ name: string;
310
+ phone: string | null;
311
+ province: string | null;
312
+ province_code: string | null;
313
+ zip: string;
314
+ }
315
+ export interface IOrderLineItem {
316
+ id: number;
317
+ discount_allocations: IDiscountAllocation[];
318
+ fulfillable_quantity: number;
319
+ fulfillment_service: string;
320
+ fulfillment_status: LineItemFulfillmentStatus;
321
+ gift_card: boolean;
322
+ grams: number;
323
+ name: string;
324
+ price: string;
325
+ price_set: IMoneySet;
326
+ product_id: number | null;
327
+ properties: ILineItemProperty[];
328
+ quantity: number;
329
+ requires_shipping: boolean;
330
+ sku: string;
331
+ taxable: boolean;
332
+ tax_lines: ITaxLine[];
333
+ title: string;
334
+ total_discount: string;
335
+ total_discount_set: IMoneySet;
336
+ variant_id: number | null;
337
+ variant_title: string;
338
+ vendor: string;
339
+ pre_tax_price?: string;
340
+ pre_tax_price_set?: IMoneySet;
341
+ tip_payment_gateway?: string;
342
+ tip_payment_method?: string;
343
+ admin_graphql_api_id?: string;
344
+ attributed_staffs?: IAttributedStaff[];
345
+ product_exists?: boolean;
346
+ variant_inventory_management?: string;
347
+ duties?: IDuty[];
348
+ }
349
+ export interface IRefund {
350
+ id: number;
351
+ created_at: string;
352
+ note: string;
353
+ order_id: number;
354
+ processed_at: string;
355
+ restock: string;
356
+ user_id: string;
357
+ order_adjustments: IOrderAdjustment[];
358
+ transactions: ITransaction[];
359
+ refund_line_items: IRefundLineItem[];
360
+ admin_graphql_api_id?: string;
361
+ total_duties_set?: IMoneySet;
362
+ duties?: IRefundDuty[];
363
+ }
364
+ export interface IRefundLineItem {
365
+ id: number;
366
+ line_item: IOrderLineItem;
367
+ line_item_id: number;
368
+ quantity: number;
369
+ restock_type: 'no_restock' | 'cancel' | 'return' | 'legacy_restock';
370
+ location_id: number;
371
+ subtotal: string;
372
+ total_tax: string;
373
+ subtotal_set: IMoneySet;
374
+ total_tax_set: IMoneySet;
375
+ }
376
+ interface IOrderClientDetails {
377
+ accept_language: string | null;
378
+ browser_height: number | null;
379
+ browser_ip: string | null;
380
+ browser_width: number | null;
381
+ session_hash: string | null;
382
+ user_agent: string | null;
383
+ }
384
+ type OrderDiscountCodeType = 'fixed_amount' | 'percentage' | 'shipping';
385
+ interface IOrderDiscountCode {
386
+ amount: number;
387
+ code: string;
388
+ type: OrderDiscountCodeType;
389
+ }
390
+ interface IPaymentDetails {
391
+ avs_result_code: string | null;
392
+ credit_card_bin: string | null;
393
+ credit_card_company: string;
394
+ credit_card_number: string;
395
+ cvv_result_code: string | null;
396
+ }
397
+ interface IObjectMetafield {
398
+ key: string;
399
+ namespace: string;
400
+ value: string | number;
401
+ value_type: 'string' | 'integer';
402
+ description: string | null;
403
+ }
404
+ interface ICheckoutDiscount {
405
+ amount: string;
406
+ applicable: boolean;
407
+ description: string;
408
+ non_applicable_reason: string;
409
+ title: string;
410
+ value: string;
411
+ value_type: 'fixed_amount' | 'percentage';
412
+ }
413
+ interface ICheckoutGiftCard {
414
+ amount_used: string;
415
+ balance: string;
416
+ id: string;
417
+ last_characters: string;
418
+ }
419
+ interface ICheckoutOrder {
420
+ id: number;
421
+ name: string;
422
+ status_url: string;
423
+ }
424
+ interface ICheckoutRequestDetails {
425
+ accept_language: string;
426
+ ip_address: string;
427
+ user_agent: string;
428
+ }
429
+ interface ICheckoutShippingLine {
430
+ api_client_id: number | null;
431
+ applied_discounts: any[];
432
+ carrier_identifier: any | null;
433
+ carrier_service_id: number | null;
434
+ code: string;
435
+ delivery_category: any | null;
436
+ id: string;
437
+ markup: string;
438
+ phone: string | null;
439
+ price: string;
440
+ requested_fulfillment_service_id: number | null;
441
+ source: string;
442
+ tax_lines: any[];
443
+ title: string;
444
+ validation_context: any | null;
445
+ }
446
+ interface ICheckoutShippingRateCheckout {
447
+ subtotal_price: string;
448
+ total_price: string;
449
+ total_tax: string;
450
+ }
451
+ interface ICheckoutShippingRate {
452
+ checkout: ICheckoutShippingRateCheckout;
453
+ delivery_range: string[];
454
+ handle: string;
455
+ price: string;
456
+ requires_phone: boolean;
457
+ title: string;
458
+ }
459
+ interface ICheckoutTaxLine {
460
+ compare_at: number;
461
+ position: number;
462
+ price: string;
463
+ rate: number;
464
+ source: string;
465
+ title: string;
466
+ zone: string;
467
+ }
468
+ interface IObjectMetafield {
469
+ key: string;
470
+ namespace: string;
471
+ value: string | number;
472
+ value_type: 'string' | 'integer';
473
+ description: string | null;
474
+ }
475
+ interface IOrderClientDetails {
476
+ accept_language: string | null;
477
+ browser_height: number | null;
478
+ browser_ip: string | null;
479
+ browser_width: number | null;
480
+ session_hash: string | null;
481
+ user_agent: string | null;
482
+ }
483
+ interface IOrderDiscountCode {
484
+ amount: number;
485
+ code: string;
486
+ type: 'fixed_amount' | 'percentage' | 'shipping';
487
+ }
488
+ interface IPaymentDetails {
489
+ avs_result_code: string | null;
490
+ credit_card_bin: string | null;
491
+ credit_card_company: string;
492
+ credit_card_number: string;
493
+ cvv_result_code: string | null;
188
494
  }
189
495
  interface IMoneySet {
190
- shop_money?: IMoney;
191
- presentment_money?: IMoney;
496
+ shop_money: IMoney;
497
+ presentment_money: IMoney;
192
498
  }
193
499
  interface IMoney {
194
- amount?: string;
195
- currency_code?: string;
196
- }
197
- interface ICustomer {
198
- id?: number;
199
- email?: string;
200
- accepts_marketing?: boolean;
201
- created_at?: string;
202
- updated_at?: string;
203
- first_name?: string;
204
- last_name?: string;
205
- orders_count?: number;
206
- state?: string;
207
- total_spent?: string;
208
- last_order_id?: number;
209
- note?: string;
210
- verified_email?: boolean;
211
- multipass_identifier?: string;
212
- tax_exempt?: boolean;
213
- tags?: string;
214
- last_order_name?: string;
215
- currency?: string;
216
- phone?: string;
217
- default_address?: IAddress;
500
+ amount: string;
501
+ currency_code: string;
218
502
  }
219
503
  interface IAddress {
220
504
  id?: number;
@@ -237,35 +521,130 @@ interface IAddress {
237
521
  latitude?: number;
238
522
  longitude?: number;
239
523
  }
240
- interface ILineItem {
524
+ interface IAttributedStaff {
525
+ id?: string;
526
+ quantity?: number;
527
+ }
528
+ interface ILineItemProperty {
529
+ name?: string;
530
+ value?: string;
531
+ }
532
+ interface IDuty {
533
+ id?: string;
534
+ harmonized_system_code?: string;
535
+ country_code_of_origin?: string;
536
+ shop_money?: IMoney;
537
+ presentment_money?: IMoney;
538
+ tax_lines?: ITaxLine[];
539
+ admin_graphql_api_id?: string;
540
+ }
541
+ interface IDiscountAllocation {
542
+ amount?: string;
543
+ amount_set?: IMoneySet;
544
+ discount_application_index?: number;
545
+ }
546
+ interface IOrderAdjustment {
547
+ id?: number;
548
+ order_id?: number;
549
+ refund_id?: number;
550
+ amount?: string;
551
+ tax_amount?: string;
552
+ kind?: string;
553
+ reason?: string;
554
+ amount_set?: IMoneySet;
555
+ tax_amount_set?: IMoneySet;
556
+ }
557
+ interface ITransaction {
241
558
  id?: number;
242
559
  admin_graphql_api_id?: string;
243
- attributed_staffs?: any[];
244
- fulfillable_quantity?: number;
245
- fulfillment_service?: string;
246
- fulfillment_status?: string;
247
- gift_card?: boolean;
248
- grams?: number;
249
- name?: string;
250
- price?: string;
251
- price_set?: IMoneySet;
252
- product_exists?: boolean;
253
- product_id?: number;
254
- properties?: any[];
255
- quantity?: number;
256
- requires_shipping?: boolean;
257
- sku?: string;
258
- taxable?: boolean;
560
+ amount?: string;
561
+ authorization?: string;
562
+ created_at?: string;
563
+ currency?: string;
564
+ device_id?: number;
565
+ error_code?: string;
566
+ gateway?: string;
567
+ kind?: string;
568
+ location_id?: number;
569
+ message?: string;
570
+ order_id?: number;
571
+ parent_id?: number;
572
+ processed_at?: string;
573
+ receipt?: Record<string, unknown>;
574
+ source_name?: string;
575
+ status?: string;
576
+ test?: boolean;
577
+ user_id?: number;
578
+ }
579
+ interface IRefundDuty {
580
+ duty_id?: number;
581
+ refund_type?: 'FULL' | 'PROPORTIONAL';
582
+ }
583
+ interface ICheckoutLineItem {
584
+ applied_discounts: IAppliedDiscount[];
585
+ compare_at_price: string | null;
586
+ destination_location_id: number;
587
+ discount_codes: IDiscountCode[];
588
+ fulfillment_service: 'api' | 'custom' | 'legacy' | 'manual';
589
+ fulfillment_status?: 'fulfilled' | 'partial' | null;
590
+ gift_card: boolean;
591
+ grams: number;
592
+ key: string;
593
+ line_price: string;
594
+ name: string;
595
+ origin_location_id: number;
596
+ price: string;
597
+ product_id: number;
598
+ properties: Record<string, string> | null;
599
+ quantity: number;
600
+ requires_shipping: boolean;
601
+ sku: string;
602
+ taxable: boolean;
603
+ tax_lines: ITaxLine[];
604
+ title: string;
605
+ variant_id: number;
606
+ variant_title: string;
607
+ vendor: string;
608
+ id?: string;
609
+ image_url?: string;
610
+ discount_allocations?: IDiscountAllocation[];
611
+ }
612
+ interface IAppliedDiscount {
259
613
  title?: string;
260
- total_discount?: string;
614
+ description?: string;
615
+ value?: string;
616
+ value_type?: string;
617
+ amount?: string;
618
+ }
619
+ interface ILineItem {
620
+ id: number;
621
+ fulfillable_quantity: number;
622
+ fulfillment_service: string;
623
+ fulfillment_status: LineItemFulfillmentStatus;
624
+ gift_card: boolean;
625
+ grams: number;
626
+ name: string;
627
+ price: string;
628
+ product_exists: boolean;
629
+ product_id: number;
630
+ properties: ILineItemProperty[];
631
+ quantity: number;
632
+ requires_shipping: boolean;
633
+ sku: string;
634
+ taxable: boolean;
635
+ title: string;
636
+ total_discount: string;
637
+ variant_id: number;
638
+ variant_inventory_management: string;
639
+ variant_title: string;
640
+ vendor: string | null;
641
+ tax_lines: ITaxLine[];
642
+ admin_graphql_api_id?: string;
643
+ attributed_staffs?: IAttributedStaff[];
644
+ price_set?: IMoneySet;
261
645
  total_discount_set?: IMoneySet;
262
- variant_id?: number;
263
- variant_inventory_management?: string;
264
- variant_title?: string;
265
- vendor?: string;
266
- tax_lines?: ITaxLine[];
267
- duties?: any[];
268
- discount_allocations?: any[];
646
+ duties?: IDuty[];
647
+ discount_allocations?: IDiscountAllocation[];
269
648
  }
270
649
  interface IDiscountApplication {
271
650
  type?: string;
@@ -290,8 +669,8 @@ interface IFulfillment {
290
669
  location_id?: number;
291
670
  name?: string;
292
671
  order_id?: number;
293
- origin_address?: any;
294
- receipt?: any;
672
+ origin_address?: IAddress;
673
+ receipt?: Record<string, unknown>;
295
674
  service?: string;
296
675
  shipment_status?: string;
297
676
  status?: string;
@@ -307,21 +686,6 @@ interface INoteAttribute {
307
686
  name?: string;
308
687
  value?: string;
309
688
  }
310
- interface IRefund {
311
- id?: number;
312
- admin_graphql_api_id?: string;
313
- created_at?: string;
314
- note?: string;
315
- order_id?: number;
316
- processed_at?: string;
317
- restock?: boolean;
318
- total_duties_set?: IMoneySet;
319
- user_id?: number;
320
- order_adjustments?: any[];
321
- transactions?: any[];
322
- refund_line_items?: any[];
323
- duties?: any[];
324
- }
325
689
  interface IShippingLine {
326
690
  id?: number;
327
691
  carrier_identifier?: string;
@@ -336,7 +700,7 @@ interface IShippingLine {
336
700
  source?: string;
337
701
  title?: string;
338
702
  tax_lines?: ITaxLine[];
339
- discount_allocations?: any[];
703
+ discount_allocations?: IDiscountAllocation[];
340
704
  }
341
705
  interface ITaxLine {
342
706
  price?: string;
@@ -345,52 +709,58 @@ interface ITaxLine {
345
709
  price_set?: IMoneySet;
346
710
  channel_liable?: boolean;
347
711
  }
348
- interface IVariant {
349
- id?: number;
350
- product_id?: number;
351
- title?: string;
352
- price?: string;
353
- sku?: string;
354
- position?: number;
355
- inventory_policy?: string;
356
- compare_at_price?: string;
357
- fulfillment_service?: string;
358
- inventory_management?: string;
359
- option1?: string;
360
- option2?: string;
361
- option3?: string;
362
- created_at?: string;
363
- updated_at?: string;
364
- taxable?: boolean;
365
- barcode?: string;
366
- grams?: number;
367
- weight?: number;
368
- weight_unit?: string;
369
- inventory_item_id?: number;
370
- inventory_quantity?: number;
371
- old_inventory_quantity?: number;
372
- requires_shipping?: boolean;
712
+ interface IProductVariantPresentmentPriceSet {
713
+ price: IMoney;
714
+ compare_at_price: IMoney;
715
+ }
716
+ interface IProductVariant {
717
+ id: number;
718
+ product_id: number;
719
+ title: string;
720
+ price: string;
721
+ sku: string;
722
+ position: number;
723
+ inventory_policy: ProductVariantInventoryPolicy;
724
+ compare_at_price: string | null;
725
+ fulfillment_service: string;
726
+ inventory_management: string;
727
+ option1: string | null;
728
+ option2: string | null;
729
+ option3: string | null;
730
+ created_at: string;
731
+ updated_at: string;
732
+ taxable: boolean;
733
+ barcode: string;
734
+ grams: number;
735
+ weight: number;
736
+ weight_unit: ProductVariantWeightUnit;
737
+ inventory_item_id: number;
738
+ inventory_quantity: number;
739
+ old_inventory_quantity: number;
740
+ requires_shipping: boolean;
741
+ image_id: number | null;
742
+ tax_code: string | null;
743
+ presentment_prices: IProductVariantPresentmentPriceSet[];
373
744
  admin_graphql_api_id?: string;
374
- image_id?: number;
375
745
  }
376
746
  interface IProductOption {
377
- id?: number;
378
- product_id?: number;
379
- name?: string;
380
- position?: number;
381
- values?: string[];
747
+ id: number;
748
+ product_id: number;
749
+ name: string;
750
+ position: number;
751
+ values: string[];
382
752
  }
383
753
  interface IProductImage {
384
- id?: number;
385
- product_id?: number;
386
- position?: number;
387
- created_at?: string;
388
- updated_at?: string;
389
- alt?: string;
390
- width?: number;
391
- height?: number;
392
- src?: string;
393
- variant_ids?: number[];
754
+ id: number;
755
+ product_id: number;
756
+ position: number;
757
+ created_at: string;
758
+ updated_at: string;
759
+ alt: string | null;
760
+ width: number;
761
+ height: number;
762
+ src: string;
763
+ variant_ids: number[];
394
764
  admin_graphql_api_id?: string;
395
765
  }
396
766
  export {};