@spree/sdk 0.6.9 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,7 @@
1
- type StoreAddress = {
1
+ import { ListParams, AddressParams } from '@spree/sdk-core';
2
+ export { AddressParams, AuthTokens, ErrorResponse, ListParams, ListResponse, LocaleDefaults, LoginCredentials, PaginatedResponse, PaginationMeta, RegisterParams } from '@spree/sdk-core';
3
+
4
+ type Address = {
2
5
  id: string;
3
6
  firstname: string | null;
4
7
  lastname: string | null;
@@ -17,250 +20,7 @@ type StoreAddress = {
17
20
  state_name: string | null;
18
21
  };
19
22
 
20
- type AdminCustomer = {
21
- id: string;
22
- email: string;
23
- first_name: string | null;
24
- last_name: string | null;
25
- created_at: string;
26
- updated_at: string;
27
- addresses: Array<StoreAddress>;
28
- default_billing_address: StoreAddress | null;
29
- default_shipping_address: StoreAddress | null;
30
- phone: string | null;
31
- login: string | null;
32
- accepts_email_marketing: boolean;
33
- last_sign_in_at: string | null;
34
- current_sign_in_at: string | null;
35
- sign_in_count: number;
36
- failed_attempts: number;
37
- last_sign_in_ip: string | null;
38
- current_sign_in_ip: string | null;
39
- orders?: Array<AdminOrder>;
40
- };
41
-
42
- type AdminLineItem = {
43
- id: string;
44
- variant_id: string;
45
- quantity: number;
46
- currency: string;
47
- name: string;
48
- slug: string;
49
- options_text: string;
50
- price: string;
51
- display_price: string;
52
- total: string;
53
- display_total: string;
54
- adjustment_total: string;
55
- display_adjustment_total: string;
56
- additional_tax_total: string;
57
- display_additional_tax_total: string;
58
- included_tax_total: string;
59
- display_included_tax_total: string;
60
- promo_total: string;
61
- display_promo_total: string;
62
- pre_tax_amount: string;
63
- display_pre_tax_amount: string;
64
- discounted_amount: string;
65
- display_discounted_amount: string;
66
- display_compare_at_amount: string | null;
67
- created_at: string;
68
- updated_at: string;
69
- compare_at_amount: string | null;
70
- thumbnail_url: string | null;
71
- option_values: Array<StoreOptionValue>;
72
- digital_links: Array<StoreDigitalLink>;
73
- metadata: Record<string, unknown> | null;
74
- };
75
-
76
- type AdminMetafield = {
77
- id: string;
78
- name: string;
79
- type: string;
80
- key: string;
81
- value: any;
82
- display_on: string;
83
- };
84
-
85
- type AdminOrder = {
86
- id: string;
87
- number: string;
88
- state: string;
89
- checkout_steps: Array<string>;
90
- token: string;
91
- email: string | null;
92
- special_instructions: string | null;
93
- currency: string;
94
- locale: string | null;
95
- item_count: number;
96
- state_lock_version: number;
97
- shipment_state: string | null;
98
- payment_state: string | null;
99
- item_total: string;
100
- display_item_total: string;
101
- ship_total: string;
102
- display_ship_total: string;
103
- adjustment_total: string;
104
- display_adjustment_total: string;
105
- promo_total: string;
106
- display_promo_total: string;
107
- tax_total: string;
108
- display_tax_total: string;
109
- included_tax_total: string;
110
- display_included_tax_total: string;
111
- additional_tax_total: string;
112
- display_additional_tax_total: string;
113
- total: string;
114
- display_total: string;
115
- completed_at: string | null;
116
- created_at: string;
117
- updated_at: string;
118
- order_promotions: Array<StoreOrderPromotion>;
119
- line_items: Array<AdminLineItem>;
120
- shipments: Array<StoreShipment>;
121
- payments: Array<StorePayment>;
122
- bill_address: StoreAddress | null;
123
- ship_address: StoreAddress | null;
124
- payment_methods: Array<StorePaymentMethod>;
125
- channel: string | null;
126
- last_ip_address: string | null;
127
- considered_risky: boolean;
128
- confirmation_delivered: boolean;
129
- store_owner_notification_delivered: boolean;
130
- internal_note: string | null;
131
- approver_id: string | null;
132
- canceled_at: string | null;
133
- approved_at: string | null;
134
- metadata: Record<string, unknown> | null;
135
- canceler_id: string | null;
136
- created_by_id: string | null;
137
- user?: AdminCustomer;
138
- };
139
-
140
- type AdminPrice = {
141
- id: string;
142
- amount: string | null;
143
- amount_in_cents: number | null;
144
- compare_at_amount: string | null;
145
- compare_at_amount_in_cents: number | null;
146
- currency: string | null;
147
- display_amount: string | null;
148
- display_compare_at_amount: string | null;
149
- price_list_id: string | null;
150
- variant_id: string | null;
151
- created_at: string;
152
- updated_at: string;
153
- };
154
-
155
- type AdminProduct = {
156
- id: string;
157
- name: string;
158
- description: string | null;
159
- slug: string;
160
- meta_description: string | null;
161
- meta_keywords: string | null;
162
- variant_count: number;
163
- available_on: string | null;
164
- created_at: string;
165
- updated_at: string;
166
- purchasable: boolean;
167
- in_stock: boolean;
168
- backorderable: boolean;
169
- available: boolean;
170
- default_variant_id: string;
171
- thumbnail_url: string | null;
172
- tags: Array<string>;
173
- price: StorePrice;
174
- original_price: StorePrice | null;
175
- images?: Array<StoreImage>;
176
- variants?: Array<AdminVariant>;
177
- default_variant?: AdminVariant;
178
- master_variant?: AdminVariant;
179
- option_types?: Array<StoreOptionType>;
180
- taxons?: Array<StoreTaxon>;
181
- metafields?: Array<AdminMetafield>;
182
- status: string;
183
- make_active_at: string | null;
184
- discontinue_on: string | null;
185
- deleted_at: string | null;
186
- cost_price: string | null;
187
- cost_currency: string | null;
188
- };
189
-
190
- type AdminTaxon = {
191
- id: string;
192
- name: string;
193
- permalink: string;
194
- position: number;
195
- depth: number;
196
- meta_title: string | null;
197
- meta_description: string | null;
198
- meta_keywords: string | null;
199
- children_count: number;
200
- created_at: string;
201
- updated_at: string;
202
- parent_id: string | null;
203
- taxonomy_id: string;
204
- description: string;
205
- description_html: string;
206
- image_url: string | null;
207
- square_image_url: string | null;
208
- is_root: boolean;
209
- is_child: boolean;
210
- is_leaf: boolean;
211
- parent?: StoreTaxon;
212
- children?: Array<StoreTaxon>;
213
- ancestors?: Array<StoreTaxon>;
214
- metafields?: Array<AdminMetafield>;
215
- lft: number;
216
- rgt: number;
217
- };
218
-
219
- type AdminTaxonomy = {
220
- id: string;
221
- name: string;
222
- position: number;
223
- created_at: string;
224
- updated_at: string;
225
- root_id: string | null;
226
- root?: StoreTaxon;
227
- taxons?: Array<StoreTaxon>;
228
- metafields?: Array<AdminMetafield>;
229
- };
230
-
231
- type AdminVariant = {
232
- id: string;
233
- product_id: string;
234
- sku: string | null;
235
- is_master: boolean;
236
- options_text: string;
237
- track_inventory: boolean;
238
- image_count: number;
239
- created_at: string;
240
- updated_at: string;
241
- thumbnail: string | null;
242
- purchasable: boolean;
243
- in_stock: boolean;
244
- backorderable: boolean;
245
- weight: number | null;
246
- height: number | null;
247
- width: number | null;
248
- depth: number | null;
249
- price: StorePrice;
250
- original_price: StorePrice | null;
251
- images?: Array<StoreImage>;
252
- option_values: Array<StoreOptionValue>;
253
- metafields?: Array<AdminMetafield>;
254
- position: number;
255
- tax_category_id: string | null;
256
- cost_price: string | null;
257
- cost_currency: string | null;
258
- deleted_at: string | null;
259
- total_on_hand: number | null;
260
- prices?: Array<AdminPrice>;
261
- };
262
-
263
- type StoreAsset = {
23
+ type Asset = {
264
24
  id: string;
265
25
  viewable_id: string;
266
26
  type: string | null;
@@ -271,21 +31,21 @@ type StoreAsset = {
271
31
  updated_at: string;
272
32
  };
273
33
 
274
- type StoreBase = {
34
+ type Base = {
275
35
  id: string;
276
36
  };
277
37
 
278
- type StoreCountry = {
38
+ type Country = {
279
39
  iso: string;
280
40
  iso3: string;
281
41
  name: string;
282
42
  states_required: boolean;
283
43
  zipcode_required: boolean;
284
- states?: Array<StoreState>;
285
- market?: StoreMarket | null;
44
+ states?: Array<State>;
45
+ market?: Market | null;
286
46
  };
287
47
 
288
- type StoreCreditCard = {
48
+ type CreditCard = {
289
49
  id: string;
290
50
  cc_type: string;
291
51
  last_digits: string;
@@ -296,13 +56,13 @@ type StoreCreditCard = {
296
56
  gateway_payment_profile_id: string | null;
297
57
  };
298
58
 
299
- type StoreCurrency = {
59
+ type Currency = {
300
60
  iso_code: string;
301
61
  name: string;
302
62
  symbol: string;
303
63
  };
304
64
 
305
- type StoreCustomerReturn = {
65
+ type CustomerReturn = {
306
66
  id: string;
307
67
  number: string;
308
68
  created_at: string;
@@ -310,19 +70,19 @@ type StoreCustomerReturn = {
310
70
  stock_location_id: string | null;
311
71
  };
312
72
 
313
- type StoreCustomer = {
73
+ type Customer = {
314
74
  id: string;
315
75
  email: string;
316
76
  first_name: string | null;
317
77
  last_name: string | null;
318
78
  created_at: string;
319
79
  updated_at: string;
320
- addresses: Array<StoreAddress>;
321
- default_billing_address: StoreAddress | null;
322
- default_shipping_address: StoreAddress | null;
80
+ addresses: Array<Address>;
81
+ default_billing_address: Address | null;
82
+ default_shipping_address: Address | null;
323
83
  };
324
84
 
325
- type StoreDigitalLink = {
85
+ type DigitalLink = {
326
86
  id: string;
327
87
  access_counter: number;
328
88
  filename: string;
@@ -335,14 +95,14 @@ type StoreDigitalLink = {
335
95
  access_limit_exceeded: boolean;
336
96
  };
337
97
 
338
- type StoreDigital = {
98
+ type Digital = {
339
99
  id: string;
340
100
  created_at: string;
341
101
  updated_at: string;
342
102
  variant_id: string | null;
343
103
  };
344
104
 
345
- type StoreExport = {
105
+ type Export = {
346
106
  id: string;
347
107
  number: string;
348
108
  type: string | null;
@@ -352,7 +112,7 @@ type StoreExport = {
352
112
  user_id: string | null;
353
113
  };
354
114
 
355
- type StoreGiftCardBatch = {
115
+ type GiftCardBatch = {
356
116
  id: string;
357
117
  codes_count: number;
358
118
  currency: string | null;
@@ -364,7 +124,7 @@ type StoreGiftCardBatch = {
364
124
  created_by_id: string | null;
365
125
  };
366
126
 
367
- type StoreGiftCard = {
127
+ type GiftCard = {
368
128
  id: string;
369
129
  code: string;
370
130
  state: string;
@@ -384,7 +144,7 @@ type StoreGiftCard = {
384
144
  updated_at: string;
385
145
  };
386
146
 
387
- type StoreImage = {
147
+ type Image = {
388
148
  id: string;
389
149
  viewable_id: string;
390
150
  type: string | null;
@@ -402,7 +162,7 @@ type StoreImage = {
402
162
  og_image_url: string | null;
403
163
  };
404
164
 
405
- type StoreImportRow = {
165
+ type ImportRow = {
406
166
  id: string;
407
167
  row_number: number;
408
168
  status: string;
@@ -414,7 +174,7 @@ type StoreImportRow = {
414
174
  item_id: string | null;
415
175
  };
416
176
 
417
- type StoreImport = {
177
+ type Import = {
418
178
  id: string;
419
179
  number: string;
420
180
  type: string | null;
@@ -427,7 +187,7 @@ type StoreImport = {
427
187
  user_id: string | null;
428
188
  };
429
189
 
430
- type StoreInvitation = {
190
+ type Invitation = {
431
191
  id: string;
432
192
  email: string;
433
193
  resource_type: string | null;
@@ -444,7 +204,7 @@ type StoreInvitation = {
444
204
  accepted_at: string | null;
445
205
  };
446
206
 
447
- type StoreLineItem = {
207
+ type LineItem = {
448
208
  id: string;
449
209
  variant_id: string;
450
210
  quantity: number;
@@ -473,16 +233,16 @@ type StoreLineItem = {
473
233
  updated_at: string;
474
234
  compare_at_amount: string | null;
475
235
  thumbnail_url: string | null;
476
- option_values: Array<StoreOptionValue>;
477
- digital_links: Array<StoreDigitalLink>;
236
+ option_values: Array<OptionValue>;
237
+ digital_links: Array<DigitalLink>;
478
238
  };
479
239
 
480
- type StoreLocale = {
240
+ type Locale = {
481
241
  code: string;
482
242
  name: string;
483
243
  };
484
244
 
485
- type StoreMarket = {
245
+ type Market = {
486
246
  id: string;
487
247
  name: string;
488
248
  currency: string;
@@ -490,10 +250,10 @@ type StoreMarket = {
490
250
  tax_inclusive: boolean;
491
251
  default: boolean;
492
252
  supported_locales: Array<string>;
493
- countries?: Array<StoreCountry>;
253
+ countries?: Array<Country>;
494
254
  };
495
255
 
496
- type StoreMetafield = {
256
+ type Metafield = {
497
257
  id: string;
498
258
  name: string;
499
259
  type: string;
@@ -501,7 +261,7 @@ type StoreMetafield = {
501
261
  value: any;
502
262
  };
503
263
 
504
- type StoreNewsletterSubscriber = {
264
+ type NewsletterSubscriber = {
505
265
  id: string;
506
266
  email: string;
507
267
  created_at: string;
@@ -511,14 +271,14 @@ type StoreNewsletterSubscriber = {
511
271
  user_id: string | null;
512
272
  };
513
273
 
514
- type StoreOptionType = {
274
+ type OptionType = {
515
275
  id: string;
516
276
  name: string;
517
277
  presentation: string;
518
278
  position: number;
519
279
  };
520
280
 
521
- type StoreOptionValue = {
281
+ type OptionValue = {
522
282
  id: string;
523
283
  option_type_id: string;
524
284
  name: string;
@@ -528,7 +288,7 @@ type StoreOptionValue = {
528
288
  option_type_presentation: string;
529
289
  };
530
290
 
531
- type StoreOrderPromotion = {
291
+ type OrderPromotion = {
532
292
  id: string;
533
293
  promotion_id: string;
534
294
  name: string;
@@ -538,7 +298,7 @@ type StoreOrderPromotion = {
538
298
  display_amount: string;
539
299
  };
540
300
 
541
- type StoreOrder = {
301
+ type Order = {
542
302
  id: string;
543
303
  number: string;
544
304
  state: string;
@@ -571,16 +331,16 @@ type StoreOrder = {
571
331
  completed_at: string | null;
572
332
  created_at: string;
573
333
  updated_at: string;
574
- order_promotions: Array<StoreOrderPromotion>;
575
- line_items: Array<StoreLineItem>;
576
- shipments: Array<StoreShipment>;
577
- payments: Array<StorePayment>;
578
- bill_address: StoreAddress | null;
579
- ship_address: StoreAddress | null;
580
- payment_methods: Array<StorePaymentMethod>;
334
+ order_promotions: Array<OrderPromotion>;
335
+ line_items: Array<LineItem>;
336
+ shipments: Array<Shipment>;
337
+ payments: Array<Payment>;
338
+ bill_address: Address | null;
339
+ ship_address: Address | null;
340
+ payment_methods: Array<PaymentMethod>;
581
341
  };
582
342
 
583
- type StorePaymentMethod = {
343
+ type PaymentMethod = {
584
344
  id: string;
585
345
  name: string;
586
346
  description: string | null;
@@ -588,7 +348,7 @@ type StorePaymentMethod = {
588
348
  session_required: boolean;
589
349
  };
590
350
 
591
- type StorePayment = {
351
+ type Payment = {
592
352
  id: string;
593
353
  payment_method_id: string;
594
354
  state: string;
@@ -600,11 +360,11 @@ type StorePayment = {
600
360
  updated_at: string;
601
361
  source_type: 'credit_card' | 'store_credit' | 'payment_source' | null;
602
362
  source_id: string | null;
603
- source: StoreCreditCard | StoreStoreCredit | StorePaymentSource | null;
604
- payment_method: StorePaymentMethod;
363
+ source: CreditCard | StoreCredit | PaymentSource | null;
364
+ payment_method: PaymentMethod;
605
365
  };
606
366
 
607
- type StorePaymentSession = {
367
+ type PaymentSession = {
608
368
  id: string;
609
369
  status: string;
610
370
  currency: string;
@@ -617,11 +377,11 @@ type StorePaymentSession = {
617
377
  amount: string;
618
378
  payment_method_id: string;
619
379
  order_id: string;
620
- payment_method: StorePaymentMethod;
621
- payment?: StorePayment;
380
+ payment_method: PaymentMethod;
381
+ payment?: Payment;
622
382
  };
623
383
 
624
- type StorePaymentSetupSession = {
384
+ type PaymentSetupSession = {
625
385
  id: string;
626
386
  status: string;
627
387
  external_id: string | null;
@@ -633,15 +393,15 @@ type StorePaymentSetupSession = {
633
393
  payment_source_id: string | null;
634
394
  payment_source_type: string | null;
635
395
  customer_id: string | null;
636
- payment_method: StorePaymentMethod;
396
+ payment_method: PaymentMethod;
637
397
  };
638
398
 
639
- type StorePaymentSource = {
399
+ type PaymentSource = {
640
400
  id: string;
641
401
  gateway_payment_profile_id: string | null;
642
402
  };
643
403
 
644
- type StorePrice = {
404
+ type Price = {
645
405
  id: string;
646
406
  amount: string | null;
647
407
  amount_in_cents: number | null;
@@ -653,7 +413,7 @@ type StorePrice = {
653
413
  price_list_id: string | null;
654
414
  };
655
415
 
656
- type StoreProduct = {
416
+ type Product = {
657
417
  id: string;
658
418
  name: string;
659
419
  description: string | null;
@@ -671,18 +431,18 @@ type StoreProduct = {
671
431
  default_variant_id: string;
672
432
  thumbnail_url: string | null;
673
433
  tags: Array<string>;
674
- price: StorePrice;
675
- original_price: StorePrice | null;
676
- images?: Array<StoreImage>;
677
- variants?: Array<StoreVariant>;
678
- default_variant?: StoreVariant;
679
- master_variant?: StoreVariant;
680
- option_types?: Array<StoreOptionType>;
681
- taxons?: Array<StoreTaxon>;
682
- metafields?: Array<StoreMetafield>;
434
+ price: Price;
435
+ original_price: Price | null;
436
+ images?: Array<Image>;
437
+ variants?: Array<Variant>;
438
+ default_variant?: Variant;
439
+ master_variant?: Variant;
440
+ option_types?: Array<OptionType>;
441
+ taxons?: Array<Taxon>;
442
+ metafields?: Array<Metafield>;
683
443
  };
684
444
 
685
- type StorePromotion = {
445
+ type Promotion = {
686
446
  id: string;
687
447
  name: string;
688
448
  description: string | null;
@@ -703,7 +463,7 @@ type StorePromotion = {
703
463
  promotion_category_id: string | null;
704
464
  };
705
465
 
706
- type StoreRefund = {
466
+ type Refund = {
707
467
  id: string;
708
468
  transaction_id: string | null;
709
469
  created_at: string;
@@ -714,7 +474,7 @@ type StoreRefund = {
714
474
  reimbursement_id: string | null;
715
475
  };
716
476
 
717
- type StoreReimbursement = {
477
+ type Reimbursement = {
718
478
  id: string;
719
479
  number: string;
720
480
  reimbursement_status: string | null;
@@ -725,7 +485,7 @@ type StoreReimbursement = {
725
485
  customer_return_id: string | null;
726
486
  };
727
487
 
728
- type StoreReport = {
488
+ type Report = {
729
489
  id: string;
730
490
  type: string | null;
731
491
  currency: string | null;
@@ -736,7 +496,7 @@ type StoreReport = {
736
496
  date_to: string | null;
737
497
  };
738
498
 
739
- type StoreReturnAuthorization = {
499
+ type ReturnAuthorization = {
740
500
  id: string;
741
501
  number: string;
742
502
  created_at: string;
@@ -747,7 +507,7 @@ type StoreReturnAuthorization = {
747
507
  return_authorization_reason_id: string | null;
748
508
  };
749
509
 
750
- type StoreReturnItem = {
510
+ type ReturnItem = {
751
511
  id: string;
752
512
  reception_status: string | null;
753
513
  acceptance_status: string | null;
@@ -763,7 +523,7 @@ type StoreReturnItem = {
763
523
  exchange_variant_id: string | null;
764
524
  };
765
525
 
766
- type StoreShipment = {
526
+ type Shipment = {
767
527
  id: string;
768
528
  number: string;
769
529
  state: string;
@@ -774,33 +534,38 @@ type StoreShipment = {
774
534
  shipped_at: string | null;
775
535
  created_at: string;
776
536
  updated_at: string;
777
- shipping_method: StoreShippingMethod;
778
- stock_location: StoreStockLocation;
779
- shipping_rates: Array<StoreShippingRate>;
537
+ shipping_method: ShippingMethod;
538
+ stock_location: StockLocation;
539
+ shipping_rates: Array<ShippingRate>;
540
+ };
541
+
542
+ type ShippingCategory = {
543
+ id: string;
544
+ name: string;
780
545
  };
781
546
 
782
- type StoreShippingMethod = {
547
+ type ShippingMethod = {
783
548
  id: string;
784
549
  name: string;
785
550
  code: string | null;
786
551
  };
787
552
 
788
- type StoreShippingRate = {
553
+ type ShippingRate = {
789
554
  id: string;
790
555
  shipping_method_id: string;
791
556
  name: string;
792
557
  selected: boolean;
793
558
  cost: string;
794
559
  display_cost: string;
795
- shipping_method: StoreShippingMethod;
560
+ shipping_method: ShippingMethod;
796
561
  };
797
562
 
798
- type StoreState = {
563
+ type State = {
799
564
  abbr: string;
800
565
  name: string;
801
566
  };
802
567
 
803
- type StoreStockItem = {
568
+ type StockItem = {
804
569
  id: string;
805
570
  count_on_hand: number;
806
571
  backorderable: boolean;
@@ -810,7 +575,7 @@ type StoreStockItem = {
810
575
  variant_id: string | null;
811
576
  };
812
577
 
813
- type StoreStockLocation = {
578
+ type StockLocation = {
814
579
  id: string;
815
580
  state_abbr: string | null;
816
581
  name: string;
@@ -822,7 +587,7 @@ type StoreStockLocation = {
822
587
  state_text: string | null;
823
588
  };
824
589
 
825
- type StoreStockMovement = {
590
+ type StockMovement = {
826
591
  id: string;
827
592
  quantity: number;
828
593
  action: string | null;
@@ -833,7 +598,7 @@ type StoreStockMovement = {
833
598
  stock_item_id: string | null;
834
599
  };
835
600
 
836
- type StoreStockTransfer = {
601
+ type StockTransfer = {
837
602
  id: string;
838
603
  number: string | null;
839
604
  type: string | null;
@@ -844,7 +609,7 @@ type StoreStockTransfer = {
844
609
  destination_location_id: string | null;
845
610
  };
846
611
 
847
- type StoreStoreCredit = {
612
+ type StoreCredit = {
848
613
  id: string;
849
614
  amount: string;
850
615
  amount_used: string;
@@ -855,7 +620,12 @@ type StoreStoreCredit = {
855
620
  currency: string;
856
621
  };
857
622
 
858
- type StoreTaxon = {
623
+ type TaxCategory = {
624
+ id: string;
625
+ name: string;
626
+ };
627
+
628
+ type Taxon = {
859
629
  id: string;
860
630
  name: string;
861
631
  permalink: string;
@@ -876,25 +646,25 @@ type StoreTaxon = {
876
646
  is_root: boolean;
877
647
  is_child: boolean;
878
648
  is_leaf: boolean;
879
- parent?: StoreTaxon;
880
- children?: Array<StoreTaxon>;
881
- ancestors?: Array<StoreTaxon>;
882
- metafields?: Array<StoreMetafield>;
649
+ parent?: Taxon;
650
+ children?: Array<Taxon>;
651
+ ancestors?: Array<Taxon>;
652
+ metafields?: Array<Metafield>;
883
653
  };
884
654
 
885
- type StoreTaxonomy = {
655
+ type Taxonomy = {
886
656
  id: string;
887
657
  name: string;
888
658
  position: number;
889
659
  created_at: string;
890
660
  updated_at: string;
891
661
  root_id: string | null;
892
- root?: StoreTaxon;
893
- taxons?: Array<StoreTaxon>;
894
- metafields?: Array<StoreMetafield>;
662
+ root?: Taxon;
663
+ taxons?: Array<Taxon>;
664
+ metafields?: Array<Metafield>;
895
665
  };
896
666
 
897
- type StoreVariant = {
667
+ type Variant = {
898
668
  id: string;
899
669
  product_id: string;
900
670
  sku: string | null;
@@ -912,24 +682,24 @@ type StoreVariant = {
912
682
  height: number | null;
913
683
  width: number | null;
914
684
  depth: number | null;
915
- price: StorePrice;
916
- original_price: StorePrice | null;
917
- images?: Array<StoreImage>;
918
- option_values: Array<StoreOptionValue>;
919
- metafields?: Array<StoreMetafield>;
685
+ price: Price;
686
+ original_price: Price | null;
687
+ images?: Array<Image>;
688
+ option_values: Array<OptionValue>;
689
+ metafields?: Array<Metafield>;
920
690
  };
921
691
 
922
- type StoreWishedItem = {
692
+ type WishedItem = {
923
693
  id: string;
924
694
  variant_id: string;
925
695
  wishlist_id: string;
926
696
  quantity: number;
927
697
  created_at: string;
928
698
  updated_at: string;
929
- variant: StoreVariant;
699
+ variant: Variant;
930
700
  };
931
701
 
932
- type StoreWishlist = {
702
+ type Wishlist = {
933
703
  id: string;
934
704
  name: string;
935
705
  token: string;
@@ -937,68 +707,9 @@ type StoreWishlist = {
937
707
  updated_at: string;
938
708
  is_default: boolean;
939
709
  is_private: boolean;
940
- items?: Array<StoreWishedItem>;
710
+ items?: Array<WishedItem>;
941
711
  };
942
712
 
943
- interface LocaleDefaults {
944
- locale?: string;
945
- currency?: string;
946
- country?: string;
947
- }
948
- interface PaginationMeta {
949
- page: number;
950
- limit: number;
951
- count: number;
952
- pages: number;
953
- from: number;
954
- to: number;
955
- in: number;
956
- previous: number | null;
957
- next: number | null;
958
- }
959
- interface ListResponse<T> {
960
- data: T[];
961
- }
962
- interface PaginatedResponse<T> extends ListResponse<T> {
963
- meta: PaginationMeta;
964
- }
965
- interface ErrorResponse {
966
- error: {
967
- code: string;
968
- message: string;
969
- details?: Record<string, string[]>;
970
- };
971
- }
972
- interface AuthTokens {
973
- token: string;
974
- user: {
975
- id: string;
976
- email: string;
977
- first_name: string | null;
978
- last_name: string | null;
979
- };
980
- }
981
- interface LoginCredentials {
982
- email: string;
983
- password: string;
984
- }
985
- interface RegisterParams {
986
- email: string;
987
- password: string;
988
- password_confirmation: string;
989
- first_name?: string;
990
- last_name?: string;
991
- }
992
- interface ListParams {
993
- page?: number;
994
- limit?: number;
995
- /** Sort order. Prefix with - for descending, e.g. '-created_at', 'name'. Comma-separated for multiple fields. */
996
- sort?: string;
997
- /** Associations to expand. Supports dot notation for nested expand (max 4 levels), e.g. ['variants', 'variants.images'] */
998
- expand?: string[];
999
- /** Fields to include in response, e.g. ['name', 'slug', 'price']. Omit to return all fields. 'id' is always included. */
1000
- fields?: string[];
1001
- }
1002
713
  interface ProductListParams extends ListParams {
1003
714
  /** Sort: 'price', '-price', 'best_selling', 'name', '-name', '-available_on', 'available_on' */
1004
715
  sort?: string;
@@ -1068,24 +779,6 @@ interface UpdateLineItemParams {
1068
779
  /** Arbitrary key-value metadata (merged with existing) */
1069
780
  metadata?: Record<string, unknown>;
1070
781
  }
1071
- interface AddressParams {
1072
- firstname: string;
1073
- lastname: string;
1074
- address1: string;
1075
- address2?: string;
1076
- city: string;
1077
- zipcode: string;
1078
- phone?: string;
1079
- company?: string;
1080
- /** ISO 3166-1 alpha-2 country code (e.g., "US", "DE") */
1081
- country_iso: string;
1082
- /** ISO 3166-2 subdivision code without country prefix (e.g., "CA", "NY") */
1083
- state_abbr?: string;
1084
- /** State name - used for countries without predefined states */
1085
- state_name?: string;
1086
- /** When true, relaxes validation requirements (name, phone, zipcode, street) */
1087
- quick_checkout?: boolean;
1088
- }
1089
782
  interface UpdateOrderParams {
1090
783
  email?: string;
1091
784
  currency?: string;
@@ -1178,4 +871,4 @@ interface ProductFiltersParams {
1178
871
  q?: Record<string, unknown>;
1179
872
  }
1180
873
 
1181
- export type { AddLineItemParams, AddressParams, AdminCustomer, AdminLineItem, AdminMetafield, AdminOrder, AdminPrice, AdminProduct, AdminTaxon, AdminTaxonomy, AdminVariant, AuthTokens, AvailabilityFilter, CompletePaymentSessionParams, CompletePaymentSetupSessionParams, CreateCartParams, CreatePaymentSessionParams, CreatePaymentSetupSessionParams, ErrorResponse, FilterOption, LineItemInput, ListParams, ListResponse, LocaleDefaults, LoginCredentials, OptionFilter, OptionFilterOption, OrderListParams, PaginatedResponse, PaginationMeta, PriceRangeFilter, ProductFilter, ProductFiltersParams, ProductFiltersResponse, ProductListParams, RegisterParams, SortOption, StoreAddress, StoreAsset, StoreBase, StoreCountry, StoreCreditCard, StoreCurrency, StoreCustomer, StoreCustomerReturn, StoreDigital, StoreDigitalLink, StoreExport, StoreGiftCard, StoreGiftCardBatch, StoreImage, StoreImport, StoreImportRow, StoreInvitation, StoreLineItem, StoreLocale, StoreMarket, StoreMetafield, StoreNewsletterSubscriber, StoreOptionType, StoreOptionValue, StoreOrder, StoreOrderPromotion, StorePayment, StorePaymentMethod, StorePaymentSession, StorePaymentSetupSession, StorePaymentSource, StorePrice, StoreProduct, StorePromotion, StoreRefund, StoreReimbursement, StoreReport, StoreReturnAuthorization, StoreReturnItem, StoreShipment, StoreShippingMethod, StoreShippingRate, StoreState, StoreStockItem, StoreStockLocation, StoreStockMovement, StoreStockTransfer, StoreStoreCredit, StoreTaxon, StoreTaxonomy, StoreVariant, StoreWishedItem, StoreWishlist, TaxonFilter, TaxonFilterOption, TaxonListParams, UpdateLineItemParams, UpdateOrderParams, UpdatePaymentSessionParams };
874
+ export type { AddLineItemParams, Address, Asset, AvailabilityFilter, Base, CompletePaymentSessionParams, CompletePaymentSetupSessionParams, Country, CreateCartParams, CreatePaymentSessionParams, CreatePaymentSetupSessionParams, CreditCard, Currency, Customer, CustomerReturn, Digital, DigitalLink, Export, FilterOption, GiftCard, GiftCardBatch, Image, Import, ImportRow, Invitation, LineItem, LineItemInput, Locale, Market, Metafield, NewsletterSubscriber, OptionFilter, OptionFilterOption, OptionType, OptionValue, Order, OrderListParams, OrderPromotion, Payment, PaymentMethod, PaymentSession, PaymentSetupSession, PaymentSource, Price, PriceRangeFilter, Product, ProductFilter, ProductFiltersParams, ProductFiltersResponse, ProductListParams, Promotion, Refund, Reimbursement, Report, ReturnAuthorization, ReturnItem, Shipment, ShippingCategory, ShippingMethod, ShippingRate, SortOption, State, StockItem, StockLocation, StockMovement, StockTransfer, Address as StoreAddress, Asset as StoreAsset, Country as StoreCountry, StoreCredit, CreditCard as StoreCreditCard, Currency as StoreCurrency, Customer as StoreCustomer, CustomerReturn as StoreCustomerReturn, Digital as StoreDigital, DigitalLink as StoreDigitalLink, GiftCard as StoreGiftCard, GiftCardBatch as StoreGiftCardBatch, Image as StoreImage, LineItem as StoreLineItem, Locale as StoreLocale, Market as StoreMarket, Metafield as StoreMetafield, OptionType as StoreOptionType, OptionValue as StoreOptionValue, Order as StoreOrder, OrderPromotion as StoreOrderPromotion, Payment as StorePayment, PaymentMethod as StorePaymentMethod, PaymentSession as StorePaymentSession, PaymentSetupSession as StorePaymentSetupSession, PaymentSource as StorePaymentSource, Price as StorePrice, Product as StoreProduct, Promotion as StorePromotion, Refund as StoreRefund, Reimbursement as StoreReimbursement, ReturnAuthorization as StoreReturnAuthorization, ReturnItem as StoreReturnItem, Shipment as StoreShipment, ShippingCategory as StoreShippingCategory, ShippingMethod as StoreShippingMethod, ShippingRate as StoreShippingRate, State as StoreState, StockItem as StoreStockItem, StockLocation as StoreStockLocation, StoreCredit as StoreStoreCredit, TaxCategory as StoreTaxCategory, Taxon as StoreTaxon, Taxonomy as StoreTaxonomy, Variant as StoreVariant, WishedItem as StoreWishedItem, Wishlist as StoreWishlist, TaxCategory, Taxon, TaxonFilter, TaxonFilterOption, TaxonListParams, Taxonomy, UpdateLineItemParams, UpdateOrderParams, UpdatePaymentSessionParams, Variant, WishedItem, Wishlist };