@adtrackify/at-service-common 3.18.5 → 3.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/services/events/log-event-service.js +4 -1
- package/dist/cjs/services/events/log-event-service.js.map +1 -1
- package/dist/cjs/types/shopify-rest-types.d.ts +536 -400
- package/dist/esm/services/events/log-event-service.js +4 -1
- package/dist/esm/services/events/log-event-service.js.map +1 -1
- package/dist/esm/types/shopify-rest-types.d.ts +536 -400
- package/package.json +1 -1
|
@@ -1,379 +1,504 @@
|
|
|
1
1
|
export type LineItemFulfillmentStatus = 'fulfilled' | 'not_eligible' | 'partial' | null;
|
|
2
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
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';
|
|
4
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;
|
|
5
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;
|
|
6
40
|
name: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
timezone?: string;
|
|
27
|
-
iana_timezone?: string;
|
|
28
|
-
shop_owner?: string;
|
|
29
|
-
money_format?: string;
|
|
30
|
-
money_with_currency_format?: string;
|
|
31
|
-
weight_unit?: string;
|
|
32
|
-
province_code?: string;
|
|
33
|
-
taxes_included?: boolean;
|
|
34
|
-
auto_configure_tax_inclusivity?: boolean;
|
|
35
|
-
tax_shipping?: boolean;
|
|
36
|
-
county_taxes?: boolean;
|
|
37
|
-
plan_display_name?: string;
|
|
38
|
-
plan_name?: string;
|
|
39
|
-
has_discounts?: boolean;
|
|
40
|
-
has_gift_cards?: boolean;
|
|
41
|
-
myshopify_domain?: string;
|
|
42
|
-
google_apps_domain?: string;
|
|
43
|
-
google_apps_login_enabled?: boolean;
|
|
44
|
-
money_in_emails_format?: string;
|
|
45
|
-
money_with_currency_in_emails_format?: string;
|
|
46
|
-
eligible_for_payments?: boolean;
|
|
47
|
-
requires_extra_payments_agreement?: boolean;
|
|
48
|
-
password_enabled?: boolean;
|
|
49
|
-
has_storefront?: boolean;
|
|
50
|
-
finances?: boolean;
|
|
51
|
-
primary_location_id?: number;
|
|
52
|
-
checkout_api_supported?: boolean;
|
|
53
|
-
multi_location_enabled?: boolean;
|
|
54
|
-
setup_required?: boolean;
|
|
55
|
-
pre_launch_enabled?: boolean;
|
|
56
|
-
enabled_presentment_currencies?: string[];
|
|
57
|
-
transactional_sms_disabled?: boolean;
|
|
58
|
-
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;
|
|
59
60
|
}
|
|
60
61
|
export interface IOrder {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
contact_email?: string;
|
|
83
|
-
created_at?: string;
|
|
84
|
-
currency?: string;
|
|
85
|
-
current_subtotal_price?: string;
|
|
86
|
-
current_subtotal_price_set?: IMoneySet;
|
|
87
|
-
current_total_additional_fees_set?: IMoneySet;
|
|
88
|
-
current_total_discounts?: string;
|
|
89
|
-
current_total_discounts_set?: IMoneySet;
|
|
90
|
-
current_total_duties_set?: IMoneySet;
|
|
91
|
-
current_total_price?: string;
|
|
92
|
-
current_total_price_set?: IMoneySet;
|
|
93
|
-
current_total_tax?: string;
|
|
94
|
-
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;
|
|
95
83
|
customer?: ICustomer;
|
|
96
|
-
customer_locale
|
|
97
|
-
discount_applications
|
|
98
|
-
discount_codes
|
|
99
|
-
email
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
fulfillment_status
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
line_items
|
|
107
|
-
location_id
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
total_tax?: string;
|
|
148
|
-
total_tax_set?: IMoneySet;
|
|
149
|
-
total_tip_received?: string;
|
|
150
|
-
total_weight?: number;
|
|
151
|
-
updated_at?: string;
|
|
152
|
-
user_id?: number;
|
|
153
|
-
gateway?: string;
|
|
154
|
-
processing_method?: string;
|
|
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: IOrderLineItem[];
|
|
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;
|
|
155
135
|
}
|
|
156
136
|
export interface IProduct {
|
|
157
137
|
id: number;
|
|
158
|
-
title
|
|
159
|
-
body_html
|
|
160
|
-
vendor
|
|
161
|
-
product_type
|
|
162
|
-
created_at
|
|
163
|
-
handle
|
|
164
|
-
updated_at
|
|
165
|
-
published_at
|
|
166
|
-
template_suffix
|
|
167
|
-
published_scope
|
|
168
|
-
tags
|
|
169
|
-
status
|
|
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;
|
|
170
156
|
admin_graphql_api_id?: string;
|
|
171
|
-
variants?: IVariant[];
|
|
172
|
-
options?: IProductOption[];
|
|
173
|
-
images?: IProductImage[];
|
|
174
|
-
image?: IProductImage;
|
|
175
157
|
}
|
|
176
158
|
export interface IRecurringApplicationCharge {
|
|
177
159
|
id: number;
|
|
178
|
-
name
|
|
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;
|
|
179
175
|
api_client_id?: number;
|
|
180
|
-
price?: string;
|
|
181
|
-
status?: string;
|
|
182
|
-
return_url?: string;
|
|
183
|
-
billing_on?: string;
|
|
184
|
-
created_at?: string;
|
|
185
|
-
updated_at?: string;
|
|
186
|
-
test?: boolean;
|
|
187
|
-
activated_on?: string;
|
|
188
|
-
cancelled_on?: string;
|
|
189
|
-
trial_days?: number;
|
|
190
|
-
trial_ends_on?: string;
|
|
191
176
|
decorated_return_url?: string;
|
|
192
|
-
confirmation_url?: string;
|
|
193
|
-
capped_amount?: string;
|
|
194
177
|
balance_used?: number;
|
|
195
178
|
balance_remaining?: number;
|
|
196
179
|
risk_level?: number;
|
|
197
180
|
}
|
|
198
181
|
export interface IUsageCharge {
|
|
199
182
|
id: number;
|
|
200
|
-
description
|
|
201
|
-
price
|
|
202
|
-
created_at
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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;
|
|
207
192
|
}
|
|
208
193
|
export interface IWebhook {
|
|
209
194
|
id: number;
|
|
210
|
-
address
|
|
211
|
-
topic
|
|
212
|
-
created_at
|
|
213
|
-
updated_at
|
|
214
|
-
format
|
|
215
|
-
fields
|
|
216
|
-
metafield_namespaces
|
|
195
|
+
address: string;
|
|
196
|
+
topic: WebhookTopic;
|
|
197
|
+
created_at: string;
|
|
198
|
+
updated_at: string;
|
|
199
|
+
format: WebhookFormat;
|
|
200
|
+
fields: string[];
|
|
201
|
+
metafield_namespaces: string[];
|
|
217
202
|
api_version?: string;
|
|
218
203
|
private_metafield_namespaces?: string[];
|
|
219
204
|
}
|
|
220
205
|
export interface ICheckout {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
gateway?: string;
|
|
226
|
-
buyer_accepts_marketing?: boolean;
|
|
227
|
-
created_at?: string;
|
|
228
|
-
updated_at?: string;
|
|
229
|
-
landing_site?: string;
|
|
230
|
-
note?: string;
|
|
231
|
-
note_attributes?: INoteAttribute[];
|
|
232
|
-
referring_site?: string;
|
|
233
|
-
shipping_lines?: IShippingLine[];
|
|
234
|
-
taxes_included?: boolean;
|
|
235
|
-
total_weight?: number;
|
|
236
|
-
currency?: string;
|
|
237
|
-
completed_at?: string;
|
|
238
|
-
closed_at?: string;
|
|
239
|
-
user_id?: number;
|
|
240
|
-
location_id?: number;
|
|
241
|
-
source_identifier?: string;
|
|
242
|
-
source_url?: string;
|
|
243
|
-
device_id?: number;
|
|
244
|
-
phone?: string;
|
|
245
|
-
customer_locale?: string;
|
|
246
|
-
line_items?: ICheckoutLineItem[];
|
|
247
|
-
name?: string;
|
|
248
|
-
source?: string;
|
|
249
|
-
abandoned_checkout_url?: string;
|
|
250
|
-
discount_codes?: IDiscountCode[];
|
|
251
|
-
tax_lines?: ITaxLine[];
|
|
252
|
-
source_name?: string;
|
|
253
|
-
presentment_currency?: string;
|
|
206
|
+
abandoned_checkout_url: string;
|
|
207
|
+
applied_discount?: ICheckoutDiscount;
|
|
208
|
+
billing_address?: ICustomerAddress;
|
|
209
|
+
buyer_accepts_marketing: boolean;
|
|
254
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[];
|
|
255
247
|
sms_marketing_phone?: string;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
subtotal_price
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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';
|
|
265
266
|
export interface ICustomer {
|
|
266
|
-
|
|
267
|
-
email?: string;
|
|
268
|
-
accepts_marketing?: boolean;
|
|
269
|
-
created_at?: string;
|
|
270
|
-
updated_at?: string;
|
|
271
|
-
first_name?: string;
|
|
272
|
-
last_name?: string;
|
|
273
|
-
orders_count?: number;
|
|
274
|
-
state?: string;
|
|
275
|
-
total_spent?: string;
|
|
276
|
-
last_order_id?: number;
|
|
277
|
-
note?: string;
|
|
278
|
-
verified_email?: boolean;
|
|
279
|
-
multipass_identifier?: string;
|
|
280
|
-
tax_exempt?: boolean;
|
|
281
|
-
tags?: string;
|
|
282
|
-
last_order_name?: string;
|
|
283
|
-
currency?: string;
|
|
284
|
-
phone?: string;
|
|
267
|
+
accepts_marketing: boolean;
|
|
285
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;
|
|
286
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;
|
|
287
289
|
tax_exemptions?: string[];
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
290
|
+
total_spent: string;
|
|
291
|
+
updated_at: string;
|
|
292
|
+
verified_email: boolean;
|
|
291
293
|
}
|
|
292
294
|
export interface ICustomerAddress {
|
|
293
|
-
|
|
294
|
-
customer_id?: number;
|
|
295
|
-
first_name?: string;
|
|
296
|
-
last_name?: string;
|
|
297
|
-
company?: string;
|
|
298
|
-
address1?: string;
|
|
295
|
+
address1: string;
|
|
299
296
|
address2?: string;
|
|
300
|
-
city
|
|
301
|
-
|
|
302
|
-
country
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
latitude
|
|
311
|
-
longitude
|
|
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;
|
|
312
314
|
}
|
|
313
315
|
export interface IOrderLineItem {
|
|
314
|
-
id
|
|
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;
|
|
315
343
|
admin_graphql_api_id?: string;
|
|
316
344
|
attributed_staffs?: IAttributedStaff[];
|
|
317
|
-
fulfillable_quantity?: number;
|
|
318
|
-
fulfillment_service?: string;
|
|
319
|
-
fulfillment_status?: LineItemFulfillmentStatus;
|
|
320
|
-
gift_card?: boolean;
|
|
321
|
-
grams?: number;
|
|
322
|
-
name?: string;
|
|
323
|
-
price?: string;
|
|
324
|
-
price_set?: IMoneySet;
|
|
325
345
|
product_exists?: boolean;
|
|
326
|
-
product_id?: number;
|
|
327
|
-
properties?: ILineItemProperty[];
|
|
328
|
-
quantity?: number;
|
|
329
|
-
requires_shipping?: boolean;
|
|
330
|
-
sku?: string;
|
|
331
|
-
taxable?: boolean;
|
|
332
|
-
title?: string;
|
|
333
|
-
total_discount?: string;
|
|
334
|
-
total_discount_set?: IMoneySet;
|
|
335
|
-
variant_id?: number;
|
|
336
346
|
variant_inventory_management?: string;
|
|
337
|
-
variant_title?: string;
|
|
338
|
-
vendor?: string;
|
|
339
|
-
tax_lines?: ITaxLine[];
|
|
340
347
|
duties?: IDuty[];
|
|
341
|
-
discount_allocations?: IDiscountAllocation[];
|
|
342
348
|
}
|
|
343
349
|
export interface IRefund {
|
|
344
|
-
id
|
|
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[];
|
|
345
360
|
admin_graphql_api_id?: string;
|
|
346
|
-
created_at?: string;
|
|
347
|
-
note?: string;
|
|
348
|
-
order_id?: number;
|
|
349
|
-
processed_at?: string;
|
|
350
|
-
restock?: boolean;
|
|
351
361
|
total_duties_set?: IMoneySet;
|
|
352
|
-
user_id?: number;
|
|
353
|
-
order_adjustments?: IOrderAdjustment[];
|
|
354
|
-
transactions?: ITransaction[];
|
|
355
|
-
refund_line_items?: IRefundLineItem[];
|
|
356
362
|
duties?: IRefundDuty[];
|
|
357
363
|
}
|
|
358
364
|
export interface IRefundLineItem {
|
|
359
|
-
id
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
quantity
|
|
363
|
-
restock_type
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
total_tax
|
|
367
|
-
|
|
368
|
-
|
|
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;
|
|
369
494
|
}
|
|
370
495
|
interface IMoneySet {
|
|
371
|
-
shop_money
|
|
372
|
-
presentment_money
|
|
496
|
+
shop_money: IMoney;
|
|
497
|
+
presentment_money: IMoney;
|
|
373
498
|
}
|
|
374
499
|
interface IMoney {
|
|
375
|
-
amount
|
|
376
|
-
currency_code
|
|
500
|
+
amount: string;
|
|
501
|
+
currency_code: string;
|
|
377
502
|
}
|
|
378
503
|
interface IAddress {
|
|
379
504
|
id?: number;
|
|
@@ -456,28 +581,33 @@ interface IRefundDuty {
|
|
|
456
581
|
refund_type?: 'FULL' | 'PROPORTIONAL';
|
|
457
582
|
}
|
|
458
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;
|
|
459
608
|
id?: string;
|
|
460
|
-
key?: string;
|
|
461
|
-
product_id?: number;
|
|
462
|
-
variant_id?: number;
|
|
463
|
-
sku?: string;
|
|
464
|
-
vendor?: string;
|
|
465
|
-
title?: string;
|
|
466
|
-
variant_title?: string;
|
|
467
609
|
image_url?: string;
|
|
468
|
-
taxable?: boolean;
|
|
469
|
-
requires_shipping?: boolean;
|
|
470
|
-
gift_card?: boolean;
|
|
471
|
-
price?: string;
|
|
472
|
-
compare_at_price?: string;
|
|
473
|
-
line_price?: string;
|
|
474
|
-
properties?: Record<string, string>;
|
|
475
|
-
quantity?: number;
|
|
476
|
-
grams?: number;
|
|
477
|
-
fulfillment_service?: string;
|
|
478
|
-
applied_discounts?: IAppliedDiscount[];
|
|
479
610
|
discount_allocations?: IDiscountAllocation[];
|
|
480
|
-
tax_lines?: ITaxLine[];
|
|
481
611
|
}
|
|
482
612
|
interface IAppliedDiscount {
|
|
483
613
|
title?: string;
|
|
@@ -487,32 +617,32 @@ interface IAppliedDiscount {
|
|
|
487
617
|
amount?: string;
|
|
488
618
|
}
|
|
489
619
|
interface ILineItem {
|
|
490
|
-
id
|
|
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[];
|
|
491
642
|
admin_graphql_api_id?: string;
|
|
492
643
|
attributed_staffs?: IAttributedStaff[];
|
|
493
|
-
fulfillable_quantity?: number;
|
|
494
|
-
fulfillment_service?: string;
|
|
495
|
-
fulfillment_status?: LineItemFulfillmentStatus;
|
|
496
|
-
gift_card?: boolean;
|
|
497
|
-
grams?: number;
|
|
498
|
-
name?: string;
|
|
499
|
-
price?: string;
|
|
500
644
|
price_set?: IMoneySet;
|
|
501
|
-
product_exists?: boolean;
|
|
502
|
-
product_id?: number;
|
|
503
|
-
properties?: ILineItemProperty[];
|
|
504
|
-
quantity?: number;
|
|
505
|
-
requires_shipping?: boolean;
|
|
506
|
-
sku?: string;
|
|
507
|
-
taxable?: boolean;
|
|
508
|
-
title?: string;
|
|
509
|
-
total_discount?: string;
|
|
510
645
|
total_discount_set?: IMoneySet;
|
|
511
|
-
variant_id?: number;
|
|
512
|
-
variant_inventory_management?: string;
|
|
513
|
-
variant_title?: string;
|
|
514
|
-
vendor?: string;
|
|
515
|
-
tax_lines?: ITaxLine[];
|
|
516
646
|
duties?: IDuty[];
|
|
517
647
|
discount_allocations?: IDiscountAllocation[];
|
|
518
648
|
}
|
|
@@ -579,52 +709,58 @@ interface ITaxLine {
|
|
|
579
709
|
price_set?: IMoneySet;
|
|
580
710
|
channel_liable?: boolean;
|
|
581
711
|
}
|
|
582
|
-
interface
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
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[];
|
|
607
744
|
admin_graphql_api_id?: string;
|
|
608
|
-
image_id?: number;
|
|
609
745
|
}
|
|
610
746
|
interface IProductOption {
|
|
611
|
-
id
|
|
612
|
-
product_id
|
|
613
|
-
name
|
|
614
|
-
position
|
|
615
|
-
values
|
|
747
|
+
id: number;
|
|
748
|
+
product_id: number;
|
|
749
|
+
name: string;
|
|
750
|
+
position: number;
|
|
751
|
+
values: string[];
|
|
616
752
|
}
|
|
617
753
|
interface IProductImage {
|
|
618
|
-
id
|
|
619
|
-
product_id
|
|
620
|
-
position
|
|
621
|
-
created_at
|
|
622
|
-
updated_at
|
|
623
|
-
alt
|
|
624
|
-
width
|
|
625
|
-
height
|
|
626
|
-
src
|
|
627
|
-
variant_ids
|
|
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[];
|
|
628
764
|
admin_graphql_api_id?: string;
|
|
629
765
|
}
|
|
630
766
|
export {};
|