@dropins/storefront-order 0.1.0-alpha4 → 0.1.0-alpha5

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.
Files changed (48) hide show
  1. package/api/getGuestOrder/getGuestOrder.d.ts +2 -2
  2. package/api/getOrderDetailsById/getOrderDetailsById.d.ts +1 -2
  3. package/api/getOrderDetailsById/graphql/orderItemsFragment.graphql.d.ts +1 -1
  4. package/api/guestOrderByToken/guestOrderByToken.d.ts +2 -2
  5. package/api.js +130 -29
  6. package/chunks/OrderActions.js +1 -0
  7. package/chunks/OrderLoaders.js +1 -0
  8. package/chunks/getGuestOrder.js +75 -31
  9. package/components/OrderActions/OrderActions.d.ts +5 -0
  10. package/components/OrderActions/index.d.ts +3 -0
  11. package/components/OrderLoaders/OrderLoaders.d.ts +6 -0
  12. package/components/OrderLoaders/index.d.ts +3 -0
  13. package/components/OrderStatusContent/OrderStatusContent.d.ts +5 -0
  14. package/components/OrderStatusContent/index.d.ts +3 -0
  15. package/components/ShippingStatusCard/ShippingStatusCard.d.ts +5 -0
  16. package/components/ShippingStatusCard/index.d.ts +3 -0
  17. package/components/index.d.ts +4 -0
  18. package/configs/mock.config.d.ts +720 -0
  19. package/containers/OrderSearch.js +1 -1
  20. package/containers/OrderStatus/OrderStatus.d.ts +5 -0
  21. package/containers/OrderStatus/index.d.ts +3 -0
  22. package/containers/OrderStatus.d.ts +3 -0
  23. package/containers/OrderStatus.js +1 -0
  24. package/containers/ShippingStatus/ShippingStatus.d.ts +5 -0
  25. package/containers/ShippingStatus/index.d.ts +3 -0
  26. package/containers/ShippingStatus.d.ts +3 -0
  27. package/containers/ShippingStatus.js +1 -0
  28. package/containers/index.d.ts +2 -0
  29. package/data/models/index.d.ts +0 -1
  30. package/data/models/order-details.d.ts +109 -32
  31. package/data/transforms/transform-guest-order.d.ts +3 -3
  32. package/data/transforms/transform-order-details.d.ts +4 -2
  33. package/hooks/containers/useOrderSearch.d.ts +1 -1
  34. package/hooks/containers/useOrderStatus.d.ts +8 -0
  35. package/hooks/containers/useShippingStatus.d.ts +7 -0
  36. package/hooks/index.d.ts +2 -0
  37. package/i18n/en_US.json.d.ts +50 -2
  38. package/lib/convertCase.d.ts +4 -0
  39. package/lib/convertToInputDateFormat.d.ts +1 -0
  40. package/package.json +1 -1
  41. package/render.js +2 -2
  42. package/types/api/getOrderDetails.types.d.ts +54 -28
  43. package/types/form.types.d.ts +5 -5
  44. package/types/index.d.ts +4 -2
  45. package/types/orderSearch.types.d.ts +5 -5
  46. package/types/orderStatus.types.d.ts +41 -0
  47. package/types/shippingStatus.types.d.ts +18 -0
  48. package/data/models/guest-order.d.ts +0 -21
@@ -158,4 +158,724 @@ export declare const mockOrderDetailsResponse: {
158
158
  };
159
159
  };
160
160
  };
161
+ export declare const transformMockOrderInput: {
162
+ data: {
163
+ customer: {
164
+ orders: {
165
+ items: {
166
+ available_actions: string[];
167
+ status: string;
168
+ number: string;
169
+ id: string;
170
+ order_date: string;
171
+ carrier: string;
172
+ shipping_method: null;
173
+ applied_coupons: never[];
174
+ payment_methods: {
175
+ test: null;
176
+ prop: undefined;
177
+ }[];
178
+ shipments: {
179
+ id: string;
180
+ tracking: {
181
+ title: string;
182
+ number: string;
183
+ }[];
184
+ comments: never[];
185
+ items: {
186
+ id: string;
187
+ product_sku: string;
188
+ product_name: string;
189
+ order_item: {
190
+ __typename: string;
191
+ status: string;
192
+ product_name: string;
193
+ id: string;
194
+ quantity_ordered: number;
195
+ quantity_shipped: number;
196
+ quantity_canceled: number;
197
+ quantity_invoiced: number;
198
+ quantity_refunded: number;
199
+ quantity_returned: number;
200
+ product_sale_price: {
201
+ value: number;
202
+ currency: string;
203
+ };
204
+ selected_options: {
205
+ label: string;
206
+ value: string;
207
+ }[];
208
+ product: {
209
+ __typename: string;
210
+ canonical_url: null;
211
+ uid: string;
212
+ name: string;
213
+ sku: string;
214
+ thumbnail: {
215
+ label: string;
216
+ url: string;
217
+ };
218
+ price_range: {
219
+ maximum_price: {
220
+ regular_price: {
221
+ currency: string;
222
+ value: number;
223
+ };
224
+ };
225
+ };
226
+ };
227
+ };
228
+ }[];
229
+ }[];
230
+ shipping_address: {
231
+ city: string;
232
+ company: null;
233
+ country_code: string;
234
+ fax: null;
235
+ firstname: string;
236
+ lastname: string;
237
+ middlename: null;
238
+ postcode: string;
239
+ prefix: null;
240
+ region: string;
241
+ region_id: string;
242
+ street: string[];
243
+ suffix: null;
244
+ telephone: string;
245
+ vat_id: null;
246
+ };
247
+ billing_address: {
248
+ city: string;
249
+ company: null;
250
+ country_code: string;
251
+ fax: null;
252
+ firstname: string;
253
+ lastname: string;
254
+ middlename: null;
255
+ postcode: string;
256
+ prefix: null;
257
+ region: string;
258
+ region_id: string;
259
+ street: string[];
260
+ suffix: null;
261
+ telephone: string;
262
+ vat_id: null;
263
+ };
264
+ items: ({
265
+ __typename: string;
266
+ gift_card: {
267
+ sender_name: null;
268
+ sender_email: null;
269
+ recipient_email: null;
270
+ recipient_name: null;
271
+ };
272
+ status?: undefined;
273
+ product_name?: undefined;
274
+ id?: undefined;
275
+ quantity_ordered?: undefined;
276
+ quantity_shipped?: undefined;
277
+ quantity_canceled?: undefined;
278
+ quantity_invoiced?: undefined;
279
+ quantity_refunded?: undefined;
280
+ quantity_returned?: undefined;
281
+ product_sale_price?: undefined;
282
+ selected_options?: undefined;
283
+ product?: undefined;
284
+ } | {
285
+ __typename: string;
286
+ gift_card: {
287
+ sender_name: string;
288
+ sender_email: string;
289
+ recipient_email: string;
290
+ recipient_name: string;
291
+ };
292
+ status?: undefined;
293
+ product_name?: undefined;
294
+ id?: undefined;
295
+ quantity_ordered?: undefined;
296
+ quantity_shipped?: undefined;
297
+ quantity_canceled?: undefined;
298
+ quantity_invoiced?: undefined;
299
+ quantity_refunded?: undefined;
300
+ quantity_returned?: undefined;
301
+ product_sale_price?: undefined;
302
+ selected_options?: undefined;
303
+ product?: undefined;
304
+ } | {
305
+ __typename: string;
306
+ status: string;
307
+ product_name: string;
308
+ id: string;
309
+ quantity_ordered: number;
310
+ quantity_shipped: number;
311
+ quantity_canceled: number;
312
+ quantity_invoiced: number;
313
+ quantity_refunded: number;
314
+ quantity_returned: number;
315
+ product_sale_price: {
316
+ value: number;
317
+ currency: string;
318
+ };
319
+ selected_options: {
320
+ label: string;
321
+ value: string;
322
+ }[];
323
+ product: {
324
+ __typename: string;
325
+ canonical_url: null;
326
+ uid: string;
327
+ name: string;
328
+ sku: string;
329
+ thumbnail: {
330
+ label: string;
331
+ url: string;
332
+ };
333
+ price_range: {
334
+ maximum_price: {
335
+ regular_price: {
336
+ currency: string;
337
+ value: number;
338
+ };
339
+ };
340
+ };
341
+ };
342
+ gift_card?: undefined;
343
+ })[];
344
+ total: {
345
+ grand_total: {
346
+ value: number;
347
+ currency: string;
348
+ };
349
+ subtotal: {
350
+ currency: string;
351
+ value: number;
352
+ };
353
+ taxes: never[];
354
+ total_tax: {
355
+ currency: string;
356
+ value: number;
357
+ };
358
+ total_shipping: {
359
+ currency: string;
360
+ value: number;
361
+ };
362
+ discounts: {
363
+ amount: {
364
+ currency: string;
365
+ value: number;
366
+ };
367
+ label: string;
368
+ }[];
369
+ };
370
+ }[];
371
+ };
372
+ };
373
+ };
374
+ };
375
+ export declare const transformMockOrderOutput: {
376
+ grandTotal: {
377
+ value: number;
378
+ currency: string;
379
+ };
380
+ subtotal: {
381
+ currency: string;
382
+ value: number;
383
+ };
384
+ taxes: never[];
385
+ totalTax: {
386
+ currency: string;
387
+ value: number;
388
+ };
389
+ totalShipping: {
390
+ currency: string;
391
+ value: number;
392
+ };
393
+ discounts: {
394
+ amount: {
395
+ currency: string;
396
+ value: number;
397
+ };
398
+ label: string;
399
+ }[];
400
+ availableActions: string[];
401
+ status: string;
402
+ number: string;
403
+ id: string;
404
+ orderDate: string;
405
+ carrier: string;
406
+ shippingMethod: null;
407
+ coupons: never[];
408
+ shipments: {
409
+ id: string;
410
+ tracking: {
411
+ title: string;
412
+ number: string;
413
+ }[];
414
+ comments: never[];
415
+ items: {
416
+ id: string;
417
+ productSku: string;
418
+ productName: string;
419
+ orderItem: {
420
+ __typename: string;
421
+ status: string;
422
+ productName: string;
423
+ id: string;
424
+ quantityOrdered: number;
425
+ quantityShipped: number;
426
+ quantityCanceled: number;
427
+ quantityInvoiced: number;
428
+ quantityRefunded: number;
429
+ quantityReturned: number;
430
+ productSalePrice: {
431
+ value: number;
432
+ currency: string;
433
+ };
434
+ selectedOptions: {
435
+ label: string;
436
+ value: string;
437
+ }[];
438
+ product: {
439
+ __typename: string;
440
+ canonicalUrl: null;
441
+ uid: string;
442
+ name: string;
443
+ sku: string;
444
+ thumbnail: {
445
+ label: string;
446
+ url: string;
447
+ };
448
+ priceRange: {
449
+ maximumPrice: {
450
+ regularPrice: {
451
+ currency: string;
452
+ value: number;
453
+ };
454
+ };
455
+ };
456
+ };
457
+ };
458
+ }[];
459
+ }[];
460
+ shippingAddress: {
461
+ city: string;
462
+ company: null;
463
+ countryCode: string;
464
+ fax: null;
465
+ firstName: string;
466
+ lastName: string;
467
+ middleName: null;
468
+ postCode: string;
469
+ prefix: null;
470
+ region: string;
471
+ regionId: string;
472
+ street: string[];
473
+ suffix: null;
474
+ telephone: string;
475
+ vatId: null;
476
+ };
477
+ billingAddress: {
478
+ city: string;
479
+ company: null;
480
+ countryCode: string;
481
+ fax: null;
482
+ firstName: string;
483
+ lastName: string;
484
+ middleName: null;
485
+ postCode: string;
486
+ prefix: null;
487
+ region: string;
488
+ regionId: string;
489
+ street: string[];
490
+ suffix: null;
491
+ telephone: string;
492
+ vatId: null;
493
+ };
494
+ items: ({
495
+ type: string;
496
+ configurableOptions: undefined;
497
+ discounted: boolean;
498
+ total: {
499
+ currency: undefined;
500
+ value: number;
501
+ };
502
+ totalInclTax: {
503
+ currency: undefined;
504
+ value: number;
505
+ };
506
+ price: {
507
+ currency: undefined;
508
+ value: undefined;
509
+ };
510
+ priceInclTax: {
511
+ currency: undefined;
512
+ value: undefined;
513
+ };
514
+ totalQuantity: number;
515
+ regularPrice: {
516
+ currency: undefined;
517
+ value: undefined;
518
+ };
519
+ product: {
520
+ canonicalUrl: string;
521
+ id: string;
522
+ name: string;
523
+ sku: string;
524
+ image: string;
525
+ productType: string;
526
+ thumbnail: {
527
+ label: string;
528
+ url: string;
529
+ };
530
+ };
531
+ thumbnail: {
532
+ label: string;
533
+ url: string;
534
+ };
535
+ giftCard: {
536
+ senderName: string;
537
+ senderEmail: string;
538
+ recipientEmail: string;
539
+ recipientName: string;
540
+ };
541
+ id: undefined;
542
+ } | {
543
+ type: string;
544
+ id: string;
545
+ giftCard: undefined;
546
+ discounted: boolean;
547
+ total: {
548
+ value: number;
549
+ currency: string;
550
+ };
551
+ totalInclTax: {
552
+ value: number;
553
+ currency: string;
554
+ };
555
+ price: {
556
+ value: number;
557
+ currency: string;
558
+ };
559
+ priceInclTax: {
560
+ value: number;
561
+ currency: string;
562
+ };
563
+ totalQuantity: number;
564
+ regularPrice: {
565
+ value: number;
566
+ currency: string;
567
+ };
568
+ product: {
569
+ canonicalUrl: string;
570
+ id: string;
571
+ name: string;
572
+ sku: string;
573
+ image: string;
574
+ productType: string;
575
+ thumbnail: {
576
+ label: string;
577
+ url: string;
578
+ };
579
+ };
580
+ thumbnail: {
581
+ label: string;
582
+ url: string;
583
+ };
584
+ configurableOptions: {
585
+ Size?: undefined;
586
+ Color?: undefined;
587
+ };
588
+ } | {
589
+ type: string;
590
+ id: string;
591
+ giftCard: undefined;
592
+ discounted: boolean;
593
+ total: {
594
+ value: number;
595
+ currency: string;
596
+ };
597
+ totalInclTax: {
598
+ value: number;
599
+ currency: string;
600
+ };
601
+ price: {
602
+ value: number;
603
+ currency: string;
604
+ };
605
+ priceInclTax: {
606
+ value: number;
607
+ currency: string;
608
+ };
609
+ totalQuantity: number;
610
+ regularPrice: {
611
+ value: number;
612
+ currency: string;
613
+ };
614
+ product: {
615
+ canonicalUrl: string;
616
+ id: string;
617
+ name: string;
618
+ sku: string;
619
+ image: string;
620
+ productType: string;
621
+ thumbnail: {
622
+ label: string;
623
+ url: string;
624
+ };
625
+ };
626
+ thumbnail: {
627
+ label: string;
628
+ url: string;
629
+ };
630
+ configurableOptions: {
631
+ Size: string;
632
+ Color: string;
633
+ };
634
+ })[];
635
+ totalQuantity: number;
636
+ shipping: {
637
+ amount: number;
638
+ currency: string;
639
+ code: string;
640
+ };
641
+ payments: {
642
+ code: string;
643
+ name: string;
644
+ }[];
645
+ };
646
+ export declare const storyBookOrderData: {
647
+ grandTotal: {
648
+ value: number;
649
+ currency: string;
650
+ };
651
+ subtotal: {
652
+ currency: string;
653
+ value: number;
654
+ };
655
+ taxes: never[];
656
+ totalTax: {
657
+ currency: string;
658
+ value: number;
659
+ };
660
+ totalShipping: {
661
+ currency: string;
662
+ value: number;
663
+ };
664
+ discounts: {
665
+ amount: {
666
+ currency: string;
667
+ value: number;
668
+ };
669
+ label: string;
670
+ }[];
671
+ availableActions: string[];
672
+ status: string;
673
+ number: string;
674
+ id: string;
675
+ orderDate: string;
676
+ carrier: string;
677
+ shippingMethod: string;
678
+ isVirtual: boolean;
679
+ coupons: never[];
680
+ shipments: {
681
+ id: string;
682
+ number: string;
683
+ tracking: {
684
+ title: string;
685
+ number: string;
686
+ carrier: string;
687
+ }[];
688
+ comments: never[];
689
+ items: {
690
+ id: string;
691
+ productSku: string;
692
+ productName: string;
693
+ orderItem: {
694
+ __typename: string;
695
+ status: string;
696
+ productName: string;
697
+ id: string;
698
+ quantityOrdered: number;
699
+ quantityShipped: number;
700
+ quantityCanceled: number;
701
+ quantityInvoiced: number;
702
+ quantityRefunded: number;
703
+ quantityReturned: number;
704
+ productSalePrice: {
705
+ value: number;
706
+ currency: string;
707
+ };
708
+ selectedOptions: never[];
709
+ product: {
710
+ __typename: string;
711
+ canonicalUrl: null;
712
+ uid: string;
713
+ name: string;
714
+ sku: string;
715
+ thumbnail: {
716
+ label: string;
717
+ url: string;
718
+ };
719
+ priceRange: {
720
+ maximumPrice: {
721
+ regularPrice: {
722
+ currency: string;
723
+ value: number;
724
+ };
725
+ };
726
+ };
727
+ };
728
+ };
729
+ }[];
730
+ }[];
731
+ payments: {
732
+ code: string;
733
+ name: string;
734
+ }[];
735
+ shippingAddress: {
736
+ city: string;
737
+ company: null;
738
+ countryCode: string;
739
+ fax: null;
740
+ firstName: string;
741
+ lastName: string;
742
+ middleName: null;
743
+ postCode: string;
744
+ prefix: null;
745
+ region: string;
746
+ regionId: string;
747
+ street: string[];
748
+ suffix: null;
749
+ telephone: string;
750
+ vatId: null;
751
+ };
752
+ billingAddress: {
753
+ city: string;
754
+ company: null;
755
+ countryCode: string;
756
+ fax: null;
757
+ firstName: string;
758
+ lastName: string;
759
+ middleName: null;
760
+ postCode: string;
761
+ prefix: null;
762
+ region: string;
763
+ regionId: string;
764
+ street: string[];
765
+ suffix: null;
766
+ telephone: string;
767
+ vatId: null;
768
+ };
769
+ items: ({
770
+ type: string;
771
+ productName: string;
772
+ quantityCanceled: number;
773
+ quantityInvoiced: number;
774
+ quantityOrdered: number;
775
+ quantityRefunded: number;
776
+ quantityReturned: number;
777
+ quantityShipped: number;
778
+ id: string;
779
+ discounted: boolean;
780
+ total: {
781
+ value: number;
782
+ currency: string;
783
+ };
784
+ totalInclTax: {
785
+ value: number;
786
+ currency: string;
787
+ };
788
+ price: {
789
+ value: number;
790
+ currency: string;
791
+ };
792
+ priceInclTax: {
793
+ value: number;
794
+ currency: string;
795
+ };
796
+ totalQuantity: number;
797
+ regularPrice: {
798
+ value: number;
799
+ currency: string;
800
+ };
801
+ product: {
802
+ canonicalUrl: string;
803
+ id: string;
804
+ name: string;
805
+ sku: string;
806
+ image: string;
807
+ productType: string;
808
+ thumbnail: {
809
+ label: string;
810
+ url: string;
811
+ };
812
+ };
813
+ thumbnail: {
814
+ label: string;
815
+ url: string;
816
+ };
817
+ configurableOptions: {
818
+ Size?: undefined;
819
+ Color?: undefined;
820
+ };
821
+ } | {
822
+ type: string;
823
+ productName: string;
824
+ quantityCanceled: number;
825
+ quantityInvoiced: number;
826
+ quantityOrdered: number;
827
+ quantityRefunded: number;
828
+ quantityReturned: number;
829
+ quantityShipped: number;
830
+ id: string;
831
+ discounted: boolean;
832
+ total: {
833
+ value: number;
834
+ currency: string;
835
+ };
836
+ totalInclTax: {
837
+ value: number;
838
+ currency: string;
839
+ };
840
+ price: {
841
+ value: number;
842
+ currency: string;
843
+ };
844
+ priceInclTax: {
845
+ value: number;
846
+ currency: string;
847
+ };
848
+ totalQuantity: number;
849
+ regularPrice: {
850
+ value: number;
851
+ currency: string;
852
+ };
853
+ product: {
854
+ canonicalUrl: string;
855
+ id: string;
856
+ name: string;
857
+ sku: string;
858
+ image: string;
859
+ productType: string;
860
+ thumbnail: {
861
+ label: string;
862
+ url: string;
863
+ };
864
+ };
865
+ thumbnail: {
866
+ label: string;
867
+ url: string;
868
+ };
869
+ configurableOptions: {
870
+ Size: string;
871
+ Color: string;
872
+ };
873
+ })[];
874
+ totalQuantity: number;
875
+ shipping: {
876
+ amount: number;
877
+ currency: string;
878
+ code: string;
879
+ };
880
+ };
161
881
  //# sourceMappingURL=mock.config.d.ts.map