@procxo/shared 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +250 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +7 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/ormconfig.factory.d.ts +10 -0
- package/dist/config/ormconfig.factory.d.ts.map +1 -0
- package/dist/config/ormconfig.factory.js +47 -0
- package/dist/config/ormconfig.factory.js.map +1 -0
- package/dist/config/typeorm.config.d.ts +4 -0
- package/dist/config/typeorm.config.d.ts.map +1 -0
- package/dist/config/typeorm.config.js +22 -0
- package/dist/config/typeorm.config.js.map +1 -0
- package/dist/core/constant/index.d.ts +2 -0
- package/dist/core/constant/index.d.ts.map +1 -0
- package/dist/core/constant/index.js +18 -0
- package/dist/core/constant/index.js.map +1 -0
- package/dist/core/constant/notification-preference.d.ts +29 -0
- package/dist/core/constant/notification-preference.d.ts.map +1 -0
- package/dist/core/constant/notification-preference.js +81 -0
- package/dist/core/constant/notification-preference.js.map +1 -0
- package/dist/core/json/core-data/currency.json +8 -0
- package/dist/core/json/core-data/department.json +38 -0
- package/dist/core/json/core-data/permission.json +898 -0
- package/dist/core/json/core-data/role.json +30 -0
- package/dist/core/json/core-data/user.json +12 -0
- package/dist/core/json/geographic-data/cities.json +54693 -0
- package/dist/core/json/geographic-data/countries.json +31 -0
- package/dist/database/entities/activity-logs.entity.d.ts +11 -0
- package/dist/database/entities/activity-logs.entity.d.ts.map +1 -0
- package/dist/database/entities/activity-logs.entity.js +56 -0
- package/dist/database/entities/activity-logs.entity.js.map +1 -0
- package/dist/database/entities/address.entity.d.ts +13 -0
- package/dist/database/entities/address.entity.d.ts.map +1 -0
- package/dist/database/entities/address.entity.js +63 -0
- package/dist/database/entities/address.entity.js.map +1 -0
- package/dist/database/entities/alert.entity.d.ts +37 -0
- package/dist/database/entities/alert.entity.d.ts.map +1 -0
- package/dist/database/entities/alert.entity.js +171 -0
- package/dist/database/entities/alert.entity.js.map +1 -0
- package/dist/database/entities/approval-condition.entity.d.ts +16 -0
- package/dist/database/entities/approval-condition.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-condition.entity.js +66 -0
- package/dist/database/entities/approval-condition.entity.js.map +1 -0
- package/dist/database/entities/approval-hierarchy-role.entity.d.ts +10 -0
- package/dist/database/entities/approval-hierarchy-role.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-hierarchy-role.entity.js +47 -0
- package/dist/database/entities/approval-hierarchy-role.entity.js.map +1 -0
- package/dist/database/entities/approval-hierarchy-user.entity.d.ts +10 -0
- package/dist/database/entities/approval-hierarchy-user.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-hierarchy-user.entity.js +47 -0
- package/dist/database/entities/approval-hierarchy-user.entity.js.map +1 -0
- package/dist/database/entities/approval-hierarchy.entity.d.ts +22 -0
- package/dist/database/entities/approval-hierarchy.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-hierarchy.entity.js +80 -0
- package/dist/database/entities/approval-hierarchy.entity.js.map +1 -0
- package/dist/database/entities/approval-journey.entity.d.ts +32 -0
- package/dist/database/entities/approval-journey.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-journey.entity.js +125 -0
- package/dist/database/entities/approval-journey.entity.js.map +1 -0
- package/dist/database/entities/approval-level-escalation-user.entity.d.ts +10 -0
- package/dist/database/entities/approval-level-escalation-user.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-level-escalation-user.entity.js +47 -0
- package/dist/database/entities/approval-level-escalation-user.entity.js.map +1 -0
- package/dist/database/entities/approval-level-escalation.entity.d.ts +14 -0
- package/dist/database/entities/approval-level-escalation.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-level-escalation.entity.js +65 -0
- package/dist/database/entities/approval-level-escalation.entity.js.map +1 -0
- package/dist/database/entities/approval-level-user.entity.d.ts +10 -0
- package/dist/database/entities/approval-level-user.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-level-user.entity.js +49 -0
- package/dist/database/entities/approval-level-user.entity.js.map +1 -0
- package/dist/database/entities/approval-level.entity.d.ts +17 -0
- package/dist/database/entities/approval-level.entity.d.ts.map +1 -0
- package/dist/database/entities/approval-level.entity.js +76 -0
- package/dist/database/entities/approval-level.entity.js.map +1 -0
- package/dist/database/entities/base.entity.d.ts +12 -0
- package/dist/database/entities/base.entity.d.ts.map +1 -0
- package/dist/database/entities/base.entity.js +63 -0
- package/dist/database/entities/base.entity.js.map +1 -0
- package/dist/database/entities/chat.entity.d.ts +13 -0
- package/dist/database/entities/chat.entity.d.ts.map +1 -0
- package/dist/database/entities/chat.entity.js +67 -0
- package/dist/database/entities/chat.entity.js.map +1 -0
- package/dist/database/entities/city.entity.d.ts +11 -0
- package/dist/database/entities/city.entity.d.ts.map +1 -0
- package/dist/database/entities/city.entity.js +53 -0
- package/dist/database/entities/city.entity.js.map +1 -0
- package/dist/database/entities/client.entity.d.ts +40 -0
- package/dist/database/entities/client.entity.d.ts.map +1 -0
- package/dist/database/entities/client.entity.js +146 -0
- package/dist/database/entities/client.entity.js.map +1 -0
- package/dist/database/entities/contact.entity.d.ts +12 -0
- package/dist/database/entities/contact.entity.d.ts.map +1 -0
- package/dist/database/entities/contact.entity.js +57 -0
- package/dist/database/entities/contact.entity.js.map +1 -0
- package/dist/database/entities/country.entity.d.ts +26 -0
- package/dist/database/entities/country.entity.d.ts.map +1 -0
- package/dist/database/entities/country.entity.js +127 -0
- package/dist/database/entities/country.entity.js.map +1 -0
- package/dist/database/entities/credit-note.entity.d.ts +35 -0
- package/dist/database/entities/credit-note.entity.d.ts.map +1 -0
- package/dist/database/entities/credit-note.entity.js +144 -0
- package/dist/database/entities/credit-note.entity.js.map +1 -0
- package/dist/database/entities/currency.entity.d.ts +10 -0
- package/dist/database/entities/currency.entity.d.ts.map +1 -0
- package/dist/database/entities/currency.entity.js +47 -0
- package/dist/database/entities/currency.entity.js.map +1 -0
- package/dist/database/entities/department.entity.d.ts +10 -0
- package/dist/database/entities/department.entity.d.ts.map +1 -0
- package/dist/database/entities/department.entity.js +47 -0
- package/dist/database/entities/department.entity.js.map +1 -0
- package/dist/database/entities/entitlement.entity.d.ts +24 -0
- package/dist/database/entities/entitlement.entity.d.ts.map +1 -0
- package/dist/database/entities/entitlement.entity.js +106 -0
- package/dist/database/entities/entitlement.entity.js.map +1 -0
- package/dist/database/entities/expense.entity.d.ts +47 -0
- package/dist/database/entities/expense.entity.d.ts.map +1 -0
- package/dist/database/entities/expense.entity.js +221 -0
- package/dist/database/entities/expense.entity.js.map +1 -0
- package/dist/database/entities/file.entity.d.ts +9 -0
- package/dist/database/entities/file.entity.d.ts.map +1 -0
- package/dist/database/entities/file.entity.js +46 -0
- package/dist/database/entities/file.entity.js.map +1 -0
- package/dist/database/entities/fixed-invoice-item.entity.d.ts +9 -0
- package/dist/database/entities/fixed-invoice-item.entity.d.ts.map +1 -0
- package/dist/database/entities/fixed-invoice-item.entity.js +52 -0
- package/dist/database/entities/fixed-invoice-item.entity.js.map +1 -0
- package/dist/database/entities/group.entity.d.ts +9 -0
- package/dist/database/entities/group.entity.d.ts.map +1 -0
- package/dist/database/entities/group.entity.js +45 -0
- package/dist/database/entities/group.entity.js.map +1 -0
- package/dist/database/entities/gst.entity.d.ts +6 -0
- package/dist/database/entities/gst.entity.d.ts.map +1 -0
- package/dist/database/entities/gst.entity.js +44 -0
- package/dist/database/entities/gst.entity.js.map +1 -0
- package/dist/database/entities/holiday.entity.d.ts +14 -0
- package/dist/database/entities/holiday.entity.d.ts.map +1 -0
- package/dist/database/entities/holiday.entity.js +79 -0
- package/dist/database/entities/holiday.entity.js.map +1 -0
- package/dist/database/entities/index.d.ts +78 -0
- package/dist/database/entities/index.d.ts.map +1 -0
- package/dist/database/entities/index.js +94 -0
- package/dist/database/entities/index.js.map +1 -0
- package/dist/database/entities/invoice-template-footer.entity.d.ts +24 -0
- package/dist/database/entities/invoice-template-footer.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice-template-footer.entity.js +118 -0
- package/dist/database/entities/invoice-template-footer.entity.js.map +1 -0
- package/dist/database/entities/invoice-template-header.entity.d.ts +14 -0
- package/dist/database/entities/invoice-template-header.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice-template-header.entity.js +68 -0
- package/dist/database/entities/invoice-template-header.entity.js.map +1 -0
- package/dist/database/entities/invoice-template-table.entity.d.ts +35 -0
- package/dist/database/entities/invoice-template-table.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice-template-table.entity.js +143 -0
- package/dist/database/entities/invoice-template-table.entity.js.map +1 -0
- package/dist/database/entities/invoice-template.entity.d.ts +39 -0
- package/dist/database/entities/invoice-template.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice-template.entity.js +157 -0
- package/dist/database/entities/invoice-template.entity.js.map +1 -0
- package/dist/database/entities/invoice.entity.d.ts +46 -0
- package/dist/database/entities/invoice.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice.entity.js +212 -0
- package/dist/database/entities/invoice.entity.js.map +1 -0
- package/dist/database/entities/invoice_item.entity.d.ts +22 -0
- package/dist/database/entities/invoice_item.entity.d.ts.map +1 -0
- package/dist/database/entities/invoice_item.entity.js +89 -0
- package/dist/database/entities/invoice_item.entity.js.map +1 -0
- package/dist/database/entities/leave-balance.entity.d.ts +38 -0
- package/dist/database/entities/leave-balance.entity.d.ts.map +1 -0
- package/dist/database/entities/leave-balance.entity.js +166 -0
- package/dist/database/entities/leave-balance.entity.js.map +1 -0
- package/dist/database/entities/leave-request.entity.d.ts +64 -0
- package/dist/database/entities/leave-request.entity.d.ts.map +1 -0
- package/dist/database/entities/leave-request.entity.js +219 -0
- package/dist/database/entities/leave-request.entity.js.map +1 -0
- package/dist/database/entities/leave-type.entity.d.ts +15 -0
- package/dist/database/entities/leave-type.entity.d.ts.map +1 -0
- package/dist/database/entities/leave-type.entity.js +72 -0
- package/dist/database/entities/leave-type.entity.js.map +1 -0
- package/dist/database/entities/matter-tag.entity.d.ts +10 -0
- package/dist/database/entities/matter-tag.entity.d.ts.map +1 -0
- package/dist/database/entities/matter-tag.entity.js +45 -0
- package/dist/database/entities/matter-tag.entity.js.map +1 -0
- package/dist/database/entities/matter-task-view-filter.entity.d.ts +11 -0
- package/dist/database/entities/matter-task-view-filter.entity.d.ts.map +1 -0
- package/dist/database/entities/matter-task-view-filter.entity.js +42 -0
- package/dist/database/entities/matter-task-view-filter.entity.js.map +1 -0
- package/dist/database/entities/matter-team-member.entity.d.ts +11 -0
- package/dist/database/entities/matter-team-member.entity.d.ts.map +1 -0
- package/dist/database/entities/matter-team-member.entity.js +56 -0
- package/dist/database/entities/matter-team-member.entity.js.map +1 -0
- package/dist/database/entities/matter.entity.d.ts +62 -0
- package/dist/database/entities/matter.entity.d.ts.map +1 -0
- package/dist/database/entities/matter.entity.js +249 -0
- package/dist/database/entities/matter.entity.js.map +1 -0
- package/dist/database/entities/payment.entity.d.ts +26 -0
- package/dist/database/entities/payment.entity.d.ts.map +1 -0
- package/dist/database/entities/payment.entity.js +127 -0
- package/dist/database/entities/payment.entity.js.map +1 -0
- package/dist/database/entities/permission.entity.d.ts +11 -0
- package/dist/database/entities/permission.entity.d.ts.map +1 -0
- package/dist/database/entities/permission.entity.js +52 -0
- package/dist/database/entities/permission.entity.js.map +1 -0
- package/dist/database/entities/quickbooks-connection.entity.d.ts +14 -0
- package/dist/database/entities/quickbooks-connection.entity.d.ts.map +1 -0
- package/dist/database/entities/quickbooks-connection.entity.js +71 -0
- package/dist/database/entities/quickbooks-connection.entity.js.map +1 -0
- package/dist/database/entities/quickbooks-sync-log.entity.d.ts +34 -0
- package/dist/database/entities/quickbooks-sync-log.entity.d.ts.map +1 -0
- package/dist/database/entities/quickbooks-sync-log.entity.js +116 -0
- package/dist/database/entities/quickbooks-sync-log.entity.js.map +1 -0
- package/dist/database/entities/role-permission.entity.d.ts +10 -0
- package/dist/database/entities/role-permission.entity.d.ts.map +1 -0
- package/dist/database/entities/role-permission.entity.js +49 -0
- package/dist/database/entities/role-permission.entity.js.map +1 -0
- package/dist/database/entities/role-shift.entity.d.ts +8 -0
- package/dist/database/entities/role-shift.entity.d.ts.map +1 -0
- package/dist/database/entities/role-shift.entity.js +48 -0
- package/dist/database/entities/role-shift.entity.js.map +1 -0
- package/dist/database/entities/role.entity.d.ts +13 -0
- package/dist/database/entities/role.entity.d.ts.map +1 -0
- package/dist/database/entities/role.entity.js +58 -0
- package/dist/database/entities/role.entity.js.map +1 -0
- package/dist/database/entities/sequence-generator.entity.d.ts +8 -0
- package/dist/database/entities/sequence-generator.entity.d.ts.map +1 -0
- package/dist/database/entities/sequence-generator.entity.js +64 -0
- package/dist/database/entities/sequence-generator.entity.js.map +1 -0
- package/dist/database/entities/shift.entity.d.ts +18 -0
- package/dist/database/entities/shift.entity.d.ts.map +1 -0
- package/dist/database/entities/shift.entity.js +110 -0
- package/dist/database/entities/shift.entity.js.map +1 -0
- package/dist/database/entities/sub-task-tag.entity.d.ts +10 -0
- package/dist/database/entities/sub-task-tag.entity.d.ts.map +1 -0
- package/dist/database/entities/sub-task-tag.entity.js +45 -0
- package/dist/database/entities/sub-task-tag.entity.js.map +1 -0
- package/dist/database/entities/subtask-user.entity.d.ts +10 -0
- package/dist/database/entities/subtask-user.entity.d.ts.map +1 -0
- package/dist/database/entities/subtask-user.entity.js +45 -0
- package/dist/database/entities/subtask-user.entity.js.map +1 -0
- package/dist/database/entities/subtask.entity.d.ts +47 -0
- package/dist/database/entities/subtask.entity.d.ts.map +1 -0
- package/dist/database/entities/subtask.entity.js +185 -0
- package/dist/database/entities/subtask.entity.js.map +1 -0
- package/dist/database/entities/summary-task-status.entity.d.ts +7 -0
- package/dist/database/entities/summary-task-status.entity.d.ts.map +1 -0
- package/dist/database/entities/summary-task-status.entity.js +37 -0
- package/dist/database/entities/summary-task-status.entity.js.map +1 -0
- package/dist/database/entities/superset.entity.d.ts +15 -0
- package/dist/database/entities/superset.entity.d.ts.map +1 -0
- package/dist/database/entities/superset.entity.js +73 -0
- package/dist/database/entities/superset.entity.js.map +1 -0
- package/dist/database/entities/tag.entity.d.ts +10 -0
- package/dist/database/entities/tag.entity.d.ts.map +1 -0
- package/dist/database/entities/tag.entity.js +43 -0
- package/dist/database/entities/tag.entity.js.map +1 -0
- package/dist/database/entities/task-comment.entity.d.ts +15 -0
- package/dist/database/entities/task-comment.entity.d.ts.map +1 -0
- package/dist/database/entities/task-comment.entity.js +67 -0
- package/dist/database/entities/task-comment.entity.js.map +1 -0
- package/dist/database/entities/task-milestone.entity.d.ts +7 -0
- package/dist/database/entities/task-milestone.entity.d.ts.map +1 -0
- package/dist/database/entities/task-milestone.entity.js +36 -0
- package/dist/database/entities/task-milestone.entity.js.map +1 -0
- package/dist/database/entities/task-remainder.entity.d.ts +12 -0
- package/dist/database/entities/task-remainder.entity.d.ts.map +1 -0
- package/dist/database/entities/task-remainder.entity.js +57 -0
- package/dist/database/entities/task-remainder.entity.js.map +1 -0
- package/dist/database/entities/task-tag.entity.d.ts +10 -0
- package/dist/database/entities/task-tag.entity.d.ts.map +1 -0
- package/dist/database/entities/task-tag.entity.js +45 -0
- package/dist/database/entities/task-tag.entity.js.map +1 -0
- package/dist/database/entities/task-type.entity.d.ts +7 -0
- package/dist/database/entities/task-type.entity.d.ts.map +1 -0
- package/dist/database/entities/task-type.entity.js +36 -0
- package/dist/database/entities/task-type.entity.js.map +1 -0
- package/dist/database/entities/task-user.entity.d.ts +10 -0
- package/dist/database/entities/task-user.entity.d.ts.map +1 -0
- package/dist/database/entities/task-user.entity.js +45 -0
- package/dist/database/entities/task-user.entity.js.map +1 -0
- package/dist/database/entities/task.entity.d.ts +53 -0
- package/dist/database/entities/task.entity.d.ts.map +1 -0
- package/dist/database/entities/task.entity.js +259 -0
- package/dist/database/entities/task.entity.js.map +1 -0
- package/dist/database/entities/template-task.entity.d.ts +11 -0
- package/dist/database/entities/template-task.entity.d.ts.map +1 -0
- package/dist/database/entities/template-task.entity.js +53 -0
- package/dist/database/entities/template-task.entity.js.map +1 -0
- package/dist/database/entities/template.entity.d.ts +13 -0
- package/dist/database/entities/template.entity.d.ts.map +1 -0
- package/dist/database/entities/template.entity.js +58 -0
- package/dist/database/entities/template.entity.js.map +1 -0
- package/dist/database/entities/timesheet-comment.entity.d.ts +11 -0
- package/dist/database/entities/timesheet-comment.entity.d.ts.map +1 -0
- package/dist/database/entities/timesheet-comment.entity.js +65 -0
- package/dist/database/entities/timesheet-comment.entity.js.map +1 -0
- package/dist/database/entities/timesheet-event.entity.d.ts +48 -0
- package/dist/database/entities/timesheet-event.entity.d.ts.map +1 -0
- package/dist/database/entities/timesheet-event.entity.js +328 -0
- package/dist/database/entities/timesheet-event.entity.js.map +1 -0
- package/dist/database/entities/timesheet-summary.entity.d.ts +27 -0
- package/dist/database/entities/timesheet-summary.entity.d.ts.map +1 -0
- package/dist/database/entities/timesheet-summary.entity.js +161 -0
- package/dist/database/entities/timesheet-summary.entity.js.map +1 -0
- package/dist/database/entities/timesheet.entity.d.ts +32 -0
- package/dist/database/entities/timesheet.entity.d.ts.map +1 -0
- package/dist/database/entities/timesheet.entity.js +112 -0
- package/dist/database/entities/timesheet.entity.js.map +1 -0
- package/dist/database/entities/transfer-ownership.entity.d.ts +15 -0
- package/dist/database/entities/transfer-ownership.entity.d.ts.map +1 -0
- package/dist/database/entities/transfer-ownership.entity.js +75 -0
- package/dist/database/entities/transfer-ownership.entity.js.map +1 -0
- package/dist/database/entities/upload-log.entity.d.ts +31 -0
- package/dist/database/entities/upload-log.entity.d.ts.map +1 -0
- package/dist/database/entities/upload-log.entity.js +111 -0
- package/dist/database/entities/upload-log.entity.js.map +1 -0
- package/dist/database/entities/user-notification-channel.entity.d.ts +8 -0
- package/dist/database/entities/user-notification-channel.entity.d.ts.map +1 -0
- package/dist/database/entities/user-notification-channel.entity.js +63 -0
- package/dist/database/entities/user-notification-channel.entity.js.map +1 -0
- package/dist/database/entities/user-notification-preference.entity.d.ts +10 -0
- package/dist/database/entities/user-notification-preference.entity.d.ts.map +1 -0
- package/dist/database/entities/user-notification-preference.entity.js +72 -0
- package/dist/database/entities/user-notification-preference.entity.js.map +1 -0
- package/dist/database/entities/user-role.entity.d.ts +10 -0
- package/dist/database/entities/user-role.entity.d.ts.map +1 -0
- package/dist/database/entities/user-role.entity.js +45 -0
- package/dist/database/entities/user-role.entity.js.map +1 -0
- package/dist/database/entities/user-session-history.entity.d.ts +16 -0
- package/dist/database/entities/user-session-history.entity.d.ts.map +1 -0
- package/dist/database/entities/user-session-history.entity.js +78 -0
- package/dist/database/entities/user-session-history.entity.js.map +1 -0
- package/dist/database/entities/user-shift.entity.d.ts +24 -0
- package/dist/database/entities/user-shift.entity.d.ts.map +1 -0
- package/dist/database/entities/user-shift.entity.js +153 -0
- package/dist/database/entities/user-shift.entity.js.map +1 -0
- package/dist/database/entities/user.entity.d.ts +74 -0
- package/dist/database/entities/user.entity.d.ts.map +1 -0
- package/dist/database/entities/user.entity.js +280 -0
- package/dist/database/entities/user.entity.js.map +1 -0
- package/dist/database/index.d.ts +2 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +18 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/migrations/1770706648232-initialMigration.d.ts +7 -0
- package/dist/database/migrations/1770706648232-initialMigration.d.ts.map +1 -0
- package/dist/database/migrations/1770706648232-initialMigration.js +474 -0
- package/dist/database/migrations/1770706648232-initialMigration.js.map +1 -0
- package/dist/database/seeder/base.seed.d.ts +19 -0
- package/dist/database/seeder/base.seed.d.ts.map +1 -0
- package/dist/database/seeder/base.seed.js +83 -0
- package/dist/database/seeder/base.seed.js.map +1 -0
- package/dist/database/seeder/config/seeder.config.d.ts +7 -0
- package/dist/database/seeder/config/seeder.config.d.ts.map +1 -0
- package/dist/database/seeder/config/seeder.config.js +21 -0
- package/dist/database/seeder/config/seeder.config.js.map +1 -0
- package/dist/database/seeder/errors/seeder.error.d.ts +11 -0
- package/dist/database/seeder/errors/seeder.error.d.ts.map +1 -0
- package/dist/database/seeder/errors/seeder.error.js +27 -0
- package/dist/database/seeder/errors/seeder.error.js.map +1 -0
- package/dist/database/seeder/seed-runner.d.ts +2 -0
- package/dist/database/seeder/seed-runner.d.ts.map +1 -0
- package/dist/database/seeder/seed-runner.js +157 -0
- package/dist/database/seeder/seed-runner.js.map +1 -0
- package/dist/database/seeder/seeds/city.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/city.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/city.seed.js +62 -0
- package/dist/database/seeder/seeds/city.seed.js.map +1 -0
- package/dist/database/seeder/seeds/country.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/country.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/country.seed.js +54 -0
- package/dist/database/seeder/seeds/country.seed.js.map +1 -0
- package/dist/database/seeder/seeds/currency.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/currency.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/currency.seed.js +50 -0
- package/dist/database/seeder/seeds/currency.seed.js.map +1 -0
- package/dist/database/seeder/seeds/department.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/department.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/department.seed.js +48 -0
- package/dist/database/seeder/seeds/department.seed.js.map +1 -0
- package/dist/database/seeder/seeds/permission.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/permission.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/permission.seed.js +54 -0
- package/dist/database/seeder/seeds/permission.seed.js.map +1 -0
- package/dist/database/seeder/seeds/role-permission.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/role-permission.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/role-permission.seed.js +47 -0
- package/dist/database/seeder/seeds/role-permission.seed.js.map +1 -0
- package/dist/database/seeder/seeds/role.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/role.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/role.seed.js +52 -0
- package/dist/database/seeder/seeds/role.seed.js.map +1 -0
- package/dist/database/seeder/seeds/user-role.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/user-role.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/user-role.seed.js +66 -0
- package/dist/database/seeder/seeds/user-role.seed.js.map +1 -0
- package/dist/database/seeder/seeds/user.seed.d.ts +8 -0
- package/dist/database/seeder/seeds/user.seed.d.ts.map +1 -0
- package/dist/database/seeder/seeds/user.seed.js +110 -0
- package/dist/database/seeder/seeds/user.seed.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/scripts/create-schema.d.ts +2 -0
- package/dist/scripts/create-schema.d.ts.map +1 -0
- package/dist/scripts/create-schema.js +77 -0
- package/dist/scripts/create-schema.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# @invoice-management/shared
|
|
2
|
+
|
|
3
|
+
A shared TypeORM library providing centralized database entities, migrations, and seeders for Invoice Management applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🗄️ **70+ Pre-built TypeORM Entities** - Ready-to-use database models
|
|
8
|
+
- 🔄 **Automatic Schema Management** - Create schemas across multiple databases
|
|
9
|
+
- 📦 **Database Migrations** - Version-controlled schema changes
|
|
10
|
+
- 🌱 **Smart Seeders** - Pre-configured data seeding with admin user
|
|
11
|
+
- ⚙️ **Dynamic Configuration** - Flexible ORM config factory for NestJS
|
|
12
|
+
- 📊 **Multi-Schema Support** - user, core, timesheet, notification schemas
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @invoice-management/shared
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Prerequisites
|
|
21
|
+
|
|
22
|
+
- Node.js >= 16
|
|
23
|
+
- PostgreSQL database
|
|
24
|
+
- NestJS >= 11 (for integration)
|
|
25
|
+
- TypeORM >= 0.3.21
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
### 1. Configure Environment Variables
|
|
30
|
+
|
|
31
|
+
Create a `.env` file in your project root:
|
|
32
|
+
|
|
33
|
+
```env
|
|
34
|
+
DB_HOST=localhost
|
|
35
|
+
DB_PORT=5432
|
|
36
|
+
DB_USERNAME=postgres
|
|
37
|
+
DB_PASSWORD=postgres
|
|
38
|
+
DB_NAME=your_database
|
|
39
|
+
NODE_ENV=development
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 2. Use in NestJS Application
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { Module } from '@nestjs/common';
|
|
46
|
+
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
47
|
+
import { createOrmConfig } from '@invoice-management/shared';
|
|
48
|
+
|
|
49
|
+
@Module({
|
|
50
|
+
imports: [
|
|
51
|
+
TypeOrmModule.forRoot(
|
|
52
|
+
createOrmConfig({
|
|
53
|
+
schema: 'core', // or 'user', 'timesheet', 'notification'
|
|
54
|
+
synchronize: false,
|
|
55
|
+
logging: true,
|
|
56
|
+
})
|
|
57
|
+
),
|
|
58
|
+
],
|
|
59
|
+
})
|
|
60
|
+
export class AppModule {}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 3. Import Entities
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
import {
|
|
67
|
+
User,
|
|
68
|
+
Role,
|
|
69
|
+
Permission,
|
|
70
|
+
Invoice,
|
|
71
|
+
Task,
|
|
72
|
+
Matter,
|
|
73
|
+
Timesheet,
|
|
74
|
+
} from '@invoice-management/shared';
|
|
75
|
+
|
|
76
|
+
// Use entities in your services/repositories
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Database Setup
|
|
80
|
+
|
|
81
|
+
Run these commands in order for initial setup:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# 1. Create database schemas
|
|
85
|
+
npm run schema:create
|
|
86
|
+
|
|
87
|
+
# 2. Generate initial migration (first time only)
|
|
88
|
+
npm run migration:generate -- src/database/migrations/initialMigration
|
|
89
|
+
|
|
90
|
+
# 3. Run migrations
|
|
91
|
+
npm run migration:run
|
|
92
|
+
|
|
93
|
+
# 4. Seed initial data (admin user, roles, permissions)
|
|
94
|
+
npm run seed:run
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Available Commands
|
|
98
|
+
|
|
99
|
+
### Schema Management
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm run schema:create # Create all required database schemas
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Migrations
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm run migration:generate -- <path> # Generate new migration from entity changes
|
|
109
|
+
npm run migration:create -- <name> # Create empty migration file
|
|
110
|
+
npm run migration:run # Execute pending migrations
|
|
111
|
+
npm run migration:revert # Revert last migration
|
|
112
|
+
npm run migration:show # Show migration status
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Seeding
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm run seed:run # Run all seeders (departments, roles, admin user, etc.)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Build
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm run build # Compile TypeScript to dist/
|
|
125
|
+
npm run build:watch # Watch mode for development
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## API Reference
|
|
129
|
+
|
|
130
|
+
### `createOrmConfig(options: OrmConfigOptions)`
|
|
131
|
+
|
|
132
|
+
Factory function to generate TypeORM configuration for NestJS.
|
|
133
|
+
|
|
134
|
+
**Options:**
|
|
135
|
+
- `schema` (required): Target database schema
|
|
136
|
+
- `additionalEntities`: Extra entities specific to your service
|
|
137
|
+
- `synchronize`: Auto-sync entities (default: false)
|
|
138
|
+
- `logging`: Enable query logging
|
|
139
|
+
|
|
140
|
+
**Example:**
|
|
141
|
+
```typescript
|
|
142
|
+
createOrmConfig({
|
|
143
|
+
schema: 'timesheet',
|
|
144
|
+
additionalEntities: [CustomEntity],
|
|
145
|
+
synchronize: false,
|
|
146
|
+
logging: true,
|
|
147
|
+
});
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### `getAllSharedEntities()`
|
|
151
|
+
|
|
152
|
+
Returns all entity classes from the shared library.
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
import { getAllSharedEntities } from '@invoice-management/shared';
|
|
156
|
+
|
|
157
|
+
const entities = getAllSharedEntities(); // Returns array of entity classes
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Included Seeders
|
|
161
|
+
|
|
162
|
+
The package includes pre-configured seeders for:
|
|
163
|
+
|
|
164
|
+
- ✅ **Departments** - Default organizational departments
|
|
165
|
+
- ✅ **Permissions** - System-wide permissions
|
|
166
|
+
- ✅ **Roles** - Admin, User roles with hierarchies
|
|
167
|
+
- ✅ **Admin User** - Default admin account
|
|
168
|
+
- ✅ **Currency** - Common currencies
|
|
169
|
+
- ✅ **Countries & Cities** - Geographic data
|
|
170
|
+
|
|
171
|
+
## Entity Categories
|
|
172
|
+
|
|
173
|
+
| Schema | Entities |
|
|
174
|
+
|--------|----------|
|
|
175
|
+
| **User** | User, Role, Permission, Department, Leave, Approvals, Sessions |
|
|
176
|
+
| **Core** | Client, Matter, Task, Invoice, Payment, Template, QuickBooks |
|
|
177
|
+
| **Timesheet** | Timesheet, Event, Shift, Holiday |
|
|
178
|
+
| **Notification** | Alert, Preferences, Channels |
|
|
179
|
+
|
|
180
|
+
## Publishing This Package
|
|
181
|
+
|
|
182
|
+
### Before Publishing
|
|
183
|
+
|
|
184
|
+
1. Update version in `package.json`:
|
|
185
|
+
```bash
|
|
186
|
+
npm version patch # or minor/major
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
2. Build the package:
|
|
190
|
+
```bash
|
|
191
|
+
npm run build
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
3. Verify build output in `dist/` folder
|
|
195
|
+
|
|
196
|
+
### Publish to npm Registry
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# Login to npm (first time)
|
|
200
|
+
npm login
|
|
201
|
+
|
|
202
|
+
# Publish package
|
|
203
|
+
npm publish --access public
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Publish to GitHub Packages (Alternative)
|
|
207
|
+
|
|
208
|
+
Add to `package.json`:
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"publishConfig": {
|
|
212
|
+
"registry": "https://npm.pkg.github.com"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Then publish:
|
|
218
|
+
```bash
|
|
219
|
+
npm publish
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Development
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Install dependencies
|
|
226
|
+
npm install
|
|
227
|
+
|
|
228
|
+
# Build package
|
|
229
|
+
npm run build
|
|
230
|
+
|
|
231
|
+
# Watch mode for development
|
|
232
|
+
npm run build:watch
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Environment Support
|
|
236
|
+
|
|
237
|
+
- **Development**: Full logging, synchronize enabled
|
|
238
|
+
- **Production**: Minimal logging, synchronize disabled
|
|
239
|
+
|
|
240
|
+
## License
|
|
241
|
+
|
|
242
|
+
UNLICENSED
|
|
243
|
+
|
|
244
|
+
## Support
|
|
245
|
+
|
|
246
|
+
For issues or questions, please contact the development team.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
**Note**: This is an internal package for Invoice Management applications. Ensure database credentials are properly configured before running migrations or seeders.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAllSharedEntities = exports.createOrmConfig = void 0;
|
|
4
|
+
var ormconfig_factory_1 = require("./ormconfig.factory");
|
|
5
|
+
Object.defineProperty(exports, "createOrmConfig", { enumerable: true, get: function () { return ormconfig_factory_1.createOrmConfig; } });
|
|
6
|
+
Object.defineProperty(exports, "getAllSharedEntities", { enumerable: true, get: function () { return ormconfig_factory_1.getAllSharedEntities; } });
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;AAAA,yDAI6B;AAH3B,oHAAA,eAAe,OAAA;AACf,yHAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
|
2
|
+
export interface OrmConfigOptions {
|
|
3
|
+
schema: string;
|
|
4
|
+
additionalEntities?: Function[];
|
|
5
|
+
synchronize?: boolean;
|
|
6
|
+
logging?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function getAllSharedEntities(): Function[];
|
|
9
|
+
export declare function createOrmConfig(options: OrmConfigOptions): TypeOrmModuleOptions;
|
|
10
|
+
//# sourceMappingURL=ormconfig.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ormconfig.factory.d.ts","sourceRoot":"","sources":["../../src/config/ormconfig.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAwBvD,MAAM,WAAW,gBAAgB;IAE/B,MAAM,EAAE,MAAM,CAAC;IAEf,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEhC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAKD,wBAAgB,oBAAoB,IAAI,QAAQ,EAAE,CA2BjD;AAcD,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,oBAAoB,CAsB/E"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAllSharedEntities = getAllSharedEntities;
|
|
4
|
+
exports.createOrmConfig = createOrmConfig;
|
|
5
|
+
const entities_1 = require("../database/entities");
|
|
6
|
+
function getAllSharedEntities() {
|
|
7
|
+
return [
|
|
8
|
+
entities_1.User, entities_1.Role, entities_1.Permission, entities_1.RolePermission, entities_1.UserRole, entities_1.Department, entities_1.FileData,
|
|
9
|
+
entities_1.Chat, entities_1.Entitlement, entities_1.LeaveType, entities_1.LeaveBalance, entities_1.LeaveRequest, entities_1.Gst, entities_1.UploadLog,
|
|
10
|
+
entities_1.OwnershipTransfer, entities_1.UserSessionHistory,
|
|
11
|
+
entities_1.ApprovalHierarchy, entities_1.ApprovalHierarchyRole, entities_1.ApprovalHierarchyUser,
|
|
12
|
+
entities_1.ApprovalLevel, entities_1.ApprovalLevelUser, entities_1.ApprovalLevelEscalation,
|
|
13
|
+
entities_1.ApprovalLevelEscalationUser, entities_1.ApprovalCondition, entities_1.ApprovalJourney,
|
|
14
|
+
entities_1.Currency, entities_1.Country, entities_1.City, entities_1.Client, entities_1.Contact, entities_1.Address,
|
|
15
|
+
entities_1.Matter, entities_1.MatterTag, entities_1.MatterTeamMember, entities_1.MatterTaskViewFilter,
|
|
16
|
+
entities_1.Task, entities_1.TaskType, entities_1.TaskUser, entities_1.TaskTag, entities_1.TaskComment, entities_1.TaskMilestone, entities_1.TaskReminder,
|
|
17
|
+
entities_1.SubTask, entities_1.SubTaskUser, entities_1.SubTaskTag, entities_1.Tag,
|
|
18
|
+
entities_1.Template, entities_1.TemplateTask,
|
|
19
|
+
entities_1.Invoice, entities_1.InvoiceItem, entities_1.UserInvoiceTemplateEntity,
|
|
20
|
+
entities_1.UserInvoiceTemplateHeaderEntity, entities_1.UserInvoiceTemplateTableEntity,
|
|
21
|
+
entities_1.UserInvoiceTemplateFooterEntity, entities_1.FixedInvoiceItem,
|
|
22
|
+
entities_1.Payment, entities_1.CreditNoteEntity, entities_1.Expense, entities_1.Group, entities_1.Superset,
|
|
23
|
+
entities_1.QuickBooksConnection, entities_1.QuickBooksSyncLog,
|
|
24
|
+
entities_1.ActivityLog, entities_1.TaskStatus, entities_1.TimesheetSummary, entities_1.SequenceGenerator,
|
|
25
|
+
entities_1.Timesheet, entities_1.TimesheetEvent, entities_1.TimesheetComment,
|
|
26
|
+
entities_1.Shift, entities_1.RoleShift, entities_1.UserShift, entities_1.Holiday,
|
|
27
|
+
entities_1.Alert, entities_1.UserNotificationPreference, entities_1.UserNotificationChannel,
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
function createOrmConfig(options) {
|
|
31
|
+
const { schema, additionalEntities = [], synchronize = false, logging, } = options;
|
|
32
|
+
return {
|
|
33
|
+
type: 'postgres',
|
|
34
|
+
host: process.env.DB_HOST ?? 'localhost',
|
|
35
|
+
port: parseInt(process.env.DB_PORT ?? '5432', 10),
|
|
36
|
+
username: process.env.DB_USERNAME ?? 'postgres',
|
|
37
|
+
password: process.env.DB_PASSWORD ?? 'postgres',
|
|
38
|
+
database: process.env.DB_NAME ?? 'IVM',
|
|
39
|
+
entities: [...getAllSharedEntities(), ...additionalEntities],
|
|
40
|
+
schema,
|
|
41
|
+
synchronize,
|
|
42
|
+
logging: logging ?? process.env.NODE_ENV === 'development',
|
|
43
|
+
retryAttempts: 3,
|
|
44
|
+
retryDelay: 3000,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=ormconfig.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ormconfig.factory.js","sourceRoot":"","sources":["../../src/config/ormconfig.factory.ts"],"names":[],"mappings":";;AAsCA,oDA2BC;AAcD,0CAsBC;AApGD,mDAqB8B;AAgB9B,SAAgB,oBAAoB;IAClC,OAAO;QAEL,eAAI,EAAE,eAAI,EAAE,qBAAU,EAAE,yBAAc,EAAE,mBAAQ,EAAE,qBAAU,EAAE,mBAAQ;QACtE,eAAI,EAAE,sBAAW,EAAE,oBAAS,EAAE,uBAAY,EAAE,uBAAY,EAAE,cAAG,EAAE,oBAAS;QACxE,4BAAiB,EAAE,6BAAkB;QACrC,4BAAiB,EAAE,gCAAqB,EAAE,gCAAqB;QAC/D,wBAAa,EAAE,4BAAiB,EAAE,kCAAuB;QACzD,sCAA2B,EAAE,4BAAiB,EAAE,0BAAe;QAE/D,mBAAQ,EAAE,kBAAO,EAAE,eAAI,EAAE,iBAAM,EAAE,kBAAO,EAAE,kBAAO;QACjD,iBAAM,EAAE,oBAAS,EAAE,2BAAgB,EAAE,+BAAoB;QACzD,eAAI,EAAE,mBAAQ,EAAE,mBAAQ,EAAE,kBAAO,EAAE,sBAAW,EAAE,wBAAa,EAAE,uBAAY;QAC3E,kBAAO,EAAE,sBAAW,EAAE,qBAAU,EAAE,cAAG;QACrC,mBAAQ,EAAE,uBAAY;QACtB,kBAAO,EAAE,sBAAW,EAAE,oCAAyB;QAC/C,0CAA+B,EAAE,yCAA8B;QAC/D,0CAA+B,EAAE,2BAAgB;QACjD,kBAAO,EAAE,2BAAgB,EAAE,kBAAO,EAAE,gBAAK,EAAE,mBAAQ;QACnD,+BAAoB,EAAE,4BAAiB;QACvC,sBAAW,EAAE,qBAAU,EAAE,2BAAgB,EAAE,4BAAiB;QAE5D,oBAAS,EAAE,yBAAc,EAAE,2BAAgB;QAC3C,gBAAK,EAAE,oBAAS,EAAE,oBAAS,EAAE,kBAAO;QAEpC,gBAAK,EAAE,qCAA0B,EAAE,kCAAuB;KAC3D,CAAC;AACJ,CAAC;AAcD,SAAgB,eAAe,CAAC,OAAyB;IACvD,MAAM,EACJ,MAAM,EACN,kBAAkB,GAAG,EAAE,EACvB,WAAW,GAAG,KAAK,EACnB,OAAO,GACR,GAAG,OAAO,CAAC;IAEZ,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW;QACxC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM,EAAE,EAAE,CAAC;QACjD,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU;QAC/C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU;QAC/C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,KAAK;QACtC,QAAQ,EAAE,CAAC,GAAG,oBAAoB,EAAE,EAAE,GAAG,kBAAkB,CAAC;QAC5D,MAAM;QACN,WAAW;QACX,OAAO,EAAE,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;QAC1D,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,IAAI;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeorm.config.d.ts","sourceRoot":"","sources":["../../src/config/typeorm.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,SAAS,CAAC;;AAqBxD,wBAAiD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const typeorm_1 = require("typeorm");
|
|
4
|
+
const dotenv_1 = require("dotenv");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const ormconfig_factory_1 = require("./ormconfig.factory");
|
|
7
|
+
(0, dotenv_1.config)();
|
|
8
|
+
const dataSourceOptions = {
|
|
9
|
+
type: 'postgres',
|
|
10
|
+
host: process.env.DB_HOST ?? 'localhost',
|
|
11
|
+
port: parseInt(process.env.DB_PORT ?? '5432'),
|
|
12
|
+
username: process.env.DB_USERNAME ?? 'postgres',
|
|
13
|
+
password: process.env.DB_PASSWORD ?? 'postgres',
|
|
14
|
+
database: process.env.DB_NAME ?? 'IVM',
|
|
15
|
+
entities: (0, ormconfig_factory_1.getAllSharedEntities)(),
|
|
16
|
+
migrations: [(0, path_1.join)(__dirname, '..', 'database', 'migrations', '*.{ts,js}')],
|
|
17
|
+
synchronize: false,
|
|
18
|
+
logging: process.env.NODE_ENV === 'development',
|
|
19
|
+
migrationsTableName: 'migrations',
|
|
20
|
+
};
|
|
21
|
+
exports.default = new typeorm_1.DataSource(dataSourceOptions);
|
|
22
|
+
//# sourceMappingURL=typeorm.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeorm.config.js","sourceRoot":"","sources":["../../src/config/typeorm.config.ts"],"names":[],"mappings":";;AAAA,qCAAwD;AACxD,mCAAgC;AAChC,+BAA4B;AAC5B,2DAA2D;AAE3D,IAAA,eAAM,GAAE,CAAC;AAET,MAAM,iBAAiB,GAAsB;IAC3C,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,WAAW;IACxC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC;IAC7C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU;IAC/C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,UAAU;IAC/C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,KAAK;IACtC,QAAQ,EAAE,IAAA,wCAAoB,GAAE;IAChC,UAAU,EAAE,CAAC,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAC1E,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa;IAC/C,mBAAmB,EAAE,YAAY;CAClC,CAAC;AAEF,kBAAe,IAAI,oBAAU,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/constant/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./notification-preference"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/constant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare enum NotificationPreferenceType {
|
|
2
|
+
TASK_UPDATES = "task_updates",
|
|
3
|
+
APPROVALS_REVIEWS = "approvals_reviews",
|
|
4
|
+
SECURITY_ALERTS = "security_alerts",
|
|
5
|
+
BILLING_PAYMENT_UPDATES = "billing_payment_updates",
|
|
6
|
+
MENTIONS_COMMENTS = "mentions_comments",
|
|
7
|
+
DAILY_SUMMARY_DIGEST = "daily_summary_digest"
|
|
8
|
+
}
|
|
9
|
+
export declare enum NotificationChannel {
|
|
10
|
+
EMAIL = "email",
|
|
11
|
+
PUSH = "push",
|
|
12
|
+
WHATSAPP = "whatsapp"
|
|
13
|
+
}
|
|
14
|
+
export declare enum ChannelField {
|
|
15
|
+
EMAIL_ENABLED = "emailEnabled",
|
|
16
|
+
PUSH_ENABLED = "pushEnabled",
|
|
17
|
+
WHATSAPP_ENABLED = "whatsappEnabled"
|
|
18
|
+
}
|
|
19
|
+
export interface NotificationPreferenceConfig {
|
|
20
|
+
type: NotificationPreferenceType;
|
|
21
|
+
title: string;
|
|
22
|
+
description: string;
|
|
23
|
+
defaultEnabled: boolean;
|
|
24
|
+
supportedChannels: NotificationChannel[];
|
|
25
|
+
defaultChannels: NotificationChannel[];
|
|
26
|
+
priority: 'high' | 'medium' | 'low';
|
|
27
|
+
}
|
|
28
|
+
export declare const NOTIFICATION_PREFERENCE_CONFIGS: Record<NotificationPreferenceType, NotificationPreferenceConfig>;
|
|
29
|
+
//# sourceMappingURL=notification-preference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-preference.d.ts","sourceRoot":"","sources":["../../../src/core/constant/notification-preference.ts"],"names":[],"mappings":"AAaA,oBAAY,0BAA0B;IACpC,YAAY,iBAAiB;IAC7B,iBAAiB,sBAAsB;IACvC,eAAe,oBAAoB;IACnC,uBAAuB,4BAA4B;IACnD,iBAAiB,sBAAsB;IACvC,oBAAoB,yBAAyB;CAC9C;AAKD,oBAAY,mBAAmB;IAC7B,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAKD,oBAAY,YAAY;IACtB,aAAa,iBAAiB;IAC9B,YAAY,gBAAgB;IAC5B,gBAAgB,oBAAoB;CACrC;AAKD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,0BAA0B,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;IACzC,eAAe,EAAE,mBAAmB,EAAE,CAAC;IACvC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CACrC;AAMD,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,0BAA0B,EAAE,4BAA4B,CAuD5G,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NOTIFICATION_PREFERENCE_CONFIGS = exports.ChannelField = exports.NotificationChannel = exports.NotificationPreferenceType = void 0;
|
|
4
|
+
var NotificationPreferenceType;
|
|
5
|
+
(function (NotificationPreferenceType) {
|
|
6
|
+
NotificationPreferenceType["TASK_UPDATES"] = "task_updates";
|
|
7
|
+
NotificationPreferenceType["APPROVALS_REVIEWS"] = "approvals_reviews";
|
|
8
|
+
NotificationPreferenceType["SECURITY_ALERTS"] = "security_alerts";
|
|
9
|
+
NotificationPreferenceType["BILLING_PAYMENT_UPDATES"] = "billing_payment_updates";
|
|
10
|
+
NotificationPreferenceType["MENTIONS_COMMENTS"] = "mentions_comments";
|
|
11
|
+
NotificationPreferenceType["DAILY_SUMMARY_DIGEST"] = "daily_summary_digest";
|
|
12
|
+
})(NotificationPreferenceType || (exports.NotificationPreferenceType = NotificationPreferenceType = {}));
|
|
13
|
+
var NotificationChannel;
|
|
14
|
+
(function (NotificationChannel) {
|
|
15
|
+
NotificationChannel["EMAIL"] = "email";
|
|
16
|
+
NotificationChannel["PUSH"] = "push";
|
|
17
|
+
NotificationChannel["WHATSAPP"] = "whatsapp";
|
|
18
|
+
})(NotificationChannel || (exports.NotificationChannel = NotificationChannel = {}));
|
|
19
|
+
var ChannelField;
|
|
20
|
+
(function (ChannelField) {
|
|
21
|
+
ChannelField["EMAIL_ENABLED"] = "emailEnabled";
|
|
22
|
+
ChannelField["PUSH_ENABLED"] = "pushEnabled";
|
|
23
|
+
ChannelField["WHATSAPP_ENABLED"] = "whatsappEnabled";
|
|
24
|
+
})(ChannelField || (exports.ChannelField = ChannelField = {}));
|
|
25
|
+
exports.NOTIFICATION_PREFERENCE_CONFIGS = {
|
|
26
|
+
[NotificationPreferenceType.TASK_UPDATES]: {
|
|
27
|
+
type: NotificationPreferenceType.TASK_UPDATES,
|
|
28
|
+
title: 'Task Updates',
|
|
29
|
+
description: 'Get notified when a task is created, updated, completed, or overdue.',
|
|
30
|
+
defaultEnabled: true,
|
|
31
|
+
supportedChannels: [NotificationChannel.EMAIL, NotificationChannel.PUSH, NotificationChannel.WHATSAPP],
|
|
32
|
+
defaultChannels: [NotificationChannel.EMAIL, NotificationChannel.PUSH],
|
|
33
|
+
priority: 'high',
|
|
34
|
+
},
|
|
35
|
+
[NotificationPreferenceType.APPROVALS_REVIEWS]: {
|
|
36
|
+
type: NotificationPreferenceType.APPROVALS_REVIEWS,
|
|
37
|
+
title: 'Approvals & Reviews',
|
|
38
|
+
description: 'Receive alerts when a pending approval is assigned to you or requires your action.',
|
|
39
|
+
defaultEnabled: true,
|
|
40
|
+
supportedChannels: [NotificationChannel.EMAIL, NotificationChannel.PUSH, NotificationChannel.WHATSAPP],
|
|
41
|
+
defaultChannels: [NotificationChannel.EMAIL, NotificationChannel.PUSH],
|
|
42
|
+
priority: 'high',
|
|
43
|
+
},
|
|
44
|
+
[NotificationPreferenceType.SECURITY_ALERTS]: {
|
|
45
|
+
type: NotificationPreferenceType.SECURITY_ALERTS,
|
|
46
|
+
title: 'Security Alerts',
|
|
47
|
+
description: 'Get notifications for suspicious logins, password changes, and unauthorized access attempts.',
|
|
48
|
+
defaultEnabled: true,
|
|
49
|
+
supportedChannels: [NotificationChannel.EMAIL, NotificationChannel.PUSH],
|
|
50
|
+
defaultChannels: [NotificationChannel.EMAIL, NotificationChannel.PUSH],
|
|
51
|
+
priority: 'high',
|
|
52
|
+
},
|
|
53
|
+
[NotificationPreferenceType.BILLING_PAYMENT_UPDATES]: {
|
|
54
|
+
type: NotificationPreferenceType.BILLING_PAYMENT_UPDATES,
|
|
55
|
+
title: 'Billing & Payment Updates',
|
|
56
|
+
description: 'Notify users when an invoice is generated, payment is due, or a billing task is assigned.',
|
|
57
|
+
defaultEnabled: true,
|
|
58
|
+
supportedChannels: [NotificationChannel.EMAIL, NotificationChannel.PUSH],
|
|
59
|
+
defaultChannels: [NotificationChannel.EMAIL],
|
|
60
|
+
priority: 'medium',
|
|
61
|
+
},
|
|
62
|
+
[NotificationPreferenceType.MENTIONS_COMMENTS]: {
|
|
63
|
+
type: NotificationPreferenceType.MENTIONS_COMMENTS,
|
|
64
|
+
title: 'Mentions & Comments',
|
|
65
|
+
description: 'Alerts when someone mentions you in a discussion or comments on a task.',
|
|
66
|
+
defaultEnabled: true,
|
|
67
|
+
supportedChannels: [NotificationChannel.EMAIL, NotificationChannel.PUSH],
|
|
68
|
+
defaultChannels: [NotificationChannel.EMAIL, NotificationChannel.PUSH],
|
|
69
|
+
priority: 'medium',
|
|
70
|
+
},
|
|
71
|
+
[NotificationPreferenceType.DAILY_SUMMARY_DIGEST]: {
|
|
72
|
+
type: NotificationPreferenceType.DAILY_SUMMARY_DIGEST,
|
|
73
|
+
title: 'Daily Summary Digest',
|
|
74
|
+
description: 'Choose to receive a daily report of pending tasks, overdue approvals, and priority items.',
|
|
75
|
+
defaultEnabled: true,
|
|
76
|
+
supportedChannels: [NotificationChannel.EMAIL],
|
|
77
|
+
defaultChannels: [NotificationChannel.EMAIL],
|
|
78
|
+
priority: 'low',
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=notification-preference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-preference.js","sourceRoot":"","sources":["../../../src/core/constant/notification-preference.ts"],"names":[],"mappings":";;;AAaA,IAAY,0BAOX;AAPD,WAAY,0BAA0B;IACpC,2DAA6B,CAAA;IAC7B,qEAAuC,CAAA;IACvC,iEAAmC,CAAA;IACnC,iFAAmD,CAAA;IACnD,qEAAuC,CAAA;IACvC,2EAA6C,CAAA;AAC/C,CAAC,EAPW,0BAA0B,0CAA1B,0BAA0B,QAOrC;AAKD,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,oCAAa,CAAA;IACb,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAKD,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,8CAA8B,CAAA;IAC9B,4CAA4B,CAAA;IAC5B,oDAAoC,CAAA;AACtC,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AAmBY,QAAA,+BAA+B,GAAqE;IAC/G,CAAC,0BAA0B,CAAC,YAAY,CAAC,EAAE;QACzC,IAAI,EAAE,0BAA0B,CAAC,YAAY;QAC7C,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,sEAAsE;QACnF,cAAc,EAAE,IAAI;QACpB,iBAAiB,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC;QACtG,eAAe,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC;QACtE,QAAQ,EAAE,MAAM;KACjB;IACD,CAAC,0BAA0B,CAAC,iBAAiB,CAAC,EAAE;QAC9C,IAAI,EAAE,0BAA0B,CAAC,iBAAiB;QAClD,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,oFAAoF;QACjG,cAAc,EAAE,IAAI;QACpB,iBAAiB,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC;QACtG,eAAe,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC;QACtE,QAAQ,EAAE,MAAM;KACjB;IACD,CAAC,0BAA0B,CAAC,eAAe,CAAC,EAAE;QAC5C,IAAI,EAAE,0BAA0B,CAAC,eAAe;QAChD,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,8FAA8F;QAC3G,cAAc,EAAE,IAAI;QACpB,iBAAiB,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC;QACxE,eAAe,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC;QACtE,QAAQ,EAAE,MAAM;KACjB;IACD,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,EAAE;QACpD,IAAI,EAAE,0BAA0B,CAAC,uBAAuB;QACxD,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE,2FAA2F;QACxG,cAAc,EAAE,IAAI;QACpB,iBAAiB,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC;QACxE,eAAe,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC;QAC5C,QAAQ,EAAE,QAAQ;KACnB;IACD,CAAC,0BAA0B,CAAC,iBAAiB,CAAC,EAAE;QAC9C,IAAI,EAAE,0BAA0B,CAAC,iBAAiB;QAClD,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,yEAAyE;QACtF,cAAc,EAAE,IAAI;QACpB,iBAAiB,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC;QACxE,eAAe,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC;QACtE,QAAQ,EAAE,QAAQ;KACnB;IACD,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,EAAE;QACjD,IAAI,EAAE,0BAA0B,CAAC,oBAAoB;QACrD,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,2FAA2F;QACxG,cAAc,EAAE,IAAI;QACpB,iBAAiB,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC;QAC9C,eAAe,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC;QAC5C,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"departmentName": "Engineering",
|
|
4
|
+
"departmentDescription": "Engineering department responsible for technical infrastructure",
|
|
5
|
+
"departmentSlug": "engineering",
|
|
6
|
+
"isActive": true
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"departmentName": "Information Technology",
|
|
10
|
+
"departmentDescription": "IT department responsible for technical infrastructure",
|
|
11
|
+
"departmentSlug": "information-technology",
|
|
12
|
+
"isActive": true
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"departmentName": "Human Resources",
|
|
16
|
+
"departmentDescription": "HR department responsible for employee management",
|
|
17
|
+
"departmentSlug": "human-resources",
|
|
18
|
+
"isActive": true
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"departmentName": "Finance",
|
|
22
|
+
"departmentDescription": "Finance department responsible for financial operations",
|
|
23
|
+
"departmentSlug": "finance",
|
|
24
|
+
"isActive": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"departmentName": "Marketing",
|
|
28
|
+
"departmentDescription": "Marketing department responsible for brand and marketing",
|
|
29
|
+
"departmentSlug": "marketing",
|
|
30
|
+
"isActive": true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"departmentName": "Operations",
|
|
34
|
+
"departmentDescription": "Operations department responsible for day-to-day operations",
|
|
35
|
+
"departmentSlug": "operations",
|
|
36
|
+
"isActive": true
|
|
37
|
+
}
|
|
38
|
+
]
|