types-magic-api 0.1.40 → 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.
- package/dist/src/common/model/index.model.d.ts +1 -0
- package/dist/src/common/model/index.model.js +1 -0
- package/dist/src/entities/magic/Customer.entity.d.ts +1 -0
- package/dist/src/services/customer/customer.model.d.ts +4 -4
- package/dist/src/services/shopify/shopify.model.d.ts +61 -201
- package/package.json +1 -1
|
@@ -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.
|
|
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
|
|
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:
|
|
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:
|
|
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,13 +356,15 @@ export interface cartDeliveryAddressRes {
|
|
|
355
356
|
*/
|
|
356
357
|
export interface CustomerProviderLoginReq {
|
|
357
358
|
email: string;
|
|
358
|
-
password
|
|
359
|
+
password?: string;
|
|
360
|
+
otp?: string;
|
|
359
361
|
}
|
|
360
362
|
/**
|
|
361
363
|
* API Name: /api/customer/login
|
|
362
364
|
*/
|
|
363
365
|
export interface CustomerProviderLoginRes {
|
|
364
|
-
token
|
|
366
|
+
token?: string;
|
|
367
|
+
isOTPRequired: boolean;
|
|
365
368
|
}
|
|
366
369
|
/**
|
|
367
370
|
* API Name: /api/customer/logout
|
|
@@ -616,6 +619,7 @@ export interface CustomerOrder {
|
|
|
616
619
|
}[];
|
|
617
620
|
totalPrice: Money;
|
|
618
621
|
totalRefunded: Money;
|
|
622
|
+
subtotalPrice: Money;
|
|
619
623
|
totalShippingPrice: Money;
|
|
620
624
|
totalTax: Money;
|
|
621
625
|
lineItems: {
|
|
@@ -639,200 +643,54 @@ export interface CustomerOrder {
|
|
|
639
643
|
}[];
|
|
640
644
|
};
|
|
641
645
|
}
|
|
642
|
-
export interface ShopifyCheckoutAddress {
|
|
643
|
-
address1: string | null;
|
|
644
|
-
address2: string | null;
|
|
645
|
-
city: string | null;
|
|
646
|
-
company: string | null;
|
|
647
|
-
country: string | null;
|
|
648
|
-
first_name: string | null;
|
|
649
|
-
last_name: string | null;
|
|
650
|
-
phone: string | null;
|
|
651
|
-
province: string | null;
|
|
652
|
-
zip: string | null;
|
|
653
|
-
}
|
|
654
|
-
export interface ShopifyCheckoutLine {
|
|
655
|
-
variant_id: string;
|
|
656
|
-
quantity: number;
|
|
657
|
-
requires_shipping: boolean;
|
|
658
|
-
}
|
|
659
646
|
export interface ShopifyCheckoutReq {
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
email: string | null;
|
|
664
|
-
shipping_line: {
|
|
665
|
-
handle: string;
|
|
666
|
-
} | null;
|
|
667
|
-
applied_discount: {
|
|
668
|
-
amount: string;
|
|
669
|
-
title: string;
|
|
670
|
-
description: null;
|
|
671
|
-
value: string;
|
|
672
|
-
value_type: string;
|
|
673
|
-
} | null;
|
|
674
|
-
customer_address: ShopifyCheckoutAddress;
|
|
675
|
-
token: string | null;
|
|
647
|
+
buyerIdentity: {
|
|
648
|
+
email: string | null;
|
|
649
|
+
};
|
|
676
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
|
+
}[];
|
|
677
674
|
}
|
|
678
675
|
export interface ShopifyCheckoutRes {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
variant_title: string;
|
|
688
|
-
image_url: string;
|
|
689
|
-
taxable: boolean;
|
|
690
|
-
requires_shipping: boolean;
|
|
691
|
-
gift_card: boolean;
|
|
692
|
-
price: string;
|
|
693
|
-
compare_at_price: string;
|
|
694
|
-
line_price: string;
|
|
695
|
-
properties: object;
|
|
696
|
-
quantity: number;
|
|
697
|
-
grams: number;
|
|
698
|
-
fulfillment_service: string;
|
|
699
|
-
applied_discounts: Array<string>;
|
|
700
|
-
discount_allocations: Array<{
|
|
701
|
-
id: string;
|
|
676
|
+
id: string;
|
|
677
|
+
invoiceUrl: string;
|
|
678
|
+
note2: string;
|
|
679
|
+
currencyCode: string;
|
|
680
|
+
lineItems: ICartLine[];
|
|
681
|
+
totalQuantityOfLineItems: number;
|
|
682
|
+
totalPriceSet: {
|
|
683
|
+
shopMoney: {
|
|
702
684
|
amount: string;
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
application_type: string;
|
|
706
|
-
}>;
|
|
707
|
-
tax_lines: Array<{
|
|
708
|
-
price: string;
|
|
709
|
-
rate: number;
|
|
710
|
-
title: string;
|
|
711
|
-
channel_liable: boolean;
|
|
712
|
-
}>;
|
|
713
|
-
}>;
|
|
714
|
-
buyer_accepts_marketing: boolean;
|
|
715
|
-
customer_id: number | string;
|
|
716
|
-
requires_shipping: boolean;
|
|
717
|
-
billing_address: {
|
|
718
|
-
id: number;
|
|
719
|
-
first_name: string;
|
|
720
|
-
last_name: string;
|
|
721
|
-
phone: string;
|
|
722
|
-
compstring: string;
|
|
723
|
-
address1: string;
|
|
724
|
-
address2: string;
|
|
725
|
-
city: string;
|
|
726
|
-
province: string;
|
|
727
|
-
province_code: string;
|
|
728
|
-
country: string;
|
|
729
|
-
country_code: string;
|
|
730
|
-
zip: string;
|
|
731
|
-
};
|
|
732
|
-
shipping_address: {
|
|
733
|
-
id: number;
|
|
734
|
-
first_name: string;
|
|
735
|
-
last_name: string;
|
|
736
|
-
phone: string;
|
|
737
|
-
compstring: string;
|
|
738
|
-
address1: string;
|
|
739
|
-
address2: string;
|
|
740
|
-
city: string;
|
|
741
|
-
province: string;
|
|
742
|
-
province_code: string;
|
|
743
|
-
country: string;
|
|
744
|
-
country_code: string;
|
|
745
|
-
zip: string;
|
|
746
|
-
};
|
|
747
|
-
email: string | null;
|
|
748
|
-
applied_discount: {
|
|
749
|
-
amount: string;
|
|
750
|
-
title: string;
|
|
751
|
-
description: string;
|
|
752
|
-
value: string;
|
|
753
|
-
value_type: string;
|
|
754
|
-
non_applicable_reason: string;
|
|
755
|
-
applicable: boolean;
|
|
756
|
-
application_type: string;
|
|
757
|
-
};
|
|
758
|
-
shipping_line: {
|
|
759
|
-
handle: string;
|
|
760
|
-
price: string;
|
|
761
|
-
title: string;
|
|
762
|
-
tax_lines: Array<string>;
|
|
685
|
+
currencyCode: string;
|
|
686
|
+
};
|
|
763
687
|
};
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
device_id: string;
|
|
770
|
-
discount_code: object;
|
|
771
|
-
discount_codes: Array<string>;
|
|
772
|
-
legal_notice_url: string;
|
|
773
|
-
location_id: string;
|
|
774
|
-
name: string;
|
|
775
|
-
note: string;
|
|
776
|
-
note_attributes: object;
|
|
777
|
-
order_id: string;
|
|
778
|
-
order_status_url: string;
|
|
779
|
-
order: object;
|
|
780
|
-
payment_due: string;
|
|
781
|
-
payment_url: string;
|
|
782
|
-
payments: Array<string>;
|
|
783
|
-
phone: string;
|
|
784
|
-
shopify_payments_account_id: string;
|
|
785
|
-
privacy_policy_url: string;
|
|
786
|
-
refund_policy_url: string;
|
|
787
|
-
reservation_time_left: number;
|
|
788
|
-
reservation_time: string;
|
|
789
|
-
source_identifier: string;
|
|
790
|
-
source_name: string;
|
|
791
|
-
source_url: string;
|
|
792
|
-
subscription_policy_url: string;
|
|
793
|
-
subtotal_price: string;
|
|
794
|
-
shipping_policy_url: string;
|
|
795
|
-
tax_exempt: boolean;
|
|
796
|
-
taxes_included: boolean;
|
|
797
|
-
terms_of_sale_url: string;
|
|
798
|
-
terms_of_service_url: string;
|
|
799
|
-
token: string;
|
|
800
|
-
total_price: string;
|
|
801
|
-
total_tax: string;
|
|
802
|
-
total_tip_received: string;
|
|
803
|
-
total_line_items_price: string;
|
|
804
|
-
updated_at: string;
|
|
805
|
-
user_id: string;
|
|
806
|
-
web_url: string;
|
|
807
|
-
gift_cards: Array<string>;
|
|
808
|
-
tax_lines: Array<{
|
|
809
|
-
price: string;
|
|
810
|
-
rate: number;
|
|
811
|
-
title: string;
|
|
812
|
-
compare_at: number;
|
|
813
|
-
}>;
|
|
814
|
-
tax_manipulations: Array<string>;
|
|
815
|
-
shipping_rate: {
|
|
816
|
-
id: string;
|
|
817
|
-
price: string;
|
|
818
|
-
title: string;
|
|
688
|
+
subtotalPriceSet: {
|
|
689
|
+
shopMoney: {
|
|
690
|
+
amount: string;
|
|
691
|
+
currencyCode: string;
|
|
692
|
+
};
|
|
819
693
|
};
|
|
820
|
-
credit_card: string;
|
|
821
|
-
applied_discounts: Array<{
|
|
822
|
-
amount: string;
|
|
823
|
-
title: string;
|
|
824
|
-
description: string;
|
|
825
|
-
value: string;
|
|
826
|
-
value_type: string;
|
|
827
|
-
non_applicable_reason: string;
|
|
828
|
-
applicable: boolean;
|
|
829
|
-
application_type: string;
|
|
830
|
-
discount_class: string;
|
|
831
|
-
non_applicable_code: string;
|
|
832
|
-
}>;
|
|
833
|
-
discount_violations: Array<string>;
|
|
834
|
-
allowedShippingRates: ShopifyShippingRates[];
|
|
835
|
-
discount: null | ShopifyDiscount;
|
|
836
694
|
}
|
|
837
695
|
export interface ShopifyShippingRates {
|
|
838
696
|
id: number;
|
|
@@ -1009,17 +867,19 @@ export interface ShopifyLoginRes {
|
|
|
1009
867
|
redirectUrl: string;
|
|
1010
868
|
}
|
|
1011
869
|
export interface getLogoImage {
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
870
|
+
data: {
|
|
871
|
+
shop: {
|
|
872
|
+
brand: {
|
|
873
|
+
logo: {
|
|
874
|
+
image: {
|
|
875
|
+
url: string;
|
|
876
|
+
};
|
|
1017
877
|
};
|
|
1018
878
|
};
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
879
|
+
name: string;
|
|
880
|
+
primaryDomain: {
|
|
881
|
+
url: string;
|
|
882
|
+
};
|
|
1023
883
|
};
|
|
1024
884
|
};
|
|
1025
885
|
}
|