@owox/backend 0.37.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/helpers/read-bounded-body.helper.d.ts +1 -0
- package/dist/src/common/helpers/read-bounded-body.helper.js +28 -0
- package/dist/src/common/scheduler/system-tasks/system-trigger-type.d.ts +3 -1
- package/dist/src/common/scheduler/system-tasks/system-trigger-type.js +2 -0
- package/dist/src/common/search/search.facade.d.ts +1 -0
- package/dist/src/config/data-source-options.config.d.ts +4 -3
- package/dist/src/config/data-source-options.config.js +10 -3
- package/dist/src/config/plugin-collections-body-parser.config.js +3 -0
- package/dist/src/data-marts/credentials/credential.types.d.ts +26 -2
- package/dist/src/data-marts/credentials/credential.types.js +18 -6
- package/dist/src/data-marts/credentials/dto/credential-api.dto.d.ts +5 -1
- package/dist/src/data-marts/credentials/dto/credential-api.dto.js +21 -0
- package/dist/src/data-marts/credentials/dto/credential.dto.d.ts +2 -1
- package/dist/src/data-marts/credentials/entities/credential.entity.d.ts +2 -1
- package/dist/src/data-marts/credentials/entities/credential.entity.js +5 -0
- package/dist/src/data-marts/credentials/facades/credential-consumer-binding.facade.impl.js +6 -1
- package/dist/src/data-marts/credentials/mappers/credential.mapper.js +2 -0
- package/dist/src/data-marts/credentials/services/builtin-credential-definitions.js +8 -0
- package/dist/src/data-marts/credentials/services/credential-external-definition-registry.service.d.ts +4 -0
- package/dist/src/data-marts/credentials/services/credential-external-definition-registry.service.js +36 -17
- package/dist/src/data-marts/credentials/services/credential-fetch.service.d.ts +8 -0
- package/dist/src/data-marts/credentials/services/credential-fetch.service.js +115 -46
- package/dist/src/data-marts/credentials/services/credential-validation-probe.service.d.ts +3 -1
- package/dist/src/data-marts/credentials/services/credential-validation-probe.service.js +10 -2
- package/dist/src/data-marts/credentials/services/credential.service.d.ts +4 -0
- package/dist/src/data-marts/credentials/services/credential.service.js +36 -0
- package/dist/src/data-marts/credentials/services/google-service-account-key.d.ts +6 -0
- package/dist/src/data-marts/credentials/services/google-service-account-key.js +46 -0
- package/dist/src/data-marts/credentials/services/google-service-account-token.service.d.ts +25 -0
- package/dist/src/data-marts/credentials/services/google-service-account-token.service.js +177 -0
- package/dist/src/data-marts/credentials/use-cases/create-credential.service.d.ts +1 -0
- package/dist/src/data-marts/credentials/use-cases/create-credential.service.js +10 -2
- package/dist/src/data-marts/credentials/use-cases/update-credential.service.d.ts +1 -0
- package/dist/src/data-marts/credentials/use-cases/update-credential.service.js +28 -4
- package/dist/src/data-marts/credentials/use-cases/validate-credential.service.js +2 -5
- package/dist/src/data-marts/data-destination-types/ee/email/services/email-credentials-validator.js +1 -3
- package/dist/src/data-marts/data-destination-types/ee/google-chat/services/google-chat-credentials-validator.js +1 -3
- package/dist/src/data-marts/data-destination-types/google-sheets/services/google-sheets-credentials-validator.js +1 -3
- package/dist/src/data-marts/data-destination-types/google-sheets/services/google-sheets-report-writer.d.ts +1 -0
- package/dist/src/data-marts/data-destination-types/google-sheets/services/google-sheets-report-writer.js +13 -1
- package/dist/src/data-marts/data-destination-types/interfaces/data-destination-credentials-validator.interface.d.ts +2 -0
- package/dist/src/data-marts/data-destination-types/interfaces/data-destination-credentials-validator.interface.js +7 -0
- package/dist/src/data-marts/data-destination-types/looker-studio-connector/services/looker-studio-connector-credentials-validator.js +1 -3
- package/dist/src/data-marts/data-marts.module.js +8 -0
- package/dist/src/data-marts/data-storage-types/athena/adapters/athena-api.adapter.js +2 -1
- package/dist/src/data-marts/data-storage-types/athena/adapters/s3-api.adapter.js +5 -3
- package/dist/src/data-marts/data-storage-types/athena/services/athena-access.validator.js +2 -4
- package/dist/src/data-marts/data-storage-types/athena/utils/athena-output-location.util.d.ts +5 -0
- package/dist/src/data-marts/data-storage-types/athena/utils/athena-output-location.util.js +13 -0
- package/dist/src/data-marts/data-storage-types/bigquery/services/bigquery-access.validator.js +2 -4
- package/dist/src/data-marts/data-storage-types/bigquery/services/bigquery-resource-location.util.d.ts +3 -0
- package/dist/src/data-marts/data-storage-types/bigquery/services/bigquery-resource-location.util.js +18 -0
- package/dist/src/data-marts/data-storage-types/bigquery/services/bigquery-sharded-tables.util.d.ts +1 -0
- package/dist/src/data-marts/data-storage-types/bigquery/services/bigquery-sharded-tables.util.js +4 -1
- package/dist/src/data-marts/data-storage-types/bigquery/services/bigquery-storage-resource-browser.service.js +12 -5
- package/dist/src/data-marts/data-storage-types/databricks/services/databricks-access.validator.js +2 -4
- package/dist/src/data-marts/data-storage-types/interfaces/data-storage-access-validator.interface.d.ts +3 -0
- package/dist/src/data-marts/data-storage-types/interfaces/data-storage-access-validator.interface.js +7 -0
- package/dist/src/data-marts/data-storage-types/interfaces/storage-resource-browser.interface.d.ts +2 -0
- package/dist/src/data-marts/data-storage-types/redshift/services/redshift-access.validator.js +2 -6
- package/dist/src/data-marts/data-storage-types/snowflake/adapters/snowflake-api.adapter.js +1 -0
- package/dist/src/data-marts/data-storage-types/snowflake/services/snowflake-access.validator.js +2 -4
- package/dist/src/data-marts/dto/domain/list-data-marts.command.d.ts +2 -1
- package/dist/src/data-marts/dto/domain/list-data-marts.command.js +3 -1
- package/dist/src/data-marts/dto/presentation/run-data-mart-request-api.dto.js +4 -2
- package/dist/src/data-marts/dto/presentation/sql-dry-run-request-api.dto.js +3 -0
- package/dist/src/data-marts/dto/presentation/storage-resources/list-storage-resources-response.dto.d.ts +2 -0
- package/dist/src/data-marts/dto/presentation/storage-resources/list-storage-resources-response.dto.js +17 -0
- package/dist/src/data-marts/errors/google-sheets-api-call.error.d.ts +6 -0
- package/dist/src/data-marts/errors/google-sheets-api-call.error.js +34 -0
- package/dist/src/data-marts/facades/mcp-contexts.facade.d.ts +13 -0
- package/dist/src/data-marts/facades/mcp-contexts.facade.impl.d.ts +9 -0
- package/dist/src/data-marts/facades/mcp-contexts.facade.impl.js +35 -0
- package/dist/src/data-marts/facades/mcp-contexts.facade.js +5 -0
- package/dist/src/data-marts/facades/mcp-data-marts.facade.d.ts +9 -0
- package/dist/src/data-marts/facades/mcp-data-marts.facade.impl.js +4 -1
- package/dist/src/data-marts/mappers/context.mapper.d.ts +4 -0
- package/dist/src/data-marts/mappers/context.mapper.js +12 -0
- package/dist/src/data-marts/search/engine/advanced-search.service.js +1 -0
- package/dist/src/data-marts/search/engine/in-memory-paginated.search.js +17 -1
- package/dist/src/data-marts/search/engine/vector-search.port.d.ts +1 -0
- package/dist/src/data-marts/services/connector/backfill-segment.d.ts +22 -0
- package/dist/src/data-marts/services/connector/backfill-segment.js +91 -0
- package/dist/src/data-marts/services/connector/connector-execution.service.d.ts +1 -0
- package/dist/src/data-marts/services/connector/connector-execution.service.js +3 -0
- package/dist/src/data-marts/services/connector/connector-executor.service.d.ts +4 -1
- package/dist/src/data-marts/services/connector/connector-executor.service.js +107 -23
- package/dist/src/data-marts/services/connector/connector-run.service.d.ts +3 -0
- package/dist/src/data-marts/services/connector/connector-run.service.js +98 -4
- package/dist/src/data-marts/services/context/context.service.d.ts +2 -0
- package/dist/src/data-marts/services/context/context.service.js +21 -0
- package/dist/src/data-marts/services/data-mart-run.service.d.ts +1 -0
- package/dist/src/data-marts/services/data-mart-run.service.js +9 -0
- package/dist/src/data-marts/services/data-mart.service.d.ts +1 -0
- package/dist/src/data-marts/services/data-mart.service.js +3 -0
- package/dist/src/data-marts/system-triggers/processors/repair-backfill-chains-processor.d.ts +14 -0
- package/dist/src/data-marts/system-triggers/processors/repair-backfill-chains-processor.js +45 -0
- package/dist/src/data-marts/use-cases/cancel-data-mart-run.service.d.ts +4 -0
- package/dist/src/data-marts/use-cases/cancel-data-mart-run.service.js +46 -1
- package/dist/src/data-marts/use-cases/list-data-marts.service.js +1 -0
- package/dist/src/data-marts/use-cases/stream-http-data.service.d.ts +0 -1
- package/dist/src/data-marts/use-cases/stream-http-data.service.js +2 -6
- package/dist/src/data-marts/use-cases/update-data-storage.service.js +7 -7
- package/dist/src/data-marts/utils/field-errors.utils.d.ts +9 -0
- package/dist/src/data-marts/utils/field-errors.utils.js +51 -0
- package/dist/src/data-marts/utils/manual-backfill-range.d.ts +52 -0
- package/dist/src/data-marts/utils/manual-backfill-range.js +110 -8
- package/dist/src/ee/mcp/instructions/mcp-system-instructions.d.ts +1 -1
- package/dist/src/ee/mcp/instructions/mcp-system-instructions.js +4 -0
- package/dist/src/ee/mcp/sdk/mcp-output-schema.d.ts +3 -0
- package/dist/src/ee/mcp/sdk/mcp-output-schema.js +53 -0
- package/dist/src/ee/mcp/sdk/mcp-schema-refresh.d.ts +8 -0
- package/dist/src/ee/mcp/sdk/mcp-schema-refresh.js +44 -0
- package/dist/src/ee/mcp/sdk/mcp-sdk-server.factory.d.ts +8 -1
- package/dist/src/ee/mcp/sdk/mcp-sdk-server.factory.js +35 -4
- package/dist/src/ee/mcp/tools/context-input.d.ts +6 -0
- package/dist/src/ee/mcp/tools/context-input.js +13 -0
- package/dist/src/ee/mcp/tools/data-mart-catalog.tool.d.ts +10 -2
- package/dist/src/ee/mcp/tools/data-mart-catalog.tool.js +17 -5
- package/dist/src/ee/mcp/tools/data-mart-details.tool.d.ts +5 -1
- package/dist/src/ee/mcp/tools/data-mart-details.tool.js +4 -1
- package/dist/src/ee/mcp/tools/list-contexts.tool.d.ts +131 -0
- package/dist/src/ee/mcp/tools/list-contexts.tool.js +50 -0
- package/dist/src/ee/mcp/tools/mcp-tool.providers.js +2 -0
- package/dist/src/ee/mcp/tools/search-data-marts.tool.d.ts +10 -2
- package/dist/src/ee/mcp/tools/search-data-marts.tool.js +17 -3
- package/dist/src/ee/mcp/transport/mcp-http-entry.service.js +1 -1
- package/dist/src/idp/decorators/auth-context.decorator.js +1 -0
- package/dist/src/idp/guards/idp.guard.d.ts +3 -0
- package/dist/src/idp/guards/idp.guard.js +38 -8
- package/dist/src/idp/oauth/controllers/oauth-authorization.controller.js +8 -6
- package/dist/src/idp/oauth/mcp-client-integration.d.ts +1 -0
- package/dist/src/idp/oauth/mcp-client-integration.js +15 -0
- package/dist/src/idp/ports/plugin-runtime-authorizer.port.d.ts +6 -0
- package/dist/src/idp/types/auth.types.d.ts +1 -0
- package/dist/src/migrations/1790830000000-widen-sql-dry-run-trigger-sql-column.d.ts +6 -0
- package/dist/src/migrations/1790830000000-widen-sql-dry-run-trigger-sql-column.js +21 -0
- package/dist/src/migrations/1790900000000-add-plugin-version-backend.d.ts +6 -0
- package/dist/src/migrations/1790900000000-add-plugin-version-backend.js +21 -0
- package/dist/src/migrations/1790900000001-create-plugin-action-execution.d.ts +6 -0
- package/dist/src/migrations/1790900000001-create-plugin-action-execution.js +77 -0
- package/dist/src/migrations/1791000000000-add-credential-public-metadata.d.ts +6 -0
- package/dist/src/migrations/1791000000000-add-credential-public-metadata.js +23 -0
- package/dist/src/plugin-host/collections/dto/domain/plugin-collection.types.d.ts +1 -0
- package/dist/src/plugin-host/collections/errors/plugin-collection.errors.d.ts +6 -0
- package/dist/src/plugin-host/collections/errors/plugin-collection.errors.js +19 -1
- package/dist/src/plugin-host/collections/services/plugin-collection-declaration.service.js +3 -3
- package/dist/src/plugin-host/collections/use-cases/put-plugin-collection-document.service.js +7 -0
- package/dist/src/plugin-host/constants/plugin-action-limits.d.ts +34 -0
- package/dist/src/plugin-host/constants/plugin-action-limits.js +51 -0
- package/dist/src/plugin-host/controllers/plugin-action-runtime.controller.d.ts +20 -0
- package/dist/src/plugin-host/controllers/plugin-action-runtime.controller.js +123 -0
- package/dist/src/plugin-host/controllers/plugin-credential-runtime.controller.js +11 -19
- package/dist/src/plugin-host/controllers/plugin-gallery.controller.d.ts +5 -1
- package/dist/src/plugin-host/controllers/plugin-gallery.controller.js +25 -1
- package/dist/src/plugin-host/controllers/plugin-history.controller.d.ts +10 -0
- package/dist/src/plugin-host/controllers/plugin-history.controller.js +57 -0
- package/dist/src/plugin-host/controllers/plugin-release-check.controller.d.ts +10 -0
- package/dist/src/plugin-host/controllers/plugin-release-check.controller.js +58 -0
- package/dist/src/plugin-host/dto/domain/check-plugin-release.command.d.ts +22 -0
- package/dist/src/plugin-host/dto/domain/check-plugin-release.command.js +17 -0
- package/dist/src/plugin-host/dto/domain/find-plugin-by-repository.command.d.ts +6 -0
- package/dist/src/plugin-host/dto/domain/find-plugin-by-repository.command.js +13 -0
- package/dist/src/plugin-host/dto/domain/list-plugin-history.command.d.ts +10 -0
- package/dist/src/plugin-host/dto/domain/list-plugin-history.command.js +18 -0
- package/dist/src/plugin-host/dto/domain/plugin-action-execution.command.d.ts +23 -0
- package/dist/src/plugin-host/dto/domain/plugin-action-execution.command.js +44 -0
- package/dist/src/plugin-host/dto/domain/plugin-action-execution.dto.d.ts +36 -0
- package/dist/src/plugin-host/dto/domain/plugin-action-execution.dto.js +3 -0
- package/dist/src/plugin-host/dto/domain/plugin-history.dto.d.ts +29 -0
- package/dist/src/plugin-host/dto/domain/plugin-history.dto.js +3 -0
- package/dist/src/plugin-host/dto/domain/plugin-view.dto.d.ts +1 -0
- package/dist/src/plugin-host/dto/presentation/plugin-action-api.dto.d.ts +44 -0
- package/dist/src/plugin-host/dto/presentation/plugin-action-api.dto.js +208 -0
- package/dist/src/plugin-host/dto/presentation/plugin-gallery-api.dto.d.ts +2 -0
- package/dist/src/plugin-host/dto/presentation/plugin-gallery-api.dto.js +7 -0
- package/dist/src/plugin-host/dto/presentation/plugin-history-api.dto.d.ts +29 -0
- package/dist/src/plugin-host/dto/presentation/plugin-history-api.dto.js +148 -0
- package/dist/src/plugin-host/dto/presentation/plugin-lookup-api.dto.d.ts +3 -0
- package/dist/src/plugin-host/dto/presentation/plugin-lookup-api.dto.js +22 -0
- package/dist/src/plugin-host/dto/presentation/publication-api.dto.d.ts +17 -0
- package/dist/src/plugin-host/dto/presentation/publication-api.dto.js +95 -1
- package/dist/src/plugin-host/entities/plugin-action-execution.entity.d.ts +24 -0
- package/dist/src/plugin-host/entities/plugin-action-execution.entity.js +136 -0
- package/dist/src/plugin-host/entities/plugin-version.entity.d.ts +2 -1
- package/dist/src/plugin-host/entities/plugin-version.entity.js +5 -0
- package/dist/src/plugin-host/enums/plugin-action-execution-status.enum.d.ts +9 -0
- package/dist/src/plugin-host/enums/plugin-action-execution-status.enum.js +22 -0
- package/dist/src/plugin-host/enums/release-rejection-code.enum.d.ts +3 -0
- package/dist/src/plugin-host/enums/release-rejection-code.enum.js +6 -0
- package/dist/src/plugin-host/errors/plugin-action.errors.d.ts +45 -0
- package/dist/src/plugin-host/errors/plugin-action.errors.js +70 -0
- package/dist/src/plugin-host/errors/plugin-host.errors.d.ts +6 -0
- package/dist/src/plugin-host/errors/plugin-host.errors.js +10 -1
- package/dist/src/plugin-host/filters/plugin-host-exception.filter.js +2 -2
- package/dist/src/plugin-host/mappers/plugin-action-execution.mapper.d.ts +3 -0
- package/dist/src/plugin-host/mappers/plugin-action-execution.mapper.js +22 -0
- package/dist/src/plugin-host/mappers/plugin-presentation.mapper.d.ts +22 -1
- package/dist/src/plugin-host/mappers/plugin-presentation.mapper.js +87 -1
- package/dist/src/plugin-host/plugin-host.module.js +34 -0
- package/dist/src/plugin-host/services/action-input-validator.service.d.ts +23 -0
- package/dist/src/plugin-host/services/action-input-validator.service.js +277 -0
- package/dist/src/plugin-host/services/external-credential-definition-sync.service.d.ts +3 -0
- package/dist/src/plugin-host/services/external-credential-definition-sync.service.js +47 -15
- package/dist/src/plugin-host/services/plugin-action-dispatcher.service.d.ts +13 -0
- package/dist/src/plugin-host/services/plugin-action-dispatcher.service.js +140 -0
- package/dist/src/plugin-host/services/plugin-action-execution.service.d.ts +69 -0
- package/dist/src/plugin-host/services/plugin-action-execution.service.js +239 -0
- package/dist/src/plugin-host/services/plugin-action-starter.service.d.ts +22 -0
- package/dist/src/plugin-host/services/plugin-action-starter.service.js +81 -0
- package/dist/src/plugin-host/services/plugin-audit.service.d.ts +13 -0
- package/dist/src/plugin-host/services/plugin-audit.service.js +78 -0
- package/dist/src/plugin-host/services/plugin-publication.service.d.ts +4 -0
- package/dist/src/plugin-host/services/plugin-publication.service.js +51 -23
- package/dist/src/plugin-host/services/plugin-runtime-authorizer.service.d.ts +5 -2
- package/dist/src/plugin-host/services/plugin-runtime-authorizer.service.js +31 -3
- package/dist/src/plugin-host/services/plugin-version.service.d.ts +2 -1
- package/dist/src/plugin-host/services/release-candidate-rules.service.d.ts +51 -0
- package/dist/src/plugin-host/services/release-candidate-rules.service.js +198 -0
- package/dist/src/plugin-host/services/remote-url-validator.service.d.ts +7 -0
- package/dist/src/plugin-host/services/remote-url-validator.service.js +4 -0
- package/dist/src/plugin-host/system-triggers/plugin-action-execution-sweep.processor.d.ts +14 -0
- package/dist/src/plugin-host/system-triggers/plugin-action-execution-sweep.processor.js +50 -0
- package/dist/src/plugin-host/use-cases/cancel-plugin-action-execution.service.d.ts +8 -0
- package/dist/src/plugin-host/use-cases/cancel-plugin-action-execution.service.js +39 -0
- package/dist/src/plugin-host/use-cases/check-plugin-release.service.d.ts +22 -0
- package/dist/src/plugin-host/use-cases/check-plugin-release.service.js +152 -0
- package/dist/src/plugin-host/use-cases/find-plugin-by-repository.service.d.ts +9 -0
- package/dist/src/plugin-host/use-cases/find-plugin-by-repository.service.js +35 -0
- package/dist/src/plugin-host/use-cases/get-current-plugin-action-execution.service.d.ts +14 -0
- package/dist/src/plugin-host/use-cases/get-current-plugin-action-execution.service.js +85 -0
- package/dist/src/plugin-host/use-cases/get-plugin-action-execution.service.d.ts +9 -0
- package/dist/src/plugin-host/use-cases/get-plugin-action-execution.service.js +67 -0
- package/dist/src/plugin-host/use-cases/get-plugin-installation-entry.service.js +2 -7
- package/dist/src/plugin-host/use-cases/install-plugin.service.js +4 -0
- package/dist/src/plugin-host/use-cases/list-installations.service.d.ts +3 -1
- package/dist/src/plugin-host/use-cases/list-installations.service.js +14 -3
- package/dist/src/plugin-host/use-cases/list-plugin-history.service.d.ts +25 -0
- package/dist/src/plugin-host/use-cases/list-plugin-history.service.js +147 -0
- package/dist/src/plugin-host/use-cases/plugin-publisher-access.d.ts +5 -0
- package/dist/src/plugin-host/use-cases/plugin-publisher-access.js +28 -0
- package/dist/src/plugin-host/use-cases/start-plugin-action-execution.service.d.ts +12 -0
- package/dist/src/plugin-host/use-cases/start-plugin-action-execution.service.js +64 -0
- package/dist/src/plugin-host/use-cases/sync-plugin-releases.service.d.ts +3 -5
- package/dist/src/plugin-host/use-cases/sync-plugin-releases.service.js +15 -59
- package/dist/src/plugin-host/use-cases/uninstall-plugin.service.js +3 -1
- package/dist/src/plugin-host/use-cases/update-plugin.service.d.ts +0 -1
- package/dist/src/plugin-host/use-cases/update-plugin.service.js +3 -25
- package/dist/src/plugin-host/utils/action-input-schema.util.d.ts +14 -0
- package/dist/src/plugin-host/utils/action-input-schema.util.js +133 -0
- package/dist/src/plugin-host/utils/credential-handles.util.d.ts +3 -0
- package/dist/src/plugin-host/utils/credential-handles.util.js +13 -0
- package/dist/src/plugin-host/utils/execution-token.util.d.ts +5 -0
- package/dist/src/plugin-host/utils/execution-token.util.js +13 -0
- package/dist/src/plugin-host/utils/github-repo-locator.util.js +1 -1
- package/dist/src/plugin-host/utils/json-shape.util.d.ts +1 -0
- package/dist/src/plugin-host/utils/json-shape.util.js +21 -0
- package/dist/src/plugin-host/utils/plugin-action-outcome.util.d.ts +10 -0
- package/dist/src/plugin-host/utils/plugin-action-outcome.util.js +67 -0
- package/dist/src/plugin-host/utils/plugin-manifest.util.d.ts +121 -0
- package/dist/src/plugin-host/utils/plugin-manifest.util.js +111 -1
- package/dist/src/plugin-host/utils/request-abort-signal.util.d.ts +5 -0
- package/dist/src/plugin-host/utils/request-abort-signal.util.js +19 -0
- package/package.json +10 -8
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UpdatePluginByRepositoryApiDto = exports.PublicationResponseApiDto = exports.PluginPublisherDiagnosticsApiDto = exports.ReleaseRejectionApiDto = exports.PublishPluginApiDto = void 0;
|
|
12
|
+
exports.PluginReleaseCheckResultApiDto = exports.PluginReleaseCheckIssueApiDto = exports.CheckPluginReleaseApiDto = exports.UpdatePluginByRepositoryApiDto = exports.PublicationResponseApiDto = exports.PluginPublisherDiagnosticsApiDto = exports.ReleaseRejectionApiDto = exports.PublishPluginApiDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const github_access_mode_enum_1 = require("../../enums/github-access-mode.enum");
|
|
@@ -191,4 +191,98 @@ __decorate([
|
|
|
191
191
|
(0, class_validator_1.MaxLength)(512),
|
|
192
192
|
__metadata("design:type", String)
|
|
193
193
|
], UpdatePluginByRepositoryApiDto.prototype, "repository", void 0);
|
|
194
|
+
class CheckPluginReleaseApiDto extends UpdatePluginByRepositoryApiDto {
|
|
195
|
+
ref;
|
|
196
|
+
version;
|
|
197
|
+
}
|
|
198
|
+
exports.CheckPluginReleaseApiDto = CheckPluginReleaseApiDto;
|
|
199
|
+
__decorate([
|
|
200
|
+
(0, swagger_1.ApiProperty)({ description: 'Branch, tag, or commit SHA to check.', example: 'main' }),
|
|
201
|
+
(0, class_validator_1.IsString)(),
|
|
202
|
+
(0, class_validator_1.MinLength)(1),
|
|
203
|
+
(0, class_validator_1.MaxLength)(255),
|
|
204
|
+
(0, class_validator_1.Matches)(/^[^\s\p{Cc}\p{Cs}]+$/u, {
|
|
205
|
+
message: 'ref must not contain whitespace or control characters',
|
|
206
|
+
}),
|
|
207
|
+
__metadata("design:type", String)
|
|
208
|
+
], CheckPluginReleaseApiDto.prototype, "ref", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
211
|
+
description: 'Version the release would carry, X.Y.Z optionally prefixed with v. Defaults to the next version after the current one: the next patch below 1.0.0, the next minor from 1.0.0.',
|
|
212
|
+
example: '1.5.0',
|
|
213
|
+
}),
|
|
214
|
+
(0, class_validator_1.IsOptional)(),
|
|
215
|
+
(0, class_validator_1.IsString)(),
|
|
216
|
+
(0, class_validator_1.MinLength)(1),
|
|
217
|
+
(0, class_validator_1.MaxLength)(64),
|
|
218
|
+
__metadata("design:type", String)
|
|
219
|
+
], CheckPluginReleaseApiDto.prototype, "version", void 0);
|
|
220
|
+
class PluginReleaseCheckIssueApiDto {
|
|
221
|
+
code;
|
|
222
|
+
detail;
|
|
223
|
+
}
|
|
224
|
+
exports.PluginReleaseCheckIssueApiDto = PluginReleaseCheckIssueApiDto;
|
|
225
|
+
__decorate([
|
|
226
|
+
(0, swagger_1.ApiProperty)({ enum: release_rejection_code_enum_1.ReleaseRejectionCode }),
|
|
227
|
+
__metadata("design:type", String)
|
|
228
|
+
], PluginReleaseCheckIssueApiDto.prototype, "code", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
(0, swagger_1.ApiProperty)(),
|
|
231
|
+
__metadata("design:type", String)
|
|
232
|
+
], PluginReleaseCheckIssueApiDto.prototype, "detail", void 0);
|
|
233
|
+
class PluginReleaseCheckResultApiDto {
|
|
234
|
+
pluginId;
|
|
235
|
+
repository;
|
|
236
|
+
commitSha;
|
|
237
|
+
candidateVersion;
|
|
238
|
+
baselineVersion;
|
|
239
|
+
collectionsEvaluated;
|
|
240
|
+
issues;
|
|
241
|
+
}
|
|
242
|
+
exports.PluginReleaseCheckResultApiDto = PluginReleaseCheckResultApiDto;
|
|
243
|
+
__decorate([
|
|
244
|
+
(0, swagger_1.ApiProperty)(),
|
|
245
|
+
__metadata("design:type", String)
|
|
246
|
+
], PluginReleaseCheckResultApiDto.prototype, "pluginId", void 0);
|
|
247
|
+
__decorate([
|
|
248
|
+
(0, swagger_1.ApiProperty)({ description: 'Canonical owner/name.' }),
|
|
249
|
+
__metadata("design:type", String)
|
|
250
|
+
], PluginReleaseCheckResultApiDto.prototype, "repository", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
(0, swagger_1.ApiProperty)({
|
|
253
|
+
type: String,
|
|
254
|
+
nullable: true,
|
|
255
|
+
description: 'Null when the ref does not resolve.',
|
|
256
|
+
}),
|
|
257
|
+
__metadata("design:type", Object)
|
|
258
|
+
], PluginReleaseCheckResultApiDto.prototype, "commitSha", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
(0, swagger_1.ApiProperty)({
|
|
261
|
+
type: String,
|
|
262
|
+
nullable: true,
|
|
263
|
+
description: 'Without the v prefix. Null when no version was given and none is current.',
|
|
264
|
+
}),
|
|
265
|
+
__metadata("design:type", Object)
|
|
266
|
+
], PluginReleaseCheckResultApiDto.prototype, "candidateVersion", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
(0, swagger_1.ApiProperty)({
|
|
269
|
+
type: String,
|
|
270
|
+
nullable: true,
|
|
271
|
+
description: "Highest recorded version in the candidate's compatibility line. Null when there is none or the ref does not resolve; set with collectionsEvaluated false when the manifest is invalid.",
|
|
272
|
+
}),
|
|
273
|
+
__metadata("design:type", Object)
|
|
274
|
+
], PluginReleaseCheckResultApiDto.prototype, "baselineVersion", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
(0, swagger_1.ApiProperty)({
|
|
277
|
+
description: 'Whether collections were compared against the baseline.',
|
|
278
|
+
}),
|
|
279
|
+
__metadata("design:type", Boolean)
|
|
280
|
+
], PluginReleaseCheckResultApiDto.prototype, "collectionsEvaluated", void 0);
|
|
281
|
+
__decorate([
|
|
282
|
+
(0, swagger_1.ApiProperty)({
|
|
283
|
+
type: [PluginReleaseCheckIssueApiDto],
|
|
284
|
+
description: 'Reasons a release from this ref would be rejected; an invalid manifest or an unresolvable ref stops evaluation.',
|
|
285
|
+
}),
|
|
286
|
+
__metadata("design:type", Array)
|
|
287
|
+
], PluginReleaseCheckResultApiDto.prototype, "issues", void 0);
|
|
194
288
|
//# sourceMappingURL=publication-api.dto.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PluginActionExecutionStatus, type PluginActionTrigger } from '../enums/plugin-action-execution-status.enum';
|
|
2
|
+
export declare class PluginActionExecution {
|
|
3
|
+
id: string;
|
|
4
|
+
pluginId: string;
|
|
5
|
+
pluginVersionId: string;
|
|
6
|
+
installationId: string;
|
|
7
|
+
projectId: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
action: string;
|
|
10
|
+
input: unknown;
|
|
11
|
+
trigger: PluginActionTrigger;
|
|
12
|
+
status: PluginActionExecutionStatus;
|
|
13
|
+
role: string;
|
|
14
|
+
tokenHash: string | null;
|
|
15
|
+
deadlineAt: Date | null;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
startedAt: Date | null;
|
|
18
|
+
finishedAt: Date | null;
|
|
19
|
+
errorCode: string | null;
|
|
20
|
+
errorMessage: string | null;
|
|
21
|
+
result: unknown;
|
|
22
|
+
payloadsClearedAt: Date | null;
|
|
23
|
+
payloadBytes: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
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.PluginActionExecution = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const plugin_action_execution_status_enum_1 = require("../enums/plugin-action-execution-status.enum");
|
|
15
|
+
const JSON_TEXT = {
|
|
16
|
+
to: (value) => (value === undefined || value === null ? value : JSON.stringify(value)),
|
|
17
|
+
from: (text) => text === null || text === undefined ? null : JSON.parse(String(text)),
|
|
18
|
+
};
|
|
19
|
+
let PluginActionExecution = class PluginActionExecution {
|
|
20
|
+
id;
|
|
21
|
+
pluginId;
|
|
22
|
+
pluginVersionId;
|
|
23
|
+
installationId;
|
|
24
|
+
projectId;
|
|
25
|
+
userId;
|
|
26
|
+
action;
|
|
27
|
+
input;
|
|
28
|
+
trigger;
|
|
29
|
+
status;
|
|
30
|
+
role;
|
|
31
|
+
tokenHash;
|
|
32
|
+
deadlineAt;
|
|
33
|
+
createdAt;
|
|
34
|
+
startedAt;
|
|
35
|
+
finishedAt;
|
|
36
|
+
errorCode;
|
|
37
|
+
errorMessage;
|
|
38
|
+
result;
|
|
39
|
+
payloadsClearedAt;
|
|
40
|
+
payloadBytes;
|
|
41
|
+
};
|
|
42
|
+
exports.PluginActionExecution = PluginActionExecution;
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], PluginActionExecution.prototype, "id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36 }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], PluginActionExecution.prototype, "pluginId", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36 }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], PluginActionExecution.prototype, "pluginVersionId", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36 }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], PluginActionExecution.prototype, "installationId", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], PluginActionExecution.prototype, "projectId", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], PluginActionExecution.prototype, "userId", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64 }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], PluginActionExecution.prototype, "action", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true, transformer: JSON_TEXT }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], PluginActionExecution.prototype, "input", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 16 }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], PluginActionExecution.prototype, "trigger", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 16 }),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], PluginActionExecution.prototype, "status", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 16 }),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], PluginActionExecution.prototype, "role", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: true }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], PluginActionExecution.prototype, "tokenHash", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
93
|
+
__metadata("design:type", Object)
|
|
94
|
+
], PluginActionExecution.prototype, "deadlineAt", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
97
|
+
__metadata("design:type", Date)
|
|
98
|
+
], PluginActionExecution.prototype, "createdAt", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], PluginActionExecution.prototype, "startedAt", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
105
|
+
__metadata("design:type", Object)
|
|
106
|
+
], PluginActionExecution.prototype, "finishedAt", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: true }),
|
|
109
|
+
__metadata("design:type", Object)
|
|
110
|
+
], PluginActionExecution.prototype, "errorCode", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 1000, nullable: true }),
|
|
113
|
+
__metadata("design:type", Object)
|
|
114
|
+
], PluginActionExecution.prototype, "errorMessage", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true, transformer: JSON_TEXT }),
|
|
117
|
+
__metadata("design:type", Object)
|
|
118
|
+
], PluginActionExecution.prototype, "result", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
121
|
+
__metadata("design:type", Object)
|
|
122
|
+
], PluginActionExecution.prototype, "payloadsClearedAt", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
125
|
+
__metadata("design:type", Number)
|
|
126
|
+
], PluginActionExecution.prototype, "payloadBytes", void 0);
|
|
127
|
+
exports.PluginActionExecution = PluginActionExecution = __decorate([
|
|
128
|
+
(0, typeorm_1.Entity)('plugin_action_execution'),
|
|
129
|
+
(0, typeorm_1.Index)('UQ_plugin_action_execution_token', ['tokenHash'], { unique: true }),
|
|
130
|
+
(0, typeorm_1.Index)('idx_plugin_action_execution_running', ['installationId', 'status']),
|
|
131
|
+
(0, typeorm_1.Index)('idx_plugin_action_execution_deadline', ['status', 'deadlineAt']),
|
|
132
|
+
(0, typeorm_1.Index)('idx_plugin_action_execution_starts', ['installationId', 'startedAt', 'payloadBytes']),
|
|
133
|
+
(0, typeorm_1.Index)('idx_plugin_action_execution_finished', ['finishedAt']),
|
|
134
|
+
(0, typeorm_1.Index)('idx_plugin_action_execution_payloads', ['payloadsClearedAt', 'finishedAt'])
|
|
135
|
+
], PluginActionExecution);
|
|
136
|
+
//# sourceMappingURL=plugin-action-execution.entity.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PluginCollectionDeclaration } from '../utils/plugin-manifest.util';
|
|
1
|
+
import type { PluginBackendDeclaration, PluginCollectionDeclaration } from '../utils/plugin-manifest.util';
|
|
2
2
|
import type { StoredCredentialRequirement } from '../../data-marts/credentials/credential.types';
|
|
3
3
|
export declare class PluginVersion {
|
|
4
4
|
id: string;
|
|
@@ -13,6 +13,7 @@ export declare class PluginVersion {
|
|
|
13
13
|
deliveryUrl: string;
|
|
14
14
|
collections: PluginCollectionDeclaration[] | null;
|
|
15
15
|
credentialRequirements: StoredCredentialRequirement[] | null;
|
|
16
|
+
backend: PluginBackendDeclaration | null;
|
|
16
17
|
releasePublishedAt: Date | null;
|
|
17
18
|
createdAt: Date;
|
|
18
19
|
}
|
|
@@ -24,6 +24,7 @@ let PluginVersion = class PluginVersion {
|
|
|
24
24
|
deliveryUrl;
|
|
25
25
|
collections;
|
|
26
26
|
credentialRequirements;
|
|
27
|
+
backend;
|
|
27
28
|
releasePublishedAt;
|
|
28
29
|
createdAt;
|
|
29
30
|
};
|
|
@@ -76,6 +77,10 @@ __decorate([
|
|
|
76
77
|
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
77
78
|
__metadata("design:type", Object)
|
|
78
79
|
], PluginVersion.prototype, "credentialRequirements", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
82
|
+
__metadata("design:type", Object)
|
|
83
|
+
], PluginVersion.prototype, "backend", void 0);
|
|
79
84
|
__decorate([
|
|
80
85
|
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
81
86
|
__metadata("design:type", Object)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare enum PluginActionExecutionStatus {
|
|
2
|
+
RUNNING = "RUNNING",
|
|
3
|
+
SUCCEEDED = "SUCCEEDED",
|
|
4
|
+
FAILED = "FAILED",
|
|
5
|
+
CANCELLED = "CANCELLED",
|
|
6
|
+
TIMED_OUT = "TIMED_OUT"
|
|
7
|
+
}
|
|
8
|
+
export type PluginActionTrigger = 'frontend';
|
|
9
|
+
export declare function isFinalPluginActionStatus(status: string): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PluginActionExecutionStatus = void 0;
|
|
4
|
+
exports.isFinalPluginActionStatus = isFinalPluginActionStatus;
|
|
5
|
+
var PluginActionExecutionStatus;
|
|
6
|
+
(function (PluginActionExecutionStatus) {
|
|
7
|
+
PluginActionExecutionStatus["RUNNING"] = "RUNNING";
|
|
8
|
+
PluginActionExecutionStatus["SUCCEEDED"] = "SUCCEEDED";
|
|
9
|
+
PluginActionExecutionStatus["FAILED"] = "FAILED";
|
|
10
|
+
PluginActionExecutionStatus["CANCELLED"] = "CANCELLED";
|
|
11
|
+
PluginActionExecutionStatus["TIMED_OUT"] = "TIMED_OUT";
|
|
12
|
+
})(PluginActionExecutionStatus || (exports.PluginActionExecutionStatus = PluginActionExecutionStatus = {}));
|
|
13
|
+
const FINAL_STATUSES = new Set([
|
|
14
|
+
PluginActionExecutionStatus.SUCCEEDED,
|
|
15
|
+
PluginActionExecutionStatus.FAILED,
|
|
16
|
+
PluginActionExecutionStatus.CANCELLED,
|
|
17
|
+
PluginActionExecutionStatus.TIMED_OUT,
|
|
18
|
+
]);
|
|
19
|
+
function isFinalPluginActionStatus(status) {
|
|
20
|
+
return FINAL_STATUSES.has(status);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=plugin-action-execution-status.enum.js.map
|
|
@@ -9,6 +9,9 @@ export declare enum ReleaseRejectionCode {
|
|
|
9
9
|
MANIFEST_INVALID_JSON = "MANIFEST_INVALID_JSON",
|
|
10
10
|
MANIFEST_SCHEMA = "MANIFEST_SCHEMA",
|
|
11
11
|
COLLECTIONS_INCOMPATIBLE = "COLLECTIONS_INCOMPATIBLE",
|
|
12
|
+
ACTION_INPUT_UNSUPPORTED = "ACTION_INPUT_UNSUPPORTED",
|
|
13
|
+
ACTIONS_INCOMPATIBLE = "ACTIONS_INCOMPATIBLE",
|
|
14
|
+
BACKEND_ORIGIN_CHANGED = "BACKEND_ORIGIN_CHANGED",
|
|
12
15
|
DELIVERY_UNSUPPORTED = "DELIVERY_UNSUPPORTED",
|
|
13
16
|
URL_NOT_HTTPS = "URL_NOT_HTTPS",
|
|
14
17
|
URL_PRIVATE_NETWORK = "URL_PRIVATE_NETWORK",
|
|
@@ -13,6 +13,9 @@ var ReleaseRejectionCode;
|
|
|
13
13
|
ReleaseRejectionCode["MANIFEST_INVALID_JSON"] = "MANIFEST_INVALID_JSON";
|
|
14
14
|
ReleaseRejectionCode["MANIFEST_SCHEMA"] = "MANIFEST_SCHEMA";
|
|
15
15
|
ReleaseRejectionCode["COLLECTIONS_INCOMPATIBLE"] = "COLLECTIONS_INCOMPATIBLE";
|
|
16
|
+
ReleaseRejectionCode["ACTION_INPUT_UNSUPPORTED"] = "ACTION_INPUT_UNSUPPORTED";
|
|
17
|
+
ReleaseRejectionCode["ACTIONS_INCOMPATIBLE"] = "ACTIONS_INCOMPATIBLE";
|
|
18
|
+
ReleaseRejectionCode["BACKEND_ORIGIN_CHANGED"] = "BACKEND_ORIGIN_CHANGED";
|
|
16
19
|
ReleaseRejectionCode["DELIVERY_UNSUPPORTED"] = "DELIVERY_UNSUPPORTED";
|
|
17
20
|
ReleaseRejectionCode["URL_NOT_HTTPS"] = "URL_NOT_HTTPS";
|
|
18
21
|
ReleaseRejectionCode["URL_PRIVATE_NETWORK"] = "URL_PRIVATE_NETWORK";
|
|
@@ -31,6 +34,9 @@ const REJECTION_IS_PUBLISHER_ACTIONABLE = {
|
|
|
31
34
|
[ReleaseRejectionCode.MANIFEST_INVALID_JSON]: true,
|
|
32
35
|
[ReleaseRejectionCode.MANIFEST_SCHEMA]: true,
|
|
33
36
|
[ReleaseRejectionCode.COLLECTIONS_INCOMPATIBLE]: true,
|
|
37
|
+
[ReleaseRejectionCode.ACTION_INPUT_UNSUPPORTED]: true,
|
|
38
|
+
[ReleaseRejectionCode.ACTIONS_INCOMPATIBLE]: true,
|
|
39
|
+
[ReleaseRejectionCode.BACKEND_ORIGIN_CHANGED]: true,
|
|
34
40
|
[ReleaseRejectionCode.DELIVERY_UNSUPPORTED]: true,
|
|
35
41
|
[ReleaseRejectionCode.URL_NOT_HTTPS]: true,
|
|
36
42
|
[ReleaseRejectionCode.URL_PRIVATE_NETWORK]: true,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { HttpStatus } from '@nestjs/common';
|
|
2
|
+
import { PluginHostError } from './plugin-host.errors';
|
|
3
|
+
export interface ActionInputError {
|
|
4
|
+
readonly instancePath: string;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class ActionNotDeclaredError extends PluginHostError {
|
|
8
|
+
readonly memberVisible = true;
|
|
9
|
+
readonly httpStatus = HttpStatus.NOT_FOUND;
|
|
10
|
+
constructor(action: string);
|
|
11
|
+
}
|
|
12
|
+
export declare class ActionInputTooLargeError extends PluginHostError {
|
|
13
|
+
readonly memberVisible = true;
|
|
14
|
+
readonly httpStatus = HttpStatus.PAYLOAD_TOO_LARGE;
|
|
15
|
+
constructor();
|
|
16
|
+
}
|
|
17
|
+
export declare class ActionInputInvalidError extends PluginHostError {
|
|
18
|
+
readonly memberVisible = true;
|
|
19
|
+
constructor(errors: readonly ActionInputError[]);
|
|
20
|
+
}
|
|
21
|
+
export declare class TooManyExecutionsError extends PluginHostError {
|
|
22
|
+
readonly memberVisible = true;
|
|
23
|
+
readonly httpStatus = HttpStatus.TOO_MANY_REQUESTS;
|
|
24
|
+
constructor(message?: string);
|
|
25
|
+
}
|
|
26
|
+
export declare class ExecutionTokenNotAllowedError extends PluginHostError {
|
|
27
|
+
readonly memberVisible = true;
|
|
28
|
+
readonly httpStatus = HttpStatus.FORBIDDEN;
|
|
29
|
+
constructor(message?: string);
|
|
30
|
+
}
|
|
31
|
+
export declare class ExecutionTokenRequiredError extends PluginHostError {
|
|
32
|
+
readonly memberVisible = true;
|
|
33
|
+
readonly httpStatus = HttpStatus.FORBIDDEN;
|
|
34
|
+
constructor();
|
|
35
|
+
}
|
|
36
|
+
export declare class ExecutionNotFoundError extends PluginHostError {
|
|
37
|
+
readonly memberVisible = true;
|
|
38
|
+
readonly httpStatus = HttpStatus.NOT_FOUND;
|
|
39
|
+
constructor();
|
|
40
|
+
}
|
|
41
|
+
export declare class InstallationInactiveError extends PluginHostError {
|
|
42
|
+
readonly memberVisible = true;
|
|
43
|
+
readonly httpStatus = HttpStatus.FORBIDDEN;
|
|
44
|
+
constructor();
|
|
45
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstallationInactiveError = exports.ExecutionNotFoundError = exports.ExecutionTokenRequiredError = exports.ExecutionTokenNotAllowedError = exports.TooManyExecutionsError = exports.ActionInputInvalidError = exports.ActionInputTooLargeError = exports.ActionNotDeclaredError = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const plugin_action_limits_1 = require("../constants/plugin-action-limits");
|
|
6
|
+
const plugin_host_errors_1 = require("./plugin-host.errors");
|
|
7
|
+
class ActionNotDeclaredError extends plugin_host_errors_1.PluginHostError {
|
|
8
|
+
memberVisible = true;
|
|
9
|
+
httpStatus = common_1.HttpStatus.NOT_FOUND;
|
|
10
|
+
constructor(action) {
|
|
11
|
+
super('ACTION_NOT_DECLARED', `Action "${action}" is not declared in the current version of this plugin`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ActionNotDeclaredError = ActionNotDeclaredError;
|
|
15
|
+
class ActionInputTooLargeError extends plugin_host_errors_1.PluginHostError {
|
|
16
|
+
memberVisible = true;
|
|
17
|
+
httpStatus = common_1.HttpStatus.PAYLOAD_TOO_LARGE;
|
|
18
|
+
constructor() {
|
|
19
|
+
super('INPUT_TOO_LARGE', `Action input is larger than ${plugin_action_limits_1.PLUGIN_ACTION_LIMITS.maxInputBytes / 1024} KiB`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ActionInputTooLargeError = ActionInputTooLargeError;
|
|
23
|
+
class ActionInputInvalidError extends plugin_host_errors_1.PluginHostError {
|
|
24
|
+
memberVisible = true;
|
|
25
|
+
constructor(errors) {
|
|
26
|
+
super('INVALID_INPUT', 'Action input does not match the action schema', { errors });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ActionInputInvalidError = ActionInputInvalidError;
|
|
30
|
+
class TooManyExecutionsError extends plugin_host_errors_1.PluginHostError {
|
|
31
|
+
memberVisible = true;
|
|
32
|
+
httpStatus = common_1.HttpStatus.TOO_MANY_REQUESTS;
|
|
33
|
+
constructor(message = `This installation already has ${plugin_action_limits_1.PLUGIN_ACTION_LIMITS.maxRunningPerInstallation} running executions`) {
|
|
34
|
+
super('TOO_MANY_EXECUTIONS', message);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.TooManyExecutionsError = TooManyExecutionsError;
|
|
38
|
+
class ExecutionTokenNotAllowedError extends plugin_host_errors_1.PluginHostError {
|
|
39
|
+
memberVisible = true;
|
|
40
|
+
httpStatus = common_1.HttpStatus.FORBIDDEN;
|
|
41
|
+
constructor(message = 'A backend action cannot start another action') {
|
|
42
|
+
super('EXECUTION_TOKEN_NOT_ALLOWED', message);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.ExecutionTokenNotAllowedError = ExecutionTokenNotAllowedError;
|
|
46
|
+
class ExecutionTokenRequiredError extends plugin_host_errors_1.PluginHostError {
|
|
47
|
+
memberVisible = true;
|
|
48
|
+
httpStatus = common_1.HttpStatus.FORBIDDEN;
|
|
49
|
+
constructor() {
|
|
50
|
+
super('EXECUTION_TOKEN_REQUIRED', 'Only a backend action can read its own execution');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.ExecutionTokenRequiredError = ExecutionTokenRequiredError;
|
|
54
|
+
class ExecutionNotFoundError extends plugin_host_errors_1.PluginHostError {
|
|
55
|
+
memberVisible = true;
|
|
56
|
+
httpStatus = common_1.HttpStatus.NOT_FOUND;
|
|
57
|
+
constructor() {
|
|
58
|
+
super('EXECUTION_NOT_FOUND', 'Execution was not found');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.ExecutionNotFoundError = ExecutionNotFoundError;
|
|
62
|
+
class InstallationInactiveError extends plugin_host_errors_1.PluginHostError {
|
|
63
|
+
memberVisible = true;
|
|
64
|
+
httpStatus = common_1.HttpStatus.FORBIDDEN;
|
|
65
|
+
constructor() {
|
|
66
|
+
super('INSTALLATION_INACTIVE', 'The plugin installation is no longer active');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.InstallationInactiveError = InstallationInactiveError;
|
|
70
|
+
//# sourceMappingURL=plugin-action.errors.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { HttpStatus } from '@nestjs/common';
|
|
1
2
|
import { BusinessViolationException } from '../../common/exceptions/business-violation.exception';
|
|
2
3
|
export declare abstract class PluginHostError extends BusinessViolationException {
|
|
3
4
|
abstract readonly memberVisible: boolean;
|
|
5
|
+
readonly httpStatus: HttpStatus;
|
|
4
6
|
protected constructor(code: string, message: string, errorDetails?: Record<string, unknown>);
|
|
5
7
|
}
|
|
6
8
|
export declare class InvalidRepoLocatorError extends PluginHostError {
|
|
@@ -31,6 +33,10 @@ export declare class PluginSyncRateLimitedError extends PluginHostError {
|
|
|
31
33
|
readonly memberVisible = true;
|
|
32
34
|
constructor(retryAfterSeconds: number);
|
|
33
35
|
}
|
|
36
|
+
export declare class PluginCheckRateLimitedError extends PluginHostError {
|
|
37
|
+
readonly memberVisible = true;
|
|
38
|
+
constructor(retryAfterSeconds: number);
|
|
39
|
+
}
|
|
34
40
|
export declare class PluginSyncInProgressError extends PluginHostError {
|
|
35
41
|
readonly memberVisible = true;
|
|
36
42
|
constructor();
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PluginVersionConflictError = exports.NoEligiblePluginVersionError = exports.PluginNotPublishedError = exports.StaleVersionConfirmationError = exports.PluginSuspendedError = exports.AudienceFormConflictError = exports.PublicationAuthorizationError = exports.PluginSyncLeaseLostError = exports.PluginSyncInProgressError = exports.PluginSyncRateLimitedError = exports.GithubApiError = exports.GithubRateLimitedError = exports.GithubAuthConfigError = exports.GithubRepoNotAccessibleError = exports.GithubRepoNotFoundError = exports.InvalidRepoLocatorError = exports.PluginHostError = void 0;
|
|
3
|
+
exports.PluginVersionConflictError = exports.NoEligiblePluginVersionError = exports.PluginNotPublishedError = exports.StaleVersionConfirmationError = exports.PluginSuspendedError = exports.AudienceFormConflictError = exports.PublicationAuthorizationError = exports.PluginSyncLeaseLostError = exports.PluginSyncInProgressError = exports.PluginCheckRateLimitedError = exports.PluginSyncRateLimitedError = exports.GithubApiError = exports.GithubRateLimitedError = exports.GithubAuthConfigError = exports.GithubRepoNotAccessibleError = exports.GithubRepoNotFoundError = exports.InvalidRepoLocatorError = exports.PluginHostError = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
4
5
|
const business_violation_exception_1 = require("../../common/exceptions/business-violation.exception");
|
|
5
6
|
class PluginHostError extends business_violation_exception_1.BusinessViolationException {
|
|
7
|
+
httpStatus = common_1.HttpStatus.BAD_REQUEST;
|
|
6
8
|
constructor(code, message, errorDetails) {
|
|
7
9
|
super(message, errorDetails, code);
|
|
8
10
|
}
|
|
@@ -63,6 +65,13 @@ class PluginSyncRateLimitedError extends PluginHostError {
|
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
67
|
exports.PluginSyncRateLimitedError = PluginSyncRateLimitedError;
|
|
68
|
+
class PluginCheckRateLimitedError extends PluginHostError {
|
|
69
|
+
memberVisible = true;
|
|
70
|
+
constructor(retryAfterSeconds) {
|
|
71
|
+
super('PLUGIN_CHECK_RATE_LIMITED', `This plugin was checked very recently. Try again in ${retryAfterSeconds} seconds.`, { retryAfterSeconds });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.PluginCheckRateLimitedError = PluginCheckRateLimitedError;
|
|
66
75
|
class PluginSyncInProgressError extends PluginHostError {
|
|
67
76
|
memberVisible = true;
|
|
68
77
|
constructor() {
|
|
@@ -19,8 +19,8 @@ let PluginHostExceptionFilter = PluginHostExceptionFilter_1 = class PluginHostEx
|
|
|
19
19
|
if (!exception.memberVisible) {
|
|
20
20
|
this.logger.warn(`Withheld ${exception.code} detail from a member-facing response: ${exception.message}`, exception.errorDetails);
|
|
21
21
|
}
|
|
22
|
-
response.status(
|
|
23
|
-
statusCode:
|
|
22
|
+
response.status(exception.httpStatus).json({
|
|
23
|
+
statusCode: exception.httpStatus,
|
|
24
24
|
timestamp: new Date().toISOString(),
|
|
25
25
|
path: request.url,
|
|
26
26
|
code: exception.code,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PluginActionExecutionView } from '../dto/domain/plugin-action-execution.dto';
|
|
2
|
+
import type { PluginActionExecutionSummary } from '../services/plugin-action-execution.service';
|
|
3
|
+
export declare function toPluginActionExecutionView(execution: PluginActionExecutionSummary): PluginActionExecutionView;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toPluginActionExecutionView = toPluginActionExecutionView;
|
|
4
|
+
const plugin_action_execution_status_enum_1 = require("../enums/plugin-action-execution-status.enum");
|
|
5
|
+
function toPluginActionExecutionView(execution) {
|
|
6
|
+
const failed = (0, plugin_action_execution_status_enum_1.isFinalPluginActionStatus)(execution.status) &&
|
|
7
|
+
execution.status !== plugin_action_execution_status_enum_1.PluginActionExecutionStatus.SUCCEEDED;
|
|
8
|
+
return {
|
|
9
|
+
id: execution.id,
|
|
10
|
+
action: execution.action,
|
|
11
|
+
status: execution.status,
|
|
12
|
+
trigger: execution.trigger,
|
|
13
|
+
startedAt: execution.startedAt,
|
|
14
|
+
deadlineAt: execution.deadlineAt,
|
|
15
|
+
finishedAt: execution.finishedAt,
|
|
16
|
+
result: execution.status === plugin_action_execution_status_enum_1.PluginActionExecutionStatus.SUCCEEDED ? execution.result : null,
|
|
17
|
+
error: failed
|
|
18
|
+
? { code: execution.errorCode ?? execution.status, message: execution.errorMessage ?? '' }
|
|
19
|
+
: null,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=plugin-action-execution.mapper.js.map
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { AuthorizationContext } from '../../idp';
|
|
2
|
+
import { CheckPluginReleaseCommand, PluginReleaseCheckResultDto } from '../dto/domain/check-plugin-release.command';
|
|
3
|
+
import type { PluginHistoryPageDto, PluginHistoryPluginDto } from '../dto/domain/plugin-history.dto';
|
|
4
|
+
import { ListPluginHistoryCommand } from '../dto/domain/list-plugin-history.command';
|
|
5
|
+
import { ListPluginHistoryQueryApiDto, PluginHistoryPageApiDto } from '../dto/presentation/plugin-history-api.dto';
|
|
6
|
+
import { FindPluginByRepositoryCommand } from '../dto/domain/find-plugin-by-repository.command';
|
|
2
7
|
import { GetPluginDetailsCommand } from '../dto/domain/get-plugin-details.command';
|
|
3
8
|
import { GetPluginGalleryCommand } from '../dto/domain/get-plugin-gallery.command';
|
|
4
9
|
import { GetPluginInstallationEntryCommand } from '../dto/domain/get-plugin-installation-entry.command';
|
|
5
10
|
import { InstallPluginCommand } from '../dto/domain/install-plugin.command';
|
|
11
|
+
import type { PluginActionExecutionView, PluginActionWorkerContext, StartedPluginActionExecution } from '../dto/domain/plugin-action-execution.dto';
|
|
12
|
+
import { PluginActionExecutionApiDto, PluginActionWorkerContextApiDto, StartedPluginActionExecutionApiDto } from '../dto/presentation/plugin-action-api.dto';
|
|
6
13
|
import { ListInstallationsCommand } from '../dto/domain/list-installations.command';
|
|
7
14
|
import { ListPublicationsCommand } from '../dto/domain/list-publications.command';
|
|
8
15
|
import { InstalledPluginDto, PluginInstallationDto, PluginInstallationEntryDto } from '../dto/domain/plugin-installation.dto';
|
|
@@ -14,8 +21,9 @@ import { UninstallPluginCommand } from '../dto/domain/uninstall-plugin.command';
|
|
|
14
21
|
import { PluginUpdateResultDto, UpdatePluginCommand } from '../dto/domain/update-plugin.command';
|
|
15
22
|
import { InstalledPluginApiDto, InstallPluginApiDto, PluginEntryApiDto, PluginInstallationApiDto, PluginUpdateResultApiDto } from '../dto/presentation/plugin-installation-api.dto';
|
|
16
23
|
import { PluginGalleryEntryApiDto } from '../dto/presentation/plugin-gallery-api.dto';
|
|
24
|
+
import { PluginLookupApiDto } from '../dto/presentation/plugin-lookup-api.dto';
|
|
17
25
|
import { PluginSuspensionResponseApiDto, SuspendPluginApiDto } from '../dto/presentation/plugin-suspension-api.dto';
|
|
18
|
-
import { PluginPublisherDiagnosticsApiDto, PublicationResponseApiDto, PublishPluginApiDto, UpdatePluginByRepositoryApiDto } from '../dto/presentation/publication-api.dto';
|
|
26
|
+
import { CheckPluginReleaseApiDto, PluginPublisherDiagnosticsApiDto, PluginReleaseCheckResultApiDto, PublicationResponseApiDto, PublishPluginApiDto, UpdatePluginByRepositoryApiDto } from '../dto/presentation/publication-api.dto';
|
|
19
27
|
import { PluginVersion } from '../entities/plugin-version.entity';
|
|
20
28
|
import { Plugin } from '../entities/plugin.entity';
|
|
21
29
|
import { PluginPublicationScope } from '../enums/plugin-publication-scope.enum';
|
|
@@ -31,14 +39,22 @@ export declare class PluginPresentationMapper {
|
|
|
31
39
|
toGetPluginGalleryCommand(context: AuthorizationContext): GetPluginGalleryCommand;
|
|
32
40
|
toGetPluginDetailsCommand(pluginId: string, context: AuthorizationContext): GetPluginDetailsCommand;
|
|
33
41
|
toListInstallationsCommand(context: AuthorizationContext, includeUninstalled: boolean): ListInstallationsCommand;
|
|
42
|
+
toListPluginHistoryCommand(context: AuthorizationContext, query: ListPluginHistoryQueryApiDto): ListPluginHistoryCommand;
|
|
43
|
+
toPluginHistoryResponse(page: PluginHistoryPageDto): PluginHistoryPageApiDto;
|
|
44
|
+
toFindPluginByRepositoryCommand(repository: string, context: AuthorizationContext): FindPluginByRepositoryCommand;
|
|
34
45
|
toGetPluginInstallationEntryCommand(installationId: string, context: AuthorizationContext): GetPluginInstallationEntryCommand;
|
|
35
46
|
toInstallCommand(pluginId: string, context: AuthorizationContext, dto: InstallPluginApiDto): InstallPluginCommand;
|
|
36
47
|
toUpdateCommand(pluginId: string, context: AuthorizationContext): UpdatePluginCommand;
|
|
37
48
|
toUpdateByRepositoryCommand(context: AuthorizationContext, dto: UpdatePluginByRepositoryApiDto): UpdatePluginCommand;
|
|
49
|
+
toCheckReleaseCommand(context: AuthorizationContext, dto: CheckPluginReleaseApiDto): CheckPluginReleaseCommand;
|
|
38
50
|
toUninstallCommand(pluginId: string, context: AuthorizationContext): UninstallPluginCommand;
|
|
39
51
|
toSuspendCommand(context: AuthorizationContext, dto: SuspendPluginApiDto): SuspendPluginCommand;
|
|
40
52
|
toResumeCommand(context: AuthorizationContext, dto: SuspendPluginApiDto): ResumePluginCommand;
|
|
41
53
|
toMemberDto(plugin: Plugin, version: PluginVersion | null, context: PluginViewContext): PluginGalleryEntryDto;
|
|
54
|
+
toHistoryPlugin(plugin: Plugin, version: PluginVersion | null): PluginHistoryPluginDto;
|
|
55
|
+
toLookupResponse(result: {
|
|
56
|
+
pluginId: string;
|
|
57
|
+
}): PluginLookupApiDto;
|
|
42
58
|
toGalleryEntryResponse(dto: PluginGalleryEntryDto): PluginGalleryEntryApiDto;
|
|
43
59
|
toGalleryEntryResponseList(dtos: PluginGalleryEntryDto[]): PluginGalleryEntryApiDto[];
|
|
44
60
|
toPublicationResponse(dto: PluginPublicationDto): PublicationResponseApiDto;
|
|
@@ -49,6 +65,11 @@ export declare class PluginPresentationMapper {
|
|
|
49
65
|
toInstalledPluginResponseList(dtos: InstalledPluginDto[]): InstalledPluginApiDto[];
|
|
50
66
|
toInstallationEntryResponse(dto: PluginInstallationEntryDto): PluginEntryApiDto;
|
|
51
67
|
toUpdateResultResponse(dto: PluginUpdateResultDto): PluginUpdateResultApiDto;
|
|
68
|
+
toReleaseCheckResponse(dto: PluginReleaseCheckResultDto): PluginReleaseCheckResultApiDto;
|
|
52
69
|
toSuspensionResponse(dto: PluginSuspensionDto): PluginSuspensionResponseApiDto;
|
|
70
|
+
toStartedActionExecutionResponse(dto: StartedPluginActionExecution): StartedPluginActionExecutionApiDto;
|
|
71
|
+
toActionExecutionResponse(dto: PluginActionExecutionView): PluginActionExecutionApiDto;
|
|
72
|
+
toActionWorkerContextResponse(dto: PluginActionWorkerContext): PluginActionWorkerContextApiDto;
|
|
73
|
+
private displayNameOf;
|
|
53
74
|
private toSource;
|
|
54
75
|
}
|