@tailor-platform/erp-kit 0.4.0 → 0.4.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/CHANGELOG.md +9 -0
- package/dist/cli.mjs +9 -9
- package/package.json +1 -1
- package/skills/erp-kit-app-1-requirements/SKILL.md +31 -3
- package/skills/{erp-kit-app-3-plan → erp-kit-app-1-requirements}/references/story-extraction.md +3 -9
- package/skills/erp-kit-app-2-requirements-review/SKILL.md +29 -5
- package/skills/erp-kit-app-2-requirements-review/references/story-quality-check.md +67 -0
- package/skills/erp-kit-app-3-plan/SKILL.md +33 -32
- package/skills/erp-kit-app-3-plan/references/resolver-extraction.md +4 -2
- package/skills/erp-kit-app-3-plan/references/screen-extraction.md +5 -3
- package/skills/erp-kit-app-4-plan-review/SKILL.md +16 -13
- package/skills/erp-kit-app-5-impl-backend/SKILL.md +10 -0
- package/skills/erp-kit-app-6-impl-frontend/SKILL.md +11 -0
- package/skills/erp-kit-app-7-impl-review/SKILL.md +18 -14
- package/skills/erp-kit-module-2-requirements-review/SKILL.md +16 -8
- package/skills/erp-kit-module-4-plan-review/SKILL.md +19 -12
- package/skills/erp-kit-module-shared/references/commands.md +1 -1
- package/skills/erp-kit-module-shared/references/queries.md +5 -6
- package/src/generator/generate-code-boilerplate.test.ts +0 -1
- package/src/generator/generate-code.test.ts +10 -6
- package/src/generator/generate-errors.ts +1 -1
- package/src/generator/generate-permissions.ts +1 -1
- package/src/generator/generate-shells.ts +2 -2
- package/src/generator/stub-templates.ts +5 -5
- package/src/module.ts +3 -0
- package/src/modules/audit/command/activateAuditPolicy.generated.ts +1 -1
- package/src/modules/audit/command/activateAuditPolicy.test.ts +1 -1
- package/src/modules/audit/command/activateAuditPolicy.ts +1 -1
- package/src/modules/audit/command/createAuditPolicy.generated.ts +1 -1
- package/src/modules/audit/command/createAuditPolicy.test.ts +1 -1
- package/src/modules/audit/command/createAuditPolicy.ts +1 -1
- package/src/modules/audit/command/deactivateAuditPolicy.generated.ts +1 -1
- package/src/modules/audit/command/deactivateAuditPolicy.test.ts +2 -2
- package/src/modules/audit/command/deactivateAuditPolicy.ts +1 -1
- package/src/modules/audit/command/deleteAuditPolicy.generated.ts +1 -1
- package/src/modules/audit/command/deleteAuditPolicy.test.ts +1 -1
- package/src/modules/audit/command/deleteAuditPolicy.ts +1 -1
- package/src/modules/audit/command/logAuditEvent.generated.ts +1 -1
- package/src/modules/audit/command/logAuditEvent.test.ts +1 -1
- package/src/modules/audit/command/logAuditEvent.ts +1 -1
- package/src/modules/audit/command/reactivateAuditPolicy.generated.ts +1 -1
- package/src/modules/audit/command/reactivateAuditPolicy.test.ts +2 -2
- package/src/modules/audit/command/reactivateAuditPolicy.ts +1 -1
- package/src/modules/audit/command/registerAuditableEntity.generated.ts +1 -1
- package/src/modules/audit/command/registerAuditableEntity.test.ts +1 -1
- package/src/modules/audit/command/registerAuditableEntity.ts +1 -1
- package/src/modules/audit/command/replaceAuditPolicy.generated.ts +1 -1
- package/src/modules/audit/command/replaceAuditPolicy.test.ts +1 -1
- package/src/modules/audit/command/replaceAuditPolicy.ts +1 -1
- package/src/modules/audit/command/updateAuditPolicy.generated.ts +1 -1
- package/src/modules/audit/command/updateAuditPolicy.test.ts +1 -1
- package/src/modules/audit/command/updateAuditPolicy.ts +1 -1
- package/src/modules/audit/lib/errors.generated.ts +1 -1
- package/src/modules/audit/lib/permissions.generated.ts +1 -1
- package/src/modules/audit/lib/types.ts +6 -1
- package/src/modules/audit/permissions.ts +1 -1
- package/src/modules/audit/query/getAuditEntry.generated.ts +1 -1
- package/src/modules/audit/query/getAuditEntry.test.ts +2 -2
- package/src/modules/audit/query/getAuditEntry.ts +7 -1
- package/src/modules/audit/query/getAuditPolicy.generated.ts +1 -1
- package/src/modules/audit/query/getAuditPolicy.test.ts +2 -2
- package/src/modules/audit/query/getAuditPolicy.ts +7 -1
- package/src/modules/audit/query/getAuditSummary.generated.ts +1 -1
- package/src/modules/audit/query/getAuditSummary.test.ts +2 -2
- package/src/modules/audit/query/getAuditSummary.ts +7 -1
- package/src/modules/audit/query/getChangeDetails.generated.ts +1 -1
- package/src/modules/audit/query/getChangeDetails.test.ts +2 -2
- package/src/modules/audit/query/getChangeDetails.ts +7 -1
- package/src/modules/audit/query/listAuditPolicies.generated.ts +1 -1
- package/src/modules/audit/query/listAuditPolicies.test.ts +2 -2
- package/src/modules/audit/query/listAuditPolicies.ts +3 -3
- package/src/modules/audit/query/searchAuditEntries.generated.ts +1 -1
- package/src/modules/audit/query/searchAuditEntries.test.ts +2 -2
- package/src/modules/audit/query/searchAuditEntries.ts +7 -7
- package/src/modules/business-partner/command/activatePartner.generated.ts +1 -1
- package/src/modules/business-partner/command/activatePartner.ts +1 -1
- package/src/modules/business-partner/command/assignRoleToPartner.generated.ts +1 -1
- package/src/modules/business-partner/command/assignRoleToPartner.test.ts +1 -1
- package/src/modules/business-partner/command/assignRoleToPartner.ts +1 -1
- package/src/modules/business-partner/command/createContactPerson.generated.ts +1 -1
- package/src/modules/business-partner/command/createContactPerson.ts +1 -1
- package/src/modules/business-partner/command/createPartner.generated.ts +1 -1
- package/src/modules/business-partner/command/createPartner.test.ts +1 -1
- package/src/modules/business-partner/command/createPartner.ts +3 -4
- package/src/modules/business-partner/command/createPartnerAddress.generated.ts +1 -1
- package/src/modules/business-partner/command/createPartnerAddress.ts +1 -1
- package/src/modules/business-partner/command/createPartnerBankAccount.generated.ts +1 -1
- package/src/modules/business-partner/command/createPartnerBankAccount.test.ts +1 -1
- package/src/modules/business-partner/command/createPartnerBankAccount.ts +1 -1
- package/src/modules/business-partner/command/createPartnerIdentification.generated.ts +1 -1
- package/src/modules/business-partner/command/createPartnerIdentification.test.ts +1 -1
- package/src/modules/business-partner/command/createPartnerIdentification.ts +1 -1
- package/src/modules/business-partner/command/deactivateContactPerson.generated.ts +1 -1
- package/src/modules/business-partner/command/deactivateContactPerson.ts +1 -1
- package/src/modules/business-partner/command/deactivatePartner.generated.ts +1 -1
- package/src/modules/business-partner/command/deactivatePartner.ts +1 -1
- package/src/modules/business-partner/command/deleteContactPerson.generated.ts +1 -1
- package/src/modules/business-partner/command/deleteContactPerson.ts +1 -1
- package/src/modules/business-partner/command/deletePartner.generated.ts +1 -1
- package/src/modules/business-partner/command/deletePartner.ts +1 -1
- package/src/modules/business-partner/command/deletePartnerAddress.generated.ts +1 -1
- package/src/modules/business-partner/command/deletePartnerAddress.test.ts +1 -1
- package/src/modules/business-partner/command/deletePartnerAddress.ts +1 -1
- package/src/modules/business-partner/command/deletePartnerBankAccount.generated.ts +1 -1
- package/src/modules/business-partner/command/deletePartnerBankAccount.test.ts +1 -1
- package/src/modules/business-partner/command/deletePartnerBankAccount.ts +1 -1
- package/src/modules/business-partner/command/deletePartnerIdentification.generated.ts +1 -1
- package/src/modules/business-partner/command/deletePartnerIdentification.test.ts +1 -1
- package/src/modules/business-partner/command/deletePartnerIdentification.ts +1 -1
- package/src/modules/business-partner/command/reactivateContactPerson.generated.ts +1 -1
- package/src/modules/business-partner/command/reactivateContactPerson.ts +1 -1
- package/src/modules/business-partner/command/reactivatePartner.generated.ts +1 -1
- package/src/modules/business-partner/command/reactivatePartner.ts +1 -1
- package/src/modules/business-partner/command/removeRoleFromPartner.generated.ts +1 -1
- package/src/modules/business-partner/command/removeRoleFromPartner.test.ts +1 -1
- package/src/modules/business-partner/command/removeRoleFromPartner.ts +1 -1
- package/src/modules/business-partner/command/setDefaultPartnerAddress.generated.ts +1 -1
- package/src/modules/business-partner/command/setDefaultPartnerAddress.ts +1 -1
- package/src/modules/business-partner/command/setDefaultPartnerBankAccount.generated.ts +1 -1
- package/src/modules/business-partner/command/setDefaultPartnerBankAccount.test.ts +1 -1
- package/src/modules/business-partner/command/setDefaultPartnerBankAccount.ts +1 -1
- package/src/modules/business-partner/command/setPrimaryContactPerson.generated.ts +1 -1
- package/src/modules/business-partner/command/setPrimaryContactPerson.ts +1 -1
- package/src/modules/business-partner/command/updateContactPerson.generated.ts +1 -1
- package/src/modules/business-partner/command/updateContactPerson.ts +1 -1
- package/src/modules/business-partner/command/updatePartner.generated.ts +1 -1
- package/src/modules/business-partner/command/updatePartner.test.ts +1 -1
- package/src/modules/business-partner/command/updatePartner.ts +1 -1
- package/src/modules/business-partner/command/updatePartnerAddress.generated.ts +1 -1
- package/src/modules/business-partner/command/updatePartnerAddress.ts +1 -1
- package/src/modules/business-partner/command/updatePartnerBankAccount.generated.ts +1 -1
- package/src/modules/business-partner/command/updatePartnerBankAccount.test.ts +1 -1
- package/src/modules/business-partner/command/updatePartnerBankAccount.ts +1 -1
- package/src/modules/business-partner/command/updatePartnerIdentification.generated.ts +1 -1
- package/src/modules/business-partner/command/updatePartnerIdentification.test.ts +1 -1
- package/src/modules/business-partner/command/updatePartnerIdentification.ts +1 -1
- package/src/modules/business-partner/lib/errors.generated.ts +1 -1
- package/src/modules/business-partner/lib/permissions.generated.ts +1 -1
- package/src/modules/business-partner/lib/types.ts +6 -1
- package/src/modules/business-partner/module.ts +1 -1
- package/src/modules/business-partner/permissions.ts +1 -1
- package/src/modules/business-partner/query/getContactPerson.generated.ts +1 -1
- package/src/modules/business-partner/query/getContactPerson.ts +1 -1
- package/src/modules/business-partner/query/getDefaultPartnerAddress.generated.ts +1 -1
- package/src/modules/business-partner/query/getDefaultPartnerAddress.ts +1 -1
- package/src/modules/business-partner/query/getDefaultPartnerBankAccount.generated.ts +1 -1
- package/src/modules/business-partner/query/getDefaultPartnerBankAccount.ts +1 -1
- package/src/modules/business-partner/query/getPartner.generated.ts +1 -1
- package/src/modules/business-partner/query/getPartner.ts +1 -1
- package/src/modules/business-partner/query/getPartnerAddress.generated.ts +1 -1
- package/src/modules/business-partner/query/getPartnerAddress.ts +1 -1
- package/src/modules/business-partner/query/getPartnerBankAccount.generated.ts +1 -1
- package/src/modules/business-partner/query/getPartnerBankAccount.ts +1 -1
- package/src/modules/business-partner/query/getPartnerIdentification.generated.ts +1 -1
- package/src/modules/business-partner/query/getPartnerIdentification.ts +1 -1
- package/src/modules/business-partner/query/getPartnerRole.generated.ts +1 -1
- package/src/modules/business-partner/query/getPartnerRole.ts +1 -1
- package/src/modules/business-partner/query/getPrimaryContactPerson.generated.ts +1 -1
- package/src/modules/business-partner/query/getPrimaryContactPerson.ts +1 -1
- package/src/modules/business-partner/query/listContactPersonsByPartner.generated.ts +1 -1
- package/src/modules/business-partner/query/listContactPersonsByPartner.ts +2 -2
- package/src/modules/business-partner/query/listPartnerAddressesByPartner.generated.ts +1 -1
- package/src/modules/business-partner/query/listPartnerAddressesByPartner.ts +3 -3
- package/src/modules/business-partner/query/listPartnerBankAccountsByPartner.generated.ts +1 -1
- package/src/modules/business-partner/query/listPartnerBankAccountsByPartner.ts +2 -2
- package/src/modules/business-partner/query/listPartnerIdentificationsByPartner.generated.ts +1 -1
- package/src/modules/business-partner/query/listPartnerIdentificationsByPartner.ts +3 -3
- package/src/modules/business-partner/query/listPartnersByRole.generated.ts +1 -1
- package/src/modules/business-partner/query/listPartnersByRole.ts +4 -4
- package/src/modules/coa-management/command/activateAccount.generated.ts +1 -1
- package/src/modules/coa-management/command/activateAccount.test.ts +1 -1
- package/src/modules/coa-management/command/activateAccount.ts +1 -1
- package/src/modules/coa-management/command/activateChartOfAccounts.generated.ts +1 -1
- package/src/modules/coa-management/command/activateChartOfAccounts.test.ts +1 -1
- package/src/modules/coa-management/command/activateChartOfAccounts.ts +1 -1
- package/src/modules/coa-management/command/createAccount.generated.ts +1 -1
- package/src/modules/coa-management/command/createAccount.test.ts +1 -1
- package/src/modules/coa-management/command/createAccount.ts +1 -1
- package/src/modules/coa-management/command/createAccountGroup.generated.ts +1 -1
- package/src/modules/coa-management/command/createAccountGroup.test.ts +1 -1
- package/src/modules/coa-management/command/createAccountGroup.ts +1 -1
- package/src/modules/coa-management/command/createChartOfAccounts.generated.ts +1 -1
- package/src/modules/coa-management/command/createChartOfAccounts.test.ts +1 -1
- package/src/modules/coa-management/command/createChartOfAccounts.ts +1 -1
- package/src/modules/coa-management/command/deactivateAccount.generated.ts +1 -1
- package/src/modules/coa-management/command/deactivateAccount.test.ts +1 -1
- package/src/modules/coa-management/command/deactivateAccount.ts +1 -1
- package/src/modules/coa-management/command/deactivateChartOfAccounts.generated.ts +1 -1
- package/src/modules/coa-management/command/deactivateChartOfAccounts.test.ts +1 -1
- package/src/modules/coa-management/command/deactivateChartOfAccounts.ts +1 -1
- package/src/modules/coa-management/command/deleteAccount.generated.ts +1 -1
- package/src/modules/coa-management/command/deleteAccount.test.ts +1 -1
- package/src/modules/coa-management/command/deleteAccount.ts +1 -1
- package/src/modules/coa-management/command/deleteAccountGroup.generated.ts +1 -1
- package/src/modules/coa-management/command/deleteAccountGroup.test.ts +1 -1
- package/src/modules/coa-management/command/deleteAccountGroup.ts +1 -1
- package/src/modules/coa-management/command/deleteChartOfAccounts.generated.ts +1 -1
- package/src/modules/coa-management/command/deleteChartOfAccounts.test.ts +1 -1
- package/src/modules/coa-management/command/deleteChartOfAccounts.ts +1 -1
- package/src/modules/coa-management/command/moveAccountGroup.generated.ts +1 -1
- package/src/modules/coa-management/command/moveAccountGroup.test.ts +1 -1
- package/src/modules/coa-management/command/moveAccountGroup.ts +1 -1
- package/src/modules/coa-management/command/reactivateAccount.generated.ts +1 -1
- package/src/modules/coa-management/command/reactivateAccount.test.ts +1 -1
- package/src/modules/coa-management/command/reactivateAccount.ts +1 -1
- package/src/modules/coa-management/command/updateAccount.generated.ts +1 -1
- package/src/modules/coa-management/command/updateAccount.test.ts +1 -1
- package/src/modules/coa-management/command/updateAccount.ts +1 -1
- package/src/modules/coa-management/command/updateAccountGroup.generated.ts +1 -1
- package/src/modules/coa-management/command/updateAccountGroup.test.ts +1 -1
- package/src/modules/coa-management/command/updateAccountGroup.ts +1 -1
- package/src/modules/coa-management/command/updateChartOfAccounts.generated.ts +1 -1
- package/src/modules/coa-management/command/updateChartOfAccounts.test.ts +1 -1
- package/src/modules/coa-management/command/updateChartOfAccounts.ts +1 -1
- package/src/modules/coa-management/lib/errors.generated.ts +1 -1
- package/src/modules/coa-management/lib/permissions.generated.ts +1 -1
- package/src/modules/coa-management/lib/types.ts +6 -1
- package/src/modules/coa-management/module.ts +1 -1
- package/src/modules/coa-management/permissions.ts +1 -1
- package/src/modules/coa-management/query/detectCircularReference.generated.ts +1 -1
- package/src/modules/coa-management/query/detectCircularReference.ts +1 -1
- package/src/modules/coa-management/query/getAccount.generated.ts +1 -1
- package/src/modules/coa-management/query/getAccount.ts +1 -1
- package/src/modules/coa-management/query/getAccountGroup.generated.ts +1 -1
- package/src/modules/coa-management/query/getAccountGroup.ts +1 -1
- package/src/modules/coa-management/query/getChartOfAccounts.generated.ts +1 -1
- package/src/modules/coa-management/query/getChartOfAccounts.ts +1 -1
- package/src/modules/coa-management/query/listAccountGroups.generated.ts +1 -1
- package/src/modules/coa-management/query/listAccountGroups.ts +2 -2
- package/src/modules/coa-management/query/listAccounts.generated.ts +1 -1
- package/src/modules/coa-management/query/listAccounts.ts +3 -3
- package/src/modules/coa-management/query/listUnassignedAccounts.generated.ts +1 -1
- package/src/modules/coa-management/query/listUnassignedAccounts.ts +2 -2
- package/src/modules/item-management/command/activateItem.generated.ts +1 -1
- package/src/modules/item-management/command/activateItem.ts +1 -1
- package/src/modules/item-management/command/assignItemToTaxonomy.generated.ts +1 -1
- package/src/modules/item-management/command/assignItemToTaxonomy.ts +1 -1
- package/src/modules/item-management/command/createItem.generated.ts +1 -1
- package/src/modules/item-management/command/createItem.test.ts +1 -1
- package/src/modules/item-management/command/createItem.ts +1 -1
- package/src/modules/item-management/command/createTaxonomyNode.generated.ts +1 -1
- package/src/modules/item-management/command/createTaxonomyNode.test.ts +1 -1
- package/src/modules/item-management/command/createTaxonomyNode.ts +1 -1
- package/src/modules/item-management/command/deactivateItem.generated.ts +1 -1
- package/src/modules/item-management/command/deactivateItem.ts +1 -1
- package/src/modules/item-management/command/deleteItem.generated.ts +1 -1
- package/src/modules/item-management/command/deleteItem.ts +1 -1
- package/src/modules/item-management/command/deleteTaxonomyNode.generated.ts +1 -1
- package/src/modules/item-management/command/deleteTaxonomyNode.ts +1 -1
- package/src/modules/item-management/command/moveTaxonomyNode.generated.ts +1 -1
- package/src/modules/item-management/command/moveTaxonomyNode.test.ts +1 -1
- package/src/modules/item-management/command/moveTaxonomyNode.ts +1 -1
- package/src/modules/item-management/command/reactivateItem.generated.ts +1 -1
- package/src/modules/item-management/command/reactivateItem.ts +1 -1
- package/src/modules/item-management/command/removeItemFromTaxonomy.generated.ts +1 -1
- package/src/modules/item-management/command/removeItemFromTaxonomy.ts +1 -1
- package/src/modules/item-management/command/updateItem.generated.ts +1 -1
- package/src/modules/item-management/command/updateItem.test.ts +1 -1
- package/src/modules/item-management/command/updateItem.ts +1 -1
- package/src/modules/item-management/command/updateTaxonomyNode.generated.ts +1 -1
- package/src/modules/item-management/command/updateTaxonomyNode.ts +1 -1
- package/src/modules/item-management/lib/errors.generated.ts +1 -1
- package/src/modules/item-management/lib/permissions.generated.ts +1 -1
- package/src/modules/item-management/lib/types.ts +6 -1
- package/src/modules/item-management/module.ts +1 -1
- package/src/modules/item-management/query/calculateNodeDepth.generated.ts +1 -1
- package/src/modules/item-management/query/calculateNodeDepth.ts +1 -1
- package/src/modules/item-management/query/calculateSubtreeDepth.generated.ts +1 -1
- package/src/modules/item-management/query/calculateSubtreeDepth.ts +1 -1
- package/src/modules/item-management/query/detectCircularReference.generated.ts +1 -1
- package/src/modules/item-management/query/detectCircularReference.ts +1 -1
- package/src/modules/item-management/query/getItem.generated.ts +1 -1
- package/src/modules/item-management/query/getItem.ts +1 -1
- package/src/modules/item-management/query/getItemTaxonomyAssignment.generated.ts +1 -1
- package/src/modules/item-management/query/getItemTaxonomyAssignment.ts +1 -1
- package/src/modules/item-management/query/getTaxonomyNode.generated.ts +1 -1
- package/src/modules/item-management/query/getTaxonomyNode.ts +1 -1
- package/src/modules/item-management/query/getTaxonomyNodeAssignments.generated.ts +1 -1
- package/src/modules/item-management/query/getTaxonomyNodeAssignments.ts +1 -1
- package/src/modules/item-management/query/getTaxonomyNodeChildren.generated.ts +1 -1
- package/src/modules/item-management/query/getTaxonomyNodeChildren.ts +1 -1
- package/src/modules/organization/command/activateCompany.generated.ts +1 -1
- package/src/modules/organization/command/activateCompany.test.ts +1 -1
- package/src/modules/organization/command/activateCompany.ts +1 -1
- package/src/modules/organization/command/createCompany.generated.ts +1 -1
- package/src/modules/organization/command/createCompany.test.ts +1 -1
- package/src/modules/organization/command/createCompany.ts +1 -1
- package/src/modules/organization/command/createDepartment.generated.ts +1 -1
- package/src/modules/organization/command/createDepartment.ts +1 -1
- package/src/modules/organization/command/createSite.generated.ts +1 -1
- package/src/modules/organization/command/createSite.ts +1 -1
- package/src/modules/organization/command/deactivateCompany.generated.ts +1 -1
- package/src/modules/organization/command/deactivateCompany.ts +1 -1
- package/src/modules/organization/command/deactivateDepartment.generated.ts +1 -1
- package/src/modules/organization/command/deactivateDepartment.ts +1 -1
- package/src/modules/organization/command/deactivateSite.generated.ts +1 -1
- package/src/modules/organization/command/deactivateSite.ts +1 -1
- package/src/modules/organization/command/deleteCompany.generated.ts +1 -1
- package/src/modules/organization/command/deleteCompany.ts +1 -1
- package/src/modules/organization/command/reactivateCompany.generated.ts +1 -1
- package/src/modules/organization/command/reactivateCompany.ts +1 -1
- package/src/modules/organization/command/reactivateDepartment.generated.ts +1 -1
- package/src/modules/organization/command/reactivateDepartment.ts +1 -1
- package/src/modules/organization/command/reactivateSite.generated.ts +1 -1
- package/src/modules/organization/command/reactivateSite.ts +1 -1
- package/src/modules/organization/command/updateCompany.generated.ts +1 -1
- package/src/modules/organization/command/updateCompany.test.ts +1 -1
- package/src/modules/organization/command/updateCompany.ts +1 -1
- package/src/modules/organization/command/updateDepartment.generated.ts +1 -1
- package/src/modules/organization/command/updateDepartment.ts +1 -1
- package/src/modules/organization/command/updateSite.generated.ts +1 -1
- package/src/modules/organization/command/updateSite.ts +1 -1
- package/src/modules/organization/lib/errors.generated.ts +1 -1
- package/src/modules/organization/lib/permissions.generated.ts +1 -1
- package/src/modules/organization/lib/types.ts +6 -1
- package/src/modules/organization/module.ts +1 -1
- package/src/modules/organization/permissions.ts +1 -1
- package/src/modules/organization/query/detectDepartmentCircularReference.generated.ts +1 -1
- package/src/modules/organization/query/detectDepartmentCircularReference.ts +1 -1
- package/src/modules/organization/query/getCompany.generated.ts +1 -1
- package/src/modules/organization/query/getCompany.ts +1 -1
- package/src/modules/organization/query/getDepartment.generated.ts +1 -1
- package/src/modules/organization/query/getDepartment.ts +1 -1
- package/src/modules/organization/query/getDepartmentChildren.generated.ts +1 -1
- package/src/modules/organization/query/getDepartmentChildren.ts +1 -1
- package/src/modules/organization/query/getSite.generated.ts +1 -1
- package/src/modules/organization/query/getSite.ts +1 -1
- package/src/modules/organization/query/listDepartmentsByCompany.generated.ts +1 -1
- package/src/modules/organization/query/listDepartmentsByCompany.ts +2 -2
- package/src/modules/organization/query/listSitesByCompany.generated.ts +1 -1
- package/src/modules/organization/query/listSitesByCompany.ts +2 -2
- package/src/modules/primitives/command/activateCategory.generated.ts +1 -1
- package/src/modules/primitives/command/activateCategory.ts +1 -1
- package/src/modules/primitives/command/activateCurrency.generated.ts +1 -1
- package/src/modules/primitives/command/activateCurrency.ts +1 -1
- package/src/modules/primitives/command/activateUnit.generated.ts +1 -1
- package/src/modules/primitives/command/activateUnit.ts +1 -1
- package/src/modules/primitives/command/createCategory.generated.ts +1 -1
- package/src/modules/primitives/command/createCategory.ts +1 -1
- package/src/modules/primitives/command/createCurrency.generated.ts +1 -1
- package/src/modules/primitives/command/createCurrency.ts +1 -1
- package/src/modules/primitives/command/createExchangeRate.generated.ts +1 -1
- package/src/modules/primitives/command/createExchangeRate.ts +1 -1
- package/src/modules/primitives/command/createUnit.generated.ts +1 -1
- package/src/modules/primitives/command/createUnit.ts +1 -1
- package/src/modules/primitives/command/deactivateCategory.generated.ts +1 -1
- package/src/modules/primitives/command/deactivateCategory.ts +1 -1
- package/src/modules/primitives/command/deactivateCurrency.generated.ts +1 -1
- package/src/modules/primitives/command/deactivateCurrency.ts +1 -1
- package/src/modules/primitives/command/deactivateUnit.generated.ts +1 -1
- package/src/modules/primitives/command/deactivateUnit.ts +1 -1
- package/src/modules/primitives/command/setBaseCurrency.generated.ts +1 -1
- package/src/modules/primitives/command/setBaseCurrency.ts +1 -1
- package/src/modules/primitives/command/setReferenceUnit.generated.ts +1 -1
- package/src/modules/primitives/command/setReferenceUnit.ts +1 -1
- package/src/modules/primitives/lib/errors.generated.ts +1 -1
- package/src/modules/primitives/lib/permissions.generated.ts +1 -1
- package/src/modules/primitives/lib/types.ts +6 -1
- package/src/modules/primitives/module.ts +1 -1
- package/src/modules/primitives/query/convertAmount.generated.ts +1 -1
- package/src/modules/primitives/query/convertAmount.test.ts +1 -1
- package/src/modules/primitives/query/convertAmount.ts +1 -1
- package/src/modules/primitives/query/convertQuantity.generated.ts +1 -1
- package/src/modules/primitives/query/convertQuantity.test.ts +1 -1
- package/src/modules/primitives/query/convertQuantity.ts +1 -1
- package/src/modules/primitives/query/getBaseCurrency.generated.ts +1 -1
- package/src/modules/primitives/query/getBaseCurrency.test.ts +1 -1
- package/src/modules/primitives/query/getBaseCurrency.ts +1 -1
- package/src/modules/primitives/query/getCurrency.generated.ts +1 -1
- package/src/modules/primitives/query/getCurrency.ts +1 -1
- package/src/modules/primitives/query/getUnit.generated.ts +1 -1
- package/src/modules/primitives/query/getUnit.ts +1 -1
- package/src/modules/primitives/query/getUoMCategory.generated.ts +1 -1
- package/src/modules/primitives/query/getUoMCategory.ts +1 -1
- package/src/modules/primitives/query/listUnitsByCategory.generated.ts +1 -1
- package/src/modules/primitives/query/listUnitsByCategory.ts +2 -2
- package/src/modules/product-management/command/activateProduct.generated.ts +1 -1
- package/src/modules/product-management/command/activateProduct.ts +1 -1
- package/src/modules/product-management/command/assignProductToCategory.generated.ts +1 -1
- package/src/modules/product-management/command/assignProductToCategory.ts +1 -1
- package/src/modules/product-management/command/createProduct.generated.ts +1 -1
- package/src/modules/product-management/command/createProduct.test.ts +1 -1
- package/src/modules/product-management/command/createProduct.ts +1 -1
- package/src/modules/product-management/command/createProductAttribute.generated.ts +1 -1
- package/src/modules/product-management/command/createProductAttribute.ts +1 -1
- package/src/modules/product-management/command/createProductAttributeValue.generated.ts +1 -1
- package/src/modules/product-management/command/createProductAttributeValue.ts +1 -1
- package/src/modules/product-management/command/createProductCategory.generated.ts +1 -1
- package/src/modules/product-management/command/createProductCategory.test.ts +1 -1
- package/src/modules/product-management/command/createProductCategory.ts +1 -1
- package/src/modules/product-management/command/deactivateProduct.generated.ts +1 -1
- package/src/modules/product-management/command/deactivateProduct.ts +1 -1
- package/src/modules/product-management/command/deleteProduct.generated.ts +1 -1
- package/src/modules/product-management/command/deleteProduct.ts +1 -1
- package/src/modules/product-management/command/deleteProductAttribute.generated.ts +1 -1
- package/src/modules/product-management/command/deleteProductAttribute.ts +1 -1
- package/src/modules/product-management/command/deleteProductAttributeValue.generated.ts +1 -1
- package/src/modules/product-management/command/deleteProductAttributeValue.ts +1 -1
- package/src/modules/product-management/command/deleteProductCategory.generated.ts +1 -1
- package/src/modules/product-management/command/deleteProductCategory.ts +1 -1
- package/src/modules/product-management/command/generateVariants.generated.ts +1 -1
- package/src/modules/product-management/command/generateVariants.test.ts +1 -1
- package/src/modules/product-management/command/generateVariants.ts +1 -1
- package/src/modules/product-management/command/moveProductCategory.generated.ts +1 -1
- package/src/modules/product-management/command/moveProductCategory.test.ts +1 -1
- package/src/modules/product-management/command/moveProductCategory.ts +1 -1
- package/src/modules/product-management/command/reactivateProduct.generated.ts +1 -1
- package/src/modules/product-management/command/reactivateProduct.ts +1 -1
- package/src/modules/product-management/command/removeProductFromCategory.generated.ts +1 -1
- package/src/modules/product-management/command/removeProductFromCategory.ts +1 -1
- package/src/modules/product-management/command/setProductAttributeAssignment.generated.ts +1 -1
- package/src/modules/product-management/command/setProductAttributeAssignment.ts +1 -1
- package/src/modules/product-management/command/updateProduct.generated.ts +1 -1
- package/src/modules/product-management/command/updateProduct.test.ts +1 -1
- package/src/modules/product-management/command/updateProduct.ts +1 -1
- package/src/modules/product-management/command/updateProductAttribute.generated.ts +1 -1
- package/src/modules/product-management/command/updateProductAttribute.ts +1 -1
- package/src/modules/product-management/command/updateProductAttributeValue.generated.ts +1 -1
- package/src/modules/product-management/command/updateProductAttributeValue.ts +1 -1
- package/src/modules/product-management/command/updateProductCategory.generated.ts +1 -1
- package/src/modules/product-management/command/updateProductCategory.ts +1 -1
- package/src/modules/product-management/lib/errors.generated.ts +1 -1
- package/src/modules/product-management/lib/permissions.generated.ts +1 -1
- package/src/modules/product-management/lib/types.ts +6 -1
- package/src/modules/product-management/module.ts +1 -1
- package/src/modules/product-management/query/calculateCategoryDepth.generated.ts +1 -1
- package/src/modules/product-management/query/calculateCategoryDepth.ts +1 -1
- package/src/modules/product-management/query/detectCategoryCircularReference.generated.ts +1 -1
- package/src/modules/product-management/query/detectCategoryCircularReference.ts +1 -1
- package/src/modules/product-management/query/getProduct.generated.ts +1 -1
- package/src/modules/product-management/query/getProduct.ts +1 -1
- package/src/modules/product-management/query/getProductAttribute.generated.ts +1 -1
- package/src/modules/product-management/query/getProductAttribute.ts +1 -1
- package/src/modules/product-management/query/getProductAttributeAssignment.generated.ts +1 -1
- package/src/modules/product-management/query/getProductAttributeAssignment.ts +1 -1
- package/src/modules/product-management/query/getProductAttributeValue.generated.ts +1 -1
- package/src/modules/product-management/query/getProductAttributeValue.ts +1 -1
- package/src/modules/product-management/query/getProductCategory.generated.ts +1 -1
- package/src/modules/product-management/query/getProductCategory.ts +1 -1
- package/src/modules/product-management/query/getProductCategoryAssignment.generated.ts +1 -1
- package/src/modules/product-management/query/getProductCategoryAssignment.ts +1 -1
- package/src/modules/product-management/query/getProductVariant.generated.ts +1 -1
- package/src/modules/product-management/query/getProductVariant.ts +1 -1
- package/src/modules/product-management/query/listAttributeAssignmentsByAttribute.generated.ts +1 -1
- package/src/modules/product-management/query/listAttributeAssignmentsByAttribute.ts +1 -1
- package/src/modules/product-management/query/listCategoryAssignmentsByProduct.generated.ts +1 -1
- package/src/modules/product-management/query/listCategoryAssignmentsByProduct.ts +1 -1
- package/src/modules/product-management/query/listProductAttributeAssignments.generated.ts +1 -1
- package/src/modules/product-management/query/listProductAttributeAssignments.ts +1 -1
- package/src/modules/product-management/query/listProductAttributeValues.generated.ts +1 -1
- package/src/modules/product-management/query/listProductAttributeValues.ts +1 -1
- package/src/modules/product-management/query/listProductCategoryAssignments.generated.ts +1 -1
- package/src/modules/product-management/query/listProductCategoryAssignments.ts +1 -1
- package/src/modules/product-management/query/listProductCategoryChildren.generated.ts +1 -1
- package/src/modules/product-management/query/listProductCategoryChildren.ts +1 -1
- package/src/modules/product-management/query/listProductVariants.generated.ts +1 -1
- package/src/modules/product-management/query/listProductVariants.ts +1 -1
- package/src/modules/user-management/command/activateUser.generated.ts +1 -1
- package/src/modules/user-management/command/activateUser.ts +1 -1
- package/src/modules/user-management/command/assignPermissionToRole.generated.ts +1 -1
- package/src/modules/user-management/command/assignPermissionToRole.ts +1 -1
- package/src/modules/user-management/command/assignRoleToUser.generated.ts +1 -1
- package/src/modules/user-management/command/assignRoleToUser.ts +1 -1
- package/src/modules/user-management/command/createPermission.generated.ts +1 -1
- package/src/modules/user-management/command/createPermission.ts +1 -1
- package/src/modules/user-management/command/createRole.generated.ts +1 -1
- package/src/modules/user-management/command/createRole.ts +1 -1
- package/src/modules/user-management/command/createUser.generated.ts +1 -1
- package/src/modules/user-management/command/createUser.ts +1 -1
- package/src/modules/user-management/command/deactivateUser.generated.ts +1 -1
- package/src/modules/user-management/command/deactivateUser.ts +1 -1
- package/src/modules/user-management/command/reactivateUser.generated.ts +1 -1
- package/src/modules/user-management/command/reactivateUser.ts +1 -1
- package/src/modules/user-management/command/revokePermissionFromRole.generated.ts +1 -1
- package/src/modules/user-management/command/revokePermissionFromRole.ts +1 -1
- package/src/modules/user-management/command/revokeRoleFromUser.generated.ts +1 -1
- package/src/modules/user-management/command/revokeRoleFromUser.ts +1 -1
- package/src/modules/user-management/lib/errors.generated.ts +1 -1
- package/src/modules/user-management/lib/permissions.generated.ts +1 -1
- package/src/modules/user-management/lib/types.ts +6 -1
- package/src/modules/user-management/module.ts +1 -1
- package/templates/scaffold/module/lib/types.ts +6 -1
- package/templates/scaffold/module/permissions.ts +1 -1
- package/src/modules/audit/lib/errors.ts +0 -0
- package/src/modules/business-partner/lib/errors.ts +0 -2
- package/src/modules/coa-management/lib/errors.ts +0 -0
- package/src/modules/organization/lib/errors.ts +0 -1
- package/templates/scaffold/module/lib/errors.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./updateAccountGroup";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const updateAccountGroup = defineCommand(permissions.updateAccountGroup, run);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { createMockDb } from "../../../testing/index";
|
|
3
|
-
import type { CommandContext } from "../../../shared";
|
|
4
3
|
import type { Transaction } from "../generated/kysely-tailordb";
|
|
5
4
|
import {
|
|
6
5
|
AccountGroupNotFoundError,
|
|
@@ -18,6 +17,7 @@ import {
|
|
|
18
17
|
baseActiveAccount,
|
|
19
18
|
} from "../testing/fixtures";
|
|
20
19
|
import { run } from "./updateAccountGroup";
|
|
20
|
+
import type { CommandContext } from "@tailor-platform/erp-kit/module";
|
|
21
21
|
|
|
22
22
|
const ctx: CommandContext = {
|
|
23
23
|
actorId: "test-actor",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { ok, err, type CommandContext } from "../../../shared";
|
|
3
2
|
import type { Transaction } from "../generated/kysely-tailordb";
|
|
4
3
|
import {
|
|
5
4
|
AccountGroupNotFoundError,
|
|
@@ -8,6 +7,7 @@ import {
|
|
|
8
7
|
InvalidNumberRangeError,
|
|
9
8
|
AccountsOutOfRangeError,
|
|
10
9
|
} from "../lib/errors.generated";
|
|
10
|
+
import { ok, err, type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
11
11
|
|
|
12
12
|
export interface UpdateAccountGroupInput {
|
|
13
13
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./updateChartOfAccounts";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const updateChartOfAccounts = defineCommand(permissions.updateChartOfAccounts, run);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from "vitest";
|
|
2
2
|
import { createMockDb } from "../../../testing/index";
|
|
3
|
-
import type { CommandContext } from "../../../shared";
|
|
4
3
|
import type { Transaction } from "../generated/kysely-tailordb";
|
|
5
4
|
import {
|
|
6
5
|
ChartOfAccountsNotFoundError,
|
|
@@ -9,6 +8,7 @@ import {
|
|
|
9
8
|
} from "../lib/errors.generated";
|
|
10
9
|
import { baseDraftCoa, baseActiveCoa, baseArchivedCoa } from "../testing/fixtures";
|
|
11
10
|
import { run, type AuditCommands } from "./updateChartOfAccounts";
|
|
11
|
+
import type { CommandContext } from "@tailor-platform/erp-kit/module";
|
|
12
12
|
|
|
13
13
|
const ctx: CommandContext = {
|
|
14
14
|
actorId: "test-actor",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { ok, err, type CommandContext } from "../../../shared";
|
|
3
2
|
import type { Transaction } from "../generated/kysely-tailordb";
|
|
4
3
|
import {
|
|
5
4
|
ChartOfAccountsNotFoundError,
|
|
6
5
|
ChartOfAccountsArchivedError,
|
|
7
6
|
NameRequiredError,
|
|
8
7
|
} from "../lib/errors.generated";
|
|
8
|
+
import { ok, err, type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
9
9
|
|
|
10
10
|
export interface UpdateChartOfAccountsInput {
|
|
11
11
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { createDomainError } from "
|
|
2
|
+
import { createDomainError } from "@tailor-platform/erp-kit/module";
|
|
3
3
|
|
|
4
4
|
export const AccountNotFoundError = createDomainError(
|
|
5
5
|
"AccountNotFoundError", "COA_MANAGEMENT_ACCOUNT_NOT_FOUND",
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import type { InferSchema, Selectable, Insertable, Updateable } from "../../../shared";
|
|
2
1
|
import type { DB } from "../generated/kysely-tailordb";
|
|
2
|
+
import type {
|
|
3
|
+
InferSchema,
|
|
4
|
+
Selectable,
|
|
5
|
+
Insertable,
|
|
6
|
+
Updateable,
|
|
7
|
+
} from "@tailor-platform/erp-kit/module";
|
|
3
8
|
|
|
4
9
|
export type Schema = InferSchema<DB>;
|
|
5
10
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type TailorAnyDBField } from "@tailor-platform/sdk";
|
|
2
|
-
import { type EmptyFields, type FieldsToInsertable } from "../../shared";
|
|
3
2
|
import type { defineModule as defineOrganizationModule } from "../organization";
|
|
4
3
|
import type { defineModule as definePrimitivesModule } from "../primitives";
|
|
5
4
|
import type { TemplateProvider, AuditCommands } from "./command/createChartOfAccounts";
|
|
@@ -34,6 +33,7 @@ import {
|
|
|
34
33
|
} from "./db/chartOfAccounts";
|
|
35
34
|
import { createAccountGroupType, type CreateAccountGroupTypeParams } from "./db/accountGroup";
|
|
36
35
|
import { createAccountType, type CreateAccountTypeParams } from "./db/account";
|
|
36
|
+
import { type EmptyFields, type FieldsToInsertable } from "@tailor-platform/erp-kit/module";
|
|
37
37
|
|
|
38
38
|
type OrganizationModule = ReturnType<typeof defineOrganizationModule>;
|
|
39
39
|
type OrganizationDB = OrganizationModule["db"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ok, type ReadonlyDB } from "../../../shared";
|
|
2
1
|
import type { DB } from "../generated/kysely-tailordb";
|
|
2
|
+
import { ok, type ReadonlyDB } from "@tailor-platform/erp-kit/module";
|
|
3
3
|
|
|
4
4
|
export type GetAccountInput = { id: string } | { chartOfAccountsId: string; code: string };
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ok, type ReadonlyDB } from "../../../shared";
|
|
2
1
|
import type { DB } from "../generated/kysely-tailordb";
|
|
2
|
+
import { ok, type ReadonlyDB } from "@tailor-platform/erp-kit/module";
|
|
3
3
|
|
|
4
4
|
export type GetAccountGroupInput = { id: string } | { chartOfAccountsId: string; code: string };
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ok, type ReadonlyDB } from "../../../shared";
|
|
2
1
|
import type { ChartOfAccountsStatus } from "../generated/enums";
|
|
3
2
|
import type { DB } from "../generated/kysely-tailordb";
|
|
3
|
+
import { ok, type ReadonlyDB } from "@tailor-platform/erp-kit/module";
|
|
4
4
|
|
|
5
5
|
export type GetChartOfAccountsInput = { id: string } | { companyId: string; status?: string };
|
|
6
6
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { DB } from "../generated/kysely-tailordb";
|
|
1
2
|
import {
|
|
2
3
|
ok,
|
|
3
4
|
type ReadonlyDB,
|
|
4
5
|
type PaginationInput,
|
|
5
6
|
buildPaginatedResult,
|
|
6
7
|
DEFAULT_PAGE_SIZE,
|
|
7
|
-
} from "
|
|
8
|
-
import type { DB } from "../generated/kysely-tailordb";
|
|
8
|
+
} from "@tailor-platform/erp-kit/module";
|
|
9
9
|
|
|
10
10
|
type AccountGroupOrderByField = "code" | "name" | "sortOrder" | "createdAt";
|
|
11
11
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import type { AccountAccountType, AccountClassification, AccountStatus } from "../generated/enums";
|
|
2
|
+
import type { DB } from "../generated/kysely-tailordb";
|
|
1
3
|
import {
|
|
2
4
|
ok,
|
|
3
5
|
type ReadonlyDB,
|
|
4
6
|
type PaginationInput,
|
|
5
7
|
buildPaginatedResult,
|
|
6
8
|
DEFAULT_PAGE_SIZE,
|
|
7
|
-
} from "
|
|
8
|
-
import type { AccountAccountType, AccountClassification, AccountStatus } from "../generated/enums";
|
|
9
|
-
import type { DB } from "../generated/kysely-tailordb";
|
|
9
|
+
} from "@tailor-platform/erp-kit/module";
|
|
10
10
|
|
|
11
11
|
type AccountOrderByField =
|
|
12
12
|
| "code"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { DB } from "../generated/kysely-tailordb";
|
|
1
2
|
import {
|
|
2
3
|
ok,
|
|
3
4
|
type ReadonlyDB,
|
|
4
5
|
type PaginationInput,
|
|
5
6
|
buildPaginatedResult,
|
|
6
7
|
DEFAULT_PAGE_SIZE,
|
|
7
|
-
} from "
|
|
8
|
-
import type { DB } from "../generated/kysely-tailordb";
|
|
8
|
+
} from "@tailor-platform/erp-kit/module";
|
|
9
9
|
|
|
10
10
|
type UnassignedAccountOrderByField = "code" | "name" | "createdAt";
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./activateItem";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const activateItem = defineCommand(permissions.activateItem, run);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ok, err } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import { InvalidStateTransitionError, ItemNotFoundError } from "../lib/errors.generated";
|
|
3
|
+
import { ok, err } from "@tailor-platform/erp-kit/module";
|
|
4
4
|
|
|
5
5
|
export interface ActivateItemInput {
|
|
6
6
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./assignItemToTaxonomy";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const assignItemToTaxonomy = defineCommand(permissions.assignItemToTaxonomy, run);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ok, err } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import {
|
|
4
3
|
DuplicateAssignmentError,
|
|
5
4
|
ItemNotFoundError,
|
|
6
5
|
NodeNotFoundError,
|
|
7
6
|
} from "../lib/errors.generated";
|
|
7
|
+
import { ok, err } from "@tailor-platform/erp-kit/module";
|
|
8
8
|
|
|
9
9
|
export interface AssignItemToTaxonomyInput {
|
|
10
10
|
itemId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./createItem";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const createItem = defineCommand(permissions.createItem, run);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { createMockDb } from "../../../testing/index";
|
|
3
|
-
import { type CommandContext } from "../../../shared";
|
|
4
3
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
5
4
|
import {
|
|
6
5
|
DuplicateBarcodeError,
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
import { baseActiveItem, baseDraftItem } from "../testing/fixtures";
|
|
11
10
|
import { getUnit } from "../../primitives/query/getUnit.generated";
|
|
12
11
|
import { run } from "./createItem";
|
|
12
|
+
import { type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
13
13
|
|
|
14
14
|
describe("createItem", () => {
|
|
15
15
|
const ctx: CommandContext = {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ok, err, type CommandContext } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import {
|
|
4
3
|
DuplicateBarcodeError,
|
|
@@ -6,6 +5,7 @@ import {
|
|
|
6
5
|
UnitNotFoundError,
|
|
7
6
|
} from "../lib/errors.generated";
|
|
8
7
|
import { type PrimitivesQueries } from "../module";
|
|
8
|
+
import { ok, err, type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
9
9
|
|
|
10
10
|
export interface CreateItemInput {
|
|
11
11
|
sku: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./createTaxonomyNode";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const createTaxonomyNode = defineCommand(permissions.createTaxonomyNode, run);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { createMockDb } from "../../../testing/index";
|
|
3
|
-
import { type CommandContext } from "../../../shared";
|
|
4
3
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
5
4
|
import {
|
|
6
5
|
DuplicateNodeCodeError,
|
|
@@ -9,6 +8,7 @@ import {
|
|
|
9
8
|
} from "../lib/errors.generated";
|
|
10
9
|
import { baseChildNode, baseLeafNode, baseRootNode } from "../testing/fixtures";
|
|
11
10
|
import { run } from "./createTaxonomyNode";
|
|
11
|
+
import { type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
12
12
|
|
|
13
13
|
describe("createTaxonomyNode", () => {
|
|
14
14
|
const ctx: CommandContext = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ok, err, type CommandContext } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import {
|
|
4
3
|
DuplicateNodeCodeError,
|
|
5
4
|
MaxDepthExceededError,
|
|
6
5
|
ParentNodeNotFoundError,
|
|
7
6
|
} from "../lib/errors.generated";
|
|
7
|
+
import { ok, err, type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
8
8
|
|
|
9
9
|
export interface CreateTaxonomyNodeInput {
|
|
10
10
|
code: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./deactivateItem";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const deactivateItem = defineCommand(permissions.deactivateItem, run);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ok, err } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import { InvalidStateTransitionError, ItemNotFoundError } from "../lib/errors.generated";
|
|
3
|
+
import { ok, err } from "@tailor-platform/erp-kit/module";
|
|
4
4
|
|
|
5
5
|
export interface DeactivateItemInput {
|
|
6
6
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./deleteItem";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const deleteItem = defineCommand(permissions.deleteItem, run);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ok, err } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import { DeleteNonDraftError, ItemNotFoundError } from "../lib/errors.generated";
|
|
3
|
+
import { ok, err } from "@tailor-platform/erp-kit/module";
|
|
4
4
|
|
|
5
5
|
export interface DeleteItemInput {
|
|
6
6
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./deleteTaxonomyNode";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const deleteTaxonomyNode = defineCommand(permissions.deleteTaxonomyNode, run);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ok, err } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import {
|
|
4
3
|
NodeHasAssignmentsError,
|
|
5
4
|
NodeHasChildrenError,
|
|
6
5
|
NodeNotFoundError,
|
|
7
6
|
} from "../lib/errors.generated";
|
|
7
|
+
import { ok, err } from "@tailor-platform/erp-kit/module";
|
|
8
8
|
|
|
9
9
|
export interface DeleteTaxonomyNodeInput {
|
|
10
10
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./moveTaxonomyNode";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const moveTaxonomyNode = defineCommand(permissions.moveTaxonomyNode, run);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { createMockDb } from "../../../testing/index";
|
|
3
|
-
import { type CommandContext } from "../../../shared";
|
|
4
3
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
5
4
|
import {
|
|
6
5
|
CircularReferenceError,
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
} from "../lib/errors.generated";
|
|
11
10
|
import { baseChildNode, baseLeafNode, baseRootNode, secondRootNode } from "../testing/fixtures";
|
|
12
11
|
import { run } from "./moveTaxonomyNode";
|
|
12
|
+
import { type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
13
13
|
|
|
14
14
|
describe("moveTaxonomyNode", () => {
|
|
15
15
|
const ctx: CommandContext = {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ok, err, type CommandContext } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import {
|
|
4
3
|
CircularReferenceError,
|
|
@@ -6,6 +5,7 @@ import {
|
|
|
6
5
|
NodeNotFoundError,
|
|
7
6
|
ParentNodeNotFoundError,
|
|
8
7
|
} from "../lib/errors.generated";
|
|
8
|
+
import { ok, err, type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
9
9
|
|
|
10
10
|
export interface MoveTaxonomyNodeInput {
|
|
11
11
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./reactivateItem";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const reactivateItem = defineCommand(permissions.reactivateItem, run);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ok, err } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import { InvalidStateTransitionError, ItemNotFoundError } from "../lib/errors.generated";
|
|
3
|
+
import { ok, err } from "@tailor-platform/erp-kit/module";
|
|
4
4
|
|
|
5
5
|
export interface ReactivateItemInput {
|
|
6
6
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./removeItemFromTaxonomy";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const removeItemFromTaxonomy = defineCommand(permissions.removeItemFromTaxonomy, run);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ok, err } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import { AssignmentNotFoundError } from "../lib/errors.generated";
|
|
3
|
+
import { ok, err } from "@tailor-platform/erp-kit/module";
|
|
4
4
|
|
|
5
5
|
export interface RemoveItemFromTaxonomyInput {
|
|
6
6
|
itemId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./updateItem";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const updateItem = defineCommand(permissions.updateItem, run);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { createMockDb } from "../../../testing/index";
|
|
3
|
-
import { type CommandContext } from "../../../shared";
|
|
4
3
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
5
4
|
import {
|
|
6
5
|
DuplicateBarcodeError,
|
|
@@ -13,6 +12,7 @@ import {
|
|
|
13
12
|
import { baseActiveItem, baseDraftItem, baseInactiveItem } from "../testing/fixtures";
|
|
14
13
|
import { getUnit } from "../../primitives/query/getUnit.generated";
|
|
15
14
|
import { run } from "./updateItem";
|
|
15
|
+
import { type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
16
16
|
|
|
17
17
|
describe("updateItem", () => {
|
|
18
18
|
const ctx: CommandContext = {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ok, err, type CommandContext } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import {
|
|
4
3
|
DuplicateBarcodeError,
|
|
@@ -9,6 +8,7 @@ import {
|
|
|
9
8
|
UomLockedError,
|
|
10
9
|
} from "../lib/errors.generated";
|
|
11
10
|
import { type PrimitivesQueries } from "../module";
|
|
11
|
+
import { ok, err, type CommandContext } from "@tailor-platform/erp-kit/module";
|
|
12
12
|
|
|
13
13
|
export interface UpdateItemInput {
|
|
14
14
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @generated — do not edit
|
|
2
|
-
import { defineCommand } from "../../../shared";
|
|
3
2
|
import { permissions } from "../lib/permissions.generated";
|
|
4
3
|
import { run } from "./updateTaxonomyNode";
|
|
4
|
+
import { defineCommand } from "@tailor-platform/erp-kit/module";
|
|
5
5
|
|
|
6
6
|
export const updateTaxonomyNode = defineCommand(permissions.updateTaxonomyNode, run);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ok, err } from "../../../shared";
|
|
2
1
|
import { Transaction } from "../generated/kysely-tailordb";
|
|
3
2
|
import {
|
|
4
3
|
CodeImmutableError,
|
|
5
4
|
MissingRequiredFieldsError,
|
|
6
5
|
NodeNotFoundError,
|
|
7
6
|
} from "../lib/errors.generated";
|
|
7
|
+
import { ok, err } from "@tailor-platform/erp-kit/module";
|
|
8
8
|
|
|
9
9
|
export interface UpdateTaxonomyNodeInput {
|
|
10
10
|
id: string;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import type { InferSchema, Selectable, Insertable, Updateable } from "../../../shared";
|
|
2
1
|
import type { DB } from "../generated/kysely-tailordb";
|
|
2
|
+
import type {
|
|
3
|
+
InferSchema,
|
|
4
|
+
Selectable,
|
|
5
|
+
Insertable,
|
|
6
|
+
Updateable,
|
|
7
|
+
} from "@tailor-platform/erp-kit/module";
|
|
3
8
|
|
|
4
9
|
export type Schema = InferSchema<DB>;
|
|
5
10
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type TailorAnyDBField } from "@tailor-platform/sdk";
|
|
2
|
-
import { type EmptyFields, type FieldsToInsertable } from "../../shared";
|
|
3
2
|
import type { defineModule as definePrimitivesModule } from "../primitives";
|
|
4
3
|
import { createItem } from "./command/createItem.generated";
|
|
5
4
|
import { updateItem } from "./command/updateItem.generated";
|
|
@@ -27,6 +26,7 @@ import {
|
|
|
27
26
|
createItemTaxonomyAssignmentType,
|
|
28
27
|
type CreateItemTaxonomyAssignmentTypeParams,
|
|
29
28
|
} from "./db/itemTaxonomyAssignment";
|
|
29
|
+
import { type EmptyFields, type FieldsToInsertable } from "@tailor-platform/erp-kit/module";
|
|
30
30
|
|
|
31
31
|
type PrimitivesModule = ReturnType<typeof definePrimitivesModule>;
|
|
32
32
|
type PrimitivesDB = PrimitivesModule["db"];
|