@fas-core/shared-types 1.0.29 → 1.0.30
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 +80 -79
- package/dist/index.d.ts +80 -79
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -20,67 +20,6 @@ interface ICountry extends BaseEntity {
|
|
|
20
20
|
status: boolean;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
interface ICustomer extends BaseEntity {
|
|
24
|
-
firstName: string;
|
|
25
|
-
lastName: string;
|
|
26
|
-
profileImage: string;
|
|
27
|
-
address: IAddress;
|
|
28
|
-
email: string;
|
|
29
|
-
phoneNumber: string;
|
|
30
|
-
password?: string;
|
|
31
|
-
status: boolean;
|
|
32
|
-
lastLogin: Date;
|
|
33
|
-
authProvider: "credentials" | "google" | "apple" | "facebook" | string | null;
|
|
34
|
-
googleId: string;
|
|
35
|
-
emailVerified?: boolean;
|
|
36
|
-
hasPassword: boolean;
|
|
37
|
-
allowedStores: Array<string | Types.ObjectId>;
|
|
38
|
-
isStoreAdmin: boolean;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface IState extends BaseEntity {
|
|
42
|
-
country: ICountry;
|
|
43
|
-
name: string;
|
|
44
|
-
slug: string;
|
|
45
|
-
isoCode: string;
|
|
46
|
-
subdivision: string;
|
|
47
|
-
status: boolean;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface IAddress extends BaseEntity {
|
|
51
|
-
addressLine1: string;
|
|
52
|
-
addressLine2: string;
|
|
53
|
-
city: string;
|
|
54
|
-
zipCode: string;
|
|
55
|
-
firstName: string;
|
|
56
|
-
lastName: string;
|
|
57
|
-
email: string;
|
|
58
|
-
phoneNumber: string;
|
|
59
|
-
defaultAddress: boolean;
|
|
60
|
-
state: IState;
|
|
61
|
-
country: ICountry;
|
|
62
|
-
customer: ICustomer;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
type IAdminRoleType = 'Admin' | 'Super Admin' | 'Cashier' | 'Manager' | 'CEO' | 'Driver' | 'Security Guard' | 'Accountant';
|
|
66
|
-
declare const ADMIN_ROLES: IAdminRoleType[];
|
|
67
|
-
interface IAdmin extends BaseEntity {
|
|
68
|
-
firstName: string;
|
|
69
|
-
lastName: string;
|
|
70
|
-
email: string;
|
|
71
|
-
phoneNumber: string;
|
|
72
|
-
status: boolean;
|
|
73
|
-
password: string;
|
|
74
|
-
role: IAdminRoleType;
|
|
75
|
-
access_list: string[];
|
|
76
|
-
joiningDate: Date;
|
|
77
|
-
profileImage: string;
|
|
78
|
-
lastLogin: Date;
|
|
79
|
-
}
|
|
80
|
-
type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;
|
|
81
|
-
type IAdminUpdate = Partial<IAdminCreate>;
|
|
82
|
-
type IAdminSafe = Omit<IAdmin, 'password'>;
|
|
83
|
-
|
|
84
23
|
interface Paginated<T> {
|
|
85
24
|
data: T[];
|
|
86
25
|
total: number;
|
|
@@ -182,23 +121,6 @@ interface IStore extends BaseEntity {
|
|
|
182
121
|
storeAdmins: Array<string | Types.ObjectId>;
|
|
183
122
|
}
|
|
184
123
|
|
|
185
|
-
interface IContact extends BaseEntity {
|
|
186
|
-
firstName: string;
|
|
187
|
-
lastName: string;
|
|
188
|
-
companyName?: string;
|
|
189
|
-
email: string;
|
|
190
|
-
phone: string;
|
|
191
|
-
category: "sales" | "support" | "orders" | "returns" | "parts" | "other";
|
|
192
|
-
subject: string;
|
|
193
|
-
message: string;
|
|
194
|
-
status: 'new' | 'in-progress' | 'resolved' | 'closed';
|
|
195
|
-
source: 'website' | 'email' | 'phone' | 'chat' | 'other';
|
|
196
|
-
caseId: string;
|
|
197
|
-
notes: string;
|
|
198
|
-
store: IStore;
|
|
199
|
-
resolvedAt?: Date;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
124
|
declare const DiscountTypeEnum: {
|
|
203
125
|
readonly PERCENTAGE: "PERCENTAGE";
|
|
204
126
|
readonly FIXED: "FIXED";
|
|
@@ -388,7 +310,7 @@ declare const statusColors: Record<OrderStatusEnum, string>;
|
|
|
388
310
|
interface IOrder extends BaseEntity {
|
|
389
311
|
orderId: string;
|
|
390
312
|
orderItems: IOrderItem[];
|
|
391
|
-
|
|
313
|
+
customer: ICustomer;
|
|
392
314
|
coupon: ICoupon;
|
|
393
315
|
store: IStore;
|
|
394
316
|
status: OrderStatusEnum;
|
|
@@ -402,6 +324,85 @@ interface IOrder extends BaseEntity {
|
|
|
402
324
|
refundTransactions: IRefundTransaction[];
|
|
403
325
|
}
|
|
404
326
|
|
|
327
|
+
interface ICustomer extends BaseEntity {
|
|
328
|
+
firstName: string;
|
|
329
|
+
lastName: string;
|
|
330
|
+
profileImage: string;
|
|
331
|
+
address: IAddress;
|
|
332
|
+
email: string;
|
|
333
|
+
phoneNumber: string;
|
|
334
|
+
password?: string;
|
|
335
|
+
status: boolean;
|
|
336
|
+
lastLogin: Date;
|
|
337
|
+
authProvider: "credentials" | "google" | "apple" | "facebook" | string | null;
|
|
338
|
+
googleId: string;
|
|
339
|
+
emailVerified?: boolean;
|
|
340
|
+
hasPassword: boolean;
|
|
341
|
+
allowedStores: Array<string | Types.ObjectId>;
|
|
342
|
+
orders: IOrder[];
|
|
343
|
+
isStoreAdmin: boolean;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
interface IState extends BaseEntity {
|
|
347
|
+
country: ICountry;
|
|
348
|
+
name: string;
|
|
349
|
+
slug: string;
|
|
350
|
+
isoCode: string;
|
|
351
|
+
subdivision: string;
|
|
352
|
+
status: boolean;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
interface IAddress extends BaseEntity {
|
|
356
|
+
addressLine1: string;
|
|
357
|
+
addressLine2: string;
|
|
358
|
+
city: string;
|
|
359
|
+
zipCode: string;
|
|
360
|
+
firstName: string;
|
|
361
|
+
lastName: string;
|
|
362
|
+
email: string;
|
|
363
|
+
phoneNumber: string;
|
|
364
|
+
defaultAddress: boolean;
|
|
365
|
+
state: IState;
|
|
366
|
+
country: ICountry;
|
|
367
|
+
customer: ICustomer;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
type IAdminRoleType = 'Admin' | 'Super Admin' | 'Cashier' | 'Manager' | 'CEO' | 'Driver' | 'Security Guard' | 'Accountant';
|
|
371
|
+
declare const ADMIN_ROLES: IAdminRoleType[];
|
|
372
|
+
interface IAdmin extends BaseEntity {
|
|
373
|
+
firstName: string;
|
|
374
|
+
lastName: string;
|
|
375
|
+
email: string;
|
|
376
|
+
phoneNumber: string;
|
|
377
|
+
status: boolean;
|
|
378
|
+
password: string;
|
|
379
|
+
role: IAdminRoleType;
|
|
380
|
+
access_list: string[];
|
|
381
|
+
joiningDate: Date;
|
|
382
|
+
profileImage: string;
|
|
383
|
+
lastLogin: Date;
|
|
384
|
+
}
|
|
385
|
+
type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;
|
|
386
|
+
type IAdminUpdate = Partial<IAdminCreate>;
|
|
387
|
+
type IAdminSafe = Omit<IAdmin, 'password'>;
|
|
388
|
+
|
|
389
|
+
interface IContact extends BaseEntity {
|
|
390
|
+
firstName: string;
|
|
391
|
+
lastName: string;
|
|
392
|
+
companyName?: string;
|
|
393
|
+
email: string;
|
|
394
|
+
phone: string;
|
|
395
|
+
category: "sales" | "support" | "orders" | "returns" | "parts" | "other";
|
|
396
|
+
subject: string;
|
|
397
|
+
message: string;
|
|
398
|
+
status: 'new' | 'in-progress' | 'resolved' | 'closed';
|
|
399
|
+
source: 'website' | 'email' | 'phone' | 'chat' | 'other';
|
|
400
|
+
caseId: string;
|
|
401
|
+
notes: string;
|
|
402
|
+
store: IStore;
|
|
403
|
+
resolvedAt?: Date;
|
|
404
|
+
}
|
|
405
|
+
|
|
405
406
|
interface ICartItem extends BaseEntity {
|
|
406
407
|
cart: ICart;
|
|
407
408
|
product: IProduct;
|
package/dist/index.d.ts
CHANGED
|
@@ -20,67 +20,6 @@ interface ICountry extends BaseEntity {
|
|
|
20
20
|
status: boolean;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
interface ICustomer extends BaseEntity {
|
|
24
|
-
firstName: string;
|
|
25
|
-
lastName: string;
|
|
26
|
-
profileImage: string;
|
|
27
|
-
address: IAddress;
|
|
28
|
-
email: string;
|
|
29
|
-
phoneNumber: string;
|
|
30
|
-
password?: string;
|
|
31
|
-
status: boolean;
|
|
32
|
-
lastLogin: Date;
|
|
33
|
-
authProvider: "credentials" | "google" | "apple" | "facebook" | string | null;
|
|
34
|
-
googleId: string;
|
|
35
|
-
emailVerified?: boolean;
|
|
36
|
-
hasPassword: boolean;
|
|
37
|
-
allowedStores: Array<string | Types.ObjectId>;
|
|
38
|
-
isStoreAdmin: boolean;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
interface IState extends BaseEntity {
|
|
42
|
-
country: ICountry;
|
|
43
|
-
name: string;
|
|
44
|
-
slug: string;
|
|
45
|
-
isoCode: string;
|
|
46
|
-
subdivision: string;
|
|
47
|
-
status: boolean;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface IAddress extends BaseEntity {
|
|
51
|
-
addressLine1: string;
|
|
52
|
-
addressLine2: string;
|
|
53
|
-
city: string;
|
|
54
|
-
zipCode: string;
|
|
55
|
-
firstName: string;
|
|
56
|
-
lastName: string;
|
|
57
|
-
email: string;
|
|
58
|
-
phoneNumber: string;
|
|
59
|
-
defaultAddress: boolean;
|
|
60
|
-
state: IState;
|
|
61
|
-
country: ICountry;
|
|
62
|
-
customer: ICustomer;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
type IAdminRoleType = 'Admin' | 'Super Admin' | 'Cashier' | 'Manager' | 'CEO' | 'Driver' | 'Security Guard' | 'Accountant';
|
|
66
|
-
declare const ADMIN_ROLES: IAdminRoleType[];
|
|
67
|
-
interface IAdmin extends BaseEntity {
|
|
68
|
-
firstName: string;
|
|
69
|
-
lastName: string;
|
|
70
|
-
email: string;
|
|
71
|
-
phoneNumber: string;
|
|
72
|
-
status: boolean;
|
|
73
|
-
password: string;
|
|
74
|
-
role: IAdminRoleType;
|
|
75
|
-
access_list: string[];
|
|
76
|
-
joiningDate: Date;
|
|
77
|
-
profileImage: string;
|
|
78
|
-
lastLogin: Date;
|
|
79
|
-
}
|
|
80
|
-
type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;
|
|
81
|
-
type IAdminUpdate = Partial<IAdminCreate>;
|
|
82
|
-
type IAdminSafe = Omit<IAdmin, 'password'>;
|
|
83
|
-
|
|
84
23
|
interface Paginated<T> {
|
|
85
24
|
data: T[];
|
|
86
25
|
total: number;
|
|
@@ -182,23 +121,6 @@ interface IStore extends BaseEntity {
|
|
|
182
121
|
storeAdmins: Array<string | Types.ObjectId>;
|
|
183
122
|
}
|
|
184
123
|
|
|
185
|
-
interface IContact extends BaseEntity {
|
|
186
|
-
firstName: string;
|
|
187
|
-
lastName: string;
|
|
188
|
-
companyName?: string;
|
|
189
|
-
email: string;
|
|
190
|
-
phone: string;
|
|
191
|
-
category: "sales" | "support" | "orders" | "returns" | "parts" | "other";
|
|
192
|
-
subject: string;
|
|
193
|
-
message: string;
|
|
194
|
-
status: 'new' | 'in-progress' | 'resolved' | 'closed';
|
|
195
|
-
source: 'website' | 'email' | 'phone' | 'chat' | 'other';
|
|
196
|
-
caseId: string;
|
|
197
|
-
notes: string;
|
|
198
|
-
store: IStore;
|
|
199
|
-
resolvedAt?: Date;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
124
|
declare const DiscountTypeEnum: {
|
|
203
125
|
readonly PERCENTAGE: "PERCENTAGE";
|
|
204
126
|
readonly FIXED: "FIXED";
|
|
@@ -388,7 +310,7 @@ declare const statusColors: Record<OrderStatusEnum, string>;
|
|
|
388
310
|
interface IOrder extends BaseEntity {
|
|
389
311
|
orderId: string;
|
|
390
312
|
orderItems: IOrderItem[];
|
|
391
|
-
|
|
313
|
+
customer: ICustomer;
|
|
392
314
|
coupon: ICoupon;
|
|
393
315
|
store: IStore;
|
|
394
316
|
status: OrderStatusEnum;
|
|
@@ -402,6 +324,85 @@ interface IOrder extends BaseEntity {
|
|
|
402
324
|
refundTransactions: IRefundTransaction[];
|
|
403
325
|
}
|
|
404
326
|
|
|
327
|
+
interface ICustomer extends BaseEntity {
|
|
328
|
+
firstName: string;
|
|
329
|
+
lastName: string;
|
|
330
|
+
profileImage: string;
|
|
331
|
+
address: IAddress;
|
|
332
|
+
email: string;
|
|
333
|
+
phoneNumber: string;
|
|
334
|
+
password?: string;
|
|
335
|
+
status: boolean;
|
|
336
|
+
lastLogin: Date;
|
|
337
|
+
authProvider: "credentials" | "google" | "apple" | "facebook" | string | null;
|
|
338
|
+
googleId: string;
|
|
339
|
+
emailVerified?: boolean;
|
|
340
|
+
hasPassword: boolean;
|
|
341
|
+
allowedStores: Array<string | Types.ObjectId>;
|
|
342
|
+
orders: IOrder[];
|
|
343
|
+
isStoreAdmin: boolean;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
interface IState extends BaseEntity {
|
|
347
|
+
country: ICountry;
|
|
348
|
+
name: string;
|
|
349
|
+
slug: string;
|
|
350
|
+
isoCode: string;
|
|
351
|
+
subdivision: string;
|
|
352
|
+
status: boolean;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
interface IAddress extends BaseEntity {
|
|
356
|
+
addressLine1: string;
|
|
357
|
+
addressLine2: string;
|
|
358
|
+
city: string;
|
|
359
|
+
zipCode: string;
|
|
360
|
+
firstName: string;
|
|
361
|
+
lastName: string;
|
|
362
|
+
email: string;
|
|
363
|
+
phoneNumber: string;
|
|
364
|
+
defaultAddress: boolean;
|
|
365
|
+
state: IState;
|
|
366
|
+
country: ICountry;
|
|
367
|
+
customer: ICustomer;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
type IAdminRoleType = 'Admin' | 'Super Admin' | 'Cashier' | 'Manager' | 'CEO' | 'Driver' | 'Security Guard' | 'Accountant';
|
|
371
|
+
declare const ADMIN_ROLES: IAdminRoleType[];
|
|
372
|
+
interface IAdmin extends BaseEntity {
|
|
373
|
+
firstName: string;
|
|
374
|
+
lastName: string;
|
|
375
|
+
email: string;
|
|
376
|
+
phoneNumber: string;
|
|
377
|
+
status: boolean;
|
|
378
|
+
password: string;
|
|
379
|
+
role: IAdminRoleType;
|
|
380
|
+
access_list: string[];
|
|
381
|
+
joiningDate: Date;
|
|
382
|
+
profileImage: string;
|
|
383
|
+
lastLogin: Date;
|
|
384
|
+
}
|
|
385
|
+
type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;
|
|
386
|
+
type IAdminUpdate = Partial<IAdminCreate>;
|
|
387
|
+
type IAdminSafe = Omit<IAdmin, 'password'>;
|
|
388
|
+
|
|
389
|
+
interface IContact extends BaseEntity {
|
|
390
|
+
firstName: string;
|
|
391
|
+
lastName: string;
|
|
392
|
+
companyName?: string;
|
|
393
|
+
email: string;
|
|
394
|
+
phone: string;
|
|
395
|
+
category: "sales" | "support" | "orders" | "returns" | "parts" | "other";
|
|
396
|
+
subject: string;
|
|
397
|
+
message: string;
|
|
398
|
+
status: 'new' | 'in-progress' | 'resolved' | 'closed';
|
|
399
|
+
source: 'website' | 'email' | 'phone' | 'chat' | 'other';
|
|
400
|
+
caseId: string;
|
|
401
|
+
notes: string;
|
|
402
|
+
store: IStore;
|
|
403
|
+
resolvedAt?: Date;
|
|
404
|
+
}
|
|
405
|
+
|
|
405
406
|
interface ICartItem extends BaseEntity {
|
|
406
407
|
cart: ICart;
|
|
407
408
|
product: IProduct;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/admin/interface.ts","../src/coupon/interface.ts","../src/order/interface.ts","../src/transaction/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';\nexport * from './cart';\nexport * from './cartItem';\nexport * from './category';\nexport * from './brand';\nexport * from './stock';\nexport * from './transaction';\n","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 stores: IStore[];\n}\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\";\nimport type { IOrderTransaction, IRefundTransaction } from \"../transaction\";\nimport type { PaymentMethodEnum, PaymentStatusEnum } from \"../transaction\";\n\nexport const OrderStatusEnum = {\n CREATED: \"CREATED\",\n RECEIVED: \"RECEIVED\",\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 ARCHIVED: \"ARCHIVED\",\n RETURNED: \"RETURNED\",\n} as const;\n\nexport type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];\nexport const ORDER_STATUS_VALUES = Object.values(OrderStatusEnum);\n\nexport const statusColors: Record<OrderStatusEnum, string> = {\n [OrderStatusEnum.CREATED]: \"default\",\n [OrderStatusEnum.RECEIVED]: \"cyan\",\n [OrderStatusEnum.PENDING]: \"gold\",\n [OrderStatusEnum.CONFIRMED]: \"blue\",\n [OrderStatusEnum.PROCESSING]: \"cyan\",\n [OrderStatusEnum.SHIPPED]: \"purple\",\n [OrderStatusEnum.DELIVERED]: \"green\",\n [OrderStatusEnum.CANCELED]: \"volcano\",\n [OrderStatusEnum.FAILED]: \"red\",\n [OrderStatusEnum.REFUNDED]: \"orange\",\n [OrderStatusEnum.PARTIALLY_REFUNDED]: \"magenta\",\n [OrderStatusEnum.ARCHIVED]: \"gray\",\n [OrderStatusEnum.RETURNED]: \"purple\",\n};\n\nexport interface IOrder extends BaseEntity {\n orderId: string;\n orderItems: IOrderItem[];\n
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/admin/interface.ts","../src/coupon/interface.ts","../src/order/interface.ts","../src/transaction/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';\nexport * from './cart';\nexport * from './cartItem';\nexport * from './category';\nexport * from './brand';\nexport * from './stock';\nexport * from './transaction';\n","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 stores: IStore[];\n}\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\";\nimport type { IOrderTransaction, IRefundTransaction } from \"../transaction\";\nimport type { PaymentMethodEnum, PaymentStatusEnum } from \"../transaction\";\n\nexport const OrderStatusEnum = {\n CREATED: \"CREATED\",\n RECEIVED: \"RECEIVED\",\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 ARCHIVED: \"ARCHIVED\",\n RETURNED: \"RETURNED\",\n} as const;\n\nexport type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];\nexport const ORDER_STATUS_VALUES = Object.values(OrderStatusEnum);\n\nexport const statusColors: Record<OrderStatusEnum, string> = {\n [OrderStatusEnum.CREATED]: \"default\",\n [OrderStatusEnum.RECEIVED]: \"cyan\",\n [OrderStatusEnum.PENDING]: \"gold\",\n [OrderStatusEnum.CONFIRMED]: \"blue\",\n [OrderStatusEnum.PROCESSING]: \"cyan\",\n [OrderStatusEnum.SHIPPED]: \"purple\",\n [OrderStatusEnum.DELIVERED]: \"green\",\n [OrderStatusEnum.CANCELED]: \"volcano\",\n [OrderStatusEnum.FAILED]: \"red\",\n [OrderStatusEnum.REFUNDED]: \"orange\",\n [OrderStatusEnum.PARTIALLY_REFUNDED]: \"magenta\",\n [OrderStatusEnum.ARCHIVED]: \"gray\",\n [OrderStatusEnum.RETURNED]: \"purple\",\n};\n\nexport interface IOrder extends BaseEntity {\n orderId: string;\n orderItems: IOrderItem[];\n customer: ICustomer;\n coupon: ICoupon;\n store: IStore;\n status: OrderStatusEnum;\n paymentStatus: PaymentStatusEnum;\n paymentMethod: PaymentMethodEnum;\n subTotalAmount: number;\n discountAmount: number;\n totalAmount: number;\n metaData: Metadata;\n orderTransactions: IOrderTransaction[];\n refundTransactions: IRefundTransaction[];\n}\n","import type { BaseEntity } from \"../base\";\nimport type { Metadata } from \"../common\";\nimport type { IOrder } from \"../order\";\nimport type { ICurrency } from \"../currency\";\n\nexport const PaymentStatusEnum = {\n INITIATED: 'INITIATED',\n PENDING: 'PENDING',\n PROCESSING: 'PROCESSING',\n FAILED: 'FAILED',\n CANCELLED: 'CANCELLED',\n PENDING_CAPTURE: 'PENDING_CAPTURE',\n COMPLETED: 'COMPLETED',\n VOIDED: 'VOIDED',\n REDIRECTED_TO_GATEWAY: 'REDIRECTED_TO_GATEWAY',\n UNKNOWN: 'UNKNOWN',\n REFUNDED: 'REFUNDED',\n PARTIALLY_REFUNDED: 'PARTIALLY_REFUNDED',\n} as const;\n\nexport type PaymentStatusEnum = (typeof PaymentStatusEnum)[keyof typeof PaymentStatusEnum];\nexport const PAYMENT_STATUS_VALUES = Object.values(PaymentStatusEnum);\n\nexport const paymentStatusColorMap: Record<PaymentStatusEnum, string> = {\n [PaymentStatusEnum.INITIATED]: 'default',\n [PaymentStatusEnum.PENDING]: 'gold',\n [PaymentStatusEnum.PROCESSING]: 'cyan',\n [PaymentStatusEnum.FAILED]: 'red',\n [PaymentStatusEnum.CANCELLED]: 'volcano',\n [PaymentStatusEnum.PENDING_CAPTURE]: 'blue',\n [PaymentStatusEnum.COMPLETED]: 'green',\n [PaymentStatusEnum.VOIDED]: 'magenta',\n [PaymentStatusEnum.REDIRECTED_TO_GATEWAY]: 'purple',\n [PaymentStatusEnum.UNKNOWN]: 'gray',\n [PaymentStatusEnum.REFUNDED]: 'orange',\n [PaymentStatusEnum.PARTIALLY_REFUNDED]: 'magenta',\n};\n\nexport const PaymentMethodEnum = {\n CREDIT_CARD: 'CREDIT_CARD',\n PAYPAL: 'PAYPAL',\n STRIPE: 'STRIPE',\n CHECK: 'CHECK',\n APPLE_PAY: 'APPLE_PAY',\n} as const;\n\nexport type PaymentMethodEnum = (typeof PaymentMethodEnum)[keyof typeof PaymentMethodEnum];\nexport const PAYMENT_METHOD_VALUES = Object.values(PaymentMethodEnum);\n\nexport const paymentMethodColorMap: Record<PaymentMethodEnum, string> = {\n [PaymentMethodEnum.CREDIT_CARD]: 'blue',\n [PaymentMethodEnum.PAYPAL]: 'geekblue',\n [PaymentMethodEnum.STRIPE]: 'purple',\n [PaymentMethodEnum.CHECK]: 'orange',\n [PaymentMethodEnum.APPLE_PAY]: 'black',\n};\n\nexport const TransactionTypeEnum = {\n ORDER: \"ORDER\",\n REFUND: \"REFUND\",\n} as const;\n\nexport type TransactionTypeEnum = (typeof TransactionTypeEnum)[keyof typeof TransactionTypeEnum];\n\nexport const TRANSACTION_TYPE_VALUES = Object.values(TransactionTypeEnum);\n\nexport const typeColorMap: Record<TransactionTypeEnum, string> = {\n [TransactionTypeEnum.ORDER]: \"blue\",\n [TransactionTypeEnum.REFUND]: \"purple\",\n};\n\nexport interface ITransactionBase extends BaseEntity {\n order: IOrder;\n currency: ICurrency;\n transactionId: string;\n amount: number;\n status: PaymentStatusEnum;\n paymentMethod: PaymentMethodEnum;\n gatewayId?: string;\n metaData?: Metadata;\n comment?: string;\n isPaymentLink?: boolean;\n refundedAmount?: number;\n proofFileId?: string;\n}\n\nexport interface IOrderTransaction extends ITransactionBase {\n type: typeof TransactionTypeEnum.ORDER;\n}\n\nexport interface IRefundTransaction extends ITransactionBase {\n type: typeof TransactionTypeEnum.REFUND;\n originalTransaction?: ITransactionBase;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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;;;ACGO,IAAM,kBAAkB;AAAA,EAC3B,SAAS;AAAA,EACT,UAAU;AAAA,EACV,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;AAAA,EACpB,UAAU;AAAA,EACV,UAAU;AACd;AAGO,IAAM,sBAAsB,OAAO,OAAO,eAAe;AAEzD,IAAM,eAAgD;AAAA,EACzD,CAAC,gBAAgB,OAAO,GAAG;AAAA,EAC3B,CAAC,gBAAgB,QAAQ,GAAG;AAAA,EAC5B,CAAC,gBAAgB,OAAO,GAAG;AAAA,EAC3B,CAAC,gBAAgB,SAAS,GAAG;AAAA,EAC7B,CAAC,gBAAgB,UAAU,GAAG;AAAA,EAC9B,CAAC,gBAAgB,OAAO,GAAG;AAAA,EAC3B,CAAC,gBAAgB,SAAS,GAAG;AAAA,EAC7B,CAAC,gBAAgB,QAAQ,GAAG;AAAA,EAC5B,CAAC,gBAAgB,MAAM,GAAG;AAAA,EAC1B,CAAC,gBAAgB,QAAQ,GAAG;AAAA,EAC5B,CAAC,gBAAgB,kBAAkB,GAAG;AAAA,EACtC,CAAC,gBAAgB,QAAQ,GAAG;AAAA,EAC5B,CAAC,gBAAgB,QAAQ,GAAG;AAChC;;;ACrCO,IAAM,oBAAoB;AAAA,EAC7B,WAAW;AAAA,EACX,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,uBAAuB;AAAA,EACvB,SAAS;AAAA,EACT,UAAU;AAAA,EACV,oBAAoB;AACxB;AAGO,IAAM,wBAAwB,OAAO,OAAO,iBAAiB;AAE7D,IAAM,wBAA2D;AAAA,EACpE,CAAC,kBAAkB,SAAS,GAAG;AAAA,EAC/B,CAAC,kBAAkB,OAAO,GAAG;AAAA,EAC7B,CAAC,kBAAkB,UAAU,GAAG;AAAA,EAChC,CAAC,kBAAkB,MAAM,GAAG;AAAA,EAC5B,CAAC,kBAAkB,SAAS,GAAG;AAAA,EAC/B,CAAC,kBAAkB,eAAe,GAAG;AAAA,EACrC,CAAC,kBAAkB,SAAS,GAAG;AAAA,EAC/B,CAAC,kBAAkB,MAAM,GAAG;AAAA,EAC5B,CAAC,kBAAkB,qBAAqB,GAAG;AAAA,EAC3C,CAAC,kBAAkB,OAAO,GAAG;AAAA,EAC7B,CAAC,kBAAkB,QAAQ,GAAG;AAAA,EAC9B,CAAC,kBAAkB,kBAAkB,GAAG;AAC5C;AAEO,IAAM,oBAAoB;AAAA,EAC7B,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,WAAW;AACf;AAGO,IAAM,wBAAwB,OAAO,OAAO,iBAAiB;AAE7D,IAAM,wBAA2D;AAAA,EACpE,CAAC,kBAAkB,WAAW,GAAG;AAAA,EACjC,CAAC,kBAAkB,MAAM,GAAG;AAAA,EAC5B,CAAC,kBAAkB,MAAM,GAAG;AAAA,EAC5B,CAAC,kBAAkB,KAAK,GAAG;AAAA,EAC3B,CAAC,kBAAkB,SAAS,GAAG;AACnC;AAEO,IAAM,sBAAsB;AAAA,EAC/B,OAAO;AAAA,EACP,QAAQ;AACZ;AAIO,IAAM,0BAA0B,OAAO,OAAO,mBAAmB;AAEjE,IAAM,eAAoD;AAAA,EAC7D,CAAC,oBAAoB,KAAK,GAAG;AAAA,EAC7B,CAAC,oBAAoB,MAAM,GAAG;AAClC;","names":[]}
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/admin/interface.ts","../src/coupon/interface.ts","../src/order/interface.ts","../src/transaction/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 stores: IStore[];\n}\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\";\nimport type { IOrderTransaction, IRefundTransaction } from \"../transaction\";\nimport type { PaymentMethodEnum, PaymentStatusEnum } from \"../transaction\";\n\nexport const OrderStatusEnum = {\n CREATED: \"CREATED\",\n RECEIVED: \"RECEIVED\",\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 ARCHIVED: \"ARCHIVED\",\n RETURNED: \"RETURNED\",\n} as const;\n\nexport type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];\nexport const ORDER_STATUS_VALUES = Object.values(OrderStatusEnum);\n\nexport const statusColors: Record<OrderStatusEnum, string> = {\n [OrderStatusEnum.CREATED]: \"default\",\n [OrderStatusEnum.RECEIVED]: \"cyan\",\n [OrderStatusEnum.PENDING]: \"gold\",\n [OrderStatusEnum.CONFIRMED]: \"blue\",\n [OrderStatusEnum.PROCESSING]: \"cyan\",\n [OrderStatusEnum.SHIPPED]: \"purple\",\n [OrderStatusEnum.DELIVERED]: \"green\",\n [OrderStatusEnum.CANCELED]: \"volcano\",\n [OrderStatusEnum.FAILED]: \"red\",\n [OrderStatusEnum.REFUNDED]: \"orange\",\n [OrderStatusEnum.PARTIALLY_REFUNDED]: \"magenta\",\n [OrderStatusEnum.ARCHIVED]: \"gray\",\n [OrderStatusEnum.RETURNED]: \"purple\",\n};\n\nexport interface IOrder extends BaseEntity {\n orderId: string;\n orderItems: IOrderItem[];\n
|
|
1
|
+
{"version":3,"sources":["../src/admin/interface.ts","../src/coupon/interface.ts","../src/order/interface.ts","../src/transaction/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 stores: IStore[];\n}\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\";\nimport type { IOrderTransaction, IRefundTransaction } from \"../transaction\";\nimport type { PaymentMethodEnum, PaymentStatusEnum } from \"../transaction\";\n\nexport const OrderStatusEnum = {\n CREATED: \"CREATED\",\n RECEIVED: \"RECEIVED\",\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 ARCHIVED: \"ARCHIVED\",\n RETURNED: \"RETURNED\",\n} as const;\n\nexport type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];\nexport const ORDER_STATUS_VALUES = Object.values(OrderStatusEnum);\n\nexport const statusColors: Record<OrderStatusEnum, string> = {\n [OrderStatusEnum.CREATED]: \"default\",\n [OrderStatusEnum.RECEIVED]: \"cyan\",\n [OrderStatusEnum.PENDING]: \"gold\",\n [OrderStatusEnum.CONFIRMED]: \"blue\",\n [OrderStatusEnum.PROCESSING]: \"cyan\",\n [OrderStatusEnum.SHIPPED]: \"purple\",\n [OrderStatusEnum.DELIVERED]: \"green\",\n [OrderStatusEnum.CANCELED]: \"volcano\",\n [OrderStatusEnum.FAILED]: \"red\",\n [OrderStatusEnum.REFUNDED]: \"orange\",\n [OrderStatusEnum.PARTIALLY_REFUNDED]: \"magenta\",\n [OrderStatusEnum.ARCHIVED]: \"gray\",\n [OrderStatusEnum.RETURNED]: \"purple\",\n};\n\nexport interface IOrder extends BaseEntity {\n orderId: string;\n orderItems: IOrderItem[];\n customer: ICustomer;\n coupon: ICoupon;\n store: IStore;\n status: OrderStatusEnum;\n paymentStatus: PaymentStatusEnum;\n paymentMethod: PaymentMethodEnum;\n subTotalAmount: number;\n discountAmount: number;\n totalAmount: number;\n metaData: Metadata;\n orderTransactions: IOrderTransaction[];\n refundTransactions: IRefundTransaction[];\n}\n","import type { BaseEntity } from \"../base\";\nimport type { Metadata } from \"../common\";\nimport type { IOrder } from \"../order\";\nimport type { ICurrency } from \"../currency\";\n\nexport const PaymentStatusEnum = {\n INITIATED: 'INITIATED',\n PENDING: 'PENDING',\n PROCESSING: 'PROCESSING',\n FAILED: 'FAILED',\n CANCELLED: 'CANCELLED',\n PENDING_CAPTURE: 'PENDING_CAPTURE',\n COMPLETED: 'COMPLETED',\n VOIDED: 'VOIDED',\n REDIRECTED_TO_GATEWAY: 'REDIRECTED_TO_GATEWAY',\n UNKNOWN: 'UNKNOWN',\n REFUNDED: 'REFUNDED',\n PARTIALLY_REFUNDED: 'PARTIALLY_REFUNDED',\n} as const;\n\nexport type PaymentStatusEnum = (typeof PaymentStatusEnum)[keyof typeof PaymentStatusEnum];\nexport const PAYMENT_STATUS_VALUES = Object.values(PaymentStatusEnum);\n\nexport const paymentStatusColorMap: Record<PaymentStatusEnum, string> = {\n [PaymentStatusEnum.INITIATED]: 'default',\n [PaymentStatusEnum.PENDING]: 'gold',\n [PaymentStatusEnum.PROCESSING]: 'cyan',\n [PaymentStatusEnum.FAILED]: 'red',\n [PaymentStatusEnum.CANCELLED]: 'volcano',\n [PaymentStatusEnum.PENDING_CAPTURE]: 'blue',\n [PaymentStatusEnum.COMPLETED]: 'green',\n [PaymentStatusEnum.VOIDED]: 'magenta',\n [PaymentStatusEnum.REDIRECTED_TO_GATEWAY]: 'purple',\n [PaymentStatusEnum.UNKNOWN]: 'gray',\n [PaymentStatusEnum.REFUNDED]: 'orange',\n [PaymentStatusEnum.PARTIALLY_REFUNDED]: 'magenta',\n};\n\nexport const PaymentMethodEnum = {\n CREDIT_CARD: 'CREDIT_CARD',\n PAYPAL: 'PAYPAL',\n STRIPE: 'STRIPE',\n CHECK: 'CHECK',\n APPLE_PAY: 'APPLE_PAY',\n} as const;\n\nexport type PaymentMethodEnum = (typeof PaymentMethodEnum)[keyof typeof PaymentMethodEnum];\nexport const PAYMENT_METHOD_VALUES = Object.values(PaymentMethodEnum);\n\nexport const paymentMethodColorMap: Record<PaymentMethodEnum, string> = {\n [PaymentMethodEnum.CREDIT_CARD]: 'blue',\n [PaymentMethodEnum.PAYPAL]: 'geekblue',\n [PaymentMethodEnum.STRIPE]: 'purple',\n [PaymentMethodEnum.CHECK]: 'orange',\n [PaymentMethodEnum.APPLE_PAY]: 'black',\n};\n\nexport const TransactionTypeEnum = {\n ORDER: \"ORDER\",\n REFUND: \"REFUND\",\n} as const;\n\nexport type TransactionTypeEnum = (typeof TransactionTypeEnum)[keyof typeof TransactionTypeEnum];\n\nexport const TRANSACTION_TYPE_VALUES = Object.values(TransactionTypeEnum);\n\nexport const typeColorMap: Record<TransactionTypeEnum, string> = {\n [TransactionTypeEnum.ORDER]: \"blue\",\n [TransactionTypeEnum.REFUND]: \"purple\",\n};\n\nexport interface ITransactionBase extends BaseEntity {\n order: IOrder;\n currency: ICurrency;\n transactionId: string;\n amount: number;\n status: PaymentStatusEnum;\n paymentMethod: PaymentMethodEnum;\n gatewayId?: string;\n metaData?: Metadata;\n comment?: string;\n isPaymentLink?: boolean;\n refundedAmount?: number;\n proofFileId?: string;\n}\n\nexport interface IOrderTransaction extends ITransactionBase {\n type: typeof TransactionTypeEnum.ORDER;\n}\n\nexport interface IRefundTransaction extends ITransactionBase {\n type: typeof TransactionTypeEnum.REFUND;\n originalTransaction?: ITransactionBase;\n}\n"],"mappings":"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","names":[]}
|
package/package.json
CHANGED