@mivis/petmart-api 1.2.162 → 1.2.164

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 (2) hide show
  1. package/package.json +1 -1
  2. package/type.d.ts +29 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mivis/petmart-api",
3
- "version": "1.2.162",
3
+ "version": "1.2.164",
4
4
  "main": "index.js",
5
5
  "types": "type.d.ts",
6
6
  "license": "ISC",
package/type.d.ts CHANGED
@@ -306,13 +306,13 @@ declare namespace Components {
306
306
  _id: string;
307
307
  name: string;
308
308
  status: EProductStatus;
309
- subCategory_id: {
309
+ subCategory_id?: {
310
310
  _id: string;
311
311
  name: string;
312
312
  category_id: string;
313
313
  slug: string;
314
314
  };
315
- category_id: {
315
+ category_id?: {
316
316
  _id: string;
317
317
  photo: string;
318
318
  name: string;
@@ -324,14 +324,14 @@ declare namespace Components {
324
324
  delivery_ways: IDeliveryWays;
325
325
  slug: string;
326
326
  };
327
- vendor_code: string;
327
+ vendor_code?: string;
328
328
  price: number;
329
329
  discount?: number;
330
- tax: number;
331
- dimension: IDimension;
332
- photo: string[];
333
- desc: string;
334
- characteristic: ICharacteristic[];
330
+ tax?: number;
331
+ dimension?: IDimension;
332
+ photo?: string[];
333
+ desc?: string;
334
+ characteristic?: ICharacteristic[];
335
335
  purchases_count: number;
336
336
  viewed?: number;
337
337
  number: number;
@@ -340,6 +340,27 @@ declare namespace Components {
340
340
  updatedAt: Date;
341
341
  }
342
342
 
343
+ type TOptionalProperties = Pick<
344
+ IProductResponse,
345
+ | 'category_id'
346
+ | 'subCategory_id'
347
+ | 'vendor_code'
348
+ | 'desc'
349
+ | 'characteristic'
350
+ | 'dimension'
351
+ | 'tax'
352
+ | 'photo'
353
+ >;
354
+
355
+ type TRemainingProductResponseProperties = Omit<
356
+ IProductResponse,
357
+ keyof TOptionalProperties
358
+ >;
359
+
360
+ export interface IProductDraftResponse
361
+ extends TRemainingProductResponseProperties,
362
+ Partial<TOptionalProperties> {}
363
+
343
364
  export interface IProductWithReviewResponse {
344
365
  product: IProductResponse;
345
366
  reviewsData: IReviewsData;