types-magic-api 0.1.40 → 0.1.42

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.
@@ -41,6 +41,7 @@ export declare class AppToken extends ProviderAuthToken {
41
41
  }
42
42
  export declare class BuyerAuthToken {
43
43
  token: string;
44
+ isAdmin: boolean;
44
45
  expiresAt: Date;
45
46
  }
46
47
  export declare enum APIErrorCode {
@@ -27,6 +27,7 @@ export class AppToken extends ProviderAuthToken {
27
27
  }
28
28
  export class BuyerAuthToken {
29
29
  token;
30
+ isAdmin;
30
31
  expiresAt;
31
32
  }
32
33
  export var APIErrorCode;
@@ -1,4 +1,5 @@
1
1
  export declare class Customer {
2
2
  id: string;
3
3
  language: string;
4
+ otp: string;
4
5
  }
@@ -294,7 +294,7 @@ export interface GetCustomerAllProductsReq {
294
294
  * API Name: /api/customer/product/get/all
295
295
  */
296
296
  export interface GetCustomerAllProductsRes {
297
- products: Model.ICustomerProductX[];
297
+ products: Model.ICustomerProduct[];
298
298
  pageInfo: Model.StoreFrontPageInfo | undefined;
299
299
  }
300
300
  /**
@@ -308,7 +308,7 @@ export interface GetProductRecommendationsReq {
308
308
  * API Name: /api/customer/product/recommendations/get
309
309
  */
310
310
  export interface GetProductRecommendationsRes {
311
- productRecommendations: Model.ICustomerProductX[];
311
+ productRecommendations: Model.ICustomerProduct[];
312
312
  }
313
313
  /**
314
314
  * API Name: /api/customer/collection/get
@@ -14,6 +14,10 @@ export interface PriceRange {
14
14
  maxVariantPrice: Money;
15
15
  minVariantPrice: Money;
16
16
  }
17
+ export interface PriceRangeCompare {
18
+ maxVariantCompareAtPrice: Money;
19
+ minVariantCompareAtPrice: Money;
20
+ }
17
21
  export interface ProductOption {
18
22
  id: string;
19
23
  name: string;
@@ -180,14 +184,20 @@ export interface ProductMedia {
180
184
  id: string;
181
185
  mediaContentType: ProductMediaContentType;
182
186
  sources: ProductMediaSource;
183
- previewImage: ProductMediaImage | null;
187
+ preview: {
188
+ image: ProductMediaImage | null;
189
+ };
184
190
  }
185
191
  export interface ICustomerProduct {
186
- availableForSale: boolean;
187
- compareAtPriceRange: PriceRange;
192
+ hasOutOfStockVariants: boolean;
193
+ compareAtPriceRange: PriceRangeCompare;
188
194
  description: string;
189
195
  descriptionHtml: string;
190
- featuredImage: Image | null;
196
+ featuredMedia: {
197
+ preview: {
198
+ image: Image | null;
199
+ };
200
+ };
191
201
  handle: string;
192
202
  id: string;
193
203
  priceRangeV2: PriceRange;
@@ -209,38 +219,24 @@ export interface ICustomerProduct {
209
219
  export interface ICustomerCollection extends ICollection {
210
220
  products: ICustomerProduct[];
211
221
  }
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
222
  export interface ICustomerProductsVariant {
230
223
  availableForSale: boolean;
231
- compareAtPrice: Money | null;
232
- currentlyNotInStock: boolean;
224
+ compareAtPrice: string | null;
233
225
  id: string;
234
- image: Image | null;
226
+ media: {
227
+ edges: {
228
+ node: {
229
+ preview: {
230
+ image: ProductMediaImage | null;
231
+ };
232
+ };
233
+ };
234
+ };
235
235
  price: Money;
236
- requiresShipping: boolean;
237
- quantityAvailable: number;
238
- inventoryQuantity: number;
236
+ sellableOnlineQuantity: number;
239
237
  title: string;
240
238
  unitPrice: Money | null;
241
- weight: number | null;
242
239
  sku?: string;
243
- weightUnit: WeightUnit;
244
240
  }
245
241
  export interface MailingAddress {
246
242
  address1: string | null;
@@ -248,7 +244,7 @@ export interface MailingAddress {
248
244
  city: string | null;
249
245
  company: string | null;
250
246
  country: string | null;
251
- countryCode: string | null;
247
+ countryCodeV2: string | null;
252
248
  firstName: string | null;
253
249
  formatted: string | null;
254
250
  formattedArea: string[];
@@ -263,17 +259,21 @@ export interface MailingAddress {
263
259
  zip: string | null;
264
260
  }
265
261
  export interface ICustomer {
266
- acceptsMarketing: boolean;
262
+ defaultEmailAddress: {
263
+ emailAddress: string;
264
+ marketingState: string;
265
+ };
266
+ defaultPhoneNumber: {
267
+ phoneNumber: string;
268
+ };
267
269
  addresses: MailingAddress[];
268
270
  createdAt: Date;
269
271
  defaultAddress: MailingAddress;
270
272
  displayName: string;
271
- email: string | null;
272
273
  firstName: string | null;
273
274
  id: string;
274
275
  lastName: string | null;
275
276
  numberOfOrders: number;
276
- phone: string | null;
277
277
  tags: string[];
278
278
  }
279
279
  export declare enum CustomerErrorCode {
@@ -355,13 +355,15 @@ export interface cartDeliveryAddressRes {
355
355
  */
356
356
  export interface CustomerProviderLoginReq {
357
357
  email: string;
358
- password: string;
358
+ password?: string | null;
359
+ otp?: string | null;
359
360
  }
360
361
  /**
361
362
  * API Name: /api/customer/login
362
363
  */
363
364
  export interface CustomerProviderLoginRes {
364
- token: string;
365
+ token?: string;
366
+ isOTPRequired: boolean;
365
367
  }
366
368
  /**
367
369
  * API Name: /api/customer/logout
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "types-magic-api",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && tsc",
6
6
  "prepare": "npm run build"