types-magic-api 0.1.25 → 0.1.27
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 +77 -0
- package/dist/src/common/model/index.model.js +45 -0
- package/dist/src/entities/index.model.d.ts +84 -0
- package/dist/src/entities/index.model.js +166 -0
- package/dist/src/entities/logs/CaptchaTokenUsage.entity.d.ts +4 -0
- package/dist/src/entities/logs/LogoutTokenUsage.entity.d.ts +4 -0
- package/dist/src/entities/logs/PasswordTokenUsage.entity.d.ts +4 -0
- package/dist/src/entities/magic/App.entity.d.ts +41 -0
- package/dist/src/entities/magic/AppBuild.entity.d.ts +22 -0
- package/dist/src/entities/magic/AppComponent.entity.d.ts +55 -0
- package/dist/src/entities/magic/AppComponentProduct.entity.d.ts +8 -0
- package/dist/src/entities/magic/AppMenu.entity.d.ts +18 -0
- package/dist/src/entities/magic/AppMenuSettings.entity.d.ts +16 -0
- package/dist/src/entities/magic/AppPublish.entity.d.ts +11 -0
- package/dist/src/entities/magic/AppScreenSettings.entity.d.ts +31 -0
- package/dist/src/entities/magic/AppSetting.entity.d.ts +13 -0
- package/dist/src/entities/magic/Cart.entity.d.ts +6 -0
- package/dist/src/entities/magic/City.entity.d.ts +12 -0
- package/dist/src/entities/magic/ColorSetting.entity.d.ts +15 -0
- package/dist/src/entities/magic/Component.entity.d.ts +15 -0
- package/dist/src/entities/magic/ComponentAttribute.entity.d.ts +12 -0
- package/dist/src/entities/magic/ComponentGroup.entity.d.ts +6 -0
- package/dist/src/entities/magic/ComponentProperty.entity.d.ts +12 -0
- package/dist/src/entities/magic/Country.entity.d.ts +21 -0
- package/dist/src/entities/magic/Customer.entity.d.ts +4 -0
- package/dist/src/entities/magic/Media.entity.d.ts +25 -0
- package/dist/src/entities/magic/Menu.entity.d.ts +18 -0
- package/dist/src/entities/magic/MenuAttribute.entity.d.ts +12 -0
- package/dist/src/entities/magic/MenuGroup.entity.d.ts +6 -0
- package/dist/src/entities/magic/MenuProperty.entity.d.ts +12 -0
- package/dist/src/entities/magic/Provider.entity.d.ts +13 -0
- package/dist/src/entities/magic/RecentlyView.entity.d.ts +5 -0
- package/dist/src/entities/magic/Reminder.entity.d.ts +11 -0
- package/dist/src/entities/magic/ShopifyEmbeddedApp.entity.d.ts +5 -0
- package/dist/src/entities/magic/ShopifySession.entity.d.ts +13 -0
- package/dist/src/entities/magic/State.entity.d.ts +12 -0
- package/dist/src/entities/magic/Theme.entity.d.ts +17 -0
- package/dist/src/entities/magic/Timezone.entity.d.ts +11 -0
- package/dist/src/entities/magic/WishList.entity.d.ts +6 -0
- package/dist/src/entities/payment/Customer.entity.d.ts +16 -0
- package/dist/src/entities/payment/Invoice.entity.d.ts +19 -0
- package/dist/src/entities/payment/OrderPayment.entity.d.ts +27 -0
- package/dist/src/entities/payment/OrderPaymentLog.entity.d.ts +8 -0
- package/dist/src/entities/payment/OverrideRetryPaymentSetting.entity.d.ts +8 -0
- package/dist/src/entities/payment/PaymentFee.entity.d.ts +17 -0
- package/dist/src/entities/payment/PaymentGroup.entity.d.ts +9 -0
- package/dist/src/entities/payment/PaymentLog.entity.d.ts +7 -0
- package/dist/src/entities/payment/PaymentProvider.entity.d.ts +14 -0
- package/dist/src/entities/payment/PaymentSetting.entity.d.ts +17 -0
- package/dist/src/entities/payment/PaymentType.entity.d.ts +8 -0
- package/dist/src/entities/payment/RetryPaymentLog.entity.d.ts +9 -0
- package/dist/src/entities/payment/RetryPaymentSetting.entity.d.ts +7 -0
- package/dist/src/entities/payment/Subscription.entity.d.ts +21 -0
- package/dist/src/entities/payment/SubscriptionLog.entity.d.ts +9 -0
- package/dist/src/entities/public/Country.entity.d.ts +14 -0
- package/dist/src/entities/public/CountryMl.entity.d.ts +8 -0
- package/dist/src/entities/public/ErrorLog.entity.d.ts +7 -0
- package/dist/src/entities/public/ErrorText.entity.d.ts +9 -0
- package/dist/src/entities/public/Language.entity.d.ts +6 -0
- package/dist/src/entities/public/Menu.entity.d.ts +20 -0
- package/dist/src/entities/public/MenuMl.entity.d.ts +9 -0
- package/dist/src/entities/public/Module.entity.d.ts +10 -0
- package/dist/src/entities/public/OrgSetting.entity.d.ts +11 -0
- package/dist/src/entities/public/Organization.entity.d.ts +24 -0
- package/dist/src/entities/public/Template.entity.d.ts +17 -0
- package/dist/src/entities/public/TemplateMl.entity.d.ts +14 -0
- package/dist/src/entities/public/Timezone.entity.d.ts +14 -0
- package/dist/src/entities/saas/CustomizedModule.entity.d.ts +9 -0
- package/dist/src/entities/saas/OrderItem.entity.d.ts +17 -0
- package/dist/src/entities/saas/Plan.entity.d.ts +23 -0
- package/dist/src/entities/saas/PlanModule.entity.d.ts +18 -0
- package/dist/src/entities/saas/PlanRestriction.entity.d.ts +6 -0
- package/dist/src/entities/saas/SaasOrderPayment.entity.d.ts +17 -0
- package/dist/src/entities/users/Plan.entity.d.ts +12 -0
- package/dist/src/entities/users/RoleAllowedRole.entity.d.ts +9 -0
- package/dist/src/entities/users/SignInOtpHistory.entity.d.ts +13 -0
- package/dist/src/entities/users/UnsubscribedEmail.entity.d.ts +4 -0
- package/dist/src/entities/users/UserDevice.entity.d.ts +12 -0
- package/dist/src/entities/users/UserLoginActivity.entity.d.ts +13 -0
- package/dist/src/entities/users/UserNotification.entity.d.ts +21 -0
- package/dist/src/entities/users/UserPermission.entity.d.ts +14 -0
- package/dist/src/entities/users/UserProfile.entity.d.ts +34 -0
- package/dist/src/entities/users/UserRole.entity.d.ts +13 -0
- package/dist/src/entities/users/UserSetting.entity.d.ts +14 -0
- package/dist/src/entities/view/ViewSubscriptionDetail.entity.d.ts +20 -0
- package/dist/src/index.model.d.ts +27 -0
- package/dist/src/index.model.js +28 -0
- package/dist/src/services/admin/admin.model.d.ts +175 -0
- package/dist/src/services/admin/admin.model.js +12 -0
- package/dist/src/services/app/app.model.d.ts +49 -0
- package/dist/src/services/app/app.model.js +2 -0
- package/dist/src/services/appBuilder/appBuilder.model.d.ts +73 -0
- package/dist/src/services/appBuilder/appBuilder.model.js +30 -0
- package/dist/src/services/appPublish/appPublish.model.d.ts +9 -0
- package/dist/src/services/appPublish/appPublish.model.js +2 -0
- package/dist/src/services/appSetting/appSetting.model.d.ts +17 -0
- package/dist/src/services/appSetting/appSetting.model.js +2 -0
- package/dist/src/services/auth/auth.model.d.ts +143 -0
- package/dist/src/services/auth/auth.model.js +16 -0
- package/dist/src/services/colorSettings/colorSettings.model.d.ts +18 -0
- package/dist/src/services/colorSettings/colorSettings.model.js +2 -0
- package/dist/src/services/common/common.model.d.ts +69 -0
- package/dist/src/services/common/common.model.js +2 -0
- package/dist/src/services/component/component.model.d.ts +87 -0
- package/dist/src/services/component/component.model.js +15 -0
- package/dist/src/services/customer/customer.model.d.ts +344 -0
- package/dist/src/services/customer/customer.model.js +2 -0
- package/dist/src/services/default/default.model.d.ts +134 -0
- package/dist/src/services/default/default.model.js +89 -0
- package/dist/src/services/file/file.model.d.ts +1 -0
- package/dist/src/services/file/file.model.js +2 -0
- package/dist/src/services/maintainer/maintainer.model.d.ts +71 -0
- package/dist/src/services/maintainer/maintainer.model.js +2 -0
- package/dist/src/services/menu/menu.model.d.ts +56 -0
- package/dist/src/services/menu/menu.model.js +18 -0
- package/dist/src/services/notification/notification.model.d.ts +280 -0
- package/dist/src/services/notification/notification.model.js +69 -0
- package/dist/src/services/payment/payment.model.d.ts +153 -0
- package/dist/src/services/payment/payment.model.js +43 -0
- package/dist/src/services/provider/provider.model.d.ts +10 -0
- package/dist/src/services/provider/provider.model.js +5 -0
- package/dist/src/services/reminder/reminder.model.d.ts +13 -0
- package/dist/src/services/reminder/reminder.model.js +2 -0
- package/dist/src/services/saas/saas.model.d.ts +62 -0
- package/dist/src/services/saas/saas.model.js +7 -0
- package/dist/src/services/screen/screen.model.d.ts +37 -0
- package/dist/src/services/screen/screen.model.js +2 -0
- package/dist/src/services/shopify/shopify.model.d.ts +1010 -0
- package/dist/src/services/shopify/shopify.model.js +84 -0
- package/dist/src/services/shopifyPayment/shopifyPayment.model.d.ts +5 -0
- package/dist/src/services/shopifyPayment/shopifyPayment.model.js +6 -0
- package/dist/src/services/stripe/stripe.model.d.ts +9 -0
- package/dist/src/services/stripe/stripe.model.js +2 -0
- package/dist/src/services/test/test.model.d.ts +1 -0
- package/dist/src/services/test/test.model.js +2 -0
- package/dist/src/services/theme/theme.model.d.ts +23 -0
- package/dist/src/services/theme/theme.model.js +2 -0
- package/dist/src/services/userDevice/userDevice.model.d.ts +7 -0
- package/dist/src/services/userDevice/userDevice.model.js +2 -0
- package/package.json +3 -1
|
@@ -0,0 +1,1010 @@
|
|
|
1
|
+
import { ICollection } from "../admin/admin.model.js";
|
|
2
|
+
import { MailingAddressInput } from "../customer/customer.model.js";
|
|
3
|
+
export interface Money {
|
|
4
|
+
amount: string;
|
|
5
|
+
currencyCode: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Image {
|
|
8
|
+
id: string;
|
|
9
|
+
url: string;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
export interface PriceRange {
|
|
14
|
+
maxVariantPrice: Money;
|
|
15
|
+
minVariantPrice: Money;
|
|
16
|
+
}
|
|
17
|
+
export interface ProductOption {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
values: string[];
|
|
21
|
+
}
|
|
22
|
+
export type WeightUnit = {
|
|
23
|
+
GRAMS: "GRAMS";
|
|
24
|
+
KILOGRAMS: "KILOGRAMS";
|
|
25
|
+
OUNCES: "OUNCES";
|
|
26
|
+
POUNDS: "POUNDS";
|
|
27
|
+
};
|
|
28
|
+
export declare enum ProductSortKeys {
|
|
29
|
+
BEST_SELLING = "BEST_SELLING",
|
|
30
|
+
CREATED_AT = "CREATED_AT",
|
|
31
|
+
ID = "ID",
|
|
32
|
+
PRICE = "PRICE",
|
|
33
|
+
PRODUCT_TYPE = "PRODUCT_TYPE",
|
|
34
|
+
TITLE = "TITLE",
|
|
35
|
+
UPDATED_AT = "UPDATED_AT",
|
|
36
|
+
VENDOR = "VENDOR"
|
|
37
|
+
}
|
|
38
|
+
export declare enum ProductCollectionSortKeys {
|
|
39
|
+
BEST_SELLING = "BEST_SELLING",
|
|
40
|
+
COLLECTION_DEFAULT = "COLLECTION_DEFAULT",
|
|
41
|
+
CREATED = "CREATED",
|
|
42
|
+
ID = "ID",
|
|
43
|
+
PRICE = "PRICE",
|
|
44
|
+
TITLE = "TITLE"
|
|
45
|
+
}
|
|
46
|
+
export declare enum AdminProductSortKeys {
|
|
47
|
+
CREATED_AT = "CREATED_AT",
|
|
48
|
+
ID = "ID",
|
|
49
|
+
INVENTORY_TOTAL = "INVENTORY_TOTAL",
|
|
50
|
+
PRODUCT_TYPE = "PRODUCT_TYPE",
|
|
51
|
+
PUBLISHED_AT = "PUBLISHED_AT",
|
|
52
|
+
TITLE = "TITLE",
|
|
53
|
+
UPDATED_AT = "UPDATED_AT",
|
|
54
|
+
VENDOR = "VENDOR"
|
|
55
|
+
}
|
|
56
|
+
export declare enum AdminCollectionProductSortKeys {
|
|
57
|
+
BEST_SELLING = "BEST_SELLING",
|
|
58
|
+
COLLECTION_DEFAULT = "COLLECTION_DEFAULT",
|
|
59
|
+
CREATED = "CREATED",
|
|
60
|
+
ID = "ID",
|
|
61
|
+
MANUAL = "MANUAL",
|
|
62
|
+
PRICE = "PRICE",
|
|
63
|
+
RELEVANCE = "RELEVANCE",
|
|
64
|
+
TITLE = "TITLE"
|
|
65
|
+
}
|
|
66
|
+
export declare enum CollectionSortKeys {
|
|
67
|
+
TITLE = "TITLE",
|
|
68
|
+
UPDATED_AT = "UPDATED_AT"
|
|
69
|
+
}
|
|
70
|
+
export declare enum ProductRecommendationIntent {
|
|
71
|
+
COMPLEMENTARY = "COMPLEMENTARY",
|
|
72
|
+
RELATED = "RELATED"
|
|
73
|
+
}
|
|
74
|
+
export interface ShopifyRestPageRes {
|
|
75
|
+
id: number;
|
|
76
|
+
createdAt: string | null;
|
|
77
|
+
handle: string | null;
|
|
78
|
+
publishedAt: string | null;
|
|
79
|
+
body: string | null;
|
|
80
|
+
isPublished: string | null;
|
|
81
|
+
bodySummary: string | null;
|
|
82
|
+
templateSuffix: string | null;
|
|
83
|
+
title: string | null;
|
|
84
|
+
bodyHtml?: string | null;
|
|
85
|
+
}
|
|
86
|
+
export interface ShopifyRestAPIRes {
|
|
87
|
+
pages: {
|
|
88
|
+
nodes: ShopifyRestPageRes[];
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export interface StoreFrontPageInfo {
|
|
92
|
+
endCursor: string | null;
|
|
93
|
+
hasNextPage: boolean;
|
|
94
|
+
hasPreviousPage: boolean;
|
|
95
|
+
startCursor: string | null;
|
|
96
|
+
}
|
|
97
|
+
export interface ShopifyResponse {
|
|
98
|
+
edges: {
|
|
99
|
+
node: unknown;
|
|
100
|
+
}[];
|
|
101
|
+
pageInfo?: StoreFrontPageInfo;
|
|
102
|
+
}
|
|
103
|
+
export interface ShopifyStoreFrontRes {
|
|
104
|
+
[key: string]: ShopifyResponse;
|
|
105
|
+
}
|
|
106
|
+
export interface ShopifyStoreFrontResponse<T> {
|
|
107
|
+
data: T;
|
|
108
|
+
}
|
|
109
|
+
export interface ShopifyCollection {
|
|
110
|
+
id: number;
|
|
111
|
+
collection_id: number;
|
|
112
|
+
product_id: number;
|
|
113
|
+
created_at: string;
|
|
114
|
+
updated_at: string;
|
|
115
|
+
position: number;
|
|
116
|
+
sort_value: string;
|
|
117
|
+
}
|
|
118
|
+
export interface ShopifyVariant {
|
|
119
|
+
id: number;
|
|
120
|
+
product_id: number | null;
|
|
121
|
+
title: string | null;
|
|
122
|
+
price: string | null;
|
|
123
|
+
sku: string | null;
|
|
124
|
+
position: number | null;
|
|
125
|
+
inventory_policy: string | null;
|
|
126
|
+
compare_at_price: string | null;
|
|
127
|
+
fulfillment_service: string | null;
|
|
128
|
+
inventory_management: string | null;
|
|
129
|
+
option1: string | null;
|
|
130
|
+
option2: string | null;
|
|
131
|
+
option3: string | null;
|
|
132
|
+
created_at: string | null;
|
|
133
|
+
updated_at: string | null;
|
|
134
|
+
taxable: boolean | null;
|
|
135
|
+
barcode: string | null;
|
|
136
|
+
grams: number | null;
|
|
137
|
+
image_id: string | null;
|
|
138
|
+
weight: number | null;
|
|
139
|
+
weight_unit: string | null;
|
|
140
|
+
inventory_item_id: number | null;
|
|
141
|
+
inventory_quantity: number | null;
|
|
142
|
+
old_inventory_quantity: number | null;
|
|
143
|
+
requires_shipping: boolean | null;
|
|
144
|
+
admin_graphql_api_id: string | null;
|
|
145
|
+
}
|
|
146
|
+
export interface ShopifyStoreFrontNodesRes {
|
|
147
|
+
nodes: unknown;
|
|
148
|
+
}
|
|
149
|
+
export interface ShopifyStoreFrontAccess {
|
|
150
|
+
storefront_access_token: {
|
|
151
|
+
access_token: string;
|
|
152
|
+
access_scope: string;
|
|
153
|
+
created_at: Date;
|
|
154
|
+
id: number;
|
|
155
|
+
admin_graphql_api_id: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
export declare enum ProductMediaContentType {
|
|
159
|
+
EXTERNAL_VIDEO = "EXTERNAL_VIDEO",
|
|
160
|
+
IMAGE = "IMAGE",
|
|
161
|
+
VIDEO = "VIDEO"
|
|
162
|
+
}
|
|
163
|
+
export interface ProductMediaImage {
|
|
164
|
+
altText: string | null;
|
|
165
|
+
height: number | null;
|
|
166
|
+
id: string | null;
|
|
167
|
+
url: string;
|
|
168
|
+
width: number | null;
|
|
169
|
+
}
|
|
170
|
+
export interface ProductMediaSource {
|
|
171
|
+
altText: string | null;
|
|
172
|
+
id: string | null;
|
|
173
|
+
height: number | null;
|
|
174
|
+
width: number | null;
|
|
175
|
+
url: string | null;
|
|
176
|
+
mimeType: string | null;
|
|
177
|
+
}
|
|
178
|
+
export interface ProductMedia {
|
|
179
|
+
alt: string | null;
|
|
180
|
+
id: string;
|
|
181
|
+
mediaContentType: ProductMediaContentType;
|
|
182
|
+
sources: ProductMediaSource;
|
|
183
|
+
previewImage: ProductMediaImage | null;
|
|
184
|
+
}
|
|
185
|
+
export interface ICustomerProduct {
|
|
186
|
+
availableForSale: boolean;
|
|
187
|
+
compareAtPriceRange: PriceRange;
|
|
188
|
+
description: string;
|
|
189
|
+
descriptionHtml: string;
|
|
190
|
+
featuredImage: Image | null;
|
|
191
|
+
handle: string;
|
|
192
|
+
id: string;
|
|
193
|
+
priceRangeV2: PriceRange;
|
|
194
|
+
images: Image[];
|
|
195
|
+
isGiftCard: boolean;
|
|
196
|
+
onlineStoreUrl: string | null;
|
|
197
|
+
options: ProductOption[];
|
|
198
|
+
priceRange: PriceRange;
|
|
199
|
+
productType: string;
|
|
200
|
+
tags: string[];
|
|
201
|
+
title: string;
|
|
202
|
+
media: ProductMedia[];
|
|
203
|
+
variants: ICustomerProductsVariant[];
|
|
204
|
+
vendor: string;
|
|
205
|
+
isWishList?: boolean;
|
|
206
|
+
currency?: string;
|
|
207
|
+
currencySymbol?: string;
|
|
208
|
+
}
|
|
209
|
+
export interface ICustomerCollection extends ICollection {
|
|
210
|
+
products: ICustomerProduct[];
|
|
211
|
+
}
|
|
212
|
+
export interface ICustomerProductX {
|
|
213
|
+
compareAtPriceRange: PriceRange;
|
|
214
|
+
featuredImage: Image | null;
|
|
215
|
+
handle: string;
|
|
216
|
+
id: string;
|
|
217
|
+
availableForSale: boolean;
|
|
218
|
+
onlineStoreUrl: string | null;
|
|
219
|
+
priceRange: PriceRange;
|
|
220
|
+
title: string;
|
|
221
|
+
vendor: string;
|
|
222
|
+
isWishList?: boolean;
|
|
223
|
+
tags: string[];
|
|
224
|
+
currency?: string;
|
|
225
|
+
currencySymbol?: string;
|
|
226
|
+
media: ProductMedia[];
|
|
227
|
+
variants: ICustomerProductsVariant[];
|
|
228
|
+
}
|
|
229
|
+
export interface ICustomerProductsVariant {
|
|
230
|
+
availableForSale: boolean;
|
|
231
|
+
compareAtPrice: Money | null;
|
|
232
|
+
currentlyNotInStock: boolean;
|
|
233
|
+
id: string;
|
|
234
|
+
image: Image | null;
|
|
235
|
+
price: Money;
|
|
236
|
+
requiresShipping: boolean;
|
|
237
|
+
quantityAvailable: number;
|
|
238
|
+
inventoryQuantity: number;
|
|
239
|
+
title: string;
|
|
240
|
+
unitPrice: Money | null;
|
|
241
|
+
weight: number | null;
|
|
242
|
+
sku?: string;
|
|
243
|
+
weightUnit: WeightUnit;
|
|
244
|
+
}
|
|
245
|
+
export interface MailingAddress {
|
|
246
|
+
address1: string | null;
|
|
247
|
+
address2: string | null;
|
|
248
|
+
city: string | null;
|
|
249
|
+
company: string | null;
|
|
250
|
+
country: string | null;
|
|
251
|
+
countryCode: string | null;
|
|
252
|
+
firstName: string | null;
|
|
253
|
+
formatted: string | null;
|
|
254
|
+
formattedArea: string[];
|
|
255
|
+
id: string;
|
|
256
|
+
lastName: string | null;
|
|
257
|
+
latitude: string | null;
|
|
258
|
+
longitude: string | null;
|
|
259
|
+
name: string | null;
|
|
260
|
+
phone: string | null;
|
|
261
|
+
province: string | null;
|
|
262
|
+
provinceCode: string | null;
|
|
263
|
+
zip: string | null;
|
|
264
|
+
}
|
|
265
|
+
export interface ICustomer {
|
|
266
|
+
acceptsMarketing: boolean;
|
|
267
|
+
addresses: MailingAddress[];
|
|
268
|
+
createdAt: Date;
|
|
269
|
+
defaultAddress: MailingAddress;
|
|
270
|
+
displayName: string;
|
|
271
|
+
email: string | null;
|
|
272
|
+
firstName: string | null;
|
|
273
|
+
id: string;
|
|
274
|
+
lastName: string | null;
|
|
275
|
+
numberOfOrders: number;
|
|
276
|
+
phone: string | null;
|
|
277
|
+
tags: string[];
|
|
278
|
+
}
|
|
279
|
+
export declare enum CustomerErrorCode {
|
|
280
|
+
ALREADY_ENABLED = "ALREADY_ENABLED",
|
|
281
|
+
BAD_DOMAIN = "BAD_DOMAIN",
|
|
282
|
+
BLANK = "BLANK",
|
|
283
|
+
CONTAINS_HTML_TAGS = "CONTAINS_HTML_TAGS",
|
|
284
|
+
CONTAINS_URL = "CONTAINS_URL",
|
|
285
|
+
CUSTOMER_DISABLED = "CUSTOMER_DISABLED",
|
|
286
|
+
INVALID = "INVALID",
|
|
287
|
+
INVALID_MULTIPASS_REQUEST = "INVALID_MULTIPASS_REQUEST",
|
|
288
|
+
NOT_FOUND = "NOT_FOUND",
|
|
289
|
+
PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE = "PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE",
|
|
290
|
+
TAKEN = "TAKEN",
|
|
291
|
+
TOKEN_INVALID = "TOKEN_INVALID",
|
|
292
|
+
TOO_LONG = "TOO_LONG",
|
|
293
|
+
TOO_SHORT = "TOO_SHORT",
|
|
294
|
+
UNIDENTIFIED_CUSTOMER = "UNIDENTIFIED_CUSTOMER"
|
|
295
|
+
}
|
|
296
|
+
export interface UserError {
|
|
297
|
+
field: string[] | undefined;
|
|
298
|
+
message: string;
|
|
299
|
+
}
|
|
300
|
+
export interface CustomerUserError extends UserError {
|
|
301
|
+
code: CustomerErrorCode;
|
|
302
|
+
}
|
|
303
|
+
export interface CustomerAccessToken {
|
|
304
|
+
accessToken: string;
|
|
305
|
+
expiresAt: Date;
|
|
306
|
+
}
|
|
307
|
+
export interface StoreFrontCustomerRes {
|
|
308
|
+
[key: string]: ShopifyCustomerRes;
|
|
309
|
+
}
|
|
310
|
+
export interface ShopifyCustomerRes {
|
|
311
|
+
[key: string]: unknown;
|
|
312
|
+
customerUserErrors: CustomerUserError[];
|
|
313
|
+
userErrors: UserError[];
|
|
314
|
+
}
|
|
315
|
+
export interface cartDeliveryAddressReq {
|
|
316
|
+
id: string;
|
|
317
|
+
addresses: Array<{
|
|
318
|
+
selected: boolean;
|
|
319
|
+
address: {
|
|
320
|
+
deliveryAddress: {
|
|
321
|
+
address1: string;
|
|
322
|
+
address2?: string;
|
|
323
|
+
city: string;
|
|
324
|
+
company?: string;
|
|
325
|
+
firstName?: string;
|
|
326
|
+
lastName?: string;
|
|
327
|
+
phone?: string;
|
|
328
|
+
provinceCode: string;
|
|
329
|
+
zip: string;
|
|
330
|
+
countryCode: string;
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
}>;
|
|
334
|
+
}
|
|
335
|
+
export interface cartDeliveryFrontAddressRes {
|
|
336
|
+
data: {
|
|
337
|
+
[key: string]: cartDeliveryAddressRes;
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
export interface cartDeliveryAddressRes {
|
|
341
|
+
[key: string]: unknown;
|
|
342
|
+
userErrors: UserError[];
|
|
343
|
+
warnings?: {
|
|
344
|
+
message: string;
|
|
345
|
+
code?: string;
|
|
346
|
+
target?: string;
|
|
347
|
+
}[];
|
|
348
|
+
cart?: {
|
|
349
|
+
id: string;
|
|
350
|
+
checkoutUrl: string;
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* API Name: /api/customer/login
|
|
355
|
+
*/
|
|
356
|
+
export interface CustomerProviderLoginReq {
|
|
357
|
+
email: string;
|
|
358
|
+
password: string;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* API Name: /api/customer/login
|
|
362
|
+
*/
|
|
363
|
+
export interface CustomerProviderLoginRes {
|
|
364
|
+
token: string;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* API Name: /api/customer/logout
|
|
368
|
+
*/
|
|
369
|
+
export interface CustomerProviderLogoutRes {
|
|
370
|
+
isLogout: boolean;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* API Name: /api/customer/token/renew
|
|
374
|
+
*/
|
|
375
|
+
export interface CustomerProviderTokenRenewRes {
|
|
376
|
+
token: string;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* API Name: /api/customer/password/forget
|
|
380
|
+
*/
|
|
381
|
+
export interface CustomerForgetPasswordReq {
|
|
382
|
+
email: string;
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* API Name: /api/customer/password/forget
|
|
386
|
+
*/
|
|
387
|
+
export interface CustomerForgetPasswordRes {
|
|
388
|
+
isSent: boolean;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* API Name: /api/customer/password/reset
|
|
392
|
+
*/
|
|
393
|
+
export interface CustomerResetPasswordReq {
|
|
394
|
+
resetUrl: string;
|
|
395
|
+
password: string;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* API Name: /api/customer/password/reset
|
|
399
|
+
*/
|
|
400
|
+
export interface CustomerResetPasswordRes {
|
|
401
|
+
isReset: boolean;
|
|
402
|
+
token: string;
|
|
403
|
+
}
|
|
404
|
+
export interface ICartCost {
|
|
405
|
+
checkoutChargeAmount: Money;
|
|
406
|
+
subtotalAmount: Money;
|
|
407
|
+
subtotalAmountEstimated: boolean;
|
|
408
|
+
totalAmount: Money;
|
|
409
|
+
totalAmountEstimated: boolean;
|
|
410
|
+
totalDutyAmount: Money;
|
|
411
|
+
totalDutyAmountEstimated: boolean;
|
|
412
|
+
totalTaxAmount: Money;
|
|
413
|
+
totalTaxAmountEstimated: boolean;
|
|
414
|
+
}
|
|
415
|
+
export interface ShopifyCurrency {
|
|
416
|
+
amount: string;
|
|
417
|
+
currencyCode: string;
|
|
418
|
+
}
|
|
419
|
+
export interface ICartLineNote {
|
|
420
|
+
node: {
|
|
421
|
+
cost: {
|
|
422
|
+
totalAmount: ShopifyCurrency;
|
|
423
|
+
subtotalAmount: ShopifyCurrency;
|
|
424
|
+
amountPerQuantity: ShopifyCurrency;
|
|
425
|
+
};
|
|
426
|
+
id: string;
|
|
427
|
+
quantity: number;
|
|
428
|
+
merchandise: {
|
|
429
|
+
availableForSale: boolean;
|
|
430
|
+
compareAtPrice: Money | null;
|
|
431
|
+
currentlyNotInStock: boolean;
|
|
432
|
+
id: string;
|
|
433
|
+
image: Image | null;
|
|
434
|
+
price: Money;
|
|
435
|
+
quantityAvailable: number;
|
|
436
|
+
requiresShipping: boolean;
|
|
437
|
+
title: string;
|
|
438
|
+
selectedOptions: {
|
|
439
|
+
name: string;
|
|
440
|
+
value: string;
|
|
441
|
+
}[];
|
|
442
|
+
unitPrice: Money | null;
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
export interface ICartLineWithEdges {
|
|
447
|
+
edges: ICartLineNote[];
|
|
448
|
+
pageInfo: StoreFrontPageInfo;
|
|
449
|
+
}
|
|
450
|
+
export interface ICartLine {
|
|
451
|
+
cost: {
|
|
452
|
+
totalAmount: ShopifyCurrency;
|
|
453
|
+
subtotalAmount: ShopifyCurrency;
|
|
454
|
+
amountPerQuantity: ShopifyCurrency;
|
|
455
|
+
};
|
|
456
|
+
id: string;
|
|
457
|
+
quantity: number;
|
|
458
|
+
currencySymbol: string;
|
|
459
|
+
merchandise: {
|
|
460
|
+
availableForSale: boolean;
|
|
461
|
+
compareAtPrice: Money | null;
|
|
462
|
+
currentlyNotInStock: boolean;
|
|
463
|
+
id: string;
|
|
464
|
+
image: Image | null;
|
|
465
|
+
price: Money;
|
|
466
|
+
quantityAvailable: number;
|
|
467
|
+
requiresShipping: boolean;
|
|
468
|
+
title: string;
|
|
469
|
+
selectedOptions: {
|
|
470
|
+
name: string;
|
|
471
|
+
value: string;
|
|
472
|
+
}[];
|
|
473
|
+
product: {
|
|
474
|
+
id: string;
|
|
475
|
+
title: string;
|
|
476
|
+
vendor: string;
|
|
477
|
+
isWishList?: boolean;
|
|
478
|
+
};
|
|
479
|
+
unitPrice: Money | null;
|
|
480
|
+
};
|
|
481
|
+
discountAllocations: {
|
|
482
|
+
discountedAmount: Money;
|
|
483
|
+
}[] | null;
|
|
484
|
+
}
|
|
485
|
+
export interface ICart {
|
|
486
|
+
attribute: AttributeInput;
|
|
487
|
+
attributes: AttributeInput[];
|
|
488
|
+
buyerIdentity: CartBuyerIdentity;
|
|
489
|
+
checkoutUrl: string;
|
|
490
|
+
cost: ICartCost;
|
|
491
|
+
createdAt: Date;
|
|
492
|
+
discountAllocations: CartDiscountAllocation;
|
|
493
|
+
discountCodes: CartDiscountCode[];
|
|
494
|
+
id: string;
|
|
495
|
+
metafield: MetaField;
|
|
496
|
+
lines: ICartLine[];
|
|
497
|
+
metafields: MetaField[];
|
|
498
|
+
note: string | null;
|
|
499
|
+
totalQuantity: number;
|
|
500
|
+
updatedAt: Date;
|
|
501
|
+
currency?: string;
|
|
502
|
+
currencySymbol?: string;
|
|
503
|
+
pageInfo?: StoreFrontPageInfo;
|
|
504
|
+
discount: ShopifyDiscount | null;
|
|
505
|
+
}
|
|
506
|
+
export interface AttributeInput {
|
|
507
|
+
key: string;
|
|
508
|
+
value: string;
|
|
509
|
+
}
|
|
510
|
+
export interface DeliveryAddressInput {
|
|
511
|
+
customerAddressId: string;
|
|
512
|
+
}
|
|
513
|
+
export interface CartDiscountAllocation {
|
|
514
|
+
discountedAmount: Money;
|
|
515
|
+
}
|
|
516
|
+
export interface CartDiscountCode {
|
|
517
|
+
applicable: boolean;
|
|
518
|
+
code: string;
|
|
519
|
+
}
|
|
520
|
+
export interface CartBuyerIdentity {
|
|
521
|
+
countryCode: string | null;
|
|
522
|
+
deliveryAddress: MailingAddressInput;
|
|
523
|
+
email: string | null;
|
|
524
|
+
phone: string | null;
|
|
525
|
+
}
|
|
526
|
+
export interface MetaField {
|
|
527
|
+
description: string | null;
|
|
528
|
+
id: string;
|
|
529
|
+
key: string;
|
|
530
|
+
namespace: string;
|
|
531
|
+
type: string;
|
|
532
|
+
value: string;
|
|
533
|
+
}
|
|
534
|
+
export interface CartInputMetaFieldInput extends AttributeInput {
|
|
535
|
+
type: string;
|
|
536
|
+
}
|
|
537
|
+
export interface CartLineInput {
|
|
538
|
+
id?: string | null;
|
|
539
|
+
isDeleted: boolean;
|
|
540
|
+
merchandiseId: string;
|
|
541
|
+
quantity: number;
|
|
542
|
+
}
|
|
543
|
+
export interface CreateShopifyCartReq {
|
|
544
|
+
buyerIdentity: CartBuyerIdentity;
|
|
545
|
+
lines: CartLineInput[];
|
|
546
|
+
note: string | null;
|
|
547
|
+
}
|
|
548
|
+
export interface ShopifyCartLineAddReq {
|
|
549
|
+
cartId: string;
|
|
550
|
+
lines: CartLineInput[];
|
|
551
|
+
}
|
|
552
|
+
export interface ShopifyCartLineRemoveReq {
|
|
553
|
+
cartId: string;
|
|
554
|
+
lineIds: string[];
|
|
555
|
+
}
|
|
556
|
+
export interface ShopifyCartNoteUpdateReq {
|
|
557
|
+
cartId: string;
|
|
558
|
+
note: string;
|
|
559
|
+
}
|
|
560
|
+
export interface ShopifyCartBuyerIdentityUpdateReq {
|
|
561
|
+
cartId: string;
|
|
562
|
+
buyerIdentity: {
|
|
563
|
+
customerAccessToken: string | null;
|
|
564
|
+
deliveryAddressPreferences: {
|
|
565
|
+
customerAddressId?: string | null;
|
|
566
|
+
deliveryAddress?: {
|
|
567
|
+
address1: string | null;
|
|
568
|
+
address2: string | null;
|
|
569
|
+
city: string | null;
|
|
570
|
+
company: string | null;
|
|
571
|
+
country: string | null;
|
|
572
|
+
firstName: string | null;
|
|
573
|
+
lastName: string | null;
|
|
574
|
+
phone: string | null;
|
|
575
|
+
province: string | null;
|
|
576
|
+
zip: string | null;
|
|
577
|
+
} | null;
|
|
578
|
+
}[] | null;
|
|
579
|
+
email: string | null;
|
|
580
|
+
phone: string | null;
|
|
581
|
+
} | null;
|
|
582
|
+
}
|
|
583
|
+
export interface ShopifyCartDiscountCodesUpdateReq {
|
|
584
|
+
cartId: string;
|
|
585
|
+
discountCodes: string[];
|
|
586
|
+
}
|
|
587
|
+
export interface ShopifyOrderI {
|
|
588
|
+
customer: ShopifyOrderRes;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* API Name: /api/customer/order/get
|
|
592
|
+
*/
|
|
593
|
+
export interface ShopifyOrderRes {
|
|
594
|
+
orders: CustomerOrder[];
|
|
595
|
+
}
|
|
596
|
+
export interface CustomerOrder {
|
|
597
|
+
id: string;
|
|
598
|
+
billingAddress: MailingAddress | null;
|
|
599
|
+
cancelReason: string | null;
|
|
600
|
+
canceledAt: string;
|
|
601
|
+
email: string | null;
|
|
602
|
+
financialStatus: string | null;
|
|
603
|
+
fulfillmentStatus: string | null;
|
|
604
|
+
name: string | null;
|
|
605
|
+
orderNumber: string | null;
|
|
606
|
+
phone: string | null;
|
|
607
|
+
processedAt: string;
|
|
608
|
+
shippingAddress: MailingAddress | null;
|
|
609
|
+
statusUrl: string;
|
|
610
|
+
successfulFulfillments: {
|
|
611
|
+
trackingCompany: string;
|
|
612
|
+
trackingInfo: {
|
|
613
|
+
number: string;
|
|
614
|
+
url: string;
|
|
615
|
+
}[];
|
|
616
|
+
}[];
|
|
617
|
+
totalPrice: Money;
|
|
618
|
+
totalRefunded: Money;
|
|
619
|
+
totalShippingPrice: Money;
|
|
620
|
+
totalTax: Money;
|
|
621
|
+
lineItems: {
|
|
622
|
+
nodes: {
|
|
623
|
+
currentQuantity: number;
|
|
624
|
+
discountedTotalPrice: Money;
|
|
625
|
+
originalTotalPrice: Money;
|
|
626
|
+
title: string;
|
|
627
|
+
quantity: number;
|
|
628
|
+
variant: {
|
|
629
|
+
id: string;
|
|
630
|
+
title: string;
|
|
631
|
+
image: Image | null;
|
|
632
|
+
price: Money;
|
|
633
|
+
product: {
|
|
634
|
+
id: string;
|
|
635
|
+
title: string;
|
|
636
|
+
vendor: string;
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
}[];
|
|
640
|
+
};
|
|
641
|
+
}
|
|
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
|
+
export interface ShopifyCheckoutReq {
|
|
660
|
+
storeId: string;
|
|
661
|
+
line_items: Array<ShopifyCheckoutLine>;
|
|
662
|
+
customer_id: string;
|
|
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;
|
|
676
|
+
note: string;
|
|
677
|
+
}
|
|
678
|
+
export interface ShopifyCheckoutRes {
|
|
679
|
+
line_items: Array<{
|
|
680
|
+
id: string;
|
|
681
|
+
key: string;
|
|
682
|
+
product_id: number;
|
|
683
|
+
variant_id: number;
|
|
684
|
+
sku: string;
|
|
685
|
+
vendor: string;
|
|
686
|
+
title: string;
|
|
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;
|
|
702
|
+
amount: string;
|
|
703
|
+
description: string;
|
|
704
|
+
created_at: string;
|
|
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>;
|
|
763
|
+
};
|
|
764
|
+
completed_at: string;
|
|
765
|
+
created_at: string;
|
|
766
|
+
currency: string;
|
|
767
|
+
presentment_currency: string;
|
|
768
|
+
customer_locale: string;
|
|
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;
|
|
819
|
+
};
|
|
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
|
+
}
|
|
837
|
+
export interface ShopifyShippingRates {
|
|
838
|
+
id: number;
|
|
839
|
+
name: string;
|
|
840
|
+
price: string;
|
|
841
|
+
}
|
|
842
|
+
export interface ShopifyShippingZoneRes {
|
|
843
|
+
id: number;
|
|
844
|
+
name: string;
|
|
845
|
+
profile_id: string;
|
|
846
|
+
location_group_id: string;
|
|
847
|
+
countries: {
|
|
848
|
+
id: number;
|
|
849
|
+
shipping_zone_id: number;
|
|
850
|
+
name: string;
|
|
851
|
+
tax: number;
|
|
852
|
+
code: string;
|
|
853
|
+
tax_name: string;
|
|
854
|
+
provinces: Array<object>;
|
|
855
|
+
}[];
|
|
856
|
+
provinces: {
|
|
857
|
+
code: string;
|
|
858
|
+
country_id: number;
|
|
859
|
+
shipping_zone_is: number;
|
|
860
|
+
id: number;
|
|
861
|
+
name: string;
|
|
862
|
+
tax: number;
|
|
863
|
+
tax_name: string | null;
|
|
864
|
+
tax_type: string | null;
|
|
865
|
+
tax_percentage: number;
|
|
866
|
+
};
|
|
867
|
+
carrier_shipping_rate_providers: Array<object>;
|
|
868
|
+
price_based_shipping_rates: Array<{
|
|
869
|
+
id: number;
|
|
870
|
+
name: string;
|
|
871
|
+
price: string;
|
|
872
|
+
shipping_zone_id: number;
|
|
873
|
+
min_order_subtotal: string | null;
|
|
874
|
+
max_order_subtotal: string | null;
|
|
875
|
+
}>;
|
|
876
|
+
weight_based_shipping_rates: Array<{
|
|
877
|
+
id: number;
|
|
878
|
+
name: string;
|
|
879
|
+
price: string;
|
|
880
|
+
shipping_zone_id: number;
|
|
881
|
+
weight_low: number | null;
|
|
882
|
+
weight_high: number | null;
|
|
883
|
+
}>;
|
|
884
|
+
}
|
|
885
|
+
export interface ShopifyDiscount {
|
|
886
|
+
id: number;
|
|
887
|
+
value_type: string;
|
|
888
|
+
value: string;
|
|
889
|
+
customer_selection: string;
|
|
890
|
+
target_type: string;
|
|
891
|
+
target_selection: string;
|
|
892
|
+
allocation_method: string;
|
|
893
|
+
allocation_limit: number | null;
|
|
894
|
+
once_per_customer: boolean;
|
|
895
|
+
usage_limit: number | null;
|
|
896
|
+
starts_at: string;
|
|
897
|
+
ends_at: string | null;
|
|
898
|
+
created_at: string;
|
|
899
|
+
updated_at: string;
|
|
900
|
+
entitled_product_ids: Array<number>;
|
|
901
|
+
entitled_variant_ids: Array<number>;
|
|
902
|
+
entitled_collection_ids: Array<number>;
|
|
903
|
+
entitled_country_ids: Array<number>;
|
|
904
|
+
prerequisite_product_ids: Array<number>;
|
|
905
|
+
prerequisite_variant_ids: Array<number>;
|
|
906
|
+
prerequisite_collection_ids: Array<number>;
|
|
907
|
+
customer_segment_prerequisite_ids: Array<number>;
|
|
908
|
+
prerequisite_customer_ids: Array<number>;
|
|
909
|
+
prerequisite_subtotal_range: string | null;
|
|
910
|
+
prerequisite_quantity_range: string | null;
|
|
911
|
+
prerequisite_shipping_price_range: string | null;
|
|
912
|
+
prerequisite_to_entitlement_quantity_ratio: {
|
|
913
|
+
prerequisite_quantity: string | null;
|
|
914
|
+
entitled_quantity: string | null;
|
|
915
|
+
};
|
|
916
|
+
prerequisite_to_entitlement_purchase: {
|
|
917
|
+
prerequisite_amount: string | null;
|
|
918
|
+
};
|
|
919
|
+
title: string;
|
|
920
|
+
admin_graphql_api_id: string;
|
|
921
|
+
}
|
|
922
|
+
export interface ShopifyAdminMarkets {
|
|
923
|
+
id: string;
|
|
924
|
+
name: string;
|
|
925
|
+
enabled: boolean;
|
|
926
|
+
}
|
|
927
|
+
export interface ShopifyAdminMarketsRes {
|
|
928
|
+
markets: {
|
|
929
|
+
nodes: ShopifyAdminMarkets[];
|
|
930
|
+
};
|
|
931
|
+
}
|
|
932
|
+
export interface PlanDetail {
|
|
933
|
+
id: number;
|
|
934
|
+
price: string;
|
|
935
|
+
interval: string | null;
|
|
936
|
+
name: string;
|
|
937
|
+
description: string | null;
|
|
938
|
+
returnUrl: string;
|
|
939
|
+
currencyCode: string;
|
|
940
|
+
isProduction: boolean;
|
|
941
|
+
}
|
|
942
|
+
export interface ShopifyPaymentRes {
|
|
943
|
+
confirmationUrl: string;
|
|
944
|
+
appSubscription: AppSubscription;
|
|
945
|
+
}
|
|
946
|
+
export interface AppSubscription {
|
|
947
|
+
createdAt: Date | null;
|
|
948
|
+
currentPeriodEnd: Date | null;
|
|
949
|
+
id: string;
|
|
950
|
+
lineItems: LineItems[];
|
|
951
|
+
name: string;
|
|
952
|
+
returnUrl: string;
|
|
953
|
+
status: string;
|
|
954
|
+
test: string;
|
|
955
|
+
trialDays: number;
|
|
956
|
+
}
|
|
957
|
+
export interface LineItems {
|
|
958
|
+
id: ID;
|
|
959
|
+
plan: CurrentPlan;
|
|
960
|
+
}
|
|
961
|
+
export interface ID {
|
|
962
|
+
id: string;
|
|
963
|
+
}
|
|
964
|
+
export interface CurrentPlan {
|
|
965
|
+
pricingDetail: {
|
|
966
|
+
pricingDetail: any;
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
export interface ShopifyAppSubscriptionRes {
|
|
970
|
+
currentAppInstallation: currentAppInstallation;
|
|
971
|
+
}
|
|
972
|
+
export interface currentAppInstallation {
|
|
973
|
+
activeSubscriptions: ShopifySubscription[];
|
|
974
|
+
allSubscriptions: ShopifySubscription[];
|
|
975
|
+
}
|
|
976
|
+
export interface ShopifySubscription {
|
|
977
|
+
id: string;
|
|
978
|
+
name: string;
|
|
979
|
+
status: string;
|
|
980
|
+
currentPeriodEnd: Date;
|
|
981
|
+
lineItems: SubscriptionLineItem[];
|
|
982
|
+
}
|
|
983
|
+
export interface SubscriptionLineItem {
|
|
984
|
+
id: string;
|
|
985
|
+
}
|
|
986
|
+
export interface AppSubscriptionCancelRes {
|
|
987
|
+
id: string;
|
|
988
|
+
status: string;
|
|
989
|
+
}
|
|
990
|
+
export declare enum ShopifySubscriptionStatus {
|
|
991
|
+
pending = "PENDING",
|
|
992
|
+
active = "ACTIVE",
|
|
993
|
+
canceled = "CANCELLED",
|
|
994
|
+
expired = "EXPIRED"
|
|
995
|
+
}
|
|
996
|
+
export interface GetProviderTokenReq {
|
|
997
|
+
shopName: string;
|
|
998
|
+
}
|
|
999
|
+
export interface GetProviderTokenRes {
|
|
1000
|
+
providerToken: string;
|
|
1001
|
+
}
|
|
1002
|
+
export interface StoreSessionReq {
|
|
1003
|
+
session: object;
|
|
1004
|
+
}
|
|
1005
|
+
export interface ShopifyLoginReq {
|
|
1006
|
+
shopName: string;
|
|
1007
|
+
}
|
|
1008
|
+
export interface ShopifyLoginRes {
|
|
1009
|
+
redirectUrl: string;
|
|
1010
|
+
}
|