@mivis/petmart-api 1.2.299 → 1.2.301
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/index.js +1 -1
- package/package.json +1 -1
- package/type.d.ts +62 -9
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
// is empty
|
|
1
|
+
// is empty
|
package/package.json
CHANGED
package/type.d.ts
CHANGED
|
@@ -1214,6 +1214,7 @@ declare namespace Components {
|
|
|
1214
1214
|
updatedAt: Date;
|
|
1215
1215
|
type?: DeliveryTypes;
|
|
1216
1216
|
yandex_offer?: OfferDto;
|
|
1217
|
+
promo_codes?: string[];
|
|
1217
1218
|
}
|
|
1218
1219
|
|
|
1219
1220
|
export interface IAdminMultiOrderResponse
|
|
@@ -2354,27 +2355,79 @@ declare namespace Components {
|
|
|
2354
2355
|
// PromoCode
|
|
2355
2356
|
|
|
2356
2357
|
export interface ICreatePromo {
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2358
|
+
code: string;
|
|
2359
|
+
discount_type: EDiscountType;
|
|
2360
|
+
discount_value: number;
|
|
2361
|
+
start_date: Date;
|
|
2362
|
+
end_date: Date;
|
|
2363
|
+
usage_limit_user?: number; // 0 for unlimited
|
|
2364
|
+
target_type: EPromoTargetType;
|
|
2365
|
+
target_sellers?: string[];
|
|
2366
|
+
target_categories?: string[];
|
|
2367
|
+
target_subcategories?: string[];
|
|
2368
|
+
target_products?: string[];
|
|
2369
|
+
description?: string;
|
|
2360
2370
|
}
|
|
2361
2371
|
|
|
2362
2372
|
export interface IApplyPromo {
|
|
2363
2373
|
code: string;
|
|
2364
2374
|
}
|
|
2365
2375
|
|
|
2376
|
+
export enum EDiscountType {
|
|
2377
|
+
PERCENT = 'PERCENT',
|
|
2378
|
+
FIXED = 'FIXED',
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
export enum EPromoStatus {
|
|
2382
|
+
ACTIVE = 'ACTIVE',
|
|
2383
|
+
ARCHIVED = 'ARCHIVED',
|
|
2384
|
+
EXPIRED = 'EXPIRED', // Computed
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
export enum EPromoTargetType {
|
|
2388
|
+
GLOBAL = 'GLOBAL',
|
|
2389
|
+
SPECIFIC = 'SPECIFIC',
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
export enum EPromoCreatorType {
|
|
2393
|
+
ADMIN = 'ADMIN',
|
|
2394
|
+
SELLER = 'SELLER',
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2366
2397
|
export interface IPromoCode {
|
|
2367
2398
|
_id: string;
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
start_date: Date;
|
|
2372
|
-
end_date: Date;
|
|
2373
|
-
|
|
2399
|
+
code: string; // Uppercase
|
|
2400
|
+
discount_type: EDiscountType;
|
|
2401
|
+
discount_value: number;
|
|
2402
|
+
start_date: Date;
|
|
2403
|
+
end_date: Date;
|
|
2404
|
+
status: EPromoStatus;
|
|
2405
|
+
usage_limit_user: number;
|
|
2406
|
+
used_count: number;
|
|
2407
|
+
target_type: EPromoTargetType;
|
|
2408
|
+
target_sellers: string[];
|
|
2409
|
+
target_categories: string[];
|
|
2410
|
+
target_subcategories: string[];
|
|
2411
|
+
target_products: string[];
|
|
2412
|
+
description: string;
|
|
2413
|
+
creator_id: string;
|
|
2414
|
+
creator_type: EPromoCreatorType;
|
|
2415
|
+
showcase_url?: string;
|
|
2416
|
+
isExpired?: boolean;
|
|
2374
2417
|
createdAt: Date;
|
|
2375
2418
|
updatedAt: Date;
|
|
2376
2419
|
}
|
|
2377
2420
|
|
|
2421
|
+
export interface IGetPromoCodesQuery extends FilterBaseQuery {
|
|
2422
|
+
code?: string;
|
|
2423
|
+
status?: EPromoStatus;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
export interface IGetPromoCodesResponse {
|
|
2427
|
+
items: IPromoCode[];
|
|
2428
|
+
count: number;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2378
2431
|
/**
|
|
2379
2432
|
* Порядок сортировки
|
|
2380
2433
|
*/
|