@kipicore/dbcore 1.1.631 → 1.1.632

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 (428) hide show
  1. package/dist/constants/app.d.ts +216 -73
  2. package/dist/constants/app.js +233 -77
  3. package/dist/constants/errorMessages.d.ts +203 -18
  4. package/dist/constants/errorMessages.js +256 -22
  5. package/dist/constants/successMessages.d.ts +300 -13
  6. package/dist/constants/successMessages.js +353 -17
  7. package/dist/db/psql/migrations/20260626000010-create_account_vouchers.js +93 -0
  8. package/dist/db/psql/migrations/20260626000011-create_account_journal_entries.js +77 -0
  9. package/dist/db/psql/migrations/20260627000001-create-account-expense-categories.js +64 -0
  10. package/dist/db/psql/migrations/20260627000002-create-account-expense-requests.d.ts +2 -0
  11. package/dist/db/psql/migrations/20260627000002-create-account-expense-requests.js +86 -0
  12. package/dist/db/psql/migrations/20260627000003-create-account-expense-payments.d.ts +2 -0
  13. package/dist/db/psql/migrations/20260627000003-create-account-expense-payments.js +76 -0
  14. package/dist/db/psql/migrations/20260627000004-create-account-vendor-invoices.d.ts +2 -0
  15. package/dist/db/psql/migrations/20260627000004-create-account-vendor-invoices.js +94 -0
  16. package/dist/db/psql/migrations/20260627000005-create-account-vendor-payments.d.ts +2 -0
  17. package/dist/db/psql/migrations/20260627000005-create-account-vendor-payments.js +80 -0
  18. package/dist/db/psql/migrations/20260627000006-create-account-bank-reconciliation-batches.d.ts +2 -0
  19. package/dist/db/psql/migrations/20260627000006-create-account-bank-reconciliation-batches.js +81 -0
  20. package/dist/db/psql/migrations/20260627000007-create-account-bank-statement-lines.d.ts +2 -0
  21. package/dist/db/psql/migrations/20260627000007-create-account-bank-statement-lines.js +83 -0
  22. package/dist/db/psql/migrations/20260627000008-create-account-bank-reconciliation-matches.d.ts +2 -0
  23. package/dist/db/psql/migrations/20260627000008-create-account-bank-reconciliation-matches.js +70 -0
  24. package/dist/db/psql/migrations/20260627000009-create-account-asset-categories.d.ts +2 -0
  25. package/dist/db/psql/migrations/20260627000009-create-account-asset-categories.js +83 -0
  26. package/dist/db/psql/migrations/20260627000010-create-account-fixed-assets.d.ts +2 -0
  27. package/dist/db/psql/migrations/20260627000010-create-account-fixed-assets.js +78 -0
  28. package/dist/db/psql/migrations/20260627000011-create-account-asset-depreciation-schedules.d.ts +2 -0
  29. package/dist/db/psql/migrations/20260627000011-create-account-asset-depreciation-schedules.js +69 -0
  30. package/dist/db/psql/migrations/20260627000012-create-account-asset-disposals.d.ts +2 -0
  31. package/dist/db/psql/migrations/20260627000012-create-account-asset-disposals.js +70 -0
  32. package/dist/db/psql/migrations/20260627000012-create_account_journal_lines.d.ts +2 -0
  33. package/dist/db/psql/migrations/20260627000012-create_account_journal_lines.js +81 -0
  34. package/dist/db/psql/migrations/20260627000013-create-account-inventory-valuations.d.ts +2 -0
  35. package/dist/db/psql/migrations/20260627000013-create-account-inventory-valuations.js +79 -0
  36. package/dist/db/psql/migrations/20260627000013-create_account_ledger_balances.d.ts +2 -0
  37. package/dist/db/psql/migrations/20260627000013-create_account_ledger_balances.js +77 -0
  38. package/dist/db/psql/migrations/20260627000014-create-account-inventory-postings.d.ts +2 -0
  39. package/dist/db/psql/migrations/20260627000014-create-account-inventory-postings.js +69 -0
  40. package/dist/db/psql/migrations/20260627000014-create_account_posting_events.d.ts +2 -0
  41. package/dist/db/psql/migrations/20260627000014-create_account_posting_events.js +89 -0
  42. package/dist/db/psql/migrations/20260627000015-create-account-approval-workflows.d.ts +2 -0
  43. package/dist/db/psql/migrations/20260627000015-create-account-approval-workflows.js +56 -0
  44. package/dist/db/psql/migrations/20260627000015-create_account_posting_rules.d.ts +2 -0
  45. package/dist/db/psql/migrations/20260627000015-create_account_posting_rules.js +85 -0
  46. package/dist/db/psql/migrations/20260627000016-create-account-approval-steps.d.ts +2 -0
  47. package/dist/db/psql/migrations/20260627000016-create-account-approval-steps.js +73 -0
  48. package/dist/db/psql/migrations/20260627000016-create_account_rule_ledger_mappings.d.ts +2 -0
  49. package/dist/db/psql/migrations/20260627000016-create_account_rule_ledger_mappings.js +82 -0
  50. package/dist/db/psql/migrations/20260627000017-create-account-approval-requests.d.ts +2 -0
  51. package/dist/db/psql/migrations/20260627000017-create-account-approval-requests.js +77 -0
  52. package/dist/db/psql/migrations/20260627000017-create_account_party_accounts.d.ts +2 -0
  53. package/dist/db/psql/migrations/20260627000017-create_account_party_accounts.js +65 -0
  54. package/dist/db/psql/migrations/20260627000018-create-account-approval-actions.d.ts +2 -0
  55. package/dist/db/psql/migrations/20260627000018-create-account-approval-actions.js +72 -0
  56. package/dist/db/psql/migrations/20260627000019-create-account-integration-connections.d.ts +2 -0
  57. package/dist/db/psql/migrations/20260627000019-create-account-integration-connections.js +56 -0
  58. package/dist/db/psql/migrations/20260627000020-create-account-integration-mappings.d.ts +2 -0
  59. package/dist/db/psql/migrations/20260627000020-create-account-integration-mappings.js +76 -0
  60. package/dist/db/psql/migrations/20260627000021-create-account-sync-jobs.d.ts +2 -0
  61. package/dist/db/psql/migrations/20260627000021-create-account-sync-jobs.js +81 -0
  62. package/dist/db/psql/migrations/20260627000022-create-account-sync-logs.d.ts +2 -0
  63. package/dist/db/psql/migrations/20260627000022-create-account-sync-logs.js +72 -0
  64. package/dist/db/psql/migrations/20260627000023-create-account-webhook-subscriptions.d.ts +2 -0
  65. package/dist/db/psql/migrations/20260627000023-create-account-webhook-subscriptions.js +65 -0
  66. package/dist/db/psql/migrations/20260627000024-create-account-webhook-deliveries.d.ts +2 -0
  67. package/dist/db/psql/migrations/20260627000024-create-account-webhook-deliveries.js +77 -0
  68. package/dist/db/psql/migrations/20260627000025-create-account-report-snapshots.d.ts +2 -0
  69. package/dist/db/psql/migrations/20260627000025-create-account-report-snapshots.js +76 -0
  70. package/dist/db/psql/migrations/20260627000026-create-account-financial-kpis.d.ts +2 -0
  71. package/dist/db/psql/migrations/20260627000026-create-account-financial-kpis.js +72 -0
  72. package/dist/db/psql/migrations/20260627000027-create-account-budgets.d.ts +2 -0
  73. package/dist/db/psql/migrations/20260627000027-create-account-budgets.js +76 -0
  74. package/dist/db/psql/migrations/20260627000028-create-account-budget-periods.d.ts +2 -0
  75. package/dist/db/psql/migrations/20260627000028-create-account-budget-periods.js +64 -0
  76. package/dist/db/psql/migrations/20260627000029-create-account-budget-consumptions.d.ts +2 -0
  77. package/dist/db/psql/migrations/20260627000029-create-account-budget-consumptions.js +64 -0
  78. package/dist/db/psql/migrations/20260627000030-create-account-tax-types.d.ts +2 -0
  79. package/dist/db/psql/migrations/20260627000030-create-account-tax-types.js +72 -0
  80. package/dist/db/psql/migrations/20260627000031-create-account-tax-entries.d.ts +2 -0
  81. package/dist/db/psql/migrations/20260627000031-create-account-tax-entries.js +64 -0
  82. package/dist/db/psql/migrations/20260627000032-create-account-funds.d.ts +2 -0
  83. package/dist/db/psql/migrations/20260627000032-create-account-funds.js +80 -0
  84. package/dist/db/psql/migrations/20260627000033-create-account-donors.d.ts +2 -0
  85. package/dist/db/psql/migrations/20260627000033-create-account-donors.js +68 -0
  86. package/dist/db/psql/migrations/20260627000034-create-account-grants.d.ts +2 -0
  87. package/dist/db/psql/migrations/20260627000034-create-account-grants.js +76 -0
  88. package/dist/db/psql/migrations/20260627000035-create-account-fund-transactions.d.ts +2 -0
  89. package/dist/db/psql/migrations/20260627000035-create-account-fund-transactions.js +80 -0
  90. package/dist/helpers/s3Uploader.d.ts +0 -1
  91. package/dist/helpers/s3Uploader.js +1 -20
  92. package/dist/interfaces/accountApprovalActionInterface.d.ts +13 -0
  93. package/dist/interfaces/accountApprovalRequestInterface.d.ts +14 -0
  94. package/dist/interfaces/accountApprovalStepInterface.d.ts +12 -0
  95. package/dist/interfaces/accountApprovalWorkflowInterface.d.ts +9 -0
  96. package/dist/interfaces/accountAssetCategoryInterface.d.ts +15 -0
  97. package/dist/interfaces/accountAssetCategoryInterface.js +2 -0
  98. package/dist/interfaces/accountAssetDepreciationScheduleInterface.d.ts +11 -0
  99. package/dist/interfaces/accountAssetDepreciationScheduleInterface.js +2 -0
  100. package/dist/interfaces/accountAssetDisposalInterface.d.ts +11 -0
  101. package/dist/interfaces/accountAssetDisposalInterface.js +2 -0
  102. package/dist/interfaces/accountBankReconciliationBatchInterface.d.ts +20 -0
  103. package/dist/interfaces/accountBankReconciliationBatchInterface.js +2 -0
  104. package/dist/interfaces/accountBankReconciliationMatchInterface.d.ts +12 -0
  105. package/dist/interfaces/accountBankReconciliationMatchInterface.js +2 -0
  106. package/dist/interfaces/accountBankStatementLineInterface.d.ts +15 -0
  107. package/dist/interfaces/accountBankStatementLineInterface.js +2 -0
  108. package/dist/interfaces/accountBudgetConsumptionInterface.d.ts +10 -0
  109. package/dist/interfaces/accountBudgetConsumptionInterface.js +2 -0
  110. package/dist/interfaces/accountBudgetInterface.d.ts +35 -0
  111. package/dist/interfaces/accountBudgetInterface.js +2 -0
  112. package/dist/interfaces/accountBudgetPeriodInterface.d.ts +10 -0
  113. package/dist/interfaces/accountBudgetPeriodInterface.js +2 -0
  114. package/dist/interfaces/accountCostCenterInterface.d.ts +3 -0
  115. package/dist/interfaces/accountDashboardInterface.d.ts +75 -0
  116. package/dist/interfaces/accountDashboardInterface.js +2 -0
  117. package/dist/interfaces/accountDonorInterface.d.ts +12 -0
  118. package/dist/interfaces/accountDonorInterface.js +2 -0
  119. package/dist/interfaces/accountExpenseCategoryInterface.d.ts +10 -0
  120. package/dist/interfaces/accountExpenseCategoryInterface.js +2 -0
  121. package/dist/interfaces/accountExpensePaymentInterface.d.ts +14 -0
  122. package/dist/interfaces/accountExpensePaymentInterface.js +2 -0
  123. package/dist/interfaces/accountExpenseRequestInterface.d.ts +27 -0
  124. package/dist/interfaces/accountExpenseRequestInterface.js +2 -0
  125. package/dist/interfaces/accountFinancialKpiInterface.d.ts +13 -0
  126. package/dist/interfaces/accountFinancialKpiInterface.js +2 -0
  127. package/dist/interfaces/accountFinancialYearInterface.d.ts +6 -0
  128. package/dist/interfaces/accountFixedAssetInterface.d.ts +13 -0
  129. package/dist/interfaces/accountFixedAssetInterface.js +2 -0
  130. package/dist/interfaces/accountFundInterface.d.ts +24 -0
  131. package/dist/interfaces/accountFundInterface.js +2 -0
  132. package/dist/interfaces/accountFundTransactionInterface.d.ts +15 -0
  133. package/dist/interfaces/accountFundTransactionInterface.js +2 -0
  134. package/dist/interfaces/accountGrantInterface.d.ts +14 -0
  135. package/dist/interfaces/accountGrantInterface.js +2 -0
  136. package/dist/interfaces/accountGroupInterface.d.ts +3 -0
  137. package/dist/interfaces/accountIntegrationConnectionInterface.d.ts +9 -0
  138. package/dist/interfaces/accountIntegrationConnectionInterface.js +2 -0
  139. package/dist/interfaces/accountIntegrationMappingInterface.d.ts +14 -0
  140. package/dist/interfaces/accountIntegrationMappingInterface.js +2 -0
  141. package/dist/interfaces/accountInventoryPostingInterface.d.ts +12 -0
  142. package/dist/interfaces/accountInventoryPostingInterface.js +2 -0
  143. package/dist/interfaces/accountInventoryValuationInterface.d.ts +14 -0
  144. package/dist/interfaces/accountInventoryValuationInterface.js +2 -0
  145. package/dist/interfaces/accountJournalEntryInterface.d.ts +19 -0
  146. package/dist/interfaces/accountJournalEntryInterface.js +2 -0
  147. package/dist/interfaces/accountJournalLineInterface.d.ts +28 -0
  148. package/dist/interfaces/accountJournalLineInterface.js +2 -0
  149. package/dist/interfaces/accountLedgerBalanceInterface.d.ts +17 -0
  150. package/dist/interfaces/accountLedgerBalanceInterface.js +2 -0
  151. package/dist/interfaces/accountLedgerInterface.d.ts +17 -0
  152. package/dist/interfaces/accountPartyAccountInterface.d.ts +14 -0
  153. package/dist/interfaces/accountPartyAccountInterface.js +2 -0
  154. package/dist/interfaces/accountPostingEventInterface.d.ts +32 -0
  155. package/dist/interfaces/accountPostingEventInterface.js +2 -0
  156. package/dist/interfaces/accountPostingRuleInterface.d.ts +24 -0
  157. package/dist/interfaces/accountPostingRuleInterface.js +2 -0
  158. package/dist/interfaces/accountReportSnapshotInterface.d.ts +14 -0
  159. package/dist/interfaces/accountReportSnapshotInterface.js +2 -0
  160. package/dist/interfaces/accountReportingInterface.d.ts +282 -0
  161. package/dist/interfaces/accountReportingInterface.js +2 -0
  162. package/dist/interfaces/accountRuleLedgerMappingInterface.d.ts +20 -0
  163. package/dist/interfaces/accountRuleLedgerMappingInterface.js +2 -0
  164. package/dist/interfaces/accountSettingInterface.d.ts +11 -0
  165. package/dist/interfaces/accountSettingInterface.js +2 -0
  166. package/dist/interfaces/accountSyncJobInterface.d.ts +15 -0
  167. package/dist/interfaces/accountSyncJobInterface.js +2 -0
  168. package/dist/interfaces/accountSyncLogInterface.d.ts +13 -0
  169. package/dist/interfaces/accountSyncLogInterface.js +2 -0
  170. package/dist/interfaces/accountTaxEntryInterface.d.ts +24 -0
  171. package/dist/interfaces/accountTaxEntryInterface.js +2 -0
  172. package/dist/interfaces/accountTaxTypeInterface.d.ts +13 -0
  173. package/dist/interfaces/accountTaxTypeInterface.js +2 -0
  174. package/dist/interfaces/accountVendorInvoiceInterface.d.ts +41 -0
  175. package/dist/interfaces/accountVendorInvoiceInterface.js +2 -0
  176. package/dist/interfaces/accountVendorPaymentInterface.d.ts +15 -0
  177. package/dist/interfaces/accountVendorPaymentInterface.js +2 -0
  178. package/dist/interfaces/accountVoucherInterface.d.ts +42 -0
  179. package/dist/interfaces/accountVoucherInterface.js +2 -0
  180. package/dist/interfaces/accountWebhookDeliveryInterface.d.ts +14 -0
  181. package/dist/interfaces/accountWebhookDeliveryInterface.js +2 -0
  182. package/dist/interfaces/accountWebhookSubscriptionInterface.d.ts +11 -0
  183. package/dist/interfaces/accountWebhookSubscriptionInterface.js +2 -0
  184. package/dist/interfaces/accountsActivityStreamInterface.d.ts +14 -0
  185. package/dist/interfaces/accountsActivityStreamInterface.js +2 -0
  186. package/dist/interfaces/accountsAttachmentInterface.d.ts +14 -0
  187. package/dist/interfaces/accountsAttachmentInterface.js +2 -0
  188. package/dist/interfaces/accountsAuditLogInterface.d.ts +19 -0
  189. package/dist/interfaces/accountsAuditLogInterface.js +2 -0
  190. package/dist/interfaces/accountsNotificationInterface.d.ts +15 -0
  191. package/dist/interfaces/accountsNotificationInterface.js +2 -0
  192. package/dist/interfaces/accountsSyncPayloadInterface.d.ts +14 -0
  193. package/dist/interfaces/accountsSyncPayloadInterface.js +2 -0
  194. package/dist/interfaces/accountsWorkflowHistoryInterface.d.ts +15 -0
  195. package/dist/interfaces/accountsWorkflowHistoryInterface.js +2 -0
  196. package/dist/interfaces/index.d.ts +52 -2
  197. package/dist/interfaces/index.js +52 -2
  198. package/dist/interfaces/refundInterface.d.ts +0 -2
  199. package/dist/interfaces/rmsAssetTransactionInterface.d.ts +1 -1
  200. package/dist/models/mongodb/accountSettingModel.d.ts +4 -0
  201. package/dist/models/mongodb/{productMetaModel.js → accountSettingModel.js} +14 -61
  202. package/dist/models/mongodb/accountsActivityStreamModel.d.ts +4 -0
  203. package/dist/models/mongodb/accountsActivityStreamModel.js +52 -0
  204. package/dist/models/mongodb/accountsAttachmentModel.d.ts +4 -0
  205. package/dist/models/mongodb/accountsAttachmentModel.js +53 -0
  206. package/dist/models/mongodb/accountsAuditLogModel.d.ts +4 -0
  207. package/dist/models/mongodb/accountsAuditLogModel.js +57 -0
  208. package/dist/models/mongodb/accountsNotificationModel.d.ts +4 -0
  209. package/dist/models/mongodb/accountsNotificationModel.js +54 -0
  210. package/dist/models/mongodb/accountsSyncPayloadModel.d.ts +4 -0
  211. package/dist/models/mongodb/accountsSyncPayloadModel.js +53 -0
  212. package/dist/models/mongodb/accountsWorkflowHistoryModel.d.ts +4 -0
  213. package/dist/models/mongodb/accountsWorkflowHistoryModel.js +54 -0
  214. package/dist/models/mongodb/index.d.ts +7 -2
  215. package/dist/models/mongodb/index.js +16 -5
  216. package/dist/models/psql/accountApprovalActionModel.d.ts +23 -0
  217. package/dist/models/psql/accountApprovalActionModel.js +82 -0
  218. package/dist/models/psql/accountApprovalRequestModel.d.ts +24 -0
  219. package/dist/models/psql/accountApprovalRequestModel.js +85 -0
  220. package/dist/models/psql/accountApprovalStepModel.d.ts +22 -0
  221. package/dist/models/psql/accountApprovalStepModel.js +83 -0
  222. package/dist/models/psql/accountApprovalWorkflowModel.d.ts +19 -0
  223. package/dist/models/psql/accountApprovalWorkflowModel.js +55 -0
  224. package/dist/models/psql/accountAssetCategoryModel.d.ts +25 -0
  225. package/dist/models/psql/accountAssetCategoryModel.js +94 -0
  226. package/dist/models/psql/accountAssetDepreciationScheduleModel.d.ts +21 -0
  227. package/dist/models/psql/accountAssetDepreciationScheduleModel.js +77 -0
  228. package/dist/models/psql/accountAssetDisposalModel.d.ts +21 -0
  229. package/dist/models/psql/accountAssetDisposalModel.js +78 -0
  230. package/dist/models/psql/accountBankReconciliationBatchModel.d.ts +25 -0
  231. package/dist/models/psql/accountBankReconciliationBatchModel.js +92 -0
  232. package/dist/models/psql/accountBankReconciliationMatchModel.d.ts +22 -0
  233. package/dist/models/psql/accountBankReconciliationMatchModel.js +82 -0
  234. package/dist/models/psql/accountBankStatementLineModel.d.ts +25 -0
  235. package/dist/models/psql/accountBankStatementLineModel.js +92 -0
  236. package/dist/models/psql/accountBudgetConsumptionModel.d.ts +20 -0
  237. package/dist/models/psql/accountBudgetConsumptionModel.js +71 -0
  238. package/dist/models/psql/accountBudgetModel.d.ts +24 -0
  239. package/dist/models/psql/accountBudgetModel.js +92 -0
  240. package/dist/models/psql/accountBudgetPeriodModel.d.ts +20 -0
  241. package/dist/models/psql/accountBudgetPeriodModel.js +68 -0
  242. package/dist/models/psql/accountDonorModel.d.ts +22 -0
  243. package/dist/models/psql/accountDonorModel.js +73 -0
  244. package/dist/models/psql/accountExpenseCategoryModel.d.ts +20 -0
  245. package/dist/models/psql/accountExpenseCategoryModel.js +71 -0
  246. package/dist/models/psql/accountExpensePaymentModel.d.ts +24 -0
  247. package/dist/models/psql/accountExpensePaymentModel.js +89 -0
  248. package/dist/models/psql/accountExpenseRequestModel.d.ts +26 -0
  249. package/dist/models/psql/accountExpenseRequestModel.js +102 -0
  250. package/dist/models/psql/accountFinancialKpiModel.d.ts +23 -0
  251. package/dist/models/psql/accountFinancialKpiModel.js +81 -0
  252. package/dist/models/psql/accountFixedAssetModel.d.ts +23 -0
  253. package/dist/models/psql/accountFixedAssetModel.js +85 -0
  254. package/dist/models/psql/accountFundModel.d.ts +25 -0
  255. package/dist/models/psql/accountFundModel.js +88 -0
  256. package/dist/models/psql/accountFundTransactionModel.d.ts +25 -0
  257. package/dist/models/psql/accountFundTransactionModel.js +97 -0
  258. package/dist/models/psql/accountGrantModel.d.ts +24 -0
  259. package/dist/models/psql/accountGrantModel.js +83 -0
  260. package/dist/models/psql/accountIntegrationConnectionModel.d.ts +19 -0
  261. package/dist/models/psql/accountIntegrationConnectionModel.js +55 -0
  262. package/dist/models/psql/accountIntegrationMappingModel.d.ts +24 -0
  263. package/dist/models/psql/accountIntegrationMappingModel.js +83 -0
  264. package/dist/models/psql/accountInventoryPostingModel.d.ts +22 -0
  265. package/dist/models/psql/accountInventoryPostingModel.js +74 -0
  266. package/dist/models/psql/accountInventoryValuationModel.d.ts +24 -0
  267. package/dist/models/psql/accountInventoryValuationModel.js +89 -0
  268. package/dist/models/psql/accountJournalEntryModel.d.ts +24 -0
  269. package/dist/models/psql/accountJournalEntryModel.js +87 -0
  270. package/dist/models/psql/accountJournalLineModel.d.ts +24 -0
  271. package/dist/models/psql/accountJournalLineModel.js +95 -0
  272. package/dist/models/psql/accountLedgerBalanceModel.d.ts +23 -0
  273. package/dist/models/psql/accountLedgerBalanceModel.js +87 -0
  274. package/dist/models/psql/accountPartyAccountModel.d.ts +21 -0
  275. package/dist/models/psql/accountPartyAccountModel.js +68 -0
  276. package/dist/models/psql/accountPostingEventModel.d.ts +27 -0
  277. package/dist/models/psql/accountPostingEventModel.js +98 -0
  278. package/dist/models/psql/accountPostingRuleModel.d.ts +26 -0
  279. package/dist/models/psql/accountPostingRuleModel.js +90 -0
  280. package/dist/models/psql/accountReportSnapshotModel.d.ts +24 -0
  281. package/dist/models/psql/accountReportSnapshotModel.js +84 -0
  282. package/dist/models/psql/accountRuleLedgerMappingModel.d.ts +24 -0
  283. package/dist/models/psql/accountRuleLedgerMappingModel.js +97 -0
  284. package/dist/models/psql/accountSyncJobModel.d.ts +25 -0
  285. package/dist/models/psql/accountSyncJobModel.js +89 -0
  286. package/dist/models/psql/accountSyncLogModel.d.ts +23 -0
  287. package/dist/models/psql/accountSyncLogModel.js +78 -0
  288. package/dist/models/psql/accountTaxEntryModel.d.ts +20 -0
  289. package/dist/models/psql/accountTaxEntryModel.js +71 -0
  290. package/dist/models/psql/accountTaxTypeModel.d.ts +23 -0
  291. package/dist/models/psql/accountTaxTypeModel.js +79 -0
  292. package/dist/models/psql/accountVendorInvoiceModel.d.ts +28 -0
  293. package/dist/models/psql/accountVendorInvoiceModel.js +109 -0
  294. package/dist/models/psql/accountVendorPaymentModel.d.ts +25 -0
  295. package/dist/models/psql/accountVendorPaymentModel.js +95 -0
  296. package/dist/models/psql/accountVoucherModel.d.ts +28 -0
  297. package/dist/models/psql/accountVoucherModel.js +111 -0
  298. package/dist/models/psql/accountWebhookDeliveryModel.d.ts +24 -0
  299. package/dist/models/psql/accountWebhookDeliveryModel.js +84 -0
  300. package/dist/models/psql/accountWebhookSubscriptionModel.d.ts +21 -0
  301. package/dist/models/psql/accountWebhookSubscriptionModel.js +66 -0
  302. package/dist/models/psql/index.d.ts +43 -0
  303. package/dist/models/psql/index.js +88 -1
  304. package/dist/models/psql/refundModel.d.ts +0 -2
  305. package/dist/models/psql/refundModel.js +0 -17
  306. package/dist/models/psql/rmsAssetTransactionModel.d.ts +1 -1
  307. package/dist/models/psql/rmsAssetTransactionModel.js +4 -6
  308. package/dist/models/psql/userModel.js +0 -1
  309. package/dist/types/accountApprovalActionType.d.ts +2 -0
  310. package/dist/types/accountApprovalActionType.js +2 -0
  311. package/dist/types/accountApprovalRequestType.d.ts +2 -0
  312. package/dist/types/accountApprovalRequestType.js +2 -0
  313. package/dist/types/accountApprovalStepType.d.ts +2 -0
  314. package/dist/types/accountApprovalStepType.js +2 -0
  315. package/dist/types/accountApprovalWorkflowType.d.ts +2 -0
  316. package/dist/types/accountApprovalWorkflowType.js +2 -0
  317. package/dist/types/accountAssetCategoryType.d.ts +2 -0
  318. package/dist/types/accountAssetCategoryType.js +2 -0
  319. package/dist/types/accountAssetDepreciationScheduleType.d.ts +2 -0
  320. package/dist/types/accountAssetDepreciationScheduleType.js +2 -0
  321. package/dist/types/accountAssetDisposalType.d.ts +2 -0
  322. package/dist/types/accountAssetDisposalType.js +2 -0
  323. package/dist/types/accountBankReconciliationBatchType.d.ts +2 -0
  324. package/dist/types/accountBankReconciliationBatchType.js +2 -0
  325. package/dist/types/accountBankReconciliationMatchType.d.ts +2 -0
  326. package/dist/types/accountBankReconciliationMatchType.js +2 -0
  327. package/dist/types/accountBankStatementLineType.d.ts +2 -0
  328. package/dist/types/accountBankStatementLineType.js +2 -0
  329. package/dist/types/accountBudgetConsumptionType.d.ts +2 -0
  330. package/dist/types/accountBudgetConsumptionType.js +2 -0
  331. package/dist/types/accountBudgetPeriodType.d.ts +2 -0
  332. package/dist/types/accountBudgetPeriodType.js +2 -0
  333. package/dist/types/accountBudgetType.d.ts +2 -0
  334. package/dist/types/accountBudgetType.js +2 -0
  335. package/dist/types/accountDonorType.d.ts +2 -0
  336. package/dist/types/accountDonorType.js +2 -0
  337. package/dist/types/accountExpenseCategoryType.d.ts +2 -0
  338. package/dist/types/accountExpenseCategoryType.js +2 -0
  339. package/dist/types/accountExpensePaymentType.d.ts +2 -0
  340. package/dist/types/accountExpensePaymentType.js +2 -0
  341. package/dist/types/accountExpenseRequestType.d.ts +2 -0
  342. package/dist/types/accountExpenseRequestType.js +2 -0
  343. package/dist/types/accountFinancialKpiType.d.ts +2 -0
  344. package/dist/types/accountFinancialKpiType.js +2 -0
  345. package/dist/types/accountFixedAssetType.d.ts +2 -0
  346. package/dist/types/accountFixedAssetType.js +2 -0
  347. package/dist/types/accountFundTransactionType.d.ts +2 -0
  348. package/dist/types/accountFundTransactionType.js +2 -0
  349. package/dist/types/accountFundType.d.ts +2 -0
  350. package/dist/types/accountFundType.js +2 -0
  351. package/dist/types/accountGrantType.d.ts +2 -0
  352. package/dist/types/accountGrantType.js +2 -0
  353. package/dist/types/accountIntegrationConnectionType.d.ts +2 -0
  354. package/dist/types/accountIntegrationConnectionType.js +2 -0
  355. package/dist/types/accountIntegrationMappingType.d.ts +2 -0
  356. package/dist/types/accountIntegrationMappingType.js +2 -0
  357. package/dist/types/accountInventoryPostingType.d.ts +2 -0
  358. package/dist/types/accountInventoryPostingType.js +2 -0
  359. package/dist/types/accountInventoryValuationType.d.ts +2 -0
  360. package/dist/types/accountInventoryValuationType.js +2 -0
  361. package/dist/types/accountJournalEntryType.d.ts +3 -0
  362. package/dist/types/accountJournalEntryType.js +2 -0
  363. package/dist/types/accountJournalLineType.d.ts +3 -0
  364. package/dist/types/accountJournalLineType.js +2 -0
  365. package/dist/types/accountLedgerBalanceType.d.ts +3 -0
  366. package/dist/types/accountLedgerBalanceType.js +2 -0
  367. package/dist/types/accountPartyAccountType.d.ts +3 -0
  368. package/dist/types/accountPartyAccountType.js +2 -0
  369. package/dist/types/accountPostingEventType.d.ts +3 -0
  370. package/dist/types/accountPostingEventType.js +2 -0
  371. package/dist/types/accountPostingRuleType.d.ts +3 -0
  372. package/dist/types/accountPostingRuleType.js +2 -0
  373. package/dist/types/accountReportSnapshotType.d.ts +2 -0
  374. package/dist/types/accountReportSnapshotType.js +2 -0
  375. package/dist/types/accountRuleLedgerMappingType.d.ts +3 -0
  376. package/dist/types/accountRuleLedgerMappingType.js +2 -0
  377. package/dist/types/accountSettingType.d.ts +2 -0
  378. package/dist/types/accountSettingType.js +2 -0
  379. package/dist/types/accountSyncJobType.d.ts +2 -0
  380. package/dist/types/accountSyncJobType.js +2 -0
  381. package/dist/types/accountSyncLogType.d.ts +2 -0
  382. package/dist/types/accountSyncLogType.js +2 -0
  383. package/dist/types/accountTaxEntryType.d.ts +2 -0
  384. package/dist/types/accountTaxEntryType.js +2 -0
  385. package/dist/types/accountTaxTypeType.d.ts +2 -0
  386. package/dist/types/accountTaxTypeType.js +2 -0
  387. package/dist/types/accountVendorInvoiceType.d.ts +2 -0
  388. package/dist/types/accountVendorInvoiceType.js +2 -0
  389. package/dist/types/accountVendorPaymentType.d.ts +2 -0
  390. package/dist/types/accountVendorPaymentType.js +2 -0
  391. package/dist/types/accountVoucherType.d.ts +3 -0
  392. package/dist/types/accountVoucherType.js +2 -0
  393. package/dist/types/accountWebhookDeliveryType.d.ts +2 -0
  394. package/dist/types/accountWebhookDeliveryType.js +2 -0
  395. package/dist/types/accountWebhookSubscriptionType.d.ts +2 -0
  396. package/dist/types/accountWebhookSubscriptionType.js +2 -0
  397. package/dist/types/accountsActivityStreamType.d.ts +2 -0
  398. package/dist/types/accountsActivityStreamType.js +2 -0
  399. package/dist/types/accountsAttachmentType.d.ts +2 -0
  400. package/dist/types/accountsAttachmentType.js +2 -0
  401. package/dist/types/accountsAuditLogType.d.ts +2 -0
  402. package/dist/types/accountsAuditLogType.js +2 -0
  403. package/dist/types/accountsNotificationType.d.ts +2 -0
  404. package/dist/types/accountsNotificationType.js +2 -0
  405. package/dist/types/accountsSyncPayloadType.d.ts +2 -0
  406. package/dist/types/accountsSyncPayloadType.js +2 -0
  407. package/dist/types/accountsWorkflowHistoryType.d.ts +2 -0
  408. package/dist/types/accountsWorkflowHistoryType.js +2 -0
  409. package/dist/types/index.d.ts +50 -2
  410. package/dist/types/index.js +50 -2
  411. package/package.json +1 -1
  412. package/dist/db/psql/migrations/20260630000001-alter_rms_asset_transactions_user_penalty_id.js +0 -21
  413. package/dist/db/psql/migrations/20260702000000-add-amount-to-refunds.js +0 -13
  414. package/dist/db/psql/migrations/20260702000001-add-user-id-to-refunds.js +0 -13
  415. package/dist/interfaces/productMetaInterface.d.ts +0 -19
  416. package/dist/interfaces/vendorCompanyMetaInterface.d.ts +0 -34
  417. package/dist/models/mongodb/productMetaModel.d.ts +0 -4
  418. package/dist/models/mongodb/vendorCompanyMetaModel.d.ts +0 -4
  419. package/dist/models/mongodb/vendorCompanyMetaModel.js +0 -142
  420. package/dist/types/productMetaType.d.ts +0 -2
  421. package/dist/types/vendorCompanyMetaType.d.ts +0 -2
  422. /package/dist/db/psql/migrations/{20260702000000-add-amount-to-refunds.d.ts → 20260626000010-create_account_vouchers.d.ts} +0 -0
  423. /package/dist/db/psql/migrations/{20260702000001-add-user-id-to-refunds.d.ts → 20260626000011-create_account_journal_entries.d.ts} +0 -0
  424. /package/dist/db/psql/migrations/{20260630000001-alter_rms_asset_transactions_user_penalty_id.d.ts → 20260627000001-create-account-expense-categories.d.ts} +0 -0
  425. /package/dist/interfaces/{productMetaInterface.js → accountApprovalActionInterface.js} +0 -0
  426. /package/dist/interfaces/{vendorCompanyMetaInterface.js → accountApprovalRequestInterface.js} +0 -0
  427. /package/dist/{types/productMetaType.js → interfaces/accountApprovalStepInterface.js} +0 -0
  428. /package/dist/{types/vendorCompanyMetaType.js → interfaces/accountApprovalWorkflowInterface.js} +0 -0
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sequelize_1 = require("sequelize");
4
+ const index_1 = require("./index");
5
+ class AccountTaxEntryModel extends sequelize_1.Model {
6
+ static associate(models) {
7
+ const { InstituteModel, AcademicCalendarModel, AccountTaxTypeModel, AccountJournalLineModel, UserModel, } = models;
8
+ if (InstituteModel) {
9
+ AccountTaxEntryModel.belongsTo(InstituteModel, { foreignKey: 'instituteId', as: 'institute' });
10
+ }
11
+ if (AcademicCalendarModel) {
12
+ AccountTaxEntryModel.belongsTo(AcademicCalendarModel, { foreignKey: 'academicCalendarId', as: 'academicCalendar' });
13
+ }
14
+ if (AccountTaxTypeModel) {
15
+ AccountTaxEntryModel.belongsTo(AccountTaxTypeModel, { foreignKey: 'taxTypeId', as: 'taxType' });
16
+ }
17
+ if (AccountJournalLineModel) {
18
+ AccountTaxEntryModel.belongsTo(AccountJournalLineModel, { foreignKey: 'journalLineId', as: 'journalLine' });
19
+ }
20
+ if (UserModel) {
21
+ AccountTaxEntryModel.belongsTo(UserModel, { foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' }, as: 'createdByUser' });
22
+ AccountTaxEntryModel.belongsTo(UserModel, { foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' }, as: 'updatedByUser' });
23
+ AccountTaxEntryModel.belongsTo(UserModel, { foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' }, as: 'deletedByUser' });
24
+ }
25
+ }
26
+ }
27
+ AccountTaxEntryModel.init({
28
+ id: {
29
+ type: sequelize_1.DataTypes.UUID,
30
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
31
+ primaryKey: true,
32
+ allowNull: false,
33
+ },
34
+ instituteId: {
35
+ type: sequelize_1.DataTypes.UUID,
36
+ allowNull: true,
37
+ field: 'institute_id',
38
+ },
39
+ academicCalendarId: {
40
+ type: sequelize_1.DataTypes.UUID,
41
+ allowNull: true,
42
+ field: 'academic_calendar_id',
43
+ },
44
+ taxTypeId: {
45
+ type: sequelize_1.DataTypes.UUID,
46
+ allowNull: true,
47
+ field: 'tax_type_id',
48
+ },
49
+ journalLineId: {
50
+ type: sequelize_1.DataTypes.UUID,
51
+ allowNull: true,
52
+ field: 'journal_line_id',
53
+ },
54
+ taxAmount: {
55
+ type: sequelize_1.DataTypes.DECIMAL(15, 2),
56
+ allowNull: true,
57
+ field: 'tax_amount',
58
+ },
59
+ baseAmount: {
60
+ type: sequelize_1.DataTypes.DECIMAL(15, 2),
61
+ allowNull: true,
62
+ field: 'base_amount',
63
+ },
64
+ }, {
65
+ sequelize: index_1.sequelize,
66
+ modelName: 'AccountTaxEntryModel',
67
+ tableName: 'account_tax_entries',
68
+ timestamps: true,
69
+ paranoid: true,
70
+ });
71
+ exports.default = AccountTaxEntryModel;
@@ -0,0 +1,23 @@
1
+ import { Model } from 'sequelize';
2
+ import { IAccountTaxTypeModelAttributes } from '../../interfaces/accountTaxTypeInterface';
3
+ import { TAccountTaxTypeModelCreationAttributes } from '../../types/accountTaxTypeType';
4
+ import { AccountTaxKind } from '../../constants/app';
5
+ declare class AccountTaxTypeModel extends Model<IAccountTaxTypeModelAttributes, TAccountTaxTypeModelCreationAttributes> implements IAccountTaxTypeModelAttributes {
6
+ id: string;
7
+ instituteId: string;
8
+ academicCalendarId: string;
9
+ code: string;
10
+ name: string;
11
+ taxKind: AccountTaxKind;
12
+ rate: number;
13
+ inputLedgerId?: string;
14
+ outputLedgerId?: string;
15
+ createdBy?: string;
16
+ updatedBy?: string;
17
+ deletedBy?: string;
18
+ readonly createdAt: Date;
19
+ readonly updatedAt: Date;
20
+ readonly deletedAt?: Date;
21
+ static associate(models: any): void;
22
+ }
23
+ export default AccountTaxTypeModel;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sequelize_1 = require("sequelize");
4
+ const index_1 = require("./index");
5
+ class AccountTaxTypeModel extends sequelize_1.Model {
6
+ static associate(models) {
7
+ const { InstituteModel, AcademicCalendarModel, AccountLedgerModel, UserModel, } = models;
8
+ if (InstituteModel) {
9
+ AccountTaxTypeModel.belongsTo(InstituteModel, { foreignKey: 'instituteId', as: 'institute' });
10
+ }
11
+ if (AcademicCalendarModel) {
12
+ AccountTaxTypeModel.belongsTo(AcademicCalendarModel, { foreignKey: 'academicCalendarId', as: 'academicCalendar' });
13
+ }
14
+ if (AccountLedgerModel) {
15
+ AccountTaxTypeModel.belongsTo(AccountLedgerModel, { foreignKey: 'inputLedgerId', as: 'inputLedger' });
16
+ AccountTaxTypeModel.belongsTo(AccountLedgerModel, { foreignKey: 'outputLedgerId', as: 'outputLedger' });
17
+ }
18
+ if (UserModel) {
19
+ AccountTaxTypeModel.belongsTo(UserModel, { foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' }, as: 'createdByUser' });
20
+ AccountTaxTypeModel.belongsTo(UserModel, { foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' }, as: 'updatedByUser' });
21
+ AccountTaxTypeModel.belongsTo(UserModel, { foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' }, as: 'deletedByUser' });
22
+ }
23
+ }
24
+ }
25
+ AccountTaxTypeModel.init({
26
+ id: {
27
+ type: sequelize_1.DataTypes.UUID,
28
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
29
+ primaryKey: true,
30
+ allowNull: false,
31
+ },
32
+ instituteId: {
33
+ type: sequelize_1.DataTypes.UUID,
34
+ allowNull: true,
35
+ field: 'institute_id',
36
+ },
37
+ academicCalendarId: {
38
+ type: sequelize_1.DataTypes.UUID,
39
+ allowNull: true,
40
+ field: 'academic_calendar_id',
41
+ },
42
+ code: {
43
+ type: sequelize_1.DataTypes.STRING,
44
+ allowNull: true,
45
+ field: 'code',
46
+ },
47
+ name: {
48
+ type: sequelize_1.DataTypes.STRING,
49
+ allowNull: true,
50
+ field: 'name',
51
+ },
52
+ taxKind: {
53
+ type: sequelize_1.DataTypes.STRING,
54
+ allowNull: true,
55
+ field: 'tax_kind',
56
+ },
57
+ rate: {
58
+ type: sequelize_1.DataTypes.DECIMAL(5, 2),
59
+ allowNull: true,
60
+ field: 'rate',
61
+ },
62
+ inputLedgerId: {
63
+ type: sequelize_1.DataTypes.UUID,
64
+ allowNull: true,
65
+ field: 'input_ledger_id',
66
+ },
67
+ outputLedgerId: {
68
+ type: sequelize_1.DataTypes.UUID,
69
+ allowNull: true,
70
+ field: 'output_ledger_id',
71
+ },
72
+ }, {
73
+ sequelize: index_1.sequelize,
74
+ modelName: 'AccountTaxTypeModel',
75
+ tableName: 'account_tax_types',
76
+ timestamps: true,
77
+ paranoid: true,
78
+ });
79
+ exports.default = AccountTaxTypeModel;
@@ -0,0 +1,28 @@
1
+ import { Model } from 'sequelize';
2
+ import { IAccountVendorInvoiceModelAttributes } from '../../interfaces/accountVendorInvoiceInterface';
3
+ import { TAccountVendorInvoiceModelCreationAttributes } from '../../types/accountVendorInvoiceType';
4
+ import { AccountApprovalStatus, AccountExpensePaymentStatus } from '../../constants/app';
5
+ declare class AccountVendorInvoiceModel extends Model<IAccountVendorInvoiceModelAttributes, TAccountVendorInvoiceModelCreationAttributes> implements IAccountVendorInvoiceModelAttributes {
6
+ id: string;
7
+ instituteId: string;
8
+ academicCalendarId: string;
9
+ vendorId?: string;
10
+ invoiceNumber: string;
11
+ invoiceDate: Date;
12
+ dueDate?: Date;
13
+ totalAmount: number;
14
+ taxAmount: number;
15
+ netAmount: number;
16
+ status: AccountApprovalStatus;
17
+ paymentStatus: AccountExpensePaymentStatus;
18
+ fileStorageId?: string;
19
+ journalEntryId?: string;
20
+ createdBy?: string;
21
+ updatedBy?: string;
22
+ deletedBy?: string;
23
+ readonly createdAt: Date;
24
+ readonly updatedAt: Date;
25
+ readonly deletedAt?: Date;
26
+ static associate(models: any): void;
27
+ }
28
+ export default AccountVendorInvoiceModel;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sequelize_1 = require("sequelize");
4
+ const index_1 = require("./index");
5
+ const app_1 = require("../../constants/app");
6
+ class AccountVendorInvoiceModel extends sequelize_1.Model {
7
+ static associate(models) {
8
+ const { InstituteModel, AcademicCalendarModel, AccountJournalEntryModel, UserModel, FileStorageModel } = models;
9
+ if (InstituteModel) {
10
+ AccountVendorInvoiceModel.belongsTo(InstituteModel, { foreignKey: 'instituteId', as: 'institute' });
11
+ }
12
+ if (AcademicCalendarModel) {
13
+ AccountVendorInvoiceModel.belongsTo(AcademicCalendarModel, { foreignKey: 'academicCalendarId', as: 'academicCalendar' });
14
+ }
15
+ if (AccountJournalEntryModel) {
16
+ AccountVendorInvoiceModel.belongsTo(AccountJournalEntryModel, { foreignKey: 'journalEntryId', as: 'journalEntry' });
17
+ }
18
+ if (FileStorageModel) {
19
+ AccountVendorInvoiceModel.belongsTo(FileStorageModel, { foreignKey: 'fileStorageId', as: 'fileStorage' });
20
+ }
21
+ if (UserModel) {
22
+ AccountVendorInvoiceModel.belongsTo(UserModel, { foreignKey: { name: 'vendorId', allowNull: true, field: 'vendor_id' }, as: 'vendor' });
23
+ AccountVendorInvoiceModel.belongsTo(UserModel, { foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' }, as: 'createdByUser' });
24
+ AccountVendorInvoiceModel.belongsTo(UserModel, { foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' }, as: 'updatedByUser' });
25
+ AccountVendorInvoiceModel.belongsTo(UserModel, { foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' }, as: 'deletedByUser' });
26
+ }
27
+ }
28
+ }
29
+ AccountVendorInvoiceModel.init({
30
+ id: {
31
+ type: sequelize_1.DataTypes.UUID,
32
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
33
+ primaryKey: true,
34
+ allowNull: false,
35
+ },
36
+ instituteId: {
37
+ type: sequelize_1.DataTypes.UUID,
38
+ allowNull: true,
39
+ field: 'institute_id',
40
+ },
41
+ academicCalendarId: {
42
+ type: sequelize_1.DataTypes.UUID,
43
+ allowNull: true,
44
+ field: 'academic_calendar_id',
45
+ },
46
+ vendorId: {
47
+ type: sequelize_1.DataTypes.UUID,
48
+ allowNull: true,
49
+ field: 'vendor_id',
50
+ },
51
+ invoiceNumber: {
52
+ type: sequelize_1.DataTypes.STRING,
53
+ allowNull: true,
54
+ field: 'invoice_number',
55
+ },
56
+ invoiceDate: {
57
+ type: sequelize_1.DataTypes.DATEONLY,
58
+ allowNull: true,
59
+ field: 'invoice_date',
60
+ },
61
+ dueDate: {
62
+ type: sequelize_1.DataTypes.DATEONLY,
63
+ allowNull: true,
64
+ field: 'due_date',
65
+ },
66
+ totalAmount: {
67
+ type: sequelize_1.DataTypes.DECIMAL(10, 2),
68
+ allowNull: true,
69
+ field: 'total_amount',
70
+ },
71
+ taxAmount: {
72
+ type: sequelize_1.DataTypes.DECIMAL(10, 2),
73
+ allowNull: true,
74
+ field: 'tax_amount',
75
+ },
76
+ netAmount: {
77
+ type: sequelize_1.DataTypes.DECIMAL(10, 2),
78
+ allowNull: true,
79
+ field: 'net_amount',
80
+ },
81
+ status: {
82
+ type: sequelize_1.DataTypes.STRING,
83
+ allowNull: true,
84
+ defaultValue: app_1.AccountApprovalStatus.PENDING,
85
+ },
86
+ paymentStatus: {
87
+ type: sequelize_1.DataTypes.STRING,
88
+ allowNull: true,
89
+ field: 'payment_status',
90
+ defaultValue: app_1.AccountExpensePaymentStatus.PENDING,
91
+ },
92
+ fileStorageId: {
93
+ type: sequelize_1.DataTypes.UUID,
94
+ allowNull: true,
95
+ field: 'file_storage_id',
96
+ },
97
+ journalEntryId: {
98
+ type: sequelize_1.DataTypes.UUID,
99
+ allowNull: true,
100
+ field: 'journal_entry_id',
101
+ },
102
+ }, {
103
+ sequelize: index_1.sequelize,
104
+ modelName: 'AccountVendorInvoiceModel',
105
+ tableName: 'account_vendor_invoices',
106
+ timestamps: true,
107
+ paranoid: true,
108
+ });
109
+ exports.default = AccountVendorInvoiceModel;
@@ -0,0 +1,25 @@
1
+ import { Model } from 'sequelize';
2
+ import { IAccountVendorPaymentModelAttributes } from '../../interfaces/accountVendorPaymentInterface';
3
+ import { TAccountVendorPaymentModelCreationAttributes } from '../../types/accountVendorPaymentType';
4
+ import { AccountPaymentMode } from '../../constants/app';
5
+ declare class AccountVendorPaymentModel extends Model<IAccountVendorPaymentModelAttributes, TAccountVendorPaymentModelCreationAttributes> implements IAccountVendorPaymentModelAttributes {
6
+ id: string;
7
+ instituteId: string;
8
+ academicCalendarId: string;
9
+ vendorId?: string;
10
+ invoiceId: string;
11
+ bankAccountId?: string;
12
+ paymentMode: AccountPaymentMode;
13
+ paidAmount: number;
14
+ paidDate: Date;
15
+ voucherId?: string;
16
+ journalEntryId?: string;
17
+ createdBy?: string;
18
+ updatedBy?: string;
19
+ deletedBy?: string;
20
+ readonly createdAt: Date;
21
+ readonly updatedAt: Date;
22
+ readonly deletedAt?: Date;
23
+ static associate(models: any): void;
24
+ }
25
+ export default AccountVendorPaymentModel;
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sequelize_1 = require("sequelize");
4
+ const index_1 = require("./index");
5
+ class AccountVendorPaymentModel extends sequelize_1.Model {
6
+ static associate(models) {
7
+ const { InstituteModel, AcademicCalendarModel, AccountVendorInvoiceModel, AccountVoucherModel, AccountJournalEntryModel, UserModel } = models;
8
+ if (InstituteModel) {
9
+ AccountVendorPaymentModel.belongsTo(InstituteModel, { foreignKey: 'instituteId', as: 'institute' });
10
+ }
11
+ if (AcademicCalendarModel) {
12
+ AccountVendorPaymentModel.belongsTo(AcademicCalendarModel, { foreignKey: 'academicCalendarId', as: 'academicCalendar' });
13
+ }
14
+ if (AccountVendorInvoiceModel) {
15
+ AccountVendorPaymentModel.belongsTo(AccountVendorInvoiceModel, { foreignKey: 'invoiceId', as: 'invoice' });
16
+ }
17
+ if (AccountVoucherModel) {
18
+ AccountVendorPaymentModel.belongsTo(AccountVoucherModel, { foreignKey: 'voucherId', as: 'voucher' });
19
+ }
20
+ if (AccountJournalEntryModel) {
21
+ AccountVendorPaymentModel.belongsTo(AccountJournalEntryModel, { foreignKey: 'journalEntryId', as: 'journalEntry' });
22
+ }
23
+ if (UserModel) {
24
+ AccountVendorPaymentModel.belongsTo(UserModel, { foreignKey: { name: 'vendorId', allowNull: true, field: 'vendor_id' }, as: 'vendor' });
25
+ AccountVendorPaymentModel.belongsTo(UserModel, { foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' }, as: 'createdByUser' });
26
+ AccountVendorPaymentModel.belongsTo(UserModel, { foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' }, as: 'updatedByUser' });
27
+ AccountVendorPaymentModel.belongsTo(UserModel, { foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' }, as: 'deletedByUser' });
28
+ }
29
+ }
30
+ }
31
+ AccountVendorPaymentModel.init({
32
+ id: {
33
+ type: sequelize_1.DataTypes.UUID,
34
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
35
+ primaryKey: true,
36
+ allowNull: false,
37
+ },
38
+ instituteId: {
39
+ type: sequelize_1.DataTypes.UUID,
40
+ allowNull: true,
41
+ field: 'institute_id',
42
+ },
43
+ academicCalendarId: {
44
+ type: sequelize_1.DataTypes.UUID,
45
+ allowNull: true,
46
+ field: 'academic_calendar_id',
47
+ },
48
+ vendorId: {
49
+ type: sequelize_1.DataTypes.UUID,
50
+ allowNull: true,
51
+ field: 'vendor_id',
52
+ },
53
+ invoiceId: {
54
+ type: sequelize_1.DataTypes.UUID,
55
+ allowNull: true,
56
+ field: 'invoice_id',
57
+ },
58
+ bankAccountId: {
59
+ type: sequelize_1.DataTypes.UUID,
60
+ allowNull: true,
61
+ field: 'bank_account_id',
62
+ },
63
+ paymentMode: {
64
+ type: sequelize_1.DataTypes.STRING,
65
+ allowNull: true,
66
+ field: 'payment_mode',
67
+ },
68
+ paidAmount: {
69
+ type: sequelize_1.DataTypes.DECIMAL(10, 2),
70
+ allowNull: true,
71
+ field: 'paid_amount',
72
+ },
73
+ paidDate: {
74
+ type: sequelize_1.DataTypes.DATEONLY,
75
+ allowNull: true,
76
+ field: 'paid_date',
77
+ },
78
+ voucherId: {
79
+ type: sequelize_1.DataTypes.UUID,
80
+ allowNull: true,
81
+ field: 'voucher_id',
82
+ },
83
+ journalEntryId: {
84
+ type: sequelize_1.DataTypes.UUID,
85
+ allowNull: true,
86
+ field: 'journal_entry_id',
87
+ },
88
+ }, {
89
+ sequelize: index_1.sequelize,
90
+ modelName: 'AccountVendorPaymentModel',
91
+ tableName: 'account_vendor_payments',
92
+ timestamps: true,
93
+ paranoid: true,
94
+ });
95
+ exports.default = AccountVendorPaymentModel;
@@ -0,0 +1,28 @@
1
+ import { Model } from 'sequelize';
2
+ import { IAccountVoucherModelAttributes } from '../../interfaces/accountVoucherInterface';
3
+ import { TAccountVoucherModelCreationAttributes } from '../../types/accountVoucherType';
4
+ import { AccountSourceModule, AccountApprovalStatus, AccountVoucherStatus } from '../../constants/app';
5
+ declare class AccountVoucherModel extends Model<IAccountVoucherModelAttributes, TAccountVoucherModelCreationAttributes> {
6
+ id: string;
7
+ instituteId: string;
8
+ academicCalendarId: string;
9
+ voucherTypeId: string;
10
+ voucherNumber: string;
11
+ voucherDate: Date;
12
+ financialYearId: string;
13
+ sourceModule?: AccountSourceModule;
14
+ sourceId?: string;
15
+ referenceNumber?: string;
16
+ narration?: string;
17
+ approvalStatus: AccountApprovalStatus;
18
+ status: AccountVoucherStatus;
19
+ reversedVoucherId?: string;
20
+ createdBy?: string;
21
+ updatedBy?: string;
22
+ deletedBy?: string;
23
+ readonly createdAt: Date;
24
+ readonly updatedAt: Date;
25
+ readonly deletedAt?: Date;
26
+ static associate(models: any): void;
27
+ }
28
+ export default AccountVoucherModel;
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sequelize_1 = require("sequelize");
4
+ const index_1 = require("./index");
5
+ const app_1 = require("../../constants/app");
6
+ class AccountVoucherModel extends sequelize_1.Model {
7
+ static associate(models) {
8
+ const { AccountVoucherTypeModel, AccountFinancialYearModel, InstituteModel, AcademicCalendarModel } = models;
9
+ if (AccountVoucherTypeModel) {
10
+ AccountVoucherModel.belongsTo(AccountVoucherTypeModel, { foreignKey: 'voucherTypeId', as: 'voucherType' });
11
+ }
12
+ if (AccountFinancialYearModel) {
13
+ AccountVoucherModel.belongsTo(AccountFinancialYearModel, { foreignKey: 'financialYearId', as: 'financialYear' });
14
+ }
15
+ if (InstituteModel) {
16
+ AccountVoucherModel.belongsTo(InstituteModel, { foreignKey: 'instituteId', as: 'institute' });
17
+ }
18
+ if (AcademicCalendarModel) {
19
+ AccountVoucherModel.belongsTo(AcademicCalendarModel, { foreignKey: 'academicCalendarId', as: 'academicCalendar' });
20
+ }
21
+ // Self-referential for reversed voucher
22
+ AccountVoucherModel.belongsTo(AccountVoucherModel, { foreignKey: 'reversedVoucherId', as: 'reversedVoucher' });
23
+ // Journal entries (hasMany) will be added when JournalEntryModel is created.
24
+ const { UserModel } = models;
25
+ if (UserModel) {
26
+ AccountVoucherModel.belongsTo(UserModel, { foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' }, as: 'createdByUser' });
27
+ AccountVoucherModel.belongsTo(UserModel, { foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' }, as: 'updatedByUser' });
28
+ AccountVoucherModel.belongsTo(UserModel, { foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' }, as: 'deletedByUser' });
29
+ }
30
+ }
31
+ }
32
+ AccountVoucherModel.init({
33
+ id: {
34
+ type: sequelize_1.DataTypes.UUID,
35
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
36
+ primaryKey: true,
37
+ allowNull: false,
38
+ },
39
+ instituteId: {
40
+ type: sequelize_1.DataTypes.UUID,
41
+ allowNull: true,
42
+ field: 'institute_id',
43
+ },
44
+ academicCalendarId: {
45
+ type: sequelize_1.DataTypes.UUID,
46
+ allowNull: true,
47
+ field: 'academic_calendar_id',
48
+ },
49
+ voucherTypeId: {
50
+ type: sequelize_1.DataTypes.UUID,
51
+ allowNull: true,
52
+ field: 'voucher_type_id',
53
+ },
54
+ voucherNumber: {
55
+ type: sequelize_1.DataTypes.STRING,
56
+ allowNull: true,
57
+ field: 'voucher_number',
58
+ },
59
+ voucherDate: {
60
+ type: sequelize_1.DataTypes.DATEONLY,
61
+ allowNull: true,
62
+ field: 'voucher_date',
63
+ },
64
+ financialYearId: {
65
+ type: sequelize_1.DataTypes.UUID,
66
+ allowNull: true,
67
+ field: 'financial_year_id',
68
+ },
69
+ sourceModule: {
70
+ type: sequelize_1.DataTypes.STRING,
71
+ allowNull: true,
72
+ field: 'source_module',
73
+ },
74
+ sourceId: {
75
+ type: sequelize_1.DataTypes.STRING,
76
+ allowNull: true,
77
+ field: 'source_id',
78
+ },
79
+ referenceNumber: {
80
+ type: sequelize_1.DataTypes.STRING,
81
+ allowNull: true,
82
+ field: 'reference_number',
83
+ },
84
+ narration: {
85
+ type: sequelize_1.DataTypes.TEXT,
86
+ allowNull: true,
87
+ },
88
+ approvalStatus: {
89
+ type: sequelize_1.DataTypes.STRING,
90
+ allowNull: true,
91
+ defaultValue: app_1.AccountApprovalStatus.PENDING,
92
+ field: 'approval_status',
93
+ },
94
+ status: {
95
+ type: sequelize_1.DataTypes.STRING,
96
+ allowNull: true,
97
+ defaultValue: app_1.AccountVoucherStatus.DRAFT,
98
+ },
99
+ reversedVoucherId: {
100
+ type: sequelize_1.DataTypes.UUID,
101
+ allowNull: true,
102
+ field: 'reversed_voucher_id',
103
+ },
104
+ }, {
105
+ modelName: 'AccountVoucherModel',
106
+ tableName: 'account_vouchers',
107
+ timestamps: true,
108
+ paranoid: true,
109
+ sequelize: index_1.sequelize,
110
+ });
111
+ exports.default = AccountVoucherModel;
@@ -0,0 +1,24 @@
1
+ import { Model } from 'sequelize';
2
+ import { IAccountWebhookDeliveryModelAttributes } from '../../interfaces/accountWebhookDeliveryInterface';
3
+ import { TAccountWebhookDeliveryModelCreationAttributes } from '../../types/accountWebhookDeliveryType';
4
+ import { AccountWebhookDeliveryStatus } from '../../constants/app';
5
+ declare class AccountWebhookDeliveryModel extends Model<IAccountWebhookDeliveryModelAttributes, TAccountWebhookDeliveryModelCreationAttributes> implements IAccountWebhookDeliveryModelAttributes {
6
+ id: string;
7
+ instituteId: string;
8
+ academicCalendarId: string;
9
+ subscriptionId: string;
10
+ eventId: string;
11
+ status: AccountWebhookDeliveryStatus;
12
+ attempts: number;
13
+ lastError?: string;
14
+ requestRef?: any;
15
+ responseRef?: any;
16
+ createdBy?: string;
17
+ updatedBy?: string;
18
+ deletedBy?: string;
19
+ readonly createdAt: Date;
20
+ readonly updatedAt: Date;
21
+ readonly deletedAt?: Date;
22
+ static associate(models: any): void;
23
+ }
24
+ export default AccountWebhookDeliveryModel;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sequelize_1 = require("sequelize");
4
+ const index_1 = require("./index");
5
+ class AccountWebhookDeliveryModel extends sequelize_1.Model {
6
+ static associate(models) {
7
+ const { InstituteModel, AcademicCalendarModel, AccountWebhookSubscriptionModel, UserModel, } = models;
8
+ if (InstituteModel) {
9
+ AccountWebhookDeliveryModel.belongsTo(InstituteModel, { foreignKey: 'instituteId', as: 'institute' });
10
+ }
11
+ if (AcademicCalendarModel) {
12
+ AccountWebhookDeliveryModel.belongsTo(AcademicCalendarModel, { foreignKey: 'academicCalendarId', as: 'academicCalendar' });
13
+ }
14
+ if (AccountWebhookSubscriptionModel) {
15
+ AccountWebhookDeliveryModel.belongsTo(AccountWebhookSubscriptionModel, { foreignKey: 'subscriptionId', as: 'subscription' });
16
+ }
17
+ if (UserModel) {
18
+ AccountWebhookDeliveryModel.belongsTo(UserModel, { foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' }, as: 'createdByUser' });
19
+ AccountWebhookDeliveryModel.belongsTo(UserModel, { foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' }, as: 'updatedByUser' });
20
+ AccountWebhookDeliveryModel.belongsTo(UserModel, { foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' }, as: 'deletedByUser' });
21
+ }
22
+ }
23
+ }
24
+ AccountWebhookDeliveryModel.init({
25
+ id: {
26
+ type: sequelize_1.DataTypes.UUID,
27
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
28
+ primaryKey: true,
29
+ allowNull: false,
30
+ },
31
+ instituteId: {
32
+ type: sequelize_1.DataTypes.UUID,
33
+ allowNull: true,
34
+ field: 'institute_id',
35
+ },
36
+ academicCalendarId: {
37
+ type: sequelize_1.DataTypes.UUID,
38
+ allowNull: true,
39
+ field: 'academic_calendar_id',
40
+ },
41
+ subscriptionId: {
42
+ type: sequelize_1.DataTypes.UUID,
43
+ allowNull: true,
44
+ field: 'subscription_id',
45
+ },
46
+ eventId: {
47
+ type: sequelize_1.DataTypes.UUID,
48
+ allowNull: true,
49
+ field: 'event_id',
50
+ },
51
+ status: {
52
+ type: sequelize_1.DataTypes.STRING,
53
+ allowNull: true,
54
+ field: 'status',
55
+ },
56
+ attempts: {
57
+ type: sequelize_1.DataTypes.INTEGER,
58
+ allowNull: true,
59
+ field: 'attempts',
60
+ defaultValue: 0,
61
+ },
62
+ lastError: {
63
+ type: sequelize_1.DataTypes.TEXT,
64
+ allowNull: true,
65
+ field: 'last_error',
66
+ },
67
+ requestRef: {
68
+ type: sequelize_1.DataTypes.JSONB,
69
+ allowNull: true,
70
+ field: 'request_ref',
71
+ },
72
+ responseRef: {
73
+ type: sequelize_1.DataTypes.JSONB,
74
+ allowNull: true,
75
+ field: 'response_ref',
76
+ },
77
+ }, {
78
+ sequelize: index_1.sequelize,
79
+ modelName: 'AccountWebhookDeliveryModel',
80
+ tableName: 'account_webhook_deliveries',
81
+ timestamps: true,
82
+ paranoid: true,
83
+ });
84
+ exports.default = AccountWebhookDeliveryModel;