@fas-core/shared-types 1.0.29 → 1.0.31

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 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;
@@ -100,6 +39,11 @@ interface SoftDeleteFilter {
100
39
  }
101
40
 
102
41
  type Metadata = Record<string, unknown>;
42
+ interface IKeyValue {
43
+ key: string;
44
+ label?: string;
45
+ value: unknown;
46
+ }
103
47
  interface ISEOMetaData {
104
48
  title: string;
105
49
  description: string;
@@ -182,23 +126,6 @@ interface IStore extends BaseEntity {
182
126
  storeAdmins: Array<string | Types.ObjectId>;
183
127
  }
184
128
 
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
129
  declare const DiscountTypeEnum: {
203
130
  readonly PERCENTAGE: "PERCENTAGE";
204
131
  readonly FIXED: "FIXED";
@@ -220,11 +147,12 @@ interface ICoupon extends BaseEntity {
220
147
  stores: IStore[];
221
148
  }
222
149
 
223
- interface IVariant extends BaseEntity {
150
+ interface IBrand extends BaseEntity {
224
151
  name: string;
225
- sku: string;
226
152
  slug: string;
227
- product: IProduct;
153
+ description: string;
154
+ logo: string;
155
+ store: IStore;
228
156
  status: boolean;
229
157
  metaData: Metadata;
230
158
  seoMetaData: ISEOMetaData;
@@ -243,22 +171,11 @@ interface ICategory extends BaseEntity {
243
171
  subCategories?: ICategory[];
244
172
  }
245
173
 
246
- interface IBrand extends BaseEntity {
247
- name: string;
248
- slug: string;
249
- description: string;
250
- logo: string;
251
- store: IStore;
252
- status: boolean;
253
- metaData: Metadata;
254
- seoMetaData: ISEOMetaData;
255
- }
256
-
257
174
  type StockStatus = "IN_STOCK" | "LOW_STOCK" | "OUT_OF_STOCK";
258
175
  interface IStock extends BaseEntity {
259
176
  sku: string;
260
177
  product: IProduct;
261
- variant: IVariant | null;
178
+ variant?: IVariant | null;
262
179
  store: IStore;
263
180
  quantity: number;
264
181
  reserved: number;
@@ -267,17 +184,13 @@ interface IStock extends BaseEntity {
267
184
  lowStockThreshold: number;
268
185
  }
269
186
 
270
- interface IProduct extends BaseEntity {
271
- name: string;
272
- slug: string;
273
- sku: string;
187
+ interface IProductVariantFields {
274
188
  description: string;
275
189
  price: IPrice;
276
190
  quantity: number;
277
191
  brand: IBrand;
278
192
  store: IStore;
279
193
  stock: IStock;
280
- variants: IVariant[];
281
194
  category: ICategory;
282
195
  categories: ICategory[];
283
196
  images: string[];
@@ -297,6 +210,23 @@ interface IProduct extends BaseEntity {
297
210
  status: boolean;
298
211
  }
299
212
 
213
+ interface IVariant extends BaseEntity, IProductVariantFields {
214
+ name: string;
215
+ sku: string;
216
+ slug: string;
217
+ product: IProduct;
218
+ variantAttributes: IKeyValue[];
219
+ }
220
+
221
+ interface IProduct extends BaseEntity, IProductVariantFields {
222
+ name: string;
223
+ slug: string;
224
+ sku: string;
225
+ hasVariants: boolean;
226
+ variantOptions: IKeyValue[];
227
+ variants: IVariant[];
228
+ }
229
+
300
230
  interface IOrderItem extends BaseEntity {
301
231
  order: IOrder;
302
232
  product: IProduct;
@@ -388,7 +318,7 @@ declare const statusColors: Record<OrderStatusEnum, string>;
388
318
  interface IOrder extends BaseEntity {
389
319
  orderId: string;
390
320
  orderItems: IOrderItem[];
391
- user: ICustomer;
321
+ customer: ICustomer;
392
322
  coupon: ICoupon;
393
323
  store: IStore;
394
324
  status: OrderStatusEnum;
@@ -402,6 +332,85 @@ interface IOrder extends BaseEntity {
402
332
  refundTransactions: IRefundTransaction[];
403
333
  }
404
334
 
335
+ interface ICustomer extends BaseEntity {
336
+ firstName: string;
337
+ lastName: string;
338
+ profileImage: string;
339
+ address: IAddress;
340
+ email: string;
341
+ phoneNumber: string;
342
+ password?: string;
343
+ status: boolean;
344
+ lastLogin: Date;
345
+ authProvider: "credentials" | "google" | "apple" | "facebook" | string | null;
346
+ googleId: string;
347
+ emailVerified?: boolean;
348
+ hasPassword: boolean;
349
+ allowedStores: Array<string | Types.ObjectId>;
350
+ orders: IOrder[];
351
+ isStoreAdmin: boolean;
352
+ }
353
+
354
+ interface IState extends BaseEntity {
355
+ country: ICountry;
356
+ name: string;
357
+ slug: string;
358
+ isoCode: string;
359
+ subdivision: string;
360
+ status: boolean;
361
+ }
362
+
363
+ interface IAddress extends BaseEntity {
364
+ addressLine1: string;
365
+ addressLine2: string;
366
+ city: string;
367
+ zipCode: string;
368
+ firstName: string;
369
+ lastName: string;
370
+ email: string;
371
+ phoneNumber: string;
372
+ defaultAddress: boolean;
373
+ state: IState;
374
+ country: ICountry;
375
+ customer: ICustomer;
376
+ }
377
+
378
+ type IAdminRoleType = 'Admin' | 'Super Admin' | 'Cashier' | 'Manager' | 'CEO' | 'Driver' | 'Security Guard' | 'Accountant';
379
+ declare const ADMIN_ROLES: IAdminRoleType[];
380
+ interface IAdmin extends BaseEntity {
381
+ firstName: string;
382
+ lastName: string;
383
+ email: string;
384
+ phoneNumber: string;
385
+ status: boolean;
386
+ password: string;
387
+ role: IAdminRoleType;
388
+ access_list: string[];
389
+ joiningDate: Date;
390
+ profileImage: string;
391
+ lastLogin: Date;
392
+ }
393
+ type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;
394
+ type IAdminUpdate = Partial<IAdminCreate>;
395
+ type IAdminSafe = Omit<IAdmin, 'password'>;
396
+
397
+ interface IContact extends BaseEntity {
398
+ firstName: string;
399
+ lastName: string;
400
+ companyName?: string;
401
+ email: string;
402
+ phone: string;
403
+ category: "sales" | "support" | "orders" | "returns" | "parts" | "other";
404
+ subject: string;
405
+ message: string;
406
+ status: 'new' | 'in-progress' | 'resolved' | 'closed';
407
+ source: 'website' | 'email' | 'phone' | 'chat' | 'other';
408
+ caseId: string;
409
+ notes: string;
410
+ store: IStore;
411
+ resolvedAt?: Date;
412
+ }
413
+
405
414
  interface ICartItem extends BaseEntity {
406
415
  cart: ICart;
407
416
  product: IProduct;
@@ -427,4 +436,4 @@ interface ICart extends BaseEntity {
427
436
  totalAmount: number;
428
437
  }
429
438
 
430
- export { ADMIN_ROLES, type ApiResponse, type BaseEntity, DiscountTypeEnum, type IAddress, type IAdmin, type IAdminCreate, type IAdminRoleType, type IAdminSafe, type IAdminUpdate, type IBrand, type ICart, type ICartItem, type ICategory, type ICompliance, type IContact, type IContent, type ICountry, type ICoupon, type ICurrency, type ICustomer, type IDiscountType, type IDocumentation, type IOrder, type IOrderItem, type IOrderTransaction, type IPrice, type IProduct, type IRefundTransaction, type IRelationships, type ISEOMetaData, type IShipping, type IState, type IStock, type IStore, type IStoreSettings, type ITechSpec, type ITransactionBase, type IVariant, type Metadata, ORDER_STATUS_VALUES, OrderStatusEnum, PAYMENT_METHOD_VALUES, PAYMENT_STATUS_VALUES, type Paginated, PaymentMethodEnum, PaymentStatusEnum, type SoftDeleteFilter, type StockStatus, TRANSACTION_TYPE_VALUES, TransactionTypeEnum, paymentMethodColorMap, paymentStatusColorMap, statusColors, typeColorMap };
439
+ export { ADMIN_ROLES, type ApiResponse, type BaseEntity, DiscountTypeEnum, type IAddress, type IAdmin, type IAdminCreate, type IAdminRoleType, type IAdminSafe, type IAdminUpdate, type IBrand, type ICart, type ICartItem, type ICategory, type ICompliance, type IContact, type IContent, type ICountry, type ICoupon, type ICurrency, type ICustomer, type IDiscountType, type IDocumentation, type IKeyValue, type IOrder, type IOrderItem, type IOrderTransaction, type IPrice, type IProduct, type IProductVariantFields, type IRefundTransaction, type IRelationships, type ISEOMetaData, type IShipping, type IState, type IStock, type IStore, type IStoreSettings, type ITechSpec, type ITransactionBase, type IVariant, type Metadata, ORDER_STATUS_VALUES, OrderStatusEnum, PAYMENT_METHOD_VALUES, PAYMENT_STATUS_VALUES, type Paginated, PaymentMethodEnum, PaymentStatusEnum, type SoftDeleteFilter, type StockStatus, TRANSACTION_TYPE_VALUES, TransactionTypeEnum, paymentMethodColorMap, paymentStatusColorMap, statusColors, typeColorMap };
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;
@@ -100,6 +39,11 @@ interface SoftDeleteFilter {
100
39
  }
101
40
 
102
41
  type Metadata = Record<string, unknown>;
42
+ interface IKeyValue {
43
+ key: string;
44
+ label?: string;
45
+ value: unknown;
46
+ }
103
47
  interface ISEOMetaData {
104
48
  title: string;
105
49
  description: string;
@@ -182,23 +126,6 @@ interface IStore extends BaseEntity {
182
126
  storeAdmins: Array<string | Types.ObjectId>;
183
127
  }
184
128
 
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
129
  declare const DiscountTypeEnum: {
203
130
  readonly PERCENTAGE: "PERCENTAGE";
204
131
  readonly FIXED: "FIXED";
@@ -220,11 +147,12 @@ interface ICoupon extends BaseEntity {
220
147
  stores: IStore[];
221
148
  }
222
149
 
223
- interface IVariant extends BaseEntity {
150
+ interface IBrand extends BaseEntity {
224
151
  name: string;
225
- sku: string;
226
152
  slug: string;
227
- product: IProduct;
153
+ description: string;
154
+ logo: string;
155
+ store: IStore;
228
156
  status: boolean;
229
157
  metaData: Metadata;
230
158
  seoMetaData: ISEOMetaData;
@@ -243,22 +171,11 @@ interface ICategory extends BaseEntity {
243
171
  subCategories?: ICategory[];
244
172
  }
245
173
 
246
- interface IBrand extends BaseEntity {
247
- name: string;
248
- slug: string;
249
- description: string;
250
- logo: string;
251
- store: IStore;
252
- status: boolean;
253
- metaData: Metadata;
254
- seoMetaData: ISEOMetaData;
255
- }
256
-
257
174
  type StockStatus = "IN_STOCK" | "LOW_STOCK" | "OUT_OF_STOCK";
258
175
  interface IStock extends BaseEntity {
259
176
  sku: string;
260
177
  product: IProduct;
261
- variant: IVariant | null;
178
+ variant?: IVariant | null;
262
179
  store: IStore;
263
180
  quantity: number;
264
181
  reserved: number;
@@ -267,17 +184,13 @@ interface IStock extends BaseEntity {
267
184
  lowStockThreshold: number;
268
185
  }
269
186
 
270
- interface IProduct extends BaseEntity {
271
- name: string;
272
- slug: string;
273
- sku: string;
187
+ interface IProductVariantFields {
274
188
  description: string;
275
189
  price: IPrice;
276
190
  quantity: number;
277
191
  brand: IBrand;
278
192
  store: IStore;
279
193
  stock: IStock;
280
- variants: IVariant[];
281
194
  category: ICategory;
282
195
  categories: ICategory[];
283
196
  images: string[];
@@ -297,6 +210,23 @@ interface IProduct extends BaseEntity {
297
210
  status: boolean;
298
211
  }
299
212
 
213
+ interface IVariant extends BaseEntity, IProductVariantFields {
214
+ name: string;
215
+ sku: string;
216
+ slug: string;
217
+ product: IProduct;
218
+ variantAttributes: IKeyValue[];
219
+ }
220
+
221
+ interface IProduct extends BaseEntity, IProductVariantFields {
222
+ name: string;
223
+ slug: string;
224
+ sku: string;
225
+ hasVariants: boolean;
226
+ variantOptions: IKeyValue[];
227
+ variants: IVariant[];
228
+ }
229
+
300
230
  interface IOrderItem extends BaseEntity {
301
231
  order: IOrder;
302
232
  product: IProduct;
@@ -388,7 +318,7 @@ declare const statusColors: Record<OrderStatusEnum, string>;
388
318
  interface IOrder extends BaseEntity {
389
319
  orderId: string;
390
320
  orderItems: IOrderItem[];
391
- user: ICustomer;
321
+ customer: ICustomer;
392
322
  coupon: ICoupon;
393
323
  store: IStore;
394
324
  status: OrderStatusEnum;
@@ -402,6 +332,85 @@ interface IOrder extends BaseEntity {
402
332
  refundTransactions: IRefundTransaction[];
403
333
  }
404
334
 
335
+ interface ICustomer extends BaseEntity {
336
+ firstName: string;
337
+ lastName: string;
338
+ profileImage: string;
339
+ address: IAddress;
340
+ email: string;
341
+ phoneNumber: string;
342
+ password?: string;
343
+ status: boolean;
344
+ lastLogin: Date;
345
+ authProvider: "credentials" | "google" | "apple" | "facebook" | string | null;
346
+ googleId: string;
347
+ emailVerified?: boolean;
348
+ hasPassword: boolean;
349
+ allowedStores: Array<string | Types.ObjectId>;
350
+ orders: IOrder[];
351
+ isStoreAdmin: boolean;
352
+ }
353
+
354
+ interface IState extends BaseEntity {
355
+ country: ICountry;
356
+ name: string;
357
+ slug: string;
358
+ isoCode: string;
359
+ subdivision: string;
360
+ status: boolean;
361
+ }
362
+
363
+ interface IAddress extends BaseEntity {
364
+ addressLine1: string;
365
+ addressLine2: string;
366
+ city: string;
367
+ zipCode: string;
368
+ firstName: string;
369
+ lastName: string;
370
+ email: string;
371
+ phoneNumber: string;
372
+ defaultAddress: boolean;
373
+ state: IState;
374
+ country: ICountry;
375
+ customer: ICustomer;
376
+ }
377
+
378
+ type IAdminRoleType = 'Admin' | 'Super Admin' | 'Cashier' | 'Manager' | 'CEO' | 'Driver' | 'Security Guard' | 'Accountant';
379
+ declare const ADMIN_ROLES: IAdminRoleType[];
380
+ interface IAdmin extends BaseEntity {
381
+ firstName: string;
382
+ lastName: string;
383
+ email: string;
384
+ phoneNumber: string;
385
+ status: boolean;
386
+ password: string;
387
+ role: IAdminRoleType;
388
+ access_list: string[];
389
+ joiningDate: Date;
390
+ profileImage: string;
391
+ lastLogin: Date;
392
+ }
393
+ type IAdminCreate = Omit<IAdmin, keyof BaseEntity>;
394
+ type IAdminUpdate = Partial<IAdminCreate>;
395
+ type IAdminSafe = Omit<IAdmin, 'password'>;
396
+
397
+ interface IContact extends BaseEntity {
398
+ firstName: string;
399
+ lastName: string;
400
+ companyName?: string;
401
+ email: string;
402
+ phone: string;
403
+ category: "sales" | "support" | "orders" | "returns" | "parts" | "other";
404
+ subject: string;
405
+ message: string;
406
+ status: 'new' | 'in-progress' | 'resolved' | 'closed';
407
+ source: 'website' | 'email' | 'phone' | 'chat' | 'other';
408
+ caseId: string;
409
+ notes: string;
410
+ store: IStore;
411
+ resolvedAt?: Date;
412
+ }
413
+
405
414
  interface ICartItem extends BaseEntity {
406
415
  cart: ICart;
407
416
  product: IProduct;
@@ -427,4 +436,4 @@ interface ICart extends BaseEntity {
427
436
  totalAmount: number;
428
437
  }
429
438
 
430
- export { ADMIN_ROLES, type ApiResponse, type BaseEntity, DiscountTypeEnum, type IAddress, type IAdmin, type IAdminCreate, type IAdminRoleType, type IAdminSafe, type IAdminUpdate, type IBrand, type ICart, type ICartItem, type ICategory, type ICompliance, type IContact, type IContent, type ICountry, type ICoupon, type ICurrency, type ICustomer, type IDiscountType, type IDocumentation, type IOrder, type IOrderItem, type IOrderTransaction, type IPrice, type IProduct, type IRefundTransaction, type IRelationships, type ISEOMetaData, type IShipping, type IState, type IStock, type IStore, type IStoreSettings, type ITechSpec, type ITransactionBase, type IVariant, type Metadata, ORDER_STATUS_VALUES, OrderStatusEnum, PAYMENT_METHOD_VALUES, PAYMENT_STATUS_VALUES, type Paginated, PaymentMethodEnum, PaymentStatusEnum, type SoftDeleteFilter, type StockStatus, TRANSACTION_TYPE_VALUES, TransactionTypeEnum, paymentMethodColorMap, paymentStatusColorMap, statusColors, typeColorMap };
439
+ export { ADMIN_ROLES, type ApiResponse, type BaseEntity, DiscountTypeEnum, type IAddress, type IAdmin, type IAdminCreate, type IAdminRoleType, type IAdminSafe, type IAdminUpdate, type IBrand, type ICart, type ICartItem, type ICategory, type ICompliance, type IContact, type IContent, type ICountry, type ICoupon, type ICurrency, type ICustomer, type IDiscountType, type IDocumentation, type IKeyValue, type IOrder, type IOrderItem, type IOrderTransaction, type IPrice, type IProduct, type IProductVariantFields, type IRefundTransaction, type IRelationships, type ISEOMetaData, type IShipping, type IState, type IStock, type IStore, type IStoreSettings, type ITechSpec, type ITransactionBase, type IVariant, type Metadata, ORDER_STATUS_VALUES, OrderStatusEnum, PAYMENT_METHOD_VALUES, PAYMENT_STATUS_VALUES, type Paginated, PaymentMethodEnum, PaymentStatusEnum, type SoftDeleteFilter, type StockStatus, TRANSACTION_TYPE_VALUES, TransactionTypeEnum, paymentMethodColorMap, paymentStatusColorMap, statusColors, typeColorMap };
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 user: 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}","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,YAA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AC,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":[]}
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 './productVariant';\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;AA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,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":[]}
@@ -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 user: 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}","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":";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;;;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,g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AW,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":[]}
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":";AAYO,IAAM,cAAgC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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AAM,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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fas-core/shared-types",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "description": "FAS Core Shared Types - A collection of shared TypeScript types for the FAS Core SDK.",
5
5
  "author": "ibreakloops",
6
6
  "license": "UNLICENSED",