@revisium/core 2.5.0 → 2.6.0-alpha.2
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/dist/package.json +2 -2
- package/dist/src/__tests__/utils/prepareProject.js +4 -3
- package/dist/src/__tests__/utils/prepareProject.js.map +1 -1
- package/dist/src/api/graphql-api/draft/draft.resolver.d.ts +5 -1
- package/dist/src/api/graphql-api/draft/draft.resolver.js +49 -0
- package/dist/src/api/graphql-api/draft/draft.resolver.js.map +1 -1
- package/dist/src/api/graphql-api/draft/input/create-rows.input.d.ts +11 -0
- package/dist/src/api/graphql-api/draft/input/create-rows.input.js +56 -0
- package/dist/src/api/graphql-api/draft/input/create-rows.input.js.map +1 -0
- package/dist/src/api/graphql-api/draft/input/index.d.ts +3 -0
- package/dist/src/api/graphql-api/draft/input/index.js +3 -0
- package/dist/src/api/graphql-api/draft/input/index.js.map +1 -1
- package/dist/src/api/graphql-api/draft/input/patch-rows.input.d.ts +10 -0
- package/dist/src/api/graphql-api/draft/input/patch-rows.input.js +52 -0
- package/dist/src/api/graphql-api/draft/input/patch-rows.input.js.map +1 -0
- package/dist/src/api/graphql-api/draft/input/update-rows.input.d.ts +10 -0
- package/dist/src/api/graphql-api/draft/input/update-rows.input.js +52 -0
- package/dist/src/api/graphql-api/draft/input/update-rows.input.js.map +1 -0
- package/dist/src/api/graphql-api/draft/model/create-rows-result.model.d.ts +7 -0
- package/dist/src/api/graphql-api/draft/model/create-rows-result.model.js +34 -0
- package/dist/src/api/graphql-api/draft/model/create-rows-result.model.js.map +1 -0
- package/dist/src/api/graphql-api/draft/model/patch-rows-result.model.d.ts +7 -0
- package/dist/src/api/graphql-api/draft/model/patch-rows-result.model.js +34 -0
- package/dist/src/api/graphql-api/draft/model/patch-rows-result.model.js.map +1 -0
- package/dist/src/api/graphql-api/draft/model/update-rows-result.model.d.ts +7 -0
- package/dist/src/api/graphql-api/draft/model/update-rows-result.model.js +34 -0
- package/dist/src/api/graphql-api/draft/model/update-rows-result.model.js.map +1 -0
- package/dist/src/api/graphql-api/row/inputs/get-rows.input.d.ts +3 -1
- package/dist/src/api/graphql-api/row/inputs/get-rows.input.js +2 -0
- package/dist/src/api/graphql-api/row/inputs/get-rows.input.js.map +1 -1
- package/dist/src/api/mcp-api/tools/row.tools.js +122 -0
- package/dist/src/api/mcp-api/tools/row.tools.js.map +1 -1
- package/dist/src/api/rest-api/table/dto/create-rows.dto.d.ts +9 -0
- package/dist/src/api/rest-api/table/dto/create-rows.dto.js +44 -0
- package/dist/src/api/rest-api/table/dto/create-rows.dto.js.map +1 -0
- package/dist/src/api/rest-api/table/dto/index.d.ts +3 -0
- package/dist/src/api/rest-api/table/dto/index.js +3 -0
- package/dist/src/api/rest-api/table/dto/index.js.map +1 -1
- package/dist/src/api/rest-api/table/dto/patch-rows.dto.d.ts +8 -0
- package/dist/src/api/rest-api/table/dto/patch-rows.dto.js +44 -0
- package/dist/src/api/rest-api/table/dto/patch-rows.dto.js.map +1 -0
- package/dist/src/api/rest-api/table/dto/row/json-filter.dto.d.ts +1 -1
- package/dist/src/api/rest-api/table/dto/row/json-filter.dto.js +3 -3
- package/dist/src/api/rest-api/table/dto/row/json-filter.dto.js.map +1 -1
- package/dist/src/api/rest-api/table/dto/update-rows.dto.d.ts +8 -0
- package/dist/src/api/rest-api/table/dto/update-rows.dto.js +40 -0
- package/dist/src/api/rest-api/table/dto/update-rows.dto.js.map +1 -0
- package/dist/src/api/rest-api/table/model/create-rows.response.d.ts +7 -0
- package/dist/src/api/rest-api/table/model/create-rows.response.js +31 -0
- package/dist/src/api/rest-api/table/model/create-rows.response.js.map +1 -0
- package/dist/src/api/rest-api/table/model/index.d.ts +3 -0
- package/dist/src/api/rest-api/table/model/index.js +3 -0
- package/dist/src/api/rest-api/table/model/index.js.map +1 -1
- package/dist/src/api/rest-api/table/model/patch-rows.response.d.ts +7 -0
- package/dist/src/api/rest-api/table/model/patch-rows.response.js +31 -0
- package/dist/src/api/rest-api/table/model/patch-rows.response.js.map +1 -0
- package/dist/src/api/rest-api/table/model/update-rows.response.d.ts +7 -0
- package/dist/src/api/rest-api/table/model/update-rows.response.js +31 -0
- package/dist/src/api/rest-api/table/model/update-rows.response.js.map +1 -0
- package/dist/src/api/rest-api/table/table-by-id.controller.d.ts +5 -2
- package/dist/src/api/rest-api/table/table-by-id.controller.js +88 -0
- package/dist/src/api/rest-api/table/table-by-id.controller.js.map +1 -1
- package/dist/src/features/branch/quieries/handlers/get-branch-by-id.handler.d.ts +5 -4
- package/dist/src/features/branch/quieries/handlers/get-branch-by-id.handler.js +7 -4
- package/dist/src/features/branch/quieries/handlers/get-branch-by-id.handler.js.map +1 -1
- package/dist/src/features/branch/quieries/handlers/get-draft-revision.handler.d.ts +4 -3
- package/dist/src/features/branch/quieries/handlers/get-draft-revision.handler.js +7 -4
- package/dist/src/features/branch/quieries/handlers/get-draft-revision.handler.js.map +1 -1
- package/dist/src/features/branch/quieries/handlers/get-head-revision.handler.d.ts +4 -3
- package/dist/src/features/branch/quieries/handlers/get-head-revision.handler.js +7 -4
- package/dist/src/features/branch/quieries/handlers/get-head-revision.handler.js.map +1 -1
- package/dist/src/features/branch/quieries/handlers/get-project-by-branch.handler.d.ts +5 -4
- package/dist/src/features/branch/quieries/handlers/get-project-by-branch.handler.js +7 -4
- package/dist/src/features/branch/quieries/handlers/get-project-by-branch.handler.js.map +1 -1
- package/dist/src/features/branch/quieries/handlers/get-revisions-by-branch-id.handler.d.ts +4 -3
- package/dist/src/features/branch/quieries/handlers/get-revisions-by-branch-id.handler.js +7 -4
- package/dist/src/features/branch/quieries/handlers/get-revisions-by-branch-id.handler.js.map +1 -1
- package/dist/src/features/branch/quieries/handlers/get-start-revision.handler.d.ts +4 -3
- package/dist/src/features/branch/quieries/handlers/get-start-revision.handler.js +7 -4
- package/dist/src/features/branch/quieries/handlers/get-start-revision.handler.js.map +1 -1
- package/dist/src/features/branch/quieries/handlers/resolve-parent-branch-by-branch.handler.d.ts +4 -3
- package/dist/src/features/branch/quieries/handlers/resolve-parent-branch-by-branch.handler.js +7 -4
- package/dist/src/features/branch/quieries/handlers/resolve-parent-branch-by-branch.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/__tests__/utils.js +8 -0
- package/dist/src/features/draft/commands/handlers/__tests__/utils.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-base-row.handler.d.ts +37 -0
- package/dist/src/features/draft/commands/handlers/api-base-row.handler.js +32 -0
- package/dist/src/features/draft/commands/handlers/api-base-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-create-row.handler.d.ts +5 -1
- package/dist/src/features/draft/commands/handlers/api-create-row.handler.js +13 -10
- package/dist/src/features/draft/commands/handlers/api-create-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-create-rows.handler.d.ts +37 -0
- package/dist/src/features/draft/commands/handlers/api-create-rows.handler.js +78 -0
- package/dist/src/features/draft/commands/handlers/api-create-rows.handler.js.map +1 -0
- package/dist/src/features/draft/commands/handlers/api-patch-row.handler.d.ts +6 -1
- package/dist/src/features/draft/commands/handlers/api-patch-row.handler.js +18 -10
- package/dist/src/features/draft/commands/handlers/api-patch-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-patch-rows.handler.d.ts +37 -0
- package/dist/src/features/draft/commands/handlers/api-patch-rows.handler.js +53 -0
- package/dist/src/features/draft/commands/handlers/api-patch-rows.handler.js.map +1 -0
- package/dist/src/features/draft/commands/handlers/api-update-row.handler.d.ts +6 -1
- package/dist/src/features/draft/commands/handlers/api-update-row.handler.js +18 -10
- package/dist/src/features/draft/commands/handlers/api-update-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-update-rows.handler.d.ts +37 -0
- package/dist/src/features/draft/commands/handlers/api-update-rows.handler.js +53 -0
- package/dist/src/features/draft/commands/handlers/api-update-rows.handler.js.map +1 -0
- package/dist/src/features/draft/commands/handlers/create-revision.handler.d.ts +3 -14
- package/dist/src/features/draft/commands/handlers/create-revision.handler.js +16 -97
- package/dist/src/features/draft/commands/handlers/create-revision.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/create-rows.handler.d.ts +24 -0
- package/dist/src/features/draft/commands/handlers/{create-row.handler.js → create-rows.handler.js} +63 -44
- package/dist/src/features/draft/commands/handlers/create-rows.handler.js.map +1 -0
- package/dist/src/features/draft/commands/handlers/create-table.handler.d.ts +5 -10
- package/dist/src/features/draft/commands/handlers/create-table.handler.js +26 -63
- package/dist/src/features/draft/commands/handlers/create-table.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/index.d.ts +7 -7
- package/dist/src/features/draft/commands/handlers/index.js +12 -12
- package/dist/src/features/draft/commands/handlers/index.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/{patch-row.handler.d.ts → patch-rows.handler.d.ts} +8 -7
- package/dist/src/features/draft/commands/handlers/{patch-row.handler.js → patch-rows.handler.js} +50 -32
- package/dist/src/features/draft/commands/handlers/patch-rows.handler.js.map +1 -0
- package/dist/src/features/draft/commands/handlers/remove-rows.handler.d.ts +3 -9
- package/dist/src/features/draft/commands/handlers/remove-rows.handler.js +12 -78
- package/dist/src/features/draft/commands/handlers/remove-rows.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/remove-table.handler.d.ts +3 -8
- package/dist/src/features/draft/commands/handlers/remove-table.handler.js +6 -39
- package/dist/src/features/draft/commands/handlers/remove-table.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/rename-row.handler.d.ts +1 -4
- package/dist/src/features/draft/commands/handlers/rename-row.handler.js +1 -13
- package/dist/src/features/draft/commands/handlers/rename-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/rename-table.handler.d.ts +3 -8
- package/dist/src/features/draft/commands/handlers/rename-table.handler.js +13 -48
- package/dist/src/features/draft/commands/handlers/rename-table.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/revert-changes.handler.d.ts +3 -4
- package/dist/src/features/draft/commands/handlers/revert-changes.handler.js +8 -36
- package/dist/src/features/draft/commands/handlers/revert-changes.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/transactional/internal-create-row.handler.d.ts +3 -16
- package/dist/src/features/draft/commands/handlers/transactional/internal-create-row.handler.js +21 -76
- package/dist/src/features/draft/commands/handlers/transactional/internal-create-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/transactional/internal-rename-row.handler.d.ts +3 -14
- package/dist/src/features/draft/commands/handlers/transactional/internal-rename-row.handler.js +16 -69
- package/dist/src/features/draft/commands/handlers/transactional/internal-rename-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/transactional/internal-update-row.handler.d.ts +3 -10
- package/dist/src/features/draft/commands/handlers/transactional/internal-update-row.handler.js +24 -41
- package/dist/src/features/draft/commands/handlers/transactional/internal-update-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/transactional/internal-update-rows.handler.d.ts +6 -13
- package/dist/src/features/draft/commands/handlers/transactional/internal-update-rows.handler.js +14 -45
- package/dist/src/features/draft/commands/handlers/transactional/internal-update-rows.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/update-rows.handler.d.ts +26 -0
- package/dist/src/features/draft/commands/handlers/update-rows.handler.js +110 -0
- package/dist/src/features/draft/commands/handlers/update-rows.handler.js.map +1 -0
- package/dist/src/features/draft/commands/handlers/update-table.handler.d.ts +1 -4
- package/dist/src/features/draft/commands/handlers/update-table.handler.js +8 -21
- package/dist/src/features/draft/commands/handlers/update-table.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/upload-file.handler.d.ts +3 -7
- package/dist/src/features/draft/commands/handlers/upload-file.handler.js +14 -26
- package/dist/src/features/draft/commands/handlers/upload-file.handler.js.map +1 -1
- package/dist/src/features/draft/commands/impl/api-create-rows.command.d.ts +20 -0
- package/dist/src/features/draft/commands/impl/api-create-rows.command.js +10 -0
- package/dist/src/features/draft/commands/impl/api-create-rows.command.js.map +1 -0
- package/dist/src/features/draft/commands/impl/api-patch-rows.command.d.ts +18 -0
- package/dist/src/features/draft/commands/impl/api-patch-rows.command.js +10 -0
- package/dist/src/features/draft/commands/impl/api-patch-rows.command.js.map +1 -0
- package/dist/src/features/draft/commands/impl/api-update-rows.command.d.ts +18 -0
- package/dist/src/features/draft/commands/impl/api-update-rows.command.js +10 -0
- package/dist/src/features/draft/commands/impl/api-update-rows.command.js.map +1 -0
- package/dist/src/features/draft/commands/impl/{create-row.command.d.ts → create-rows.command.d.ts} +8 -5
- package/dist/src/features/draft/commands/impl/create-rows.command.js +10 -0
- package/dist/src/features/draft/commands/impl/create-rows.command.js.map +1 -0
- package/dist/src/features/draft/commands/impl/patch-rows.command.d.ts +18 -0
- package/dist/src/features/draft/commands/impl/patch-rows.command.js +10 -0
- package/dist/src/features/draft/commands/impl/patch-rows.command.js.map +1 -0
- package/dist/src/features/draft/commands/impl/transactional/internal-update-rows.command.d.ts +4 -0
- package/dist/src/features/draft/commands/impl/transactional/internal-update-rows.command.js.map +1 -1
- package/dist/src/features/draft/commands/impl/update-rows.command.d.ts +18 -0
- package/dist/src/features/draft/commands/impl/update-rows.command.js +10 -0
- package/dist/src/features/draft/commands/impl/update-rows.command.js.map +1 -0
- package/dist/src/features/draft/commands/types/api-create-rows.handler.types.d.ts +7 -0
- package/dist/src/features/draft/commands/types/api-create-rows.handler.types.js +3 -0
- package/dist/src/features/draft/commands/types/api-create-rows.handler.types.js.map +1 -0
- package/dist/src/features/draft/commands/types/api-patch-rows.handler.types.d.ts +7 -0
- package/dist/src/features/draft/commands/types/api-patch-rows.handler.types.js +3 -0
- package/dist/src/features/draft/commands/types/api-patch-rows.handler.types.js.map +1 -0
- package/dist/src/features/draft/commands/types/api-update-rows.handler.types.d.ts +7 -0
- package/dist/src/features/draft/commands/types/api-update-rows.handler.types.js +3 -0
- package/dist/src/features/draft/commands/types/api-update-rows.handler.types.js.map +1 -0
- package/dist/src/features/draft/commands/types/create-rows.handler.types.d.ts +9 -0
- package/dist/src/features/draft/commands/types/{update-row.handler.types.js → create-rows.handler.types.js} +1 -1
- package/dist/src/features/draft/commands/types/create-rows.handler.types.js.map +1 -0
- package/dist/src/features/draft/commands/types/patch-rows.handler.types.d.ts +10 -0
- package/dist/src/features/draft/commands/types/{create-row.handler.types.js → patch-rows.handler.types.js} +1 -1
- package/dist/src/features/draft/commands/types/patch-rows.handler.types.js.map +1 -0
- package/dist/src/features/draft/commands/types/update-rows.handler.types.d.ts +10 -0
- package/dist/src/features/draft/commands/types/update-rows.handler.types.js +3 -0
- package/dist/src/features/draft/commands/types/update-rows.handler.types.js.map +1 -0
- package/dist/src/features/draft/draft-api.service.d.ts +9 -0
- package/dist/src/features/draft/draft-api.service.js +12 -0
- package/dist/src/features/draft/draft-api.service.js.map +1 -1
- package/dist/src/features/draft/draft-request-dto/index.d.ts +1 -1
- package/dist/src/features/draft/draft.module.js +2 -0
- package/dist/src/features/draft/draft.module.js.map +1 -1
- package/dist/src/features/draft/draft.transactional.commands.d.ts +0 -3
- package/dist/src/features/draft/draft.transactional.commands.js +0 -12
- package/dist/src/features/draft/draft.transactional.commands.js.map +1 -1
- package/dist/src/features/draft-revision/commands/handlers/__tests__/utils.d.ts +20 -0
- package/dist/src/features/draft-revision/commands/handlers/__tests__/utils.js +98 -0
- package/dist/src/features/draft-revision/commands/handlers/__tests__/utils.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-commit.handler.d.ts +19 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-commit.handler.js +91 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-commit.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-create-rows.handler.d.ts +19 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-create-rows.handler.js +109 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-create-rows.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-create-table.handler.d.ts +16 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-create-table.handler.js +68 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-create-table.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-get-or-create-draft-row.handler.d.ts +19 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-get-or-create-draft-row.handler.js +121 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-get-or-create-draft-row.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-get-or-create-draft-table.handler.d.ts +20 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-get-or-create-draft-table.handler.js +126 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-get-or-create-draft-table.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-recompute-has-changes.handler.d.ts +15 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-recompute-has-changes.handler.js +90 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-recompute-has-changes.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-remove-rows.handler.d.ts +17 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-remove-rows.handler.js +104 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-remove-rows.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-remove-table.handler.d.ts +21 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-remove-table.handler.js +117 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-remove-table.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-rename-rows.handler.d.ts +17 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-rename-rows.handler.js +108 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-rename-rows.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-rename-table.handler.d.ts +14 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-rename-table.handler.js +58 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-rename-table.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-revert.handler.d.ts +14 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-revert.handler.js +52 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-revert.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-update-rows.handler.d.ts +16 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-update-rows.handler.js +96 -0
- package/dist/src/features/draft-revision/commands/handlers/draft-revision-update-rows.handler.js.map +1 -0
- package/dist/src/features/draft-revision/commands/handlers/index.d.ts +25 -0
- package/dist/src/features/draft-revision/commands/handlers/index.js +54 -0
- package/dist/src/features/draft-revision/commands/handlers/index.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-commit.command.d.ts +13 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-commit.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-commit.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-create-rows.command.d.ts +27 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-create-rows.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-create-rows.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-create-table.command.d.ts +13 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-create-table.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-create-table.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-get-or-create-draft-row.command.d.ts +14 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-get-or-create-draft-row.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-get-or-create-draft-row.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-get-or-create-draft-table.command.d.ts +14 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-get-or-create-draft-table.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-get-or-create-draft-table.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-recompute-has-changes.command.d.ts +8 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-recompute-has-changes.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-recompute-has-changes.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-rows.command.d.ts +18 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-rows.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-rows.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-table.command.d.ts +12 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-table.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-table.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-rows.command.d.ts +23 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-rows.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-rows.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-table.command.d.ts +13 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-table.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-table.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-revert.command.d.ts +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-revert.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-revert.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-update-rows.command.d.ts +26 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-update-rows.command.js +10 -0
- package/dist/src/features/draft-revision/commands/impl/draft-revision-update-rows.command.js.map +1 -0
- package/dist/src/features/draft-revision/commands/impl/index.d.ts +12 -0
- package/dist/src/features/draft-revision/commands/impl/index.js +29 -0
- package/dist/src/features/draft-revision/commands/impl/index.js.map +1 -0
- package/dist/src/features/draft-revision/draft-revision-api.service.d.ts +15 -0
- package/dist/src/features/draft-revision/draft-revision-api.service.js +53 -0
- package/dist/src/features/draft-revision/draft-revision-api.service.js.map +1 -0
- package/dist/src/features/draft-revision/draft-revision.constants.d.ts +2 -0
- package/dist/src/features/draft-revision/draft-revision.constants.js +6 -0
- package/dist/src/features/draft-revision/draft-revision.constants.js.map +1 -0
- package/dist/src/features/draft-revision/draft-revision.module.d.ts +2 -0
- package/dist/src/features/draft-revision/draft-revision.module.js +40 -0
- package/dist/src/features/draft-revision/draft-revision.module.js.map +1 -0
- package/dist/src/features/draft-revision/services/draft-revision-internal.service.d.ts +59 -0
- package/dist/src/features/draft-revision/services/draft-revision-internal.service.js +110 -0
- package/dist/src/features/draft-revision/services/draft-revision-internal.service.js.map +1 -0
- package/dist/src/features/draft-revision/services/draft-revision-validation.service.d.ts +10 -0
- package/dist/src/features/draft-revision/services/draft-revision-validation.service.js +49 -0
- package/dist/src/features/draft-revision/services/draft-revision-validation.service.js.map +1 -0
- package/dist/src/features/draft-revision/services/index.d.ts +2 -0
- package/dist/src/features/draft-revision/services/index.js +19 -0
- package/dist/src/features/draft-revision/services/index.js.map +1 -0
- package/dist/src/features/revision/queries/commands/get-children-by-revision.handler.d.ts +4 -3
- package/dist/src/features/revision/queries/commands/get-children-by-revision.handler.js +7 -4
- package/dist/src/features/revision/queries/commands/get-children-by-revision.handler.js.map +1 -1
- package/dist/src/features/revision/queries/commands/get-endpoints-by-revision-id.handler.d.ts +4 -3
- package/dist/src/features/revision/queries/commands/get-endpoints-by-revision-id.handler.js +7 -4
- package/dist/src/features/revision/queries/commands/get-endpoints-by-revision-id.handler.js.map +1 -1
- package/dist/src/features/revision/queries/commands/get-migrations.handler.d.ts +4 -3
- package/dist/src/features/revision/queries/commands/get-migrations.handler.js +7 -4
- package/dist/src/features/revision/queries/commands/get-migrations.handler.js.map +1 -1
- package/dist/src/features/revision/queries/commands/get-revision.handler.d.ts +5 -4
- package/dist/src/features/revision/queries/commands/get-revision.handler.js +7 -4
- package/dist/src/features/revision/queries/commands/get-revision.handler.js.map +1 -1
- package/dist/src/features/revision/queries/commands/get-tables-by-revision-id.handler.d.ts +4 -3
- package/dist/src/features/revision/queries/commands/get-tables-by-revision-id.handler.js +7 -4
- package/dist/src/features/revision/queries/commands/get-tables-by-revision-id.handler.js.map +1 -1
- package/dist/src/features/revision/queries/commands/resolve-branch-by-revision.handler.d.ts +5 -4
- package/dist/src/features/revision/queries/commands/resolve-branch-by-revision.handler.js +7 -4
- package/dist/src/features/revision/queries/commands/resolve-branch-by-revision.handler.js.map +1 -1
- package/dist/src/features/revision/queries/commands/resolve-child-branches-by-revision.handler.d.ts +4 -3
- package/dist/src/features/revision/queries/commands/resolve-child-branches-by-revision.handler.js +7 -4
- package/dist/src/features/revision/queries/commands/resolve-child-branches-by-revision.handler.js.map +1 -1
- package/dist/src/features/revision/queries/commands/resolve-child-by-revision.handler.d.ts +4 -3
- package/dist/src/features/revision/queries/commands/resolve-child-by-revision.handler.js +7 -4
- package/dist/src/features/revision/queries/commands/resolve-child-by-revision.handler.js.map +1 -1
- package/dist/src/features/revision/queries/commands/resolve-parent-by-revision.handler.d.ts +5 -4
- package/dist/src/features/revision/queries/commands/resolve-parent-by-revision.handler.js +7 -4
- package/dist/src/features/revision/queries/commands/resolve-parent-by-revision.handler.js.map +1 -1
- package/dist/src/features/row/queries/handlers/get-row.handler.d.ts +3 -7
- package/dist/src/features/row/queries/handlers/get-row.handler.js +18 -21
- package/dist/src/features/row/queries/handlers/get-row.handler.js.map +1 -1
- package/dist/src/main.js +4 -1
- package/dist/src/main.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/src/features/draft/commands/handlers/create-row.handler.d.ts +0 -24
- package/dist/src/features/draft/commands/handlers/create-row.handler.js.map +0 -1
- package/dist/src/features/draft/commands/handlers/patch-row.handler.js.map +0 -1
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-row.handler.d.ts +0 -23
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-row.handler.js +0 -102
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-row.handler.js.map +0 -1
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.d.ts +0 -21
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.js +0 -144
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.js.map +0 -1
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-table.handler.d.ts +0 -21
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-table.handler.js +0 -101
- package/dist/src/features/draft/commands/handlers/transactional/get-or-create-draft-table.handler.js.map +0 -1
- package/dist/src/features/draft/commands/handlers/update-row.handler.d.ts +0 -26
- package/dist/src/features/draft/commands/handlers/update-row.handler.js +0 -88
- package/dist/src/features/draft/commands/handlers/update-row.handler.js.map +0 -1
- package/dist/src/features/draft/commands/impl/create-row.command.js +0 -10
- package/dist/src/features/draft/commands/impl/create-row.command.js.map +0 -1
- package/dist/src/features/draft/commands/impl/patch-row.command.d.ts +0 -22
- package/dist/src/features/draft/commands/impl/patch-row.command.js +0 -10
- package/dist/src/features/draft/commands/impl/patch-row.command.js.map +0 -1
- package/dist/src/features/draft/commands/impl/transactional/get-or-create-draft-row.command.d.ts +0 -4
- package/dist/src/features/draft/commands/impl/transactional/get-or-create-draft-row.command.js +0 -10
- package/dist/src/features/draft/commands/impl/transactional/get-or-create-draft-row.command.js.map +0 -1
- package/dist/src/features/draft/commands/impl/transactional/get-or-create-draft-rows.command.d.ts +0 -4
- package/dist/src/features/draft/commands/impl/transactional/get-or-create-draft-rows.command.js +0 -10
- package/dist/src/features/draft/commands/impl/transactional/get-or-create-draft-rows.command.js.map +0 -1
- package/dist/src/features/draft/commands/impl/transactional/get-or-create-draft-table.command.d.ts +0 -4
- package/dist/src/features/draft/commands/impl/transactional/get-or-create-draft-table.command.js +0 -10
- package/dist/src/features/draft/commands/impl/transactional/get-or-create-draft-table.command.js.map +0 -1
- package/dist/src/features/draft/commands/impl/update-row.command.d.ts +0 -17
- package/dist/src/features/draft/commands/impl/update-row.command.js +0 -10
- package/dist/src/features/draft/commands/impl/update-row.command.js.map +0 -1
- package/dist/src/features/draft/commands/types/create-row.handler.types.d.ts +0 -5
- package/dist/src/features/draft/commands/types/create-row.handler.types.js.map +0 -1
- package/dist/src/features/draft/commands/types/update-row.handler.types.d.ts +0 -6
- package/dist/src/features/draft/commands/types/update-row.handler.types.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface DraftRevisionGetOrCreateDraftTableCommandData {
|
|
2
|
+
revisionId: string;
|
|
3
|
+
tableId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DraftRevisionGetOrCreateDraftTableCommandReturnType {
|
|
6
|
+
tableVersionId: string;
|
|
7
|
+
previousTableVersionId: string;
|
|
8
|
+
tableCreatedId: string;
|
|
9
|
+
wasCreated: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class DraftRevisionGetOrCreateDraftTableCommand {
|
|
12
|
+
readonly data: DraftRevisionGetOrCreateDraftTableCommandData;
|
|
13
|
+
constructor(data: DraftRevisionGetOrCreateDraftTableCommandData);
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraftRevisionGetOrCreateDraftTableCommand = void 0;
|
|
4
|
+
class DraftRevisionGetOrCreateDraftTableCommand {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.DraftRevisionGetOrCreateDraftTableCommand = DraftRevisionGetOrCreateDraftTableCommand;
|
|
10
|
+
//# sourceMappingURL=draft-revision-get-or-create-draft-table.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-get-or-create-draft-table.command.js","sourceRoot":"","sources":["../../../../../../src/features/draft-revision/commands/impl/draft-revision-get-or-create-draft-table.command.ts"],"names":[],"mappings":";;;AAYA,MAAa,yCAAyC;IACpD,YACkB,IAAmD;QAAnD,SAAI,GAAJ,IAAI,CAA+C;IAClE,CAAC;CACL;AAJD,8FAIC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface DraftRevisionRecomputeHasChangesCommandData {
|
|
2
|
+
revisionId: string;
|
|
3
|
+
tableId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class DraftRevisionRecomputeHasChangesCommand {
|
|
6
|
+
readonly data: DraftRevisionRecomputeHasChangesCommandData;
|
|
7
|
+
constructor(data: DraftRevisionRecomputeHasChangesCommandData);
|
|
8
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraftRevisionRecomputeHasChangesCommand = void 0;
|
|
4
|
+
class DraftRevisionRecomputeHasChangesCommand {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.DraftRevisionRecomputeHasChangesCommand = DraftRevisionRecomputeHasChangesCommand;
|
|
10
|
+
//# sourceMappingURL=draft-revision-recompute-has-changes.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-recompute-has-changes.command.js","sourceRoot":"","sources":["../../../../../../src/features/draft-revision/commands/impl/draft-revision-recompute-has-changes.command.ts"],"names":[],"mappings":";;;AAKA,MAAa,uCAAuC;IAClD,YACkB,IAAiD;QAAjD,SAAI,GAAJ,IAAI,CAA6C;IAChE,CAAC;CACL;AAJD,0FAIC"}
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-rows.command.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface DraftRevisionRemoveRowsCommandData {
|
|
2
|
+
revisionId: string;
|
|
3
|
+
tableId: string;
|
|
4
|
+
rowIds: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface DraftRevisionRemovedRowResult {
|
|
7
|
+
rowVersionId: string;
|
|
8
|
+
deleted: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface DraftRevisionRemoveRowsCommandReturnType {
|
|
11
|
+
tableVersionId: string;
|
|
12
|
+
previousTableVersionId: string;
|
|
13
|
+
removedRows: DraftRevisionRemovedRowResult[];
|
|
14
|
+
}
|
|
15
|
+
export declare class DraftRevisionRemoveRowsCommand {
|
|
16
|
+
readonly data: DraftRevisionRemoveRowsCommandData;
|
|
17
|
+
constructor(data: DraftRevisionRemoveRowsCommandData);
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraftRevisionRemoveRowsCommand = void 0;
|
|
4
|
+
class DraftRevisionRemoveRowsCommand {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.DraftRevisionRemoveRowsCommand = DraftRevisionRemoveRowsCommand;
|
|
10
|
+
//# sourceMappingURL=draft-revision-remove-rows.command.js.map
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-rows.command.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-remove-rows.command.js","sourceRoot":"","sources":["../../../../../../src/features/draft-revision/commands/impl/draft-revision-remove-rows.command.ts"],"names":[],"mappings":";;;AAiBA,MAAa,8BAA8B;IACzC,YAA4B,IAAwC;QAAxC,SAAI,GAAJ,IAAI,CAAoC;IAAG,CAAC;CACzE;AAFD,wEAEC"}
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-table.command.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface DraftRevisionRemoveTableCommandData {
|
|
2
|
+
revisionId: string;
|
|
3
|
+
tableId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DraftRevisionRemoveTableCommandReturnType {
|
|
6
|
+
tableVersionId: string;
|
|
7
|
+
deleted: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class DraftRevisionRemoveTableCommand {
|
|
10
|
+
readonly data: DraftRevisionRemoveTableCommandData;
|
|
11
|
+
constructor(data: DraftRevisionRemoveTableCommandData);
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraftRevisionRemoveTableCommand = void 0;
|
|
4
|
+
class DraftRevisionRemoveTableCommand {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.DraftRevisionRemoveTableCommand = DraftRevisionRemoveTableCommand;
|
|
10
|
+
//# sourceMappingURL=draft-revision-remove-table.command.js.map
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-remove-table.command.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-remove-table.command.js","sourceRoot":"","sources":["../../../../../../src/features/draft-revision/commands/impl/draft-revision-remove-table.command.ts"],"names":[],"mappings":";;;AAUA,MAAa,+BAA+B;IAC1C,YAA4B,IAAyC;QAAzC,SAAI,GAAJ,IAAI,CAAqC;IAAG,CAAC;CAC1E;AAFD,0EAEC"}
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-rows.command.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface DraftRevisionRenameRowItem {
|
|
2
|
+
rowId: string;
|
|
3
|
+
nextRowId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DraftRevisionRenameRowsCommandData {
|
|
6
|
+
revisionId: string;
|
|
7
|
+
tableId: string;
|
|
8
|
+
renames: DraftRevisionRenameRowItem[];
|
|
9
|
+
}
|
|
10
|
+
export interface DraftRevisionRenamedRowResult {
|
|
11
|
+
rowVersionId: string;
|
|
12
|
+
previousRowVersionId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DraftRevisionRenameRowsCommandReturnType {
|
|
15
|
+
tableVersionId: string;
|
|
16
|
+
previousTableVersionId: string;
|
|
17
|
+
tableCreatedId: string;
|
|
18
|
+
renamedRows: DraftRevisionRenamedRowResult[];
|
|
19
|
+
}
|
|
20
|
+
export declare class DraftRevisionRenameRowsCommand {
|
|
21
|
+
readonly data: DraftRevisionRenameRowsCommandData;
|
|
22
|
+
constructor(data: DraftRevisionRenameRowsCommandData);
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraftRevisionRenameRowsCommand = void 0;
|
|
4
|
+
class DraftRevisionRenameRowsCommand {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.DraftRevisionRenameRowsCommand = DraftRevisionRenameRowsCommand;
|
|
10
|
+
//# sourceMappingURL=draft-revision-rename-rows.command.js.map
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-rows.command.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-rename-rows.command.js","sourceRoot":"","sources":["../../../../../../src/features/draft-revision/commands/impl/draft-revision-rename-rows.command.ts"],"names":[],"mappings":";;;AAuBA,MAAa,8BAA8B;IACzC,YAA4B,IAAwC;QAAxC,SAAI,GAAJ,IAAI,CAAoC;IAAG,CAAC;CACzE;AAFD,wEAEC"}
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-table.command.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface DraftRevisionRenameTableCommandData {
|
|
2
|
+
revisionId: string;
|
|
3
|
+
tableId: string;
|
|
4
|
+
nextTableId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DraftRevisionRenameTableCommandReturnType {
|
|
7
|
+
tableVersionId: string;
|
|
8
|
+
previousTableVersionId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class DraftRevisionRenameTableCommand {
|
|
11
|
+
readonly data: DraftRevisionRenameTableCommandData;
|
|
12
|
+
constructor(data: DraftRevisionRenameTableCommandData);
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraftRevisionRenameTableCommand = void 0;
|
|
4
|
+
class DraftRevisionRenameTableCommand {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.DraftRevisionRenameTableCommand = DraftRevisionRenameTableCommand;
|
|
10
|
+
//# sourceMappingURL=draft-revision-rename-table.command.js.map
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-rename-table.command.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-rename-table.command.js","sourceRoot":"","sources":["../../../../../../src/features/draft-revision/commands/impl/draft-revision-rename-table.command.ts"],"names":[],"mappings":";;;AAWA,MAAa,+BAA+B;IAC1C,YAA4B,IAAyC;QAAzC,SAAI,GAAJ,IAAI,CAAqC;IAAG,CAAC;CAC1E;AAFD,0EAEC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DraftRevisionRevertCommandData {
|
|
2
|
+
branchId: string;
|
|
3
|
+
}
|
|
4
|
+
export interface DraftRevisionRevertCommandReturnType {
|
|
5
|
+
draftRevisionId: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class DraftRevisionRevertCommand {
|
|
8
|
+
readonly data: DraftRevisionRevertCommandData;
|
|
9
|
+
constructor(data: DraftRevisionRevertCommandData);
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraftRevisionRevertCommand = void 0;
|
|
4
|
+
class DraftRevisionRevertCommand {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.DraftRevisionRevertCommand = DraftRevisionRevertCommand;
|
|
10
|
+
//# sourceMappingURL=draft-revision-revert.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-revert.command.js","sourceRoot":"","sources":["../../../../../../src/features/draft-revision/commands/impl/draft-revision-revert.command.ts"],"names":[],"mappings":";;;AAQA,MAAa,0BAA0B;IACrC,YAA4B,IAAoC;QAApC,SAAI,GAAJ,IAAI,CAAgC;IAAG,CAAC;CACrE;AAFD,gEAEC"}
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-update-rows.command.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Prisma } from '../../../../__generated__/client';
|
|
2
|
+
export interface DraftRevisionUpdateRowsRowData {
|
|
3
|
+
rowId: string;
|
|
4
|
+
data: Prisma.InputJsonValue;
|
|
5
|
+
schemaHash?: string;
|
|
6
|
+
meta?: Prisma.InputJsonValue;
|
|
7
|
+
publishedAt?: Date;
|
|
8
|
+
}
|
|
9
|
+
export interface DraftRevisionUpdateRowsCommandData {
|
|
10
|
+
revisionId: string;
|
|
11
|
+
tableId: string;
|
|
12
|
+
rows: DraftRevisionUpdateRowsRowData[];
|
|
13
|
+
}
|
|
14
|
+
export interface DraftRevisionUpdatedRowResult {
|
|
15
|
+
rowVersionId: string;
|
|
16
|
+
previousRowVersionId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DraftRevisionUpdateRowsCommandReturnType {
|
|
19
|
+
tableVersionId: string;
|
|
20
|
+
previousTableVersionId: string;
|
|
21
|
+
updatedRows: DraftRevisionUpdatedRowResult[];
|
|
22
|
+
}
|
|
23
|
+
export declare class DraftRevisionUpdateRowsCommand {
|
|
24
|
+
readonly data: DraftRevisionUpdateRowsCommandData;
|
|
25
|
+
constructor(data: DraftRevisionUpdateRowsCommandData);
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DraftRevisionUpdateRowsCommand = void 0;
|
|
4
|
+
class DraftRevisionUpdateRowsCommand {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.data = data;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.DraftRevisionUpdateRowsCommand = DraftRevisionUpdateRowsCommand;
|
|
10
|
+
//# sourceMappingURL=draft-revision-update-rows.command.js.map
|
package/dist/src/features/draft-revision/commands/impl/draft-revision-update-rows.command.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-update-rows.command.js","sourceRoot":"","sources":["../../../../../../src/features/draft-revision/commands/impl/draft-revision-update-rows.command.ts"],"names":[],"mappings":";;;AA2BA,MAAa,8BAA8B;IACzC,YAA4B,IAAwC;QAAxC,SAAI,GAAJ,IAAI,CAAoC;IAAG,CAAC;CACzE;AAFD,wEAEC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-create-table.command';
|
|
2
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-remove-table.command';
|
|
3
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-rename-table.command';
|
|
4
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-get-or-create-draft-table.command';
|
|
5
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-create-rows.command';
|
|
6
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-update-rows.command';
|
|
7
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-rename-rows.command';
|
|
8
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-remove-rows.command';
|
|
9
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-get-or-create-draft-row.command';
|
|
10
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-commit.command';
|
|
11
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-revert.command';
|
|
12
|
+
export * from '../../../../features/draft-revision/commands/impl/draft-revision-recompute-has-changes.command';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./draft-revision-create-table.command"), exports);
|
|
18
|
+
__exportStar(require("./draft-revision-remove-table.command"), exports);
|
|
19
|
+
__exportStar(require("./draft-revision-rename-table.command"), exports);
|
|
20
|
+
__exportStar(require("./draft-revision-get-or-create-draft-table.command"), exports);
|
|
21
|
+
__exportStar(require("./draft-revision-create-rows.command"), exports);
|
|
22
|
+
__exportStar(require("./draft-revision-update-rows.command"), exports);
|
|
23
|
+
__exportStar(require("./draft-revision-rename-rows.command"), exports);
|
|
24
|
+
__exportStar(require("./draft-revision-remove-rows.command"), exports);
|
|
25
|
+
__exportStar(require("./draft-revision-get-or-create-draft-row.command"), exports);
|
|
26
|
+
__exportStar(require("./draft-revision-commit.command"), exports);
|
|
27
|
+
__exportStar(require("./draft-revision-revert.command"), exports);
|
|
28
|
+
__exportStar(require("./draft-revision-recompute-has-changes.command"), exports);
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/features/draft-revision/commands/impl/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wEAA8F;AAC9F,wEAA8F;AAC9F,wEAA8F;AAC9F,qFAA2G;AAC3G,uEAA6F;AAC7F,uEAA6F;AAC7F,uEAA6F;AAC7F,uEAA6F;AAC7F,mFAAyG;AACzG,kEAAwF;AACxF,kEAAwF;AACxF,iFAAuG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CommandBus } from '@nestjs/cqrs';
|
|
2
|
+
import { DraftRevisionCommitCommandData, DraftRevisionCommitCommandReturnType, DraftRevisionCreateRowsCommandData, DraftRevisionCreateRowsCommandReturnType, DraftRevisionCreateTableCommandData, DraftRevisionCreateTableCommandReturnType, DraftRevisionRemoveRowsCommandData, DraftRevisionRemoveRowsCommandReturnType, DraftRevisionRemoveTableCommandData, DraftRevisionRemoveTableCommandReturnType, DraftRevisionRenameRowsCommandData, DraftRevisionRenameRowsCommandReturnType, DraftRevisionRenameTableCommandData, DraftRevisionRenameTableCommandReturnType, DraftRevisionRevertCommandData, DraftRevisionRevertCommandReturnType, DraftRevisionUpdateRowsCommandData, DraftRevisionUpdateRowsCommandReturnType } from '../../features/draft-revision/commands/impl';
|
|
3
|
+
export declare class DraftRevisionApiService {
|
|
4
|
+
private readonly commandBus;
|
|
5
|
+
constructor(commandBus: CommandBus);
|
|
6
|
+
createTable(data: DraftRevisionCreateTableCommandData): Promise<DraftRevisionCreateTableCommandReturnType>;
|
|
7
|
+
removeTable(data: DraftRevisionRemoveTableCommandData): Promise<DraftRevisionRemoveTableCommandReturnType>;
|
|
8
|
+
renameTable(data: DraftRevisionRenameTableCommandData): Promise<DraftRevisionRenameTableCommandReturnType>;
|
|
9
|
+
createRows(data: DraftRevisionCreateRowsCommandData): Promise<DraftRevisionCreateRowsCommandReturnType>;
|
|
10
|
+
updateRows(data: DraftRevisionUpdateRowsCommandData): Promise<DraftRevisionUpdateRowsCommandReturnType>;
|
|
11
|
+
renameRows(data: DraftRevisionRenameRowsCommandData): Promise<DraftRevisionRenameRowsCommandReturnType>;
|
|
12
|
+
removeRows(data: DraftRevisionRemoveRowsCommandData): Promise<DraftRevisionRemoveRowsCommandReturnType>;
|
|
13
|
+
commit(data: DraftRevisionCommitCommandData): Promise<DraftRevisionCommitCommandReturnType>;
|
|
14
|
+
revert(data: DraftRevisionRevertCommandData): Promise<DraftRevisionRevertCommandReturnType>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DraftRevisionApiService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const cqrs_1 = require("@nestjs/cqrs");
|
|
15
|
+
const impl_1 = require("./commands/impl");
|
|
16
|
+
let DraftRevisionApiService = class DraftRevisionApiService {
|
|
17
|
+
constructor(commandBus) {
|
|
18
|
+
this.commandBus = commandBus;
|
|
19
|
+
}
|
|
20
|
+
createTable(data) {
|
|
21
|
+
return this.commandBus.execute(new impl_1.DraftRevisionCreateTableCommand(data));
|
|
22
|
+
}
|
|
23
|
+
removeTable(data) {
|
|
24
|
+
return this.commandBus.execute(new impl_1.DraftRevisionRemoveTableCommand(data));
|
|
25
|
+
}
|
|
26
|
+
renameTable(data) {
|
|
27
|
+
return this.commandBus.execute(new impl_1.DraftRevisionRenameTableCommand(data));
|
|
28
|
+
}
|
|
29
|
+
createRows(data) {
|
|
30
|
+
return this.commandBus.execute(new impl_1.DraftRevisionCreateRowsCommand(data));
|
|
31
|
+
}
|
|
32
|
+
updateRows(data) {
|
|
33
|
+
return this.commandBus.execute(new impl_1.DraftRevisionUpdateRowsCommand(data));
|
|
34
|
+
}
|
|
35
|
+
renameRows(data) {
|
|
36
|
+
return this.commandBus.execute(new impl_1.DraftRevisionRenameRowsCommand(data));
|
|
37
|
+
}
|
|
38
|
+
removeRows(data) {
|
|
39
|
+
return this.commandBus.execute(new impl_1.DraftRevisionRemoveRowsCommand(data));
|
|
40
|
+
}
|
|
41
|
+
commit(data) {
|
|
42
|
+
return this.commandBus.execute(new impl_1.DraftRevisionCommitCommand(data));
|
|
43
|
+
}
|
|
44
|
+
revert(data) {
|
|
45
|
+
return this.commandBus.execute(new impl_1.DraftRevisionRevertCommand(data));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
exports.DraftRevisionApiService = DraftRevisionApiService;
|
|
49
|
+
exports.DraftRevisionApiService = DraftRevisionApiService = __decorate([
|
|
50
|
+
(0, common_1.Injectable)(),
|
|
51
|
+
__metadata("design:paramtypes", [cqrs_1.CommandBus])
|
|
52
|
+
], DraftRevisionApiService);
|
|
53
|
+
//# sourceMappingURL=draft-revision-api.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-api.service.js","sourceRoot":"","sources":["../../../../src/features/draft-revision/draft-revision-api.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uCAA0C;AAC1C,0CA4BmD;AAG5C,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAEhD,WAAW,CAChB,IAAyC;QAEzC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,sCAA+B,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5E,CAAC;IAEM,WAAW,CAChB,IAAyC;QAEzC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,sCAA+B,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5E,CAAC;IAEM,WAAW,CAChB,IAAyC;QAEzC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,sCAA+B,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5E,CAAC;IAEM,UAAU,CACf,IAAwC;QAExC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,qCAA8B,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,CAAC;IAEM,UAAU,CACf,IAAwC;QAExC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,qCAA8B,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,CAAC;IAEM,UAAU,CACf,IAAwC;QAExC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,qCAA8B,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,CAAC;IAEM,UAAU,CACf,IAAwC;QAExC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,qCAA8B,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,CAAC;IAEM,MAAM,CACX,IAAoC;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,iCAA0B,CAAC,IAAI,CAAC,CAAC,CAAC;IACvE,CAAC;IAEM,MAAM,CACX,IAAoC;QAEpC,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,iCAA0B,CAAC,IAAI,CAAC,CAAC,CAAC;IACvE,CAAC;CACF,CAAA;AAxDY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAE8B,iBAAU;GADxC,uBAAuB,CAwDnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision.constants.js","sourceRoot":"","sources":["../../../../src/features/draft-revision/draft-revision.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG,CAAC,CAAC;AAClB,QAAA,aAAa,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DraftRevisionModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const cqrs_1 = require("@nestjs/cqrs");
|
|
12
|
+
const branch_module_1 = require("../branch/branch.module");
|
|
13
|
+
const handlers_1 = require("./commands/handlers");
|
|
14
|
+
const draft_revision_api_service_1 = require("./draft-revision-api.service");
|
|
15
|
+
const services_1 = require("./services");
|
|
16
|
+
const revision_module_1 = require("../revision/revision.module");
|
|
17
|
+
const share_module_1 = require("../share/share.module");
|
|
18
|
+
const database_module_1 = require("../../infrastructure/database/database.module");
|
|
19
|
+
let DraftRevisionModule = class DraftRevisionModule {
|
|
20
|
+
};
|
|
21
|
+
exports.DraftRevisionModule = DraftRevisionModule;
|
|
22
|
+
exports.DraftRevisionModule = DraftRevisionModule = __decorate([
|
|
23
|
+
(0, common_1.Module)({
|
|
24
|
+
imports: [
|
|
25
|
+
database_module_1.DatabaseModule,
|
|
26
|
+
cqrs_1.CqrsModule,
|
|
27
|
+
share_module_1.ShareModule,
|
|
28
|
+
revision_module_1.RevisionModule,
|
|
29
|
+
branch_module_1.BranchModule,
|
|
30
|
+
],
|
|
31
|
+
providers: [
|
|
32
|
+
draft_revision_api_service_1.DraftRevisionApiService,
|
|
33
|
+
services_1.DraftRevisionInternalService,
|
|
34
|
+
services_1.DraftRevisionValidationService,
|
|
35
|
+
...handlers_1.DRAFT_REVISION_COMMANDS_HANDLERS,
|
|
36
|
+
],
|
|
37
|
+
exports: [draft_revision_api_service_1.DraftRevisionApiService, services_1.DraftRevisionInternalService],
|
|
38
|
+
})
|
|
39
|
+
], DraftRevisionModule);
|
|
40
|
+
//# sourceMappingURL=draft-revision.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision.module.js","sourceRoot":"","sources":["../../../../src/features/draft-revision/draft-revision.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uCAA0C;AAC1C,2DAAiE;AACjE,kDAAiG;AACjG,6EAAiG;AACjG,yCAG8C;AAC9C,iEAAuE;AACvE,wDAA8D;AAC9D,mFAA6E;AAkBtE,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAhB/B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,gCAAc;YACd,iBAAU;YACV,0BAAW;YACX,gCAAc;YACd,4BAAY;SACb;QACD,SAAS,EAAE;YACT,oDAAuB;YACvB,uCAA4B;YAC5B,yCAA8B;YAC9B,GAAG,2CAAgC;SACpC;QACD,OAAO,EAAE,CAAC,oDAAuB,EAAE,uCAA4B,CAAC;KACjE,CAAC;GACW,mBAAmB,CAAG"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CommandBus } from '@nestjs/cqrs';
|
|
2
|
+
import { BranchApiService } from '../../../features/branch/branch-api.service';
|
|
3
|
+
import { DraftRevisionGetOrCreateDraftRowCommandData, DraftRevisionGetOrCreateDraftRowCommandReturnType, DraftRevisionGetOrCreateDraftTableCommandData, DraftRevisionGetOrCreateDraftTableCommandReturnType } from '../../../features/draft-revision/commands/impl';
|
|
4
|
+
import { RevisionsApiService } from '../../../features/revision/revisions-api.service';
|
|
5
|
+
import { TransactionPrismaService } from '../../../infrastructure/database/transaction-prisma.service';
|
|
6
|
+
export declare class DraftRevisionInternalService {
|
|
7
|
+
private readonly commandBus;
|
|
8
|
+
private readonly transactionService;
|
|
9
|
+
private readonly revisionsApiService;
|
|
10
|
+
private readonly branchApiService;
|
|
11
|
+
constructor(commandBus: CommandBus, transactionService: TransactionPrismaService, revisionsApiService: RevisionsApiService, branchApiService: BranchApiService);
|
|
12
|
+
private get transaction();
|
|
13
|
+
getOrCreateDraftTable(data: DraftRevisionGetOrCreateDraftTableCommandData): Promise<DraftRevisionGetOrCreateDraftTableCommandReturnType>;
|
|
14
|
+
getOrCreateDraftRow(data: DraftRevisionGetOrCreateDraftRowCommandData): Promise<DraftRevisionGetOrCreateDraftRowCommandReturnType>;
|
|
15
|
+
markRevisionAsChanged(revisionId: string): Promise<void>;
|
|
16
|
+
recomputeHasChanges(revisionId: string, tableId: string): Promise<void>;
|
|
17
|
+
findRevisionOrThrow(revisionId: string): Promise<{
|
|
18
|
+
id: string;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
sequence: number;
|
|
21
|
+
comment: string;
|
|
22
|
+
isHead: boolean;
|
|
23
|
+
isDraft: boolean;
|
|
24
|
+
isStart: boolean;
|
|
25
|
+
hasChanges: boolean;
|
|
26
|
+
branchId: string;
|
|
27
|
+
parentId: string | null;
|
|
28
|
+
}>;
|
|
29
|
+
findHeadRevisionOrThrow(branchId: string): Promise<{
|
|
30
|
+
id: string;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
sequence: number;
|
|
33
|
+
comment: string;
|
|
34
|
+
isHead: boolean;
|
|
35
|
+
isDraft: boolean;
|
|
36
|
+
isStart: boolean;
|
|
37
|
+
hasChanges: boolean;
|
|
38
|
+
branchId: string;
|
|
39
|
+
parentId: string | null;
|
|
40
|
+
}>;
|
|
41
|
+
findDraftRevisionOrThrow(branchId: string): Promise<{
|
|
42
|
+
id: string;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
sequence: number;
|
|
45
|
+
comment: string;
|
|
46
|
+
isHead: boolean;
|
|
47
|
+
isDraft: boolean;
|
|
48
|
+
isStart: boolean;
|
|
49
|
+
hasChanges: boolean;
|
|
50
|
+
branchId: string;
|
|
51
|
+
parentId: string | null;
|
|
52
|
+
}>;
|
|
53
|
+
getRevisionTableVersionIds(revisionId: string): Promise<{
|
|
54
|
+
versionId: string;
|
|
55
|
+
}[]>;
|
|
56
|
+
findParentRevisionIdOrThrow(revisionId: string): Promise<string>;
|
|
57
|
+
ensureTableNotExists(revisionId: string, tableId: string): Promise<void>;
|
|
58
|
+
private tableExistsInRevision;
|
|
59
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DraftRevisionInternalService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const cqrs_1 = require("@nestjs/cqrs");
|
|
15
|
+
const branch_api_service_1 = require("../../branch/branch-api.service");
|
|
16
|
+
const impl_1 = require("../commands/impl");
|
|
17
|
+
const revisions_api_service_1 = require("../../revision/revisions-api.service");
|
|
18
|
+
const transaction_prisma_service_1 = require("../../../infrastructure/database/transaction-prisma.service");
|
|
19
|
+
let DraftRevisionInternalService = class DraftRevisionInternalService {
|
|
20
|
+
constructor(commandBus, transactionService, revisionsApiService, branchApiService) {
|
|
21
|
+
this.commandBus = commandBus;
|
|
22
|
+
this.transactionService = transactionService;
|
|
23
|
+
this.revisionsApiService = revisionsApiService;
|
|
24
|
+
this.branchApiService = branchApiService;
|
|
25
|
+
}
|
|
26
|
+
get transaction() {
|
|
27
|
+
return this.transactionService.getTransaction();
|
|
28
|
+
}
|
|
29
|
+
getOrCreateDraftTable(data) {
|
|
30
|
+
return this.commandBus.execute(new impl_1.DraftRevisionGetOrCreateDraftTableCommand(data));
|
|
31
|
+
}
|
|
32
|
+
getOrCreateDraftRow(data) {
|
|
33
|
+
return this.commandBus.execute(new impl_1.DraftRevisionGetOrCreateDraftRowCommand(data));
|
|
34
|
+
}
|
|
35
|
+
async markRevisionAsChanged(revisionId) {
|
|
36
|
+
await this.transaction.revision.updateMany({
|
|
37
|
+
where: { id: revisionId, hasChanges: false },
|
|
38
|
+
data: { hasChanges: true },
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async recomputeHasChanges(revisionId, tableId) {
|
|
42
|
+
await this.commandBus.execute(new impl_1.DraftRevisionRecomputeHasChangesCommand({ revisionId, tableId }));
|
|
43
|
+
}
|
|
44
|
+
async findRevisionOrThrow(revisionId) {
|
|
45
|
+
try {
|
|
46
|
+
return await this.revisionsApiService.revision({ revisionId });
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
throw new common_1.BadRequestException('Revision not found');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
async findHeadRevisionOrThrow(branchId) {
|
|
53
|
+
try {
|
|
54
|
+
return await this.branchApiService.getHeadRevision(branchId);
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
throw new common_1.BadRequestException('Head revision not found');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
async findDraftRevisionOrThrow(branchId) {
|
|
61
|
+
try {
|
|
62
|
+
return await this.branchApiService.getDraftRevision(branchId);
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
throw new common_1.BadRequestException('Draft revision not found');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async getRevisionTableVersionIds(revisionId) {
|
|
69
|
+
return this.transaction.revision
|
|
70
|
+
.findUniqueOrThrow({ where: { id: revisionId } })
|
|
71
|
+
.tables({ select: { versionId: true } });
|
|
72
|
+
}
|
|
73
|
+
async findParentRevisionIdOrThrow(revisionId) {
|
|
74
|
+
const revision = await this.transaction.revision.findUniqueOrThrow({
|
|
75
|
+
where: { id: revisionId },
|
|
76
|
+
select: { parentId: true },
|
|
77
|
+
});
|
|
78
|
+
if (!revision.parentId) {
|
|
79
|
+
throw new common_1.BadRequestException('Parent revision not found');
|
|
80
|
+
}
|
|
81
|
+
return revision.parentId;
|
|
82
|
+
}
|
|
83
|
+
async ensureTableNotExists(revisionId, tableId) {
|
|
84
|
+
const exists = await this.tableExistsInRevision(revisionId, tableId);
|
|
85
|
+
if (exists) {
|
|
86
|
+
throw new common_1.BadRequestException('A table with this name already exists in the revision');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
async tableExistsInRevision(revisionId, tableId) {
|
|
90
|
+
const table = await this.transaction.table.findFirst({
|
|
91
|
+
where: {
|
|
92
|
+
id: tableId,
|
|
93
|
+
revisions: {
|
|
94
|
+
some: { id: revisionId },
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
select: { versionId: true },
|
|
98
|
+
});
|
|
99
|
+
return table !== null;
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
exports.DraftRevisionInternalService = DraftRevisionInternalService;
|
|
103
|
+
exports.DraftRevisionInternalService = DraftRevisionInternalService = __decorate([
|
|
104
|
+
(0, common_1.Injectable)(),
|
|
105
|
+
__metadata("design:paramtypes", [cqrs_1.CommandBus,
|
|
106
|
+
transaction_prisma_service_1.TransactionPrismaService,
|
|
107
|
+
revisions_api_service_1.RevisionsApiService,
|
|
108
|
+
branch_api_service_1.BranchApiService])
|
|
109
|
+
], DraftRevisionInternalService);
|
|
110
|
+
//# sourceMappingURL=draft-revision-internal.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draft-revision-internal.service.js","sourceRoot":"","sources":["../../../../../src/features/draft-revision/services/draft-revision-internal.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiE;AACjE,uCAA0C;AAC1C,wEAA0E;AAC1E,2CAQmD;AACnD,gFAAkF;AAClF,4GAAkG;AAG3F,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACvC,YACmB,UAAsB,EACtB,kBAA4C,EAC5C,mBAAwC,EACxC,gBAAkC;QAHlC,eAAU,GAAV,UAAU,CAAY;QACtB,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAClD,CAAC;IAEJ,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,kBAAkB,CAAC,cAAc,EAAE,CAAC;IAClD,CAAC;IAEM,qBAAqB,CAC1B,IAAmD;QAEnD,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAC5B,IAAI,gDAAyC,CAAC,IAAI,CAAC,CACpD,CAAC;IACJ,CAAC;IAEM,mBAAmB,CACxB,IAAiD;QAEjD,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAC5B,IAAI,8CAAuC,CAAC,IAAI,CAAC,CAClD,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAAC,UAAkB;QACnD,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC;YACzC,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE;YAC5C,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SAC3B,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAC9B,UAAkB,EAClB,OAAe;QAEf,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAC3B,IAAI,8CAAuC,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CACrE,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAAC,UAAkB;QACjD,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;QACjE,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,4BAAmB,CAAC,oBAAoB,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,QAAgB;QACnD,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAC/D,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,4BAAmB,CAAC,yBAAyB,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,wBAAwB,CAAC,QAAgB;QACpD,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAChE,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,4BAAmB,CAAC,0BAA0B,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,0BAA0B,CACrC,UAAkB;QAElB,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ;aAC7B,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,CAAC;aAChD,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,2BAA2B,CACtC,UAAkB;QAElB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YACjE,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE;YACzB,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC3B,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACvB,MAAM,IAAI,4BAAmB,CAAC,2BAA2B,CAAC,CAAC;QAC7D,CAAC;QAED,OAAO,QAAQ,CAAC,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAC/B,UAAkB,EAClB,OAAe;QAEf,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACrE,IAAI,MAAM,EAAE,CAAC;YACX,MAAM,IAAI,4BAAmB,CAC3B,uDAAuD,CACxD,CAAC;QACJ,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,qBAAqB,CACjC,UAAkB,EAClB,OAAe;QAEf,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;YACnD,KAAK,EAAE;gBACL,EAAE,EAAE,OAAO;gBACX,SAAS,EAAE;oBACT,IAAI,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE;iBACzB;aACF;YACD,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;SAC5B,CAAC,CAAC;QACH,OAAO,KAAK,KAAK,IAAI,CAAC;IACxB,CAAC;CACF,CAAA;AAtHY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;qCAGoB,iBAAU;QACF,qDAAwB;QACvB,2CAAmB;QACtB,qCAAgB;GAL1C,4BAA4B,CAsHxC"}
|