@managesome/eposmatic-toolkit 0.2.364 → 0.2.366

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 (85) hide show
  1. package/lib/constants/ENUMS.d.ts +223 -1
  2. package/lib/constants/ENUMS.js +271 -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/types/email-templates.d.ts +31 -1
  7. package/lib/helpers/utils/email-helpers.js +5 -0
  8. package/lib/schemas/models/index.d.ts +11 -0
  9. package/lib/schemas/models/index.js +11 -0
  10. package/lib/schemas/models/internal_movements.d.ts +357 -0
  11. package/lib/schemas/models/internal_movements.js +323 -0
  12. package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +154 -0
  13. package/lib/schemas/models/inventory_lot_serial_numbers.js +193 -0
  14. package/lib/schemas/models/item_transactions.d.ts +3 -3
  15. package/lib/schemas/models/purchase_order_receipts.d.ts +165 -0
  16. package/lib/schemas/models/purchase_order_receipts.js +151 -0
  17. package/lib/schemas/models/purchase_order_rfq.d.ts +1938 -0
  18. package/lib/schemas/models/purchase_order_rfq.js +309 -0
  19. package/lib/schemas/models/purchase_order_vendor_returns.d.ts +234 -0
  20. package/lib/schemas/models/purchase_order_vendor_returns.js +188 -0
  21. package/lib/schemas/models/purchase_orders.d.ts +6 -3
  22. package/lib/schemas/models/purchase_orders.js +10 -1
  23. package/lib/schemas/models/rewards_usage.d.ts +3 -3
  24. package/lib/schemas/models/rider.d.ts +3 -3
  25. package/lib/schemas/models/sale_order_deliveries.d.ts +167 -0
  26. package/lib/schemas/models/sale_order_deliveries.js +155 -0
  27. package/lib/schemas/models/sale_order_invoices.d.ts +218 -0
  28. package/lib/schemas/models/sale_order_invoices.js +192 -0
  29. package/lib/schemas/models/sale_order_rfq.d.ts +1938 -0
  30. package/lib/schemas/models/sale_order_rfq.js +309 -0
  31. package/lib/schemas/models/sale_orders.d.ts +1943 -0
  32. package/lib/schemas/models/sale_orders.js +324 -0
  33. package/lib/schemas/models/void_purchase_order_items.d.ts +3 -3
  34. package/lib/schemas/models/void_purchase_order_items.js +2 -1
  35. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +9 -9
  36. package/lib/schemas/models/warehouse-activity-logs.d.ts +127 -0
  37. package/lib/schemas/models/warehouse-activity-logs.js +143 -0
  38. package/lib/schemas/models/warehouse-communications.d.ts +228 -0
  39. package/lib/schemas/models/warehouse-communications.js +216 -0
  40. package/lib/schemas/models/warehouse.d.ts +7 -1
  41. package/lib/schemas/models/warehouse.js +9 -0
  42. package/lib/schemas/models/warehouse_categories.d.ts +4 -0
  43. package/lib/schemas/models/warehouse_categories.js +6 -0
  44. package/lib/schemas/models/warehouse_clients.d.ts +6 -0
  45. package/lib/schemas/models/warehouse_clients.js +8 -0
  46. package/lib/schemas/models/warehouse_inventory_transactions.d.ts +3 -3
  47. package/lib/schemas/models/warehouse_invoices.d.ts +3 -3
  48. package/lib/schemas/models/warehouse_item_transactions.d.ts +6 -6
  49. package/lib/schemas/models/warehouse_items.d.ts +28 -9
  50. package/lib/schemas/models/warehouse_items.js +29 -0
  51. package/lib/schemas/models/warehouse_vendors.d.ts +3 -3
  52. package/lib/schemas/types/index.d.ts +13 -0
  53. package/lib/schemas/types/index.js +13 -0
  54. package/lib/schemas/types/internal_movements.d.ts +73 -0
  55. package/lib/schemas/types/internal_movements.js +2 -0
  56. package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +85 -0
  57. package/lib/schemas/types/inventory_lot_serial_numbers.js +4 -0
  58. package/lib/schemas/types/purchase_order_common.d.ts +39 -0
  59. package/lib/schemas/types/purchase_order_common.js +2 -0
  60. package/lib/schemas/types/purchase_order_receipts.d.ts +39 -0
  61. package/lib/schemas/types/purchase_order_receipts.js +21 -0
  62. package/lib/schemas/types/purchase_order_rfq.d.ts +25 -0
  63. package/lib/schemas/types/purchase_order_rfq.js +2 -0
  64. package/lib/schemas/types/purchase_order_vendor_returns.d.ts +49 -0
  65. package/lib/schemas/types/purchase_order_vendor_returns.js +42 -0
  66. package/lib/schemas/types/purchase_orders.d.ts +7 -43
  67. package/lib/schemas/types/sale_order_common.d.ts +39 -0
  68. package/lib/schemas/types/sale_order_common.js +2 -0
  69. package/lib/schemas/types/sale_order_deliveries.d.ts +67 -0
  70. package/lib/schemas/types/sale_order_deliveries.js +2 -0
  71. package/lib/schemas/types/sale_order_invoices.d.ts +46 -0
  72. package/lib/schemas/types/sale_order_invoices.js +2 -0
  73. package/lib/schemas/types/sale_order_rfq.d.ts +25 -0
  74. package/lib/schemas/types/sale_order_rfq.js +2 -0
  75. package/lib/schemas/types/sale_orders.d.ts +30 -0
  76. package/lib/schemas/types/sale_orders.js +2 -0
  77. package/lib/schemas/types/warehouse-activity-logs.d.ts +35 -0
  78. package/lib/schemas/types/warehouse-activity-logs.js +4 -0
  79. package/lib/schemas/types/warehouse-communications.d.ts +53 -0
  80. package/lib/schemas/types/warehouse-communications.js +2 -0
  81. package/lib/schemas/types/warehouse.d.ts +3 -1
  82. package/lib/schemas/types/warehouse_categories.d.ts +2 -0
  83. package/lib/schemas/types/warehouse_clients.d.ts +2 -0
  84. package/lib/schemas/types/warehouse_items.d.ts +7 -1
  85. package/package.json +1 -1
@@ -0,0 +1,228 @@
1
+ import { Schema } from 'mongoose';
2
+ import { COMMUNICATION_CHANNEL_ENUM } from '../../constants';
3
+ export declare const WarehouseCommunicationsSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
4
+ timestamps: true;
5
+ versionKey: false;
6
+ minimize: false;
7
+ }, {
8
+ createdAt: NativeDate;
9
+ updatedAt: NativeDate;
10
+ } & {
11
+ _id: import("mongoose").Types.ObjectId;
12
+ createdAt: NativeDate;
13
+ updatedAt: NativeDate;
14
+ warehouse_id: string;
15
+ document_kind: import("../../constants").EMAIL_DOCUMENT_KIND_ENUM;
16
+ document_id: string;
17
+ communication_channel: COMMUNICATION_CHANNEL_ENUM;
18
+ to: string;
19
+ subject: string;
20
+ body: string;
21
+ metadata: {
22
+ grand_total: number;
23
+ subtotal: number;
24
+ support_email: string;
25
+ currency_symbol: string;
26
+ warehouse_name: string;
27
+ warehouse_logo_url: string;
28
+ counterparty_name: string;
29
+ counterparty_email: string;
30
+ issued_date: string;
31
+ line_items: import("mongoose").Types.DocumentArray<{
32
+ name: string;
33
+ price: number;
34
+ quantity: number;
35
+ subtotal: number;
36
+ currency_symbol?: string | null | undefined;
37
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
38
+ name: string;
39
+ price: number;
40
+ quantity: number;
41
+ subtotal: number;
42
+ currency_symbol?: string | null | undefined;
43
+ }> & {
44
+ name: string;
45
+ price: number;
46
+ quantity: number;
47
+ subtotal: number;
48
+ currency_symbol?: string | null | undefined;
49
+ }>;
50
+ action_buttons: import("mongoose").Types.DocumentArray<{
51
+ title: string;
52
+ url: string;
53
+ button_color: string;
54
+ button_text_color: string;
55
+ icon?: string | null | undefined;
56
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
57
+ title: string;
58
+ url: string;
59
+ button_color: string;
60
+ button_text_color: string;
61
+ icon?: string | null | undefined;
62
+ }> & {
63
+ title: string;
64
+ url: string;
65
+ button_color: string;
66
+ button_text_color: string;
67
+ icon?: string | null | undefined;
68
+ }>;
69
+ reference_number?: string | null | undefined;
70
+ order_number?: number | null | undefined;
71
+ notes?: string | null | undefined;
72
+ gst?: number | null | undefined;
73
+ gst_amount?: number | null | undefined;
74
+ is_gst_inclusive?: boolean | null | undefined;
75
+ expected_deadline?: string | null | undefined;
76
+ payment_terms_days?: number | null | undefined;
77
+ };
78
+ sent_at?: NativeDate | null | undefined;
79
+ }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
80
+ createdAt: NativeDate;
81
+ updatedAt: NativeDate;
82
+ } & {
83
+ _id: import("mongoose").Types.ObjectId;
84
+ createdAt: NativeDate;
85
+ updatedAt: NativeDate;
86
+ warehouse_id: string;
87
+ document_kind: import("../../constants").EMAIL_DOCUMENT_KIND_ENUM;
88
+ document_id: string;
89
+ communication_channel: COMMUNICATION_CHANNEL_ENUM;
90
+ to: string;
91
+ subject: string;
92
+ body: string;
93
+ metadata: {
94
+ grand_total: number;
95
+ subtotal: number;
96
+ support_email: string;
97
+ currency_symbol: string;
98
+ warehouse_name: string;
99
+ warehouse_logo_url: string;
100
+ counterparty_name: string;
101
+ counterparty_email: string;
102
+ issued_date: string;
103
+ line_items: import("mongoose").Types.DocumentArray<{
104
+ name: string;
105
+ price: number;
106
+ quantity: number;
107
+ subtotal: number;
108
+ currency_symbol?: string | null | undefined;
109
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
110
+ name: string;
111
+ price: number;
112
+ quantity: number;
113
+ subtotal: number;
114
+ currency_symbol?: string | null | undefined;
115
+ }> & {
116
+ name: string;
117
+ price: number;
118
+ quantity: number;
119
+ subtotal: number;
120
+ currency_symbol?: string | null | undefined;
121
+ }>;
122
+ action_buttons: import("mongoose").Types.DocumentArray<{
123
+ title: string;
124
+ url: string;
125
+ button_color: string;
126
+ button_text_color: string;
127
+ icon?: string | null | undefined;
128
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
129
+ title: string;
130
+ url: string;
131
+ button_color: string;
132
+ button_text_color: string;
133
+ icon?: string | null | undefined;
134
+ }> & {
135
+ title: string;
136
+ url: string;
137
+ button_color: string;
138
+ button_text_color: string;
139
+ icon?: string | null | undefined;
140
+ }>;
141
+ reference_number?: string | null | undefined;
142
+ order_number?: number | null | undefined;
143
+ notes?: string | null | undefined;
144
+ gst?: number | null | undefined;
145
+ gst_amount?: number | null | undefined;
146
+ is_gst_inclusive?: boolean | null | undefined;
147
+ expected_deadline?: string | null | undefined;
148
+ payment_terms_days?: number | null | undefined;
149
+ };
150
+ sent_at?: NativeDate | null | undefined;
151
+ }>> & import("mongoose").FlatRecord<{
152
+ createdAt: NativeDate;
153
+ updatedAt: NativeDate;
154
+ } & {
155
+ _id: import("mongoose").Types.ObjectId;
156
+ createdAt: NativeDate;
157
+ updatedAt: NativeDate;
158
+ warehouse_id: string;
159
+ document_kind: import("../../constants").EMAIL_DOCUMENT_KIND_ENUM;
160
+ document_id: string;
161
+ communication_channel: COMMUNICATION_CHANNEL_ENUM;
162
+ to: string;
163
+ subject: string;
164
+ body: string;
165
+ metadata: {
166
+ grand_total: number;
167
+ subtotal: number;
168
+ support_email: string;
169
+ currency_symbol: string;
170
+ warehouse_name: string;
171
+ warehouse_logo_url: string;
172
+ counterparty_name: string;
173
+ counterparty_email: string;
174
+ issued_date: string;
175
+ line_items: import("mongoose").Types.DocumentArray<{
176
+ name: string;
177
+ price: number;
178
+ quantity: number;
179
+ subtotal: number;
180
+ currency_symbol?: string | null | undefined;
181
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
182
+ name: string;
183
+ price: number;
184
+ quantity: number;
185
+ subtotal: number;
186
+ currency_symbol?: string | null | undefined;
187
+ }> & {
188
+ name: string;
189
+ price: number;
190
+ quantity: number;
191
+ subtotal: number;
192
+ currency_symbol?: string | null | undefined;
193
+ }>;
194
+ action_buttons: import("mongoose").Types.DocumentArray<{
195
+ title: string;
196
+ url: string;
197
+ button_color: string;
198
+ button_text_color: string;
199
+ icon?: string | null | undefined;
200
+ }, import("mongoose").Types.Subdocument<import("mongoose").Types.ObjectId, any, {
201
+ title: string;
202
+ url: string;
203
+ button_color: string;
204
+ button_text_color: string;
205
+ icon?: string | null | undefined;
206
+ }> & {
207
+ title: string;
208
+ url: string;
209
+ button_color: string;
210
+ button_text_color: string;
211
+ icon?: string | null | undefined;
212
+ }>;
213
+ reference_number?: string | null | undefined;
214
+ order_number?: number | null | undefined;
215
+ notes?: string | null | undefined;
216
+ gst?: number | null | undefined;
217
+ gst_amount?: number | null | undefined;
218
+ is_gst_inclusive?: boolean | null | undefined;
219
+ expected_deadline?: string | null | undefined;
220
+ payment_terms_days?: number | null | undefined;
221
+ };
222
+ sent_at?: NativeDate | null | undefined;
223
+ }> & Required<{
224
+ _id: import("mongoose").Types.ObjectId;
225
+ }> & {
226
+ __v: number;
227
+ }>;
228
+ export declare const WAREHOUSE_COMMUNICATIONS_COLLECTION_NAME = "warehouse_communications";
@@ -0,0 +1,216 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WAREHOUSE_COMMUNICATIONS_COLLECTION_NAME = exports.WarehouseCommunicationsSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
6
+ const warehouse_1 = require("./warehouse");
7
+ const WarehouseCommunicationActionButtonSchema = new mongoose_1.Schema({
8
+ title: {
9
+ type: String,
10
+ required: true,
11
+ },
12
+ url: {
13
+ type: String,
14
+ required: true,
15
+ },
16
+ button_color: {
17
+ type: String,
18
+ required: true,
19
+ },
20
+ button_text_color: {
21
+ type: String,
22
+ required: true,
23
+ },
24
+ icon: {
25
+ type: String,
26
+ required: false,
27
+ },
28
+ }, {
29
+ _id: false,
30
+ minimize: false,
31
+ });
32
+ const WarehouseCommunicationLineItemSchema = new mongoose_1.Schema({
33
+ name: {
34
+ type: String,
35
+ required: true,
36
+ },
37
+ quantity: {
38
+ type: Number,
39
+ min: 0,
40
+ required: true,
41
+ },
42
+ price: {
43
+ type: Number,
44
+ min: 0,
45
+ required: true,
46
+ },
47
+ subtotal: {
48
+ type: Number,
49
+ min: 0,
50
+ required: true,
51
+ },
52
+ currency_symbol: {
53
+ type: String,
54
+ required: false,
55
+ },
56
+ }, {
57
+ _id: false,
58
+ minimize: false,
59
+ });
60
+ const WarehouseCommunicationMetadataSchema = new mongoose_1.Schema({
61
+ warehouse_name: {
62
+ type: String,
63
+ required: true,
64
+ },
65
+ warehouse_logo_url: {
66
+ type: String,
67
+ required: true,
68
+ },
69
+ support_email: {
70
+ type: String,
71
+ required: true,
72
+ },
73
+ counterparty_name: {
74
+ type: String,
75
+ required: true,
76
+ },
77
+ counterparty_email: {
78
+ type: String,
79
+ required: true,
80
+ },
81
+ reference_number: {
82
+ type: String,
83
+ required: false,
84
+ default: null,
85
+ },
86
+ order_number: {
87
+ type: Number,
88
+ required: false,
89
+ default: null,
90
+ },
91
+ issued_date: {
92
+ type: String,
93
+ required: true,
94
+ },
95
+ expected_deadline: {
96
+ type: String,
97
+ required: false,
98
+ default: null,
99
+ },
100
+ payment_terms_days: {
101
+ type: Number,
102
+ required: false,
103
+ default: null,
104
+ },
105
+ currency_symbol: {
106
+ type: String,
107
+ required: true,
108
+ },
109
+ subtotal: {
110
+ type: Number,
111
+ min: 0,
112
+ required: true,
113
+ },
114
+ gst: {
115
+ type: Number,
116
+ min: 0,
117
+ required: false,
118
+ default: null,
119
+ },
120
+ gst_amount: {
121
+ type: Number,
122
+ min: 0,
123
+ required: false,
124
+ default: null,
125
+ },
126
+ is_gst_inclusive: {
127
+ type: Boolean,
128
+ required: false,
129
+ default: null,
130
+ },
131
+ grand_total: {
132
+ type: Number,
133
+ min: 0,
134
+ required: true,
135
+ },
136
+ line_items: {
137
+ type: [WarehouseCommunicationLineItemSchema],
138
+ default: [],
139
+ },
140
+ notes: {
141
+ type: String,
142
+ required: false,
143
+ default: null,
144
+ },
145
+ action_buttons: {
146
+ type: [WarehouseCommunicationActionButtonSchema],
147
+ default: [],
148
+ },
149
+ }, {
150
+ _id: false,
151
+ minimize: false,
152
+ });
153
+ exports.WarehouseCommunicationsSchema = new mongoose_1.Schema({
154
+ _id: {
155
+ type: mongoose_1.Schema.Types.ObjectId,
156
+ required: true,
157
+ immutable: true,
158
+ },
159
+ warehouse_id: {
160
+ type: String,
161
+ required: true,
162
+ ref: warehouse_1.WAREHOUSE_SETTINGS_COLLECTION_NAME,
163
+ },
164
+ document_kind: {
165
+ type: String,
166
+ enum: constants_1.ALL_EMAIL_DOCUMENT_KINDS,
167
+ required: true,
168
+ },
169
+ document_id: {
170
+ type: String,
171
+ required: true,
172
+ },
173
+ communication_channel: {
174
+ type: String,
175
+ enum: constants_1.ALL_COMMUNICATION_CHANNELS,
176
+ required: true,
177
+ default: constants_1.COMMUNICATION_CHANNEL_ENUM.EMAIL,
178
+ },
179
+ to: {
180
+ type: String,
181
+ required: true,
182
+ },
183
+ subject: {
184
+ type: String,
185
+ required: true,
186
+ },
187
+ body: {
188
+ type: String,
189
+ default: '',
190
+ },
191
+ metadata: {
192
+ type: WarehouseCommunicationMetadataSchema,
193
+ required: true,
194
+ },
195
+ sent_at: {
196
+ type: mongoose_1.Schema.Types.Date,
197
+ required: false,
198
+ default: null,
199
+ },
200
+ createdAt: {
201
+ type: mongoose_1.Schema.Types.Date,
202
+ required: true,
203
+ default: () => new Date(),
204
+ immutable: true,
205
+ },
206
+ updatedAt: {
207
+ type: mongoose_1.Schema.Types.Date,
208
+ required: true,
209
+ default: () => new Date(),
210
+ },
211
+ }, {
212
+ timestamps: true,
213
+ versionKey: false,
214
+ minimize: false,
215
+ });
216
+ exports.WAREHOUSE_COMMUNICATIONS_COLLECTION_NAME = 'warehouse_communications';
@@ -1,5 +1,5 @@
1
1
  import { Schema } from 'mongoose';
2
- 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, TRACK_ORDER_NUMBER_ENUM } from '../../constants';
2
+ 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, TRACK_ORDER_NUMBER_ENUM } from '../../constants';
3
3
  export declare const WarehouseSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
4
4
  timestamps: true;
5
5
  versionKey: false;
@@ -44,6 +44,8 @@ export declare const WarehouseSchema: Schema<any, import("mongoose").Model<any,
44
44
  alert_phone_numbers: string[];
45
45
  alert_email_addresses: string[];
46
46
  alert_when: string[];
47
+ enable_lot_serial_tracking: boolean;
48
+ default_removal_strategy: REMOVAL_STRATEGY_ENUM;
47
49
  po_custom_payment_types: string[];
48
50
  invoice_custom_payment_types: string[];
49
51
  exclude_discount_from_gst?: boolean | null | undefined;
@@ -92,6 +94,8 @@ export declare const WarehouseSchema: Schema<any, import("mongoose").Model<any,
92
94
  alert_phone_numbers: string[];
93
95
  alert_email_addresses: string[];
94
96
  alert_when: string[];
97
+ enable_lot_serial_tracking: boolean;
98
+ default_removal_strategy: REMOVAL_STRATEGY_ENUM;
95
99
  po_custom_payment_types: string[];
96
100
  invoice_custom_payment_types: string[];
97
101
  exclude_discount_from_gst?: boolean | null | undefined;
@@ -140,6 +144,8 @@ export declare const WarehouseSchema: Schema<any, import("mongoose").Model<any,
140
144
  alert_phone_numbers: string[];
141
145
  alert_email_addresses: string[];
142
146
  alert_when: string[];
147
+ enable_lot_serial_tracking: boolean;
148
+ default_removal_strategy: REMOVAL_STRATEGY_ENUM;
143
149
  po_custom_payment_types: string[];
144
150
  invoice_custom_payment_types: string[];
145
151
  exclude_discount_from_gst?: boolean | null | undefined;
@@ -186,6 +186,15 @@ exports.WarehouseSchema = new mongoose_1.Schema({
186
186
  type: [String],
187
187
  default: [],
188
188
  },
189
+ enable_lot_serial_tracking: {
190
+ type: Boolean,
191
+ default: false,
192
+ },
193
+ default_removal_strategy: {
194
+ type: String,
195
+ enum: constants_1.ALL_REMOVAL_STRATEGY_TYPES,
196
+ default: constants_1.REMOVAL_STRATEGY_ENUM.FIFO,
197
+ },
189
198
  po_custom_payment_types: {
190
199
  type: [String],
191
200
  default: [],
@@ -1,4 +1,5 @@
1
1
  import { Schema, Types } from 'mongoose';
2
+ import { REMOVAL_STRATEGY_ENUM } from '../../constants';
2
3
  export declare const WarehouseCategorySchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
4
  timestamps: true;
4
5
  versionKey: false;
@@ -18,6 +19,7 @@ export declare const WarehouseCategorySchema: Schema<any, import("mongoose").Mod
18
19
  sort_id: number;
19
20
  ref_id: Types.ObjectId;
20
21
  warehouse_id: string;
22
+ category_removal_strategy: REMOVAL_STRATEGY_ENUM;
21
23
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
22
24
  createdAt: NativeDate;
23
25
  updatedAt: NativeDate;
@@ -33,6 +35,7 @@ export declare const WarehouseCategorySchema: Schema<any, import("mongoose").Mod
33
35
  sort_id: number;
34
36
  ref_id: Types.ObjectId;
35
37
  warehouse_id: string;
38
+ category_removal_strategy: REMOVAL_STRATEGY_ENUM;
36
39
  }>> & import("mongoose").FlatRecord<{
37
40
  createdAt: NativeDate;
38
41
  updatedAt: NativeDate;
@@ -48,6 +51,7 @@ export declare const WarehouseCategorySchema: Schema<any, import("mongoose").Mod
48
51
  sort_id: number;
49
52
  ref_id: Types.ObjectId;
50
53
  warehouse_id: string;
54
+ category_removal_strategy: REMOVAL_STRATEGY_ENUM;
51
55
  }> & Required<{
52
56
  _id: Types.ObjectId;
53
57
  }> & {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WAREHOUSE_CATEGORY_COLLECTION_NAME = exports.WarehouseCategorySchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const constants_1 = require("../../constants");
5
6
  exports.WarehouseCategorySchema = new mongoose_1.Schema({
6
7
  _id: {
7
8
  type: mongoose_1.Schema.Types.ObjectId,
@@ -42,6 +43,11 @@ exports.WarehouseCategorySchema = new mongoose_1.Schema({
42
43
  type: Boolean,
43
44
  required: true,
44
45
  },
46
+ category_removal_strategy: {
47
+ type: String,
48
+ enum: constants_1.ALL_REMOVAL_STRATEGY_TYPES,
49
+ default: constants_1.REMOVAL_STRATEGY_ENUM.NONE,
50
+ },
45
51
  sort_id: {
46
52
  type: Number,
47
53
  required: true,
@@ -16,6 +16,8 @@ export declare const WarehouseClientsSchema: Schema<any, import("mongoose").Mode
16
16
  active: boolean;
17
17
  sort_id: number;
18
18
  ref_id: string;
19
+ phone_number: string;
20
+ email: string;
19
21
  warehouse_id: string;
20
22
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
21
23
  createdAt: NativeDate;
@@ -30,6 +32,8 @@ export declare const WarehouseClientsSchema: Schema<any, import("mongoose").Mode
30
32
  active: boolean;
31
33
  sort_id: number;
32
34
  ref_id: string;
35
+ phone_number: string;
36
+ email: string;
33
37
  warehouse_id: string;
34
38
  }>> & import("mongoose").FlatRecord<{
35
39
  createdAt: NativeDate;
@@ -44,6 +48,8 @@ export declare const WarehouseClientsSchema: Schema<any, import("mongoose").Mode
44
48
  active: boolean;
45
49
  sort_id: number;
46
50
  ref_id: string;
51
+ phone_number: string;
52
+ email: string;
47
53
  warehouse_id: string;
48
54
  }> & Required<{
49
55
  _id: import("mongoose").Types.ObjectId;
@@ -26,6 +26,14 @@ exports.WarehouseClientsSchema = new mongoose_1.Schema({
26
26
  enum: constants_1.ALL_WAREHOUSE_CLIENT_TYPES,
27
27
  immutable: true,
28
28
  },
29
+ email: {
30
+ type: String,
31
+ default: null,
32
+ },
33
+ phone_number: {
34
+ type: String,
35
+ default: null,
36
+ },
29
37
  name: {
30
38
  type: String,
31
39
  required: true,
@@ -14,6 +14,7 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
14
14
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
15
15
  transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
16
16
  inventory_code: string;
17
+ warehouse_id: string;
17
18
  quantity_left: number;
18
19
  unit_price: number;
19
20
  remaining_stock_price: number;
@@ -21,7 +22,6 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
21
22
  previous_quantity_left: number;
22
23
  previous_unit_price: number;
23
24
  previous_remaining_stock_price: number;
24
- warehouse_id: string;
25
25
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
26
26
  description?: string | null | undefined;
27
27
  order_number?: number | null | undefined;
@@ -38,6 +38,7 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
38
38
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
39
39
  transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
40
40
  inventory_code: string;
41
+ warehouse_id: string;
41
42
  quantity_left: number;
42
43
  unit_price: number;
43
44
  remaining_stock_price: number;
@@ -45,7 +46,6 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
45
46
  previous_quantity_left: number;
46
47
  previous_unit_price: number;
47
48
  previous_remaining_stock_price: number;
48
- warehouse_id: string;
49
49
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
50
50
  description?: string | null | undefined;
51
51
  order_number?: number | null | undefined;
@@ -62,6 +62,7 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
62
62
  transaction_type: import("../../constants").INVENTORY_TRANSACTION_TYPE_ENUM;
63
63
  transaction_category: import("../../constants").INVENTORY_TRANSACTION_CATEGORY_ENUM;
64
64
  inventory_code: string;
65
+ warehouse_id: string;
65
66
  quantity_left: number;
66
67
  unit_price: number;
67
68
  remaining_stock_price: number;
@@ -69,7 +70,6 @@ export declare const WarehouseInventoryTransactionsSchema: Schema<any, import("m
69
70
  previous_quantity_left: number;
70
71
  previous_unit_price: number;
71
72
  previous_remaining_stock_price: number;
72
- warehouse_id: string;
73
73
  order_id?: import("mongoose").Types.ObjectId | null | undefined;
74
74
  description?: string | null | undefined;
75
75
  order_number?: number | null | undefined;
@@ -873,6 +873,7 @@ export declare const WarehouseClientInvoicesSchema: Schema<any, import("mongoose
873
873
  amount_collected: number;
874
874
  is_deleted: boolean;
875
875
  order_status_updated_at: NativeDate;
876
+ warehouse_id: string;
876
877
  staff_details: {
877
878
  staff_id: string;
878
879
  staff_name: string;
@@ -881,7 +882,6 @@ export declare const WarehouseClientInvoicesSchema: Schema<any, import("mongoose
881
882
  };
882
883
  order_settled_at: NativeDate;
883
884
  order_settled_at_mins: number;
884
- warehouse_id: string;
885
885
  client_id: import("mongoose").Types.ObjectId;
886
886
  client_name: string;
887
887
  cancel_reason?: string | null | undefined;
@@ -1761,6 +1761,7 @@ export declare const WarehouseClientInvoicesSchema: Schema<any, import("mongoose
1761
1761
  amount_collected: number;
1762
1762
  is_deleted: boolean;
1763
1763
  order_status_updated_at: NativeDate;
1764
+ warehouse_id: string;
1764
1765
  staff_details: {
1765
1766
  staff_id: string;
1766
1767
  staff_name: string;
@@ -1769,7 +1770,6 @@ export declare const WarehouseClientInvoicesSchema: Schema<any, import("mongoose
1769
1770
  };
1770
1771
  order_settled_at: NativeDate;
1771
1772
  order_settled_at_mins: number;
1772
- warehouse_id: string;
1773
1773
  client_id: import("mongoose").Types.ObjectId;
1774
1774
  client_name: string;
1775
1775
  cancel_reason?: string | null | undefined;
@@ -2649,6 +2649,7 @@ export declare const WarehouseClientInvoicesSchema: Schema<any, import("mongoose
2649
2649
  amount_collected: number;
2650
2650
  is_deleted: boolean;
2651
2651
  order_status_updated_at: NativeDate;
2652
+ warehouse_id: string;
2652
2653
  staff_details: {
2653
2654
  staff_id: string;
2654
2655
  staff_name: string;
@@ -2657,7 +2658,6 @@ export declare const WarehouseClientInvoicesSchema: Schema<any, import("mongoose
2657
2658
  };
2658
2659
  order_settled_at: NativeDate;
2659
2660
  order_settled_at_mins: number;
2660
- warehouse_id: string;
2661
2661
  client_id: import("mongoose").Types.ObjectId;
2662
2662
  client_name: string;
2663
2663
  cancel_reason?: string | null | undefined;