@mivis/petmart-api 1.2.17 → 1.2.19

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 +24 -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.19",
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;
@@ -209,11 +212,14 @@ declare namespace Components {
209
212
  limit: string;
210
213
  category_id?: string;
211
214
  subCategory_id?: string;
215
+ seller_id?: string;
212
216
  name?: string;
217
+ status?: EProductStatus;
218
+ all_fields?: string;
213
219
  }
214
220
 
215
221
  export interface IProductQueryResponse {
216
- products: IProduct[];
222
+ products: IProductResponse[];
217
223
  count: number;
218
224
  }
219
225
 
@@ -224,19 +230,24 @@ declare namespace Components {
224
230
  REJECTED = 'REJECTED',
225
231
  }
226
232
 
227
- export interface IProductResponseWithSubCategory {
233
+ export interface IProductResponse {
228
234
  _id: string;
229
235
  name: string;
236
+ status: EProductStatus;
230
237
  subCategory_id: {
231
238
  _id: string;
232
239
  name: string;
233
- category_id: {
234
- _id: string;
235
- name: string;
236
- photo: string;
237
- };
240
+ category_id: string;
241
+ };
242
+ category_id: {
243
+ _id: string;
244
+ name: string;
245
+ };
246
+ seller_id: {
247
+ _id: string;
248
+ shop_details: IShopDetails;
249
+ delivery_ways: IDeliveryWays;
238
250
  };
239
- seller_id: string;
240
251
  vendor_code: string;
241
252
  price: number;
242
253
  discount?: number;
@@ -253,13 +264,15 @@ declare namespace Components {
253
264
 
254
265
  export interface ICreateProduct {
255
266
  name: string;
267
+ status: EProductStatus.DRAFT | EProductStatus.PUBLISHED;
256
268
  seller_id: string;
269
+ category_id: string;
257
270
  subCategory_id: string;
258
271
  vendor_code: string;
259
272
  price: number;
260
273
  tax: number;
261
274
  dimension: IDimension;
262
- photo: File | File[];
275
+ photo?: File | File[];
263
276
  desc: string;
264
277
  characteristic: ICharacteristic[];
265
278
  }
@@ -268,14 +281,6 @@ declare namespace Components {
268
281
  id: string;
269
282
  }
270
283
 
271
- export interface IDeleteProductRequest {
272
- delete: string;
273
- }
274
-
275
- export interface IDeleteProductResponse {
276
- message: string;
277
- }
278
-
279
284
  export interface ICreateCart {
280
285
  product_id: string;
281
286
  count: number;