@mivis/petmart-api 1.2.17 → 1.2.18

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 +23 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mivis/petmart-api",
3
- "version": "1.2.17",
3
+ "version": "1.2.18",
4
4
  "main": "index.js",
5
5
  "types": "type.d.ts",
6
6
  "license": "ISC",
package/type.d.ts CHANGED
@@ -91,6 +91,7 @@ declare namespace Components {
91
91
  toPublish: string;
92
92
  toCopy: string;
93
93
  toDraft: string;
94
+ toReject: string;
94
95
  }
95
96
 
96
97
  export enum EActions {
@@ -98,6 +99,7 @@ declare namespace Components {
98
99
  PUBLISH = 'toPublish',
99
100
  COPY = 'toCopy',
100
101
  DRAFT = 'toDraft',
102
+ REJECT = 'toReject',
101
103
  }
102
104
 
103
105
  export interface IActionsProductResponse {
@@ -108,10 +110,10 @@ declare namespace Components {
108
110
  _id: string;
109
111
  tel: number;
110
112
  name: string;
111
- birthday: Date;
113
+ birthday?: Date;
112
114
  email: string;
113
115
  role: ERoles;
114
- vk_id: number;
116
+ vk_id?: number;
115
117
  createdAt: Date;
116
118
  updatedAt: Date;
117
119
  }
@@ -189,6 +191,7 @@ declare namespace Components {
189
191
  name: string;
190
192
  status: EProductStatus;
191
193
  subCategory_id: string;
194
+ category_id: string;
192
195
  seller_id: string;
193
196
  vendor_code: string;
194
197
  price: number;
@@ -210,10 +213,12 @@ declare namespace Components {
210
213
  category_id?: string;
211
214
  subCategory_id?: string;
212
215
  name?: string;
216
+ status?: EProductStatus;
217
+ all_fields?: string;
213
218
  }
214
219
 
215
220
  export interface IProductQueryResponse {
216
- products: IProduct[];
221
+ products: IProductResponse[];
217
222
  count: number;
218
223
  }
219
224
 
@@ -224,19 +229,24 @@ declare namespace Components {
224
229
  REJECTED = 'REJECTED',
225
230
  }
226
231
 
227
- export interface IProductResponseWithSubCategory {
232
+ export interface IProductResponse {
228
233
  _id: string;
229
234
  name: string;
235
+ status: EProductStatus;
230
236
  subCategory_id: {
231
237
  _id: string;
232
238
  name: string;
233
- category_id: {
234
- _id: string;
235
- name: string;
236
- photo: string;
237
- };
239
+ category_id: string;
240
+ };
241
+ category_id: {
242
+ _id: string;
243
+ name: string;
244
+ };
245
+ seller_id: {
246
+ _id: string;
247
+ shop_details: IShopDetails;
248
+ delivery_ways: IDeliveryWays;
238
249
  };
239
- seller_id: string;
240
250
  vendor_code: string;
241
251
  price: number;
242
252
  discount?: number;
@@ -253,13 +263,15 @@ declare namespace Components {
253
263
 
254
264
  export interface ICreateProduct {
255
265
  name: string;
266
+ status: EProductStatus.DRAFT | EProductStatus.PUBLISHED;
256
267
  seller_id: string;
268
+ category_id: string;
257
269
  subCategory_id: string;
258
270
  vendor_code: string;
259
271
  price: number;
260
272
  tax: number;
261
273
  dimension: IDimension;
262
- photo: File | File[];
274
+ photo?: File | File[];
263
275
  desc: string;
264
276
  characteristic: ICharacteristic[];
265
277
  }
@@ -268,14 +280,6 @@ declare namespace Components {
268
280
  id: string;
269
281
  }
270
282
 
271
- export interface IDeleteProductRequest {
272
- delete: string;
273
- }
274
-
275
- export interface IDeleteProductResponse {
276
- message: string;
277
- }
278
-
279
283
  export interface ICreateCart {
280
284
  product_id: string;
281
285
  count: number;