@managesome/eposmatic-toolkit 0.2.455 → 0.2.457

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 (180) hide show
  1. package/lib/constants/WORKER_ENDPOINTS.d.ts +2 -0
  2. package/lib/constants/WORKER_ENDPOINTS.js +3 -0
  3. package/lib/helpers/types/workers.d.ts +16 -1
  4. package/lib/schemas/models/index.d.ts +1 -0
  5. package/lib/schemas/models/index.js +1 -0
  6. package/lib/schemas/types/index.d.ts +2 -0
  7. package/lib/schemas/types/index.js +2 -0
  8. package/package.json +1 -1
  9. package/lib/constants/PURCHASE_ORDER.d.ts +0 -16
  10. package/lib/constants/PURCHASE_ORDER.js +0 -100
  11. package/lib/constants/RFQ.d.ts +0 -0
  12. package/lib/constants/RFQ.js +0 -1
  13. package/lib/helpers/order/generate-purchase-order-rfq.d.ts +0 -3
  14. package/lib/helpers/order/generate-purchase-order-rfq.js +0 -64
  15. package/lib/helpers/order/generate-purchase-order.d.ts +0 -11
  16. package/lib/helpers/order/generate-purchase-order.js +0 -196
  17. package/lib/helpers/store/all-purchase-orders-actions.d.ts +0 -13
  18. package/lib/helpers/store/all-purchase-orders-actions.js +0 -56
  19. package/lib/helpers/store/all-sale-orders-actions.d.ts +0 -2
  20. package/lib/helpers/store/all-sale-orders-actions.js +0 -8
  21. package/lib/helpers/store/all-warehouse-sale-orders-actions.d.ts +0 -2
  22. package/lib/helpers/store/all-warehouse-sale-orders-actions.js +0 -8
  23. package/lib/helpers/store/common-purchase-order-actions.d.ts +0 -31
  24. package/lib/helpers/store/common-purchase-order-actions.js +0 -543
  25. package/lib/helpers/store/common-sale-order-actions.d.ts +0 -5
  26. package/lib/helpers/store/common-sale-order-actions.js +0 -65
  27. package/lib/helpers/store/purchase-order-rfq-cart-actions.d.ts +0 -19
  28. package/lib/helpers/store/purchase-order-rfq-cart-actions.js +0 -373
  29. package/lib/helpers/store/purchase-orders-cart-actions.d.ts +0 -57
  30. package/lib/helpers/store/purchase-orders-cart-actions.js +0 -486
  31. package/lib/helpers/types/purchase-order-cart-actions.d.ts +0 -26
  32. package/lib/helpers/types/purchase-order-cart-actions.js +0 -2
  33. package/lib/helpers/utils/invoice-x-report-helpers.d.ts +0 -58
  34. package/lib/helpers/utils/invoice-x-report-helpers.js +0 -1432
  35. package/lib/helpers/utils/purchase-order-engine.d.ts +0 -9
  36. package/lib/helpers/utils/purchase-order-engine.js +0 -34
  37. package/lib/helpers/utils/purchase-order-receipt-engine.d.ts +0 -149
  38. package/lib/helpers/utils/purchase-order-receipt-engine.js +0 -214
  39. package/lib/helpers/utils/purchase-order-x-report-helpers.d.ts +0 -58
  40. package/lib/helpers/utils/purchase-order-x-report-helpers.js +0 -1440
  41. package/lib/helpers/utils/sale-order-x-report-helpers.d.ts +0 -44
  42. package/lib/helpers/utils/sale-order-x-report-helpers.js +0 -22
  43. package/lib/helpers/utils/sale-x-report-helpers.d.ts +0 -58
  44. package/lib/helpers/utils/sale-x-report-helpers.js +0 -1456
  45. package/lib/helpers/utils/terminal-devices-helpers.d.ts +0 -2
  46. package/lib/helpers/utils/terminal-devices-helpers.js +0 -13
  47. package/lib/helpers/utils/void-purchase-order-items-helpers.d.ts +0 -3
  48. package/lib/helpers/utils/void-purchase-order-items-helpers.js +0 -38
  49. package/lib/helpers/utils/void-purchase-order-items-report-helpers.d.ts +0 -13
  50. package/lib/helpers/utils/void-purchase-order-items-report-helpers.js +0 -22
  51. package/lib/schemas/models/applied-order-discounts.d.ts +0 -80
  52. package/lib/schemas/models/applied-order-discounts.js +0 -106
  53. package/lib/schemas/models/brand.d.ts +0 -45
  54. package/lib/schemas/models/brand.js +0 -45
  55. package/lib/schemas/models/category.d.ts +0 -60
  56. package/lib/schemas/models/category.js +0 -67
  57. package/lib/schemas/models/dinein_table_fingerprints.d.ts +0 -65
  58. package/lib/schemas/models/dinein_table_fingerprints.js +0 -85
  59. package/lib/schemas/models/expense_category.d.ts +0 -83
  60. package/lib/schemas/models/expense_category.js +0 -64
  61. package/lib/schemas/models/internal_movements.d.ts +0 -357
  62. package/lib/schemas/models/internal_movements.js +0 -323
  63. package/lib/schemas/models/inventory.d.ts +0 -99
  64. package/lib/schemas/models/inventory.js +0 -87
  65. package/lib/schemas/models/inventory_lot_serial_numbers.d.ts +0 -154
  66. package/lib/schemas/models/inventory_lot_serial_numbers.js +0 -193
  67. package/lib/schemas/models/item.d.ts +0 -11269
  68. package/lib/schemas/models/item.js +0 -333
  69. package/lib/schemas/models/menu.d.ts +0 -941
  70. package/lib/schemas/models/menu.js +0 -69
  71. package/lib/schemas/models/order.d.ts +0 -15437
  72. package/lib/schemas/models/order.js +0 -891
  73. package/lib/schemas/models/purchase_order_receipts.d.ts +0 -165
  74. package/lib/schemas/models/purchase_order_receipts.js +0 -151
  75. package/lib/schemas/models/purchase_order_rfq.d.ts +0 -1959
  76. package/lib/schemas/models/purchase_order_rfq.js +0 -328
  77. package/lib/schemas/models/purchase_order_rfqs.d.ts +0 -1959
  78. package/lib/schemas/models/purchase_order_rfqs.js +0 -328
  79. package/lib/schemas/models/purchase_order_vendor_returns.d.ts +0 -234
  80. package/lib/schemas/models/purchase_order_vendor_returns.js +0 -188
  81. package/lib/schemas/models/purchase_orders.d.ts +0 -2678
  82. package/lib/schemas/models/purchase_orders.js +0 -336
  83. package/lib/schemas/models/rider.d.ts +0 -65
  84. package/lib/schemas/models/rider.js +0 -74
  85. package/lib/schemas/models/sale_order_deliveries.d.ts +0 -167
  86. package/lib/schemas/models/sale_order_deliveries.js +0 -155
  87. package/lib/schemas/models/sale_order_invoices.d.ts +0 -227
  88. package/lib/schemas/models/sale_order_invoices.js +0 -206
  89. package/lib/schemas/models/sale_order_rfq.d.ts +0 -1938
  90. package/lib/schemas/models/sale_order_rfq.js +0 -309
  91. package/lib/schemas/models/sale_orders.d.ts +0 -1943
  92. package/lib/schemas/models/sale_orders.js +0 -324
  93. package/lib/schemas/models/tenant.d.ts +0 -528
  94. package/lib/schemas/models/tenant.js +0 -755
  95. package/lib/schemas/models/tenant_staff.d.ts +0 -932
  96. package/lib/schemas/models/tenant_staff.js +0 -96
  97. package/lib/schemas/models/track_order_number.d.ts +0 -413
  98. package/lib/schemas/models/track_order_number.js +0 -45
  99. package/lib/schemas/models/void_purchase_order_items.d.ts +0 -176
  100. package/lib/schemas/models/void_purchase_order_items.js +0 -177
  101. package/lib/schemas/models/void_warehouse_invoice_items.d.ts +0 -176
  102. package/lib/schemas/models/void_warehouse_invoice_items.js +0 -176
  103. package/lib/schemas/models/wallet.d.ts +0 -38
  104. package/lib/schemas/models/wallet.js +0 -37
  105. package/lib/schemas/models/warehouse-communications.d.ts +0 -228
  106. package/lib/schemas/models/warehouse-communications.js +0 -216
  107. package/lib/schemas/models/warehouse.d.ts +0 -162
  108. package/lib/schemas/models/warehouse.js +0 -222
  109. package/lib/schemas/models/warehouse_staff.d.ts +0 -65
  110. package/lib/schemas/models/warehouse_staff.js +0 -78
  111. package/lib/schemas/models/warehouse_track_order_number.d.ts +0 -50
  112. package/lib/schemas/models/warehouse_track_order_number.js +0 -52
  113. package/lib/schemas/types/applied-order-discounts.d.ts +0 -22
  114. package/lib/schemas/types/applied-order-discounts.js +0 -2
  115. package/lib/schemas/types/brand.d.ts +0 -32
  116. package/lib/schemas/types/brand.js +0 -2
  117. package/lib/schemas/types/category.d.ts +0 -15
  118. package/lib/schemas/types/category.js +0 -2
  119. package/lib/schemas/types/expense_category.d.ts +0 -20
  120. package/lib/schemas/types/expense_category.js +0 -2
  121. package/lib/schemas/types/internal_movements.d.ts +0 -73
  122. package/lib/schemas/types/internal_movements.js +0 -2
  123. package/lib/schemas/types/inventory.d.ts +0 -48
  124. package/lib/schemas/types/inventory.js +0 -2
  125. package/lib/schemas/types/inventory_lot_serial_numbers.d.ts +0 -85
  126. package/lib/schemas/types/inventory_lot_serial_numbers.js +0 -4
  127. package/lib/schemas/types/item.d.ts +0 -89
  128. package/lib/schemas/types/item.js +0 -2
  129. package/lib/schemas/types/menu.d.ts +0 -17
  130. package/lib/schemas/types/menu.js +0 -2
  131. package/lib/schemas/types/order.d.ts +0 -242
  132. package/lib/schemas/types/order.js +0 -2
  133. package/lib/schemas/types/purchase_order_common.d.ts +0 -39
  134. package/lib/schemas/types/purchase_order_common.js +0 -2
  135. package/lib/schemas/types/purchase_order_receipts.d.ts +0 -39
  136. package/lib/schemas/types/purchase_order_receipts.js +0 -21
  137. package/lib/schemas/types/purchase_order_rfq.d.ts +0 -33
  138. package/lib/schemas/types/purchase_order_rfq.js +0 -2
  139. package/lib/schemas/types/purchase_order_rfqs.d.ts +0 -33
  140. package/lib/schemas/types/purchase_order_rfqs.js +0 -2
  141. package/lib/schemas/types/purchase_order_vendor_returns.d.ts +0 -49
  142. package/lib/schemas/types/purchase_order_vendor_returns.js +0 -42
  143. package/lib/schemas/types/purchase_orders.d.ts +0 -33
  144. package/lib/schemas/types/purchase_orders.js +0 -2
  145. package/lib/schemas/types/rider.d.ts +0 -16
  146. package/lib/schemas/types/rider.js +0 -2
  147. package/lib/schemas/types/sale_order_common.d.ts +0 -39
  148. package/lib/schemas/types/sale_order_common.js +0 -2
  149. package/lib/schemas/types/sale_order_deliveries.d.ts +0 -67
  150. package/lib/schemas/types/sale_order_deliveries.js +0 -2
  151. package/lib/schemas/types/sale_order_invoices.d.ts +0 -49
  152. package/lib/schemas/types/sale_order_invoices.js +0 -2
  153. package/lib/schemas/types/sale_order_rfq.d.ts +0 -25
  154. package/lib/schemas/types/sale_order_rfq.js +0 -2
  155. package/lib/schemas/types/sale_orders.d.ts +0 -30
  156. package/lib/schemas/types/sale_orders.js +0 -2
  157. package/lib/schemas/types/tenant.d.ts +0 -205
  158. package/lib/schemas/types/tenant.js +0 -2
  159. package/lib/schemas/types/tenant_staff.d.ts +0 -22
  160. package/lib/schemas/types/tenant_staff.js +0 -2
  161. package/lib/schemas/types/track_order_number.d.ts +0 -10
  162. package/lib/schemas/types/track_order_number.js +0 -2
  163. package/lib/schemas/types/void_purchase_order_items.d.ts +0 -37
  164. package/lib/schemas/types/void_purchase_order_items.js +0 -2
  165. package/lib/schemas/types/void_warehouse_invoice_items.d.ts +0 -37
  166. package/lib/schemas/types/void_warehouse_invoice_items.js +0 -2
  167. package/lib/schemas/types/wallet.d.ts +0 -7
  168. package/lib/schemas/types/wallet.js +0 -2
  169. package/lib/schemas/types/warehouse-communications.d.ts +0 -54
  170. package/lib/schemas/types/warehouse-communications.js +0 -2
  171. package/lib/schemas/types/warehouse.d.ts +0 -49
  172. package/lib/schemas/types/warehouse.js +0 -2
  173. package/lib/schemas/types/warehouse_purchase_order_common.d.ts +0 -39
  174. package/lib/schemas/types/warehouse_purchase_order_common.js +0 -2
  175. package/lib/schemas/types/warehouse_sale_order_common.d.ts +0 -39
  176. package/lib/schemas/types/warehouse_sale_order_common.js +0 -2
  177. package/lib/schemas/types/warehouse_staff.d.ts +0 -17
  178. package/lib/schemas/types/warehouse_staff.js +0 -2
  179. package/lib/schemas/types/warehouse_track_order_number.d.ts +0 -11
  180. package/lib/schemas/types/warehouse_track_order_number.js +0 -2
@@ -1,38 +0,0 @@
1
- import { Schema } from 'mongoose';
2
- export declare const WalletSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
3
- timestamps: true;
4
- versionKey: false;
5
- minimize: false;
6
- }, {
7
- createdAt: NativeDate;
8
- updatedAt: NativeDate;
9
- } & {
10
- _id: import("mongoose").Types.ObjectId;
11
- tenant_id: string;
12
- createdAt: NativeDate;
13
- updatedAt: NativeDate;
14
- balance: number;
15
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
16
- createdAt: NativeDate;
17
- updatedAt: NativeDate;
18
- } & {
19
- _id: import("mongoose").Types.ObjectId;
20
- tenant_id: string;
21
- createdAt: NativeDate;
22
- updatedAt: NativeDate;
23
- balance: number;
24
- }>> & import("mongoose").FlatRecord<{
25
- createdAt: NativeDate;
26
- updatedAt: NativeDate;
27
- } & {
28
- _id: import("mongoose").Types.ObjectId;
29
- tenant_id: string;
30
- createdAt: NativeDate;
31
- updatedAt: NativeDate;
32
- balance: number;
33
- }> & Required<{
34
- _id: import("mongoose").Types.ObjectId;
35
- }> & {
36
- __v: number;
37
- }>;
38
- export declare const WALLET_COLLECTION_NAME = "wallets";
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WALLET_COLLECTION_NAME = exports.WalletSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- exports.WalletSchema = new mongoose_1.Schema({
6
- _id: {
7
- type: mongoose_1.Schema.Types.ObjectId,
8
- required: true,
9
- immutable: true,
10
- },
11
- tenant_id: {
12
- type: String,
13
- required: true,
14
- immutable: true,
15
- ref: 'tenants',
16
- },
17
- balance: {
18
- type: Number,
19
- default: 0,
20
- },
21
- createdAt: {
22
- type: mongoose_1.Schema.Types.Date,
23
- required: true,
24
- default: () => new Date(),
25
- immutable: true,
26
- },
27
- updatedAt: {
28
- type: mongoose_1.Schema.Types.Date,
29
- required: true,
30
- default: () => new Date(),
31
- },
32
- }, {
33
- timestamps: true,
34
- versionKey: false,
35
- minimize: false,
36
- });
37
- exports.WALLET_COLLECTION_NAME = 'wallets';
@@ -1,228 +0,0 @@
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
- description: string;
15
- warehouse_id: string;
16
- document_kind: import("../../constants").EMAIL_DOCUMENT_KIND_ENUM;
17
- document_id: string;
18
- communication_channel: COMMUNICATION_CHANNEL_ENUM;
19
- to: string;
20
- subject: 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
- description: string;
87
- warehouse_id: string;
88
- document_kind: import("../../constants").EMAIL_DOCUMENT_KIND_ENUM;
89
- document_id: string;
90
- communication_channel: COMMUNICATION_CHANNEL_ENUM;
91
- to: string;
92
- subject: 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
- description: string;
159
- warehouse_id: string;
160
- document_kind: import("../../constants").EMAIL_DOCUMENT_KIND_ENUM;
161
- document_id: string;
162
- communication_channel: COMMUNICATION_CHANNEL_ENUM;
163
- to: string;
164
- subject: 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";
@@ -1,216 +0,0 @@
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
- description: {
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,162 +0,0 @@
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, REMOVAL_STRATEGY_ENUM, TRACK_ORDER_NUMBER_ENUM } from '../../constants';
3
- export declare const WarehouseSchema: 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: string;
12
- name: string;
13
- createdAt: NativeDate;
14
- updatedAt: NativeDate;
15
- image_url: string;
16
- brand_id: string;
17
- active: boolean;
18
- country_code: COUNTRY_CODE_ENUM;
19
- public_business_name: string;
20
- brand_color: string;
21
- country_name: COUNTRY_NAME_ENUM;
22
- coordinates: number[];
23
- warehouse_address: string;
24
- support_email: string;
25
- public_phone_numbers: string[];
26
- currency_code: CURRENCY_CODE_ENUM;
27
- currency_symbol: CURRENCY_SYMBOL_ENUM;
28
- currency_name: CURRENCY_NAME_ENUM;
29
- country_alpha_2: COUNTRY_ALPHA_2_ENUM;
30
- country_alpha_3: COUNTRY_ALPHA_3_ENUM;
31
- country_flag: COUNTRY_FLAG_ENUM;
32
- po_card_gst: number;
33
- po_cash_gst: number;
34
- invoice_card_gst: number;
35
- invoice_cash_gst: number;
36
- default_po_gst_type: GST_TYPE_ENUM;
37
- default_invoice_gst_type: GST_TYPE_ENUM;
38
- tax_business_number: string;
39
- track_purchase_order_number_by: TRACK_ORDER_NUMBER_ENUM;
40
- track_invoice_number_by: TRACK_ORDER_NUMBER_ENUM;
41
- operational_time_zone_offset_gmt: number;
42
- operational_start_time: number;
43
- operational_end_time: number;
44
- alert_phone_numbers: string[];
45
- alert_email_addresses: string[];
46
- alert_when: string[];
47
- enable_lot_serial_tracking: boolean;
48
- default_removal_strategy: REMOVAL_STRATEGY_ENUM;
49
- po_custom_payment_types: string[];
50
- invoice_custom_payment_types: string[];
51
- exclude_discount_from_gst?: boolean | null | undefined;
52
- is_gst_inclusive?: boolean | null | undefined;
53
- hide_gst_value?: boolean | null | undefined;
54
- tax_invoice_provider?: import("../../constants").TAX_INVOICE_PROVIDER_ENUM | null | undefined;
55
- tax_invoice_generation_id?: string | null | undefined;
56
- _tax_invoice_generation_token?: string | null | undefined;
57
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
58
- createdAt: NativeDate;
59
- updatedAt: NativeDate;
60
- } & {
61
- _id: string;
62
- name: string;
63
- createdAt: NativeDate;
64
- updatedAt: NativeDate;
65
- image_url: string;
66
- brand_id: string;
67
- active: boolean;
68
- country_code: COUNTRY_CODE_ENUM;
69
- public_business_name: string;
70
- brand_color: string;
71
- country_name: COUNTRY_NAME_ENUM;
72
- coordinates: number[];
73
- warehouse_address: string;
74
- support_email: string;
75
- public_phone_numbers: string[];
76
- currency_code: CURRENCY_CODE_ENUM;
77
- currency_symbol: CURRENCY_SYMBOL_ENUM;
78
- currency_name: CURRENCY_NAME_ENUM;
79
- country_alpha_2: COUNTRY_ALPHA_2_ENUM;
80
- country_alpha_3: COUNTRY_ALPHA_3_ENUM;
81
- country_flag: COUNTRY_FLAG_ENUM;
82
- po_card_gst: number;
83
- po_cash_gst: number;
84
- invoice_card_gst: number;
85
- invoice_cash_gst: number;
86
- default_po_gst_type: GST_TYPE_ENUM;
87
- default_invoice_gst_type: GST_TYPE_ENUM;
88
- tax_business_number: string;
89
- track_purchase_order_number_by: TRACK_ORDER_NUMBER_ENUM;
90
- track_invoice_number_by: TRACK_ORDER_NUMBER_ENUM;
91
- operational_time_zone_offset_gmt: number;
92
- operational_start_time: number;
93
- operational_end_time: number;
94
- alert_phone_numbers: string[];
95
- alert_email_addresses: string[];
96
- alert_when: string[];
97
- enable_lot_serial_tracking: boolean;
98
- default_removal_strategy: REMOVAL_STRATEGY_ENUM;
99
- po_custom_payment_types: string[];
100
- invoice_custom_payment_types: string[];
101
- exclude_discount_from_gst?: boolean | null | undefined;
102
- is_gst_inclusive?: boolean | null | undefined;
103
- hide_gst_value?: boolean | null | undefined;
104
- tax_invoice_provider?: import("../../constants").TAX_INVOICE_PROVIDER_ENUM | null | undefined;
105
- tax_invoice_generation_id?: string | null | undefined;
106
- _tax_invoice_generation_token?: string | null | undefined;
107
- }>> & import("mongoose").FlatRecord<{
108
- createdAt: NativeDate;
109
- updatedAt: NativeDate;
110
- } & {
111
- _id: string;
112
- name: string;
113
- createdAt: NativeDate;
114
- updatedAt: NativeDate;
115
- image_url: string;
116
- brand_id: string;
117
- active: boolean;
118
- country_code: COUNTRY_CODE_ENUM;
119
- public_business_name: string;
120
- brand_color: string;
121
- country_name: COUNTRY_NAME_ENUM;
122
- coordinates: number[];
123
- warehouse_address: string;
124
- support_email: string;
125
- public_phone_numbers: string[];
126
- currency_code: CURRENCY_CODE_ENUM;
127
- currency_symbol: CURRENCY_SYMBOL_ENUM;
128
- currency_name: CURRENCY_NAME_ENUM;
129
- country_alpha_2: COUNTRY_ALPHA_2_ENUM;
130
- country_alpha_3: COUNTRY_ALPHA_3_ENUM;
131
- country_flag: COUNTRY_FLAG_ENUM;
132
- po_card_gst: number;
133
- po_cash_gst: number;
134
- invoice_card_gst: number;
135
- invoice_cash_gst: number;
136
- default_po_gst_type: GST_TYPE_ENUM;
137
- default_invoice_gst_type: GST_TYPE_ENUM;
138
- tax_business_number: string;
139
- track_purchase_order_number_by: TRACK_ORDER_NUMBER_ENUM;
140
- track_invoice_number_by: TRACK_ORDER_NUMBER_ENUM;
141
- operational_time_zone_offset_gmt: number;
142
- operational_start_time: number;
143
- operational_end_time: number;
144
- alert_phone_numbers: string[];
145
- alert_email_addresses: string[];
146
- alert_when: string[];
147
- enable_lot_serial_tracking: boolean;
148
- default_removal_strategy: REMOVAL_STRATEGY_ENUM;
149
- po_custom_payment_types: string[];
150
- invoice_custom_payment_types: string[];
151
- exclude_discount_from_gst?: boolean | null | undefined;
152
- is_gst_inclusive?: boolean | null | undefined;
153
- hide_gst_value?: boolean | null | undefined;
154
- tax_invoice_provider?: import("../../constants").TAX_INVOICE_PROVIDER_ENUM | null | undefined;
155
- tax_invoice_generation_id?: string | null | undefined;
156
- _tax_invoice_generation_token?: string | null | undefined;
157
- }> & Required<{
158
- _id: string;
159
- }> & {
160
- __v: number;
161
- }>;
162
- export declare const WAREHOUSE_SETTINGS_COLLECTION_NAME = "warehouses";