shopoflex-types 1.0.22 → 1.0.24
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/dist/types/common.d.ts +6 -9
- package/package.json +1 -1
package/dist/types/common.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import mongoose
|
|
2
|
-
export interface Discount
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
export interface Discount {
|
|
3
|
+
_id?: mongoose.Types.ObjectId;
|
|
3
4
|
code?: string;
|
|
4
5
|
vendorId: mongoose.Types.ObjectId;
|
|
5
|
-
type:
|
|
6
|
+
type: "fixed" | "percentage";
|
|
6
7
|
value: number;
|
|
7
8
|
maxDiscountAmount?: number;
|
|
8
9
|
isAutomatic: boolean;
|
|
9
|
-
status:
|
|
10
|
+
status: "active" | "paused" | "expired" | "exhausted";
|
|
10
11
|
usageLimit?: number;
|
|
11
12
|
usageCount: number;
|
|
12
13
|
perUserLimit: number;
|
|
13
|
-
discountCategory:
|
|
14
|
+
discountCategory: "cart_total" | "free_delivery" | "category_discount" | "product_discount";
|
|
14
15
|
minCartValue: number;
|
|
15
16
|
applicableProducts: mongoose.Types.ObjectId[];
|
|
16
17
|
excludedProducts: mongoose.Types.ObjectId[];
|
|
@@ -24,9 +25,6 @@ export interface Discount extends Document {
|
|
|
24
25
|
description?: string;
|
|
25
26
|
createdBy?: mongoose.Types.ObjectId;
|
|
26
27
|
customerMessage?: string;
|
|
27
|
-
isValid(): boolean;
|
|
28
|
-
canUserUse(userId: mongoose.Types.ObjectId): boolean;
|
|
29
|
-
incrementUsage(): Promise<Discount>;
|
|
30
28
|
}
|
|
31
29
|
export declare enum TemplateId {
|
|
32
30
|
TEMPLATE_1 = "template_1",
|
|
@@ -60,7 +58,6 @@ export interface ILatLng {
|
|
|
60
58
|
}
|
|
61
59
|
export interface Address {
|
|
62
60
|
_id?: string;
|
|
63
|
-
id?: string;
|
|
64
61
|
location: {
|
|
65
62
|
lat: number;
|
|
66
63
|
lng: number;
|