@tailor-platform/erp-kit 0.4.0 → 0.5.0
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 +36 -0
- package/README.md +12 -12
- package/dist/cli.mjs +476 -29
- package/package.json +2 -11
- 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 +31 -7
- package/skills/erp-kit-app-2-requirements-review/references/best-practices-check.md +1 -1
- 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 +10 -5
- package/skills/erp-kit-app-3-plan/references/screen-extraction.md +5 -3
- package/skills/erp-kit-app-4-plan-review/SKILL.md +19 -14
- package/skills/erp-kit-app-4-plan-review/references/orphan-detection.md +3 -0
- package/skills/erp-kit-app-4-plan-review/references/story-resolver-parity.md +21 -3
- package/skills/erp-kit-app-5-impl-backend/SKILL.md +22 -3
- package/skills/erp-kit-app-6-impl-frontend/SKILL.md +19 -4
- package/skills/erp-kit-app-7-impl-review/SKILL.md +19 -15
- package/skills/erp-kit-app-shared/references/resolver-classification.md +3 -0
- package/skills/erp-kit-module-2-requirements-review/SKILL.md +17 -36
- package/skills/erp-kit-module-3-update-plan/SKILL.md +132 -0
- package/skills/erp-kit-module-3-update-plan/references/command-extraction.md +87 -0
- package/skills/erp-kit-module-3-update-plan/references/model-extraction.md +72 -0
- package/skills/erp-kit-module-3-update-plan/references/naming.md +73 -0
- package/skills/erp-kit-module-3-update-plan/references/query-extraction.md +59 -0
- package/skills/erp-kit-module-4-plan-review/SKILL.md +17 -76
- package/skills/erp-kit-module-5-impl/SKILL.md +1 -0
- package/skills/erp-kit-module-6-impl-review/SKILL.md +42 -120
- package/skills/erp-kit-module-6-impl-review/references/command-doc-test-parity.md +1 -1
- package/skills/erp-kit-module-6-impl-review/references/{error-implementation-parity.md → command-error-implementation-parity.md} +3 -3
- package/skills/erp-kit-module-6-impl-review/references/impl-parity-report-format.md +1 -1
- package/skills/erp-kit-module-6-impl-review/references/query-doc-code-parity.md +110 -0
- package/skills/erp-kit-module-6-impl-review/references/query-doc-test-parity.md +108 -0
- package/skills/erp-kit-module-6-impl-review/references/query-error-implementation-parity.md +100 -0
- package/skills/erp-kit-module-shared/references/commands.md +1 -1
- package/skills/erp-kit-module-shared/references/queries.md +5 -6
- package/src/commands/app/index.ts +18 -3
- package/src/commands/check.test.ts +1 -1
- package/src/commands/doc/module.ts +2 -3
- package/src/commands/doc/modules.test.ts +0 -7
- package/src/commands/doc/modules.ts +1 -2
- package/src/commands/doc/search.ts +1 -2
- package/src/commands/init.ts +4 -0
- package/src/commands/lib/distribute.test.ts +32 -1
- package/src/commands/lib/distribute.ts +47 -5
- package/src/commands/lib/sync-check-source.test.ts +1 -1
- package/src/commands/update.test.ts +16 -0
- package/src/commands/update.ts +4 -1
- 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-seed.ts +69 -0
- package/src/generator/generate-shells.ts +2 -2
- package/src/generator/stub-templates.ts +5 -5
- package/src/module.ts +59 -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/README.md +2 -2
- 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/inventory/README.md +65 -0
- package/src/modules/inventory/command/approveCountLine.generated.ts +6 -0
- package/src/modules/inventory/command/approveCountLine.test.ts +89 -0
- package/src/modules/inventory/command/approveCountLine.ts +68 -0
- package/src/modules/inventory/command/approveInventoryAdjustment.generated.ts +6 -0
- package/src/modules/inventory/command/approveInventoryAdjustment.test.ts +56 -0
- package/src/modules/inventory/command/approveInventoryAdjustment.ts +50 -0
- package/src/modules/inventory/command/assignSerialNumber.generated.ts +6 -0
- package/src/modules/inventory/command/assignSerialNumber.test.ts +133 -0
- package/src/modules/inventory/command/assignSerialNumber.ts +83 -0
- package/src/modules/inventory/command/cancelInventoryCount.generated.ts +6 -0
- package/src/modules/inventory/command/cancelInventoryCount.test.ts +114 -0
- package/src/modules/inventory/command/cancelInventoryCount.ts +62 -0
- package/src/modules/inventory/command/cancelStockMovement.generated.ts +6 -0
- package/src/modules/inventory/command/cancelStockMovement.test.ts +102 -0
- package/src/modules/inventory/command/cancelStockMovement.ts +56 -0
- package/src/modules/inventory/command/completeInventoryCount.generated.ts +6 -0
- package/src/modules/inventory/command/completeInventoryCount.test.ts +99 -0
- package/src/modules/inventory/command/completeInventoryCount.ts +70 -0
- package/src/modules/inventory/command/confirmInventoryAdjustment.generated.ts +6 -0
- package/src/modules/inventory/command/confirmInventoryAdjustment.test.ts +324 -0
- package/src/modules/inventory/command/confirmInventoryAdjustment.ts +194 -0
- package/src/modules/inventory/command/confirmStockMovement.generated.ts +6 -0
- package/src/modules/inventory/command/confirmStockMovement.test.ts +126 -0
- package/src/modules/inventory/command/confirmStockMovement.ts +131 -0
- package/src/modules/inventory/command/createInventoryAdjustment.generated.ts +6 -0
- package/src/modules/inventory/command/createInventoryAdjustment.test.ts +298 -0
- package/src/modules/inventory/command/createInventoryAdjustment.ts +124 -0
- package/src/modules/inventory/command/createInventoryCount.generated.ts +6 -0
- package/src/modules/inventory/command/createInventoryCount.test.ts +157 -0
- package/src/modules/inventory/command/createInventoryCount.ts +72 -0
- package/src/modules/inventory/command/createLot.generated.ts +6 -0
- package/src/modules/inventory/command/createLot.test.ts +106 -0
- package/src/modules/inventory/command/createLot.ts +72 -0
- package/src/modules/inventory/command/createStockMovement.generated.ts +6 -0
- package/src/modules/inventory/command/createStockMovement.test.ts +342 -0
- package/src/modules/inventory/command/createStockMovement.ts +172 -0
- package/src/modules/inventory/command/createStorageLocation.generated.ts +6 -0
- package/src/modules/inventory/command/createStorageLocation.test.ts +246 -0
- package/src/modules/inventory/command/createStorageLocation.ts +126 -0
- package/src/modules/inventory/command/createValuationPolicy.generated.ts +6 -0
- package/src/modules/inventory/command/createValuationPolicy.test.ts +75 -0
- package/src/modules/inventory/command/createValuationPolicy.ts +52 -0
- package/src/modules/inventory/command/createWarehouse.generated.ts +6 -0
- package/src/modules/inventory/command/createWarehouse.test.ts +143 -0
- package/src/modules/inventory/command/createWarehouse.ts +76 -0
- package/src/modules/inventory/command/deactivateStorageLocation.generated.ts +6 -0
- package/src/modules/inventory/command/deactivateStorageLocation.test.ts +69 -0
- package/src/modules/inventory/command/deactivateStorageLocation.ts +51 -0
- package/src/modules/inventory/command/deactivateWarehouse.generated.ts +6 -0
- package/src/modules/inventory/command/deactivateWarehouse.test.ts +75 -0
- package/src/modules/inventory/command/deactivateWarehouse.ts +45 -0
- package/src/modules/inventory/command/executeStockMovement.generated.ts +6 -0
- package/src/modules/inventory/command/executeStockMovement.test.ts +502 -0
- package/src/modules/inventory/command/executeStockMovement.ts +303 -0
- package/src/modules/inventory/command/reactivateStorageLocation.generated.ts +6 -0
- package/src/modules/inventory/command/reactivateStorageLocation.test.ts +78 -0
- package/src/modules/inventory/command/reactivateStorageLocation.ts +63 -0
- package/src/modules/inventory/command/reactivateWarehouse.generated.ts +6 -0
- package/src/modules/inventory/command/reactivateWarehouse.test.ts +87 -0
- package/src/modules/inventory/command/reactivateWarehouse.ts +65 -0
- package/src/modules/inventory/command/recordCountLine.generated.ts +6 -0
- package/src/modules/inventory/command/recordCountLine.test.ts +211 -0
- package/src/modules/inventory/command/recordCountLine.ts +81 -0
- package/src/modules/inventory/command/rejectCountLine.generated.ts +6 -0
- package/src/modules/inventory/command/rejectCountLine.test.ts +66 -0
- package/src/modules/inventory/command/rejectCountLine.ts +50 -0
- package/src/modules/inventory/command/rejectInventoryAdjustment.generated.ts +6 -0
- package/src/modules/inventory/command/rejectInventoryAdjustment.test.ts +69 -0
- package/src/modules/inventory/command/rejectInventoryAdjustment.ts +50 -0
- package/src/modules/inventory/command/releaseReservation.generated.ts +6 -0
- package/src/modules/inventory/command/releaseReservation.test.ts +65 -0
- package/src/modules/inventory/command/releaseReservation.ts +50 -0
- package/src/modules/inventory/command/reserveStock.generated.ts +6 -0
- package/src/modules/inventory/command/reserveStock.test.ts +141 -0
- package/src/modules/inventory/command/reserveStock.ts +88 -0
- package/src/modules/inventory/command/reviseInventoryAdjustment.generated.ts +6 -0
- package/src/modules/inventory/command/reviseInventoryAdjustment.test.ts +68 -0
- package/src/modules/inventory/command/reviseInventoryAdjustment.ts +48 -0
- package/src/modules/inventory/command/startInventoryCount.generated.ts +6 -0
- package/src/modules/inventory/command/startInventoryCount.test.ts +100 -0
- package/src/modules/inventory/command/startInventoryCount.ts +90 -0
- package/src/modules/inventory/command/submitInventoryAdjustment.generated.ts +6 -0
- package/src/modules/inventory/command/submitInventoryAdjustment.test.ts +53 -0
- package/src/modules/inventory/command/submitInventoryAdjustment.ts +47 -0
- package/src/modules/inventory/command/updateLot.generated.ts +6 -0
- package/src/modules/inventory/command/updateLot.test.ts +88 -0
- package/src/modules/inventory/command/updateLot.ts +52 -0
- package/src/modules/inventory/command/updateStockMovement.generated.ts +6 -0
- package/src/modules/inventory/command/updateStockMovement.test.ts +250 -0
- package/src/modules/inventory/command/updateStockMovement.ts +164 -0
- package/src/modules/inventory/command/updateStorageLocation.generated.ts +6 -0
- package/src/modules/inventory/command/updateStorageLocation.test.ts +72 -0
- package/src/modules/inventory/command/updateStorageLocation.ts +77 -0
- package/src/modules/inventory/command/updateValuationPolicy.generated.ts +6 -0
- package/src/modules/inventory/command/updateValuationPolicy.test.ts +68 -0
- package/src/modules/inventory/command/updateValuationPolicy.ts +74 -0
- package/src/modules/inventory/command/updateWarehouse.generated.ts +6 -0
- package/src/modules/inventory/command/updateWarehouse.test.ts +88 -0
- package/src/modules/inventory/command/updateWarehouse.ts +64 -0
- package/src/modules/inventory/db/costLayer.ts +54 -0
- package/src/modules/inventory/db/inventoryAdjustment.ts +88 -0
- package/src/modules/inventory/db/inventoryCount.ts +58 -0
- package/src/modules/inventory/db/inventoryCountLine.ts +61 -0
- package/src/modules/inventory/db/itemValuation.ts +50 -0
- package/src/modules/inventory/db/lot.ts +51 -0
- package/src/modules/inventory/db/lotStockLevel.ts +48 -0
- package/src/modules/inventory/db/serialNumber.ts +53 -0
- package/src/modules/inventory/db/stockLevel.ts +51 -0
- package/src/modules/inventory/db/stockMoveLine.ts +78 -0
- package/src/modules/inventory/db/stockMovement.ts +48 -0
- package/src/modules/inventory/db/storageLocation.ts +56 -0
- package/src/modules/inventory/db/valuationPolicy.ts +33 -0
- package/src/modules/inventory/db/warehouse.ts +45 -0
- package/src/modules/inventory/docs/commands/ApproveCountLine.md +44 -0
- package/src/modules/inventory/docs/commands/ApproveInventoryAdjustment.md +37 -0
- package/src/modules/inventory/docs/commands/AssignSerialNumber.md +46 -0
- package/src/modules/inventory/docs/commands/CancelInventoryCount.md +49 -0
- package/src/modules/inventory/docs/commands/CancelStockMovement.md +44 -0
- package/src/modules/inventory/docs/commands/CompleteInventoryCount.md +47 -0
- package/src/modules/inventory/docs/commands/ConfirmInventoryAdjustment.md +72 -0
- package/src/modules/inventory/docs/commands/ConfirmStockMovement.md +43 -0
- package/src/modules/inventory/docs/commands/CreateInventoryAdjustment.md +75 -0
- package/src/modules/inventory/docs/commands/CreateInventoryCount.md +49 -0
- package/src/modules/inventory/docs/commands/CreateLot.md +40 -0
- package/src/modules/inventory/docs/commands/CreateStockMovement.md +76 -0
- package/src/modules/inventory/docs/commands/CreateStorageLocation.md +66 -0
- package/src/modules/inventory/docs/commands/CreateValuationPolicy.md +45 -0
- package/src/modules/inventory/docs/commands/CreateWarehouse.md +47 -0
- package/src/modules/inventory/docs/commands/DeactivateStorageLocation.md +39 -0
- package/src/modules/inventory/docs/commands/DeactivateWarehouse.md +38 -0
- package/src/modules/inventory/docs/commands/ExecuteStockMovement.md +82 -0
- package/src/modules/inventory/docs/commands/ReactivateStorageLocation.md +42 -0
- package/src/modules/inventory/docs/commands/ReactivateWarehouse.md +42 -0
- package/src/modules/inventory/docs/commands/RecordCountLine.md +52 -0
- package/src/modules/inventory/docs/commands/RejectCountLine.md +42 -0
- package/src/modules/inventory/docs/commands/RejectInventoryAdjustment.md +38 -0
- package/src/modules/inventory/docs/commands/ReleaseReservation.md +37 -0
- package/src/modules/inventory/docs/commands/ReserveStock.md +49 -0
- package/src/modules/inventory/docs/commands/ReviseInventoryAdjustment.md +38 -0
- package/src/modules/inventory/docs/commands/StartInventoryCount.md +47 -0
- package/src/modules/inventory/docs/commands/SubmitInventoryAdjustment.md +37 -0
- package/src/modules/inventory/docs/commands/UpdateLot.md +41 -0
- package/src/modules/inventory/docs/commands/UpdateStockMovement.md +45 -0
- package/src/modules/inventory/docs/commands/UpdateStorageLocation.md +41 -0
- package/src/modules/inventory/docs/commands/UpdateValuationPolicy.md +44 -0
- package/src/modules/inventory/docs/commands/UpdateWarehouse.md +42 -0
- package/src/modules/inventory/docs/features/inventory-adjustment.md +64 -0
- package/src/modules/inventory/docs/features/inventory-count.md +78 -0
- package/src/modules/inventory/docs/features/inventory-valuation.md +77 -0
- package/src/modules/inventory/docs/features/lot-and-batch-tracking.md +81 -0
- package/src/modules/inventory/docs/features/scrap-management.md +63 -0
- package/src/modules/inventory/docs/features/serial-number-tracking.md +68 -0
- package/src/modules/inventory/docs/features/stock-movement.md +72 -0
- package/src/modules/inventory/docs/features/stock-tracking.md +78 -0
- package/src/modules/inventory/docs/features/warehouse-management.md +97 -0
- package/src/modules/inventory/docs/models/CostLayer.md +37 -0
- package/src/modules/inventory/docs/models/InventoryAdjustment.md +69 -0
- package/src/modules/inventory/docs/models/InventoryCount.md +53 -0
- package/src/modules/inventory/docs/models/InventoryCountLine.md +53 -0
- package/src/modules/inventory/docs/models/ItemValuation.md +38 -0
- package/src/modules/inventory/docs/models/Lot.md +45 -0
- package/src/modules/inventory/docs/models/LotStockLevel.md +34 -0
- package/src/modules/inventory/docs/models/SerialNumber.md +53 -0
- package/src/modules/inventory/docs/models/StockLevel.md +41 -0
- package/src/modules/inventory/docs/models/StockMoveLine.md +44 -0
- package/src/modules/inventory/docs/models/StockMovement.md +52 -0
- package/src/modules/inventory/docs/models/StorageLocation.md +55 -0
- package/src/modules/inventory/docs/models/ValuationPolicy.md +38 -0
- package/src/modules/inventory/docs/models/Warehouse.md +50 -0
- package/src/modules/inventory/docs/queries/GetInventoryAdjustment.md +40 -0
- package/src/modules/inventory/docs/queries/GetInventoryCount.md +43 -0
- package/src/modules/inventory/docs/queries/GetItemValuation.md +42 -0
- package/src/modules/inventory/docs/queries/GetLot.md +42 -0
- package/src/modules/inventory/docs/queries/GetSerialNumber.md +43 -0
- package/src/modules/inventory/docs/queries/GetSerialNumberHistory.md +50 -0
- package/src/modules/inventory/docs/queries/GetStockLevel.md +42 -0
- package/src/modules/inventory/docs/queries/GetStockMovement.md +41 -0
- package/src/modules/inventory/docs/queries/GetStorageLocation.md +40 -0
- package/src/modules/inventory/docs/queries/GetValuationPolicy.md +38 -0
- package/src/modules/inventory/docs/queries/GetWarehouse.md +40 -0
- package/src/modules/inventory/docs/queries/GetWarehouseStockSummary.md +50 -0
- package/src/modules/inventory/docs/queries/ListCostLayers.md +49 -0
- package/src/modules/inventory/docs/queries/ListExpiringLots.md +51 -0
- package/src/modules/inventory/docs/queries/ListInventoryAdjustments.md +47 -0
- package/src/modules/inventory/docs/queries/ListInventoryCounts.md +57 -0
- package/src/modules/inventory/docs/queries/ListItemValuations.md +44 -0
- package/src/modules/inventory/docs/queries/ListLots.md +57 -0
- package/src/modules/inventory/docs/queries/ListSerialNumbers.md +44 -0
- package/src/modules/inventory/docs/queries/ListStockLevels.md +49 -0
- package/src/modules/inventory/docs/queries/ListStockMovements.md +47 -0
- package/src/modules/inventory/docs/queries/ListStorageLocations.md +47 -0
- package/src/modules/inventory/docs/queries/ListValuationPolicies.md +38 -0
- package/src/modules/inventory/docs/queries/ListWarehouses.md +42 -0
- package/src/modules/inventory/docs/queries/TraceLotBackward.md +46 -0
- package/src/modules/inventory/docs/queries/TraceLotForward.md +46 -0
- package/src/modules/inventory/generated/.gitkeep +0 -0
- package/src/modules/inventory/generated/enums.ts +131 -0
- package/src/modules/inventory/generated/kysely-tailordb.ts +201 -0
- package/src/modules/inventory/index.ts +2 -0
- package/src/modules/inventory/lib/_db_deps.ts +17 -0
- package/src/modules/inventory/lib/errors.generated.ts +317 -0
- package/src/modules/inventory/lib/permissions.generated.ts +38 -0
- package/src/modules/inventory/lib/types.ts +92 -0
- package/src/modules/inventory/module.ts +202 -0
- package/src/modules/inventory/permissions.ts +3 -0
- package/src/modules/inventory/query/.gitkeep +0 -0
- package/src/modules/inventory/query/getInventoryAdjustment.generated.ts +5 -0
- package/src/modules/inventory/query/getInventoryAdjustment.test.ts +58 -0
- package/src/modules/inventory/query/getInventoryAdjustment.ts +16 -0
- package/src/modules/inventory/query/getInventoryCount.generated.ts +5 -0
- package/src/modules/inventory/query/getInventoryCount.test.ts +65 -0
- package/src/modules/inventory/query/getInventoryCount.ts +27 -0
- package/src/modules/inventory/query/getItemValuation.generated.ts +5 -0
- package/src/modules/inventory/query/getItemValuation.test.ts +72 -0
- package/src/modules/inventory/query/getItemValuation.ts +29 -0
- package/src/modules/inventory/query/getLot.generated.ts +5 -0
- package/src/modules/inventory/query/getLot.test.ts +62 -0
- package/src/modules/inventory/query/getLot.ts +28 -0
- package/src/modules/inventory/query/getSerialNumber.generated.ts +5 -0
- package/src/modules/inventory/query/getSerialNumber.test.ts +59 -0
- package/src/modules/inventory/query/getSerialNumber.ts +18 -0
- package/src/modules/inventory/query/getSerialNumberHistory.generated.ts +5 -0
- package/src/modules/inventory/query/getSerialNumberHistory.test.ts +80 -0
- package/src/modules/inventory/query/getSerialNumberHistory.ts +30 -0
- package/src/modules/inventory/query/getStockLevel.generated.ts +5 -0
- package/src/modules/inventory/query/getStockLevel.test.ts +70 -0
- package/src/modules/inventory/query/getStockLevel.ts +24 -0
- package/src/modules/inventory/query/getStockMovement.generated.ts +5 -0
- package/src/modules/inventory/query/getStockMovement.test.ts +62 -0
- package/src/modules/inventory/query/getStockMovement.ts +26 -0
- package/src/modules/inventory/query/getStorageLocation.generated.ts +5 -0
- package/src/modules/inventory/query/getStorageLocation.test.ts +54 -0
- package/src/modules/inventory/query/getStorageLocation.ts +26 -0
- package/src/modules/inventory/query/getValuationPolicy.generated.ts +5 -0
- package/src/modules/inventory/query/getValuationPolicy.test.ts +42 -0
- package/src/modules/inventory/query/getValuationPolicy.ts +16 -0
- package/src/modules/inventory/query/getWarehouse.generated.ts +5 -0
- package/src/modules/inventory/query/getWarehouse.test.ts +61 -0
- package/src/modules/inventory/query/getWarehouse.ts +26 -0
- package/src/modules/inventory/query/getWarehouseStockSummary.generated.ts +5 -0
- package/src/modules/inventory/query/getWarehouseStockSummary.test.ts +97 -0
- package/src/modules/inventory/query/getWarehouseStockSummary.ts +82 -0
- package/src/modules/inventory/query/listCostLayers.generated.ts +5 -0
- package/src/modules/inventory/query/listCostLayers.test.ts +58 -0
- package/src/modules/inventory/query/listCostLayers.ts +45 -0
- package/src/modules/inventory/query/listExpiringLots.generated.ts +5 -0
- package/src/modules/inventory/query/listExpiringLots.test.ts +70 -0
- package/src/modules/inventory/query/listExpiringLots.ts +74 -0
- package/src/modules/inventory/query/listInventoryAdjustments.generated.ts +5 -0
- package/src/modules/inventory/query/listInventoryAdjustments.test.ts +89 -0
- package/src/modules/inventory/query/listInventoryAdjustments.ts +59 -0
- package/src/modules/inventory/query/listInventoryCounts.generated.ts +5 -0
- package/src/modules/inventory/query/listInventoryCounts.test.ts +78 -0
- package/src/modules/inventory/query/listInventoryCounts.ts +55 -0
- package/src/modules/inventory/query/listItemValuations.generated.ts +5 -0
- package/src/modules/inventory/query/listItemValuations.test.ts +54 -0
- package/src/modules/inventory/query/listItemValuations.ts +39 -0
- package/src/modules/inventory/query/listLots.generated.ts +5 -0
- package/src/modules/inventory/query/listLots.test.ts +120 -0
- package/src/modules/inventory/query/listLots.ts +68 -0
- package/src/modules/inventory/query/listSerialNumbers.generated.ts +5 -0
- package/src/modules/inventory/query/listSerialNumbers.test.ts +58 -0
- package/src/modules/inventory/query/listSerialNumbers.ts +53 -0
- package/src/modules/inventory/query/listStockLevels.generated.ts +5 -0
- package/src/modules/inventory/query/listStockLevels.test.ts +73 -0
- package/src/modules/inventory/query/listStockLevels.ts +79 -0
- package/src/modules/inventory/query/listStockMovements.generated.ts +5 -0
- package/src/modules/inventory/query/listStockMovements.test.ts +98 -0
- package/src/modules/inventory/query/listStockMovements.ts +105 -0
- package/src/modules/inventory/query/listStorageLocations.generated.ts +5 -0
- package/src/modules/inventory/query/listStorageLocations.test.ts +70 -0
- package/src/modules/inventory/query/listStorageLocations.ts +53 -0
- package/src/modules/inventory/query/listValuationPolicies.generated.ts +5 -0
- package/src/modules/inventory/query/listValuationPolicies.test.ts +38 -0
- package/src/modules/inventory/query/listValuationPolicies.ts +39 -0
- package/src/modules/inventory/query/listWarehouses.generated.ts +5 -0
- package/src/modules/inventory/query/listWarehouses.test.ts +60 -0
- package/src/modules/inventory/query/listWarehouses.ts +39 -0
- package/src/modules/inventory/query/traceLotBackward.generated.ts +5 -0
- package/src/modules/inventory/query/traceLotBackward.test.ts +63 -0
- package/src/modules/inventory/query/traceLotBackward.ts +36 -0
- package/src/modules/inventory/query/traceLotForward.generated.ts +5 -0
- package/src/modules/inventory/query/traceLotForward.test.ts +63 -0
- package/src/modules/inventory/query/traceLotForward.ts +36 -0
- package/src/modules/inventory/tailor.config.ts +13 -0
- package/src/modules/inventory/tailor.d.ts +13 -0
- package/src/modules/inventory/testing/commandTestUtils.ts +29 -0
- package/src/modules/inventory/testing/fixtures.ts +412 -0
- 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/docs/models/{item.md → Item.md} +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/primitives/seed/currencies.ts +22 -0
- package/src/modules/primitives/seed/exchangeRates.ts +22 -0
- package/src/modules/primitives/seed/index.ts +4 -0
- package/src/modules/primitives/seed/seed.test.ts +80 -0
- package/src/modules/primitives/seed/units.ts +62 -0
- package/src/modules/primitives/seed/uomCategories.ts +24 -0
- 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/purchase/README.md +63 -0
- package/src/modules/purchase/command/.gitkeep +0 -0
- package/src/modules/purchase/command/activatePurchasePaymentTerm.generated.ts +6 -0
- package/src/modules/purchase/command/activatePurchasePaymentTerm.test.ts +53 -0
- package/src/modules/purchase/command/activatePurchasePaymentTerm.ts +39 -0
- package/src/modules/purchase/command/activatePurchasePriceList.generated.ts +6 -0
- package/src/modules/purchase/command/activatePurchasePriceList.test.ts +39 -0
- package/src/modules/purchase/command/activatePurchasePriceList.ts +32 -0
- package/src/modules/purchase/command/activatePurchasePriceRule.generated.ts +6 -0
- package/src/modules/purchase/command/activatePurchasePriceRule.test.ts +133 -0
- package/src/modules/purchase/command/activatePurchasePriceRule.ts +75 -0
- package/src/modules/purchase/command/approvePurchaseOrder.generated.ts +6 -0
- package/src/modules/purchase/command/approvePurchaseOrder.test.ts +161 -0
- package/src/modules/purchase/command/approvePurchaseOrder.ts +89 -0
- package/src/modules/purchase/command/cancelGoodsReceipt.generated.ts +6 -0
- package/src/modules/purchase/command/cancelGoodsReceipt.test.ts +37 -0
- package/src/modules/purchase/command/cancelGoodsReceipt.ts +29 -0
- package/src/modules/purchase/command/cancelPurchaseBill.generated.ts +6 -0
- package/src/modules/purchase/command/cancelPurchaseBill.test.ts +101 -0
- package/src/modules/purchase/command/cancelPurchaseBill.ts +84 -0
- package/src/modules/purchase/command/cancelPurchaseOrder.generated.ts +6 -0
- package/src/modules/purchase/command/cancelPurchaseOrder.test.ts +119 -0
- package/src/modules/purchase/command/cancelPurchaseOrder.ts +65 -0
- package/src/modules/purchase/command/closePurchaseOrder.generated.ts +6 -0
- package/src/modules/purchase/command/closePurchaseOrder.test.ts +128 -0
- package/src/modules/purchase/command/closePurchaseOrder.ts +58 -0
- package/src/modules/purchase/command/createGoodsReceipt.generated.ts +6 -0
- package/src/modules/purchase/command/createGoodsReceipt.test.ts +233 -0
- package/src/modules/purchase/command/createGoodsReceipt.ts +93 -0
- package/src/modules/purchase/command/createPurchaseBill.generated.ts +6 -0
- package/src/modules/purchase/command/createPurchaseBill.test.ts +277 -0
- package/src/modules/purchase/command/createPurchaseBill.ts +107 -0
- package/src/modules/purchase/command/createPurchaseOrder.generated.ts +6 -0
- package/src/modules/purchase/command/createPurchaseOrder.test.ts +291 -0
- package/src/modules/purchase/command/createPurchaseOrder.ts +131 -0
- package/src/modules/purchase/command/createPurchasePaymentTerm.generated.ts +6 -0
- package/src/modules/purchase/command/createPurchasePaymentTerm.test.ts +140 -0
- package/src/modules/purchase/command/createPurchasePaymentTerm.ts +66 -0
- package/src/modules/purchase/command/createPurchasePriceList.generated.ts +6 -0
- package/src/modules/purchase/command/createPurchasePriceList.test.ts +108 -0
- package/src/modules/purchase/command/createPurchasePriceList.ts +63 -0
- package/src/modules/purchase/command/createPurchasePriceRule.generated.ts +6 -0
- package/src/modules/purchase/command/createPurchasePriceRule.test.ts +139 -0
- package/src/modules/purchase/command/createPurchasePriceRule.ts +95 -0
- package/src/modules/purchase/command/deactivatePurchasePaymentTerm.generated.ts +6 -0
- package/src/modules/purchase/command/deactivatePurchasePaymentTerm.test.ts +49 -0
- package/src/modules/purchase/command/deactivatePurchasePaymentTerm.ts +41 -0
- package/src/modules/purchase/command/deactivatePurchasePriceList.generated.ts +6 -0
- package/src/modules/purchase/command/deactivatePurchasePriceList.test.ts +50 -0
- package/src/modules/purchase/command/deactivatePurchasePriceList.ts +32 -0
- package/src/modules/purchase/command/deactivatePurchasePriceRule.generated.ts +6 -0
- package/src/modules/purchase/command/deactivatePurchasePriceRule.test.ts +50 -0
- package/src/modules/purchase/command/deactivatePurchasePriceRule.ts +32 -0
- package/src/modules/purchase/command/matchPurchaseBill.generated.ts +6 -0
- package/src/modules/purchase/command/matchPurchaseBill.test.ts +188 -0
- package/src/modules/purchase/command/matchPurchaseBill.ts +146 -0
- package/src/modules/purchase/command/postGoodsReceipt.generated.ts +6 -0
- package/src/modules/purchase/command/postGoodsReceipt.test.ts +210 -0
- package/src/modules/purchase/command/postGoodsReceipt.ts +143 -0
- package/src/modules/purchase/command/rejectPurchaseOrder.generated.ts +6 -0
- package/src/modules/purchase/command/rejectPurchaseOrder.test.ts +79 -0
- package/src/modules/purchase/command/rejectPurchaseOrder.ts +41 -0
- package/src/modules/purchase/command/releasePurchaseBill.generated.ts +6 -0
- package/src/modules/purchase/command/releasePurchaseBill.test.ts +94 -0
- package/src/modules/purchase/command/releasePurchaseBill.ts +111 -0
- package/src/modules/purchase/command/setSupplierDefaultPurchasePaymentTerm.generated.ts +6 -0
- package/src/modules/purchase/command/setSupplierDefaultPurchasePaymentTerm.test.ts +171 -0
- package/src/modules/purchase/command/setSupplierDefaultPurchasePaymentTerm.ts +90 -0
- package/src/modules/purchase/command/submitPurchaseOrder.generated.ts +6 -0
- package/src/modules/purchase/command/submitPurchaseOrder.test.ts +98 -0
- package/src/modules/purchase/command/submitPurchaseOrder.ts +73 -0
- package/src/modules/purchase/command/updateGoodsReceipt.generated.ts +6 -0
- package/src/modules/purchase/command/updateGoodsReceipt.test.ts +115 -0
- package/src/modules/purchase/command/updateGoodsReceipt.ts +73 -0
- package/src/modules/purchase/command/updatePurchaseBill.generated.ts +6 -0
- package/src/modules/purchase/command/updatePurchaseBill.test.ts +137 -0
- package/src/modules/purchase/command/updatePurchaseBill.ts +89 -0
- package/src/modules/purchase/command/updatePurchaseOrder.generated.ts +6 -0
- package/src/modules/purchase/command/updatePurchaseOrder.test.ts +195 -0
- package/src/modules/purchase/command/updatePurchaseOrder.ts +121 -0
- package/src/modules/purchase/command/updatePurchasePaymentTerm.generated.ts +6 -0
- package/src/modules/purchase/command/updatePurchasePaymentTerm.test.ts +154 -0
- package/src/modules/purchase/command/updatePurchasePaymentTerm.ts +73 -0
- package/src/modules/purchase/command/updatePurchasePriceList.generated.ts +6 -0
- package/src/modules/purchase/command/updatePurchasePriceList.test.ts +73 -0
- package/src/modules/purchase/command/updatePurchasePriceList.ts +55 -0
- package/src/modules/purchase/command/updatePurchasePriceRule.generated.ts +6 -0
- package/src/modules/purchase/command/updatePurchasePriceRule.test.ts +191 -0
- package/src/modules/purchase/command/updatePurchasePriceRule.ts +104 -0
- package/src/modules/purchase/db/.gitkeep +0 -0
- package/src/modules/purchase/db/goodsReceipt.ts +62 -0
- package/src/modules/purchase/db/purchaseBill.ts +74 -0
- package/src/modules/purchase/db/purchaseOrder.ts +100 -0
- package/src/modules/purchase/db/purchasePaymentTerm.ts +46 -0
- package/src/modules/purchase/db/purchasePriceList.ts +53 -0
- package/src/modules/purchase/db/purchasePriceRule.ts +74 -0
- package/src/modules/purchase/db/supplierProfile.ts +59 -0
- package/src/modules/purchase/docs/commands/ActivatePurchasePaymentTerm.md +39 -0
- package/src/modules/purchase/docs/commands/ActivatePurchasePriceList.md +37 -0
- package/src/modules/purchase/docs/commands/ActivatePurchasePriceRule.md +47 -0
- package/src/modules/purchase/docs/commands/ApprovePurchaseOrder.md +55 -0
- package/src/modules/purchase/docs/commands/CancelGoodsReceipt.md +39 -0
- package/src/modules/purchase/docs/commands/CancelPurchaseBill.md +49 -0
- package/src/modules/purchase/docs/commands/CancelPurchaseOrder.md +47 -0
- package/src/modules/purchase/docs/commands/ClosePurchaseOrder.md +49 -0
- package/src/modules/purchase/docs/commands/CreateGoodsReceipt.md +54 -0
- package/src/modules/purchase/docs/commands/CreatePurchaseBill.md +59 -0
- package/src/modules/purchase/docs/commands/CreatePurchaseOrder.md +66 -0
- package/src/modules/purchase/docs/commands/CreatePurchasePaymentTerm.md +52 -0
- package/src/modules/purchase/docs/commands/CreatePurchasePriceList.md +48 -0
- package/src/modules/purchase/docs/commands/CreatePurchasePriceRule.md +62 -0
- package/src/modules/purchase/docs/commands/DeactivatePurchasePaymentTerm.md +42 -0
- package/src/modules/purchase/docs/commands/DeactivatePurchasePriceList.md +39 -0
- package/src/modules/purchase/docs/commands/DeactivatePurchasePriceRule.md +39 -0
- package/src/modules/purchase/docs/commands/MatchPurchaseBill.md +63 -0
- package/src/modules/purchase/docs/commands/PostGoodsReceipt.md +61 -0
- package/src/modules/purchase/docs/commands/RejectPurchaseOrder.md +44 -0
- package/src/modules/purchase/docs/commands/ReleasePurchaseBill.md +48 -0
- package/src/modules/purchase/docs/commands/SetSupplierDefaultPurchasePaymentTerm.md +50 -0
- package/src/modules/purchase/docs/commands/SubmitPurchaseOrder.md +51 -0
- package/src/modules/purchase/docs/commands/UpdateGoodsReceipt.md +48 -0
- package/src/modules/purchase/docs/commands/UpdatePurchaseBill.md +51 -0
- package/src/modules/purchase/docs/commands/UpdatePurchaseOrder.md +59 -0
- package/src/modules/purchase/docs/commands/UpdatePurchasePaymentTerm.md +51 -0
- package/src/modules/purchase/docs/commands/UpdatePurchasePriceList.md +43 -0
- package/src/modules/purchase/docs/commands/UpdatePurchasePriceRule.md +60 -0
- package/src/modules/purchase/docs/features/goods-receipt-matching.md +71 -0
- package/src/modules/purchase/docs/features/purchase-order-lifecycle.md +87 -0
- package/src/modules/purchase/docs/features/purchase-payment-terms.md +67 -0
- package/src/modules/purchase/docs/features/supplier-bill-matching.md +79 -0
- package/src/modules/purchase/docs/features/supplier-purchase-pricing.md +72 -0
- package/src/modules/purchase/docs/models/GoodsReceipt.md +58 -0
- package/src/modules/purchase/docs/models/PurchaseBill.md +68 -0
- package/src/modules/purchase/docs/models/PurchaseOrder.md +88 -0
- package/src/modules/purchase/docs/models/PurchasePaymentTerm.md +59 -0
- package/src/modules/purchase/docs/models/PurchasePriceList.md +53 -0
- package/src/modules/purchase/docs/models/PurchasePriceRule.md +58 -0
- package/src/modules/purchase/docs/models/SupplierProfile.md +37 -0
- package/src/modules/purchase/docs/queries/CalculatePurchaseBillDueSchedule.md +47 -0
- package/src/modules/purchase/docs/queries/CalculatePurchasePrice.md +53 -0
- package/src/modules/purchase/docs/queries/GetGoodsReceipt.md +36 -0
- package/src/modules/purchase/docs/queries/GetPurchaseBill.md +41 -0
- package/src/modules/purchase/docs/queries/GetPurchaseOrder.md +42 -0
- package/src/modules/purchase/docs/queries/GetPurchasePaymentTerm.md +36 -0
- package/src/modules/purchase/docs/queries/GetPurchasePriceList.md +36 -0
- package/src/modules/purchase/docs/queries/GetSupplierProfile.md +36 -0
- package/src/modules/purchase/executor/.gitkeep +0 -0
- package/src/modules/purchase/generated/.gitkeep +0 -0
- package/src/modules/purchase/generated/enums.ts +63 -0
- package/src/modules/purchase/generated/kysely-tailordb.ts +186 -0
- package/src/modules/purchase/index.ts +2 -0
- package/src/modules/purchase/lib/_db_deps.ts +77 -0
- package/src/modules/purchase/lib/domain.ts +467 -0
- package/src/modules/purchase/lib/errors.generated.ts +367 -0
- package/src/modules/purchase/lib/permissions.generated.ts +34 -0
- package/src/modules/purchase/lib/types.ts +65 -0
- package/src/modules/purchase/module.ts +218 -0
- package/src/modules/purchase/permissions.ts +1 -0
- package/src/modules/purchase/query/.gitkeep +0 -0
- package/src/modules/purchase/query/calculatePurchaseBillDueSchedule.generated.ts +5 -0
- package/src/modules/purchase/query/calculatePurchaseBillDueSchedule.test.ts +183 -0
- package/src/modules/purchase/query/calculatePurchaseBillDueSchedule.ts +41 -0
- package/src/modules/purchase/query/calculatePurchasePrice.generated.ts +5 -0
- package/src/modules/purchase/query/calculatePurchasePrice.test.ts +143 -0
- package/src/modules/purchase/query/calculatePurchasePrice.ts +113 -0
- package/src/modules/purchase/query/getGoodsReceipt.generated.ts +5 -0
- package/src/modules/purchase/query/getGoodsReceipt.test.ts +42 -0
- package/src/modules/purchase/query/getGoodsReceipt.ts +27 -0
- package/src/modules/purchase/query/getPurchaseBill.generated.ts +5 -0
- package/src/modules/purchase/query/getPurchaseBill.test.ts +69 -0
- package/src/modules/purchase/query/getPurchaseBill.ts +35 -0
- package/src/modules/purchase/query/getPurchaseOrder.generated.ts +5 -0
- package/src/modules/purchase/query/getPurchaseOrder.test.ts +65 -0
- package/src/modules/purchase/query/getPurchaseOrder.ts +33 -0
- package/src/modules/purchase/query/getPurchasePaymentTerm.generated.ts +5 -0
- package/src/modules/purchase/query/getPurchasePaymentTerm.test.ts +44 -0
- package/src/modules/purchase/query/getPurchasePaymentTerm.ts +30 -0
- package/src/modules/purchase/query/getPurchasePriceList.generated.ts +5 -0
- package/src/modules/purchase/query/getPurchasePriceList.test.ts +48 -0
- package/src/modules/purchase/query/getPurchasePriceList.ts +30 -0
- package/src/modules/purchase/query/getSupplierProfile.generated.ts +5 -0
- package/src/modules/purchase/query/getSupplierProfile.test.ts +50 -0
- package/src/modules/purchase/query/getSupplierProfile.ts +18 -0
- package/src/modules/purchase/tailor.config.ts +13 -0
- package/src/modules/purchase/tailor.d.ts +13 -0
- package/src/modules/purchase/testing/commandTestUtils.ts +35 -0
- package/src/modules/purchase/testing/fixtures.ts +317 -0
- package/src/modules/sales/README.md +69 -0
- package/src/modules/sales/command/.gitkeep +0 -0
- package/src/modules/sales/command/activateChannel.generated.ts +6 -0
- package/src/modules/sales/command/activateChannel.test.ts +70 -0
- package/src/modules/sales/command/activateChannel.ts +48 -0
- package/src/modules/sales/command/activateListing.generated.ts +6 -0
- package/src/modules/sales/command/activateListing.test.ts +87 -0
- package/src/modules/sales/command/activateListing.ts +49 -0
- package/src/modules/sales/command/activateSalesPaymentTerm.generated.ts +6 -0
- package/src/modules/sales/command/activateSalesPaymentTerm.test.ts +58 -0
- package/src/modules/sales/command/activateSalesPaymentTerm.ts +50 -0
- package/src/modules/sales/command/activateSalesPriceList.generated.ts +6 -0
- package/src/modules/sales/command/activateSalesPriceList.test.ts +55 -0
- package/src/modules/sales/command/activateSalesPriceList.ts +46 -0
- package/src/modules/sales/command/activateSalesPriceRule.generated.ts +6 -0
- package/src/modules/sales/command/activateSalesPriceRule.test.ts +83 -0
- package/src/modules/sales/command/activateSalesPriceRule.ts +58 -0
- package/src/modules/sales/command/cancelChannelOrder.generated.ts +6 -0
- package/src/modules/sales/command/cancelChannelOrder.test.ts +47 -0
- package/src/modules/sales/command/cancelChannelOrder.ts +30 -0
- package/src/modules/sales/command/cancelSalesInvoice.generated.ts +6 -0
- package/src/modules/sales/command/cancelSalesInvoice.test.ts +47 -0
- package/src/modules/sales/command/cancelSalesInvoice.ts +37 -0
- package/src/modules/sales/command/cancelSalesOrder.generated.ts +6 -0
- package/src/modules/sales/command/cancelSalesOrder.test.ts +70 -0
- package/src/modules/sales/command/cancelSalesOrder.ts +48 -0
- package/src/modules/sales/command/cancelSyncJob.generated.ts +6 -0
- package/src/modules/sales/command/cancelSyncJob.test.ts +58 -0
- package/src/modules/sales/command/cancelSyncJob.ts +30 -0
- package/src/modules/sales/command/closeSalesOrder.generated.ts +6 -0
- package/src/modules/sales/command/closeSalesOrder.test.ts +41 -0
- package/src/modules/sales/command/closeSalesOrder.ts +51 -0
- package/src/modules/sales/command/confirmSalesOrder.generated.ts +6 -0
- package/src/modules/sales/command/confirmSalesOrder.test.ts +68 -0
- package/src/modules/sales/command/confirmSalesOrder.ts +67 -0
- package/src/modules/sales/command/convertChannelOrder.generated.ts +6 -0
- package/src/modules/sales/command/convertChannelOrder.test.ts +118 -0
- package/src/modules/sales/command/convertChannelOrder.ts +151 -0
- package/src/modules/sales/command/createChannel.generated.ts +6 -0
- package/src/modules/sales/command/createChannel.test.ts +100 -0
- package/src/modules/sales/command/createChannel.ts +58 -0
- package/src/modules/sales/command/createListing.generated.ts +6 -0
- package/src/modules/sales/command/createListing.test.ts +88 -0
- package/src/modules/sales/command/createListing.ts +76 -0
- package/src/modules/sales/command/createSalesCreditNote.generated.ts +6 -0
- package/src/modules/sales/command/createSalesCreditNote.test.ts +56 -0
- package/src/modules/sales/command/createSalesCreditNote.ts +75 -0
- package/src/modules/sales/command/createSalesInvoice.generated.ts +6 -0
- package/src/modules/sales/command/createSalesInvoice.test.ts +85 -0
- package/src/modules/sales/command/createSalesInvoice.ts +94 -0
- package/src/modules/sales/command/createSalesOrder.generated.ts +6 -0
- package/src/modules/sales/command/createSalesOrder.test.ts +134 -0
- package/src/modules/sales/command/createSalesOrder.ts +140 -0
- package/src/modules/sales/command/createSalesPaymentTerm.generated.ts +6 -0
- package/src/modules/sales/command/createSalesPaymentTerm.test.ts +59 -0
- package/src/modules/sales/command/createSalesPaymentTerm.ts +50 -0
- package/src/modules/sales/command/createSalesPriceList.generated.ts +6 -0
- package/src/modules/sales/command/createSalesPriceList.test.ts +67 -0
- package/src/modules/sales/command/createSalesPriceList.ts +45 -0
- package/src/modules/sales/command/createSalesPriceRule.generated.ts +6 -0
- package/src/modules/sales/command/createSalesPriceRule.test.ts +137 -0
- package/src/modules/sales/command/createSalesPriceRule.ts +66 -0
- package/src/modules/sales/command/createShipment.generated.ts +6 -0
- package/src/modules/sales/command/createShipment.test.ts +75 -0
- package/src/modules/sales/command/createShipment.ts +86 -0
- package/src/modules/sales/command/deactivateChannel.generated.ts +6 -0
- package/src/modules/sales/command/deactivateChannel.test.ts +29 -0
- package/src/modules/sales/command/deactivateChannel.ts +30 -0
- package/src/modules/sales/command/deactivateSalesPaymentTerm.generated.ts +6 -0
- package/src/modules/sales/command/deactivateSalesPaymentTerm.test.ts +29 -0
- package/src/modules/sales/command/deactivateSalesPaymentTerm.ts +37 -0
- package/src/modules/sales/command/deactivateSalesPriceList.generated.ts +6 -0
- package/src/modules/sales/command/deactivateSalesPriceList.test.ts +33 -0
- package/src/modules/sales/command/deactivateSalesPriceList.ts +37 -0
- package/src/modules/sales/command/deactivateSalesPriceRule.generated.ts +6 -0
- package/src/modules/sales/command/deactivateSalesPriceRule.test.ts +33 -0
- package/src/modules/sales/command/deactivateSalesPriceRule.ts +37 -0
- package/src/modules/sales/command/issueSalesCreditNote.generated.ts +6 -0
- package/src/modules/sales/command/issueSalesCreditNote.test.ts +62 -0
- package/src/modules/sales/command/issueSalesCreditNote.ts +71 -0
- package/src/modules/sales/command/issueSalesInvoice.generated.ts +6 -0
- package/src/modules/sales/command/issueSalesInvoice.test.ts +88 -0
- package/src/modules/sales/command/issueSalesInvoice.ts +115 -0
- package/src/modules/sales/command/markChannelOrderException.generated.ts +6 -0
- package/src/modules/sales/command/markChannelOrderException.test.ts +59 -0
- package/src/modules/sales/command/markChannelOrderException.ts +49 -0
- package/src/modules/sales/command/pauseListing.generated.ts +6 -0
- package/src/modules/sales/command/pauseListing.test.ts +40 -0
- package/src/modules/sales/command/pauseListing.ts +30 -0
- package/src/modules/sales/command/placeSalesOrderOnCreditHold.generated.ts +6 -0
- package/src/modules/sales/command/placeSalesOrderOnCreditHold.test.ts +74 -0
- package/src/modules/sales/command/placeSalesOrderOnCreditHold.ts +46 -0
- package/src/modules/sales/command/postShipment.generated.ts +6 -0
- package/src/modules/sales/command/postShipment.test.ts +97 -0
- package/src/modules/sales/command/postShipment.ts +89 -0
- package/src/modules/sales/command/recordChannelOrder.generated.ts +6 -0
- package/src/modules/sales/command/recordChannelOrder.test.ts +124 -0
- package/src/modules/sales/command/recordChannelOrder.ts +93 -0
- package/src/modules/sales/command/rejectSalesOrder.generated.ts +6 -0
- package/src/modules/sales/command/rejectSalesOrder.test.ts +78 -0
- package/src/modules/sales/command/rejectSalesOrder.ts +42 -0
- package/src/modules/sales/command/releaseSalesOrderCreditHold.generated.ts +6 -0
- package/src/modules/sales/command/releaseSalesOrderCreditHold.test.ts +50 -0
- package/src/modules/sales/command/releaseSalesOrderCreditHold.ts +51 -0
- package/src/modules/sales/command/retireListing.generated.ts +6 -0
- package/src/modules/sales/command/retireListing.test.ts +42 -0
- package/src/modules/sales/command/retireListing.ts +30 -0
- package/src/modules/sales/command/retrySyncJob.generated.ts +6 -0
- package/src/modules/sales/command/retrySyncJob.test.ts +54 -0
- package/src/modules/sales/command/retrySyncJob.ts +44 -0
- package/src/modules/sales/command/sendSalesInvoice.generated.ts +6 -0
- package/src/modules/sales/command/sendSalesInvoice.test.ts +50 -0
- package/src/modules/sales/command/sendSalesInvoice.ts +43 -0
- package/src/modules/sales/command/startSyncJob.generated.ts +6 -0
- package/src/modules/sales/command/startSyncJob.test.ts +65 -0
- package/src/modules/sales/command/startSyncJob.ts +54 -0
- package/src/modules/sales/command/submitSalesOrder.generated.ts +6 -0
- package/src/modules/sales/command/submitSalesOrder.test.ts +58 -0
- package/src/modules/sales/command/submitSalesOrder.ts +49 -0
- package/src/modules/sales/command/updateChannel.generated.ts +6 -0
- package/src/modules/sales/command/updateChannel.test.ts +71 -0
- package/src/modules/sales/command/updateChannel.ts +68 -0
- package/src/modules/sales/command/updateListing.generated.ts +6 -0
- package/src/modules/sales/command/updateListing.test.ts +56 -0
- package/src/modules/sales/command/updateListing.ts +60 -0
- package/src/modules/sales/command/updateSalesCreditNote.generated.ts +6 -0
- package/src/modules/sales/command/updateSalesCreditNote.test.ts +68 -0
- package/src/modules/sales/command/updateSalesCreditNote.ts +68 -0
- package/src/modules/sales/command/updateSalesInvoice.generated.ts +6 -0
- package/src/modules/sales/command/updateSalesInvoice.test.ts +73 -0
- package/src/modules/sales/command/updateSalesInvoice.ts +80 -0
- package/src/modules/sales/command/updateSalesOrder.generated.ts +6 -0
- package/src/modules/sales/command/updateSalesOrder.test.ts +93 -0
- package/src/modules/sales/command/updateSalesOrder.ts +121 -0
- package/src/modules/sales/command/updateSalesPaymentTerm.generated.ts +6 -0
- package/src/modules/sales/command/updateSalesPaymentTerm.test.ts +66 -0
- package/src/modules/sales/command/updateSalesPaymentTerm.ts +59 -0
- package/src/modules/sales/command/updateSalesPriceList.generated.ts +6 -0
- package/src/modules/sales/command/updateSalesPriceList.test.ts +71 -0
- package/src/modules/sales/command/updateSalesPriceList.ts +52 -0
- package/src/modules/sales/command/updateSalesPriceRule.generated.ts +6 -0
- package/src/modules/sales/command/updateSalesPriceRule.test.ts +95 -0
- package/src/modules/sales/command/updateSalesPriceRule.ts +81 -0
- package/src/modules/sales/command/updateShipment.generated.ts +6 -0
- package/src/modules/sales/command/updateShipment.test.ts +78 -0
- package/src/modules/sales/command/updateShipment.ts +84 -0
- package/src/modules/sales/db/.gitkeep +0 -0
- package/src/modules/sales/db/channel.ts +43 -0
- package/src/modules/sales/db/channelOrder.ts +109 -0
- package/src/modules/sales/db/channelOrderLine.ts +84 -0
- package/src/modules/sales/db/listing.ts +81 -0
- package/src/modules/sales/db/salesCreditNote.ts +63 -0
- package/src/modules/sales/db/salesCreditNoteLine.ts +49 -0
- package/src/modules/sales/db/salesInvoice.ts +95 -0
- package/src/modules/sales/db/salesInvoiceLine.ts +64 -0
- package/src/modules/sales/db/salesOrder.ts +103 -0
- package/src/modules/sales/db/salesOrderLine.ts +82 -0
- package/src/modules/sales/db/salesPaymentTerm.ts +46 -0
- package/src/modules/sales/db/salesPriceList.ts +61 -0
- package/src/modules/sales/db/salesPriceRule.ts +96 -0
- package/src/modules/sales/db/shipment.ts +78 -0
- package/src/modules/sales/db/shipmentLine.ts +58 -0
- package/src/modules/sales/db/syncJob.ts +70 -0
- package/src/modules/sales/docs/commands/ActivateChannel.md +42 -0
- package/src/modules/sales/docs/commands/ActivateListing.md +46 -0
- package/src/modules/sales/docs/commands/ActivateSalesPaymentTerm.md +41 -0
- package/src/modules/sales/docs/commands/ActivateSalesPriceList.md +39 -0
- package/src/modules/sales/docs/commands/ActivateSalesPriceRule.md +48 -0
- package/src/modules/sales/docs/commands/CancelChannelOrder.md +37 -0
- package/src/modules/sales/docs/commands/CancelSalesInvoice.md +39 -0
- package/src/modules/sales/docs/commands/CancelSalesOrder.md +40 -0
- package/src/modules/sales/docs/commands/CancelSyncJob.md +36 -0
- package/src/modules/sales/docs/commands/CloseSalesOrder.md +39 -0
- package/src/modules/sales/docs/commands/ConfirmSalesOrder.md +43 -0
- package/src/modules/sales/docs/commands/ConvertChannelOrder.md +44 -0
- package/src/modules/sales/docs/commands/CreateChannel.md +40 -0
- package/src/modules/sales/docs/commands/CreateListing.md +40 -0
- package/src/modules/sales/docs/commands/CreateSalesCreditNote.md +37 -0
- package/src/modules/sales/docs/commands/CreateSalesInvoice.md +39 -0
- package/src/modules/sales/docs/commands/CreateSalesOrder.md +51 -0
- package/src/modules/sales/docs/commands/CreateSalesPaymentTerm.md +38 -0
- package/src/modules/sales/docs/commands/CreateSalesPriceList.md +37 -0
- package/src/modules/sales/docs/commands/CreateSalesPriceRule.md +46 -0
- package/src/modules/sales/docs/commands/CreateShipment.md +38 -0
- package/src/modules/sales/docs/commands/DeactivateChannel.md +35 -0
- package/src/modules/sales/docs/commands/DeactivateSalesPaymentTerm.md +35 -0
- package/src/modules/sales/docs/commands/DeactivateSalesPriceList.md +35 -0
- package/src/modules/sales/docs/commands/DeactivateSalesPriceRule.md +35 -0
- package/src/modules/sales/docs/commands/IssueSalesCreditNote.md +38 -0
- package/src/modules/sales/docs/commands/IssueSalesInvoice.md +43 -0
- package/src/modules/sales/docs/commands/MarkChannelOrderException.md +37 -0
- package/src/modules/sales/docs/commands/PauseListing.md +36 -0
- package/src/modules/sales/docs/commands/PlaceSalesOrderOnCreditHold.md +41 -0
- package/src/modules/sales/docs/commands/PostShipment.md +41 -0
- package/src/modules/sales/docs/commands/RecordChannelOrder.md +45 -0
- package/src/modules/sales/docs/commands/RejectSalesOrder.md +41 -0
- package/src/modules/sales/docs/commands/ReleaseSalesOrderCreditHold.md +36 -0
- package/src/modules/sales/docs/commands/RetireListing.md +36 -0
- package/src/modules/sales/docs/commands/RetrySyncJob.md +39 -0
- package/src/modules/sales/docs/commands/SendSalesInvoice.md +38 -0
- package/src/modules/sales/docs/commands/StartSyncJob.md +39 -0
- package/src/modules/sales/docs/commands/SubmitSalesOrder.md +43 -0
- package/src/modules/sales/docs/commands/UpdateChannel.md +43 -0
- package/src/modules/sales/docs/commands/UpdateListing.md +38 -0
- package/src/modules/sales/docs/commands/UpdateSalesCreditNote.md +38 -0
- package/src/modules/sales/docs/commands/UpdateSalesInvoice.md +38 -0
- package/src/modules/sales/docs/commands/UpdateSalesOrder.md +45 -0
- package/src/modules/sales/docs/commands/UpdateSalesPaymentTerm.md +41 -0
- package/src/modules/sales/docs/commands/UpdateSalesPriceList.md +40 -0
- package/src/modules/sales/docs/commands/UpdateSalesPriceRule.md +49 -0
- package/src/modules/sales/docs/commands/UpdateShipment.md +38 -0
- package/src/modules/sales/docs/commands/bin/rm.md +52 -0
- package/src/modules/sales/docs/commands/opt/homebrew/bin/codex.md +52 -0
- package/src/modules/sales/docs/commands/opt/homebrew/bin/ps2ps2.md +52 -0
- package/src/modules/sales/docs/commands/opt/homebrew/bin/rg.md +52 -0
- package/src/modules/sales/docs/commands/opt/homebrew/bin/sha384sum.md +52 -0
- package/src/modules/sales/docs/commands/opt/homebrew/opt/libpq/bin/pg_combinebackup.md +52 -0
- package/src/modules/sales/docs/commands/sbin/mount_msdos.md +52 -0
- package/src/modules/sales/docs/commands/sbin/mount_nfs.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/cupstestppd.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/enc2xs.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/hash.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/jarsigner.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/mpsgraphtool.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/nano.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/pod2html5.34.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/ri.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/rs.md +52 -0
- package/src/modules/sales/docs/commands/usr/bin/trustcachectl.md +52 -0
- package/src/modules/sales/docs/commands/usr/sbin/htpasswd.md +52 -0
- package/src/modules/sales/docs/commands/usr/sbin/lpadmin.md +52 -0
- package/src/modules/sales/docs/commands/usr/sbin/setkey.md +52 -0
- package/src/modules/sales/docs/features/channel-listing-management.md +68 -0
- package/src/modules/sales/docs/features/channel-order-sync.md +78 -0
- package/src/modules/sales/docs/features/customer-invoicing.md +89 -0
- package/src/modules/sales/docs/features/customer-sales-pricing.md +72 -0
- package/src/modules/sales/docs/features/sales-order-lifecycle.md +96 -0
- package/src/modules/sales/docs/features/sales-payment-terms.md +67 -0
- package/src/modules/sales/docs/features/shipment-fulfillment.md +71 -0
- package/src/modules/sales/docs/models/Channel.md +48 -0
- package/src/modules/sales/docs/models/ChannelOrder.md +56 -0
- package/src/modules/sales/docs/models/ChannelOrderLine.md +39 -0
- package/src/modules/sales/docs/models/Listing.md +56 -0
- package/src/modules/sales/docs/models/SalesCreditNote.md +47 -0
- package/src/modules/sales/docs/models/SalesCreditNoteLine.md +37 -0
- package/src/modules/sales/docs/models/SalesInvoice.md +55 -0
- package/src/modules/sales/docs/models/SalesInvoiceLine.md +39 -0
- package/src/modules/sales/docs/models/SalesOrder.md +79 -0
- package/src/modules/sales/docs/models/SalesOrderLine.md +42 -0
- package/src/modules/sales/docs/models/SalesPaymentTerm.md +53 -0
- package/src/modules/sales/docs/models/SalesPriceList.md +50 -0
- package/src/modules/sales/docs/models/SalesPriceRule.md +51 -0
- package/src/modules/sales/docs/models/Shipment.md +49 -0
- package/src/modules/sales/docs/models/ShipmentLine.md +38 -0
- package/src/modules/sales/docs/models/SyncJob.md +53 -0
- package/src/modules/sales/docs/queries/CalculateInvoiceDueSchedule.md +37 -0
- package/src/modules/sales/docs/queries/GetApplicableSalesPrice.md +38 -0
- package/src/modules/sales/docs/queries/GetChannel.md +34 -0
- package/src/modules/sales/docs/queries/GetChannelOrder.md +34 -0
- package/src/modules/sales/docs/queries/GetListing.md +34 -0
- package/src/modules/sales/docs/queries/GetListingByExternalIdentifier.md +35 -0
- package/src/modules/sales/docs/queries/GetSalesCreditNote.md +34 -0
- package/src/modules/sales/docs/queries/GetSalesInvoice.md +34 -0
- package/src/modules/sales/docs/queries/GetSalesOrder.md +36 -0
- package/src/modules/sales/docs/queries/GetSalesPaymentTerm.md +34 -0
- package/src/modules/sales/docs/queries/GetSalesPriceList.md +34 -0
- package/src/modules/sales/docs/queries/GetShipment.md +34 -0
- package/src/modules/sales/docs/queries/GetSyncJob.md +34 -0
- package/src/modules/sales/docs/queries/ListChannelOrdersByStatus.md +34 -0
- package/src/modules/sales/docs/queries/ListChannels.md +33 -0
- package/src/modules/sales/docs/queries/ListListingsByChannel.md +33 -0
- package/src/modules/sales/docs/queries/ListSalesCreditNotesByInvoice.md +33 -0
- package/src/modules/sales/docs/queries/ListSalesInvoicesBySalesOrder.md +33 -0
- package/src/modules/sales/docs/queries/ListSalesOrders.md +36 -0
- package/src/modules/sales/docs/queries/ListSalesPaymentTerms.md +33 -0
- package/src/modules/sales/docs/queries/ListSalesPriceLists.md +33 -0
- package/src/modules/sales/docs/queries/ListSalesPriceRulesByPriceList.md +33 -0
- package/src/modules/sales/docs/queries/ListShipmentsBySalesOrder.md +33 -0
- package/src/modules/sales/docs/queries/ListSyncJobs.md +34 -0
- package/src/modules/sales/executor/.gitkeep +0 -0
- package/src/modules/sales/generated/.gitkeep +0 -0
- package/src/modules/sales/generated/enums.ts +119 -0
- package/src/modules/sales/generated/kysely-tailordb.ts +332 -0
- package/src/modules/sales/index.ts +2 -0
- package/src/modules/sales/lib/_db_deps.ts +67 -0
- package/src/modules/sales/lib/domain.ts +354 -0
- package/src/modules/sales/lib/errors.generated.ts +417 -0
- package/src/modules/sales/lib/permissions.generated.ts +53 -0
- package/src/modules/sales/lib/repository.ts +137 -0
- package/src/modules/sales/lib/types.ts +105 -0
- package/src/modules/sales/module.ts +418 -0
- package/src/modules/sales/permissions.ts +3 -0
- package/src/modules/sales/query/.gitkeep +0 -0
- package/src/modules/sales/query/calculateInvoiceDueSchedule.generated.ts +5 -0
- package/src/modules/sales/query/calculateInvoiceDueSchedule.test.ts +107 -0
- package/src/modules/sales/query/calculateInvoiceDueSchedule.ts +35 -0
- package/src/modules/sales/query/getApplicableSalesPrice.generated.ts +5 -0
- package/src/modules/sales/query/getApplicableSalesPrice.test.ts +110 -0
- package/src/modules/sales/query/getApplicableSalesPrice.ts +81 -0
- package/src/modules/sales/query/getChannel.generated.ts +5 -0
- package/src/modules/sales/query/getChannel.test.ts +39 -0
- package/src/modules/sales/query/getChannel.ts +15 -0
- package/src/modules/sales/query/getChannelOrder.generated.ts +5 -0
- package/src/modules/sales/query/getChannelOrder.test.ts +50 -0
- package/src/modules/sales/query/getChannelOrder.ts +29 -0
- package/src/modules/sales/query/getListing.generated.ts +5 -0
- package/src/modules/sales/query/getListing.test.ts +39 -0
- package/src/modules/sales/query/getListing.ts +15 -0
- package/src/modules/sales/query/getListingByExternalIdentifier.generated.ts +5 -0
- package/src/modules/sales/query/getListingByExternalIdentifier.test.ts +61 -0
- package/src/modules/sales/query/getListingByExternalIdentifier.ts +23 -0
- package/src/modules/sales/query/getSalesCreditNote.generated.ts +5 -0
- package/src/modules/sales/query/getSalesCreditNote.test.ts +44 -0
- package/src/modules/sales/query/getSalesCreditNote.ts +14 -0
- package/src/modules/sales/query/getSalesInvoice.generated.ts +5 -0
- package/src/modules/sales/query/getSalesInvoice.test.ts +44 -0
- package/src/modules/sales/query/getSalesInvoice.ts +14 -0
- package/src/modules/sales/query/getSalesOrder.generated.ts +5 -0
- package/src/modules/sales/query/getSalesOrder.test.ts +57 -0
- package/src/modules/sales/query/getSalesOrder.ts +20 -0
- package/src/modules/sales/query/getSalesPaymentTerm.generated.ts +5 -0
- package/src/modules/sales/query/getSalesPaymentTerm.test.ts +44 -0
- package/src/modules/sales/query/getSalesPaymentTerm.ts +24 -0
- package/src/modules/sales/query/getSalesPriceList.generated.ts +5 -0
- package/src/modules/sales/query/getSalesPriceList.test.ts +39 -0
- package/src/modules/sales/query/getSalesPriceList.ts +15 -0
- package/src/modules/sales/query/getShipment.generated.ts +5 -0
- package/src/modules/sales/query/getShipment.test.ts +44 -0
- package/src/modules/sales/query/getShipment.ts +12 -0
- package/src/modules/sales/query/getSyncJob.generated.ts +5 -0
- package/src/modules/sales/query/getSyncJob.test.ts +43 -0
- package/src/modules/sales/query/getSyncJob.ts +24 -0
- package/src/modules/sales/query/listChannelOrdersByStatus.generated.ts +5 -0
- package/src/modules/sales/query/listChannelOrdersByStatus.test.ts +58 -0
- package/src/modules/sales/query/listChannelOrdersByStatus.ts +53 -0
- package/src/modules/sales/query/listChannels.generated.ts +5 -0
- package/src/modules/sales/query/listChannels.test.ts +36 -0
- package/src/modules/sales/query/listChannels.ts +39 -0
- package/src/modules/sales/query/listListingsByChannel.generated.ts +5 -0
- package/src/modules/sales/query/listListingsByChannel.test.ts +36 -0
- package/src/modules/sales/query/listListingsByChannel.ts +39 -0
- package/src/modules/sales/query/listSalesCreditNotesByInvoice.generated.ts +5 -0
- package/src/modules/sales/query/listSalesCreditNotesByInvoice.test.ts +36 -0
- package/src/modules/sales/query/listSalesCreditNotesByInvoice.ts +42 -0
- package/src/modules/sales/query/listSalesInvoicesBySalesOrder.generated.ts +5 -0
- package/src/modules/sales/query/listSalesInvoicesBySalesOrder.test.ts +36 -0
- package/src/modules/sales/query/listSalesInvoicesBySalesOrder.ts +42 -0
- package/src/modules/sales/query/listSalesOrders.generated.ts +5 -0
- package/src/modules/sales/query/listSalesOrders.test.ts +79 -0
- package/src/modules/sales/query/listSalesOrders.ts +67 -0
- package/src/modules/sales/query/listSalesPaymentTerms.generated.ts +5 -0
- package/src/modules/sales/query/listSalesPaymentTerms.test.ts +36 -0
- package/src/modules/sales/query/listSalesPaymentTerms.ts +42 -0
- package/src/modules/sales/query/listSalesPriceLists.generated.ts +5 -0
- package/src/modules/sales/query/listSalesPriceLists.test.ts +36 -0
- package/src/modules/sales/query/listSalesPriceLists.ts +39 -0
- package/src/modules/sales/query/listSalesPriceRulesByPriceList.generated.ts +5 -0
- package/src/modules/sales/query/listSalesPriceRulesByPriceList.test.ts +39 -0
- package/src/modules/sales/query/listSalesPriceRulesByPriceList.ts +47 -0
- package/src/modules/sales/query/listShipmentsBySalesOrder.generated.ts +5 -0
- package/src/modules/sales/query/listShipmentsBySalesOrder.test.ts +36 -0
- package/src/modules/sales/query/listShipmentsBySalesOrder.ts +36 -0
- package/src/modules/sales/query/listSyncJobs.generated.ts +5 -0
- package/src/modules/sales/query/listSyncJobs.test.ts +50 -0
- package/src/modules/sales/query/listSyncJobs.ts +47 -0
- package/src/modules/sales/tailor.config.ts +13 -0
- package/src/modules/sales/tailor.d.ts +13 -0
- package/src/modules/sales/testing/commandTestUtils.ts +35 -0
- package/src/modules/sales/testing/fixtures.ts +520 -0
- package/src/modules/user-management/command/.gitkeep +0 -0
- 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/db/.gitkeep +0 -0
- package/src/modules/user-management/executor/.gitkeep +0 -0
- package/src/modules/user-management/generated/.gitkeep +0 -0
- package/src/modules/user-management/lib/errors.generated.ts +1 -6
- package/src/modules/user-management/lib/permissions.generated.ts +1 -1
- package/src/modules/user-management/lib/recomputeUserPermissions.ts +4 -2
- package/src/modules/user-management/lib/types.ts +6 -1
- package/src/modules/user-management/module.ts +1 -1
- package/src/modules/user-management/permissions.ts +3 -0
- package/src/modules/user-management/query/.gitkeep +0 -0
- package/src/modules/user-management/query/listRolePermissionsByRole.generated.ts +5 -0
- package/src/modules/user-management/query/listRolePermissionsByRole.test.ts +20 -0
- package/src/modules/user-management/query/listRolePermissionsByRole.ts +28 -0
- package/src/modules/user-management/query/listUserRolesByUser.generated.ts +5 -0
- package/src/modules/user-management/query/listUserRolesByUser.test.ts +20 -0
- package/src/modules/user-management/query/listUserRolesByUser.ts +28 -0
- package/src/schemas.ts +6 -6
- package/src/shared/defineCommand.ts +1 -1
- package/src/shared/entityTypes.ts +1 -1
- package/src/shared/uuidv5.test.ts +18 -0
- package/src/shared/uuidv5.ts +23 -0
- package/src/testing/index.ts +1 -1
- package/templates/scaffold/app/backend/package.json +1 -3
- package/templates/scaffold/app/backend/seed/exec.mjs +7 -5
- package/templates/scaffold/app/backend/src/generated/kysely-tailordb.ts +0 -11
- package/templates/scaffold/module/lib/types.ts +6 -1
- package/templates/scaffold/module/permissions.ts +1 -1
- package/templates/scaffold/module/seed/index.ts +19 -0
- package/src/modules/business-partner/lib/errors.ts +0 -2
- package/src/modules/organization/lib/errors.ts +0 -1
- package/templates/scaffold/module/lib/errors.ts +0 -1
- /package/schemas/{app-compose → app}/actors.yml +0 -0
- /package/schemas/{app-compose → app}/business-flow.yml +0 -0
- /package/schemas/{app-compose → app}/requirements.yml +0 -0
- /package/schemas/{app-compose → app}/resolver.yml +0 -0
- /package/schemas/{app-compose → app}/screen.yml +0 -0
- /package/schemas/{app-compose → app}/story.yml +0 -0
- /package/src/modules/{purchase → inventory/command}/.gitkeep +0 -0
- /package/src/modules/{audit/lib/errors.ts → inventory/db/.gitkeep} +0 -0
- /package/src/modules/{coa-management/lib/errors.ts → inventory/executor/.gitkeep} +0 -0
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
App: {{APP_NAME}}
|
|
6
6
|
Story docs: {{STORY_DOCS}}
|
|
7
7
|
Resolver docs: {{RESOLVER_DOCS}}
|
|
8
|
+
Module metadata (JSON): {{MODULE_METADATA}}
|
|
8
9
|
|
|
9
10
|
## Instructions
|
|
10
11
|
|
|
@@ -20,10 +21,19 @@ From each story doc, extract:
|
|
|
20
21
|
- Story name (from filename or heading)
|
|
21
22
|
- Resolver section content:
|
|
22
23
|
- `None` → read-only story, skip resolver checks
|
|
24
|
+
- `N/A` (with optional reason, e.g., `N/A — background job`) → story intentionally has no resolver (skip checks). Common for scheduled jobs, cron tasks, webhook handlers, and system-triggered processes that don't expose a GraphQL endpoint.
|
|
23
25
|
- `- TBD` → story needs resolvers but none documented yet (fail)
|
|
24
26
|
- Resolver links (format: `../../../resolver/<name>.md`) → verify they exist
|
|
25
27
|
- Operations described that imply mutations (create, update, delete, submit, approve, etc.)
|
|
26
28
|
|
|
29
|
+
## Extraction: Module Metadata
|
|
30
|
+
|
|
31
|
+
Parse the MODULE_METADATA JSON array. Build a lookup map:
|
|
32
|
+
- Key: module name (e.g., `"business-partner"`)
|
|
33
|
+
- Value: `{ commands: string[], queries: string[] }` from `docs.command` and `docs.query` arrays
|
|
34
|
+
|
|
35
|
+
This is the authoritative source for which modules, commands, and queries exist.
|
|
36
|
+
|
|
27
37
|
## Extraction: Resolver Docs
|
|
28
38
|
|
|
29
39
|
From each resolver doc, extract:
|
|
@@ -44,14 +54,20 @@ For each story:
|
|
|
44
54
|
| resolver_tbd | Are there stories still showing `- TBD` for resolvers? |
|
|
45
55
|
| link_validity | Do resolver links in the story resolve to real files? |
|
|
46
56
|
| operation_coverage | Do story operations (create/update/delete) have matching resolver types? |
|
|
57
|
+
| module_command_existence | Does the module and command/query referenced in each resolver exist in installed modules? |
|
|
47
58
|
|
|
48
59
|
### How to Check
|
|
49
60
|
|
|
50
61
|
1. Read each story's `## Resolvers` section
|
|
51
62
|
2. If `None` → skip (read-only story)
|
|
52
|
-
3. If
|
|
53
|
-
4. If
|
|
54
|
-
5.
|
|
63
|
+
3. If `N/A` (with or without reason) → skip (intentionally no resolver, e.g., background job)
|
|
64
|
+
4. If `- TBD` → fail: resolver docs not yet created
|
|
65
|
+
5. If links present → verify each link resolves to a file in RESOLVER_DOCS
|
|
66
|
+
6. Cross-check story operations against resolver types (mutation for writes, query for reads)
|
|
67
|
+
7. For each resolver that references a module and command/query, verify against MODULE_METADATA:
|
|
68
|
+
- The module name must exist as an entry in the metadata array
|
|
69
|
+
- The command name must appear in that module's `docs.command` array, or the query name in `docs.query`
|
|
70
|
+
- If either is missing, report as `module_command_existence` gap
|
|
55
71
|
|
|
56
72
|
## Link Format Reference
|
|
57
73
|
|
|
@@ -65,6 +81,8 @@ For each story:
|
|
|
65
81
|
- **Missing resolver docs**: Story links to a resolver that has no doc
|
|
66
82
|
- **Operation mismatch**: Story describes a create operation but no create resolver exists
|
|
67
83
|
- **Orphaned resolvers**: Resolver doc exists but no story links to it (covered by orphan detection)
|
|
84
|
+
- **Non-existent module**: Resolver references a module that isn't installed (not in MODULE_METADATA)
|
|
85
|
+
- **Non-existent command/query**: Resolver references a command or query that doesn't exist in the referenced module
|
|
68
86
|
|
|
69
87
|
## Output Format
|
|
70
88
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: erp-kit-app-5-impl-backend
|
|
3
|
-
description: Implement backend code for
|
|
3
|
+
description: Implement backend code for applications using erp-kit modules. Use after completing plan review with erp-kit-app-4-plan-review. Triggers when implementing backend resolvers, wiring modules, configuring applications, or when the user mentions implementing backend, writing resolvers, or connecting erp-kit modules.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Application Backend Implementation
|
|
7
7
|
|
|
8
|
-
Implement backend resolvers and application configuration for an
|
|
8
|
+
Implement backend resolvers and application configuration for an application, driven by Tier 1-4 documentation (actors, business flows, stories, screens, resolvers).
|
|
9
9
|
|
|
10
10
|
## When to Use
|
|
11
11
|
|
|
@@ -44,6 +44,17 @@ Read all resolver and screen specs to build a complete picture:
|
|
|
44
44
|
|
|
45
45
|
Classify resolvers per [erp-kit-app-shared/references/resolver-classification.md](../erp-kit-app-shared/references/resolver-classification.md).
|
|
46
46
|
|
|
47
|
+
> **Parallelize if possible:** Dispatch one agent per resolver spec to extract inputs, outputs, module mapping, and error scenarios. Each agent reads a single resolver doc and returns structured analysis.
|
|
48
|
+
|
|
49
|
+
### Phase 1b: Scaffolded Code Orientation
|
|
50
|
+
|
|
51
|
+
`erp-kit app generate code` produces two kinds of files:
|
|
52
|
+
|
|
53
|
+
- **Reference examples** — `src/resolvers/createUser.ts`, `src/modules.ts`, `src/executors/permissionCreated.ts` show the implementation pattern (command invocation, error handling, context creation). Use these as a guide.
|
|
54
|
+
- **Generated stubs** — Minimal resolver files created from `docs/resolver/*.md`. These are your starting points for actual implementation.
|
|
55
|
+
|
|
56
|
+
When implementing in Phase 4, follow the patterns from the reference examples. Once all actual resolvers are implemented, delete the reference files that aren't needed by your app.
|
|
57
|
+
|
|
47
58
|
### Phase 2: Wire Modules (`src/modules.ts`)
|
|
48
59
|
|
|
49
60
|
Create the module wiring file that composes all required erp-kit modules.
|
|
@@ -67,6 +78,8 @@ Key points:
|
|
|
67
78
|
- Auth with OAuth2, DPoP, and user profile mapping
|
|
68
79
|
- Generators for Kysely types and seed data
|
|
69
80
|
|
|
81
|
+
> **Sync barrier:** Module wiring and configuration must complete before resolver implementation. These files are shared across all resolvers.
|
|
82
|
+
|
|
70
83
|
### Phase 4: Implement Backend Resolvers and Executors
|
|
71
84
|
|
|
72
85
|
Write one file per resolver under `src/resolvers/`, one per executor under `executors/`.
|
|
@@ -77,6 +90,12 @@ For each resolver, check whether its spec (`docs/resolver/*.md`) documents error
|
|
|
77
90
|
|
|
78
91
|
Do not directly mutate module-owned tables via Kysely — always use module commands.
|
|
79
92
|
|
|
93
|
+
> **Parallelize if possible:** Dispatch one agent per resolver. Each agent writes only to its own files:
|
|
94
|
+
> - `src/resolvers/<resolverName>.ts`
|
|
95
|
+
> - `src/executors/<resolverName>.ts`
|
|
96
|
+
>
|
|
97
|
+
> **Shared-file guard:** `src/modules.ts` and `tailor.config.ts` are written in the sync barrier phase above. Resolver agents must NOT modify these files.
|
|
98
|
+
|
|
80
99
|
### Phase 5: Generated Files
|
|
81
100
|
|
|
82
101
|
- **Kysely types** (`src/generated/kysely-tailordb.ts`) — Auto-generated by `pnpm generate` after deployment. Before deployment, create a minimal placeholder so the codebase typechecks.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: erp-kit-app-6-impl-frontend
|
|
3
|
-
description: Implement frontend code for
|
|
3
|
+
description: Implement frontend code for applications. Use after deploying the backend with erp-kit-app-5-impl-backend. Triggers when implementing frontend pages, creating React components from screen specs, or when the user mentions implementing frontend, creating pages, or building UI for an application.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Application Frontend Implementation
|
|
7
7
|
|
|
8
|
-
Implement frontend pages for an
|
|
8
|
+
Implement frontend pages for an application, driven by screen spec documentation and a deployed backend.
|
|
9
9
|
|
|
10
10
|
## When to Use
|
|
11
11
|
|
|
12
12
|
- Implementing frontend pages from screen spec docs
|
|
13
13
|
- Creating React components for ListView, Form, or DetailView screens
|
|
14
|
-
- Building the frontend UI for an
|
|
14
|
+
- Building the frontend UI for an application after backend deployment
|
|
15
15
|
|
|
16
16
|
## Prerequisites
|
|
17
17
|
|
|
@@ -33,6 +33,8 @@ ANALYZE SCREENS → GENERATE GRAPHQL SCHEMA → IMPLEMENT PAGES → VERIFY
|
|
|
33
33
|
|
|
34
34
|
Read all screen specs (`docs/screen/*.md`) to build a complete picture:
|
|
35
35
|
|
|
36
|
+
> **Parallelize if possible:** Dispatch one agent per screen spec to extract page structure, fields, actions, and navigation. Each agent reads a single screen doc and returns structured analysis.
|
|
37
|
+
|
|
36
38
|
1. **Screen types** — Identify each screen as ListView, Form (create/edit), or DetailView
|
|
37
39
|
2. **Fields and columns** — Map required columns (ListView), form fields (Form), and detail fields (DetailView) from each spec
|
|
38
40
|
3. **Actions** — Identify navigation actions (create, edit, back-to-list) and mutation actions (save, delete, activate/deactivate)
|
|
@@ -41,12 +43,25 @@ Read all screen specs (`docs/screen/*.md`) to build a complete picture:
|
|
|
41
43
|
|
|
42
44
|
Run `pnpm generate` in the frontend directory to fetch the GraphQL schema from the deployed backend.
|
|
43
45
|
|
|
46
|
+
> **Sync barrier:** Schema generation must complete before page implementation. Generated types are shared across all pages.
|
|
47
|
+
|
|
48
|
+
### Phase 2b: Scaffolded Code Orientation
|
|
49
|
+
|
|
50
|
+
The scaffolded frontend includes example pages under `src/pages/user-management/` as a reference implementation. Use these to understand the page patterns (ListView, Form, DetailView), component structure, and GraphQL fragment conventions before implementing your actual pages.
|
|
51
|
+
|
|
44
52
|
### Phase 3: Implement Frontend Pages
|
|
45
53
|
|
|
54
|
+
> **Barrier step:** Write shared layout and router files before dispatching page agents. These files are shared across all pages and must not be modified by individual page agents.
|
|
55
|
+
|
|
46
56
|
Run `pnpm lint`, `pnpm typecheck`, and `pnpm gql-tada:check` regularly during implementation. Fix errors before moving on.
|
|
47
57
|
|
|
48
58
|
Create pages driven by screen spec docs. Each screen type has a standard implementation pattern.
|
|
49
59
|
|
|
60
|
+
> **Parallelize if possible:** Dispatch one agent per screen. Each agent writes only to its own directory:
|
|
61
|
+
> - `src/pages/<screen-name>/`
|
|
62
|
+
>
|
|
63
|
+
> **Shared-file guard:** Layout files, router configuration, and generated types are written before dispatch. Page agents must NOT modify shared files.
|
|
64
|
+
|
|
50
65
|
**Read [pages reference](references/pages.md) for the full pattern catalog.**
|
|
51
66
|
|
|
52
67
|
Page types and their file structure:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: erp-kit-app-7-impl-review
|
|
3
|
-
description: Review implementation parity between documentation and code for
|
|
3
|
+
description: Review implementation parity between documentation and code for applications. Use after frontend implementation (step 6) to validate code matches documentation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Implementation Parity Review
|
|
@@ -31,26 +31,29 @@ Verify at least `RESOLVER_DOCS` or `SCREEN_DOCS` is non-empty. If no docs exist,
|
|
|
31
31
|
|
|
32
32
|
## Step 2: Dispatch Agents (parallelize if possible)
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Dispatch agents in parallel — one per item in each group. All groups are dispatched simultaneously.
|
|
35
35
|
Each agent receives: APP_NAME, relevant doc/code file paths.
|
|
36
36
|
Each agent returns: structured JSON per [references/impl-parity-report-format.md](references/impl-parity-report-format.md).
|
|
37
37
|
If a doc or code directory is empty, the agent reports "no files found" and skips.
|
|
38
|
+
All review agents are read-only — no shared-file conflict risk.
|
|
38
39
|
|
|
39
|
-
|
|
|
40
|
-
| ----- | -------------------------------------------------------------------------------- |
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
40
|
+
| Group | Prompt Template | Per-item scope | Inputs per agent |
|
|
41
|
+
| ----- | -------------------------------------------------------------------------------- | ------------------ | ------------------------------------------------------------ |
|
|
42
|
+
| A | [references/resolver-doc-code-parity.md](references/resolver-doc-code-parity.md) | One per resolver | Single RESOLVER_DOC + matching BACKEND_RESOLVER + BACKEND_EXECUTOR |
|
|
43
|
+
| B | [references/screen-doc-code-parity.md](references/screen-doc-code-parity.md) | One per screen | Single SCREEN_DOC + matching FRONTEND_PAGE directory |
|
|
44
|
+
| C | [references/module-wiring-parity.md](references/module-wiring-parity.md) | One per resolver | Single RESOLVER_DOC + BACKEND_MODULES + BACKEND_CONFIG |
|
|
45
|
+
| D | Build verification (inline) | One global agent | All source paths |
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
With R resolvers and S screens, this produces R + S + R + 1 parallel agents.
|
|
48
|
+
|
|
49
|
+
For groups A-C:
|
|
47
50
|
|
|
48
51
|
1. Read the prompt template file
|
|
49
52
|
2. Replace `{{APP_NAME}}` with the resolved app name
|
|
50
|
-
3. Replace doc/code path placeholders with the actual file paths
|
|
51
|
-
4. Dispatch
|
|
53
|
+
3. Replace doc/code path placeholders with the actual file paths for that single item
|
|
54
|
+
4. Dispatch one agent per item with the filled prompt
|
|
52
55
|
|
|
53
|
-
For
|
|
56
|
+
For group D (build & sync verification):
|
|
54
57
|
|
|
55
58
|
Run build checks and source-doc sync check inline:
|
|
56
59
|
|
|
@@ -60,7 +63,7 @@ cd <APP_ROOT>/frontend && pnpm lint && pnpm typecheck && pnpm build
|
|
|
60
63
|
erp-kit app sync-check -p <APP_ROOT>/..
|
|
61
64
|
```
|
|
62
65
|
|
|
63
|
-
Report pass/fail for each check. `sync-check` detects missing resolver implementations and orphaned docs, so
|
|
66
|
+
Report pass/fail for each check. `sync-check` detects missing resolver implementations and orphaned docs, so groups A-C agents can skip file-existence checks and focus on content parity.
|
|
64
67
|
|
|
65
68
|
## Step 3: Aggregate Results
|
|
66
69
|
|
|
@@ -70,8 +73,9 @@ After ALL agents return:
|
|
|
70
73
|
2. Merge all `gaps[]` arrays into a single list
|
|
71
74
|
3. Merge all `inconsistencies[]` arrays into a single list
|
|
72
75
|
4. Deduplicate: if two gaps share the same `source + target + check`, keep only one
|
|
73
|
-
5.
|
|
74
|
-
6.
|
|
76
|
+
5. Deduplicate findings: if agents from groups A and C report the same resolver issue, keep only one
|
|
77
|
+
6. Calculate totals across all summaries
|
|
78
|
+
7. Render the final report below
|
|
75
79
|
|
|
76
80
|
## Report Format
|
|
77
81
|
|
|
@@ -21,3 +21,6 @@ Prefer built-in queries over custom resolvers for list/get operations where poss
|
|
|
21
21
|
| Assign X to Y | Mutation | `assign<X>To<Y>` |
|
|
22
22
|
| Submit/Approve | Mutation | `submit<Entity>` etc. |
|
|
23
23
|
| View/List/Get | Query | Built-in (no resolver) |
|
|
24
|
+
| Scheduled/Cron job | N/A | No resolver — background worker/job |
|
|
25
|
+
| Webhook handler | N/A | No resolver — external trigger |
|
|
26
|
+
| System event | N/A | No resolver — internal event processing |
|
|
@@ -52,60 +52,41 @@ After ALL agents return:
|
|
|
52
52
|
2. Merge all `issues[]` arrays into a single list
|
|
53
53
|
3. Merge all `recommendations[]` arrays into a single list
|
|
54
54
|
4. Calculate totals across all summaries
|
|
55
|
-
5. **Classify severity** — for each non-pass finding, the router assigns a severity based on the finding's `status`, `check`, and `detail`:
|
|
56
|
-
- `critical`: fundamental design flaw, missing required capability, boundary violation — blocks progress
|
|
57
|
-
- `major`: significant gap that will likely cause downstream issues — should fix
|
|
58
|
-
- `nit`: cosmetic, stylistic, or minor improvement — does NOT block the review
|
|
59
|
-
6. **Determine verdict**:
|
|
60
|
-
- **APPROVED**: zero `critical` and zero `major` findings (nits only, or all pass)
|
|
61
|
-
- **NEEDS CHANGES**: one or more `critical` or `major` findings
|
|
62
|
-
7. Render the final report below
|
|
63
55
|
|
|
64
|
-
##
|
|
56
|
+
## Step 4: Severity Validation
|
|
65
57
|
|
|
66
|
-
|
|
58
|
+
Subagents tend to over-classify. Before rendering the report, re-evaluate every non-pass finding:
|
|
67
59
|
|
|
68
|
-
|
|
60
|
+
- **"Is this even this module's responsibility?"** — If the concern belongs to another module or is out of scope, drop it from the report
|
|
61
|
+
- **"Does this block planning?"** → `critical`
|
|
62
|
+
- **"Will this force model/command/query rework?"** → `major`
|
|
63
|
+
- All no → `nit`, regardless of subagent label
|
|
69
64
|
|
|
70
|
-
|
|
65
|
+
## Step 5: Determine Verdict
|
|
71
66
|
|
|
72
|
-
|
|
67
|
+
- **APPROVED**: zero `critical` and zero `major`
|
|
68
|
+
- **NEEDS CHANGES**: one or more `critical` or `major`
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
| Feature | Check | Status | Detail |
|
|
77
|
-
| ------- | ----- | ------ | ------ |
|
|
78
|
-
|
|
79
|
-
(Populated from agent 1 issues)
|
|
80
|
-
|
|
81
|
-
---
|
|
70
|
+
## Step 6: Render Report
|
|
82
71
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
| Feature | Overlapping Module | Overlap Area | Recommendation |
|
|
86
|
-
| ------- | ------------------ | ------------ | -------------- |
|
|
87
|
-
|
|
88
|
-
(Populated from agent 2 issues where check is `boundary_overlap`)
|
|
89
|
-
|
|
90
|
-
---
|
|
72
|
+
## Report Format
|
|
91
73
|
|
|
92
|
-
|
|
74
|
+
Render the aggregated results as markdown:
|
|
93
75
|
|
|
94
|
-
|
|
95
|
-
| ------- | ----------------- | --------------- | ------ |
|
|
76
|
+
### Requirements Review Report
|
|
96
77
|
|
|
97
|
-
|
|
78
|
+
**Module:** <MODULE_NAME>
|
|
98
79
|
|
|
99
80
|
---
|
|
100
81
|
|
|
101
|
-
###
|
|
82
|
+
### 1. Summary
|
|
102
83
|
|
|
103
84
|
| Aspect | Status | Details |
|
|
104
85
|
| -------------------- | ------ | ----------------- |
|
|
105
86
|
| Best Practices | | X/Y checks passed |
|
|
106
87
|
| Boundary Consistency | | X/Y checks passed |
|
|
107
88
|
|
|
108
|
-
###
|
|
89
|
+
### 2. Recommendations
|
|
109
90
|
|
|
110
91
|
Numbered list of actionable fixes, grouped by severity:
|
|
111
92
|
|
|
@@ -113,7 +94,7 @@ Numbered list of actionable fixes, grouped by severity:
|
|
|
113
94
|
2. `major` — best practice violations, missing capabilities (should fix)
|
|
114
95
|
3. `nit` — cosmetic, stylistic, minor improvements (informational only)
|
|
115
96
|
|
|
116
|
-
###
|
|
97
|
+
### 3. Verdict
|
|
117
98
|
|
|
118
99
|
**Verdict: APPROVED / NEEDS CHANGES**
|
|
119
100
|
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: erp-kit-module-3-update-plan
|
|
3
|
+
description: Update model/command/query documentation based on plan review (step 4) feedback. Use after erp-kit-module-4-plan-review returns NEEDS CHANGES to apply targeted fixes without re-creating existing docs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fix Plan Documentation from Review Feedback
|
|
7
|
+
|
|
8
|
+
Apply targeted fixes to model, command, and query documentation based on plan review feedback. Unlike erp-kit-module-3-plan which creates docs from scratch, this skill reads the review report and applies only the necessary changes.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- After erp-kit-module-4-plan-review returns **NEEDS CHANGES**
|
|
13
|
+
- User wants to fix specific gaps or inconsistencies flagged by the review
|
|
14
|
+
- User says "fix the review findings" or "apply the review feedback"
|
|
15
|
+
|
|
16
|
+
## Step 1: Setup
|
|
17
|
+
|
|
18
|
+
Define shared context:
|
|
19
|
+
|
|
20
|
+
- `MODULES_ROOT`: glob `**/modules/*/README.md` and derive the parent directory
|
|
21
|
+
- `MODULE_NAME`: from argument or detect from current working directory
|
|
22
|
+
- `FEATURE_DOCS`: glob `<MODULES_ROOT>/<MODULE_NAME>/docs/features/*.md`
|
|
23
|
+
- `MODEL_DOCS`: glob `<MODULES_ROOT>/<MODULE_NAME>/docs/models/*.md`
|
|
24
|
+
- `COMMAND_DOCS`: glob `<MODULES_ROOT>/<MODULE_NAME>/docs/commands/*.md`
|
|
25
|
+
- `QUERY_DOCS`: glob `<MODULES_ROOT>/<MODULE_NAME>/docs/queries/*.md`
|
|
26
|
+
|
|
27
|
+
Verify that at least some model/command/query docs exist. If none exist, stop with: "No existing docs found. Use erp-kit-module-3-plan to create docs first."
|
|
28
|
+
|
|
29
|
+
## Step 2: Extract & Triage Review Findings
|
|
30
|
+
|
|
31
|
+
Look at the conversation history for the most recent plan review report (from erp-kit-module-4-plan-review). Extract all `critical` and `major` findings.
|
|
32
|
+
|
|
33
|
+
If no review report is found in conversation history, ask the user: "No review report found in this conversation. Please either run /erp-kit-module-4-plan-review first, or paste the review findings."
|
|
34
|
+
|
|
35
|
+
### Severity Re-evaluation
|
|
36
|
+
|
|
37
|
+
The review may over-classify findings. Before accepting each finding, re-evaluate it by reading the relevant feature docs:
|
|
38
|
+
|
|
39
|
+
- **"Is this a real gap or a design choice?"** — If the feature intentionally omits a command/query/model (e.g., handled by another module, deferred to a later phase, or covered by a generic mechanism), **reject** the finding
|
|
40
|
+
- **"Does the feature doc explicitly require this?"** — Only accept findings for capabilities the feature doc actually specifies. Reject findings that invent requirements the feature does not mention
|
|
41
|
+
- **"Does this block implementation?"** → accept as `critical`
|
|
42
|
+
- **"Will this cause rework during implementation?"** → accept as `major`
|
|
43
|
+
- Neither → downgrade to `nit` (informational only, do not fix)
|
|
44
|
+
|
|
45
|
+
### Categorize accepted findings into:
|
|
46
|
+
|
|
47
|
+
1. **Missing docs** — new model/command/query docs that need to be created
|
|
48
|
+
2. **Incomplete docs** — existing docs with missing fields, business rules, or error scenarios
|
|
49
|
+
3. **Inconsistencies** — mismatches between feature docs and model/command/query docs
|
|
50
|
+
|
|
51
|
+
## Step 3: Plan the Delta
|
|
52
|
+
|
|
53
|
+
Produce a targeted fix plan listing **only** the changes needed. Format:
|
|
54
|
+
|
|
55
|
+
### Fix Plan
|
|
56
|
+
|
|
57
|
+
**Findings rejected** (design choices or not required by feature docs):
|
|
58
|
+
- (list rejected findings with reason — these will NOT be fixed)
|
|
59
|
+
|
|
60
|
+
**Findings downgraded to nit** (informational, no action):
|
|
61
|
+
- (list downgraded findings with reason)
|
|
62
|
+
|
|
63
|
+
**Docs to create:**
|
|
64
|
+
- (list new docs with purpose — scaffold these)
|
|
65
|
+
|
|
66
|
+
**Docs to update:**
|
|
67
|
+
- (list existing docs with specific changes needed — edit in place)
|
|
68
|
+
|
|
69
|
+
**Docs unchanged:**
|
|
70
|
+
- (explicitly note docs that are fine — do NOT touch these)
|
|
71
|
+
|
|
72
|
+
## Step 4: Apply Fixes
|
|
73
|
+
|
|
74
|
+
For each item in the fix plan:
|
|
75
|
+
|
|
76
|
+
### Missing docs → Scaffold & Populate
|
|
77
|
+
|
|
78
|
+
Scaffold using `erp-kit` CLI. **Names must be PascalCase** (see [naming convention](references/naming.md)):
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
erp-kit module generate doc model ModelName -p <MODULES_ROOT>/<module-name>
|
|
82
|
+
erp-kit module generate doc command CommandName -p <MODULES_ROOT>/<module-name>
|
|
83
|
+
erp-kit module generate doc query QueryName -p <MODULES_ROOT>/<module-name>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Populate the new docs using the extraction rules from:
|
|
87
|
+
|
|
88
|
+
- [Model extraction](references/model-extraction.md)
|
|
89
|
+
- [Command extraction](references/command-extraction.md)
|
|
90
|
+
- [Query extraction](references/query-extraction.md)
|
|
91
|
+
|
|
92
|
+
### Incomplete docs → Edit in place
|
|
93
|
+
|
|
94
|
+
Read the existing doc, then edit it directly to add the missing content. Do NOT re-scaffold or overwrite.
|
|
95
|
+
|
|
96
|
+
### Inconsistencies → Align with feature spec
|
|
97
|
+
|
|
98
|
+
Read both the feature doc and the model/command/query doc, then edit the model/command/query doc to align with the feature spec.
|
|
99
|
+
|
|
100
|
+
**Important**: Do NOT touch docs listed as "unchanged."
|
|
101
|
+
|
|
102
|
+
## Step 5: Dispatch Refinement Agents (parallelize)
|
|
103
|
+
|
|
104
|
+
Launch up to 3 Agent tool calls in parallel — one per doc type that had changes — to review and refine the modified docs. Skip agents for doc types with no changes.
|
|
105
|
+
|
|
106
|
+
Each agent receives: MODULE_NAME, the list of **changed** doc file paths only, and FEATURE_DOCS for cross-reference.
|
|
107
|
+
|
|
108
|
+
| Agent | Prompt Template | Inputs |
|
|
109
|
+
| ----- | ---------------------------------------------------------------------------------------- | -------------------------------------------------- |
|
|
110
|
+
| 1 | [model-extraction.md](references/model-extraction.md) | MODULE_NAME, changed model doc paths, FEATURE_DOCS |
|
|
111
|
+
| 2 | [command-extraction.md](references/command-extraction.md) | MODULE_NAME, changed command doc paths, FEATURE_DOCS |
|
|
112
|
+
| 3 | [query-extraction.md](references/query-extraction.md) | MODULE_NAME, changed query doc paths, FEATURE_DOCS |
|
|
113
|
+
|
|
114
|
+
For each agent:
|
|
115
|
+
|
|
116
|
+
1. Read the prompt template file
|
|
117
|
+
2. Replace `{{MODULE_NAME}}` with the resolved module name
|
|
118
|
+
3. Replace `{{FEATURE_DOCS}}` with the actual file paths
|
|
119
|
+
4. Add to the prompt: "Read the docs at [doc paths]. These were just modified to fix review findings. Cross-reference against the feature docs and the extraction rules. Fix any remaining issues. Edit files directly."
|
|
120
|
+
5. Dispatch the agent with the filled prompt
|
|
121
|
+
|
|
122
|
+
## Step 6: Validate
|
|
123
|
+
|
|
124
|
+
Run `pnpm run module:doc:check` and fix any violations.
|
|
125
|
+
|
|
126
|
+
## References
|
|
127
|
+
|
|
128
|
+
- [Naming convention](references/naming.md)
|
|
129
|
+
- [Module structure](../erp-kit-module-shared/references/structure.md)
|
|
130
|
+
- [Model extraction rules](references/model-extraction.md)
|
|
131
|
+
- [Command extraction rules](references/command-extraction.md)
|
|
132
|
+
- [Query extraction rules](references/query-extraction.md)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Command Extraction
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Module: {{MODULE_NAME}}
|
|
6
|
+
Feature docs: {{FEATURE_DOCS}}
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
Read ALL feature docs and extract command (write operation) definitions.
|
|
11
|
+
|
|
12
|
+
1. Read ALL feature docs at the paths above
|
|
13
|
+
2. For each feature, identify operations that change state
|
|
14
|
+
3. For each operation, extract:
|
|
15
|
+
- Command name (following naming convention)
|
|
16
|
+
- Input parameters
|
|
17
|
+
- Business rules and validations
|
|
18
|
+
- Error scenarios
|
|
19
|
+
- Process flow (step-by-step)
|
|
20
|
+
|
|
21
|
+
## Naming Convention
|
|
22
|
+
|
|
23
|
+
See [naming.md](naming.md) for the full canonical verb vocabulary.
|
|
24
|
+
|
|
25
|
+
Key mappings:
|
|
26
|
+
|
|
27
|
+
| Feature Operation | Command Name |
|
|
28
|
+
| -------------------- | -------------- |
|
|
29
|
+
| "Create X" / "Add X" | `createX` |
|
|
30
|
+
| "Update X" | `updateX` |
|
|
31
|
+
| "Delete X" | `deleteX` |
|
|
32
|
+
| "Deactivate X" | `deactivateX` |
|
|
33
|
+
| "Activate X" | `activateX` |
|
|
34
|
+
| "Reactivate X" | `reactivateX` |
|
|
35
|
+
| "Set default X" | `setDefaultX` |
|
|
36
|
+
| "Assign X to Y" | `assignXToY` |
|
|
37
|
+
| "Remove X from Y" | `removeXFromY` |
|
|
38
|
+
| "Revoke X from Y" | `revokeXFromY` |
|
|
39
|
+
| "Move X" | `moveX` |
|
|
40
|
+
| "Log X" | `logX` |
|
|
41
|
+
|
|
42
|
+
**Banned verbs**: `archive`, `unarchive`, `disable`, `enable`, `add...To...`, `unlink`
|
|
43
|
+
|
|
44
|
+
## Extraction Rules
|
|
45
|
+
|
|
46
|
+
### Business Rules
|
|
47
|
+
|
|
48
|
+
- Extract explicit validation rules from feature scenarios
|
|
49
|
+
- Extract implicit rules from test cases ("should not allow X when Y")
|
|
50
|
+
- Map each rule to an error scenario
|
|
51
|
+
|
|
52
|
+
### Error Scenarios
|
|
53
|
+
|
|
54
|
+
- For each business rule violation, define an error code
|
|
55
|
+
- Follow SCREAMING_SNAKE_CASE convention
|
|
56
|
+
- Categories: NOT_FOUND, DUPLICATE, LOCKED/INACTIVE, INVALID_STATE, NO_OP
|
|
57
|
+
|
|
58
|
+
### Process Flow
|
|
59
|
+
|
|
60
|
+
- Extract step-by-step flow from feature scenarios
|
|
61
|
+
- Identify branching points (conditional logic)
|
|
62
|
+
- Map to validate → query → mutate pattern
|
|
63
|
+
|
|
64
|
+
## Output Format
|
|
65
|
+
|
|
66
|
+
Return your extraction as a structured markdown report:
|
|
67
|
+
|
|
68
|
+
### Commands
|
|
69
|
+
|
|
70
|
+
For each command:
|
|
71
|
+
|
|
72
|
+
#### <commandName>
|
|
73
|
+
|
|
74
|
+
- **Source features:** list of feature files
|
|
75
|
+
- **Target model:** ModelName
|
|
76
|
+
- **Inputs:**
|
|
77
|
+
|
|
78
|
+
| Param | Type | Required | Description |
|
|
79
|
+
| ----- | ---- | -------- | ----------- |
|
|
80
|
+
|
|
81
|
+
- **Business Rules:**
|
|
82
|
+
|
|
83
|
+
| Rule | Error Code | Error Message |
|
|
84
|
+
| ---- | ---------- | ------------- |
|
|
85
|
+
|
|
86
|
+
- **Process Flow:** numbered steps
|
|
87
|
+
- **Permissions:** list
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Model Extraction
|
|
2
|
+
|
|
3
|
+
## Context
|
|
4
|
+
|
|
5
|
+
Module: {{MODULE_NAME}}
|
|
6
|
+
Feature docs: {{FEATURE_DOCS}}
|
|
7
|
+
|
|
8
|
+
## Instructions
|
|
9
|
+
|
|
10
|
+
Read ALL feature docs and extract entity/model definitions.
|
|
11
|
+
|
|
12
|
+
1. Read ALL feature docs at the paths above
|
|
13
|
+
2. For each feature, identify entities that need database models
|
|
14
|
+
3. For each entity, extract:
|
|
15
|
+
- Fields and their types
|
|
16
|
+
- Relationships to other entities
|
|
17
|
+
- State machines (if stateful)
|
|
18
|
+
- Required constraints (unique, required, etc.)
|
|
19
|
+
4. Resolve cross-feature entity references (same entity mentioned in multiple features)
|
|
20
|
+
|
|
21
|
+
## Extraction Rules
|
|
22
|
+
|
|
23
|
+
### Entity Identification
|
|
24
|
+
|
|
25
|
+
- Look for nouns that represent persistent data
|
|
26
|
+
- Check for explicit "Entity" or "Model" mentions
|
|
27
|
+
- Identify implicit entities from relationship descriptions
|
|
28
|
+
|
|
29
|
+
### Field Extraction
|
|
30
|
+
|
|
31
|
+
- Map feature attributes to database field types
|
|
32
|
+
- Identify required vs optional fields
|
|
33
|
+
- Note any validation constraints
|
|
34
|
+
|
|
35
|
+
### State Machine Extraction
|
|
36
|
+
|
|
37
|
+
- Look for state diagrams or transition descriptions
|
|
38
|
+
- Extract all possible states
|
|
39
|
+
- Map transitions to operations (verbs → commands)
|
|
40
|
+
|
|
41
|
+
### Relationship Extraction
|
|
42
|
+
|
|
43
|
+
- Identify foreign key relationships (N-1, 1-1)
|
|
44
|
+
- Identify junction table needs (N-N)
|
|
45
|
+
- Note cross-module entity references
|
|
46
|
+
|
|
47
|
+
## Output Format
|
|
48
|
+
|
|
49
|
+
Return your extraction as a structured markdown report:
|
|
50
|
+
|
|
51
|
+
### Models
|
|
52
|
+
|
|
53
|
+
For each model:
|
|
54
|
+
|
|
55
|
+
#### <ModelName>
|
|
56
|
+
|
|
57
|
+
- **Source features:** list of feature files
|
|
58
|
+
- **Fields:**
|
|
59
|
+
|
|
60
|
+
| Field | Type | Required | Description |
|
|
61
|
+
| ----- | ---- | -------- | ----------- |
|
|
62
|
+
|
|
63
|
+
- **Relationships:**
|
|
64
|
+
|
|
65
|
+
| Type | Target | Field | Cross-module |
|
|
66
|
+
| ---- | ------ | ----- | ------------ |
|
|
67
|
+
|
|
68
|
+
- **States:** list of states (if stateful)
|
|
69
|
+
- **State Transitions:**
|
|
70
|
+
|
|
71
|
+
| From | To | Trigger (command) |
|
|
72
|
+
| ---- | --- | ----------------- |
|