@fas-core/shared-types 1.0.17 → 1.0.18

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
@@ -227,4 +227,29 @@ interface IOrder extends BaseEntity {
227
227
  metaData: Metadata;
228
228
  }
229
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 };
230
+ interface ICartItem extends BaseEntity {
231
+ cart: ICart;
232
+ product: IProduct;
233
+ variant?: IVariant;
234
+ pricing: {
235
+ unitPrice: number;
236
+ totalAmount: number;
237
+ };
238
+ quantity: number;
239
+ totalAmount: number;
240
+ metaData: Metadata;
241
+ }
242
+
243
+ interface ICart extends BaseEntity {
244
+ cartId: string;
245
+ cartItems: ICartItem[];
246
+ user?: ICustomer;
247
+ coupon?: ICoupon;
248
+ store: IStore;
249
+ metaData: Metadata;
250
+ subTotalAmount: number;
251
+ discountAmount: number;
252
+ totalAmount: number;
253
+ }
254
+
255
+ export { ADMIN_ROLES, type ApiResponse, type BaseEntity, DiscountTypeEnum, type IAddress, type IAdmin, type IAdminCreate, type IAdminRoleType, type IAdminSafe, type IAdminUpdate, type ICart, type ICartItem, 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
@@ -227,4 +227,29 @@ interface IOrder extends BaseEntity {
227
227
  metaData: Metadata;
228
228
  }
229
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 };
230
+ interface ICartItem extends BaseEntity {
231
+ cart: ICart;
232
+ product: IProduct;
233
+ variant?: IVariant;
234
+ pricing: {
235
+ unitPrice: number;
236
+ totalAmount: number;
237
+ };
238
+ quantity: number;
239
+ totalAmount: number;
240
+ metaData: Metadata;
241
+ }
242
+
243
+ interface ICart extends BaseEntity {
244
+ cartId: string;
245
+ cartItems: ICartItem[];
246
+ user?: ICustomer;
247
+ coupon?: ICoupon;
248
+ store: IStore;
249
+ metaData: Metadata;
250
+ subTotalAmount: number;
251
+ discountAmount: number;
252
+ totalAmount: number;
253
+ }
254
+
255
+ export { ADMIN_ROLES, type ApiResponse, type BaseEntity, DiscountTypeEnum, type IAddress, type IAdmin, type IAdminCreate, type IAdminRoleType, type IAdminSafe, type IAdminUpdate, type ICart, type ICartItem, 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.map CHANGED
@@ -1 +1 @@
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":[]}
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';\nexport * from './cart';\nexport * from './cartItem';","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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fas-core/shared-types",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
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",