@adtrackify/at-service-common 3.18.3 → 3.18.5
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/__tests__/clients/sqs-bundled-client.spec.js +3 -1
- package/dist/cjs/__tests__/clients/sqs-bundled-client.spec.js.map +1 -1
- package/dist/cjs/__tests__/clients/sqs-client.spec.js +7 -4
- package/dist/cjs/__tests__/clients/sqs-client.spec.js.map +1 -1
- package/dist/cjs/__tests__/clients/sqs-unbundle.spec.js +27 -27
- package/dist/cjs/__tests__/clients/sqs-unbundle.spec.js.map +1 -1
- package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js +9 -6
- package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js.map +1 -1
- package/dist/cjs/clients/generic/sqs-bundled-client.js +28 -21
- package/dist/cjs/clients/generic/sqs-bundled-client.js.map +1 -1
- package/dist/cjs/clients/generic/sqs-client.d.ts +7 -2
- package/dist/cjs/clients/generic/sqs-client.js +17 -17
- package/dist/cjs/clients/generic/sqs-client.js.map +1 -1
- package/dist/cjs/clients/generic/sqs-unbundle.d.ts +2 -2
- package/dist/cjs/clients/generic/sqs-unbundle.js +6 -6
- package/dist/cjs/clients/generic/sqs-unbundle.js.map +1 -1
- package/dist/cjs/clients/internal-api/shopify-app-install-client.d.ts +2 -2
- package/dist/cjs/clients/internal-api/shopify-app-install-client.js.map +1 -1
- package/dist/cjs/clients/third-party/shopify-client.d.ts +5 -5
- package/dist/cjs/clients/third-party/shopify-client.js.map +1 -1
- package/dist/cjs/constants/sqs.d.ts +9 -0
- package/dist/cjs/constants/sqs.js +15 -3
- package/dist/cjs/constants/sqs.js.map +1 -1
- package/dist/cjs/services/events/log-event-service.d.ts +11 -1
- package/dist/cjs/services/events/log-event-service.js +24 -6
- package/dist/cjs/services/events/log-event-service.js.map +1 -1
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/cjs/types/index.js +15 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/types/shopify-graphql-types/admin.generated.d.ts +38 -38
- package/dist/cjs/types/shopify-graphql-types/admin.types.js.map +1 -1
- package/dist/cjs/types/shopify-rest-types.d.ts +630 -0
- package/dist/cjs/types/shopify-rest-types.js +3 -0
- package/dist/cjs/types/shopify-rest-types.js.map +1 -0
- package/dist/cjs/utils/size.js +2 -1
- package/dist/cjs/utils/size.js.map +1 -1
- package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js +3 -1
- package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js.map +1 -1
- package/dist/esm/__tests__/clients/sqs-client.spec.js +7 -4
- package/dist/esm/__tests__/clients/sqs-client.spec.js.map +1 -1
- package/dist/esm/__tests__/clients/sqs-unbundle.spec.js +27 -27
- package/dist/esm/__tests__/clients/sqs-unbundle.spec.js.map +1 -1
- package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js +9 -6
- package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js.map +1 -1
- package/dist/esm/clients/generic/sqs-bundled-client.js +29 -22
- package/dist/esm/clients/generic/sqs-bundled-client.js.map +1 -1
- package/dist/esm/clients/generic/sqs-client.d.ts +7 -2
- package/dist/esm/clients/generic/sqs-client.js +17 -17
- package/dist/esm/clients/generic/sqs-client.js.map +1 -1
- package/dist/esm/clients/generic/sqs-unbundle.d.ts +2 -2
- package/dist/esm/clients/generic/sqs-unbundle.js +6 -6
- package/dist/esm/clients/generic/sqs-unbundle.js.map +1 -1
- package/dist/esm/clients/internal-api/shopify-app-install-client.d.ts +2 -2
- package/dist/esm/clients/internal-api/shopify-app-install-client.js.map +1 -1
- package/dist/esm/clients/third-party/shopify-client.d.ts +5 -5
- package/dist/esm/clients/third-party/shopify-client.js.map +1 -1
- package/dist/esm/constants/sqs.d.ts +9 -0
- package/dist/esm/constants/sqs.js +13 -2
- package/dist/esm/constants/sqs.js.map +1 -1
- package/dist/esm/services/events/log-event-service.d.ts +11 -1
- package/dist/esm/services/events/log-event-service.js +22 -4
- package/dist/esm/services/events/log-event-service.js.map +1 -1
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/esm/types/index.js +2 -0
- package/dist/esm/types/index.js.map +1 -1
- package/dist/esm/types/shopify-graphql-types/admin.generated.d.ts +38 -38
- package/dist/esm/types/shopify-graphql-types/admin.types.js.map +1 -1
- package/dist/esm/types/shopify-rest-types.d.ts +630 -0
- package/dist/esm/types/shopify-rest-types.js +2 -0
- package/dist/esm/types/shopify-rest-types.js.map +1 -0
- package/dist/esm/utils/size.js +2 -1
- package/dist/esm/utils/size.js.map +1 -1
- package/package.json +1 -2
|
@@ -0,0 +1,630 @@
|
|
|
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 interface IShop {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
domain: string;
|
|
9
|
+
province?: string;
|
|
10
|
+
country?: string;
|
|
11
|
+
address1?: string;
|
|
12
|
+
zip?: string;
|
|
13
|
+
city?: string;
|
|
14
|
+
source?: string;
|
|
15
|
+
phone?: string;
|
|
16
|
+
latitude?: number;
|
|
17
|
+
longitude?: number;
|
|
18
|
+
primary_locale?: string;
|
|
19
|
+
address2?: string;
|
|
20
|
+
created_at?: string;
|
|
21
|
+
updated_at?: string;
|
|
22
|
+
country_code?: string;
|
|
23
|
+
country_name?: string;
|
|
24
|
+
currency?: string;
|
|
25
|
+
customer_email?: string;
|
|
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;
|
|
59
|
+
}
|
|
60
|
+
export interface IOrder {
|
|
61
|
+
id: number;
|
|
62
|
+
admin_graphql_api_id?: string;
|
|
63
|
+
app_id?: number;
|
|
64
|
+
browser_ip?: string;
|
|
65
|
+
buyer_accepts_marketing?: boolean;
|
|
66
|
+
cancel_reason?: string;
|
|
67
|
+
cancelled_at?: string;
|
|
68
|
+
cart_token?: string;
|
|
69
|
+
checkout_id?: number;
|
|
70
|
+
checkout_token?: string;
|
|
71
|
+
client_details?: {
|
|
72
|
+
accept_language?: string;
|
|
73
|
+
browser_height?: number;
|
|
74
|
+
browser_ip?: string;
|
|
75
|
+
browser_width?: number;
|
|
76
|
+
session_hash?: string;
|
|
77
|
+
user_agent?: string;
|
|
78
|
+
};
|
|
79
|
+
closed_at?: string;
|
|
80
|
+
confirmation_number?: string;
|
|
81
|
+
confirmed?: boolean;
|
|
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;
|
|
95
|
+
customer?: ICustomer;
|
|
96
|
+
customer_locale?: string;
|
|
97
|
+
discount_applications?: IDiscountApplication[];
|
|
98
|
+
discount_codes?: IDiscountCode[];
|
|
99
|
+
email?: string;
|
|
100
|
+
estimated_taxes?: boolean;
|
|
101
|
+
financial_status?: string;
|
|
102
|
+
fulfillment_status?: string;
|
|
103
|
+
fulfillments?: IFulfillment[];
|
|
104
|
+
landing_site?: string;
|
|
105
|
+
landing_site_ref?: string;
|
|
106
|
+
line_items?: ILineItem[];
|
|
107
|
+
location_id?: number;
|
|
108
|
+
merchant_of_record_app_id?: number;
|
|
109
|
+
name?: string;
|
|
110
|
+
note?: string;
|
|
111
|
+
note_attributes?: INoteAttribute[];
|
|
112
|
+
number?: number;
|
|
113
|
+
order_number?: number;
|
|
114
|
+
order_status_url?: string;
|
|
115
|
+
original_total_additional_fees_set?: IMoneySet;
|
|
116
|
+
original_total_duties_set?: IMoneySet;
|
|
117
|
+
payment_gateway_names?: string[];
|
|
118
|
+
phone?: string;
|
|
119
|
+
po_number?: string;
|
|
120
|
+
presentment_currency?: string;
|
|
121
|
+
processed_at?: string;
|
|
122
|
+
reference?: string;
|
|
123
|
+
referring_site?: string;
|
|
124
|
+
refunds?: IRefund[];
|
|
125
|
+
shipping_address?: IAddress;
|
|
126
|
+
billing_address?: IAddress;
|
|
127
|
+
shipping_lines?: IShippingLine[];
|
|
128
|
+
source_identifier?: string;
|
|
129
|
+
source_name?: string;
|
|
130
|
+
source_url?: string;
|
|
131
|
+
subtotal_price?: string;
|
|
132
|
+
subtotal_price_set?: IMoneySet;
|
|
133
|
+
tags?: string;
|
|
134
|
+
tax_exempt?: boolean;
|
|
135
|
+
tax_lines?: ITaxLine[];
|
|
136
|
+
taxes_included?: boolean;
|
|
137
|
+
test?: boolean;
|
|
138
|
+
token?: string;
|
|
139
|
+
total_discounts?: string;
|
|
140
|
+
total_discounts_set?: IMoneySet;
|
|
141
|
+
total_line_items_price?: string;
|
|
142
|
+
total_line_items_price_set?: IMoneySet;
|
|
143
|
+
total_outstanding?: string;
|
|
144
|
+
total_price?: string;
|
|
145
|
+
total_price_set?: IMoneySet;
|
|
146
|
+
total_shipping_price_set?: IMoneySet;
|
|
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;
|
|
155
|
+
}
|
|
156
|
+
export interface IProduct {
|
|
157
|
+
id: number;
|
|
158
|
+
title?: string;
|
|
159
|
+
body_html?: string;
|
|
160
|
+
vendor?: string;
|
|
161
|
+
product_type?: string;
|
|
162
|
+
created_at?: string;
|
|
163
|
+
handle?: string;
|
|
164
|
+
updated_at?: string;
|
|
165
|
+
published_at?: string;
|
|
166
|
+
template_suffix?: string;
|
|
167
|
+
published_scope?: string;
|
|
168
|
+
tags?: string;
|
|
169
|
+
status?: string;
|
|
170
|
+
admin_graphql_api_id?: string;
|
|
171
|
+
variants?: IVariant[];
|
|
172
|
+
options?: IProductOption[];
|
|
173
|
+
images?: IProductImage[];
|
|
174
|
+
image?: IProductImage;
|
|
175
|
+
}
|
|
176
|
+
export interface IRecurringApplicationCharge {
|
|
177
|
+
id: number;
|
|
178
|
+
name?: string;
|
|
179
|
+
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
|
+
decorated_return_url?: string;
|
|
192
|
+
confirmation_url?: string;
|
|
193
|
+
capped_amount?: string;
|
|
194
|
+
balance_used?: number;
|
|
195
|
+
balance_remaining?: number;
|
|
196
|
+
risk_level?: number;
|
|
197
|
+
}
|
|
198
|
+
export interface IUsageCharge {
|
|
199
|
+
id: number;
|
|
200
|
+
description?: string;
|
|
201
|
+
price?: string;
|
|
202
|
+
created_at?: string;
|
|
203
|
+
billing_on?: string;
|
|
204
|
+
balance_used?: number;
|
|
205
|
+
balance_remaining?: number;
|
|
206
|
+
risk_level?: number;
|
|
207
|
+
}
|
|
208
|
+
export interface IWebhook {
|
|
209
|
+
id: number;
|
|
210
|
+
address?: string;
|
|
211
|
+
topic?: WebhookTopic;
|
|
212
|
+
created_at?: string;
|
|
213
|
+
updated_at?: string;
|
|
214
|
+
format?: WebhookFormat;
|
|
215
|
+
fields?: string[];
|
|
216
|
+
metafield_namespaces?: string[];
|
|
217
|
+
api_version?: string;
|
|
218
|
+
private_metafield_namespaces?: string[];
|
|
219
|
+
}
|
|
220
|
+
export interface ICheckout {
|
|
221
|
+
id?: number;
|
|
222
|
+
token?: string;
|
|
223
|
+
cart_token?: string;
|
|
224
|
+
email?: string;
|
|
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;
|
|
254
|
+
buyer_accepts_sms_marketing?: boolean;
|
|
255
|
+
sms_marketing_phone?: string;
|
|
256
|
+
total_discounts?: string;
|
|
257
|
+
total_line_items_price?: string;
|
|
258
|
+
total_price?: string;
|
|
259
|
+
total_tax?: string;
|
|
260
|
+
subtotal_price?: string;
|
|
261
|
+
billing_address?: IAddress;
|
|
262
|
+
shipping_address?: IAddress;
|
|
263
|
+
customer?: ICustomer;
|
|
264
|
+
}
|
|
265
|
+
export interface ICustomer {
|
|
266
|
+
id?: number;
|
|
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;
|
|
285
|
+
accepts_marketing_updated_at?: string;
|
|
286
|
+
marketing_opt_in_level?: string;
|
|
287
|
+
tax_exemptions?: string[];
|
|
288
|
+
admin_graphql_api_id?: string;
|
|
289
|
+
default_address?: ICustomerAddress;
|
|
290
|
+
addresses?: ICustomerAddress[];
|
|
291
|
+
}
|
|
292
|
+
export interface ICustomerAddress {
|
|
293
|
+
id?: number;
|
|
294
|
+
customer_id?: number;
|
|
295
|
+
first_name?: string;
|
|
296
|
+
last_name?: string;
|
|
297
|
+
company?: string;
|
|
298
|
+
address1?: string;
|
|
299
|
+
address2?: string;
|
|
300
|
+
city?: string;
|
|
301
|
+
province?: string;
|
|
302
|
+
country?: string;
|
|
303
|
+
zip?: string;
|
|
304
|
+
phone?: string;
|
|
305
|
+
name?: string;
|
|
306
|
+
province_code?: string;
|
|
307
|
+
country_code?: string;
|
|
308
|
+
country_name?: string;
|
|
309
|
+
default?: boolean;
|
|
310
|
+
latitude?: number;
|
|
311
|
+
longitude?: number;
|
|
312
|
+
}
|
|
313
|
+
export interface IOrderLineItem {
|
|
314
|
+
id?: number;
|
|
315
|
+
admin_graphql_api_id?: string;
|
|
316
|
+
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
|
+
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
|
+
variant_inventory_management?: string;
|
|
337
|
+
variant_title?: string;
|
|
338
|
+
vendor?: string;
|
|
339
|
+
tax_lines?: ITaxLine[];
|
|
340
|
+
duties?: IDuty[];
|
|
341
|
+
discount_allocations?: IDiscountAllocation[];
|
|
342
|
+
}
|
|
343
|
+
export interface IRefund {
|
|
344
|
+
id?: number;
|
|
345
|
+
admin_graphql_api_id?: string;
|
|
346
|
+
created_at?: string;
|
|
347
|
+
note?: string;
|
|
348
|
+
order_id?: number;
|
|
349
|
+
processed_at?: string;
|
|
350
|
+
restock?: boolean;
|
|
351
|
+
total_duties_set?: IMoneySet;
|
|
352
|
+
user_id?: number;
|
|
353
|
+
order_adjustments?: IOrderAdjustment[];
|
|
354
|
+
transactions?: ITransaction[];
|
|
355
|
+
refund_line_items?: IRefundLineItem[];
|
|
356
|
+
duties?: IRefundDuty[];
|
|
357
|
+
}
|
|
358
|
+
export interface IRefundLineItem {
|
|
359
|
+
id?: number;
|
|
360
|
+
line_item_id?: number;
|
|
361
|
+
location_id?: number;
|
|
362
|
+
quantity?: number;
|
|
363
|
+
restock_type?: 'no_restock' | 'cancel' | 'return' | 'legacy_restock';
|
|
364
|
+
subtotal?: number;
|
|
365
|
+
subtotal_set?: IMoneySet;
|
|
366
|
+
total_tax?: number;
|
|
367
|
+
total_tax_set?: IMoneySet;
|
|
368
|
+
line_item?: IOrderLineItem;
|
|
369
|
+
}
|
|
370
|
+
interface IMoneySet {
|
|
371
|
+
shop_money?: IMoney;
|
|
372
|
+
presentment_money?: IMoney;
|
|
373
|
+
}
|
|
374
|
+
interface IMoney {
|
|
375
|
+
amount?: string;
|
|
376
|
+
currency_code?: string;
|
|
377
|
+
}
|
|
378
|
+
interface IAddress {
|
|
379
|
+
id?: number;
|
|
380
|
+
customer_id?: number;
|
|
381
|
+
first_name?: string;
|
|
382
|
+
last_name?: string;
|
|
383
|
+
company?: string;
|
|
384
|
+
address1?: string;
|
|
385
|
+
address2?: string;
|
|
386
|
+
city?: string;
|
|
387
|
+
province?: string;
|
|
388
|
+
country?: string;
|
|
389
|
+
zip?: string;
|
|
390
|
+
phone?: string;
|
|
391
|
+
name?: string;
|
|
392
|
+
province_code?: string;
|
|
393
|
+
country_code?: string;
|
|
394
|
+
country_name?: string;
|
|
395
|
+
default?: boolean;
|
|
396
|
+
latitude?: number;
|
|
397
|
+
longitude?: number;
|
|
398
|
+
}
|
|
399
|
+
interface IAttributedStaff {
|
|
400
|
+
id?: string;
|
|
401
|
+
quantity?: number;
|
|
402
|
+
}
|
|
403
|
+
interface ILineItemProperty {
|
|
404
|
+
name?: string;
|
|
405
|
+
value?: string;
|
|
406
|
+
}
|
|
407
|
+
interface IDuty {
|
|
408
|
+
id?: string;
|
|
409
|
+
harmonized_system_code?: string;
|
|
410
|
+
country_code_of_origin?: string;
|
|
411
|
+
shop_money?: IMoney;
|
|
412
|
+
presentment_money?: IMoney;
|
|
413
|
+
tax_lines?: ITaxLine[];
|
|
414
|
+
admin_graphql_api_id?: string;
|
|
415
|
+
}
|
|
416
|
+
interface IDiscountAllocation {
|
|
417
|
+
amount?: string;
|
|
418
|
+
amount_set?: IMoneySet;
|
|
419
|
+
discount_application_index?: number;
|
|
420
|
+
}
|
|
421
|
+
interface IOrderAdjustment {
|
|
422
|
+
id?: number;
|
|
423
|
+
order_id?: number;
|
|
424
|
+
refund_id?: number;
|
|
425
|
+
amount?: string;
|
|
426
|
+
tax_amount?: string;
|
|
427
|
+
kind?: string;
|
|
428
|
+
reason?: string;
|
|
429
|
+
amount_set?: IMoneySet;
|
|
430
|
+
tax_amount_set?: IMoneySet;
|
|
431
|
+
}
|
|
432
|
+
interface ITransaction {
|
|
433
|
+
id?: number;
|
|
434
|
+
admin_graphql_api_id?: string;
|
|
435
|
+
amount?: string;
|
|
436
|
+
authorization?: string;
|
|
437
|
+
created_at?: string;
|
|
438
|
+
currency?: string;
|
|
439
|
+
device_id?: number;
|
|
440
|
+
error_code?: string;
|
|
441
|
+
gateway?: string;
|
|
442
|
+
kind?: string;
|
|
443
|
+
location_id?: number;
|
|
444
|
+
message?: string;
|
|
445
|
+
order_id?: number;
|
|
446
|
+
parent_id?: number;
|
|
447
|
+
processed_at?: string;
|
|
448
|
+
receipt?: Record<string, unknown>;
|
|
449
|
+
source_name?: string;
|
|
450
|
+
status?: string;
|
|
451
|
+
test?: boolean;
|
|
452
|
+
user_id?: number;
|
|
453
|
+
}
|
|
454
|
+
interface IRefundDuty {
|
|
455
|
+
duty_id?: number;
|
|
456
|
+
refund_type?: 'FULL' | 'PROPORTIONAL';
|
|
457
|
+
}
|
|
458
|
+
interface ICheckoutLineItem {
|
|
459
|
+
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
|
+
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
|
+
discount_allocations?: IDiscountAllocation[];
|
|
480
|
+
tax_lines?: ITaxLine[];
|
|
481
|
+
}
|
|
482
|
+
interface IAppliedDiscount {
|
|
483
|
+
title?: string;
|
|
484
|
+
description?: string;
|
|
485
|
+
value?: string;
|
|
486
|
+
value_type?: string;
|
|
487
|
+
amount?: string;
|
|
488
|
+
}
|
|
489
|
+
interface ILineItem {
|
|
490
|
+
id?: number;
|
|
491
|
+
admin_graphql_api_id?: string;
|
|
492
|
+
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
|
+
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
|
+
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
|
+
duties?: IDuty[];
|
|
517
|
+
discount_allocations?: IDiscountAllocation[];
|
|
518
|
+
}
|
|
519
|
+
interface IDiscountApplication {
|
|
520
|
+
type?: string;
|
|
521
|
+
value?: string;
|
|
522
|
+
value_type?: string;
|
|
523
|
+
allocation_method?: string;
|
|
524
|
+
target_selection?: string;
|
|
525
|
+
target_type?: string;
|
|
526
|
+
description?: string;
|
|
527
|
+
title?: string;
|
|
528
|
+
code?: string;
|
|
529
|
+
}
|
|
530
|
+
interface IDiscountCode {
|
|
531
|
+
code?: string;
|
|
532
|
+
amount?: string;
|
|
533
|
+
type?: string;
|
|
534
|
+
}
|
|
535
|
+
interface IFulfillment {
|
|
536
|
+
id?: number;
|
|
537
|
+
admin_graphql_api_id?: string;
|
|
538
|
+
created_at?: string;
|
|
539
|
+
location_id?: number;
|
|
540
|
+
name?: string;
|
|
541
|
+
order_id?: number;
|
|
542
|
+
origin_address?: IAddress;
|
|
543
|
+
receipt?: Record<string, unknown>;
|
|
544
|
+
service?: string;
|
|
545
|
+
shipment_status?: string;
|
|
546
|
+
status?: string;
|
|
547
|
+
tracking_company?: string;
|
|
548
|
+
tracking_number?: string;
|
|
549
|
+
tracking_numbers?: string[];
|
|
550
|
+
tracking_url?: string;
|
|
551
|
+
tracking_urls?: string[];
|
|
552
|
+
updated_at?: string;
|
|
553
|
+
line_items?: ILineItem[];
|
|
554
|
+
}
|
|
555
|
+
interface INoteAttribute {
|
|
556
|
+
name?: string;
|
|
557
|
+
value?: string;
|
|
558
|
+
}
|
|
559
|
+
interface IShippingLine {
|
|
560
|
+
id?: number;
|
|
561
|
+
carrier_identifier?: string;
|
|
562
|
+
code?: string;
|
|
563
|
+
delivery_category?: string;
|
|
564
|
+
discounted_price?: string;
|
|
565
|
+
discounted_price_set?: IMoneySet;
|
|
566
|
+
phone?: string;
|
|
567
|
+
price?: string;
|
|
568
|
+
price_set?: IMoneySet;
|
|
569
|
+
requested_fulfillment_service_id?: string;
|
|
570
|
+
source?: string;
|
|
571
|
+
title?: string;
|
|
572
|
+
tax_lines?: ITaxLine[];
|
|
573
|
+
discount_allocations?: IDiscountAllocation[];
|
|
574
|
+
}
|
|
575
|
+
interface ITaxLine {
|
|
576
|
+
price?: string;
|
|
577
|
+
rate?: number;
|
|
578
|
+
title?: string;
|
|
579
|
+
price_set?: IMoneySet;
|
|
580
|
+
channel_liable?: boolean;
|
|
581
|
+
}
|
|
582
|
+
interface IVariant {
|
|
583
|
+
id?: number;
|
|
584
|
+
product_id?: number;
|
|
585
|
+
title?: string;
|
|
586
|
+
price?: string;
|
|
587
|
+
sku?: string;
|
|
588
|
+
position?: number;
|
|
589
|
+
inventory_policy?: string;
|
|
590
|
+
compare_at_price?: string;
|
|
591
|
+
fulfillment_service?: string;
|
|
592
|
+
inventory_management?: string;
|
|
593
|
+
option1?: string;
|
|
594
|
+
option2?: string;
|
|
595
|
+
option3?: string;
|
|
596
|
+
created_at?: string;
|
|
597
|
+
updated_at?: string;
|
|
598
|
+
taxable?: boolean;
|
|
599
|
+
barcode?: string;
|
|
600
|
+
grams?: number;
|
|
601
|
+
weight?: number;
|
|
602
|
+
weight_unit?: string;
|
|
603
|
+
inventory_item_id?: number;
|
|
604
|
+
inventory_quantity?: number;
|
|
605
|
+
old_inventory_quantity?: number;
|
|
606
|
+
requires_shipping?: boolean;
|
|
607
|
+
admin_graphql_api_id?: string;
|
|
608
|
+
image_id?: number;
|
|
609
|
+
}
|
|
610
|
+
interface IProductOption {
|
|
611
|
+
id?: number;
|
|
612
|
+
product_id?: number;
|
|
613
|
+
name?: string;
|
|
614
|
+
position?: number;
|
|
615
|
+
values?: string[];
|
|
616
|
+
}
|
|
617
|
+
interface IProductImage {
|
|
618
|
+
id?: number;
|
|
619
|
+
product_id?: number;
|
|
620
|
+
position?: number;
|
|
621
|
+
created_at?: string;
|
|
622
|
+
updated_at?: string;
|
|
623
|
+
alt?: string;
|
|
624
|
+
width?: number;
|
|
625
|
+
height?: number;
|
|
626
|
+
src?: string;
|
|
627
|
+
variant_ids?: number[];
|
|
628
|
+
admin_graphql_api_id?: string;
|
|
629
|
+
}
|
|
630
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shopify-rest-types.js","sourceRoot":"","sources":["../../../src/types/shopify-rest-types.ts"],"names":[],"mappings":""}
|
package/dist/esm/utils/size.js
CHANGED
|
@@ -17,7 +17,8 @@ export function chunkArrayBySize(array, maxChunkSizeBytes, maxItemsPerChunk) {
|
|
|
17
17
|
let currentChunkSize = 0;
|
|
18
18
|
for (const item of array) {
|
|
19
19
|
const itemSize = sizeInBytes(item);
|
|
20
|
-
const
|
|
20
|
+
const arrayOverhead = 2 + Math.max(0, currentChunk.length);
|
|
21
|
+
const wouldExceedSize = currentChunkSize + itemSize + arrayOverhead > maxChunkSizeBytes;
|
|
21
22
|
const wouldExceedCount = maxItemsPerChunk !== undefined && currentChunk.length >= maxItemsPerChunk;
|
|
22
23
|
if ((wouldExceedSize || wouldExceedCount) && currentChunk.length > 0) {
|
|
23
24
|
chunks.push(currentChunk);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../../src/utils/size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMtD,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,IAAI;QACF,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;KAC7D;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,CAAC,IAAI,CAAC,kEAAkE,EAAE;YAC9E,KAAK;YACL,UAAU,EAAE,OAAO,GAAG;SACvB,CAAC,CAAC;QACH,OAAO,IAAI,GAAG,IAAI,CAAC;KACpB;AACH,CAAC;AAYD,MAAM,UAAU,gBAAgB,CAAI,KAAU,EAAE,iBAAyB,EAAE,gBAAyB;IAClG,MAAM,MAAM,GAAU,EAAE,CAAC;IACzB,IAAI,YAAY,GAAQ,EAAE,CAAC;IAC3B,IAAI,gBAAgB,GAAG,CAAC,CAAC;IAEzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"size.js","sourceRoot":"","sources":["../../../src/utils/size.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAMtD,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,IAAI;QACF,OAAO,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;KAC7D;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,CAAC,IAAI,CAAC,kEAAkE,EAAE;YAC9E,KAAK;YACL,UAAU,EAAE,OAAO,GAAG;SACvB,CAAC,CAAC;QACH,OAAO,IAAI,GAAG,IAAI,CAAC;KACpB;AACH,CAAC;AAYD,MAAM,UAAU,gBAAgB,CAAI,KAAU,EAAE,iBAAyB,EAAE,gBAAyB;IAClG,MAAM,MAAM,GAAU,EAAE,CAAC;IACzB,IAAI,YAAY,GAAQ,EAAE,CAAC;IAC3B,IAAI,gBAAgB,GAAG,CAAC,CAAC;IAEzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;QACxB,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;QAInC,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QAG3D,MAAM,eAAe,GAAG,gBAAgB,GAAG,QAAQ,GAAG,aAAa,GAAG,iBAAiB,CAAC;QACxF,MAAM,gBAAgB,GAAG,gBAAgB,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM,IAAI,gBAAgB,CAAC;QAEnG,IAAI,CAAC,eAAe,IAAI,gBAAgB,CAAC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;YACpE,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC1B,YAAY,GAAG,EAAE,CAAC;YAClB,gBAAgB,GAAG,CAAC,CAAC;SACtB;QAGD,IAAI,QAAQ,GAAG,iBAAiB,EAAE;YAEhC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3B,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAC1B,YAAY,GAAG,EAAE,CAAC;gBAClB,gBAAgB,GAAG,CAAC,CAAC;aACtB;YACD,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACpB,SAAS;SACV;QAED,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,gBAAgB,IAAI,QAAQ,CAAC;KAC9B;IAED,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;QAC3B,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC3B;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adtrackify/at-service-common",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*"
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"pako": "^2.1.0",
|
|
50
50
|
"papaparse": "^5.5.3",
|
|
51
51
|
"psl": "^1.15.0",
|
|
52
|
-
"shopify-api-node": "^3.12.7",
|
|
53
52
|
"ulid": "^3.0.1"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|