types-magic-api 0.1.41 → 0.1.47

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.
@@ -61,7 +61,7 @@ export interface CreateCustomerCheckoutReq {
61
61
  * API Name: /api/customer/checkout/create
62
62
  */
63
63
  export interface CreateCustomerCheckoutRes {
64
- checkout: Model.ShopifyCheckoutRes;
64
+ checkout: Model.ICart;
65
65
  }
66
66
  export interface ReorderReq {
67
67
  orderId: string;
@@ -170,7 +170,7 @@ export interface CustomerCreateReq {
170
170
  email: string;
171
171
  firstName?: string;
172
172
  lastName?: string;
173
- password: string;
173
+ password?: string;
174
174
  phone?: string;
175
175
  language: string;
176
176
  }
@@ -185,7 +185,7 @@ export interface CustomerCreateRes {
185
185
  */
186
186
  export interface addCartDeliveryAddressReq {
187
187
  cartId: string;
188
- addresses: Array<{
188
+ addresses: {
189
189
  selected: boolean;
190
190
  address: {
191
191
  deliveryAddress: {
@@ -201,7 +201,7 @@ export interface addCartDeliveryAddressReq {
201
201
  countryCode: string;
202
202
  };
203
203
  };
204
- }>;
204
+ };
205
205
  }
206
206
  /**
207
207
  * API Name: /api/customer/get
@@ -188,6 +188,7 @@ export interface ICustomerProduct {
188
188
  description: string;
189
189
  descriptionHtml: string;
190
190
  featuredImage: Image | null;
191
+ image: Image | null;
191
192
  handle: string;
192
193
  id: string;
193
194
  priceRangeV2: PriceRange;
@@ -240,7 +241,7 @@ export interface ICustomerProductsVariant {
240
241
  unitPrice: Money | null;
241
242
  weight: number | null;
242
243
  sku?: string;
243
- weightUnit: WeightUnit;
244
+ weightUnit: WeightUnit | null;
244
245
  }
245
246
  export interface MailingAddress {
246
247
  address1: string | null;
@@ -314,7 +315,7 @@ export interface ShopifyCustomerRes {
314
315
  }
315
316
  export interface cartDeliveryAddressReq {
316
317
  id: string;
317
- addresses: Array<{
318
+ addresses: {
318
319
  selected: boolean;
319
320
  address: {
320
321
  deliveryAddress: {
@@ -330,7 +331,7 @@ export interface cartDeliveryAddressReq {
330
331
  countryCode: string;
331
332
  };
332
333
  };
333
- }>;
334
+ };
334
335
  }
335
336
  export interface cartDeliveryFrontAddressRes {
336
337
  data: {
@@ -355,8 +356,8 @@ export interface cartDeliveryAddressRes {
355
356
  */
356
357
  export interface CustomerProviderLoginReq {
357
358
  email: string;
358
- password?: string | null;
359
- otp?: string | null;
359
+ password?: string;
360
+ otp?: string;
360
361
  }
361
362
  /**
362
363
  * API Name: /api/customer/login
@@ -618,6 +619,7 @@ export interface CustomerOrder {
618
619
  }[];
619
620
  totalPrice: Money;
620
621
  totalRefunded: Money;
622
+ subtotalPrice: Money;
621
623
  totalShippingPrice: Money;
622
624
  totalTax: Money;
623
625
  lineItems: {
@@ -641,200 +643,54 @@ export interface CustomerOrder {
641
643
  }[];
642
644
  };
643
645
  }
644
- export interface ShopifyCheckoutAddress {
645
- address1: string | null;
646
- address2: string | null;
647
- city: string | null;
648
- company: string | null;
649
- country: string | null;
650
- first_name: string | null;
651
- last_name: string | null;
652
- phone: string | null;
653
- province: string | null;
654
- zip: string | null;
655
- }
656
- export interface ShopifyCheckoutLine {
657
- variant_id: string;
658
- quantity: number;
659
- requires_shipping: boolean;
660
- }
661
646
  export interface ShopifyCheckoutReq {
662
- storeId: string;
663
- line_items: Array<ShopifyCheckoutLine>;
664
- customer_id: string;
665
- email: string | null;
666
- shipping_line: {
667
- handle: string;
668
- } | null;
669
- applied_discount: {
670
- amount: string;
671
- title: string;
672
- description: null;
673
- value: string;
674
- value_type: string;
675
- } | null;
676
- customer_address: ShopifyCheckoutAddress;
677
- token: string | null;
647
+ buyerIdentity: {
648
+ email: string | null;
649
+ };
678
650
  note: string;
651
+ delivery: {
652
+ addresses: {
653
+ selected: boolean;
654
+ address: {
655
+ deliveryAddress: {
656
+ address1: string | null;
657
+ address2?: string | null;
658
+ city: string | null;
659
+ company?: string | null;
660
+ firstName?: string | null;
661
+ lastName?: string | null;
662
+ phone?: string | null;
663
+ provinceCode: string | null;
664
+ zip: string | null;
665
+ countryCode: string | null;
666
+ };
667
+ };
668
+ }[];
669
+ };
670
+ lines: {
671
+ merchandiseId: string;
672
+ quantity: number;
673
+ }[];
679
674
  }
680
675
  export interface ShopifyCheckoutRes {
681
- line_items: Array<{
682
- id: string;
683
- key: string;
684
- product_id: number;
685
- variant_id: number;
686
- sku: string;
687
- vendor: string;
688
- title: string;
689
- variant_title: string;
690
- image_url: string;
691
- taxable: boolean;
692
- requires_shipping: boolean;
693
- gift_card: boolean;
694
- price: string;
695
- compare_at_price: string;
696
- line_price: string;
697
- properties: object;
698
- quantity: number;
699
- grams: number;
700
- fulfillment_service: string;
701
- applied_discounts: Array<string>;
702
- discount_allocations: Array<{
703
- id: string;
676
+ id: string;
677
+ invoiceUrl: string;
678
+ note2: string;
679
+ currencyCode: string;
680
+ lineItems: ICartLine[];
681
+ totalQuantityOfLineItems: number;
682
+ totalPriceSet: {
683
+ shopMoney: {
704
684
  amount: string;
705
- description: string;
706
- created_at: string;
707
- application_type: string;
708
- }>;
709
- tax_lines: Array<{
710
- price: string;
711
- rate: number;
712
- title: string;
713
- channel_liable: boolean;
714
- }>;
715
- }>;
716
- buyer_accepts_marketing: boolean;
717
- customer_id: number | string;
718
- requires_shipping: boolean;
719
- billing_address: {
720
- id: number;
721
- first_name: string;
722
- last_name: string;
723
- phone: string;
724
- compstring: string;
725
- address1: string;
726
- address2: string;
727
- city: string;
728
- province: string;
729
- province_code: string;
730
- country: string;
731
- country_code: string;
732
- zip: string;
733
- };
734
- shipping_address: {
735
- id: number;
736
- first_name: string;
737
- last_name: string;
738
- phone: string;
739
- compstring: string;
740
- address1: string;
741
- address2: string;
742
- city: string;
743
- province: string;
744
- province_code: string;
745
- country: string;
746
- country_code: string;
747
- zip: string;
748
- };
749
- email: string | null;
750
- applied_discount: {
751
- amount: string;
752
- title: string;
753
- description: string;
754
- value: string;
755
- value_type: string;
756
- non_applicable_reason: string;
757
- applicable: boolean;
758
- application_type: string;
759
- };
760
- shipping_line: {
761
- handle: string;
762
- price: string;
763
- title: string;
764
- tax_lines: Array<string>;
685
+ currencyCode: string;
686
+ };
765
687
  };
766
- completed_at: string;
767
- created_at: string;
768
- currency: string;
769
- presentment_currency: string;
770
- customer_locale: string;
771
- device_id: string;
772
- discount_code: object;
773
- discount_codes: Array<string>;
774
- legal_notice_url: string;
775
- location_id: string;
776
- name: string;
777
- note: string;
778
- note_attributes: object;
779
- order_id: string;
780
- order_status_url: string;
781
- order: object;
782
- payment_due: string;
783
- payment_url: string;
784
- payments: Array<string>;
785
- phone: string;
786
- shopify_payments_account_id: string;
787
- privacy_policy_url: string;
788
- refund_policy_url: string;
789
- reservation_time_left: number;
790
- reservation_time: string;
791
- source_identifier: string;
792
- source_name: string;
793
- source_url: string;
794
- subscription_policy_url: string;
795
- subtotal_price: string;
796
- shipping_policy_url: string;
797
- tax_exempt: boolean;
798
- taxes_included: boolean;
799
- terms_of_sale_url: string;
800
- terms_of_service_url: string;
801
- token: string;
802
- total_price: string;
803
- total_tax: string;
804
- total_tip_received: string;
805
- total_line_items_price: string;
806
- updated_at: string;
807
- user_id: string;
808
- web_url: string;
809
- gift_cards: Array<string>;
810
- tax_lines: Array<{
811
- price: string;
812
- rate: number;
813
- title: string;
814
- compare_at: number;
815
- }>;
816
- tax_manipulations: Array<string>;
817
- shipping_rate: {
818
- id: string;
819
- price: string;
820
- title: string;
688
+ subtotalPriceSet: {
689
+ shopMoney: {
690
+ amount: string;
691
+ currencyCode: string;
692
+ };
821
693
  };
822
- credit_card: string;
823
- applied_discounts: Array<{
824
- amount: string;
825
- title: string;
826
- description: string;
827
- value: string;
828
- value_type: string;
829
- non_applicable_reason: string;
830
- applicable: boolean;
831
- application_type: string;
832
- discount_class: string;
833
- non_applicable_code: string;
834
- }>;
835
- discount_violations: Array<string>;
836
- allowedShippingRates: ShopifyShippingRates[];
837
- discount: null | ShopifyDiscount;
838
694
  }
839
695
  export interface ShopifyShippingRates {
840
696
  id: number;
@@ -1011,17 +867,19 @@ export interface ShopifyLoginRes {
1011
867
  redirectUrl: string;
1012
868
  }
1013
869
  export interface getLogoImage {
1014
- shop: {
1015
- brand: {
1016
- logo: {
1017
- image: {
1018
- url: string;
870
+ data: {
871
+ shop: {
872
+ brand: {
873
+ logo: {
874
+ image: {
875
+ url: string;
876
+ };
1019
877
  };
1020
878
  };
1021
- };
1022
- name: string;
1023
- primaryDomain: {
1024
- url: string;
879
+ name: string;
880
+ primaryDomain: {
881
+ url: string;
882
+ };
1025
883
  };
1026
884
  };
1027
885
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "types-magic-api",
3
- "version": "0.1.41",
3
+ "version": "0.1.47",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && tsc",
6
6
  "prepare": "npm run build"