@managesome/eposmatic-toolkit 0.2.363 → 0.2.365

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.
Files changed (86) hide show
  1. package/lib/constants/ENUMS.d.ts +221 -0
  2. package/lib/constants/ENUMS.js +270 -4
  3. package/lib/constants/PURCHASE_ORDER.js +12 -3
  4. package/lib/helpers/store/common-purchase-order-actions.d.ts +2 -2
  5. package/lib/helpers/store/purchase-orders-cart-actions.d.ts +7 -6
  6. package/lib/helpers/utils/common.d.ts +1 -0
  7. package/lib/helpers/utils/common.js +14 -1
  8. package/lib/helpers/utils/items-comparison-report-helpers.js +5 -7
  9. package/lib/schemas/models/index.d.ts +11 -0
  10. package/lib/schemas/models/index.js +11 -0
  11. package/lib/schemas/models/internal_movements.d.ts +357 -0
  12. package/lib/schemas/models/internal_movements.js +323 -0
  13. package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +154 -0
  14. package/lib/schemas/models/inventory_lot_serial_numbers.js +193 -0
  15. package/lib/schemas/models/item_transactions.d.ts +3 -3
  16. package/lib/schemas/models/purchase_order_receipts.d.ts +165 -0
  17. package/lib/schemas/models/purchase_order_receipts.js +151 -0
  18. package/lib/schemas/models/purchase_order_rfq.d.ts +1938 -0
  19. package/lib/schemas/models/purchase_order_rfq.js +309 -0
  20. package/lib/schemas/models/purchase_order_vendor_returns.d.ts +234 -0
  21. package/lib/schemas/models/purchase_order_vendor_returns.js +188 -0
  22. package/lib/schemas/models/purchase_orders.d.ts +6 -3
  23. package/lib/schemas/models/purchase_orders.js +10 -1
  24. package/lib/schemas/models/rewards_usage.d.ts +3 -3
  25. package/lib/schemas/models/rider.d.ts +3 -3
  26. package/lib/schemas/models/sale_order_deliveries.d.ts +167 -0
  27. package/lib/schemas/models/sale_order_deliveries.js +155 -0
  28. package/lib/schemas/models/sale_order_invoices.d.ts +218 -0
  29. package/lib/schemas/models/sale_order_invoices.js +192 -0
  30. package/lib/schemas/models/sale_order_rfq.d.ts +1938 -0
  31. package/lib/schemas/models/sale_order_rfq.js +309 -0
  32. package/lib/schemas/models/sale_orders.d.ts +1943 -0
  33. package/lib/schemas/models/sale_orders.js +324 -0
  34. package/lib/schemas/models/void_purchase_order_items.d.ts +3 -3
  35. package/lib/schemas/models/void_purchase_order_items.js +2 -1
  36. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +9 -9
  37. package/lib/schemas/models/warehouse-activity-logs.d.ts +127 -0
  38. package/lib/schemas/models/warehouse-activity-logs.js +143 -0
  39. package/lib/schemas/models/warehouse-communications.d.ts +228 -0
  40. package/lib/schemas/models/warehouse-communications.js +216 -0
  41. package/lib/schemas/models/warehouse.d.ts +7 -1
  42. package/lib/schemas/models/warehouse.js +9 -0
  43. package/lib/schemas/models/warehouse_categories.d.ts +4 -0
  44. package/lib/schemas/models/warehouse_categories.js +6 -0
  45. package/lib/schemas/models/warehouse_clients.d.ts +6 -0
  46. package/lib/schemas/models/warehouse_clients.js +8 -0
  47. package/lib/schemas/models/warehouse_inventory_transactions.d.ts +3 -3
  48. package/lib/schemas/models/warehouse_invoices.d.ts +3 -3
  49. package/lib/schemas/models/warehouse_item_transactions.d.ts +6 -6
  50. package/lib/schemas/models/warehouse_items.d.ts +28 -9
  51. package/lib/schemas/models/warehouse_items.js +29 -0
  52. package/lib/schemas/models/warehouse_vendors.d.ts +3 -3
  53. package/lib/schemas/types/index.d.ts +13 -0
  54. package/lib/schemas/types/index.js +13 -0
  55. package/lib/schemas/types/internal_movements.d.ts +73 -0
  56. package/lib/schemas/types/internal_movements.js +2 -0
  57. package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +85 -0
  58. package/lib/schemas/types/inventory_lot_serial_numbers.js +4 -0
  59. package/lib/schemas/types/purchase_order_common.d.ts +39 -0
  60. package/lib/schemas/types/purchase_order_common.js +2 -0
  61. package/lib/schemas/types/purchase_order_receipts.d.ts +39 -0
  62. package/lib/schemas/types/purchase_order_receipts.js +21 -0
  63. package/lib/schemas/types/purchase_order_rfq.d.ts +25 -0
  64. package/lib/schemas/types/purchase_order_rfq.js +2 -0
  65. package/lib/schemas/types/purchase_order_vendor_returns.d.ts +49 -0
  66. package/lib/schemas/types/purchase_order_vendor_returns.js +42 -0
  67. package/lib/schemas/types/purchase_orders.d.ts +7 -43
  68. package/lib/schemas/types/sale_order_common.d.ts +39 -0
  69. package/lib/schemas/types/sale_order_common.js +2 -0
  70. package/lib/schemas/types/sale_order_deliveries.d.ts +67 -0
  71. package/lib/schemas/types/sale_order_deliveries.js +2 -0
  72. package/lib/schemas/types/sale_order_invoices.d.ts +46 -0
  73. package/lib/schemas/types/sale_order_invoices.js +2 -0
  74. package/lib/schemas/types/sale_order_rfq.d.ts +25 -0
  75. package/lib/schemas/types/sale_order_rfq.js +2 -0
  76. package/lib/schemas/types/sale_orders.d.ts +30 -0
  77. package/lib/schemas/types/sale_orders.js +2 -0
  78. package/lib/schemas/types/warehouse-activity-logs.d.ts +35 -0
  79. package/lib/schemas/types/warehouse-activity-logs.js +4 -0
  80. package/lib/schemas/types/warehouse-communications.d.ts +53 -0
  81. package/lib/schemas/types/warehouse-communications.js +2 -0
  82. package/lib/schemas/types/warehouse.d.ts +3 -1
  83. package/lib/schemas/types/warehouse_categories.d.ts +2 -0
  84. package/lib/schemas/types/warehouse_clients.d.ts +2 -0
  85. package/lib/schemas/types/warehouse_items.d.ts +7 -1
  86. package/package.json +1 -1
@@ -1,55 +1,19 @@
1
1
  import { PURCHASE_ORDER_STATUS_ENUM } from '../../constants';
2
- import { IOrderPayment, IStaffDetails } from './order';
3
- export interface IPurchaseOrderItem {
4
- _id: string;
5
- item_id: string;
6
- is_ready?: boolean;
7
- void_reason?: string;
8
- name: string;
9
- price: number;
10
- subtotal: number;
11
- quantity: number;
12
- _net_amount: number;
13
- _gross_amount: number;
14
- _gst_amount: number;
15
- _discount_amount: number;
16
- special_instructions: string;
17
- }
18
- export interface IPurchaseOrderCategory {
19
- name: string;
20
- category_id: string;
21
- items: IPurchaseOrderItem[];
22
- }
23
- export interface IPurchaseOrderIteration {
24
- categories: IPurchaseOrderCategory[];
2
+ import { IOrderPayment } from './order';
3
+ import { IPurchaseOrderCommonCategoryByCategoryId, IPurchaseOrderCommonItem, IPurchaseOrderCommonIterationBase } from './purchase_order_common';
4
+ export type IPurchaseOrderItem = IPurchaseOrderCommonItem;
5
+ export type IPurchaseOrderCategory = IPurchaseOrderCommonCategoryByCategoryId;
6
+ export interface IPurchaseOrderIteration extends IPurchaseOrderCommonIterationBase<IPurchaseOrderCategory, PURCHASE_ORDER_STATUS_ENUM> {
25
7
  payments: IOrderPayment[];
26
- staff_details: IStaffDetails;
27
- is_gst_inclusive?: boolean;
28
- gst?: number;
29
- gst_amount?: number;
30
- special_instructions: string;
31
- order_status: PURCHASE_ORDER_STATUS_ENUM;
32
- /**
33
- * price is the total price of the all items in the order
34
- * without any discounts
35
- */
36
- price: number;
37
- /**
38
- * amount_earned is the total amount amount_earned by the store
39
- */
40
- amount_earned: number;
41
- /**
42
- * grand_total is the final amount of the order including all taxes and discounts
43
- */
44
- grand_total: number;
45
8
  tax_number: string;
46
- updatedAt: Date;
47
9
  }
48
10
  export interface IPurchaseOrder extends IPurchaseOrderIteration {
49
11
  _id: string;
50
12
  warehouse_id: string;
51
13
  vendor_id: string;
52
14
  vendor_name: string;
15
+ /** Source RFQ reference when this PO is converted from an RFQ. */
16
+ rfq_id?: string | null;
53
17
  iterations: IPurchaseOrderIteration[];
54
18
  /**
55
19
  * amount_collected is the total amount collected from the consumer
@@ -0,0 +1,39 @@
1
+ import { IStaffDetails } from './order';
2
+ export interface ISaleOrderCommonItem {
3
+ _id: string;
4
+ item_id: string;
5
+ is_ready?: boolean;
6
+ void_reason?: string | null;
7
+ name: string;
8
+ price: number;
9
+ subtotal: number;
10
+ quantity: number;
11
+ _net_amount: number;
12
+ _gross_amount: number;
13
+ _gst_amount: number;
14
+ _discount_amount: number;
15
+ special_instructions: string;
16
+ }
17
+ export interface ISaleOrderCommonCategoryByCategoryId {
18
+ name: string;
19
+ category_id: string;
20
+ items: ISaleOrderCommonItem[];
21
+ }
22
+ export interface ISaleOrderCommonCategoryById {
23
+ _id: string;
24
+ name: string;
25
+ items: ISaleOrderCommonItem[];
26
+ }
27
+ export interface ISaleOrderCommonIterationBase<TCategory, TStatus> {
28
+ categories: TCategory[];
29
+ staff_details: IStaffDetails;
30
+ is_gst_inclusive?: boolean;
31
+ gst?: number | null;
32
+ gst_amount?: number | null;
33
+ special_instructions: string;
34
+ price: number;
35
+ amount_earned: number;
36
+ grand_total: number;
37
+ order_status: TStatus;
38
+ updatedAt: Date;
39
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,67 @@
1
+ import { SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM, SALE_ORDER_DELIVERY_STATUS_ENUM, SALE_ORDER_PHYSICAL_DOC_KIND_ENUM } from '../../constants';
2
+ export interface ISaleOrderPhysicalItems {
3
+ item_id: string;
4
+ item_name: string;
5
+ quantity: number;
6
+ reason?: string | null;
7
+ }
8
+ export type ISaleOrderDeliveryItems = ISaleOrderPhysicalItems;
9
+ export type ISaleOrderDeliveryReturnItems = ISaleOrderPhysicalItems;
10
+ export interface ISaleOrderDeliveryActor {
11
+ _id: string;
12
+ name: string;
13
+ }
14
+ export interface ISaleOrderDelivery {
15
+ _id: string;
16
+ doc_kind: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM;
17
+ warehouse_id: string;
18
+ sale_order_id: string;
19
+ applied_to_doc_id?: string | null;
20
+ items: ISaleOrderDeliveryItems[];
21
+ status: SALE_ORDER_DELIVERY_STATUS_ENUM | SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
22
+ notes?: string | null;
23
+ inventory_consumed?: boolean;
24
+ inventory_restocked?: boolean;
25
+ created_by?: ISaleOrderDeliveryActor | null;
26
+ delivered_by?: ISaleOrderDeliveryActor | null;
27
+ returned_by?: ISaleOrderDeliveryActor | null;
28
+ cancelled_by?: ISaleOrderDeliveryActor | null;
29
+ delivered_at?: Date | null;
30
+ returned_at?: Date | null;
31
+ cancelled_at?: Date | null;
32
+ cancel_reason?: string | null;
33
+ createdAt_mins: number;
34
+ createdAt: Date;
35
+ updatedAt: Date;
36
+ }
37
+ export interface ISaleOrderDeliveryDocument extends ISaleOrderDelivery {
38
+ doc_kind: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY;
39
+ status: SALE_ORDER_DELIVERY_STATUS_ENUM;
40
+ applied_to_doc_id?: null;
41
+ }
42
+ export interface ISaleOrderDeliveryReturnDocument extends ISaleOrderDelivery {
43
+ doc_kind: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY_RETURN;
44
+ applied_to_doc_id: string;
45
+ status: SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
46
+ }
47
+ interface ICreateSaleOrderPhysicalDocBodyBase {
48
+ item_id: string;
49
+ quantity: number;
50
+ reason?: string | null;
51
+ }
52
+ interface ICreateSaleOrderPhysicalDocBase {
53
+ items: ICreateSaleOrderPhysicalDocBodyBase[];
54
+ notes?: string;
55
+ sale_order_updatedAt?: Date | string;
56
+ }
57
+ export interface ICreateSaleOrderDeliveryBody extends ICreateSaleOrderPhysicalDocBase {
58
+ doc_kind?: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY;
59
+ status?: SALE_ORDER_DELIVERY_STATUS_ENUM;
60
+ }
61
+ export interface ICreateSaleOrderDeliveryReturnBody extends ICreateSaleOrderPhysicalDocBase {
62
+ doc_kind: SALE_ORDER_PHYSICAL_DOC_KIND_ENUM.DELIVERY_RETURN;
63
+ applied_to_doc_id: string;
64
+ status: SALE_ORDER_DELIVERY_RETURN_STATUS_ENUM;
65
+ }
66
+ export type ICreateSaleOrderPhysicalDocBody = ICreateSaleOrderDeliveryBody | ICreateSaleOrderDeliveryReturnBody;
67
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,46 @@
1
+ import { SALE_ORDER_CREDIT_NOTE_STATUS_ENUM, SALE_ORDER_FIN_DOC_KIND_ENUM, SALE_ORDER_INVOICE_PAYMENT_STATUS_ENUM, SALE_ORDER_INVOICE_TYPE_ENUM } from '../../constants';
2
+ import { IOrderPayment } from './order';
3
+ export type ISaleOrderFinancialDocStatus = SALE_ORDER_INVOICE_PAYMENT_STATUS_ENUM | SALE_ORDER_CREDIT_NOTE_STATUS_ENUM;
4
+ export interface ISaleOrderFinancialLine {
5
+ item_id: string;
6
+ item_name: string;
7
+ quantity: number;
8
+ unit_price: number;
9
+ reason?: string | null;
10
+ }
11
+ export interface ISaleOrderFinancialDocActor {
12
+ _id: string;
13
+ name: string;
14
+ }
15
+ export type ISaleOrderInvoicePaymentRecord = IOrderPayment;
16
+ export interface ISaleOrderInvoice {
17
+ _id: string;
18
+ doc_kind: SALE_ORDER_FIN_DOC_KIND_ENUM;
19
+ warehouse_id: string;
20
+ sale_order_id: string;
21
+ doc_number: number;
22
+ applied_to_doc_id?: string | null;
23
+ items: ISaleOrderFinancialLine[];
24
+ amount: number;
25
+ notes?: string | null;
26
+ status: ISaleOrderFinancialDocStatus;
27
+ invoice_type: SALE_ORDER_INVOICE_TYPE_ENUM;
28
+ amount_paid?: number;
29
+ down_payment_value?: number;
30
+ payments?: ISaleOrderInvoicePaymentRecord[];
31
+ created_by?: ISaleOrderFinancialDocActor | null;
32
+ posted_by?: ISaleOrderFinancialDocActor | null;
33
+ confirmed_by?: ISaleOrderFinancialDocActor | null;
34
+ refund_pending_by?: ISaleOrderFinancialDocActor | null;
35
+ refunded_by?: ISaleOrderFinancialDocActor | null;
36
+ cancelled_by?: ISaleOrderFinancialDocActor | null;
37
+ posted_at?: Date | null;
38
+ confirmed_at?: Date | null;
39
+ refund_pending_at?: Date | null;
40
+ refunded_at?: Date | null;
41
+ cancelled_at?: Date | null;
42
+ cancel_reason?: string | null;
43
+ createdAt_mins: number;
44
+ createdAt: Date;
45
+ updatedAt: Date;
46
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ import { SALE_ORDER_RFQ_STATUS_ENUM } from '../../constants';
2
+ import { ISaleOrderCommonCategoryByCategoryId, ISaleOrderCommonItem, ISaleOrderCommonIterationBase } from './sale_order_common';
3
+ export type ISaleOrderRFQItem = ISaleOrderCommonItem;
4
+ export type ISaleOrderRFQCategory = ISaleOrderCommonCategoryByCategoryId;
5
+ export interface ISaleOrderRFQIteration extends ISaleOrderCommonIterationBase<ISaleOrderRFQCategory, SALE_ORDER_RFQ_STATUS_ENUM | string> {
6
+ tax_number: string;
7
+ }
8
+ export interface ISaleOrderRFQ extends ISaleOrderRFQIteration {
9
+ _id: string;
10
+ warehouse_id: string;
11
+ client_id: string;
12
+ client_name: string;
13
+ iterations: ISaleOrderRFQIteration[];
14
+ order_number: number | null;
15
+ expected_deadline: string;
16
+ payment_terms: number;
17
+ delete_reason?: string | null;
18
+ cancel_reason?: string | null;
19
+ is_deleted: boolean;
20
+ order_status_updated_at: Date;
21
+ special_instructions: string;
22
+ is_reopened?: boolean;
23
+ createdAt_mins: number;
24
+ createdAt: Date;
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,30 @@
1
+ import { SALES_ORDER_STATUS_ENUM } from '../../constants';
2
+ import { ISaleOrderCommonCategoryByCategoryId, ISaleOrderCommonItem, ISaleOrderCommonIterationBase } from './sale_order_common';
3
+ export type ISaleOrderItem = ISaleOrderCommonItem;
4
+ export type ISaleOrderCategory = ISaleOrderCommonCategoryByCategoryId;
5
+ export interface ISaleOrderIteration extends ISaleOrderCommonIterationBase<ISaleOrderCategory, SALES_ORDER_STATUS_ENUM> {
6
+ tax_number: string;
7
+ }
8
+ export interface ISaleOrder extends ISaleOrderIteration {
9
+ _id: string;
10
+ warehouse_id: string;
11
+ client_id: string;
12
+ client_name: string;
13
+ /** Source RFQ reference when this sales order is confirmed from an RFQ. */
14
+ rfq_id?: string | null;
15
+ iterations: ISaleOrderIteration[];
16
+ /**
17
+ * amount_collected is the total amount collected from the consumer
18
+ */
19
+ amount_collected: number;
20
+ order_number: number | null;
21
+ delete_reason?: string | null;
22
+ cancel_reason?: string | null;
23
+ is_deleted: boolean;
24
+ order_status_updated_at: Date;
25
+ is_reopened?: boolean;
26
+ order_settled_at: Date;
27
+ order_settled_at_mins: number;
28
+ createdAt_mins: number;
29
+ createdAt: Date;
30
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ import { TActivityLogAction, TActivityLogEntityType, TActivityLogSeverity } from '../../constants';
2
+ export type TWarehouseActivityLogEntityType = TActivityLogEntityType;
3
+ export type TWarehouseActivityLogAction = TActivityLogAction;
4
+ export type TWarehouseActivityLogSeverity = TActivityLogSeverity;
5
+ export interface IWarehouseActivityLogActor {
6
+ staff_id?: string | null;
7
+ staff_name?: string | null;
8
+ staff_email?: string | null;
9
+ staff_mobile?: string | null;
10
+ role_id?: string | null;
11
+ role_name?: string | null;
12
+ uid?: string | null;
13
+ }
14
+ export interface IWarehouseActivityLogChange {
15
+ field: string;
16
+ old_value: unknown;
17
+ new_value: unknown;
18
+ }
19
+ export interface IWarehouseActivityLog {
20
+ _id: string;
21
+ warehouse_id: string;
22
+ entity_type: TActivityLogEntityType;
23
+ entity_id: string;
24
+ entity_number?: number | null;
25
+ action: TActivityLogAction;
26
+ title: string;
27
+ description?: string | null;
28
+ severity: TActivityLogSeverity;
29
+ actor?: IWarehouseActivityLogActor | null;
30
+ changes?: IWarehouseActivityLogChange[];
31
+ event_at?: Date | null;
32
+ createdAt: Date;
33
+ updatedAt: Date;
34
+ }
35
+ export declare const WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME = "warehouse_activity_logs";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME = void 0;
4
+ exports.WAREHOUSE_ACTIVITY_LOGS_COLLECTION_NAME = 'warehouse_activity_logs';
@@ -0,0 +1,53 @@
1
+ import { COMMUNICATION_CHANNEL_ENUM, EMAIL_DOCUMENT_KIND_ENUM } from '../../constants';
2
+ export type TWarehouseCommunicationDocumentKind = EMAIL_DOCUMENT_KIND_ENUM;
3
+ export type TWarehouseCommunicationChannel = COMMUNICATION_CHANNEL_ENUM;
4
+ interface IWarehouseCommunicationActionButton {
5
+ title: string;
6
+ url: string;
7
+ button_color: string;
8
+ button_text_color: string;
9
+ icon?: string;
10
+ }
11
+ interface IWarehouseCommunicationLineItem {
12
+ name: string;
13
+ quantity: number;
14
+ price: number;
15
+ subtotal: number;
16
+ currency_symbol?: string;
17
+ }
18
+ export interface IWarehouseCommunicationMetadata {
19
+ warehouse_name: string;
20
+ warehouse_logo_url: string;
21
+ support_email: string;
22
+ counterparty_name: string;
23
+ counterparty_email: string;
24
+ reference_number?: string | null;
25
+ order_number?: number | null;
26
+ issued_date: string;
27
+ expected_deadline?: string | null;
28
+ payment_terms_days?: number | null;
29
+ currency_symbol: string;
30
+ subtotal: number;
31
+ gst?: number | null;
32
+ gst_amount?: number | null;
33
+ is_gst_inclusive?: boolean | null;
34
+ grand_total: number;
35
+ line_items: IWarehouseCommunicationLineItem[];
36
+ notes?: string | null;
37
+ action_buttons?: IWarehouseCommunicationActionButton[];
38
+ }
39
+ export interface IWarehouseCommunication {
40
+ _id: string;
41
+ warehouse_id: string;
42
+ document_kind: TWarehouseCommunicationDocumentKind;
43
+ document_id: string;
44
+ communication_channel: TWarehouseCommunicationChannel;
45
+ to: string;
46
+ subject: string;
47
+ body: string;
48
+ metadata: IWarehouseCommunicationMetadata;
49
+ sent_at?: Date | null;
50
+ createdAt: Date;
51
+ updatedAt: Date;
52
+ }
53
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { COUNTRY_ALPHA_2_ENUM, COUNTRY_ALPHA_3_ENUM, COUNTRY_CODE_ENUM, COUNTRY_FLAG_ENUM, COUNTRY_NAME_ENUM, CURRENCY_CODE_ENUM, CURRENCY_NAME_ENUM, CURRENCY_SYMBOL_ENUM, GST_TYPE_ENUM, TAX_INVOICE_PROVIDER_ENUM, TRACK_ORDER_NUMBER_ENUM } from '../../constants';
1
+ import { COUNTRY_ALPHA_2_ENUM, COUNTRY_ALPHA_3_ENUM, COUNTRY_CODE_ENUM, COUNTRY_FLAG_ENUM, COUNTRY_NAME_ENUM, CURRENCY_CODE_ENUM, CURRENCY_NAME_ENUM, CURRENCY_SYMBOL_ENUM, GST_TYPE_ENUM, REMOVAL_STRATEGY_ENUM, TAX_INVOICE_PROVIDER_ENUM, TRACK_ORDER_NUMBER_ENUM } from '../../constants';
2
2
  export interface IWarehouse {
3
3
  _id: string;
4
4
  brand_id: string;
@@ -39,6 +39,8 @@ export interface IWarehouse {
39
39
  alert_phone_numbers: string[];
40
40
  alert_email_addresses: string[];
41
41
  alert_when: string[];
42
+ enable_lot_serial_tracking: boolean;
43
+ default_removal_strategy: REMOVAL_STRATEGY_ENUM;
42
44
  po_custom_payment_types: string[];
43
45
  invoice_custom_payment_types: string[];
44
46
  active: boolean;
@@ -1,3 +1,4 @@
1
+ import { REMOVAL_STRATEGY_ENUM } from '../../constants';
1
2
  export interface IWarehouseCategory {
2
3
  _id: string;
3
4
  brand_id: string;
@@ -7,6 +8,7 @@ export interface IWarehouseCategory {
7
8
  name: string;
8
9
  subtitle: string;
9
10
  active: boolean;
11
+ category_removal_strategy: REMOVAL_STRATEGY_ENUM;
10
12
  sort_id: number;
11
13
  createdAt: Date;
12
14
  updatedAt: Date;
@@ -4,6 +4,8 @@ export interface IWarehouseClient {
4
4
  warehouse_id: string;
5
5
  ref_id: string | null;
6
6
  type: WAREHOUSE_CLIENT_TYPE_ENUM;
7
+ email: string | null;
8
+ phone_number: string | null;
7
9
  name: string;
8
10
  subtitle: string;
9
11
  sort_id: number;
@@ -1,4 +1,4 @@
1
- import { INVENTORY_ITEM_TYPE_ENUM, INVENTORY_ITEM_UNIT_ENUM } from '../../constants';
1
+ import { INVENTORY_ITEM_TYPE_ENUM, INVENTORY_ITEM_UNIT_ENUM, TRACKING_MODE_ENUM } from '../../constants';
2
2
  import { IGeneralPrice, IIngredient } from './common';
3
3
  export interface IWarehouseItem {
4
4
  _id: string;
@@ -22,6 +22,12 @@ export interface IWarehouseItem {
22
22
  ingredients?: IIngredient[] | null;
23
23
  keywords: string[];
24
24
  image_url: string | null;
25
+ tracking_mode: TRACKING_MODE_ENUM;
26
+ expiry_tracked?: boolean;
27
+ expiration_days?: number;
28
+ best_before_days?: number;
29
+ removal_days?: number;
30
+ alert_days?: number;
25
31
  createdAt: Date;
26
32
  updatedAt: Date;
27
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.363",
3
+ "version": "0.2.365",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",