@revisium/core 0.9.3 → 0.9.4
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 +4 -2
- package/dist/src/__tests__/utils/createMocks.d.ts +5 -5
- package/dist/src/__tests__/utils/implementIdService.d.ts +1 -1
- package/dist/src/__tests__/utils/rowMocks.d.ts +1 -1
- package/dist/src/__tests__/utils/schema/schema.mocks.d.ts +2 -2
- package/dist/src/admin/admin-module.options.d.ts +3 -0
- package/dist/src/admin/admin-module.options.js +3 -0
- package/dist/src/admin/admin-module.options.js.map +1 -0
- package/dist/src/admin/admin.module.d.ts +6 -0
- package/dist/src/admin/admin.module.js +46 -0
- package/dist/src/admin/admin.module.js.map +1 -0
- package/dist/src/admin/envjs.controller.d.ts +6 -0
- package/dist/src/admin/envjs.controller.js +40 -0
- package/dist/src/admin/envjs.controller.js.map +1 -0
- package/dist/src/admin/index.d.ts +0 -0
- package/dist/src/admin/index.js +1 -0
- package/dist/src/admin/index.js.map +1 -0
- package/dist/src/auth/auth.service.d.ts +1 -1
- package/dist/src/auth/casl-ability.factory.d.ts +2 -2
- package/dist/src/auth/commands/handlers/check-organization-permission.handler.d.ts +3 -3
- package/dist/src/auth/commands/handlers/check-project-permission.handler.d.ts +3 -3
- package/dist/src/auth/commands/handlers/check-system-permission.handler.d.ts +3 -3
- package/dist/src/auth/commands/handlers/confirm-email-code.handler.d.ts +1 -1
- package/dist/src/auth/commands/handlers/create-user.handler.d.ts +4 -4
- package/dist/src/auth/commands/handlers/login-github.handler.d.ts +4 -4
- package/dist/src/auth/commands/handlers/login-google.handler.d.ts +4 -4
- package/dist/src/auth/commands/handlers/login.handler.d.ts +3 -3
- package/dist/src/auth/commands/handlers/sign-up.handler.d.ts +1 -1
- package/dist/src/auth/commands/impl/check-organization-permission.command.d.ts +1 -1
- package/dist/src/auth/commands/impl/check-project-permission.command.d.ts +1 -1
- package/dist/src/auth/commands/impl/check-system-permission.command.d.ts +1 -1
- package/dist/src/auth/commands/impl/create-user.command.d.ts +1 -1
- package/dist/src/auth/commands/index.d.ts +1 -1
- package/dist/src/auth/guards/base-persmission.guard.d.ts +2 -2
- package/dist/src/auth/guards/organization.guard.d.ts +3 -3
- package/dist/src/auth/guards/permission-params.d.ts +1 -1
- package/dist/src/auth/guards/project.guard.d.ts +3 -3
- package/dist/src/auth/guards/system.guard.d.ts +3 -3
- package/dist/src/auth/strategy/jwt.strategy.d.ts +2 -2
- package/dist/src/auth/utils.d.ts +1 -1
- package/dist/src/branch/commands/handlers/api-create-branch-by-revision-id.handler.d.ts +1 -1
- package/dist/src/branch/commands/handlers/create-branch-by-revision-id.handler.d.ts +3 -3
- package/dist/src/branch/commands/handlers/index.d.ts +2 -2
- package/dist/src/branch/quieries/handlers/get-branch-by-id.handler.d.ts +3 -3
- package/dist/src/branch/quieries/handlers/get-branch.handler.d.ts +4 -4
- package/dist/src/branch/quieries/handlers/get-branches.handler.d.ts +3 -3
- package/dist/src/branch/quieries/handlers/get-draft-revision.handler.d.ts +3 -3
- package/dist/src/branch/quieries/handlers/get-head-revision.handler.d.ts +3 -3
- package/dist/src/branch/quieries/handlers/get-project-by-branch.handler.d.ts +2 -2
- package/dist/src/branch/quieries/handlers/get-revisions-by-branch-id.handler.d.ts +2 -2
- package/dist/src/branch/quieries/handlers/get-start-revision.handler.d.ts +3 -3
- package/dist/src/branch/quieries/handlers/get-touched-by-branch-id.handler.d.ts +3 -3
- package/dist/src/branch/quieries/handlers/index.d.ts +10 -10
- package/dist/src/branch/quieries/handlers/resolve-parent-branch-by-branch.handler.d.ts +2 -2
- package/dist/src/clean/commands/handlers/clean-rows.handler.d.ts +2 -2
- package/dist/src/clean/commands/handlers/clean-tables.handler.d.ts +2 -2
- package/dist/src/clean/commands/handlers/index.d.ts +2 -2
- package/dist/src/configuration/queries/handlers/get-configuration.handler.d.ts +4 -4
- package/dist/src/configuration/queries/index.d.ts +1 -1
- package/dist/src/database/transaction-prisma.service.d.ts +2 -2
- package/dist/src/draft/commands/handlers/api-create-revision.handler.d.ts +3 -3
- package/dist/src/draft/commands/handlers/api-create-row.handler.d.ts +4 -4
- package/dist/src/draft/commands/handlers/api-create-table.handler.d.ts +4 -4
- package/dist/src/draft/commands/handlers/api-remove-row.handler.d.ts +4 -4
- package/dist/src/draft/commands/handlers/api-remove-table.handler.d.ts +4 -4
- package/dist/src/draft/commands/handlers/api-revert-changes.handler.d.ts +3 -3
- package/dist/src/draft/commands/handlers/api-update-row.handler.d.ts +4 -4
- package/dist/src/draft/commands/handlers/api-update-table.handler.d.ts +4 -4
- package/dist/src/draft/commands/handlers/create-revision.handler.d.ts +8 -8
- package/dist/src/draft/commands/handlers/create-row.handler.d.ts +12 -12
- package/dist/src/draft/commands/handlers/create-table.handler.d.ts +11 -11
- package/dist/src/draft/commands/handlers/index.d.ts +24 -24
- package/dist/src/draft/commands/handlers/remove-row.handler.d.ts +12 -12
- package/dist/src/draft/commands/handlers/remove-table.handler.d.ts +11 -11
- package/dist/src/draft/commands/handlers/revert-changes.handler.d.ts +6 -6
- package/dist/src/draft/commands/handlers/transactional/get-or-create-draft-row.handler.d.ts +8 -8
- package/dist/src/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.d.ts +8 -8
- package/dist/src/draft/commands/handlers/transactional/get-or-create-draft-table.handler.d.ts +7 -7
- package/dist/src/draft/commands/handlers/transactional/resolve-draft-revision.handler.d.ts +3 -3
- package/dist/src/draft/commands/handlers/transactional/validate-data.handler.d.ts +4 -4
- package/dist/src/draft/commands/handlers/transactional/validate-not-system-table.handler.d.ts +3 -3
- package/dist/src/draft/commands/handlers/transactional/validate-schema.handler.d.ts +4 -4
- package/dist/src/draft/commands/handlers/update-row.handler.d.ts +8 -8
- package/dist/src/draft/commands/handlers/update-rows.handler.d.ts +7 -7
- package/dist/src/draft/commands/handlers/update-table.handler.d.ts +9 -9
- package/dist/src/draft/commands/impl/api-update-table.command.d.ts +1 -1
- package/dist/src/draft/commands/impl/transactional/validate-data.command.d.ts +1 -1
- package/dist/src/draft/commands/impl/update-rows.command.d.ts +1 -1
- package/dist/src/draft/commands/impl/update-table.command.d.ts +1 -1
- package/dist/src/draft/commands/types/api-create-row.handler.types.d.ts +2 -2
- package/dist/src/draft/commands/types/api-remove-row.handler.types.d.ts +2 -2
- package/dist/src/draft/commands/types/api-remove-table.handler.types.d.ts +1 -1
- package/dist/src/draft/commands/types/api-update-row.handler.types.d.ts +2 -2
- package/dist/src/draft/commands/types/api-update-table.handler.types.d.ts +1 -1
- package/dist/src/draft/draft-request-dto/draft-revision-request.dto.d.ts +1 -1
- package/dist/src/draft/draft-request-dto/index.d.ts +4 -4
- package/dist/src/draft/draft-request-dto/row-request.dto.d.ts +1 -1
- package/dist/src/draft/draft-request-dto/rows-request.dto.d.ts +1 -1
- package/dist/src/draft/draft-request-dto/table-request.dto.d.ts +1 -1
- package/dist/src/draft/draft.handler.d.ts +2 -2
- package/dist/src/draft/draft.transactional.commands.d.ts +1 -1
- package/dist/src/draft/session-changelog.service.d.ts +4 -4
- package/dist/src/email/email.service.d.ts +2 -2
- package/dist/src/endpoint/commands/handlers/api-create-endpoint.handler.d.ts +1 -1
- package/dist/src/endpoint/commands/handlers/create-endpoint.handler.d.ts +3 -3
- package/dist/src/endpoint/commands/handlers/delete-endpoint.handler.d.ts +3 -3
- package/dist/src/endpoint/commands/handlers/index.d.ts +3 -3
- package/dist/src/endpoint/queries/handlers/get-created-endpoint.handler.d.ts +2 -2
- package/dist/src/endpoint/queries/handlers/get-revision-by-endpoint-id.handler.d.ts +2 -2
- package/dist/src/endpoint/queries/handlers/index.d.ts +2 -2
- package/dist/src/endpoint/queries/impl/index.d.ts +1 -1
- package/dist/src/graphql-api/auth/auth.resolver.d.ts +2 -2
- package/dist/src/graphql-api/auth/inputs/create-user.input.d.ts +1 -1
- package/dist/src/graphql-api/branch/branch.resolver.d.ts +6 -6
- package/dist/src/graphql-api/branch/inputs/index.d.ts +5 -5
- package/dist/src/graphql-api/branch/model/branch.model.d.ts +3 -3
- package/dist/src/graphql-api/branch/model/parent-branch.model.d.ts +2 -2
- package/dist/src/graphql-api/branch/parent-branch.resolver.d.ts +1 -1
- package/dist/src/graphql-api/configuration/configuration.resolver.d.ts +1 -1
- package/dist/src/graphql-api/draft/draft.resolver.d.ts +2 -2
- package/dist/src/graphql-api/draft/input/create-row.input.d.ts +1 -1
- package/dist/src/graphql-api/draft/input/index.d.ts +5 -5
- package/dist/src/graphql-api/draft/input/remove-row.input.d.ts +1 -1
- package/dist/src/graphql-api/draft/input/update-row.input.d.ts +1 -1
- package/dist/src/graphql-api/draft/input/update-table.input.d.ts +1 -1
- package/dist/src/graphql-api/draft/model/create-row-result.model.d.ts +2 -2
- package/dist/src/graphql-api/draft/model/create-table-result.model.d.ts +2 -2
- package/dist/src/graphql-api/draft/model/remove-row-result.model.d.ts +2 -2
- package/dist/src/graphql-api/draft/model/remove-table-result.model.d.ts +1 -1
- package/dist/src/graphql-api/draft/model/update-row-result.model.d.ts +2 -2
- package/dist/src/graphql-api/draft/model/update-table-result.model.d.ts +1 -1
- package/dist/src/graphql-api/endpoint/endpoint.resolver.d.ts +2 -2
- package/dist/src/graphql-api/endpoint/inputs/create-endpoint.input.d.ts +1 -1
- package/dist/src/graphql-api/endpoint/inputs/index.d.ts +3 -3
- package/dist/src/graphql-api/endpoint/model/endpoint.model.d.ts +1 -1
- package/dist/src/graphql-api/endpoint/model/index.d.ts +1 -1
- package/dist/src/graphql-api/organization/inputs/add-user-to-organization.input.d.ts +1 -1
- package/dist/src/graphql-api/organization/model/users-organization.connection.d.ts +1 -1
- package/dist/src/graphql-api/organization/model/users-organization.model.d.ts +2 -2
- package/dist/src/graphql-api/organization/organization.resolver.d.ts +4 -4
- package/dist/src/graphql-api/project/inputs/add-user-to-project.input.d.ts +1 -1
- package/dist/src/graphql-api/project/inputs/index.d.ts +7 -7
- package/dist/src/graphql-api/project/model/index.d.ts +1 -1
- package/dist/src/graphql-api/project/model/project.model.d.ts +1 -1
- package/dist/src/graphql-api/project/model/projects.connection.d.ts +1 -1
- package/dist/src/graphql-api/project/model/users-project.connection.d.ts +1 -1
- package/dist/src/graphql-api/project/model/users-project.model.d.ts +2 -2
- package/dist/src/graphql-api/project/project.resolver.d.ts +3 -3
- package/dist/src/graphql-api/revision/child-branch.resolver.d.ts +1 -1
- package/dist/src/graphql-api/revision/model/child-branch.model.d.ts +2 -2
- package/dist/src/graphql-api/revision/model/revision.model.d.ts +4 -4
- package/dist/src/graphql-api/revision/revision.resolver.d.ts +4 -4
- package/dist/src/graphql-api/row/inputs/index.d.ts +3 -3
- package/dist/src/graphql-api/row/model/row-reference.model.d.ts +2 -2
- package/dist/src/graphql-api/row/model/row-references-connection.model.d.ts +1 -1
- package/dist/src/graphql-api/row/model/row.model.d.ts +1 -1
- package/dist/src/graphql-api/row/model/rows-connection.model.d.ts +1 -1
- package/dist/src/graphql-api/row/row.resolver.d.ts +5 -5
- package/dist/src/graphql-api/share/model/paginated.model.d.ts +1 -1
- package/dist/src/graphql-api/table/model/table-connection.model.d.ts +1 -1
- package/dist/src/graphql-api/table/model/table.model.d.ts +2 -2
- package/dist/src/graphql-api/table/table.resolver.d.ts +6 -6
- package/dist/src/graphql-api/user/user.resolver.d.ts +4 -4
- package/dist/src/index.d.ts +5 -4
- package/dist/src/index.js +7 -7
- package/dist/src/index.js.map +1 -1
- package/dist/src/metrics/graphql/graphql-metrics.plugin.d.ts +1 -1
- package/dist/src/metrics/rest/rest-metrics.interceptor.d.ts +1 -1
- package/dist/src/metrics-api/metrics.controller.d.ts +1 -1
- package/dist/src/notification/in-memory-server.d.ts +6 -0
- package/dist/src/notification/in-memory-server.js +19 -0
- package/dist/src/notification/in-memory-server.js.map +1 -0
- package/dist/src/organization/commands/handlers/add-user-to-organization.handler.d.ts +3 -3
- package/dist/src/organization/commands/handlers/remove-user-from-organization.handler.d.ts +2 -2
- package/dist/src/organization/commands/impl/add-user-to-organization.command.d.ts +1 -1
- package/dist/src/organization/commands/index.d.ts +1 -1
- package/dist/src/organization/queries/handlers/get-projects-by-organization-id.handler.d.ts +2 -2
- package/dist/src/organization/queries/handlers/get-users-organization.handler.d.ts +2 -2
- package/dist/src/organization/queries/handlers/index.d.ts +1 -1
- package/dist/src/organization/queries/impl/get-projects-by-organization-id.query.d.ts +1 -1
- package/dist/src/organization/queries/impl/get-users-organization.query.d.ts +1 -1
- package/dist/src/organization/queries/impl/index.d.ts +1 -1
- package/dist/src/organization/queries/index.d.ts +2 -2
- package/dist/src/project/commands/handlers/add-user-to-project.handler.d.ts +3 -3
- package/dist/src/project/commands/handlers/api-create-project.handler.d.ts +1 -1
- package/dist/src/project/commands/handlers/create-project.handler.d.ts +3 -3
- package/dist/src/project/commands/handlers/delete-project.handler.d.ts +4 -4
- package/dist/src/project/commands/handlers/index.d.ts +6 -6
- package/dist/src/project/commands/handlers/remove-user-from-project.handler.d.ts +2 -2
- package/dist/src/project/commands/handlers/update-project.handler.d.ts +3 -3
- package/dist/src/project/commands/impl/add-user-to-project.command.d.ts +1 -1
- package/dist/src/project/queries/handlers/get-all-branches-by-project.handler.d.ts +2 -2
- package/dist/src/project/queries/handlers/get-project-by-id.handler.d.ts +2 -2
- package/dist/src/project/queries/handlers/get-project.handler.d.ts +3 -3
- package/dist/src/project/queries/handlers/get-root-branch-by-project.handler.d.ts +2 -2
- package/dist/src/project/queries/handlers/get-users-project.handler.d.ts +2 -2
- package/dist/src/project/queries/handlers/index.d.ts +5 -5
- package/dist/src/project/queries/impl/get-users-project.query.d.ts +1 -1
- package/dist/src/rest-api/auth/auth.controller.d.ts +3 -3
- package/dist/src/rest-api/auth/dto/create-user.dto.d.ts +1 -1
- package/dist/src/rest-api/branch/branch-by-name.controller.d.ts +3 -3
- package/dist/src/rest-api/configuration/configuration.controller.d.ts +1 -1
- package/dist/src/rest-api/organization/dto/add-user-to-organization.dto.d.ts +1 -1
- package/dist/src/rest-api/organization/dto/index.d.ts +5 -5
- package/dist/src/rest-api/organization/model/users-organization.model.d.ts +2 -2
- package/dist/src/rest-api/organization/organization.controller.d.ts +4 -4
- package/dist/src/rest-api/project/dto/add-user-to-project.dto.d.ts +1 -1
- package/dist/src/rest-api/project/model/users-project.model.d.ts +2 -2
- package/dist/src/rest-api/project/project.controller.d.ts +6 -6
- package/dist/src/rest-api/revision/dto/index.d.ts +3 -3
- package/dist/src/rest-api/revision/model/create-table.response.d.ts +2 -2
- package/dist/src/rest-api/revision/revision-by-id.controller.d.ts +7 -7
- package/dist/src/rest-api/row/model/remove-row.response.d.ts +2 -2
- package/dist/src/rest-api/row/model/update-row.response.d.ts +2 -2
- package/dist/src/rest-api/row/row-by-id.controller.d.ts +3 -3
- package/dist/src/rest-api/share/utils/transformFromPrismaToBranchModel.d.ts +1 -1
- package/dist/src/rest-api/share/utils/transformFromPrismaToEndpointsModel.d.ts +1 -1
- package/dist/src/rest-api/share/utils/transformFromPrismaToRevisionModel.d.ts +2 -2
- package/dist/src/rest-api/share/utils/transformFromPrismaToRowModel.d.ts +2 -2
- package/dist/src/rest-api/share/utils/transformFromPrismaToTableModel.d.ts +2 -2
- package/dist/src/rest-api/share/utils/transformFromPrismaToUserOrganizationModel.d.ts +3 -3
- package/dist/src/rest-api/share/utils/transformFromPrismaToUserProjectModel.d.ts +3 -3
- package/dist/src/rest-api/table/dto/update-table.dto.d.ts +1 -1
- package/dist/src/rest-api/table/model/create-row.response.d.ts +1 -1
- package/dist/src/rest-api/table/model/update-table.response.d.ts +1 -1
- package/dist/src/rest-api/table/table-by-id.controller.d.ts +6 -6
- package/dist/src/rest-api/user/user.controller.d.ts +2 -2
- package/dist/src/revision/queries/commands/get-children-by-revision.handler.d.ts +2 -2
- package/dist/src/revision/queries/commands/get-endpoints-by-revision-id.handler.d.ts +3 -3
- package/dist/src/revision/queries/commands/get-revision.handler.d.ts +2 -2
- package/dist/src/revision/queries/commands/get-tables-by-revision-id.handler.d.ts +3 -3
- package/dist/src/revision/queries/commands/index.d.ts +8 -8
- package/dist/src/revision/queries/commands/resolve-branch-by-revision.handler.d.ts +2 -2
- package/dist/src/revision/queries/commands/resolve-child-branches-by-revision.handler.d.ts +2 -2
- package/dist/src/revision/queries/commands/resolve-child-by-revision.handler.d.ts +2 -2
- package/dist/src/revision/queries/commands/resolve-parent-by-revision.handler.d.ts +2 -2
- package/dist/src/revision/queries/types/get-revision-tables.types.d.ts +2 -2
- package/dist/src/revision/queries/types/index.d.ts +1 -1
- package/dist/src/row/queries/handlers/get-row-by-id.handler.d.ts +3 -3
- package/dist/src/row/queries/handlers/get-row.handler.d.ts +4 -4
- package/dist/src/row/queries/handlers/get-rows.handler.d.ts +4 -4
- package/dist/src/row/queries/handlers/index.d.ts +7 -7
- package/dist/src/row/queries/handlers/resolve-row-count-references-by.handler.d.ts +5 -5
- package/dist/src/row/queries/handlers/resolve-row-count-references-to.handler.d.ts +3 -3
- package/dist/src/row/queries/handlers/resolve-row-references-by.handler.d.ts +5 -5
- package/dist/src/row/queries/handlers/resolve-row-references-to.handler.d.ts +5 -5
- package/dist/src/row/queries/impl/index.d.ts +4 -4
- package/dist/src/row/queries/types/get-row-by-id.types.d.ts +1 -1
- package/dist/src/row/queries/types/get-row.types.d.ts +1 -1
- package/dist/src/row/queries/types/get-rows.types.d.ts +2 -2
- package/dist/src/row/queries/types/resolve-row-references-by.types.d.ts +2 -2
- package/dist/src/row/queries/types/resolve-row-references-to.types.d.ts +2 -2
- package/dist/src/share/commands/handlers/index.d.ts +1 -1
- package/dist/src/share/commands/handlers/notify-endpoints.handler.d.ts +3 -3
- package/dist/src/share/commands/handlers/transactional/move-endpoints.handler.d.ts +2 -2
- package/dist/src/share/commands/utils/getOffsetPagination.d.ts +1 -1
- package/dist/src/share/commands/utils/getRevisionCursorPagination.d.ts +1 -1
- package/dist/src/share/const.d.ts +1 -1
- package/dist/src/share/queries/handlers/index.d.ts +3 -3
- package/dist/src/share/queries/handlers/transactional/find-branch-in-project-or-throw.handler.d.ts +3 -3
- package/dist/src/share/queries/handlers/transactional/find-draft-revision-in-branch-or-throw.handler.d.ts +3 -3
- package/dist/src/share/queries/handlers/transactional/find-head-revision-in-branch-or-throw.handler.d.ts +3 -3
- package/dist/src/share/queries/handlers/transactional/find-project-in-organization-or-throw.handler.d.ts +3 -3
- package/dist/src/share/queries/handlers/transactional/find-row-in-table-or-throw.handler.d.ts +3 -3
- package/dist/src/share/queries/handlers/transactional/find-rows-in-table-or-throw.handler.d.ts +3 -3
- package/dist/src/share/queries/handlers/transactional/find-table-in-revision-or-throw.handler.d.ts +3 -3
- package/dist/src/share/queries/handlers/transactional/get-table-schema.handler.d.ts +3 -3
- package/dist/src/share/queries/types/index.d.ts +7 -7
- package/dist/src/share/references.service.d.ts +1 -1
- package/dist/src/share/share.transactional.queries.d.ts +2 -2
- package/dist/src/share/utils/schema/lib/applyPatches.d.ts +2 -2
- package/dist/src/share/utils/schema/lib/createJsonSchemaStore.d.ts +3 -3
- package/dist/src/share/utils/schema/lib/createJsonValueStore.d.ts +7 -7
- package/dist/src/share/utils/schema/lib/getJsonSchemaStoreByPath.d.ts +1 -1
- package/dist/src/share/utils/schema/lib/getPathByStore.d.ts +1 -1
- package/dist/src/share/utils/schema/lib/getReferencesFromSchema.d.ts +1 -1
- package/dist/src/share/utils/schema/lib/getReferencesFromValue.d.ts +1 -1
- package/dist/src/share/utils/schema/lib/getValuePathByStore.d.ts +1 -1
- package/dist/src/share/utils/schema/lib/schema-table.d.ts +3 -3
- package/dist/src/share/utils/schema/lib/traverseStore.d.ts +1 -1
- package/dist/src/share/utils/schema/lib/traverseValue.d.ts +1 -1
- package/dist/src/share/utils/schema/model/schema/json-array.store.d.ts +4 -4
- package/dist/src/share/utils/schema/model/schema/json-boolean.store.d.ts +3 -3
- package/dist/src/share/utils/schema/model/schema/json-number.store.d.ts +3 -3
- package/dist/src/share/utils/schema/model/schema/json-object.store.d.ts +4 -4
- package/dist/src/share/utils/schema/model/schema/json-schema.store.d.ts +5 -5
- package/dist/src/share/utils/schema/model/schema/json-string.store.d.ts +3 -3
- package/dist/src/share/utils/schema/model/value/json-array-value.store.d.ts +4 -4
- package/dist/src/share/utils/schema/model/value/json-boolean-value.store.d.ts +2 -2
- package/dist/src/share/utils/schema/model/value/json-number-value.store.d.ts +2 -2
- package/dist/src/share/utils/schema/model/value/json-object-value.store.d.ts +4 -4
- package/dist/src/share/utils/schema/model/value/json-string-value.store.d.ts +2 -2
- package/dist/src/share/utils/schema/model/value/json-value.store.d.ts +5 -5
- package/dist/src/share/utils/schema/model/value/value-transformation.d.ts +1 -1
- package/dist/src/share/utils/schema/types/json-patch.types.d.ts +1 -1
- package/dist/src/table/queries/handlers/get-count-rows-in-table.handler.d.ts +2 -2
- package/dist/src/table/queries/handlers/get-rows-by-table.handler.d.ts +3 -3
- package/dist/src/table/queries/handlers/get-table-by-id.handler.d.ts +3 -3
- package/dist/src/table/queries/handlers/get-table.handler.d.ts +4 -4
- package/dist/src/table/queries/handlers/get-tables.handler.d.ts +3 -3
- package/dist/src/table/queries/handlers/index.d.ts +10 -10
- package/dist/src/table/queries/handlers/resolve-table-count-references-by.handler.d.ts +4 -4
- package/dist/src/table/queries/handlers/resolve-table-count-references-to.handler.d.ts +3 -3
- package/dist/src/table/queries/handlers/resolve-table-references-by.handler.d.ts +5 -5
- package/dist/src/table/queries/handlers/resolve-table-references-to.handler.d.ts +4 -4
- package/dist/src/table/queries/handlers/resolve-table-schema.handler.d.ts +3 -3
- package/dist/src/table/queries/types/get-table-by-id.types.d.ts +1 -1
- package/dist/src/table/queries/types/get-table-rows.types.d.ts +2 -2
- package/dist/src/table/queries/types/get-table.types.d.ts +1 -1
- package/dist/src/table/queries/types/get-tables.types.d.ts +2 -2
- package/dist/src/table/queries/types/index.d.ts +6 -6
- package/dist/src/table/queries/types/resolve-table-references-by.types.d.ts +2 -2
- package/dist/src/table/queries/types/resolve-table-references-to.types.d.ts +2 -2
- package/dist/src/user/commands/handlers/set-username.handler.d.ts +3 -3
- package/dist/src/user/commands/handlers/update-password.handler.d.ts +3 -3
- package/dist/src/user/commands/index.d.ts +1 -1
- package/dist/src/user/queries/handlers/get-projects-by-user-id.handler.d.ts +2 -2
- package/dist/src/user/queries/handlers/get-user-organization.handler.d.ts +2 -2
- package/dist/src/user/queries/handlers/get-user.handler.d.ts +2 -2
- package/dist/src/user/queries/impl/get-projects-by-user-id.query.d.ts +1 -1
- package/dist/src/user/queries/impl/index.d.ts +1 -1
- package/dist/src/user/queries/index.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -2
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revisium/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Revisium is a tool (UI/API) inspired by JSON (JSON Schema) and Git, designed to provide a flexible and low-level headless CMS solution.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://revisium.io",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"generate:seed:load": "ts-node prisma/seed/loadFromSeedApi.ts",
|
|
24
24
|
"seed": "ts-node prisma/seed.ts",
|
|
25
25
|
"seed:prod": "node dist/prisma/seed.js",
|
|
26
|
-
"build": "nest build",
|
|
26
|
+
"build": "nest build && tsc-alias -p tsconfig.build.json",
|
|
27
27
|
"prepublishOnly": "npm run build",
|
|
28
28
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
29
29
|
"start": "nest start",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"@nestjs/passport": "^10.0.3",
|
|
56
56
|
"@nestjs/platform-express": "^10.3.3",
|
|
57
57
|
"@nestjs/schedule": "^4.0.1",
|
|
58
|
+
"@nestjs/serve-static": "^4.0.2",
|
|
58
59
|
"@nestjs/swagger": "^7.4.2",
|
|
59
60
|
"@prisma/client": "^5.22.0",
|
|
60
61
|
"ajv": "^8.16.0",
|
|
@@ -102,6 +103,7 @@
|
|
|
102
103
|
"ts-jest": "^29.1.2",
|
|
103
104
|
"ts-loader": "^9.5.1",
|
|
104
105
|
"ts-node": "^10.9.2",
|
|
106
|
+
"tsc-alias": "^1.8.10",
|
|
105
107
|
"tsconfig-paths": "^4.2.0",
|
|
106
108
|
"typescript": "^5.4.2"
|
|
107
109
|
},
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CommandBus } from '@nestjs/cqrs';
|
|
2
2
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
3
3
|
import { DeepMockProxy } from 'jest-mock-extended';
|
|
4
|
-
import { IdService } from '
|
|
5
|
-
import { PrismaService } from '
|
|
6
|
-
import { TransactionPrismaService } from '
|
|
7
|
-
import { ShareTransactionalCommands } from '
|
|
8
|
-
import { ShareTransactionalQueries } from '
|
|
4
|
+
import { IdService } from '../../database/id.service';
|
|
5
|
+
import { PrismaService } from '../../database/prisma.service';
|
|
6
|
+
import { TransactionPrismaService } from '../../database/transaction-prisma.service';
|
|
7
|
+
import { ShareTransactionalCommands } from '../../share/share.transactional.commands';
|
|
8
|
+
import { ShareTransactionalQueries } from '../../share/share.transactional.queries';
|
|
9
9
|
export declare const createMocks: ({ asyncLocalStorageStore, }?: {
|
|
10
10
|
asyncLocalStorageStore?: any;
|
|
11
11
|
}) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DeepMockProxy } from 'jest-mock-extended';
|
|
2
|
-
import { IdService } from '
|
|
2
|
+
import { IdService } from '../../database/id.service';
|
|
3
3
|
export declare const implementIdService: (idService: DeepMockProxy<IdService>, sequenceGeneratedId: string[]) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeepMockProxy } from 'jest-mock-extended';
|
|
2
|
-
import { DraftTransactionalCommands } from '
|
|
2
|
+
import { DraftTransactionalCommands } from '../../draft/draft.transactional.commands';
|
|
3
3
|
export declare const createRowMocks: () => {
|
|
4
4
|
rowTransactionalCommands: DeepMockProxy<DraftTransactionalCommands>;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JsonPatchAdd, JsonPatchMove, JsonPatchRemove, JsonPatchReplace } from '
|
|
2
|
-
import { JsonArraySchema, JsonBooleanSchema, JsonNumberSchema, JsonObjectSchema, JsonSchema, JsonStringSchema } from '
|
|
1
|
+
import { JsonPatchAdd, JsonPatchMove, JsonPatchRemove, JsonPatchReplace } from '../../../share/utils/schema/types/json-patch.types';
|
|
2
|
+
import { JsonArraySchema, JsonBooleanSchema, JsonNumberSchema, JsonObjectSchema, JsonSchema, JsonStringSchema } from '../../../share/utils/schema/types/schema.types';
|
|
3
3
|
export declare const getReplacePatch: ({ path, value, }: {
|
|
4
4
|
path: string;
|
|
5
5
|
value: JsonSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-module.options.js","sourceRoot":"","sources":["../../../src/admin/admin-module.options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DynamicModule, MiddlewareConsumer, NestModule } from '@nestjs/common';
|
|
2
|
+
import { AdminModuleOptions } from '../admin/admin-module.options';
|
|
3
|
+
export declare class AdminModule implements NestModule {
|
|
4
|
+
static forRoot(options: AdminModuleOptions): DynamicModule;
|
|
5
|
+
configure(consumer: MiddlewareConsumer): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 AdminModule_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.AdminModule = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
const config_1 = require("@nestjs/config");
|
|
13
|
+
const serve_static_1 = require("@nestjs/serve-static");
|
|
14
|
+
const envjs_controller_1 = require("./envjs.controller");
|
|
15
|
+
let AdminModule = AdminModule_1 = class AdminModule {
|
|
16
|
+
static forRoot(options) {
|
|
17
|
+
const serveStaticOptions = {
|
|
18
|
+
rootPath: options.rootPath,
|
|
19
|
+
serveStaticOptions: {
|
|
20
|
+
cacheControl: true,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
module: AdminModule_1,
|
|
25
|
+
imports: [config_1.ConfigModule, serve_static_1.ServeStaticModule.forRoot(serveStaticOptions)],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
configure(consumer) {
|
|
29
|
+
consumer
|
|
30
|
+
.apply((req, res, next) => {
|
|
31
|
+
const excludedExtensions = /\.(js|css|svg|png|jpg|jpeg)$/;
|
|
32
|
+
if (!excludedExtensions.test(req.baseUrl)) {
|
|
33
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
34
|
+
}
|
|
35
|
+
next();
|
|
36
|
+
})
|
|
37
|
+
.forRoutes('*');
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.AdminModule = AdminModule;
|
|
41
|
+
exports.AdminModule = AdminModule = AdminModule_1 = __decorate([
|
|
42
|
+
(0, common_1.Module)({
|
|
43
|
+
controllers: [envjs_controller_1.EnvJsController],
|
|
44
|
+
})
|
|
45
|
+
], AdminModule);
|
|
46
|
+
//# sourceMappingURL=admin.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.module.js","sourceRoot":"","sources":["../../../src/admin/admin.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAKwB;AACxB,2CAA8C;AAC9C,uDAG8B;AAG9B,yDAA6D;AAKtD,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACtB,MAAM,CAAC,OAAO,CAAC,OAA2B;QACxC,MAAM,kBAAkB,GAA6B;YACnD,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,kBAAkB,EAAE;gBAClB,YAAY,EAAE,IAAI;aACnB;SACF,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,aAAW;YACnB,OAAO,EAAE,CAAC,qBAAY,EAAE,gCAAiB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;SACvE,CAAC;IACJ,CAAC;IAED,SAAS,CAAC,QAA4B;QACpC,QAAQ;aACL,KAAK,CAAC,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACzD,MAAM,kBAAkB,GAAG,8BAA8B,CAAC;YAE1D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC1C,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;YAC7C,CAAC;YAED,IAAI,EAAE,CAAC;QACT,CAAC,CAAC;aACD,SAAS,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;CACF,CAAA;AA5BY,kCAAW;sBAAX,WAAW;IAHvB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,kCAAe,CAAC;KAC/B,CAAC;GACW,WAAW,CA4BvB"}
|
|
@@ -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
|
+
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.EnvJsController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const config_1 = require("@nestjs/config");
|
|
15
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
16
|
+
let EnvJsController = class EnvJsController {
|
|
17
|
+
constructor(configService) {
|
|
18
|
+
this.configService = configService;
|
|
19
|
+
}
|
|
20
|
+
envJs() {
|
|
21
|
+
const envs = {
|
|
22
|
+
REACT_APP_ENDPOINT_HOST: this.configService.get('REACT_APP_ENDPOINT_HOST'),
|
|
23
|
+
REACT_APP_ENDPOINT_PORT: this.configService.get('REACT_APP_ENDPOINT_PORT'),
|
|
24
|
+
};
|
|
25
|
+
return `window.__env__ = ${JSON.stringify(envs)}`;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.EnvJsController = EnvJsController;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, common_1.Get)('env.js'),
|
|
31
|
+
__metadata("design:type", Function),
|
|
32
|
+
__metadata("design:paramtypes", []),
|
|
33
|
+
__metadata("design:returntype", void 0)
|
|
34
|
+
], EnvJsController.prototype, "envJs", null);
|
|
35
|
+
exports.EnvJsController = EnvJsController = __decorate([
|
|
36
|
+
(0, swagger_1.ApiExcludeController)(),
|
|
37
|
+
(0, common_1.Controller)(),
|
|
38
|
+
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
39
|
+
], EnvJsController);
|
|
40
|
+
//# sourceMappingURL=envjs.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envjs.controller.js","sourceRoot":"","sources":["../../../src/admin/envjs.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,2CAA+C;AAC/C,6CAAuD;AAIhD,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAGpD,KAAK;QACH,MAAM,IAAI,GAAG;YACX,uBAAuB,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAC7C,yBAAyB,CAC1B;YACD,uBAAuB,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAC7C,yBAAyB,CAC1B;SACF,CAAC;QAEF,OAAO,oBAAoB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;IACpD,CAAC;CACF,CAAA;AAhBY,0CAAe;AAI1B;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;;;;4CAYb;0BAfU,eAAe;IAF3B,IAAA,8BAAoB,GAAE;IACtB,IAAA,mBAAU,GAAE;qCAEwB,sBAAa;GADrC,eAAe,CAgB3B"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/admin/index.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JwtService } from '@nestjs/jwt';
|
|
2
|
-
import { JwtSecretService } from '
|
|
2
|
+
import { JwtSecretService } from '../auth/jwt-secret.service';
|
|
3
3
|
export declare class AuthService {
|
|
4
4
|
private readonly jwtService;
|
|
5
5
|
private readonly jwtSecret;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PureAbility } from '@casl/ability';
|
|
2
2
|
import { PrismaQuery, Subjects } from '@casl/prisma';
|
|
3
3
|
import { Organization, Project, Branch, Revision, Table, Row, Endpoint, User } from '@prisma/client';
|
|
4
|
-
import { PermissionAction, UserRole } from '
|
|
5
|
-
import { PrismaService } from '
|
|
4
|
+
import { PermissionAction, UserRole } from '../auth/consts';
|
|
5
|
+
import { PrismaService } from '../database/prisma.service';
|
|
6
6
|
export type AppSubjects = Subjects<{
|
|
7
7
|
Organization: Organization;
|
|
8
8
|
Project: Project;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { CaslAbilityFactory } from '
|
|
3
|
-
import { CheckOrganizationPermissionCommand } from '
|
|
4
|
-
import { PrismaService } from '
|
|
2
|
+
import { CaslAbilityFactory } from '../../../auth/casl-ability.factory';
|
|
3
|
+
import { CheckOrganizationPermissionCommand } from '../../../auth/commands/impl/check-organization-permission.command';
|
|
4
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
5
5
|
export declare class CheckOrganizationPermissionHandler implements ICommandHandler<CheckOrganizationPermissionCommand, true> {
|
|
6
6
|
private readonly prisma;
|
|
7
7
|
private readonly casl;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { CaslAbilityFactory } from '
|
|
3
|
-
import { CheckProjectPermissionCommand } from '
|
|
4
|
-
import { PrismaService } from '
|
|
2
|
+
import { CaslAbilityFactory } from '../../../auth/casl-ability.factory';
|
|
3
|
+
import { CheckProjectPermissionCommand } from '../../../auth/commands/impl';
|
|
4
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
5
5
|
export declare class CheckProjectPermissionHandler implements ICommandHandler<CheckProjectPermissionCommand, true> {
|
|
6
6
|
private readonly prisma;
|
|
7
7
|
private readonly casl;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { CaslAbilityFactory } from '
|
|
3
|
-
import { CheckSystemPermissionCommand, CheckSystemPermissionCommandReturnType } from '
|
|
4
|
-
import { PrismaService } from '
|
|
2
|
+
import { CaslAbilityFactory } from '../../../auth/casl-ability.factory';
|
|
3
|
+
import { CheckSystemPermissionCommand, CheckSystemPermissionCommandReturnType } from '../../../auth/commands/impl';
|
|
4
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
5
5
|
export declare class CheckSystemPermissionHandler implements ICommandHandler<CheckSystemPermissionCommand, CheckSystemPermissionCommandReturnType> {
|
|
6
6
|
private readonly prisma;
|
|
7
7
|
private readonly casl;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { PrismaService } from '
|
|
2
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
3
3
|
import { AuthService } from '../../auth.service';
|
|
4
4
|
import { ConfirmEmailCodeCommand, ConfirmEmailCodeCommandReturnType } from '../impl';
|
|
5
5
|
export declare class ConfirmEmailCodeHandler implements ICommandHandler<ConfirmEmailCodeCommand, ConfirmEmailCodeCommandReturnType> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { AuthService } from '
|
|
3
|
-
import { CreateUserCommand, CreateUserCommandReturnType } from '
|
|
4
|
-
import { IdService } from '
|
|
5
|
-
import { PrismaService } from '
|
|
2
|
+
import { AuthService } from '../../../auth/auth.service';
|
|
3
|
+
import { CreateUserCommand, CreateUserCommandReturnType } from '../../../auth/commands/impl';
|
|
4
|
+
import { IdService } from '../../../database/id.service';
|
|
5
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
6
6
|
export declare class CreateUserHandler implements ICommandHandler<CreateUserCommand, CreateUserCommandReturnType> {
|
|
7
7
|
private readonly prisma;
|
|
8
8
|
private readonly idService;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CommandBus, ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { AuthService } from '
|
|
3
|
-
import { LoginGithubCommand, LoginGithubCommandReturnType } from '
|
|
4
|
-
import { GitHubAuthService } from '
|
|
5
|
-
import { PrismaService } from '
|
|
2
|
+
import { AuthService } from '../../../auth/auth.service';
|
|
3
|
+
import { LoginGithubCommand, LoginGithubCommandReturnType } from '../../../auth/commands/impl';
|
|
4
|
+
import { GitHubAuthService } from '../../../auth/github-oauth.service';
|
|
5
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
6
6
|
export declare class LoginGithubHandler implements ICommandHandler<LoginGithubCommand, LoginGithubCommandReturnType> {
|
|
7
7
|
private readonly commandBus;
|
|
8
8
|
private readonly prisma;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CommandBus, ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { AuthService } from '
|
|
3
|
-
import { LoginGoogleCommand, LoginGoogleCommandReturnType } from '
|
|
4
|
-
import { GoogleOauthService } from '
|
|
5
|
-
import { PrismaService } from '
|
|
2
|
+
import { AuthService } from '../../../auth/auth.service';
|
|
3
|
+
import { LoginGoogleCommand, LoginGoogleCommandReturnType } from '../../../auth/commands/impl';
|
|
4
|
+
import { GoogleOauthService } from '../../../auth/google-oauth.service';
|
|
5
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
6
6
|
export declare class LoginGoogleHandler implements ICommandHandler<LoginGoogleCommand, LoginGoogleCommandReturnType> {
|
|
7
7
|
private readonly commandBus;
|
|
8
8
|
private readonly prisma;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { AuthService } from '
|
|
3
|
-
import { LoginCommand, LoginCommandReturnType } from '
|
|
4
|
-
import { PrismaService } from '
|
|
2
|
+
import { AuthService } from '../../../auth/auth.service';
|
|
3
|
+
import { LoginCommand, LoginCommandReturnType } from '../../../auth/commands/impl';
|
|
4
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
5
5
|
export declare class LoginHandler implements ICommandHandler<LoginCommand, LoginCommandReturnType> {
|
|
6
6
|
private readonly prisma;
|
|
7
7
|
private readonly authService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandBus, ICommandHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { EmailService } from '
|
|
2
|
+
import { EmailService } from '../../../email/email.service';
|
|
3
3
|
import { AuthService } from '../../auth.service';
|
|
4
4
|
import { SignUpCommand, SignUpCommandReturnType } from '../impl';
|
|
5
5
|
export declare class SignUpHandler implements ICommandHandler<SignUpCommand, SignUpCommandReturnType> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPermissionParams } from '
|
|
1
|
+
import { IPermissionParams } from '../../../auth/guards/permission-params';
|
|
2
2
|
export declare class CheckOrganizationPermissionCommand {
|
|
3
3
|
readonly data: {
|
|
4
4
|
readonly permissions: IPermissionParams[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CheckOrganizationPermissionHandler, CheckProjectPermissionHandler, CheckSystemPermissionHandler, ConfirmEmailCodeHandler, CreateUserHandler, LoginGithubHandler, LoginGoogleHandler, LoginHandler, SignUpHandler } from '
|
|
1
|
+
import { CheckOrganizationPermissionHandler, CheckProjectPermissionHandler, CheckSystemPermissionHandler, ConfirmEmailCodeHandler, CreateUserHandler, LoginGithubHandler, LoginGoogleHandler, LoginHandler, SignUpHandler } from '../../auth/commands/handlers';
|
|
2
2
|
export declare const AUTH_COMMANDS: (typeof LoginHandler | typeof CreateUserHandler | typeof CheckSystemPermissionHandler | typeof CheckOrganizationPermissionHandler | typeof CheckProjectPermissionHandler | typeof SignUpHandler | typeof LoginGoogleHandler | typeof LoginGithubHandler | typeof ConfirmEmailCodeHandler)[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
|
2
2
|
import { Reflector } from '@nestjs/core';
|
|
3
3
|
import { CommandBus } from '@nestjs/cqrs';
|
|
4
|
-
import { IPermissionParams } from '
|
|
5
|
-
import { IOptionalAuthUser } from '
|
|
4
|
+
import { IPermissionParams } from '../../auth/guards/permission-params';
|
|
5
|
+
import { IOptionalAuthUser } from '../../auth/types';
|
|
6
6
|
export declare abstract class BasePermissionGuard<T = Record<string, never>> implements CanActivate {
|
|
7
7
|
protected reflector: Reflector;
|
|
8
8
|
protected commandBus: CommandBus;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExecutionContext } from '@nestjs/common';
|
|
2
|
-
import { CheckOrganizationPermissionCommand } from '
|
|
3
|
-
import { BasePermissionGuard } from '
|
|
4
|
-
import { IPermissionParams } from '
|
|
2
|
+
import { CheckOrganizationPermissionCommand } from '../../auth/commands/impl/check-organization-permission.command';
|
|
3
|
+
import { BasePermissionGuard } from '../../auth/guards/base-persmission.guard';
|
|
4
|
+
import { IPermissionParams } from '../../auth/guards/permission-params';
|
|
5
5
|
interface Params {
|
|
6
6
|
organizationId?: string;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExecutionContext } from '@nestjs/common';
|
|
2
|
-
import { CheckProjectPermissionCommand } from '
|
|
3
|
-
import { BasePermissionGuard } from '
|
|
4
|
-
import { IPermissionParams } from '
|
|
2
|
+
import { CheckProjectPermissionCommand } from '../../auth/commands/impl';
|
|
3
|
+
import { BasePermissionGuard } from '../../auth/guards/base-persmission.guard';
|
|
4
|
+
import { IPermissionParams } from '../../auth/guards/permission-params';
|
|
5
5
|
interface Params {
|
|
6
6
|
organizationId?: string;
|
|
7
7
|
projectName?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExecutionContext } from '@nestjs/common';
|
|
2
|
-
import { CheckSystemPermissionCommand } from '
|
|
3
|
-
import { BasePermissionGuard } from '
|
|
4
|
-
import { IPermissionParams } from '
|
|
2
|
+
import { CheckSystemPermissionCommand } from '../../auth/commands/impl';
|
|
3
|
+
import { BasePermissionGuard } from '../../auth/guards/base-persmission.guard';
|
|
4
|
+
import { IPermissionParams } from '../../auth/guards/permission-params';
|
|
5
5
|
declare abstract class SystemGuard extends BasePermissionGuard {
|
|
6
6
|
protected getCommand(_: Record<string, never>, permissions: IPermissionParams[], userId?: string): CheckSystemPermissionCommand;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Strategy } from 'passport-jwt';
|
|
2
|
-
import { JwtSecretService } from '
|
|
3
|
-
import { IAuthUser } from '
|
|
2
|
+
import { JwtSecretService } from '../../auth/jwt-secret.service';
|
|
3
|
+
import { IAuthUser } from '../../auth/types';
|
|
4
4
|
declare const JwtStrategy_base: new (...args: any[]) => Strategy;
|
|
5
5
|
export declare class JwtStrategy extends JwtStrategy_base {
|
|
6
6
|
constructor(jwtSecret: JwtSecretService);
|
package/dist/src/auth/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { UserRole } from '
|
|
1
|
+
import { UserRole } from '../auth/consts';
|
|
2
2
|
export declare function getUserRole(roleId: string | undefined): UserRole;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandBus, ICommandHandler, QueryBus } from '@nestjs/cqrs';
|
|
2
|
-
import { ApiCreateBranchByRevisionIdCommand } from '
|
|
2
|
+
import { ApiCreateBranchByRevisionIdCommand } from '../../../branch/commands/impl';
|
|
3
3
|
export declare class ApiCreateBranchByRevisionIdHandler implements ICommandHandler<ApiCreateBranchByRevisionIdCommand> {
|
|
4
4
|
private readonly commandBus;
|
|
5
5
|
private readonly queryBus;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ICommandHandler } from '@nestjs/cqrs';
|
|
2
2
|
import { Prisma } from '@prisma/client';
|
|
3
|
-
import { CreateBranchByRevisionIdCommand } from '
|
|
4
|
-
import { IdService } from '
|
|
5
|
-
import { TransactionPrismaService } from '
|
|
3
|
+
import { CreateBranchByRevisionIdCommand } from '../../../branch/commands/impl';
|
|
4
|
+
import { IdService } from '../../../database/id.service';
|
|
5
|
+
import { TransactionPrismaService } from '../../../database/transaction-prisma.service';
|
|
6
6
|
export declare class CreateBranchByRevisionIdHandler implements ICommandHandler<CreateBranchByRevisionIdCommand> {
|
|
7
7
|
private transactionService;
|
|
8
8
|
private idService;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ApiCreateBranchByRevisionIdHandler } from '
|
|
2
|
-
import { CreateBranchByRevisionIdHandler } from '
|
|
1
|
+
import { ApiCreateBranchByRevisionIdHandler } from '../../../branch/commands/handlers/api-create-branch-by-revision-id.handler';
|
|
2
|
+
import { CreateBranchByRevisionIdHandler } from '../../../branch/commands/handlers/create-branch-by-revision-id.handler';
|
|
3
3
|
export declare const BRANCH_COMMANDS_HANDLERS: (typeof ApiCreateBranchByRevisionIdHandler | typeof CreateBranchByRevisionIdHandler)[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IQueryHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { GetBranchByIdQuery } from '
|
|
3
|
-
import { GetBranchByIdReturnType } from '
|
|
4
|
-
import { PrismaService } from '
|
|
2
|
+
import { GetBranchByIdQuery } from '../../../branch/quieries/impl/get-branch-by-id.query';
|
|
3
|
+
import { GetBranchByIdReturnType } from '../../../branch/quieries/types/get-branch-by-id.types';
|
|
4
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
5
5
|
export declare class GetBranchByIdHandler implements IQueryHandler<GetBranchByIdQuery, GetBranchByIdReturnType> {
|
|
6
6
|
private prisma;
|
|
7
7
|
constructor(prisma: PrismaService);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IQueryHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { GetBranchQuery } from '
|
|
3
|
-
import { GetBranchReturnType } from '
|
|
4
|
-
import { TransactionPrismaService } from '
|
|
5
|
-
import { ShareTransactionalQueries } from '
|
|
2
|
+
import { GetBranchQuery } from '../../../branch/quieries/impl/get-branch.query';
|
|
3
|
+
import { GetBranchReturnType } from '../../../branch/quieries/types';
|
|
4
|
+
import { TransactionPrismaService } from '../../../database/transaction-prisma.service';
|
|
5
|
+
import { ShareTransactionalQueries } from '../../../share/share.transactional.queries';
|
|
6
6
|
export declare class GetBranchHandler implements IQueryHandler<GetBranchQuery> {
|
|
7
7
|
private transactionPrisma;
|
|
8
8
|
private shareTransactionalQueries;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IQueryHandler } from '@nestjs/cqrs';
|
|
2
2
|
import { Prisma } from '@prisma/client';
|
|
3
|
-
import { GetBranchesQuery } from '
|
|
4
|
-
import { TransactionPrismaService } from '
|
|
5
|
-
import { ShareTransactionalQueries } from '
|
|
3
|
+
import { GetBranchesQuery } from '../../../branch/quieries/impl/get-branches.query';
|
|
4
|
+
import { TransactionPrismaService } from '../../../database/transaction-prisma.service';
|
|
5
|
+
import { ShareTransactionalQueries } from '../../../share/share.transactional.queries';
|
|
6
6
|
export declare class GetBranchesHandler implements IQueryHandler<GetBranchesQuery> {
|
|
7
7
|
private transactionPrisma;
|
|
8
8
|
private shareTransactionalQueries;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IQueryHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { GetDraftRevisionQuery } from '
|
|
3
|
-
import { GetDraftRevisionTypes } from '
|
|
4
|
-
import { PrismaService } from '
|
|
2
|
+
import { GetDraftRevisionQuery } from '../../../branch/quieries/impl';
|
|
3
|
+
import { GetDraftRevisionTypes } from '../../../branch/quieries/types';
|
|
4
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
5
5
|
export declare class GetDraftRevisionHandler implements IQueryHandler<GetDraftRevisionQuery> {
|
|
6
6
|
private prisma;
|
|
7
7
|
constructor(prisma: PrismaService);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IQueryHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { GetHeadRevisionQuery } from '
|
|
3
|
-
import { GetHeadRevisionReturnType } from '
|
|
4
|
-
import { PrismaService } from '
|
|
2
|
+
import { GetHeadRevisionQuery } from '../../../branch/quieries/impl';
|
|
3
|
+
import { GetHeadRevisionReturnType } from '../../../branch/quieries/types';
|
|
4
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
5
5
|
export declare class GetHeadRevisionHandler implements IQueryHandler<GetHeadRevisionQuery> {
|
|
6
6
|
private prisma;
|
|
7
7
|
constructor(prisma: PrismaService);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IQueryHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { GetProjectByBranchQuery } from '
|
|
3
|
-
import { PrismaService } from '
|
|
2
|
+
import { GetProjectByBranchQuery } from '../../../branch/quieries/impl';
|
|
3
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
4
4
|
export declare class GetProjectByBranchHandler implements IQueryHandler<GetProjectByBranchQuery> {
|
|
5
5
|
private prisma;
|
|
6
6
|
constructor(prisma: PrismaService);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IQueryHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { GetRevisionsByBranchIdQuery } from '
|
|
3
|
-
import { PrismaService } from '
|
|
2
|
+
import { GetRevisionsByBranchIdQuery } from '../../../branch/quieries/impl/get-revisions-by-branch-id.query';
|
|
3
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
4
4
|
export declare class GetRevisionsByBranchIdHandler implements IQueryHandler<GetRevisionsByBranchIdQuery> {
|
|
5
5
|
private prisma;
|
|
6
6
|
constructor(prisma: PrismaService);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IQueryHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { GetStartRevisionQuery } from '
|
|
3
|
-
import { GetStartRevisionReturnType } from '
|
|
4
|
-
import { PrismaService } from '
|
|
2
|
+
import { GetStartRevisionQuery } from '../../../branch/quieries/impl';
|
|
3
|
+
import { GetStartRevisionReturnType } from '../../../branch/quieries/types';
|
|
4
|
+
import { PrismaService } from '../../../database/prisma.service';
|
|
5
5
|
export declare class GetStartRevisionHandler implements IQueryHandler<GetStartRevisionQuery> {
|
|
6
6
|
private prisma;
|
|
7
7
|
constructor(prisma: PrismaService);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IQueryHandler } from '@nestjs/cqrs';
|
|
2
|
-
import { GetTouchedByBranchIdQuery } from '
|
|
3
|
-
import { TransactionPrismaService } from '
|
|
4
|
-
import { ShareTransactionalQueries } from '
|
|
2
|
+
import { GetTouchedByBranchIdQuery } from '../../../branch/quieries/impl';
|
|
3
|
+
import { TransactionPrismaService } from '../../../database/transaction-prisma.service';
|
|
4
|
+
import { ShareTransactionalQueries } from '../../../share/share.transactional.queries';
|
|
5
5
|
export declare class GetTouchedByBranchIdHandler implements IQueryHandler<GetTouchedByBranchIdQuery> {
|
|
6
6
|
private transactionService;
|
|
7
7
|
private shareTransactionQueries;
|