@revisium/core 2.2.0 → 2.3.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 +16 -7
- package/dist/src/api/graphql-api/branch/model/branch.model.js +2 -1
- package/dist/src/api/graphql-api/branch/model/branch.model.js.map +1 -1
- package/dist/src/api/graphql-api/branch/parent-branch.resolver.d.ts +15 -2
- package/dist/src/api/graphql-api/branch/parent-branch.resolver.js +6 -4
- package/dist/src/api/graphql-api/branch/parent-branch.resolver.js.map +1 -1
- package/dist/src/api/graphql-api/draft/input/create-row.input.js +2 -2
- package/dist/src/api/graphql-api/draft/input/create-row.input.js.map +1 -1
- package/dist/src/api/graphql-api/draft/input/create-table.input.js +2 -2
- package/dist/src/api/graphql-api/draft/input/create-table.input.js.map +1 -1
- package/dist/src/api/graphql-api/draft/input/patch-row.input.js +2 -2
- package/dist/src/api/graphql-api/draft/input/patch-row.input.js.map +1 -1
- package/dist/src/api/graphql-api/draft/input/update-row.input.js +2 -2
- package/dist/src/api/graphql-api/draft/input/update-row.input.js.map +1 -1
- package/dist/src/api/graphql-api/draft/input/update-table.input.js +2 -2
- package/dist/src/api/graphql-api/draft/input/update-table.input.js.map +1 -1
- package/dist/src/api/graphql-api/endpoint/model/endpoint.model.js +2 -1
- package/dist/src/api/graphql-api/endpoint/model/endpoint.model.js.map +1 -1
- package/dist/src/api/graphql-api/graphql-api.module.js +2 -2
- package/dist/src/api/graphql-api/graphql-api.module.js.map +1 -1
- package/dist/src/api/graphql-api/project/model/project.model.js +2 -1
- package/dist/src/api/graphql-api/project/model/project.model.js.map +1 -1
- package/dist/src/api/graphql-api/revision/child-branch.resolver.d.ts +15 -2
- package/dist/src/api/graphql-api/revision/child-branch.resolver.js +6 -4
- package/dist/src/api/graphql-api/revision/child-branch.resolver.js.map +1 -1
- package/dist/src/api/graphql-api/revision/model/revision.model.js +2 -1
- package/dist/src/api/graphql-api/revision/model/revision.model.js.map +1 -1
- package/dist/src/api/graphql-api/revision/revision.resolver.d.ts +15 -2
- package/dist/src/api/graphql-api/revision/revision.resolver.js +6 -4
- package/dist/src/api/graphql-api/revision/revision.resolver.js.map +1 -1
- package/dist/src/api/graphql-api/row/inputs/get-rows.input.js +5 -5
- package/dist/src/api/graphql-api/row/inputs/get-rows.input.js.map +1 -1
- package/dist/src/api/graphql-api/row/model/row.model.js +5 -5
- package/dist/src/api/graphql-api/row/model/row.model.js.map +1 -1
- package/dist/src/api/graphql-api/row/row.resolver.js +7 -3
- package/dist/src/api/graphql-api/row/row.resolver.js.map +1 -1
- package/dist/src/api/graphql-api/table/model/table.model.js +4 -4
- package/dist/src/api/graphql-api/table/model/table.model.js.map +1 -1
- package/dist/src/api/rest-api/revision/revision-by-id.controller.js +1 -1
- package/dist/src/api/rest-api/revision/revision-by-id.controller.js.map +1 -1
- package/dist/src/api/rest-api/row/row-by-id.controller.d.ts +2 -3
- package/dist/src/api/rest-api/row/row-by-id.controller.js +2 -4
- package/dist/src/api/rest-api/row/row-by-id.controller.js.map +1 -1
- package/dist/src/core/core.module.js +2 -0
- package/dist/src/core/core.module.js.map +1 -1
- package/dist/src/features/auth/auth.module.js +3 -1
- package/dist/src/features/auth/auth.module.js.map +1 -1
- package/dist/src/features/auth/casl-ability.factory.d.ts +3 -1
- package/dist/src/features/auth/casl-ability.factory.js +6 -3
- package/dist/src/features/auth/casl-ability.factory.js.map +1 -1
- package/dist/src/features/auth/commands/auth-api.service.d.ts +11 -0
- package/dist/src/features/auth/commands/auth-api.service.js +44 -0
- package/dist/src/features/auth/commands/auth-api.service.js.map +1 -0
- package/dist/src/features/auth/commands/handlers/check-organization-permission.handler.d.ts +2 -2
- package/dist/src/features/auth/commands/handlers/check-organization-permission.handler.js.map +1 -1
- package/dist/src/features/auth/commands/handlers/check-project-permission.handler.d.ts +2 -2
- package/dist/src/features/auth/commands/handlers/check-project-permission.handler.js.map +1 -1
- package/dist/src/features/auth/commands/impl/check-organization-permission.command.d.ts +2 -0
- package/dist/src/features/auth/commands/impl/check-project-permission.command.d.ts +2 -0
- package/dist/src/features/auth/commands/impl/check-system-permission.command.d.ts +1 -0
- package/dist/src/features/auth/guards/base-persmission.guard.d.ts +4 -2
- package/dist/src/features/auth/guards/base-persmission.guard.js +6 -4
- package/dist/src/features/auth/guards/base-persmission.guard.js.map +1 -1
- package/dist/src/features/auth/guards/organization.guard.d.ts +2 -3
- package/dist/src/features/auth/guards/organization.guard.js +2 -3
- package/dist/src/features/auth/guards/organization.guard.js.map +1 -1
- package/dist/src/features/auth/guards/project.guard.d.ts +29 -3
- package/dist/src/features/auth/guards/project.guard.js +11 -8
- package/dist/src/features/auth/guards/project.guard.js.map +1 -1
- package/dist/src/features/auth/guards/system.guard.d.ts +1 -2
- package/dist/src/features/auth/guards/system.guard.js +2 -3
- package/dist/src/features/auth/guards/system.guard.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/__tests__/utils.d.ts +2 -0
- 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 +2 -1
- package/dist/src/features/draft/commands/handlers/api-base-row.handler.js +2 -1
- package/dist/src/features/draft/commands/handlers/api-base-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-create-revision.handler.d.ts +16 -4
- package/dist/src/features/draft/commands/handlers/api-create-revision.handler.js +6 -6
- package/dist/src/features/draft/commands/handlers/api-create-revision.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-create-row.handler.js +1 -0
- package/dist/src/features/draft/commands/handlers/api-create-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-patch-row.handler.js +1 -0
- package/dist/src/features/draft/commands/handlers/api-patch-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-rename-row.handler.js +1 -0
- package/dist/src/features/draft/commands/handlers/api-rename-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-update-row.handler.js +1 -0
- package/dist/src/features/draft/commands/handlers/api-update-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/api-upload-file.handler.js +1 -0
- package/dist/src/features/draft/commands/handlers/api-upload-file.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/create-revision.handler.d.ts +13 -6
- package/dist/src/features/draft/commands/handlers/create-revision.handler.js +17 -2
- package/dist/src/features/draft/commands/handlers/create-revision.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/create-row.handler.d.ts +4 -2
- package/dist/src/features/draft/commands/handlers/create-row.handler.js +9 -1
- package/dist/src/features/draft/commands/handlers/create-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/patch-row.handler.d.ts +4 -2
- package/dist/src/features/draft/commands/handlers/patch-row.handler.js +9 -1
- package/dist/src/features/draft/commands/handlers/patch-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/remove-row.handler.d.ts +4 -1
- package/dist/src/features/draft/commands/handlers/remove-row.handler.js +9 -1
- package/dist/src/features/draft/commands/handlers/remove-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/remove-table.handler.d.ts +4 -2
- package/dist/src/features/draft/commands/handlers/remove-table.handler.js +9 -1
- package/dist/src/features/draft/commands/handlers/remove-table.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/rename-table.handler.d.ts +4 -2
- package/dist/src/features/draft/commands/handlers/rename-table.handler.js +9 -1
- 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 +4 -1
- package/dist/src/features/draft/commands/handlers/revert-changes.handler.js +10 -2
- package/dist/src/features/draft/commands/handlers/revert-changes.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/transactional/internal-rename-row.handler.d.ts +4 -2
- package/dist/src/features/draft/commands/handlers/transactional/internal-rename-row.handler.js +10 -2
- 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 +4 -1
- package/dist/src/features/draft/commands/handlers/transactional/internal-update-row.handler.js +10 -2
- package/dist/src/features/draft/commands/handlers/transactional/internal-update-row.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/transactional/resolve-draft-revision.handler.d.ts +5 -1
- package/dist/src/features/draft/commands/handlers/transactional/resolve-draft-revision.handler.js +32 -18
- package/dist/src/features/draft/commands/handlers/transactional/resolve-draft-revision.handler.js.map +1 -1
- package/dist/src/features/draft/commands/handlers/update-table.handler.d.ts +4 -2
- package/dist/src/features/draft/commands/handlers/update-table.handler.js +9 -1
- package/dist/src/features/draft/commands/handlers/update-table.handler.js.map +1 -1
- package/dist/src/features/draft/commands/types/create-revision.handler.types.d.ts +2 -0
- package/dist/src/features/draft/draft.handler.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/revision/index.d.ts +2 -0
- package/dist/src/{utils/prisma-sql-generator → features/revision}/index.js +2 -5
- package/dist/src/features/revision/index.js.map +1 -0
- package/dist/src/features/revision/internal-revisions-api.service.d.ts +19 -0
- package/dist/src/features/revision/internal-revisions-api.service.js +32 -0
- package/dist/src/features/revision/internal-revisions-api.service.js.map +1 -0
- package/dist/src/features/revision/queries/impl/get-revision.query.d.ts +1 -0
- package/dist/src/features/revision/revision.module.js +6 -1
- package/dist/src/features/revision/revision.module.js.map +1 -1
- package/dist/src/features/revision/revisions-api.service.d.ts +19 -5
- package/dist/src/features/revision/revisions-api.service.js +11 -6
- package/dist/src/features/revision/revisions-api.service.js.map +1 -1
- package/dist/src/features/row/index.d.ts +2 -0
- package/dist/src/features/row/index.js +19 -0
- package/dist/src/features/row/index.js.map +1 -0
- package/dist/src/features/row/internal-row-api.service.d.ts +13 -0
- package/dist/src/features/row/internal-row-api.service.js +47 -0
- package/dist/src/features/row/internal-row-api.service.js.map +1 -0
- package/dist/src/features/row/queries/handlers/get-rows.handler.d.ts +2 -4
- package/dist/src/features/row/queries/handlers/get-rows.handler.js +9 -29
- package/dist/src/features/row/queries/handlers/get-rows.handler.js.map +1 -1
- package/dist/src/features/row/queries/impl/get-row-by-id.query.d.ts +2 -0
- package/dist/src/features/row/queries/impl/get-row-by-id.query.js.map +1 -1
- package/dist/src/features/row/queries/impl/get-rows.query.d.ts +3 -3
- package/dist/src/features/row/queries/impl/get-rows.query.js.map +1 -1
- package/dist/src/features/row/row-api.service.d.ts +13 -9
- package/dist/src/features/row/row-api.service.js +27 -14
- package/dist/src/features/row/row-api.service.js.map +1 -1
- package/dist/src/features/row/row.module.js +2 -1
- package/dist/src/features/row/row.module.js.map +1 -1
- package/dist/src/features/row/utils/get-rows-sql.d.ts +5 -0
- package/dist/src/features/row/utils/get-rows-sql.js +70 -0
- package/dist/src/features/row/utils/get-rows-sql.js.map +1 -0
- package/dist/src/infrastructure/cache/constants/auth-cache.constants.d.ts +18 -0
- package/dist/src/infrastructure/cache/constants/auth-cache.constants.js +22 -0
- package/dist/src/infrastructure/cache/constants/auth-cache.constants.js.map +1 -0
- package/dist/src/infrastructure/cache/constants/revision-cache.constants.d.ts +10 -0
- package/dist/src/infrastructure/cache/constants/revision-cache.constants.js +14 -0
- package/dist/src/infrastructure/cache/constants/revision-cache.constants.js.map +1 -0
- package/dist/src/infrastructure/cache/constants/row-cache.constants.d.ts +13 -0
- package/dist/src/infrastructure/cache/constants/row-cache.constants.js +17 -0
- package/dist/src/infrastructure/cache/constants/row-cache.constants.js.map +1 -0
- package/dist/src/infrastructure/cache/events/base.event.d.ts +4 -0
- package/dist/src/infrastructure/cache/events/base.event.js +10 -0
- package/dist/src/infrastructure/cache/events/base.event.js.map +1 -0
- package/dist/src/infrastructure/cache/events/index.d.ts +10 -0
- package/dist/src/infrastructure/cache/events/index.js +27 -0
- package/dist/src/infrastructure/cache/events/index.js.map +1 -0
- package/dist/src/infrastructure/cache/events/revision/revision-committed.event.d.ts +6 -0
- package/dist/src/infrastructure/cache/events/revision/revision-committed.event.js +13 -0
- package/dist/src/infrastructure/cache/events/revision/revision-committed.event.js.map +1 -0
- package/dist/src/infrastructure/cache/events/revision/revision-reverted.event.d.ts +5 -0
- package/dist/src/infrastructure/cache/events/revision/revision-reverted.event.js +12 -0
- package/dist/src/infrastructure/cache/events/revision/revision-reverted.event.js.map +1 -0
- package/dist/src/infrastructure/cache/events/row/row-created.event.d.ts +7 -0
- package/dist/src/infrastructure/cache/events/row/row-created.event.js +14 -0
- package/dist/src/infrastructure/cache/events/row/row-created.event.js.map +1 -0
- package/dist/src/infrastructure/cache/events/row/row-deleted.event.d.ts +7 -0
- package/dist/src/infrastructure/cache/events/row/row-deleted.event.js +14 -0
- package/dist/src/infrastructure/cache/events/row/row-deleted.event.js.map +1 -0
- package/dist/src/infrastructure/cache/events/row/row-renamed.event.d.ts +8 -0
- package/dist/src/infrastructure/cache/events/row/row-renamed.event.js +15 -0
- package/dist/src/infrastructure/cache/events/row/row-renamed.event.js.map +1 -0
- package/dist/src/infrastructure/cache/events/row/row-updated.event.d.ts +7 -0
- package/dist/src/infrastructure/cache/events/row/row-updated.event.js +14 -0
- package/dist/src/infrastructure/cache/events/row/row-updated.event.js.map +1 -0
- package/dist/src/infrastructure/cache/events/table/table-deleted.event.d.ts +6 -0
- package/dist/src/infrastructure/cache/events/table/table-deleted.event.js +13 -0
- package/dist/src/infrastructure/cache/events/table/table-deleted.event.js.map +1 -0
- package/dist/src/infrastructure/cache/events/table/table-renamed.event.d.ts +7 -0
- package/dist/src/infrastructure/cache/events/table/table-renamed.event.js +14 -0
- package/dist/src/infrastructure/cache/events/table/table-renamed.event.js.map +1 -0
- package/dist/src/infrastructure/cache/events/table/table-schema-updated.event.d.ts +6 -0
- package/dist/src/infrastructure/cache/events/table/table-schema-updated.event.js +13 -0
- package/dist/src/infrastructure/cache/events/table/table-schema-updated.event.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/index.d.ts +10 -0
- package/dist/src/infrastructure/cache/handlers/index.js +24 -0
- package/dist/src/infrastructure/cache/handlers/index.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/revision/revision-committed.handler.d.ts +8 -0
- package/dist/src/infrastructure/cache/handlers/revision/revision-committed.handler.js +32 -0
- package/dist/src/infrastructure/cache/handlers/revision/revision-committed.handler.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/revision/revision-reverted.handler.d.ts +8 -0
- package/dist/src/infrastructure/cache/handlers/revision/revision-reverted.handler.js +29 -0
- package/dist/src/infrastructure/cache/handlers/revision/revision-reverted.handler.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/row/row-created.handler.d.ts +8 -0
- package/dist/src/infrastructure/cache/handlers/row/row-created.handler.js +29 -0
- package/dist/src/infrastructure/cache/handlers/row/row-created.handler.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/row/row-deleted.handler.d.ts +8 -0
- package/dist/src/infrastructure/cache/handlers/row/row-deleted.handler.js +30 -0
- package/dist/src/infrastructure/cache/handlers/row/row-deleted.handler.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/row/row-renamed.handler.d.ts +8 -0
- package/dist/src/infrastructure/cache/handlers/row/row-renamed.handler.js +34 -0
- package/dist/src/infrastructure/cache/handlers/row/row-renamed.handler.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/row/row-updated.handler.d.ts +8 -0
- package/dist/src/infrastructure/cache/handlers/row/row-updated.handler.js +30 -0
- package/dist/src/infrastructure/cache/handlers/row/row-updated.handler.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/table/table-deleted.handler.d.ts +8 -0
- package/dist/src/infrastructure/cache/handlers/table/table-deleted.handler.js +29 -0
- package/dist/src/infrastructure/cache/handlers/table/table-deleted.handler.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/table/table-renamed.handler.d.ts +8 -0
- package/dist/src/infrastructure/cache/handlers/table/table-renamed.handler.js +32 -0
- package/dist/src/infrastructure/cache/handlers/table/table-renamed.handler.js.map +1 -0
- package/dist/src/infrastructure/cache/handlers/table/table-schema-updated.handler.d.ts +8 -0
- package/dist/src/infrastructure/cache/handlers/table/table-schema-updated.handler.js +29 -0
- package/dist/src/infrastructure/cache/handlers/table/table-schema-updated.handler.js.map +1 -0
- package/dist/src/infrastructure/cache/index.d.ts +7 -0
- package/dist/src/infrastructure/cache/index.js +24 -0
- package/dist/src/infrastructure/cache/index.js.map +1 -0
- package/dist/src/infrastructure/cache/pg-bus/pg-bus.driver.d.ts +37 -0
- package/dist/src/infrastructure/cache/pg-bus/pg-bus.driver.js +228 -0
- package/dist/src/infrastructure/cache/pg-bus/pg-bus.driver.js.map +1 -0
- package/dist/src/infrastructure/cache/revisium-cache.module.d.ts +4 -0
- package/dist/src/infrastructure/cache/revisium-cache.module.js +140 -0
- package/dist/src/infrastructure/cache/revisium-cache.module.js.map +1 -0
- package/dist/src/infrastructure/cache/services/auth-cache.service.d.ts +22 -0
- package/dist/src/infrastructure/cache/services/auth-cache.service.js +112 -0
- package/dist/src/infrastructure/cache/services/auth-cache.service.js.map +1 -0
- package/dist/src/infrastructure/cache/services/cache.service.d.ts +11 -0
- package/dist/src/infrastructure/cache/services/cache.service.js +38 -0
- package/dist/src/infrastructure/cache/services/cache.service.js.map +1 -0
- package/dist/src/infrastructure/cache/services/cache.tokens.d.ts +1 -0
- package/dist/src/infrastructure/cache/services/cache.tokens.js +5 -0
- package/dist/src/infrastructure/cache/services/cache.tokens.js.map +1 -0
- package/dist/src/infrastructure/cache/services/noop-cache.service.d.ts +6 -0
- package/dist/src/infrastructure/cache/services/noop-cache.service.js +24 -0
- package/dist/src/infrastructure/cache/services/noop-cache.service.js.map +1 -0
- package/dist/src/infrastructure/cache/services/revision-cache.service.d.ts +10 -0
- package/dist/src/infrastructure/cache/services/revision-cache.service.js +39 -0
- package/dist/src/infrastructure/cache/services/revision-cache.service.js.map +1 -0
- package/dist/src/infrastructure/cache/services/row-cache.service.d.ts +26 -0
- package/dist/src/infrastructure/cache/services/row-cache.service.js +68 -0
- package/dist/src/infrastructure/cache/services/row-cache.service.js.map +1 -0
- package/dist/src/utils/utils/parse-bool.d.ts +1 -0
- package/dist/src/utils/utils/parse-bool.js +10 -0
- package/dist/src/utils/utils/parse-bool.js.map +1 -0
- package/dist/src/utils/utils/stable-cache-key.d.ts +12 -0
- package/dist/src/utils/utils/stable-cache-key.js +46 -0
- package/dist/src/utils/utils/stable-cache-key.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +16 -7
- package/dist/src/utils/prisma-sql-generator/__tests__/shared-helpers.d.ts +0 -16
- package/dist/src/utils/prisma-sql-generator/__tests__/shared-helpers.js +0 -70
- package/dist/src/utils/prisma-sql-generator/__tests__/shared-helpers.js.map +0 -1
- package/dist/src/utils/prisma-sql-generator/__tests__/test-helpers.d.ts +0 -52
- package/dist/src/utils/prisma-sql-generator/__tests__/test-helpers.js +0 -531
- package/dist/src/utils/prisma-sql-generator/__tests__/test-helpers.js.map +0 -1
- package/dist/src/utils/prisma-sql-generator/index.d.ts +0 -2
- package/dist/src/utils/prisma-sql-generator/index.js.map +0 -1
- package/dist/src/utils/prisma-sql-generator/json-path.d.ts +0 -14
- package/dist/src/utils/prisma-sql-generator/json-path.js +0 -121
- package/dist/src/utils/prisma-sql-generator/json-path.js.map +0 -1
- package/dist/src/utils/prisma-sql-generator/types.d.ts +0 -105
- package/dist/src/utils/prisma-sql-generator/types.js +0 -3
- package/dist/src/utils/prisma-sql-generator/types.js.map +0 -1
- package/dist/src/utils/prisma-sql-generator/where-generator.prisma.d.ts +0 -21
- package/dist/src/utils/prisma-sql-generator/where-generator.prisma.js +0 -499
- package/dist/src/utils/prisma-sql-generator/where-generator.prisma.js.map +0 -1
|
@@ -14,11 +14,13 @@ const common_1 = require("@nestjs/common");
|
|
|
14
14
|
const core_1 = require("@nestjs/core");
|
|
15
15
|
const cqrs_1 = require("@nestjs/cqrs");
|
|
16
16
|
const graphql_1 = require("@nestjs/graphql");
|
|
17
|
+
const auth_api_service_1 = require("../commands/auth-api.service");
|
|
17
18
|
const permission_params_1 = require("./permission-params");
|
|
18
19
|
let BasePermissionGuard = class BasePermissionGuard {
|
|
19
|
-
constructor(reflector, commandBus) {
|
|
20
|
+
constructor(reflector, commandBus, authApi) {
|
|
20
21
|
this.reflector = reflector;
|
|
21
22
|
this.commandBus = commandBus;
|
|
23
|
+
this.authApi = authApi;
|
|
22
24
|
}
|
|
23
25
|
getFromHttpContext(context) {
|
|
24
26
|
return context.switchToHttp().getRequest();
|
|
@@ -48,8 +50,7 @@ let BasePermissionGuard = class BasePermissionGuard {
|
|
|
48
50
|
throw new common_1.NotFoundException('Required parameters not found');
|
|
49
51
|
}
|
|
50
52
|
try {
|
|
51
|
-
|
|
52
|
-
await this.commandBus.execute(command);
|
|
53
|
+
await this.executeCommand(params, permissions, user?.userId);
|
|
53
54
|
}
|
|
54
55
|
catch (e) {
|
|
55
56
|
if (e instanceof Error) {
|
|
@@ -66,6 +67,7 @@ exports.BasePermissionGuard = BasePermissionGuard;
|
|
|
66
67
|
exports.BasePermissionGuard = BasePermissionGuard = __decorate([
|
|
67
68
|
(0, common_1.Injectable)(),
|
|
68
69
|
__metadata("design:paramtypes", [core_1.Reflector,
|
|
69
|
-
cqrs_1.CommandBus
|
|
70
|
+
cqrs_1.CommandBus,
|
|
71
|
+
auth_api_service_1.AuthApiService])
|
|
70
72
|
], BasePermissionGuard);
|
|
71
73
|
//# sourceMappingURL=base-persmission.guard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-persmission.guard.js","sourceRoot":"","sources":["../../../../../src/features/auth/guards/base-persmission.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAOwB;AACxB,uCAAyC;AACzC,uCAA0C;AAC1C,6CAAsD;AACtD,2DAGoD;AAI7C,IAAe,mBAAmB,GAAlC,MAAe,mBAAmB;IAGvC,YACY,SAAoB,EACpB,UAAsB;
|
|
1
|
+
{"version":3,"file":"base-persmission.guard.js","sourceRoot":"","sources":["../../../../../src/features/auth/guards/base-persmission.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAOwB;AACxB,uCAAyC;AACzC,uCAA0C;AAC1C,6CAAsD;AACtD,mEAA6E;AAC7E,2DAGoD;AAI7C,IAAe,mBAAmB,GAAlC,MAAe,mBAAmB;IAGvC,YACY,SAAoB,EACpB,UAAsB,EACtB,OAAuB;QAFvB,cAAS,GAAT,SAAS,CAAW;QACpB,eAAU,GAAV,UAAU,CAAY;QACtB,YAAO,GAAP,OAAO,CAAgB;IAChC,CAAC;IAEM,kBAAkB,CAAC,OAAyB;QACpD,OAAO,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAGpC,CAAC;IACP,CAAC;IAES,iBAAiB,CAAC,OAAyB;QACnD,MAAM,UAAU,GAAG,6BAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACvD,MAAM,IAAI,GAAG,UAAU,CAAC,UAAU,EAAwC;aACvE,GAAG,CAAC,IAAI,CAAC;QACZ,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,EAAe,CAAC;QAE/C,OAAO;YACL,IAAI;YACJ,MAAM,EAAE,IAAI,CAAC,IAAI;SAClB,CAAC;IACJ,CAAC;IAaD,KAAK,CAAC,WAAW,CAAC,OAAyB;QACzC,MAAM,WAAW,GAAwB,EAAE,CAAC;QAE5C,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CACxC,yCAAqB,EACrB,OAAO,CAAC,QAAQ,EAAE,CACnB,CAAC;QAEF,IAAI,eAAe,EAAE,CAAC;YACpB,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACpC,CAAC;QAED,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CACzC,yCAAqB,EACrB,OAAO,CAAC,UAAU,EAAE,CACrB,CAAC;QAEF,IAAI,gBAAgB,EAAE,CAAC;YACrB,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACrC,CAAC;QAED,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAEjD,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,0BAAiB,CAAC,+BAA+B,CAAC,CAAC;QAC/D,CAAC;QAED,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC/D,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC;gBACvB,MAAM,IAAI,2BAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YAC1C,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,qCAA4B,EAAE,CAAC;YAC3C,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AA9EqB,kDAAmB;8BAAnB,mBAAmB;IADxC,IAAA,mBAAU,GAAE;qCAKY,gBAAS;QACR,iBAAU;QACb,iCAAc;GANf,mBAAmB,CA8ExC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { ExecutionContext } from '@nestjs/common';
|
|
2
|
-
import { CheckOrganizationPermissionCommand } from '../../../features/auth/commands/impl/check-organization-permission.command';
|
|
3
2
|
import { BasePermissionGuard } from '../../../features/auth/guards/base-persmission.guard';
|
|
4
3
|
import { IPermissionParams } from '../../../features/auth/guards/permission-params';
|
|
5
4
|
interface Params {
|
|
6
5
|
organizationId?: string;
|
|
7
6
|
}
|
|
8
7
|
declare abstract class OrganizationGuard extends BasePermissionGuard<Params> {
|
|
9
|
-
protected
|
|
8
|
+
protected executeCommand(params: {
|
|
10
9
|
organizationId?: string;
|
|
11
|
-
}, permissions: IPermissionParams[], userId?: string):
|
|
10
|
+
}, permissions: IPermissionParams[], userId?: string): Promise<boolean>;
|
|
12
11
|
}
|
|
13
12
|
export declare class HTTPOrganizationGuard extends OrganizationGuard {
|
|
14
13
|
protected getParams(context: ExecutionContext): {
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GQLOrganizationGuard = exports.HTTPOrganizationGuard = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
|
-
const check_organization_permission_command_1 = require("../commands/impl/check-organization-permission.command");
|
|
6
5
|
const base_persmission_guard_1 = require("./base-persmission.guard");
|
|
7
6
|
class OrganizationGuard extends base_persmission_guard_1.BasePermissionGuard {
|
|
8
|
-
|
|
7
|
+
executeCommand(params, permissions, userId) {
|
|
9
8
|
if (!params.organizationId) {
|
|
10
9
|
throw new common_1.InternalServerErrorException(`Not found organizationId=${params.organizationId}`);
|
|
11
10
|
}
|
|
12
|
-
return
|
|
11
|
+
return this.authApi.checkOrganizationPermission({
|
|
13
12
|
permissions,
|
|
14
13
|
organizationId: params.organizationId,
|
|
15
14
|
userId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.guard.js","sourceRoot":"","sources":["../../../../../src/features/auth/guards/organization.guard.ts"],"names":[],"mappings":";;;AAAA,2CAAgF;AAChF,
|
|
1
|
+
{"version":3,"file":"organization.guard.js","sourceRoot":"","sources":["../../../../../src/features/auth/guards/organization.guard.ts"],"names":[],"mappings":";;;AAAA,2CAAgF;AAChF,qEAAsF;AAOtF,MAAe,iBAAkB,SAAQ,4CAA2B;IACxD,cAAc,CACtB,MAEC,EACD,WAAgC,EAChC,MAAe;QAEf,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAC3B,MAAM,IAAI,qCAA4B,CACpC,4BAA4B,MAAM,CAAC,cAAc,EAAE,CACpD,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC;YAC9C,WAAW;YACX,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,MAAM;SACP,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAa,qBAAsB,SAAQ,iBAAiB;IAChD,SAAS,CAAC,OAAyB;QAC3C,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,sDAIC;AAED,MAAa,oBAAqB,SAAQ,iBAAiB;IAC/C,SAAS,CAAC,OAAyB;QAC3C,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;CACF;AAJD,oDAIC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ExecutionContext } from '@nestjs/common';
|
|
2
|
-
import { CheckProjectPermissionCommand } from '../../../features/auth/commands/impl';
|
|
3
2
|
import { BasePermissionGuard } from '../../../features/auth/guards/base-persmission.guard';
|
|
4
3
|
import { IPermissionParams } from '../../../features/auth/guards/permission-params';
|
|
5
4
|
interface Params {
|
|
@@ -9,12 +8,39 @@ interface Params {
|
|
|
9
8
|
endpointId?: string;
|
|
10
9
|
}
|
|
11
10
|
declare abstract class ProjectGuard extends BasePermissionGuard<Params> {
|
|
12
|
-
protected
|
|
11
|
+
protected executeCommand(params: {
|
|
13
12
|
organizationId?: string;
|
|
14
13
|
projectName?: string;
|
|
15
14
|
revisionId?: string;
|
|
16
15
|
endpointId?: string;
|
|
17
|
-
}, permissions: IPermissionParams[], userId?: string):
|
|
16
|
+
}, permissions: IPermissionParams[], userId?: string): Promise<boolean>;
|
|
17
|
+
protected getData(params: {
|
|
18
|
+
organizationId?: string;
|
|
19
|
+
projectName?: string;
|
|
20
|
+
revisionId?: string;
|
|
21
|
+
endpointId?: string;
|
|
22
|
+
}, permissions: IPermissionParams[], userId?: string): {
|
|
23
|
+
permissions: IPermissionParams[];
|
|
24
|
+
organizationId: string;
|
|
25
|
+
projectName: string;
|
|
26
|
+
userId: string | undefined;
|
|
27
|
+
revisionId?: undefined;
|
|
28
|
+
endpointId?: undefined;
|
|
29
|
+
} | {
|
|
30
|
+
permissions: IPermissionParams[];
|
|
31
|
+
revisionId: string;
|
|
32
|
+
userId: string | undefined;
|
|
33
|
+
organizationId?: undefined;
|
|
34
|
+
projectName?: undefined;
|
|
35
|
+
endpointId?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
permissions: IPermissionParams[];
|
|
38
|
+
endpointId: string;
|
|
39
|
+
userId: string | undefined;
|
|
40
|
+
organizationId?: undefined;
|
|
41
|
+
projectName?: undefined;
|
|
42
|
+
revisionId?: undefined;
|
|
43
|
+
};
|
|
18
44
|
}
|
|
19
45
|
export declare class HTTPProjectGuard extends ProjectGuard {
|
|
20
46
|
protected getParams(context: ExecutionContext): {
|
|
@@ -2,31 +2,34 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GQLProjectGuard = exports.HTTPProjectGuard = void 0;
|
|
4
4
|
const common_1 = require("@nestjs/common");
|
|
5
|
-
const impl_1 = require("../commands/impl");
|
|
6
5
|
const base_persmission_guard_1 = require("./base-persmission.guard");
|
|
7
6
|
class ProjectGuard extends base_persmission_guard_1.BasePermissionGuard {
|
|
8
|
-
|
|
7
|
+
executeCommand(params, permissions, userId) {
|
|
8
|
+
const data = this.getData(params, permissions, userId);
|
|
9
|
+
return this.authApi.checkProjectPermission(data);
|
|
10
|
+
}
|
|
11
|
+
getData(params, permissions, userId) {
|
|
9
12
|
if (params.organizationId && params.projectName) {
|
|
10
|
-
return
|
|
13
|
+
return {
|
|
11
14
|
permissions,
|
|
12
15
|
organizationId: params.organizationId,
|
|
13
16
|
projectName: params.projectName,
|
|
14
17
|
userId,
|
|
15
|
-
}
|
|
18
|
+
};
|
|
16
19
|
}
|
|
17
20
|
else if (params.revisionId) {
|
|
18
|
-
return
|
|
21
|
+
return {
|
|
19
22
|
permissions,
|
|
20
23
|
revisionId: params.revisionId,
|
|
21
24
|
userId,
|
|
22
|
-
}
|
|
25
|
+
};
|
|
23
26
|
}
|
|
24
27
|
else if (params.endpointId) {
|
|
25
|
-
return
|
|
28
|
+
return {
|
|
26
29
|
permissions,
|
|
27
30
|
endpointId: params.endpointId,
|
|
28
31
|
userId,
|
|
29
|
-
}
|
|
32
|
+
};
|
|
30
33
|
}
|
|
31
34
|
else {
|
|
32
35
|
throw new common_1.NotFoundException(params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.guard.js","sourceRoot":"","sources":["../../../../../src/features/auth/guards/project.guard.ts"],"names":[],"mappings":";;;AAAA,2CAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"project.guard.js","sourceRoot":"","sources":["../../../../../src/features/auth/guards/project.guard.ts"],"names":[],"mappings":";;;AAAA,2CAAqE;AACrE,qEAAsF;AAUtF,MAAe,YAAa,SAAQ,4CAA2B;IACnD,cAAc,CACtB,MAKC,EACD,WAAgC,EAChC,MAAe;QAEf,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IAES,OAAO,CACf,MAKC,EACD,WAAgC,EAChC,MAAe;QAEf,IAAI,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YAChD,OAAO;gBACL,WAAW;gBACX,cAAc,EAAE,MAAM,CAAC,cAAc;gBACrC,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,MAAM;aACP,CAAC;QACJ,CAAC;aAAM,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAC7B,OAAO;gBACL,WAAW;gBACX,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,MAAM;aACP,CAAC;QACJ,CAAC;aAAM,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAC7B,OAAO;gBACL,WAAW;gBACX,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,MAAM;aACP,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,0BAAiB,CAAC,MAAM,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF;AAED,MAAa,gBAAiB,SAAQ,YAAY;IACtC,SAAS,CAAC,OAAyB;QAC3C,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,4CAIC;AAED,MAAa,eAAgB,SAAQ,YAAY;IACrC,SAAS,CAAC,OAAyB;QAC3C,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;CACF;AAJD,0CAIC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ExecutionContext } from '@nestjs/common';
|
|
2
|
-
import { CheckSystemPermissionCommand } from '../../../features/auth/commands/impl';
|
|
3
2
|
import { BasePermissionGuard } from '../../../features/auth/guards/base-persmission.guard';
|
|
4
3
|
import { IPermissionParams } from '../../../features/auth/guards/permission-params';
|
|
5
4
|
declare abstract class SystemGuard extends BasePermissionGuard {
|
|
6
|
-
protected
|
|
5
|
+
protected executeCommand(_: Record<string, never>, permissions: IPermissionParams[], userId?: string): Promise<boolean>;
|
|
7
6
|
}
|
|
8
7
|
export declare class HTTPSystemGuard extends SystemGuard {
|
|
9
8
|
protected getParams(context: ExecutionContext): {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GQLSystemGuard = exports.HTTPSystemGuard = void 0;
|
|
4
|
-
const impl_1 = require("../commands/impl");
|
|
5
4
|
const base_persmission_guard_1 = require("./base-persmission.guard");
|
|
6
5
|
class SystemGuard extends base_persmission_guard_1.BasePermissionGuard {
|
|
7
|
-
|
|
8
|
-
return
|
|
6
|
+
executeCommand(_, permissions, userId) {
|
|
7
|
+
return this.authApi.checkSystemPermission({
|
|
9
8
|
permissions,
|
|
10
9
|
userId,
|
|
11
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.guard.js","sourceRoot":"","sources":["../../../../../src/features/auth/guards/system.guard.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"system.guard.js","sourceRoot":"","sources":["../../../../../src/features/auth/guards/system.guard.ts"],"names":[],"mappings":";;;AACA,qEAAsF;AAGtF,MAAe,WAAY,SAAQ,4CAAmB;IAC1C,cAAc,CACtB,CAAwB,EACxB,WAAgC,EAChC,MAAe;QAEf,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC;YACxC,WAAW;YACX,MAAM;SACP,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAa,eAAgB,SAAQ,WAAW;IACpC,SAAS,CAAC,OAAyB;QAC3C,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,0CAIC;AAED,MAAa,cAAe,SAAQ,WAAW;IACnC,SAAS,CAAC,OAAyB;QAC3C,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;CACF;AAJD,wCAIC"}
|
|
@@ -6,6 +6,7 @@ import { PluginListService } from '../../../../../features/plugin/plugin.list.se
|
|
|
6
6
|
import { ShareTransactionalCommands } from '../../../../../features/share/share.transactional.commands';
|
|
7
7
|
import { ShareTransactionalQueries } from '../../../../../features/share/share.transactional.queries';
|
|
8
8
|
import { JsonObjectSchema } from '../../../../../features/share/utils/schema/types/schema.types';
|
|
9
|
+
import { CacheService } from '../../../../../infrastructure/cache';
|
|
9
10
|
import { PrismaService } from '../../../../../infrastructure/database/prisma.service';
|
|
10
11
|
import { TransactionPrismaService } from '../../../../../infrastructure/database/transaction-prisma.service';
|
|
11
12
|
import { EndpointNotificationService } from '../../../../../infrastructure/notification/endpoint-notification.service';
|
|
@@ -26,5 +27,6 @@ export declare const createTestingModule: () => Promise<{
|
|
|
26
27
|
draftTransactionalCommands: DraftTransactionalCommands;
|
|
27
28
|
endpointNotificationService: EndpointNotificationService;
|
|
28
29
|
migrationContextService: MigrationContextService;
|
|
30
|
+
cacheService: CacheService;
|
|
29
31
|
}>;
|
|
30
32
|
export declare const createMock: <T>(mockResolvedValue: T) => jest.Mock<any, any, any>;
|
|
@@ -18,7 +18,9 @@ const queries_1 = require("../../../../organization/queries");
|
|
|
18
18
|
const plugin_list_service_1 = require("../../../../plugin/plugin.list.service");
|
|
19
19
|
const plugin_module_1 = require("../../../../plugin/plugin.module");
|
|
20
20
|
const handlers_3 = require("../../../../project/queries/handlers");
|
|
21
|
+
const revision_1 = require("../../../../revision");
|
|
21
22
|
const commands_1 = require("../../../../revision/queries/commands");
|
|
23
|
+
const internal_row_api_service_1 = require("../../../../row/internal-row-api.service");
|
|
22
24
|
const get_row_handler_1 = require("../../../../row/queries/handlers/get-row.handler");
|
|
23
25
|
const get_rows_handler_1 = require("../../../../row/queries/handlers/get-rows.handler");
|
|
24
26
|
const resolve_row_foreign_keys_by_handler_1 = require("../../../../row/queries/handlers/resolve-row-foreign-keys-by.handler");
|
|
@@ -33,6 +35,7 @@ const share_transactional_commands_1 = require("../../../../share/share.transact
|
|
|
33
35
|
const share_transactional_queries_1 = require("../../../../share/share.transactional.queries");
|
|
34
36
|
const schema_types_1 = require("../../../../share/utils/schema/types/schema.types");
|
|
35
37
|
const get_table_by_id_handler_1 = require("../../../../table/queries/handlers/get-table-by-id.handler");
|
|
38
|
+
const cache_1 = require("../../../../../infrastructure/cache");
|
|
36
39
|
const database_module_1 = require("../../../../../infrastructure/database/database.module");
|
|
37
40
|
const prisma_service_1 = require("../../../../../infrastructure/database/prisma.service");
|
|
38
41
|
const s3_service_1 = require("../../../../../infrastructure/database/s3.service");
|
|
@@ -106,11 +109,14 @@ const createTestingModule = async () => {
|
|
|
106
109
|
app_options_module_1.AppOptionsModule.forRoot({ mode: 'monolith' }),
|
|
107
110
|
notification_module_1.NotificationModule,
|
|
108
111
|
cache_manager_1.CacheModule.register(),
|
|
112
|
+
revision_1.RevisionModule,
|
|
113
|
+
cache_1.RevisiumCacheModule.forRootAsync(),
|
|
109
114
|
],
|
|
110
115
|
providers: [
|
|
111
116
|
draft_transactional_commands_1.DraftTransactionalCommands,
|
|
112
117
|
draft_api_service_1.DraftApiService,
|
|
113
118
|
row_api_service_1.RowApiService,
|
|
119
|
+
internal_row_api_service_1.InternalRowApiService,
|
|
114
120
|
draft_context_service_1.DraftContextService,
|
|
115
121
|
migration_context_service_1.MigrationContextService,
|
|
116
122
|
json_schema_validator_service_1.JsonSchemaValidatorService,
|
|
@@ -145,6 +151,7 @@ const createTestingModule = async () => {
|
|
|
145
151
|
const draftTransactionalCommands = module.get(draft_transactional_commands_1.DraftTransactionalCommands);
|
|
146
152
|
const endpointNotificationService = module.get(endpoint_notification_service_1.EndpointNotificationService);
|
|
147
153
|
const migrationContextService = module.get(migration_context_service_1.MigrationContextService);
|
|
154
|
+
const cacheService = module.get(cache_1.CacheService);
|
|
148
155
|
return {
|
|
149
156
|
module,
|
|
150
157
|
prismaService,
|
|
@@ -157,6 +164,7 @@ const createTestingModule = async () => {
|
|
|
157
164
|
draftTransactionalCommands,
|
|
158
165
|
endpointNotificationService,
|
|
159
166
|
migrationContextService,
|
|
167
|
+
cacheService,
|
|
160
168
|
};
|
|
161
169
|
};
|
|
162
170
|
exports.createTestingModule = createTestingModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../src/features/draft/commands/handlers/__tests__/utils.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,uCAAgE;AAChE,6CAAsD;AACtD,qFAKiD;AACjD,mEAAgF;AAChF,4GAAsG;AACtG,oCAAqF;AACrF,kEAAuE;AACvE,0EAA+E;AAC/E,kEAAyE;AACzE,wFAA6F;AAC7F,kFAAuF;AACvF,qEAA4E;AAC5E,8DAA0E;AAC1E,gFAA4E;AAC5E,oEAAiE;AACjE,mEAAwE;AACxE,oEAAmF;AACnF,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IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,OAAe,EAAoB,EAAE,CAAC,CAAC;IACzE,IAAI,EAAE,iCAAkB,CAAC,MAAM;IAC/B,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,IAAI,EAAE,iCAAkB,CAAC,MAAM;YAC/B,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,OAAO;SACpB;KACF;IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAC,CAAC;AAXU,QAAA,mBAAmB,uBAW7B;AAEI,MAAM,mBAAmB,GAAG,KAAK,IAAI,EAAE;IAC5C,MAAM,MAAM,GAAG;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC;YACtC,MAAM,EAAE,aAAa;YACrB,GAAG,EAAE,kBAAkB;SACxB,CAAC;KACH,CAAC;IAEF,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;QAC3D,OAAO,EAAE;YACP,gCAAc;YACd,iBAAU;YACV,0BAAW;YACX,4BAAY;YACZ,qCAAgB,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;YAC9C,wCAAkB;YAClB,2BAAW,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../src/features/draft/commands/handlers/__tests__/utils.ts"],"names":[],"mappings":";;;AAAA,yDAAoD;AACpD,uCAAgE;AAChE,6CAAsD;AACtD,qFAKiD;AACjD,mEAAgF;AAChF,4GAAsG;AACtG,oCAAqF;AACrF,kEAAuE;AACvE,0EAA+E;AAC/E,kEAAyE;AACzE,wFAA6F;AAC7F,kFAAuF;AACvF,qEAA4E;AAC5E,8DAA0E;AAC1E,gFAA4E;AAC5E,oEAAiE;AACjE,mEAAwE;AACxE,mDAAuD;AACvD,oE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mB,uBA+E9B;AAEK,MAAM,UAAU,GAAG,CAAI,iBAAoB,EAAE,EAAE,CACpD,iBAAiB,YAAY,KAAK;IAChC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;IAChD,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAHxC,QAAA,UAAU,cAG8B"}
|
|
@@ -12,10 +12,11 @@ export declare class ApiBaseRowHandler {
|
|
|
12
12
|
previousTableVersionId: string;
|
|
13
13
|
revisionId: string;
|
|
14
14
|
}): Promise<void>;
|
|
15
|
-
protected getTableAndRow({ revisionId, tableId, tableVersionId, rowVersionId, }: {
|
|
15
|
+
protected getTableAndRow({ revisionId, tableId, tableVersionId, rowId, rowVersionId, }: {
|
|
16
16
|
revisionId: string;
|
|
17
17
|
tableId: string;
|
|
18
18
|
tableVersionId: string;
|
|
19
|
+
rowId: string;
|
|
19
20
|
rowVersionId: string;
|
|
20
21
|
}): Promise<{
|
|
21
22
|
table: GetTableByIdReturnType;
|
|
@@ -13,12 +13,13 @@ class ApiBaseRowHandler {
|
|
|
13
13
|
await this.shareCommands.notifyEndpoints({ revisionId });
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
async getTableAndRow({ revisionId, tableId, tableVersionId, rowVersionId, }) {
|
|
16
|
+
async getTableAndRow({ revisionId, tableId, tableVersionId, rowId, rowVersionId, }) {
|
|
17
17
|
const [table, row] = await Promise.all([
|
|
18
18
|
this.queryBus.execute(new get_table_by_id_query_1.GetTableByIdQuery({ revisionId: revisionId, tableVersionId })),
|
|
19
19
|
this.rowApi.getRowById({
|
|
20
20
|
revisionId: revisionId,
|
|
21
21
|
tableId: tableId,
|
|
22
|
+
rowId,
|
|
22
23
|
rowVersionId,
|
|
23
24
|
}),
|
|
24
25
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-base-row.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-base-row.handler.ts"],"names":[],"mappings":";;;AAGA,6FAA0F;AAG1F,MAAa,iBAAiB;IAC5B,YACqB,QAAkB,EAClB,aAA4B,EAC5B,MAAqB;QAFrB,aAAQ,GAAR,QAAQ,CAAU;QAClB,kBAAa,GAAb,aAAa,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAe;IACvC,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,EACnC,cAAc,EACd,sBAAsB,EACtB,UAAU,GAKX;QACC,IAAI,cAAc,KAAK,sBAAsB,EAAE,CAAC;YAC9C,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAES,KAAK,CAAC,cAAc,CAAC,EAC7B,UAAU,EACV,OAAO,EACP,cAAc,EACd,YAAY,
|
|
1
|
+
{"version":3,"file":"api-base-row.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-base-row.handler.ts"],"names":[],"mappings":";;;AAGA,6FAA0F;AAG1F,MAAa,iBAAiB;IAC5B,YACqB,QAAkB,EAClB,aAA4B,EAC5B,MAAqB;QAFrB,aAAQ,GAAR,QAAQ,CAAU;QAClB,kBAAa,GAAb,aAAa,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAe;IACvC,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,EACnC,cAAc,EACd,sBAAsB,EACtB,UAAU,GAKX;QACC,IAAI,cAAc,KAAK,sBAAsB,EAAE,CAAC;YAC9C,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAES,KAAK,CAAC,cAAc,CAAC,EAC7B,UAAU,EACV,OAAO,EACP,cAAc,EACd,KAAK,EACL,YAAY,GAOb;QACC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACrC,IAAI,CAAC,QAAQ,CAAC,OAAO,CACnB,IAAI,yCAAiB,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC,CAClE;YACD,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;gBACrB,UAAU,EAAE,UAAU;gBACtB,OAAO,EAAE,OAAO;gBAChB,KAAK;gBACL,YAAY;aACb,CAAC;SACH,CAAC,CAAC;QAEH,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IACxB,CAAC;CACF;AAhDD,8CAgDC"}
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
import { CommandBus, ICommandHandler
|
|
1
|
+
import { CommandBus, ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
+
import { RevisionsApiService } from '../../../../features/revision';
|
|
2
3
|
import { TransactionPrismaService } from '../../../../infrastructure/database/transaction-prisma.service';
|
|
3
4
|
import { ApiCreateRevisionCommand, ApiCreateRevisionCommandReturnType } from '../../../../features/draft/commands/impl/api-create-revision.command';
|
|
4
5
|
import { EndpointNotificationService } from '../../../../infrastructure/notification/endpoint-notification.service';
|
|
5
6
|
export declare class ApiCreateRevisionHandler implements ICommandHandler<ApiCreateRevisionCommand, ApiCreateRevisionCommandReturnType> {
|
|
6
7
|
private readonly commandBus;
|
|
7
|
-
private readonly queryBus;
|
|
8
8
|
private readonly transactionService;
|
|
9
9
|
private readonly endpointNotificationService;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
private readonly revisionApi;
|
|
11
|
+
constructor(commandBus: CommandBus, transactionService: TransactionPrismaService, endpointNotificationService: EndpointNotificationService, revisionApi: RevisionsApiService);
|
|
12
|
+
execute({ data }: ApiCreateRevisionCommand): Promise<{
|
|
13
|
+
id: string;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
sequence: number;
|
|
16
|
+
comment: string;
|
|
17
|
+
isHead: boolean;
|
|
18
|
+
isDraft: boolean;
|
|
19
|
+
isStart: boolean;
|
|
20
|
+
hasChanges: boolean;
|
|
21
|
+
branchId: string;
|
|
22
|
+
parentId: string | null;
|
|
23
|
+
}>;
|
|
12
24
|
private notifyEndpoints;
|
|
13
25
|
}
|
|
@@ -11,22 +11,22 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ApiCreateRevisionHandler = void 0;
|
|
13
13
|
const cqrs_1 = require("@nestjs/cqrs");
|
|
14
|
+
const revision_1 = require("../../../revision");
|
|
14
15
|
const transaction_prisma_service_1 = require("../../../../infrastructure/database/transaction-prisma.service");
|
|
15
16
|
const api_create_revision_command_1 = require("../impl/api-create-revision.command");
|
|
16
17
|
const create_revision_command_1 = require("../impl/create-revision.command");
|
|
17
18
|
const endpoint_notification_service_1 = require("../../../../infrastructure/notification/endpoint-notification.service");
|
|
18
|
-
const impl_1 = require("../../../revision/queries/impl");
|
|
19
19
|
let ApiCreateRevisionHandler = class ApiCreateRevisionHandler {
|
|
20
|
-
constructor(commandBus,
|
|
20
|
+
constructor(commandBus, transactionService, endpointNotificationService, revisionApi) {
|
|
21
21
|
this.commandBus = commandBus;
|
|
22
|
-
this.queryBus = queryBus;
|
|
23
22
|
this.transactionService = transactionService;
|
|
24
23
|
this.endpointNotificationService = endpointNotificationService;
|
|
24
|
+
this.revisionApi = revisionApi;
|
|
25
25
|
}
|
|
26
26
|
async execute({ data }) {
|
|
27
27
|
const { nextDraftRevisionId, draftEndpoints, headEndpoints, } = await this.transactionService.run(async () => this.commandBus.execute(new create_revision_command_1.CreateRevisionCommand(data)));
|
|
28
28
|
await this.notifyEndpoints([...draftEndpoints, ...headEndpoints]);
|
|
29
|
-
return this.
|
|
29
|
+
return this.revisionApi.revision({ revisionId: nextDraftRevisionId });
|
|
30
30
|
}
|
|
31
31
|
async notifyEndpoints(endpoints) {
|
|
32
32
|
for (const endpointId of endpoints) {
|
|
@@ -38,8 +38,8 @@ exports.ApiCreateRevisionHandler = ApiCreateRevisionHandler;
|
|
|
38
38
|
exports.ApiCreateRevisionHandler = ApiCreateRevisionHandler = __decorate([
|
|
39
39
|
(0, cqrs_1.CommandHandler)(api_create_revision_command_1.ApiCreateRevisionCommand),
|
|
40
40
|
__metadata("design:paramtypes", [cqrs_1.CommandBus,
|
|
41
|
-
cqrs_1.QueryBus,
|
|
42
41
|
transaction_prisma_service_1.TransactionPrismaService,
|
|
43
|
-
endpoint_notification_service_1.EndpointNotificationService
|
|
42
|
+
endpoint_notification_service_1.EndpointNotificationService,
|
|
43
|
+
revision_1.RevisionsApiService])
|
|
44
44
|
], ApiCreateRevisionHandler);
|
|
45
45
|
//# sourceMappingURL=api-create-revision.handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-create-revision.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-create-revision.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"api-create-revision.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-create-revision.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAA2E;AAC3E,gDAA4D;AAC5D,+GAAkG;AAClG,qFAGsE;AACtE,6EAAiG;AAEjG,yHAA4G;AAGrG,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAOnC,YACmB,UAAsB,EACtB,kBAA4C,EAC5C,2BAAwD,EACxD,WAAgC;QAHhC,eAAU,GAAV,UAAU,CAAY;QACtB,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,gCAA2B,GAA3B,2BAA2B,CAA6B;QACxD,gBAAW,GAAX,WAAW,CAAqB;IAChD,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAA4B;QAC9C,MAAM,EACJ,mBAAmB,EACnB,cAAc,EACd,aAAa,GACd,GAAoC,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CACpE,KAAK,IAAI,EAAE,CACT,IAAI,CAAC,UAAU,CAAC,OAAO,CAGrB,IAAI,+CAAqB,CAAC,IAAI,CAAC,CAAC,CACrC,CAAC;QAEF,MAAM,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,cAAc,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC;QAElE,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACxE,CAAC;IAEO,KAAK,CAAC,eAAe,CAAC,SAAmB;QAC/C,KAAK,MAAM,UAAU,IAAI,SAAS,EAAE,CAAC;YACnC,MAAM,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;CACF,CAAA;AArCY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,qBAAc,EAAC,sDAAwB,CAAC;qCASR,iBAAU;QACF,qDAAwB;QACf,2DAA2B;QAC3C,8BAAmB;GAXxC,wBAAwB,CAqCpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-create-row.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-create-row.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA8D;AAC9D,uCAKsB;AACtB,iEAA8F;AAC9F,kEAAiE;AACjE,+GAAkG;AAClG,2EAA8F;AAC9F,mEAAuF;AAGvF,kEAAkE;AAG3D,IAAM,mBAAmB,GAAzB,MAAM,mBACX,SAAQ,wCAAiB;IAGzB,YACqB,UAAsB,EACtB,QAAkB,EAClB,kBAA4C,EAC5C,aAA4B,EAC5B,MAAqB;QAExC,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QANpB,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAU;QAClB,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAe;IAG1C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAuB;QACzC,MAAM,EACJ,cAAc,EACd,YAAY,EACZ,sBAAsB,GACvB,GAA+B,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAC/D,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,qCAAgB,CAAC,IAAI,CAAC,CAAC,CAChE,CAAC;QAEF,MAAM,IAAI,CAAC,oBAAoB,CAAC;YAC9B,cAAc;YACd,sBAAsB;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC;YAC/C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,YAAY;SACb,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC;YACnB,MAAM,IAAI,qCAA4B,CAAC,6BAA6B,CAAC,CAAC;QACxE,CAAC;QAED,MAAM,MAAM,GAAkC;YAC5C,KAAK;YACL,sBAAsB,EAAE,sBAAsB;YAC9C,GAAG,EAAE,GAAG;SACT,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"api-create-row.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-create-row.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA8D;AAC9D,uCAKsB;AACtB,iEAA8F;AAC9F,kEAAiE;AACjE,+GAAkG;AAClG,2EAA8F;AAC9F,mEAAuF;AAGvF,kEAAkE;AAG3D,IAAM,mBAAmB,GAAzB,MAAM,mBACX,SAAQ,wCAAiB;IAGzB,YACqB,UAAsB,EACtB,QAAkB,EAClB,kBAA4C,EAC5C,a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Z,eAAQ;QACE,qDAAwB;QAC7B,8BAAa;QACpB,+BAAa;GAT/B,mBAAmB,CAiD/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-patch-row.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-patch-row.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAKsB;AACtB,iEAA8F;AAC9F,yEAGgE;AAChE,iEAG4D;AAC5D,kEAAiE;AACjE,kEAAkE;AAClE,+GAAkG;AAG3F,IAAM,kBAAkB,GAAxB,MAAM,kBACX,SAAQ,wCAAiB;IAGzB,YACqB,UAAsB,EACtB,QAAkB,EAClB,kBAA4C,EAC5C,aAA4B,EAC5B,MAAqB;QAExC,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QANpB,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAU;QAClB,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAe;IAG1C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAsB;QACxC,MAAM,EACJ,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,GACrB,GAA8B,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAC1E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,mCAAe,CAAC,IAAI,CAAC,CAAC,CACnD,CAAC;QAEF,MAAM,IAAI,CAAC,oBAAoB,CAAC;YAC9B,cAAc;YACd,sBAAsB;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC;YAC/C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,YAAY;SACb,CAAC,CAAC;QAEH,MAAM,MAAM,GAAiC;YAC3C,KAAK;YACL,sBAAsB,EAAE,sBAAsB;YAC9C,GAAG;YACH,oBAAoB,EAAE,oBAAoB;SAC3C,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"api-patch-row.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-patch-row.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAKsB;AACtB,iEAA8F;AAC9F,yEAGgE;AAChE,iEAG4D;AAC5D,kEAAiE;AACjE,kEAAkE;AAClE,+GAAkG;AAG3F,IAAM,kBAAkB,GAAxB,MAAM,kBACX,SAAQ,wCAAiB;IAGzB,YACqB,UAAsB,EACtB,QAAkB,EAClB,kBAA4C,EAC5C,aAA4B,EAC5B,MAAqB;QAExC,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QANpB,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAU;QAClB,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAe;IAG1C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAsB;QACxC,MAAM,EACJ,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,GACrB,GAA8B,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAC1E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,mCAAe,CAAC,IAAI,CAAC,CAAC,CACnD,CAAC;QAEF,MAAM,IAAI,CAAC,oBAAoB,CAAC;YAC9B,cAAc;YACd,sBAAsB;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC;YAC/C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,YAAY;SACb,CAAC,CAAC;QAEH,MAAM,MAAM,GAAiC;YAC3C,KAAK;YACL,sBAAsB,EAAE,sBAAsB;YAC9C,GAAG;YACH,oBAAoB,EAAE,oBAAoB;SAC3C,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AA/CY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,qBAAc,EAAC,0CAAkB,CAAC;qCAMA,iBAAU;QACZ,eAAQ;QACE,qDAAwB;QAC7B,8BAAa;QACpB,+BAAa;GAT/B,kBAAkB,CA+C9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-rename-row.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-rename-row.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAKsB;AACtB,iEAA8F;AAC9F,2EAGiE;AACjE,mEAG6D;AAC7D,kEAAiE;AACjE,+GAAkG;AAClG,kEAAkE;AAG3D,IAAM,mBAAmB,GAAzB,MAAM,mBACX,SAAQ,wCAAiB;IAGzB,YACqB,UAAsB,EACtB,QAAkB,EAClB,kBAA4C,EAC5C,aAA4B,EAC5B,MAAqB;QAExC,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QANpB,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAU;QAClB,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAe;IAG1C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAuB;QACzC,MAAM,EACJ,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,GACrB,GAA+B,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAC/D,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,qCAAgB,CAAC,IAAI,CAAC,CAAC,CAChE,CAAC;QAEF,MAAM,IAAI,CAAC,oBAAoB,CAAC;YAC9B,cAAc;YACd,sBAAsB;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC;YAC/C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,YAAY;SACb,CAAC,CAAC;QAEH,MAAM,MAAM,GAAkC;YAC5C,KAAK;YACL,sBAAsB,EAAE,sBAAsB;YAC9C,GAAG;YACH,oBAAoB,EAAE,oBAAoB;SAC3C,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"api-rename-row.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-rename-row.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAKsB;AACtB,iEAA8F;AAC9F,2EAGiE;AACjE,mEAG6D;AAC7D,kEAAiE;AACjE,+GAAkG;AAClG,kEAAkE;AAG3D,IAAM,mBAAmB,GAAzB,MAAM,mBACX,SAAQ,wCAAiB;IAGzB,YACqB,UAAsB,EACtB,QAAkB,EAClB,kBAA4C,EAC5C,aAA4B,EAC5B,MAAqB;QAExC,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QANpB,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAU;QAClB,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAe;IAG1C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAuB;QACzC,MAAM,EACJ,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,GACrB,GAA+B,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAC/D,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,qCAAgB,CAAC,IAAI,CAAC,CAAC,CAChE,CAAC;QAEF,MAAM,IAAI,CAAC,oBAAoB,CAAC;YAC9B,cAAc;YACd,sBAAsB;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC;YAC/C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,YAAY;SACb,CAAC,CAAC;QAEH,MAAM,MAAM,GAAkC;YAC5C,KAAK;YACL,sBAAsB,EAAE,sBAAsB;YAC9C,GAAG;YACH,oBAAoB,EAAE,oBAAoB;SAC3C,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AA/CY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,qBAAc,EAAC,4CAAmB,CAAC;qCAMD,iBAAU;QACZ,eAAQ;QACE,qDAAwB;QAC7B,8BAAa;QACpB,+BAAa;GAT/B,mBAAmB,CA+C/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-update-row.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-update-row.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAKsB;AACtB,iEAA8F;AAC9F,2EAA8F;AAC9F,mEA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AE,sBAAsB;YAC9C,GAAG;YACH,oBAAoB,EAAE,oBAAoB;SAC3C,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AA/CY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,qBAAc,EAAC,4CAAmB,CAAC;qCAMD,iBAAU;QACZ,eAAQ;QACE,qDAAwB;QAC7B,8BAAa;QACpB,+BAAa;GAT/B,mBAAmB,CA+C/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-upload-file.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-upload-file.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAKsB;AACtB,iEAA8F;AAC9F,6EAGkE;AAClE,qEAG8D;AAC9D,kEAAiE;AACjE,kEAAkE;AAClE,+GAAkG;AAG3F,IAAM,oBAAoB,GAA1B,MAAM,oBACX,SAAQ,wCAAiB;IAIzB,YACqB,UAAsB,EACtB,QAAkB,EAClB,kBAA4C,EAC5C,aAA4B,EAC5B,MAAqB;QAExC,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QANpB,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAU;QAClB,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAe;IAG1C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAwB;QAC1C,MAAM,EACJ,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,GACrB,GAAgC,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAChE,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,uCAAiB,CAAC,IAAI,CAAC,CAAC,CACjE,CAAC;QAEF,MAAM,IAAI,CAAC,oBAAoB,CAAC;YAC9B,cAAc;YACd,sBAAsB;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC;YAC/C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,YAAY;SACb,CAAC,CAAC;QAEH,MAAM,MAAM,GAAmC;YAC7C,KAAK;YACL,sBAAsB,EAAE,sBAAsB;YAC9C,GAAG;YACH,oBAAoB,EAAE,oBAAoB;SAC3C,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"api-upload-file.handler.js","sourceRoot":"","sources":["../../../../../../src/features/draft/commands/handlers/api-upload-file.handler.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAKsB;AACtB,iEAA8F;AAC9F,6EAGkE;AAClE,qEAG8D;AAC9D,kEAAiE;AACjE,kEAAkE;AAClE,+GAAkG;AAG3F,IAAM,oBAAoB,GAA1B,MAAM,oBACX,SAAQ,wCAAiB;IAIzB,YACqB,UAAsB,EACtB,QAAkB,EAClB,kBAA4C,EAC5C,aAA4B,EAC5B,MAAqB;QAExC,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QANpB,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAU;QAClB,uBAAkB,GAAlB,kBAAkB,CAA0B;QAC5C,kBAAa,GAAb,aAAa,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAe;IAG1C,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAwB;QAC1C,MAAM,EACJ,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,oBAAoB,GACrB,GAAgC,MAAM,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAChE,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,uCAAiB,CAAC,IAAI,CAAC,CAAC,CACjE,CAAC;QAEF,MAAM,IAAI,CAAC,oBAAoB,CAAC;YAC9B,cAAc;YACd,sBAAsB;YACtB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC;YAC/C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,YAAY;SACb,CAAC,CAAC;QAEH,MAAM,MAAM,GAAmC;YAC7C,KAAK;YACL,sBAAsB,EAAE,sBAAsB;YAC9C,GAAG;YACH,oBAAoB,EAAE,oBAAoB;SAC3C,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AAhDY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,qBAAc,EAAC,8CAAoB,CAAC;qCAOF,iBAAU;QACZ,eAAQ;QACE,qDAAwB;QAC7B,8BAAa;QACpB,+BAAa;GAV/B,oBAAoB,CAgDhC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { EventBus } from '@nestjs/cqrs';
|
|
2
|
+
import { RevisionsApiService } from '../../../../features/revision';
|
|
3
|
+
import { CacheService } from '../../../../infrastructure/cache';
|
|
1
4
|
import { IdService } from '../../../../infrastructure/database/id.service';
|
|
2
5
|
import { TransactionPrismaService } from '../../../../infrastructure/database/transaction-prisma.service';
|
|
3
6
|
import { CreateRevisionHandlerReturnType } from '../../../../features/draft/commands/types/create-revision.handler.types';
|
|
@@ -7,12 +10,16 @@ import { DraftHandler } from '../../../../features/draft/draft.handler';
|
|
|
7
10
|
import { ShareTransactionalCommands } from '../../../../features/share/share.transactional.commands';
|
|
8
11
|
import { ShareTransactionalQueries } from '../../../../features/share/share.transactional.queries';
|
|
9
12
|
export declare class CreateRevisionHandler extends DraftHandler<CreateRevisionCommand, CreateRevisionHandlerReturnType> {
|
|
10
|
-
protected idService: IdService;
|
|
11
|
-
protected draftContext: DraftContextService;
|
|
12
|
-
protected transactionService: TransactionPrismaService;
|
|
13
|
-
protected shareTransactionalCommands: ShareTransactionalCommands;
|
|
14
|
-
protected shareTransactionalQueries: ShareTransactionalQueries;
|
|
15
|
-
|
|
13
|
+
protected readonly idService: IdService;
|
|
14
|
+
protected readonly draftContext: DraftContextService;
|
|
15
|
+
protected readonly transactionService: TransactionPrismaService;
|
|
16
|
+
protected readonly shareTransactionalCommands: ShareTransactionalCommands;
|
|
17
|
+
protected readonly shareTransactionalQueries: ShareTransactionalQueries;
|
|
18
|
+
protected readonly cache: CacheService;
|
|
19
|
+
protected readonly revisionApi: RevisionsApiService;
|
|
20
|
+
protected readonly eventBus: EventBus;
|
|
21
|
+
constructor(idService: IdService, draftContext: DraftContextService, transactionService: TransactionPrismaService, shareTransactionalCommands: ShareTransactionalCommands, shareTransactionalQueries: ShareTransactionalQueries, cache: CacheService, revisionApi: RevisionsApiService, eventBus: EventBus);
|
|
22
|
+
protected postActions(_: CreateRevisionCommand, result: CreateRevisionHandlerReturnType): Promise<void>;
|
|
16
23
|
protected handler({ data, }: CreateRevisionCommand): Promise<CreateRevisionHandlerReturnType>;
|
|
17
24
|
private getRevision;
|
|
18
25
|
private getNotTouchedBranchId;
|
|
@@ -12,6 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CreateRevisionHandler = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const cqrs_1 = require("@nestjs/cqrs");
|
|
15
|
+
const revision_1 = require("../../../revision");
|
|
16
|
+
const cache_1 = require("../../../../infrastructure/cache");
|
|
15
17
|
const id_service_1 = require("../../../../infrastructure/database/id.service");
|
|
16
18
|
const transaction_prisma_service_1 = require("../../../../infrastructure/database/transaction-prisma.service");
|
|
17
19
|
const create_revision_command_1 = require("../impl/create-revision.command");
|
|
@@ -20,13 +22,21 @@ const draft_handler_1 = require("../../draft.handler");
|
|
|
20
22
|
const share_transactional_commands_1 = require("../../../share/share.transactional.commands");
|
|
21
23
|
const share_transactional_queries_1 = require("../../../share/share.transactional.queries");
|
|
22
24
|
let CreateRevisionHandler = class CreateRevisionHandler extends draft_handler_1.DraftHandler {
|
|
23
|
-
constructor(idService, draftContext, transactionService, shareTransactionalCommands, shareTransactionalQueries) {
|
|
25
|
+
constructor(idService, draftContext, transactionService, shareTransactionalCommands, shareTransactionalQueries, cache, revisionApi, eventBus) {
|
|
24
26
|
super(transactionService, draftContext);
|
|
25
27
|
this.idService = idService;
|
|
26
28
|
this.draftContext = draftContext;
|
|
27
29
|
this.transactionService = transactionService;
|
|
28
30
|
this.shareTransactionalCommands = shareTransactionalCommands;
|
|
29
31
|
this.shareTransactionalQueries = shareTransactionalQueries;
|
|
32
|
+
this.cache = cache;
|
|
33
|
+
this.revisionApi = revisionApi;
|
|
34
|
+
this.eventBus = eventBus;
|
|
35
|
+
}
|
|
36
|
+
async postActions(_, result) {
|
|
37
|
+
await this.eventBus.publishAll([
|
|
38
|
+
new cache_1.RevisionCommittedEvent(result.previousHeadRevisionId, result.previousDraftRevisionId),
|
|
39
|
+
]);
|
|
30
40
|
}
|
|
31
41
|
async handler({ data, }) {
|
|
32
42
|
const { organizationId, projectName, branchName } = data;
|
|
@@ -52,6 +62,8 @@ let CreateRevisionHandler = class CreateRevisionHandler extends draft_handler_1.
|
|
|
52
62
|
toRevisionId: previousDraftRevision.id,
|
|
53
63
|
});
|
|
54
64
|
return {
|
|
65
|
+
previousHeadRevisionId: previousHeadRevision.id,
|
|
66
|
+
previousDraftRevisionId: previousDraftRevision.id,
|
|
55
67
|
nextDraftRevisionId: nextDraftRevision.id,
|
|
56
68
|
draftEndpoints,
|
|
57
69
|
headEndpoints,
|
|
@@ -130,6 +142,9 @@ exports.CreateRevisionHandler = CreateRevisionHandler = __decorate([
|
|
|
130
142
|
draft_context_service_1.DraftContextService,
|
|
131
143
|
transaction_prisma_service_1.TransactionPrismaService,
|
|
132
144
|
share_transactional_commands_1.ShareTransactionalCommands,
|
|
133
|
-
share_transactional_queries_1.ShareTransactionalQueries
|
|
145
|
+
share_transactional_queries_1.ShareTransactionalQueries,
|
|
146
|
+
cache_1.CacheService,
|
|
147
|
+
revision_1.RevisionsApiService,
|
|
148
|
+
cqrs_1.EventBus])
|
|
134
149
|
], CreateRevisionHandler);
|
|
135
150
|
//# sourceMappingURL=create-revision.handler.js.map
|