@fas-core/shared-types 1.0.15 → 1.0.17
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/index.d.mts +86 -2
- package/dist/index.d.ts +86 -2
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -98,6 +98,7 @@ interface SoftDeleteFilter {
|
|
|
98
98
|
isDeleted?: boolean;
|
|
99
99
|
deletedAt?: Date | null;
|
|
100
100
|
}
|
|
101
|
+
type Metadata = Record<string, unknown>;
|
|
101
102
|
|
|
102
103
|
interface ICurrency extends BaseEntity {
|
|
103
104
|
name: string;
|
|
@@ -139,8 +140,91 @@ interface IContact extends BaseEntity {
|
|
|
139
140
|
source: 'website' | 'email' | 'phone' | 'chat' | 'other';
|
|
140
141
|
caseId: string;
|
|
141
142
|
notes: string;
|
|
142
|
-
|
|
143
|
+
store: IStore;
|
|
143
144
|
resolvedAt?: Date;
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
declare const DiscountTypeEnum: {
|
|
148
|
+
readonly PERCENTAGE: "PERCENTAGE";
|
|
149
|
+
readonly FIXED: "FIXED";
|
|
150
|
+
};
|
|
151
|
+
type DiscountTypeEnum = (typeof DiscountTypeEnum)[keyof typeof DiscountTypeEnum];
|
|
152
|
+
interface IDiscountType {
|
|
153
|
+
type: DiscountTypeEnum;
|
|
154
|
+
value: number;
|
|
155
|
+
}
|
|
156
|
+
interface ICoupon extends BaseEntity {
|
|
157
|
+
title: string;
|
|
158
|
+
couponCode: string;
|
|
159
|
+
startTime: Date;
|
|
160
|
+
endTime: Date;
|
|
161
|
+
discountType: IDiscountType;
|
|
162
|
+
minimumAmount: number;
|
|
163
|
+
isPromotional: boolean;
|
|
164
|
+
status: boolean;
|
|
165
|
+
store: IStore | string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
interface IVariant extends BaseEntity {
|
|
169
|
+
name: string;
|
|
170
|
+
sku: string;
|
|
171
|
+
attributes: Record<string, string>;
|
|
172
|
+
price: number;
|
|
173
|
+
stock: number;
|
|
174
|
+
product: IProduct;
|
|
175
|
+
status: boolean;
|
|
176
|
+
metaData: Metadata;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
interface IProduct extends BaseEntity {
|
|
180
|
+
name: string;
|
|
181
|
+
slug: string;
|
|
182
|
+
sku: string;
|
|
183
|
+
description: string;
|
|
184
|
+
price: number;
|
|
185
|
+
variants: IVariant[];
|
|
186
|
+
store: IStore;
|
|
187
|
+
metaData: Metadata;
|
|
188
|
+
status: boolean;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
interface IOrderItem extends BaseEntity {
|
|
192
|
+
order: IOrder;
|
|
193
|
+
product: IProduct;
|
|
194
|
+
variant?: IVariant;
|
|
195
|
+
pricing: {
|
|
196
|
+
unitPrice: number;
|
|
197
|
+
totalAmount: number;
|
|
198
|
+
};
|
|
199
|
+
quantity: number;
|
|
200
|
+
unitPrice: number;
|
|
201
|
+
totalAmount: number;
|
|
202
|
+
metaData: Metadata;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare const OrderStatusEnum: {
|
|
206
|
+
readonly PENDING: "PENDING";
|
|
207
|
+
readonly CONFIRMED: "CONFIRMED";
|
|
208
|
+
readonly PROCESSING: "PROCESSING";
|
|
209
|
+
readonly SHIPPED: "SHIPPED";
|
|
210
|
+
readonly DELIVERED: "DELIVERED";
|
|
211
|
+
readonly CANCELED: "CANCELED";
|
|
212
|
+
readonly FAILED: "FAILED";
|
|
213
|
+
readonly REFUNDED: "REFUNDED";
|
|
214
|
+
readonly PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
|
|
215
|
+
};
|
|
216
|
+
type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];
|
|
217
|
+
interface IOrder extends BaseEntity {
|
|
218
|
+
orderId: string;
|
|
219
|
+
orderItems: IOrderItem[];
|
|
220
|
+
user?: ICustomer;
|
|
221
|
+
coupon?: ICoupon;
|
|
222
|
+
store: IStore;
|
|
223
|
+
status: OrderStatusEnum;
|
|
224
|
+
subTotalAmount: number;
|
|
225
|
+
discountAmount: number;
|
|
226
|
+
totalAmount: number;
|
|
227
|
+
metaData: Metadata;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export { ADMIN_ROLES, type ApiResponse, type BaseEntity, DiscountTypeEnum, type IAddress, type IAdmin, type IAdminCreate, type IAdminRoleType, type IAdminSafe, type IAdminUpdate, type IContact, type ICountry, type ICoupon, type ICurrency, type ICustomer, type IDiscountType, type IOrder, type IOrderItem, type IProduct, type IState, type IStore, type IStoreSettings, type IVariant, type Metadata, OrderStatusEnum, type Paginated, type SoftDeleteFilter };
|
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ interface SoftDeleteFilter {
|
|
|
98
98
|
isDeleted?: boolean;
|
|
99
99
|
deletedAt?: Date | null;
|
|
100
100
|
}
|
|
101
|
+
type Metadata = Record<string, unknown>;
|
|
101
102
|
|
|
102
103
|
interface ICurrency extends BaseEntity {
|
|
103
104
|
name: string;
|
|
@@ -139,8 +140,91 @@ interface IContact extends BaseEntity {
|
|
|
139
140
|
source: 'website' | 'email' | 'phone' | 'chat' | 'other';
|
|
140
141
|
caseId: string;
|
|
141
142
|
notes: string;
|
|
142
|
-
|
|
143
|
+
store: IStore;
|
|
143
144
|
resolvedAt?: Date;
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
declare const DiscountTypeEnum: {
|
|
148
|
+
readonly PERCENTAGE: "PERCENTAGE";
|
|
149
|
+
readonly FIXED: "FIXED";
|
|
150
|
+
};
|
|
151
|
+
type DiscountTypeEnum = (typeof DiscountTypeEnum)[keyof typeof DiscountTypeEnum];
|
|
152
|
+
interface IDiscountType {
|
|
153
|
+
type: DiscountTypeEnum;
|
|
154
|
+
value: number;
|
|
155
|
+
}
|
|
156
|
+
interface ICoupon extends BaseEntity {
|
|
157
|
+
title: string;
|
|
158
|
+
couponCode: string;
|
|
159
|
+
startTime: Date;
|
|
160
|
+
endTime: Date;
|
|
161
|
+
discountType: IDiscountType;
|
|
162
|
+
minimumAmount: number;
|
|
163
|
+
isPromotional: boolean;
|
|
164
|
+
status: boolean;
|
|
165
|
+
store: IStore | string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
interface IVariant extends BaseEntity {
|
|
169
|
+
name: string;
|
|
170
|
+
sku: string;
|
|
171
|
+
attributes: Record<string, string>;
|
|
172
|
+
price: number;
|
|
173
|
+
stock: number;
|
|
174
|
+
product: IProduct;
|
|
175
|
+
status: boolean;
|
|
176
|
+
metaData: Metadata;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
interface IProduct extends BaseEntity {
|
|
180
|
+
name: string;
|
|
181
|
+
slug: string;
|
|
182
|
+
sku: string;
|
|
183
|
+
description: string;
|
|
184
|
+
price: number;
|
|
185
|
+
variants: IVariant[];
|
|
186
|
+
store: IStore;
|
|
187
|
+
metaData: Metadata;
|
|
188
|
+
status: boolean;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
interface IOrderItem extends BaseEntity {
|
|
192
|
+
order: IOrder;
|
|
193
|
+
product: IProduct;
|
|
194
|
+
variant?: IVariant;
|
|
195
|
+
pricing: {
|
|
196
|
+
unitPrice: number;
|
|
197
|
+
totalAmount: number;
|
|
198
|
+
};
|
|
199
|
+
quantity: number;
|
|
200
|
+
unitPrice: number;
|
|
201
|
+
totalAmount: number;
|
|
202
|
+
metaData: Metadata;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare const OrderStatusEnum: {
|
|
206
|
+
readonly PENDING: "PENDING";
|
|
207
|
+
readonly CONFIRMED: "CONFIRMED";
|
|
208
|
+
readonly PROCESSING: "PROCESSING";
|
|
209
|
+
readonly SHIPPED: "SHIPPED";
|
|
210
|
+
readonly DELIVERED: "DELIVERED";
|
|
211
|
+
readonly CANCELED: "CANCELED";
|
|
212
|
+
readonly FAILED: "FAILED";
|
|
213
|
+
readonly REFUNDED: "REFUNDED";
|
|
214
|
+
readonly PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
|
|
215
|
+
};
|
|
216
|
+
type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];
|
|
217
|
+
interface IOrder extends BaseEntity {
|
|
218
|
+
orderId: string;
|
|
219
|
+
orderItems: IOrderItem[];
|
|
220
|
+
user?: ICustomer;
|
|
221
|
+
coupon?: ICoupon;
|
|
222
|
+
store: IStore;
|
|
223
|
+
status: OrderStatusEnum;
|
|
224
|
+
subTotalAmount: number;
|
|
225
|
+
discountAmount: number;
|
|
226
|
+
totalAmount: number;
|
|
227
|
+
metaData: Metadata;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export { ADMIN_ROLES, type ApiResponse, type BaseEntity, DiscountTypeEnum, type IAddress, type IAdmin, type IAdminCreate, type IAdminRoleType, type IAdminSafe, type IAdminUpdate, type IContact, type ICountry, type ICoupon, type ICurrency, type ICustomer, type IDiscountType, type IOrder, type IOrderItem, type IProduct, type IState, type IStore, type IStoreSettings, type IVariant, type Metadata, OrderStatusEnum, type Paginated, type SoftDeleteFilter };
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
ADMIN_ROLES: () => ADMIN_ROLES
|
|
23
|
+
ADMIN_ROLES: () => ADMIN_ROLES,
|
|
24
|
+
DiscountTypeEnum: () => DiscountTypeEnum,
|
|
25
|
+
OrderStatusEnum: () => OrderStatusEnum
|
|
24
26
|
});
|
|
25
27
|
module.exports = __toCommonJS(index_exports);
|
|
26
28
|
|
|
@@ -35,4 +37,23 @@ var ADMIN_ROLES = [
|
|
|
35
37
|
"Security Guard",
|
|
36
38
|
"Accountant"
|
|
37
39
|
];
|
|
40
|
+
|
|
41
|
+
// src/coupon/interface.ts
|
|
42
|
+
var DiscountTypeEnum = {
|
|
43
|
+
PERCENTAGE: "PERCENTAGE",
|
|
44
|
+
FIXED: "FIXED"
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// src/order/interface.ts
|
|
48
|
+
var OrderStatusEnum = {
|
|
49
|
+
PENDING: "PENDING",
|
|
50
|
+
CONFIRMED: "CONFIRMED",
|
|
51
|
+
PROCESSING: "PROCESSING",
|
|
52
|
+
SHIPPED: "SHIPPED",
|
|
53
|
+
DELIVERED: "DELIVERED",
|
|
54
|
+
CANCELED: "CANCELED",
|
|
55
|
+
FAILED: "FAILED",
|
|
56
|
+
REFUNDED: "REFUNDED",
|
|
57
|
+
PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED"
|
|
58
|
+
};
|
|
38
59
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/admin/interface.ts"],"sourcesContent":["export * from './address';\nexport * from './admin';\nexport * from './base';\nexport * from './common';\nexport * from './country';\nexport * from './customer';\nexport * from './state';\nexport * from './store';\nexport * from './currency';\nexport * from './contact';","import type { BaseEntity } from '../base/interface';\n\nexport type IAdminRoleType =\n | 'Admin'\n | 'Super Admin'\n | 'Cashier'\n | 'Manager'\n | 'CEO'\n | 'Driver'\n | 'Security Guard'\n | 'Accountant';\n\nexport const ADMIN_ROLES: IAdminRoleType[] = [\n 'Admin',\n 'Super Admin',\n 'Cashier',\n 'Manager',\n 'CEO',\n 'Driver',\n 'Security Guard',\n 'Accountant',\n];\n\nexport interface IAdmin extends BaseEntity {\n firstName: string;\n lastName: string;\n email: string;\n phoneNumber: string;\n status: boolean;\n password: string;\n role: IAdminRoleType;\n access_list: string[];\n joiningDate: Date;\n profileImage: string;\n lastLogin: Date;\n}\n\nexport type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;\nexport type IAdminUpdate = Partial<IAdminCreate>;\nexport type IAdminSafe = Omit<IAdmin, 'password'>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACYO,IAAM,cAAgC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/admin/interface.ts","../src/coupon/interface.ts","../src/order/interface.ts"],"sourcesContent":["export * from './address';\nexport * from './admin';\nexport * from './base';\nexport * from './common';\nexport * from './country';\nexport * from './customer';\nexport * from './state';\nexport * from './store';\nexport * from './currency';\nexport * from './contact';\nexport * from './coupon';\nexport * from './product';\nexport * from './variant';\nexport * from './order';\nexport * from './orderItem';","import type { BaseEntity } from '../base/interface';\n\nexport type IAdminRoleType =\n | 'Admin'\n | 'Super Admin'\n | 'Cashier'\n | 'Manager'\n | 'CEO'\n | 'Driver'\n | 'Security Guard'\n | 'Accountant';\n\nexport const ADMIN_ROLES: IAdminRoleType[] = [\n 'Admin',\n 'Super Admin',\n 'Cashier',\n 'Manager',\n 'CEO',\n 'Driver',\n 'Security Guard',\n 'Accountant',\n];\n\nexport interface IAdmin extends BaseEntity {\n firstName: string;\n lastName: string;\n email: string;\n phoneNumber: string;\n status: boolean;\n password: string;\n role: IAdminRoleType;\n access_list: string[];\n joiningDate: Date;\n profileImage: string;\n lastLogin: Date;\n}\n\nexport type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;\nexport type IAdminUpdate = Partial<IAdminCreate>;\nexport type IAdminSafe = Omit<IAdmin, 'password'>;\n","import type { BaseEntity } from \"../base\";\nimport type { IStore } from \"../store\";\n\nexport const DiscountTypeEnum = {\n PERCENTAGE: \"PERCENTAGE\",\n FIXED: \"FIXED\",\n} as const;\n\nexport type DiscountTypeEnum = (typeof DiscountTypeEnum)[keyof typeof DiscountTypeEnum];\n\nexport interface IDiscountType {\n type: DiscountTypeEnum;\n value: number;\n}\n\nexport interface ICoupon extends BaseEntity {\n title: string;\n couponCode: string;\n startTime: Date;\n endTime: Date;\n discountType: IDiscountType;\n minimumAmount: number;\n isPromotional: boolean;\n status: boolean;\n store: IStore | string;\n}","import type { BaseEntity } from \"../base\";\nimport type { Metadata } from \"../common\";\nimport type { ICoupon } from \"../coupon\";\nimport type { ICustomer } from \"../customer\";\nimport type { IOrderItem } from \"../orderItem\";\nimport type { IStore } from \"../store\";\n\nexport const OrderStatusEnum = {\n PENDING: \"PENDING\",\n CONFIRMED: \"CONFIRMED\",\n PROCESSING: \"PROCESSING\",\n SHIPPED: \"SHIPPED\",\n DELIVERED: \"DELIVERED\",\n CANCELED: \"CANCELED\",\n FAILED: \"FAILED\",\n REFUNDED: \"REFUNDED\",\n PARTIALLY_REFUNDED: \"PARTIALLY_REFUNDED\",\n} as const;\n\nexport type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];\n\nexport interface IOrder extends BaseEntity {\n orderId: string;\n orderItems: IOrderItem[];\n user?: ICustomer;\n coupon?: ICoupon;\n store: IStore;\n status: OrderStatusEnum;\n subTotalAmount: number;\n discountAmount: number;\n totalAmount: number;\n metaData: Metadata;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACYO,IAAM,cAAgC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;;;AClBO,IAAM,mBAAmB;AAAA,EAC5B,YAAY;AAAA,EACZ,OAAO;AACX;;;ACCO,IAAM,kBAAkB;AAAA,EAC3B,SAAS;AAAA,EACT,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,oBAAoB;AACxB;","names":[]}
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,28 @@ var ADMIN_ROLES = [
|
|
|
9
9
|
"Security Guard",
|
|
10
10
|
"Accountant"
|
|
11
11
|
];
|
|
12
|
+
|
|
13
|
+
// src/coupon/interface.ts
|
|
14
|
+
var DiscountTypeEnum = {
|
|
15
|
+
PERCENTAGE: "PERCENTAGE",
|
|
16
|
+
FIXED: "FIXED"
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// src/order/interface.ts
|
|
20
|
+
var OrderStatusEnum = {
|
|
21
|
+
PENDING: "PENDING",
|
|
22
|
+
CONFIRMED: "CONFIRMED",
|
|
23
|
+
PROCESSING: "PROCESSING",
|
|
24
|
+
SHIPPED: "SHIPPED",
|
|
25
|
+
DELIVERED: "DELIVERED",
|
|
26
|
+
CANCELED: "CANCELED",
|
|
27
|
+
FAILED: "FAILED",
|
|
28
|
+
REFUNDED: "REFUNDED",
|
|
29
|
+
PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED"
|
|
30
|
+
};
|
|
12
31
|
export {
|
|
13
|
-
ADMIN_ROLES
|
|
32
|
+
ADMIN_ROLES,
|
|
33
|
+
DiscountTypeEnum,
|
|
34
|
+
OrderStatusEnum
|
|
14
35
|
};
|
|
15
36
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/admin/interface.ts"],"sourcesContent":["import type { BaseEntity } from '../base/interface';\n\nexport type IAdminRoleType =\n | 'Admin'\n | 'Super Admin'\n | 'Cashier'\n | 'Manager'\n | 'CEO'\n | 'Driver'\n | 'Security Guard'\n | 'Accountant';\n\nexport const ADMIN_ROLES: IAdminRoleType[] = [\n 'Admin',\n 'Super Admin',\n 'Cashier',\n 'Manager',\n 'CEO',\n 'Driver',\n 'Security Guard',\n 'Accountant',\n];\n\nexport interface IAdmin extends BaseEntity {\n firstName: string;\n lastName: string;\n email: string;\n phoneNumber: string;\n status: boolean;\n password: string;\n role: IAdminRoleType;\n access_list: string[];\n joiningDate: Date;\n profileImage: string;\n lastLogin: Date;\n}\n\nexport type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;\nexport type IAdminUpdate = Partial<IAdminCreate>;\nexport type IAdminSafe = Omit<IAdmin, 'password'>;\n"],"mappings":";AAYO,IAAM,cAAgC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/admin/interface.ts","../src/coupon/interface.ts","../src/order/interface.ts"],"sourcesContent":["import type { BaseEntity } from '../base/interface';\n\nexport type IAdminRoleType =\n | 'Admin'\n | 'Super Admin'\n | 'Cashier'\n | 'Manager'\n | 'CEO'\n | 'Driver'\n | 'Security Guard'\n | 'Accountant';\n\nexport const ADMIN_ROLES: IAdminRoleType[] = [\n 'Admin',\n 'Super Admin',\n 'Cashier',\n 'Manager',\n 'CEO',\n 'Driver',\n 'Security Guard',\n 'Accountant',\n];\n\nexport interface IAdmin extends BaseEntity {\n firstName: string;\n lastName: string;\n email: string;\n phoneNumber: string;\n status: boolean;\n password: string;\n role: IAdminRoleType;\n access_list: string[];\n joiningDate: Date;\n profileImage: string;\n lastLogin: Date;\n}\n\nexport type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;\nexport type IAdminUpdate = Partial<IAdminCreate>;\nexport type IAdminSafe = Omit<IAdmin, 'password'>;\n","import type { BaseEntity } from \"../base\";\nimport type { IStore } from \"../store\";\n\nexport const DiscountTypeEnum = {\n PERCENTAGE: \"PERCENTAGE\",\n FIXED: \"FIXED\",\n} as const;\n\nexport type DiscountTypeEnum = (typeof DiscountTypeEnum)[keyof typeof DiscountTypeEnum];\n\nexport interface IDiscountType {\n type: DiscountTypeEnum;\n value: number;\n}\n\nexport interface ICoupon extends BaseEntity {\n title: string;\n couponCode: string;\n startTime: Date;\n endTime: Date;\n discountType: IDiscountType;\n minimumAmount: number;\n isPromotional: boolean;\n status: boolean;\n store: IStore | string;\n}","import type { BaseEntity } from \"../base\";\nimport type { Metadata } from \"../common\";\nimport type { ICoupon } from \"../coupon\";\nimport type { ICustomer } from \"../customer\";\nimport type { IOrderItem } from \"../orderItem\";\nimport type { IStore } from \"../store\";\n\nexport const OrderStatusEnum = {\n PENDING: \"PENDING\",\n CONFIRMED: \"CONFIRMED\",\n PROCESSING: \"PROCESSING\",\n SHIPPED: \"SHIPPED\",\n DELIVERED: \"DELIVERED\",\n CANCELED: \"CANCELED\",\n FAILED: \"FAILED\",\n REFUNDED: \"REFUNDED\",\n PARTIALLY_REFUNDED: \"PARTIALLY_REFUNDED\",\n} as const;\n\nexport type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];\n\nexport interface IOrder extends BaseEntity {\n orderId: string;\n orderItems: IOrderItem[];\n user?: ICustomer;\n coupon?: ICoupon;\n store: IStore;\n status: OrderStatusEnum;\n subTotalAmount: number;\n discountAmount: number;\n totalAmount: number;\n metaData: Metadata;\n}\n"],"mappings":";AAYO,IAAM,cAAgC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;;;AClBO,IAAM,mBAAmB;AAAA,EAC5B,YAAY;AAAA,EACZ,OAAO;AACX;;;ACCO,IAAM,kBAAkB;AAAA,EAC3B,SAAS;AAAA,EACT,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,oBAAoB;AACxB;","names":[]}
|
package/package.json
CHANGED