@mivis/petmart-api 1.2.16 → 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.
- package/package.json +1 -1
- package/type.d.ts +57 -22
package/package.json
CHANGED
package/type.d.ts
CHANGED
|
@@ -59,12 +59,19 @@ declare namespace Components {
|
|
|
59
59
|
message: string;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export interface
|
|
62
|
+
export interface ISignUpGoogleRequest {
|
|
63
63
|
email: string;
|
|
64
64
|
auth_type: ELoginTypes;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
export type
|
|
67
|
+
export type ISignUpGoogleResponse = ILoginResponse;
|
|
68
|
+
|
|
69
|
+
export interface ISignUpAppleRequest {
|
|
70
|
+
code: string;
|
|
71
|
+
auth_type: ELoginTypes;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type ISignUpAppleResponse = ILoginResponse;
|
|
68
75
|
|
|
69
76
|
export interface ISignUpVkRequest {
|
|
70
77
|
silent_token: string;
|
|
@@ -79,14 +86,34 @@ declare namespace Components {
|
|
|
79
86
|
USER = 'USER',
|
|
80
87
|
}
|
|
81
88
|
|
|
89
|
+
export interface IActionsProductRequest {
|
|
90
|
+
toDelete: string;
|
|
91
|
+
toPublish: string;
|
|
92
|
+
toCopy: string;
|
|
93
|
+
toDraft: string;
|
|
94
|
+
toReject: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export enum EActions {
|
|
98
|
+
DELETE = 'toDelete',
|
|
99
|
+
PUBLISH = 'toPublish',
|
|
100
|
+
COPY = 'toCopy',
|
|
101
|
+
DRAFT = 'toDraft',
|
|
102
|
+
REJECT = 'toReject',
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface IActionsProductResponse {
|
|
106
|
+
message: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
82
109
|
export interface IUser {
|
|
83
110
|
_id: string;
|
|
84
111
|
tel: number;
|
|
85
112
|
name: string;
|
|
86
|
-
birthday
|
|
113
|
+
birthday?: Date;
|
|
87
114
|
email: string;
|
|
88
115
|
role: ERoles;
|
|
89
|
-
vk_id
|
|
116
|
+
vk_id?: number;
|
|
90
117
|
createdAt: Date;
|
|
91
118
|
updatedAt: Date;
|
|
92
119
|
}
|
|
@@ -164,6 +191,7 @@ declare namespace Components {
|
|
|
164
191
|
name: string;
|
|
165
192
|
status: EProductStatus;
|
|
166
193
|
subCategory_id: string;
|
|
194
|
+
category_id: string;
|
|
167
195
|
seller_id: string;
|
|
168
196
|
vendor_code: string;
|
|
169
197
|
price: number;
|
|
@@ -185,10 +213,12 @@ declare namespace Components {
|
|
|
185
213
|
category_id?: string;
|
|
186
214
|
subCategory_id?: string;
|
|
187
215
|
name?: string;
|
|
216
|
+
status?: EProductStatus;
|
|
217
|
+
all_fields?: string;
|
|
188
218
|
}
|
|
189
219
|
|
|
190
220
|
export interface IProductQueryResponse {
|
|
191
|
-
products:
|
|
221
|
+
products: IProductResponse[];
|
|
192
222
|
count: number;
|
|
193
223
|
}
|
|
194
224
|
|
|
@@ -199,19 +229,24 @@ declare namespace Components {
|
|
|
199
229
|
REJECTED = 'REJECTED',
|
|
200
230
|
}
|
|
201
231
|
|
|
202
|
-
export interface
|
|
232
|
+
export interface IProductResponse {
|
|
203
233
|
_id: string;
|
|
204
234
|
name: string;
|
|
235
|
+
status: EProductStatus;
|
|
205
236
|
subCategory_id: {
|
|
206
237
|
_id: string;
|
|
207
238
|
name: string;
|
|
208
|
-
category_id:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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;
|
|
213
249
|
};
|
|
214
|
-
seller_id: string;
|
|
215
250
|
vendor_code: string;
|
|
216
251
|
price: number;
|
|
217
252
|
discount?: number;
|
|
@@ -228,13 +263,15 @@ declare namespace Components {
|
|
|
228
263
|
|
|
229
264
|
export interface ICreateProduct {
|
|
230
265
|
name: string;
|
|
266
|
+
status: EProductStatus.DRAFT | EProductStatus.PUBLISHED;
|
|
231
267
|
seller_id: string;
|
|
268
|
+
category_id: string;
|
|
232
269
|
subCategory_id: string;
|
|
233
270
|
vendor_code: string;
|
|
234
271
|
price: number;
|
|
235
272
|
tax: number;
|
|
236
273
|
dimension: IDimension;
|
|
237
|
-
photo
|
|
274
|
+
photo?: File | File[];
|
|
238
275
|
desc: string;
|
|
239
276
|
characteristic: ICharacteristic[];
|
|
240
277
|
}
|
|
@@ -243,14 +280,6 @@ declare namespace Components {
|
|
|
243
280
|
id: string;
|
|
244
281
|
}
|
|
245
282
|
|
|
246
|
-
export interface IDeleteProductRequest {
|
|
247
|
-
delete: string;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export interface IDeleteProductResponse {
|
|
251
|
-
message: string;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
283
|
export interface ICreateCart {
|
|
255
284
|
product_id: string;
|
|
256
285
|
count: number;
|
|
@@ -296,6 +325,7 @@ declare namespace Components {
|
|
|
296
325
|
name: string;
|
|
297
326
|
photo: string;
|
|
298
327
|
};
|
|
328
|
+
status: ESubCategoryStatus;
|
|
299
329
|
createdAt: Date;
|
|
300
330
|
updatedAt: Date;
|
|
301
331
|
}
|
|
@@ -308,7 +338,12 @@ declare namespace Components {
|
|
|
308
338
|
export interface IUpdateSubCategory {
|
|
309
339
|
id: string;
|
|
310
340
|
name: string;
|
|
311
|
-
|
|
341
|
+
status: ESubCategoryStatus;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export enum ESubCategoryStatus {
|
|
345
|
+
MODERATION = 'MODERATION',
|
|
346
|
+
ACTIVE = 'ACTIVE',
|
|
312
347
|
}
|
|
313
348
|
|
|
314
349
|
export interface IBankingDetails {
|