@webiny/api-core 0.0.0-unstable.b9b64acb6d → 0.0.0-unstable.d0f34a8194
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/ApiCoreFeature.d.ts +6 -2
- package/ApiCoreFeature.js +55 -15
- package/ApiCoreFeature.js.map +1 -1
- package/domain/identity/SystemIdentityValue.js +9 -8
- package/domain/identity/SystemIdentityValue.js.map +1 -1
- package/domain/security/ApiToken.d.ts +1 -0
- package/domain/security/ApiToken.js +5 -10
- package/domain/security/ApiToken.js.map +1 -1
- package/domain/tenancy/RootTenantValue.js +9 -8
- package/domain/tenancy/RootTenantValue.js.map +1 -1
- package/domain/tenancy/errors.js +0 -3
- package/exports/api/build-params.d.ts +1 -0
- package/exports/api/build-params.js +0 -2
- package/exports/api/event-publisher.d.ts +1 -0
- package/exports/api/event-publisher.js +0 -2
- package/exports/api/graphql.js +0 -2
- package/exports/api/key-value-store.d.ts +1 -0
- package/exports/api/key-value-store.js +0 -2
- package/exports/api/logger.d.ts +1 -0
- package/exports/api/logger.js +0 -2
- package/exports/api/security/api-key.d.ts +4 -3
- package/exports/api/security/api-key.js +4 -5
- package/exports/api/security/authentication.d.ts +1 -1
- package/exports/api/security/authentication.js +1 -3
- package/exports/api/security/role.d.ts +3 -3
- package/exports/api/security/role.js +3 -5
- package/exports/api/security/user.d.ts +3 -3
- package/exports/api/security/user.js +3 -5
- package/exports/api/security.d.ts +6 -0
- package/exports/api/security.js +5 -4
- package/exports/api/system.d.ts +1 -1
- package/exports/api/system.js +1 -3
- package/exports/api/tasks.d.ts +1 -0
- package/exports/api/tasks.js +1 -3
- package/exports/api/tenancy.d.ts +4 -4
- package/exports/api/tenancy.js +4 -6
- package/exports/api/webhooks.d.ts +1 -0
- package/exports/api/webhooks.js +1 -0
- package/exports/api.d.ts +8 -0
- package/exports/api.js +7 -0
- package/features/ai/Ai.d.ts +30 -0
- package/features/ai/Ai.js +159 -0
- package/features/ai/Ai.js.map +1 -0
- package/features/ai/AiModelRegistry.d.ts +14 -0
- package/features/ai/AiModelRegistry.js +39 -0
- package/features/ai/AiModelRegistry.js.map +1 -0
- package/features/ai/AiSdkToolHandlerResolver.d.ts +11 -0
- package/features/ai/AiSdkToolHandlerResolver.js +19 -0
- package/features/ai/AiSdkToolHandlerResolver.js.map +1 -0
- package/features/ai/AiSdkTools.d.ts +12 -0
- package/features/ai/AiSdkTools.js +31 -0
- package/features/ai/AiSdkTools.js.map +1 -0
- package/features/ai/AnthropicSdkFactory.d.ts +10 -0
- package/features/ai/AnthropicSdkFactory.js +72 -0
- package/features/ai/AnthropicSdkFactory.js.map +1 -0
- package/features/ai/DEVELOPERS.md +183 -0
- package/features/ai/GoogleSdkFactory.d.ts +10 -0
- package/features/ai/GoogleSdkFactory.js +65 -0
- package/features/ai/GoogleSdkFactory.js.map +1 -0
- package/features/ai/OpenAiSdkFactory.d.ts +10 -0
- package/features/ai/OpenAiSdkFactory.js +132 -0
- package/features/ai/OpenAiSdkFactory.js.map +1 -0
- package/features/ai/OpenRouterSdkFactory.d.ts +10 -0
- package/features/ai/OpenRouterSdkFactory.js +112 -0
- package/features/ai/OpenRouterSdkFactory.js.map +1 -0
- package/features/ai/RemoteAiModelCatalog.d.ts +13 -0
- package/features/ai/RemoteAiModelCatalog.js +74 -0
- package/features/ai/RemoteAiModelCatalog.js.map +1 -0
- package/features/ai/TextExtractor/DefaultTextExtractor.d.ts +9 -0
- package/features/ai/TextExtractor/DefaultTextExtractor.js +28 -0
- package/features/ai/TextExtractor/DefaultTextExtractor.js.map +1 -0
- package/features/ai/TextExtractor/abstractions.d.ts +12 -0
- package/features/ai/TextExtractor/abstractions.js +5 -0
- package/features/ai/TextExtractor/abstractions.js.map +1 -0
- package/features/ai/TextExtractor/index.d.ts +3 -0
- package/features/ai/TextExtractor/index.js +2 -0
- package/features/ai/TextExtractor/parsers/docxParser.d.ts +1 -0
- package/features/ai/TextExtractor/parsers/docxParser.js +111 -0
- package/features/ai/TextExtractor/parsers/docxParser.js.map +1 -0
- package/features/ai/abstractions.d.ts +187 -0
- package/features/ai/abstractions.js +14 -0
- package/features/ai/abstractions.js.map +1 -0
- package/features/ai/events.d.ts +59 -0
- package/features/ai/events.js +41 -0
- package/features/ai/events.js.map +1 -0
- package/features/ai/feature.d.ts +4 -0
- package/features/ai/feature.js +33 -0
- package/features/ai/feature.js.map +1 -0
- package/features/ai/index.d.ts +7 -0
- package/features/ai/index.js +5 -0
- package/features/ai/toolPipeline/AiOutputToolRegistry.d.ts +11 -0
- package/features/ai/toolPipeline/AiOutputToolRegistry.js +31 -0
- package/features/ai/toolPipeline/AiOutputToolRegistry.js.map +1 -0
- package/features/ai/toolPipeline/AiToolPipelineRunner.d.ts +10 -0
- package/features/ai/toolPipeline/AiToolPipelineRunner.js +36 -0
- package/features/ai/toolPipeline/AiToolPipelineRunner.js.map +1 -0
- package/features/ai/toolPipeline/abstractions.d.ts +23 -0
- package/features/ai/toolPipeline/abstractions.js +7 -0
- package/features/ai/toolPipeline/abstractions.js.map +1 -0
- package/features/ai/toolPipeline/index.d.ts +2 -0
- package/features/ai/toolPipeline/index.js +1 -0
- package/features/buildParams/BuildParams.js +20 -14
- package/features/buildParams/BuildParams.js.map +1 -1
- package/features/buildParams/abstractions.d.ts +2 -0
- package/features/buildParams/abstractions.js +3 -2
- package/features/buildParams/abstractions.js.map +1 -1
- package/features/buildParams/feature.d.ts +5 -1
- package/features/buildParams/feature.js +6 -5
- package/features/buildParams/feature.js.map +1 -1
- package/features/buildParams/index.js +0 -2
- package/features/dateFormatter/DefaultDateFormatter.d.ts +15 -0
- package/features/dateFormatter/DefaultDateFormatter.js +20 -0
- package/features/dateFormatter/DefaultDateFormatter.js.map +1 -0
- package/features/dateFormatter/abstractions.d.ts +13 -0
- package/features/dateFormatter/abstractions.js +5 -0
- package/features/dateFormatter/abstractions.js.map +1 -0
- package/features/dateFormatter/feature.d.ts +4 -0
- package/features/dateFormatter/feature.js +11 -0
- package/features/dateFormatter/feature.js.map +1 -0
- package/features/dateFormatter/index.d.ts +3 -0
- package/features/dateFormatter/index.js +2 -0
- package/features/debugger/Debugger.d.ts +30 -0
- package/features/debugger/Debugger.js +142 -0
- package/features/debugger/Debugger.js.map +1 -0
- package/features/debugger/DebuggerRouteDecorator.d.ts +45 -0
- package/features/debugger/DebuggerRouteDecorator.js +107 -0
- package/features/debugger/DebuggerRouteDecorator.js.map +1 -0
- package/features/debugger/GraphQLDebuggerTransport.d.ts +28 -0
- package/features/debugger/GraphQLDebuggerTransport.js +45 -0
- package/features/debugger/GraphQLDebuggerTransport.js.map +1 -0
- package/features/debugger/__tests__/matchNamespace.test.d.ts +1 -0
- package/features/debugger/__tests__/matchNamespace.test.js +68 -0
- package/features/debugger/__tests__/matchNamespace.test.js.map +1 -0
- package/features/debugger/__tests__/serialize.test.d.ts +1 -0
- package/features/debugger/__tests__/serialize.test.js +220 -0
- package/features/debugger/__tests__/serialize.test.js.map +1 -0
- package/features/debugger/abstractions.d.ts +100 -0
- package/features/debugger/abstractions.js +6 -0
- package/features/debugger/abstractions.js.map +1 -0
- package/features/debugger/feature.d.ts +5 -0
- package/features/debugger/feature.js +15 -0
- package/features/debugger/feature.js.map +1 -0
- package/features/debugger/index.d.ts +12 -0
- package/features/debugger/index.js +7 -0
- package/features/debugger/limits.d.ts +18 -0
- package/features/debugger/limits.js +11 -0
- package/features/debugger/limits.js.map +1 -0
- package/features/debugger/matchNamespace.d.ts +14 -0
- package/features/debugger/matchNamespace.js +35 -0
- package/features/debugger/matchNamespace.js.map +1 -0
- package/features/debugger/parseNamespaceHeader.d.ts +7 -0
- package/features/debugger/parseNamespaceHeader.js +16 -0
- package/features/debugger/parseNamespaceHeader.js.map +1 -0
- package/features/debugger/permissions.d.ts +14 -0
- package/features/debugger/permissions.js +8 -0
- package/features/debugger/permissions.js.map +1 -0
- package/features/debugger/permissionsSchema.d.ts +17 -0
- package/features/debugger/permissionsSchema.js +18 -0
- package/features/debugger/permissionsSchema.js.map +1 -0
- package/features/debugger/serialize.d.ts +11 -0
- package/features/debugger/serialize.js +121 -0
- package/features/debugger/serialize.js.map +1 -0
- package/features/encryption/EncryptionKeyCacheFeature.d.ts +8 -0
- package/features/encryption/EncryptionKeyCacheFeature.js +11 -0
- package/features/encryption/EncryptionKeyCacheFeature.js.map +1 -0
- package/features/encryption/EncryptionService.d.ts +11 -0
- package/features/encryption/EncryptionService.js +69 -0
- package/features/encryption/EncryptionService.js.map +1 -0
- package/features/encryption/MemoryEncryptionKeyCache.d.ts +13 -0
- package/features/encryption/MemoryEncryptionKeyCache.js +26 -0
- package/features/encryption/MemoryEncryptionKeyCache.js.map +1 -0
- package/features/encryption/abstractions.d.ts +20 -0
- package/features/encryption/abstractions.js +6 -0
- package/features/encryption/abstractions.js.map +1 -0
- package/features/encryption/feature.d.ts +4 -0
- package/features/encryption/feature.js +11 -0
- package/features/encryption/feature.js.map +1 -0
- package/features/encryption/index.d.ts +2 -0
- package/features/encryption/index.js +2 -0
- package/features/eventPublisher/EventPublisher.js +9 -15
- package/features/eventPublisher/EventPublisher.js.map +1 -1
- package/features/eventPublisher/__tests__/EventPublisher.test.js +385 -419
- package/features/eventPublisher/__tests__/EventPublisher.test.js.map +1 -1
- package/features/eventPublisher/abstractions.d.ts +2 -0
- package/features/eventPublisher/abstractions.js +7 -9
- package/features/eventPublisher/abstractions.js.map +1 -1
- package/features/eventPublisher/feature.d.ts +5 -1
- package/features/eventPublisher/feature.js +8 -7
- package/features/eventPublisher/feature.js.map +1 -1
- package/features/eventPublisher/index.js +0 -2
- package/features/featureFlags/FeatureFlags.js +15 -12
- package/features/featureFlags/FeatureFlags.js.map +1 -1
- package/features/featureFlags/abstractions.js +2 -1
- package/features/featureFlags/abstractions.js.map +1 -1
- package/features/featureFlags/decorators/FeatureFlagsWithLicenseDecorator.d.ts +13 -0
- package/features/featureFlags/decorators/FeatureFlagsWithLicenseDecorator.js +62 -0
- package/features/featureFlags/decorators/FeatureFlagsWithLicenseDecorator.js.map +1 -0
- package/features/featureFlags/feature.d.ts +5 -1
- package/features/featureFlags/feature.js +6 -5
- package/features/featureFlags/feature.js.map +1 -1
- package/features/hashing/ScryptHasher.d.ts +11 -0
- package/features/hashing/ScryptHasher.js +74 -0
- package/features/hashing/ScryptHasher.js.map +1 -0
- package/features/hashing/abstractions.d.ts +18 -0
- package/features/hashing/abstractions.js +5 -0
- package/features/hashing/abstractions.js.map +1 -0
- package/features/hashing/feature.d.ts +4 -0
- package/features/hashing/feature.js +11 -0
- package/features/hashing/feature.js.map +1 -0
- package/features/hashing/index.d.ts +2 -0
- package/features/hashing/index.js +1 -0
- package/features/httpClient/HttpClient.d.ts +7 -0
- package/features/httpClient/HttpClient.js +72 -0
- package/features/httpClient/HttpClient.js.map +1 -0
- package/features/httpClient/HttpRequestError.d.ts +10 -0
- package/features/httpClient/HttpRequestError.js +13 -0
- package/features/httpClient/HttpRequestError.js.map +1 -0
- package/features/httpClient/HttpStatusError.d.ts +12 -0
- package/features/httpClient/HttpStatusError.js +12 -0
- package/features/httpClient/HttpStatusError.js.map +1 -0
- package/features/httpClient/abstractions.d.ts +32 -0
- package/features/httpClient/abstractions.js +5 -0
- package/features/httpClient/abstractions.js.map +1 -0
- package/features/httpClient/feature.d.ts +4 -0
- package/features/httpClient/feature.js +11 -0
- package/features/httpClient/feature.js.map +1 -0
- package/features/httpClient/index.d.ts +3 -0
- package/features/httpClient/index.js +3 -0
- package/features/keyValueStore/GlobalKeyValueStore.d.ts +9 -3
- package/features/keyValueStore/GlobalKeyValueStore.js +38 -23
- package/features/keyValueStore/GlobalKeyValueStore.js.map +1 -1
- package/features/keyValueStore/KeyValueStore.d.ts +6 -2
- package/features/keyValueStore/KeyValueStore.js +40 -27
- package/features/keyValueStore/KeyValueStore.js.map +1 -1
- package/features/keyValueStore/KeyValueStoreRepository.d.ts +9 -3
- package/features/keyValueStore/KeyValueStoreRepository.js +113 -42
- package/features/keyValueStore/KeyValueStoreRepository.js.map +1 -1
- package/features/keyValueStore/abstractions.d.ts +140 -14
- package/features/keyValueStore/abstractions.js +5 -16
- package/features/keyValueStore/abstractions.js.map +1 -1
- package/features/keyValueStore/errors.d.ts +29 -0
- package/features/keyValueStore/errors.js +64 -17
- package/features/keyValueStore/errors.js.map +1 -1
- package/features/keyValueStore/feature.d.ts +4 -1
- package/features/keyValueStore/feature.js +9 -9
- package/features/keyValueStore/feature.js.map +1 -1
- package/features/keyValueStore/index.d.ts +4 -1
- package/features/keyValueStore/index.js +2 -4
- package/features/logger/LoggerService.js +41 -45
- package/features/logger/LoggerService.js.map +1 -1
- package/features/logger/abstractions.d.ts +1 -0
- package/features/logger/abstractions.js +2 -1
- package/features/logger/abstractions.js.map +1 -1
- package/features/logger/feature.d.ts +4 -1
- package/features/logger/feature.js +6 -5
- package/features/logger/feature.js.map +1 -1
- package/features/logger/index.js +0 -2
- package/features/masker/Masker.d.ts +8 -0
- package/features/masker/Masker.js +18 -0
- package/features/masker/Masker.js.map +1 -0
- package/features/masker/abstractions.d.ts +11 -0
- package/features/masker/abstractions.js +5 -0
- package/features/masker/abstractions.js.map +1 -0
- package/features/masker/feature.d.ts +4 -0
- package/features/masker/feature.js +11 -0
- package/features/masker/feature.js.map +1 -0
- package/features/masker/index.d.ts +1 -0
- package/features/masker/index.js +1 -0
- package/features/publicUrls/NullPublicUrls.d.ts +11 -0
- package/features/publicUrls/NullPublicUrls.js +17 -0
- package/features/publicUrls/NullPublicUrls.js.map +1 -0
- package/features/publicUrls/PublicUrl.d.ts +24 -0
- package/features/publicUrls/PublicUrl.js +43 -0
- package/features/publicUrls/PublicUrl.js.map +1 -0
- package/features/publicUrls/__tests__/PublicUrl.test.d.ts +1 -0
- package/features/publicUrls/__tests__/PublicUrl.test.js +38 -0
- package/features/publicUrls/__tests__/PublicUrl.test.js.map +1 -0
- package/features/publicUrls/__tests__/PublicUrls.test.d.ts +1 -0
- package/features/publicUrls/__tests__/PublicUrls.test.js +14 -0
- package/features/publicUrls/__tests__/PublicUrls.test.js.map +1 -0
- package/features/publicUrls/abstractions.d.ts +27 -0
- package/features/publicUrls/abstractions.js +5 -0
- package/features/publicUrls/abstractions.js.map +1 -0
- package/features/publicUrls/feature.d.ts +8 -0
- package/features/publicUrls/feature.js +11 -0
- package/features/publicUrls/feature.js.map +1 -0
- package/features/publicUrls/index.d.ts +3 -0
- package/features/publicUrls/index.js +3 -0
- package/features/requestContext/RawAssumePermissions.d.ts +14 -0
- package/features/requestContext/RawAssumePermissions.js +19 -0
- package/features/requestContext/RawAssumePermissions.js.map +1 -0
- package/features/requestContext/RawAuthToken.d.ts +14 -0
- package/features/requestContext/RawAuthToken.js +19 -0
- package/features/requestContext/RawAuthToken.js.map +1 -0
- package/features/requestContext/RawTenantId.d.ts +14 -0
- package/features/requestContext/RawTenantId.js +19 -0
- package/features/requestContext/RawTenantId.js.map +1 -0
- package/features/requestContext/RequestIdentityLoader.d.ts +19 -0
- package/features/requestContext/RequestIdentityLoader.js +26 -0
- package/features/requestContext/RequestIdentityLoader.js.map +1 -0
- package/features/requestContext/RequestTenantLoader.d.ts +18 -0
- package/features/requestContext/RequestTenantLoader.js +52 -0
- package/features/requestContext/RequestTenantLoader.js.map +1 -0
- package/features/requestContext/abstractions.d.ts +75 -0
- package/features/requestContext/abstractions.js +9 -0
- package/features/requestContext/abstractions.js.map +1 -0
- package/features/requestContext/extractAssumePermissions.d.ts +14 -0
- package/features/requestContext/extractAssumePermissions.js +32 -0
- package/features/requestContext/extractAssumePermissions.js.map +1 -0
- package/features/requestContext/feature.d.ts +12 -0
- package/features/requestContext/feature.js +19 -0
- package/features/requestContext/feature.js.map +1 -0
- package/features/requestContext/index.d.ts +4 -0
- package/features/requestContext/index.js +3 -0
- package/features/security/IdentityContext/AnonymousIdentity.js +12 -16
- package/features/security/IdentityContext/AnonymousIdentity.js.map +1 -1
- package/features/security/IdentityContext/AuthenticatedIdentity.js +5 -8
- package/features/security/IdentityContext/AuthenticatedIdentity.js.map +1 -1
- package/features/security/IdentityContext/Identity.js +63 -71
- package/features/security/IdentityContext/Identity.js.map +1 -1
- package/features/security/IdentityContext/IdentityContext.d.ts +4 -3
- package/features/security/IdentityContext/IdentityContext.js +73 -107
- package/features/security/IdentityContext/IdentityContext.js.map +1 -1
- package/features/security/IdentityContext/abstractions.d.ts +6 -0
- package/features/security/IdentityContext/abstractions.js +2 -1
- package/features/security/IdentityContext/abstractions.js.map +1 -1
- package/features/security/IdentityContext/feature.d.ts +4 -1
- package/features/security/IdentityContext/feature.js +6 -5
- package/features/security/IdentityContext/feature.js.map +1 -1
- package/features/security/IdentityContext/index.js +0 -3
- package/features/security/SecurityFeature.d.ts +5 -1
- package/features/security/SecurityFeature.js +13 -21
- package/features/security/SecurityFeature.js.map +1 -1
- package/features/security/apiKeys/ApiKeyAuthenticator.d.ts +14 -0
- package/features/security/apiKeys/ApiKeyAuthenticator.js +36 -0
- package/features/security/apiKeys/ApiKeyAuthenticator.js.map +1 -0
- package/features/security/apiKeys/ApiKeyAuthorizer.d.ts +10 -0
- package/features/security/apiKeys/ApiKeyAuthorizer.js +15 -0
- package/features/security/apiKeys/ApiKeyAuthorizer.js.map +1 -0
- package/features/security/apiKeys/CreateApiKey/CreateApiKeyUseCase.js +53 -49
- package/features/security/apiKeys/CreateApiKey/CreateApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/CreateApiKey/abstractions.d.ts +1 -0
- package/features/security/apiKeys/CreateApiKey/abstractions.js +2 -1
- package/features/security/apiKeys/CreateApiKey/abstractions.js.map +1 -1
- package/features/security/apiKeys/CreateApiKey/events.d.ts +6 -4
- package/features/security/apiKeys/CreateApiKey/events.js +17 -12
- package/features/security/apiKeys/CreateApiKey/events.js.map +1 -1
- package/features/security/apiKeys/CreateApiKey/feature.d.ts +4 -1
- package/features/security/apiKeys/CreateApiKey/feature.js +6 -5
- package/features/security/apiKeys/CreateApiKey/feature.js.map +1 -1
- package/features/security/apiKeys/CreateApiKey/index.js +0 -2
- package/features/security/apiKeys/DeleteApiKey/DeleteApiKeyUseCase.js +29 -30
- package/features/security/apiKeys/DeleteApiKey/DeleteApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/DeleteApiKey/abstractions.d.ts +1 -0
- package/features/security/apiKeys/DeleteApiKey/abstractions.js +2 -1
- package/features/security/apiKeys/DeleteApiKey/abstractions.js.map +1 -1
- package/features/security/apiKeys/DeleteApiKey/events.d.ts +6 -4
- package/features/security/apiKeys/DeleteApiKey/events.js +17 -12
- package/features/security/apiKeys/DeleteApiKey/events.js.map +1 -1
- package/features/security/apiKeys/DeleteApiKey/feature.d.ts +4 -1
- package/features/security/apiKeys/DeleteApiKey/feature.js +6 -5
- package/features/security/apiKeys/DeleteApiKey/feature.js.map +1 -1
- package/features/security/apiKeys/DeleteApiKey/index.js +0 -2
- package/features/security/apiKeys/GetApiKey/GetApiKeyUseCase.d.ts +1 -1
- package/features/security/apiKeys/GetApiKey/GetApiKeyUseCase.js +16 -14
- package/features/security/apiKeys/GetApiKey/GetApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKey/abstractions.d.ts +1 -0
- package/features/security/apiKeys/GetApiKey/abstractions.js +2 -1
- package/features/security/apiKeys/GetApiKey/abstractions.js.map +1 -1
- package/features/security/apiKeys/GetApiKey/feature.d.ts +4 -1
- package/features/security/apiKeys/GetApiKey/feature.js +6 -5
- package/features/security/apiKeys/GetApiKey/feature.js.map +1 -1
- package/features/security/apiKeys/GetApiKey/index.js +0 -2
- package/features/security/apiKeys/GetApiKeyBySlug/GetApiKeyBySlugUseCase.d.ts +1 -3
- package/features/security/apiKeys/GetApiKeyBySlug/GetApiKeyBySlugUseCase.js +13 -10
- package/features/security/apiKeys/GetApiKeyBySlug/GetApiKeyBySlugUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyBySlug/abstractions.d.ts +2 -1
- package/features/security/apiKeys/GetApiKeyBySlug/abstractions.js +2 -1
- package/features/security/apiKeys/GetApiKeyBySlug/abstractions.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyBySlug/feature.d.ts +4 -1
- package/features/security/apiKeys/GetApiKeyBySlug/feature.js +6 -5
- package/features/security/apiKeys/GetApiKeyBySlug/feature.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyBySlug/index.js +0 -2
- package/features/security/apiKeys/GetApiKeyByToken/GetApiKeyByTokenUseCase.d.ts +1 -3
- package/features/security/apiKeys/GetApiKeyByToken/GetApiKeyByTokenUseCase.js +13 -10
- package/features/security/apiKeys/GetApiKeyByToken/GetApiKeyByTokenUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyByToken/abstractions.d.ts +2 -1
- package/features/security/apiKeys/GetApiKeyByToken/abstractions.js +2 -1
- package/features/security/apiKeys/GetApiKeyByToken/abstractions.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyByToken/feature.d.ts +4 -1
- package/features/security/apiKeys/GetApiKeyByToken/feature.js +6 -5
- package/features/security/apiKeys/GetApiKeyByToken/feature.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyByToken/index.js +0 -2
- package/features/security/apiKeys/ListApiKeys/ListApiKeysUseCase.js +17 -17
- package/features/security/apiKeys/ListApiKeys/ListApiKeysUseCase.js.map +1 -1
- package/features/security/apiKeys/ListApiKeys/abstractions.d.ts +1 -0
- package/features/security/apiKeys/ListApiKeys/abstractions.js +2 -1
- package/features/security/apiKeys/ListApiKeys/abstractions.js.map +1 -1
- package/features/security/apiKeys/ListApiKeys/feature.d.ts +4 -1
- package/features/security/apiKeys/ListApiKeys/feature.js +6 -5
- package/features/security/apiKeys/ListApiKeys/feature.js.map +1 -1
- package/features/security/apiKeys/ListApiKeys/index.js +0 -2
- package/features/security/apiKeys/UpdateApiKey/UpdateApiKeyUseCase.js +45 -42
- package/features/security/apiKeys/UpdateApiKey/UpdateApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/UpdateApiKey/abstractions.d.ts +1 -0
- package/features/security/apiKeys/UpdateApiKey/abstractions.js +2 -1
- package/features/security/apiKeys/UpdateApiKey/abstractions.js.map +1 -1
- package/features/security/apiKeys/UpdateApiKey/events.d.ts +6 -4
- package/features/security/apiKeys/UpdateApiKey/events.js +17 -12
- package/features/security/apiKeys/UpdateApiKey/events.js.map +1 -1
- package/features/security/apiKeys/UpdateApiKey/feature.d.ts +4 -1
- package/features/security/apiKeys/UpdateApiKey/feature.js +6 -5
- package/features/security/apiKeys/UpdateApiKey/feature.js.map +1 -1
- package/features/security/apiKeys/UpdateApiKey/index.js +0 -2
- package/features/security/apiKeys/feature.d.ts +4 -1
- package/features/security/apiKeys/feature.js +24 -17
- package/features/security/apiKeys/feature.js.map +1 -1
- package/features/security/apiKeys/shared/ApiKeyProvider.d.ts +3 -5
- package/features/security/apiKeys/shared/ApiKeyProvider.js +31 -46
- package/features/security/apiKeys/shared/ApiKeyProvider.js.map +1 -1
- package/features/security/apiKeys/shared/ApiKeysRepository.d.ts +1 -0
- package/features/security/apiKeys/shared/ApiKeysRepository.js +123 -135
- package/features/security/apiKeys/shared/ApiKeysRepository.js.map +1 -1
- package/features/security/apiKeys/shared/abstractions.d.ts +5 -2
- package/features/security/apiKeys/shared/abstractions.js +4 -3
- package/features/security/apiKeys/shared/abstractions.js.map +1 -1
- package/features/security/apiKeys/shared/errors.js +29 -32
- package/features/security/apiKeys/shared/errors.js.map +1 -1
- package/features/security/apiKeys/shared/generateToken.d.ts +1 -1
- package/features/security/apiKeys/shared/generateToken.js +6 -16
- package/features/security/apiKeys/shared/generateToken.js.map +1 -1
- package/features/security/apiKeys/shared/schemas.d.ts +12 -73
- package/features/security/apiKeys/shared/schemas.js +27 -23
- package/features/security/apiKeys/shared/schemas.js.map +1 -1
- package/features/security/apiKeys/shared/types.d.ts +1 -1
- package/features/security/apiKeys/shared/types.js +0 -3
- package/features/security/authentication/AuthenticationContext/AuthenticationContext.js +44 -38
- package/features/security/authentication/AuthenticationContext/AuthenticationContext.js.map +1 -1
- package/features/security/authentication/AuthenticationContext/SetIdTokenCookie.d.ts +2 -2
- package/features/security/authentication/AuthenticationContext/SetIdTokenCookie.js +33 -43
- package/features/security/authentication/AuthenticationContext/SetIdTokenCookie.js.map +1 -1
- package/features/security/authentication/AuthenticationContext/abstractions.d.ts +1 -0
- package/features/security/authentication/AuthenticationContext/abstractions.js +2 -1
- package/features/security/authentication/AuthenticationContext/abstractions.js.map +1 -1
- package/features/security/authentication/AuthenticationContext/errors.js +51 -116
- package/features/security/authentication/AuthenticationContext/errors.js.map +1 -1
- package/features/security/authentication/AuthenticationContext/events.d.ts +6 -4
- package/features/security/authentication/AuthenticationContext/events.js +17 -12
- package/features/security/authentication/AuthenticationContext/events.js.map +1 -1
- package/features/security/authentication/AuthenticationContext/feature.d.ts +4 -1
- package/features/security/authentication/AuthenticationContext/feature.js +6 -5
- package/features/security/authentication/AuthenticationContext/feature.js.map +1 -1
- package/features/security/authentication/AuthenticationContext/index.js +2 -4
- package/features/security/authentication/Authenticator/abstractions.d.ts +1 -0
- package/features/security/authentication/Authenticator/abstractions.js +2 -1
- package/features/security/authentication/Authenticator/abstractions.js.map +1 -1
- package/features/security/authentication/Authenticator/index.js +0 -2
- package/features/security/authorization/AuthorizationContext/AuthorizationContext.d.ts +13 -3
- package/features/security/authorization/AuthorizationContext/AuthorizationContext.js +61 -49
- package/features/security/authorization/AuthorizationContext/AuthorizationContext.js.map +1 -1
- package/features/security/authorization/AuthorizationContext/abstractions.d.ts +4 -0
- package/features/security/authorization/AuthorizationContext/abstractions.js +3 -2
- package/features/security/authorization/AuthorizationContext/abstractions.js.map +1 -1
- package/features/security/authorization/AuthorizationContext/feature.d.ts +4 -1
- package/features/security/authorization/AuthorizationContext/feature.js +15 -9
- package/features/security/authorization/AuthorizationContext/feature.js.map +1 -1
- package/features/security/authorization/AuthorizationContext/index.js +1 -4
- package/features/security/authorization/Authorizer/abstractions.d.ts +1 -0
- package/features/security/authorization/Authorizer/abstractions.js +2 -1
- package/features/security/authorization/Authorizer/abstractions.js.map +1 -1
- package/features/security/authorization/Authorizer/index.js +0 -2
- package/features/security/authorization/GroupsTeamsAuthorizer/AssumedPermissions.d.ts +30 -0
- package/features/security/authorization/GroupsTeamsAuthorizer/AssumedPermissions.js +60 -0
- package/features/security/authorization/GroupsTeamsAuthorizer/AssumedPermissions.js.map +1 -0
- package/features/security/authorization/GroupsTeamsAuthorizer/GetPermissionsFromIdentity.d.ts +4 -4
- package/features/security/authorization/GroupsTeamsAuthorizer/GetPermissionsFromIdentity.js +61 -65
- package/features/security/authorization/GroupsTeamsAuthorizer/GetPermissionsFromIdentity.js.map +1 -1
- package/features/security/authorization/GroupsTeamsAuthorizer/RolesTeamsAuthorizer.js +26 -40
- package/features/security/authorization/GroupsTeamsAuthorizer/RolesTeamsAuthorizer.js.map +1 -1
- package/features/security/authorization/GroupsTeamsAuthorizer/abstractions.js +2 -1
- package/features/security/authorization/GroupsTeamsAuthorizer/abstractions.js.map +1 -1
- package/features/security/authorization/GroupsTeamsAuthorizer/feature.d.ts +4 -1
- package/features/security/authorization/GroupsTeamsAuthorizer/feature.js +9 -6
- package/features/security/authorization/GroupsTeamsAuthorizer/feature.js.map +1 -1
- package/features/security/login/abstractions.d.ts +3 -2
- package/features/security/login/abstractions.js +9 -6
- package/features/security/login/abstractions.js.map +1 -1
- package/features/security/login/index.js +0 -2
- package/features/security/permissions/createPermissionSchema.d.ts +2 -0
- package/features/security/permissions/createPermissionSchema.js +9 -0
- package/features/security/permissions/createPermissionSchema.js.map +1 -0
- package/features/security/permissions/createPermissions.d.ts +5 -5
- package/features/security/permissions/createPermissions.js +130 -208
- package/features/security/permissions/createPermissions.js.map +1 -1
- package/features/security/permissions/index.d.ts +2 -1
- package/features/security/permissions/index.js +2 -3
- package/features/security/permissions/types.js +0 -3
- package/features/security/roles/CreateRole/CreateRoleUseCase.d.ts +1 -3
- package/features/security/roles/CreateRole/CreateRoleUseCase.js +58 -63
- package/features/security/roles/CreateRole/CreateRoleUseCase.js.map +1 -1
- package/features/security/roles/CreateRole/abstractions.d.ts +1 -0
- package/features/security/roles/CreateRole/abstractions.js +2 -1
- package/features/security/roles/CreateRole/abstractions.js.map +1 -1
- package/features/security/roles/CreateRole/events.d.ts +6 -4
- package/features/security/roles/CreateRole/events.js +17 -12
- package/features/security/roles/CreateRole/events.js.map +1 -1
- package/features/security/roles/CreateRole/feature.d.ts +4 -1
- package/features/security/roles/CreateRole/feature.js +6 -5
- package/features/security/roles/CreateRole/feature.js.map +1 -1
- package/features/security/roles/CreateRole/index.js +0 -2
- package/features/security/roles/CreateRole/schema.d.ts +3 -21
- package/features/security/roles/CreateRole/schema.js +8 -7
- package/features/security/roles/CreateRole/schema.js.map +1 -1
- package/features/security/roles/DeleteRole/DeleteRoleUseCase.js +35 -41
- package/features/security/roles/DeleteRole/DeleteRoleUseCase.js.map +1 -1
- package/features/security/roles/DeleteRole/abstractions.d.ts +1 -0
- package/features/security/roles/DeleteRole/abstractions.js +2 -1
- package/features/security/roles/DeleteRole/abstractions.js.map +1 -1
- package/features/security/roles/DeleteRole/events.d.ts +6 -4
- package/features/security/roles/DeleteRole/events.js +17 -12
- package/features/security/roles/DeleteRole/events.js.map +1 -1
- package/features/security/roles/DeleteRole/feature.d.ts +4 -1
- package/features/security/roles/DeleteRole/feature.js +6 -5
- package/features/security/roles/DeleteRole/feature.js.map +1 -1
- package/features/security/roles/DeleteRole/index.js +0 -2
- package/features/security/roles/GetRole/GetRoleUseCase.js +19 -18
- package/features/security/roles/GetRole/GetRoleUseCase.js.map +1 -1
- package/features/security/roles/GetRole/abstractions.d.ts +1 -0
- package/features/security/roles/GetRole/abstractions.js +2 -1
- package/features/security/roles/GetRole/abstractions.js.map +1 -1
- package/features/security/roles/GetRole/feature.d.ts +4 -1
- package/features/security/roles/GetRole/feature.js +6 -5
- package/features/security/roles/GetRole/feature.js.map +1 -1
- package/features/security/roles/GetRole/index.js +0 -2
- package/features/security/roles/Installer/RolesInstaller.js +39 -35
- package/features/security/roles/Installer/RolesInstaller.js.map +1 -1
- package/features/security/roles/ListRoles/ListRolesUseCase.js +18 -17
- package/features/security/roles/ListRoles/ListRolesUseCase.js.map +1 -1
- package/features/security/roles/ListRoles/abstractions.d.ts +1 -0
- package/features/security/roles/ListRoles/abstractions.js +2 -1
- package/features/security/roles/ListRoles/abstractions.js.map +1 -1
- package/features/security/roles/ListRoles/feature.d.ts +4 -1
- package/features/security/roles/ListRoles/feature.js +6 -5
- package/features/security/roles/ListRoles/feature.js.map +1 -1
- package/features/security/roles/ListRoles/index.js +0 -2
- package/features/security/roles/UpdateRole/UpdateRoleUseCase.js +49 -50
- package/features/security/roles/UpdateRole/UpdateRoleUseCase.js.map +1 -1
- package/features/security/roles/UpdateRole/abstractions.d.ts +1 -0
- package/features/security/roles/UpdateRole/abstractions.js +2 -1
- package/features/security/roles/UpdateRole/abstractions.js.map +1 -1
- package/features/security/roles/UpdateRole/events.d.ts +6 -4
- package/features/security/roles/UpdateRole/events.js +17 -12
- package/features/security/roles/UpdateRole/events.js.map +1 -1
- package/features/security/roles/UpdateRole/feature.d.ts +4 -1
- package/features/security/roles/UpdateRole/feature.js +6 -5
- package/features/security/roles/UpdateRole/feature.js.map +1 -1
- package/features/security/roles/UpdateRole/index.js +0 -2
- package/features/security/roles/UpdateRole/schema.d.ts +3 -19
- package/features/security/roles/UpdateRole/schema.js +7 -6
- package/features/security/roles/UpdateRole/schema.js.map +1 -1
- package/features/security/roles/feature.d.ts +4 -1
- package/features/security/roles/feature.js +15 -17
- package/features/security/roles/feature.js.map +1 -1
- package/features/security/roles/shared/RoleProvider.d.ts +13 -0
- package/features/security/roles/shared/RoleProvider.js +35 -0
- package/features/security/roles/shared/RoleProvider.js.map +1 -0
- package/features/security/roles/shared/RolesRepository.d.ts +3 -1
- package/features/security/roles/shared/RolesRepository.js +99 -115
- package/features/security/roles/shared/RolesRepository.js.map +1 -1
- package/features/security/roles/shared/abstractions.d.ts +19 -0
- package/features/security/roles/shared/abstractions.js +3 -1
- package/features/security/roles/shared/abstractions.js.map +1 -1
- package/features/security/roles/shared/decorators/ListCache.js +23 -22
- package/features/security/roles/shared/decorators/ListCache.js.map +1 -1
- package/features/security/roles/shared/decorators/RolesRepositoryCachingDecorator.js +40 -62
- package/features/security/roles/shared/decorators/RolesRepositoryCachingDecorator.js.map +1 -1
- package/features/security/roles/shared/errors.js +50 -56
- package/features/security/roles/shared/errors.js.map +1 -1
- package/features/security/roles/shared/types.js +0 -3
- package/features/security/shared/abstractions.d.ts +5 -14
- package/features/security/shared/abstractions.js +4 -19
- package/features/security/shared/abstractions.js.map +1 -1
- package/features/security/shared/description.d.ts +4 -0
- package/features/security/shared/description.js +7 -0
- package/features/security/shared/description.js.map +1 -0
- package/features/security/shared/errors.js +8 -8
- package/features/security/shared/errors.js.map +1 -1
- package/features/security/shared/index.d.ts +1 -0
- package/features/security/shared/index.js +1 -2
- package/features/security/teams/CreateTeam/CreateTeamUseCase.d.ts +3 -3
- package/features/security/teams/CreateTeam/CreateTeamUseCase.js +65 -63
- package/features/security/teams/CreateTeam/CreateTeamUseCase.js.map +1 -1
- package/features/security/teams/CreateTeam/abstractions.d.ts +1 -0
- package/features/security/teams/CreateTeam/abstractions.js +2 -1
- package/features/security/teams/CreateTeam/abstractions.js.map +1 -1
- package/features/security/teams/CreateTeam/events.d.ts +6 -4
- package/features/security/teams/CreateTeam/events.js +17 -12
- package/features/security/teams/CreateTeam/events.js.map +1 -1
- package/features/security/teams/CreateTeam/feature.d.ts +4 -1
- package/features/security/teams/CreateTeam/feature.js +6 -5
- package/features/security/teams/CreateTeam/feature.js.map +1 -1
- package/features/security/teams/CreateTeam/index.d.ts +1 -1
- package/features/security/teams/CreateTeam/index.js +1 -3
- package/features/security/teams/CreateTeam/schema.d.ts +3 -13
- package/features/security/teams/CreateTeam/schema.js +6 -5
- package/features/security/teams/CreateTeam/schema.js.map +1 -1
- package/features/security/teams/DeleteTeam/DeleteTeamUseCase.js +36 -46
- package/features/security/teams/DeleteTeam/DeleteTeamUseCase.js.map +1 -1
- package/features/security/teams/DeleteTeam/abstractions.d.ts +1 -0
- package/features/security/teams/DeleteTeam/abstractions.js +2 -1
- package/features/security/teams/DeleteTeam/abstractions.js.map +1 -1
- package/features/security/teams/DeleteTeam/events.d.ts +6 -4
- package/features/security/teams/DeleteTeam/events.js +17 -12
- package/features/security/teams/DeleteTeam/events.js.map +1 -1
- package/features/security/teams/DeleteTeam/feature.d.ts +4 -1
- package/features/security/teams/DeleteTeam/feature.js +6 -5
- package/features/security/teams/DeleteTeam/feature.js.map +1 -1
- package/features/security/teams/DeleteTeam/index.js +0 -2
- package/features/security/teams/GetTeam/GetTeamUseCase.js +17 -17
- package/features/security/teams/GetTeam/GetTeamUseCase.js.map +1 -1
- package/features/security/teams/GetTeam/abstractions.d.ts +1 -0
- package/features/security/teams/GetTeam/abstractions.js +2 -1
- package/features/security/teams/GetTeam/abstractions.js.map +1 -1
- package/features/security/teams/GetTeam/feature.d.ts +4 -1
- package/features/security/teams/GetTeam/feature.js +6 -5
- package/features/security/teams/GetTeam/feature.js.map +1 -1
- package/features/security/teams/GetTeam/index.js +0 -2
- package/features/security/teams/ListTeams/ListTeamsUseCase.js +20 -21
- package/features/security/teams/ListTeams/ListTeamsUseCase.js.map +1 -1
- package/features/security/teams/ListTeams/abstractions.d.ts +1 -0
- package/features/security/teams/ListTeams/abstractions.js +2 -1
- package/features/security/teams/ListTeams/abstractions.js.map +1 -1
- package/features/security/teams/ListTeams/feature.d.ts +4 -1
- package/features/security/teams/ListTeams/feature.js +6 -5
- package/features/security/teams/ListTeams/feature.js.map +1 -1
- package/features/security/teams/ListTeams/index.js +0 -2
- package/features/security/teams/UpdateTeam/UpdateTeamUseCase.d.ts +3 -1
- package/features/security/teams/UpdateTeam/UpdateTeamUseCase.js +61 -58
- package/features/security/teams/UpdateTeam/UpdateTeamUseCase.js.map +1 -1
- package/features/security/teams/UpdateTeam/abstractions.d.ts +1 -0
- package/features/security/teams/UpdateTeam/abstractions.js +2 -1
- package/features/security/teams/UpdateTeam/abstractions.js.map +1 -1
- package/features/security/teams/UpdateTeam/events.d.ts +6 -4
- package/features/security/teams/UpdateTeam/events.js +17 -12
- package/features/security/teams/UpdateTeam/events.js.map +1 -1
- package/features/security/teams/UpdateTeam/feature.d.ts +4 -1
- package/features/security/teams/UpdateTeam/feature.js +6 -5
- package/features/security/teams/UpdateTeam/feature.js.map +1 -1
- package/features/security/teams/UpdateTeam/index.js +0 -2
- package/features/security/teams/UpdateTeam/schema.d.ts +3 -11
- package/features/security/teams/UpdateTeam/schema.js +5 -4
- package/features/security/teams/UpdateTeam/schema.js.map +1 -1
- package/features/security/teams/feature.d.ts +4 -1
- package/features/security/teams/feature.js +15 -13
- package/features/security/teams/feature.js.map +1 -1
- package/features/security/teams/shared/TeamProvider.d.ts +13 -0
- package/features/security/teams/shared/TeamProvider.js +35 -0
- package/features/security/teams/shared/TeamProvider.js.map +1 -0
- package/features/security/teams/shared/TeamsRepository.js +102 -118
- package/features/security/teams/shared/TeamsRepository.js.map +1 -1
- package/features/security/teams/shared/abstractions.d.ts +18 -0
- package/features/security/teams/shared/abstractions.js +3 -1
- package/features/security/teams/shared/abstractions.js.map +1 -1
- package/features/security/teams/shared/decorators/TeamsRepositoryCachingDecorator.d.ts +17 -0
- package/features/security/teams/shared/decorators/TeamsRepositoryCachingDecorator.js +54 -0
- package/features/security/teams/shared/decorators/TeamsRepositoryCachingDecorator.js.map +1 -0
- package/features/security/teams/shared/errors.js +62 -70
- package/features/security/teams/shared/errors.js.map +1 -1
- package/features/security/teams/shared/resolveRoleIdentifiers.d.ts +17 -0
- package/features/security/teams/shared/resolveRoleIdentifiers.js +32 -0
- package/features/security/teams/shared/resolveRoleIdentifiers.js.map +1 -0
- package/features/security/teams/shared/types.js +0 -3
- package/features/security/utils/AppPermissions.js +50 -89
- package/features/security/utils/AppPermissions.js.map +1 -1
- package/features/security/utils/IdentityValue.js +19 -22
- package/features/security/utils/IdentityValue.js.map +1 -1
- package/features/security/utils/filterOutCustomWbyAppsPermissions.js +24 -27
- package/features/security/utils/filterOutCustomWbyAppsPermissions.js.map +1 -1
- package/features/security/utils/getPermissionsFromRoles.d.ts +1 -1
- package/features/security/utils/getPermissionsFromRoles.js +5 -10
- package/features/security/utils/getPermissionsFromRoles.js.map +1 -1
- package/features/security/utils/isJwt.js +2 -1
- package/features/security/utils/isJwt.js.map +1 -1
- package/features/security/utils/verifyJwtUsingJwk.d.ts +2 -4
- package/features/security/utils/verifyJwtUsingJwk.js +7 -8
- package/features/security/utils/verifyJwtUsingJwk.js.map +1 -1
- package/features/serviceDiscovery/ServiceDiscovery.d.ts +17 -0
- package/features/serviceDiscovery/ServiceDiscovery.js +22 -0
- package/features/serviceDiscovery/ServiceDiscovery.js.map +1 -0
- package/features/serviceDiscovery/__tests__/ServiceDiscovery.test.d.ts +1 -0
- package/features/serviceDiscovery/__tests__/ServiceDiscovery.test.js +111 -0
- package/features/serviceDiscovery/__tests__/ServiceDiscovery.test.js.map +1 -0
- package/features/serviceDiscovery/index.d.ts +3 -0
- package/features/serviceDiscovery/index.js +1 -0
- package/features/slugify/DefaultSlugify.d.ts +8 -0
- package/features/slugify/DefaultSlugify.js +20 -0
- package/features/slugify/DefaultSlugify.js.map +1 -0
- package/features/slugify/abstractions.d.ts +12 -0
- package/features/slugify/abstractions.js +5 -0
- package/features/slugify/abstractions.js.map +1 -0
- package/features/slugify/feature.d.ts +4 -0
- package/features/slugify/feature.js +11 -0
- package/features/slugify/feature.js.map +1 -0
- package/features/slugify/index.d.ts +3 -0
- package/features/slugify/index.js +2 -0
- package/features/storageOperations/abstractions.d.ts +21 -0
- package/features/storageOperations/abstractions.js +10 -0
- package/features/storageOperations/abstractions.js.map +1 -0
- package/features/stringFormatter/DefaultStringFormatter.d.ts +17 -0
- package/features/stringFormatter/DefaultStringFormatter.js +19 -0
- package/features/stringFormatter/DefaultStringFormatter.js.map +1 -0
- package/features/stringFormatter/abstractions.d.ts +11 -0
- package/features/stringFormatter/abstractions.js +5 -0
- package/features/stringFormatter/abstractions.js.map +1 -0
- package/features/stringFormatter/feature.d.ts +4 -0
- package/features/stringFormatter/feature.js +13 -0
- package/features/stringFormatter/feature.js.map +1 -0
- package/features/stringFormatter/index.d.ts +3 -0
- package/features/stringFormatter/index.js +2 -0
- package/features/system/InstallSystem/InstallSystemUseCase.js +45 -44
- package/features/system/InstallSystem/InstallSystemUseCase.js.map +1 -1
- package/features/system/InstallSystem/abstractions.d.ts +4 -5
- package/features/system/InstallSystem/abstractions.js +3 -18
- package/features/system/InstallSystem/abstractions.js.map +1 -1
- package/features/system/InstallSystem/errors.js +15 -16
- package/features/system/InstallSystem/errors.js.map +1 -1
- package/features/system/InstallSystem/events.js +9 -6
- package/features/system/InstallSystem/events.js.map +1 -1
- package/features/system/InstallSystem/feature.d.ts +5 -1
- package/features/system/InstallSystem/feature.js +6 -7
- package/features/system/InstallSystem/feature.js.map +1 -1
- package/features/system/InstallSystem/index.d.ts +1 -1
- package/features/system/InstallSystem/index.js +2 -6
- package/features/system/SystemFeature.d.ts +4 -1
- package/features/system/SystemFeature.js +6 -5
- package/features/system/SystemFeature.js.map +1 -1
- package/features/task/TaskController/abstractions.d.ts +1 -0
- package/features/task/TaskController/abstractions.js +2 -9
- package/features/task/TaskController/abstractions.js.map +1 -1
- package/features/task/TaskController/index.js +0 -2
- package/features/task/TaskDefinition/abstractions.d.ts +76 -5
- package/features/task/TaskDefinition/abstractions.js +9 -39
- package/features/task/TaskDefinition/abstractions.js.map +1 -1
- package/features/task/TaskDefinition/index.js +0 -2
- package/features/task/TaskService/abstractions.d.ts +1 -0
- package/features/task/TaskService/abstractions.js +9 -12
- package/features/task/TaskService/abstractions.js.map +1 -1
- package/features/task/TaskService/index.js +0 -2
- package/features/tenancy/CreateTenant/CreateTenantGateway.js +14 -11
- package/features/tenancy/CreateTenant/CreateTenantGateway.js.map +1 -1
- package/features/tenancy/CreateTenant/CreateTenantRepository.js +18 -15
- package/features/tenancy/CreateTenant/CreateTenantRepository.js.map +1 -1
- package/features/tenancy/CreateTenant/CreateTenantUseCase.d.ts +1 -1
- package/features/tenancy/CreateTenant/CreateTenantUseCase.js +44 -41
- package/features/tenancy/CreateTenant/CreateTenantUseCase.js.map +1 -1
- package/features/tenancy/CreateTenant/abstractions.d.ts +9 -7
- package/features/tenancy/CreateTenant/abstractions.js +6 -27
- package/features/tenancy/CreateTenant/abstractions.js.map +1 -1
- package/features/tenancy/CreateTenant/decorators/CreateTenantWithWcpIncrement.js +16 -15
- package/features/tenancy/CreateTenant/decorators/CreateTenantWithWcpIncrement.js.map +1 -1
- package/features/tenancy/CreateTenant/errors.js +8 -8
- package/features/tenancy/CreateTenant/errors.js.map +1 -1
- package/features/tenancy/CreateTenant/events.js +16 -11
- package/features/tenancy/CreateTenant/events.js.map +1 -1
- package/features/tenancy/CreateTenant/feature.d.ts +5 -1
- package/features/tenancy/CreateTenant/feature.js +9 -8
- package/features/tenancy/CreateTenant/feature.js.map +1 -1
- package/features/tenancy/CreateTenant/index.d.ts +1 -1
- package/features/tenancy/CreateTenant/index.js +2 -4
- package/features/tenancy/DeleteTenant/DeleteTenantGateway.js +15 -12
- package/features/tenancy/DeleteTenant/DeleteTenantGateway.js.map +1 -1
- package/features/tenancy/DeleteTenant/DeleteTenantRepository.js +22 -19
- package/features/tenancy/DeleteTenant/DeleteTenantRepository.js.map +1 -1
- package/features/tenancy/DeleteTenant/DeleteTenantUseCase.js +29 -27
- package/features/tenancy/DeleteTenant/DeleteTenantUseCase.js.map +1 -1
- package/features/tenancy/DeleteTenant/abstractions.d.ts +9 -4
- package/features/tenancy/DeleteTenant/abstractions.js +6 -5
- package/features/tenancy/DeleteTenant/abstractions.js.map +1 -1
- package/features/tenancy/DeleteTenant/decorators/DeleteTenantWithWcpDecrement.js +16 -13
- package/features/tenancy/DeleteTenant/decorators/DeleteTenantWithWcpDecrement.js.map +1 -1
- package/features/tenancy/DeleteTenant/events.js +16 -11
- package/features/tenancy/DeleteTenant/events.js.map +1 -1
- package/features/tenancy/DeleteTenant/feature.d.ts +5 -1
- package/features/tenancy/DeleteTenant/feature.js +9 -8
- package/features/tenancy/DeleteTenant/feature.js.map +1 -1
- package/features/tenancy/DeleteTenant/index.d.ts +1 -1
- package/features/tenancy/DeleteTenant/index.js +2 -4
- package/features/tenancy/GetRootTenant/GetRootTenantUseCase.js +15 -12
- package/features/tenancy/GetRootTenant/GetRootTenantUseCase.js.map +1 -1
- package/features/tenancy/GetRootTenant/abstractions.js +2 -4
- package/features/tenancy/GetRootTenant/abstractions.js.map +1 -1
- package/features/tenancy/GetRootTenant/feature.d.ts +5 -1
- package/features/tenancy/GetRootTenant/feature.js +6 -5
- package/features/tenancy/GetRootTenant/feature.js.map +1 -1
- package/features/tenancy/GetRootTenant/index.js +0 -2
- package/features/tenancy/GetTenantById/GetTenantByIdGateway.js +17 -12
- package/features/tenancy/GetTenantById/GetTenantByIdGateway.js.map +1 -1
- package/features/tenancy/GetTenantById/GetTenantByIdRepository.js +18 -19
- package/features/tenancy/GetTenantById/GetTenantByIdRepository.js.map +1 -1
- package/features/tenancy/GetTenantById/GetTenantByIdUseCase.js +17 -17
- package/features/tenancy/GetTenantById/GetTenantByIdUseCase.js.map +1 -1
- package/features/tenancy/GetTenantById/abstractions.d.ts +3 -0
- package/features/tenancy/GetTenantById/abstractions.js +4 -12
- package/features/tenancy/GetTenantById/abstractions.js.map +1 -1
- package/features/tenancy/GetTenantById/feature.d.ts +5 -1
- package/features/tenancy/GetTenantById/feature.js +8 -12
- package/features/tenancy/GetTenantById/feature.js.map +1 -1
- package/features/tenancy/GetTenantById/index.js +1 -3
- package/features/tenancy/InstallTenant/DependencyResolver.js +53 -65
- package/features/tenancy/InstallTenant/DependencyResolver.js.map +1 -1
- package/features/tenancy/InstallTenant/InstallTenantUseCase.d.ts +1 -1
- package/features/tenancy/InstallTenant/InstallTenantUseCase.js +95 -113
- package/features/tenancy/InstallTenant/InstallTenantUseCase.js.map +1 -1
- package/features/tenancy/InstallTenant/abstractions.d.ts +5 -11
- package/features/tenancy/InstallTenant/abstractions.js +4 -24
- package/features/tenancy/InstallTenant/abstractions.js.map +1 -1
- package/features/tenancy/InstallTenant/errors.js +15 -16
- package/features/tenancy/InstallTenant/errors.js.map +1 -1
- package/features/tenancy/InstallTenant/events.js +9 -6
- package/features/tenancy/InstallTenant/events.js.map +1 -1
- package/features/tenancy/InstallTenant/feature.d.ts +5 -1
- package/features/tenancy/InstallTenant/feature.js +6 -5
- package/features/tenancy/InstallTenant/feature.js.map +1 -1
- package/features/tenancy/InstallTenant/index.d.ts +1 -1
- package/features/tenancy/InstallTenant/index.js +1 -3
- package/features/tenancy/ListTenants/ListTenantsGateway.js +14 -11
- package/features/tenancy/ListTenants/ListTenantsGateway.js.map +1 -1
- package/features/tenancy/ListTenants/ListTenantsRepository.js +14 -12
- package/features/tenancy/ListTenants/ListTenantsRepository.js.map +1 -1
- package/features/tenancy/ListTenants/ListTenantsUseCase.js +16 -14
- package/features/tenancy/ListTenants/ListTenantsUseCase.js.map +1 -1
- package/features/tenancy/ListTenants/abstractions.js +4 -12
- package/features/tenancy/ListTenants/abstractions.js.map +1 -1
- package/features/tenancy/ListTenants/feature.d.ts +5 -1
- package/features/tenancy/ListTenants/feature.js +8 -7
- package/features/tenancy/ListTenants/feature.js.map +1 -1
- package/features/tenancy/ListTenants/index.js +1 -3
- package/features/tenancy/TenancyFeature.d.ts +4 -1
- package/features/tenancy/TenancyFeature.js +20 -26
- package/features/tenancy/TenancyFeature.js.map +1 -1
- package/features/tenancy/TenantContext/TenantContext.d.ts +1 -0
- package/features/tenancy/TenantContext/TenantContext.js +52 -49
- package/features/tenancy/TenantContext/TenantContext.js.map +1 -1
- package/features/tenancy/TenantContext/abstractions.d.ts +1 -0
- package/features/tenancy/TenantContext/abstractions.js +2 -1
- package/features/tenancy/TenantContext/abstractions.js.map +1 -1
- package/features/tenancy/TenantContext/errors.js +7 -7
- package/features/tenancy/TenantContext/errors.js.map +1 -1
- package/features/tenancy/TenantContext/feature.d.ts +4 -1
- package/features/tenancy/TenantContext/feature.js +6 -5
- package/features/tenancy/TenantContext/feature.js.map +1 -1
- package/features/tenancy/TenantContext/index.js +0 -2
- package/features/tenancy/UpdateTenant/UpdateTenantGateway.js +14 -11
- package/features/tenancy/UpdateTenant/UpdateTenantGateway.js.map +1 -1
- package/features/tenancy/UpdateTenant/UpdateTenantRepository.js +19 -16
- package/features/tenancy/UpdateTenant/UpdateTenantRepository.js.map +1 -1
- package/features/tenancy/UpdateTenant/UpdateTenantUseCase.d.ts +2 -2
- package/features/tenancy/UpdateTenant/UpdateTenantUseCase.js +37 -36
- package/features/tenancy/UpdateTenant/UpdateTenantUseCase.js.map +1 -1
- package/features/tenancy/UpdateTenant/abstractions.d.ts +9 -4
- package/features/tenancy/UpdateTenant/abstractions.js +6 -5
- package/features/tenancy/UpdateTenant/abstractions.js.map +1 -1
- package/features/tenancy/UpdateTenant/events.js +16 -11
- package/features/tenancy/UpdateTenant/events.js.map +1 -1
- package/features/tenancy/UpdateTenant/feature.d.ts +5 -1
- package/features/tenancy/UpdateTenant/feature.js +8 -7
- package/features/tenancy/UpdateTenant/feature.js.map +1 -1
- package/features/tenancy/UpdateTenant/index.d.ts +1 -1
- package/features/tenancy/UpdateTenant/index.js +2 -4
- package/features/tenancy/shared/TenantCache.js +18 -17
- package/features/tenancy/shared/TenantCache.js.map +1 -1
- package/features/tenancy/shared/abstractions.js +2 -1
- package/features/tenancy/shared/abstractions.js.map +1 -1
- package/features/tenancy/shared/storageOperations.js +2 -5
- package/features/tenancy/shared/storageOperations.js.map +1 -1
- package/features/users/AdminUsersFeature.d.ts +4 -1
- package/features/users/AdminUsersFeature.js +15 -19
- package/features/users/AdminUsersFeature.js.map +1 -1
- package/features/users/CreateUser/CreateUserUseCase.js +65 -100
- package/features/users/CreateUser/CreateUserUseCase.js.map +1 -1
- package/features/users/CreateUser/abstractions.d.ts +1 -0
- package/features/users/CreateUser/abstractions.js +2 -13
- package/features/users/CreateUser/abstractions.js.map +1 -1
- package/features/users/CreateUser/decorators/CreateUserWithWcpIncrement.d.ts +1 -1
- package/features/users/CreateUser/decorators/CreateUserWithWcpIncrement.js +16 -15
- package/features/users/CreateUser/decorators/CreateUserWithWcpIncrement.js.map +1 -1
- package/features/users/CreateUser/events.d.ts +6 -4
- package/features/users/CreateUser/events.js +17 -14
- package/features/users/CreateUser/events.js.map +1 -1
- package/features/users/CreateUser/feature.d.ts +4 -1
- package/features/users/CreateUser/feature.js +7 -6
- package/features/users/CreateUser/feature.js.map +1 -1
- package/features/users/CreateUser/index.js +0 -2
- package/features/users/CreateUser/schema.d.ts +4 -36
- package/features/users/CreateUser/schema.js +14 -18
- package/features/users/CreateUser/schema.js.map +1 -1
- package/features/users/DeleteUser/DeleteUserUseCase.js +35 -50
- package/features/users/DeleteUser/DeleteUserUseCase.js.map +1 -1
- package/features/users/DeleteUser/abstractions.d.ts +1 -0
- package/features/users/DeleteUser/abstractions.js +2 -13
- package/features/users/DeleteUser/abstractions.js.map +1 -1
- package/features/users/DeleteUser/decorators/DeleteUserWithWcpDecrement.js +15 -16
- package/features/users/DeleteUser/decorators/DeleteUserWithWcpDecrement.js.map +1 -1
- package/features/users/DeleteUser/errors.js +7 -7
- package/features/users/DeleteUser/errors.js.map +1 -1
- package/features/users/DeleteUser/events.d.ts +6 -4
- package/features/users/DeleteUser/events.js +17 -14
- package/features/users/DeleteUser/events.js.map +1 -1
- package/features/users/DeleteUser/feature.d.ts +4 -1
- package/features/users/DeleteUser/feature.js +7 -6
- package/features/users/DeleteUser/feature.js.map +1 -1
- package/features/users/DeleteUser/index.js +0 -2
- package/features/users/ExternalIdpUserSync/ExternalIdpUserSyncHandler.d.ts +3 -3
- package/features/users/ExternalIdpUserSync/ExternalIdpUserSyncHandler.js +61 -75
- package/features/users/ExternalIdpUserSync/ExternalIdpUserSyncHandler.js.map +1 -1
- package/features/users/ExternalIdpUserSync/feature.d.ts +4 -1
- package/features/users/ExternalIdpUserSync/feature.js +6 -5
- package/features/users/ExternalIdpUserSync/feature.js.map +1 -1
- package/features/users/ExternalIdpUserSync/index.js +0 -2
- package/features/users/GetIdentityProfile/GetIdentityProfileUseCase.js +29 -39
- package/features/users/GetIdentityProfile/GetIdentityProfileUseCase.js.map +1 -1
- package/features/users/GetIdentityProfile/abstractions.js +2 -11
- package/features/users/GetIdentityProfile/abstractions.js.map +1 -1
- package/features/users/GetIdentityProfile/feature.d.ts +4 -1
- package/features/users/GetIdentityProfile/feature.js +6 -5
- package/features/users/GetIdentityProfile/feature.js.map +1 -1
- package/features/users/GetIdentityProfile/index.js +0 -2
- package/features/users/GetIdentityProfile/types.js +0 -3
- package/features/users/GetUser/GetUserUseCase.js +19 -23
- package/features/users/GetUser/GetUserUseCase.js.map +1 -1
- package/features/users/GetUser/abstractions.d.ts +1 -0
- package/features/users/GetUser/abstractions.js +2 -11
- package/features/users/GetUser/abstractions.js.map +1 -1
- package/features/users/GetUser/feature.d.ts +4 -1
- package/features/users/GetUser/feature.js +6 -5
- package/features/users/GetUser/feature.js.map +1 -1
- package/features/users/GetUser/index.js +0 -2
- package/features/users/ListUserTeams/ListUserTeamsUseCase.js +33 -42
- package/features/users/ListUserTeams/ListUserTeamsUseCase.js.map +1 -1
- package/features/users/ListUserTeams/abstractions.d.ts +1 -0
- package/features/users/ListUserTeams/abstractions.js +2 -11
- package/features/users/ListUserTeams/abstractions.js.map +1 -1
- package/features/users/ListUserTeams/feature.d.ts +4 -1
- package/features/users/ListUserTeams/feature.js +6 -5
- package/features/users/ListUserTeams/feature.js.map +1 -1
- package/features/users/ListUserTeams/index.js +0 -2
- package/features/users/ListUsers/ListUsersUseCase.js +19 -23
- package/features/users/ListUsers/ListUsersUseCase.js.map +1 -1
- package/features/users/ListUsers/abstractions.d.ts +1 -0
- package/features/users/ListUsers/abstractions.js +2 -11
- package/features/users/ListUsers/abstractions.js.map +1 -1
- package/features/users/ListUsers/feature.d.ts +4 -1
- package/features/users/ListUsers/feature.js +6 -5
- package/features/users/ListUsers/feature.js.map +1 -1
- package/features/users/ListUsers/index.js +0 -2
- package/features/users/UpdateUser/UpdateUserUseCase.js +52 -74
- package/features/users/UpdateUser/UpdateUserUseCase.js.map +1 -1
- package/features/users/UpdateUser/abstractions.d.ts +1 -0
- package/features/users/UpdateUser/abstractions.js +2 -13
- package/features/users/UpdateUser/abstractions.js.map +1 -1
- package/features/users/UpdateUser/events.d.ts +6 -4
- package/features/users/UpdateUser/events.js +17 -14
- package/features/users/UpdateUser/events.js.map +1 -1
- package/features/users/UpdateUser/feature.d.ts +4 -1
- package/features/users/UpdateUser/feature.js +6 -5
- package/features/users/UpdateUser/feature.js.map +1 -1
- package/features/users/UpdateUser/index.js +0 -2
- package/features/users/UpdateUser/schema.d.ts +4 -30
- package/features/users/UpdateUser/schema.js +11 -10
- package/features/users/UpdateUser/schema.js.map +1 -1
- package/features/users/shared/AdminUsersRepository.js +104 -112
- package/features/users/shared/AdminUsersRepository.js.map +1 -1
- package/features/users/shared/abstractions.d.ts +1 -0
- package/features/users/shared/abstractions.js +2 -9
- package/features/users/shared/abstractions.js.map +1 -1
- package/features/users/shared/errors.js +40 -46
- package/features/users/shared/errors.js.map +1 -1
- package/features/users/shared/loaders.js +52 -66
- package/features/users/shared/loaders.js.map +1 -1
- package/features/users/shared/storageAbstractions.js +2 -2
- package/features/users/shared/storageAbstractions.js.map +1 -1
- package/features/users/shared/types.d.ts +9 -7
- package/features/users/shared/types.js +0 -3
- package/features/wcp/WcpContext/WcpContext.d.ts +19 -5
- package/features/wcp/WcpContext/WcpContext.js +177 -133
- package/features/wcp/WcpContext/WcpContext.js.map +1 -1
- package/features/wcp/WcpContext/abstractions.js +2 -6
- package/features/wcp/WcpContext/abstractions.js.map +1 -1
- package/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.d.ts +18 -48
- package/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js +191 -113
- package/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js.map +1 -1
- package/features/wcp/WcpContext/feature.d.ts +5 -2
- package/features/wcp/WcpContext/feature.js +6 -5
- package/features/wcp/WcpContext/feature.js.map +1 -1
- package/features/wcp/WcpContext/index.d.ts +0 -1
- package/features/wcp/WcpContext/index.js +0 -2
- package/features/wcp/WcpContext/types.d.ts +0 -4
- package/features/wcp/WcpContext/types.js +0 -3
- package/features/wcp/WcpContext/utils.js +35 -53
- package/features/wcp/WcpContext/utils.js.map +1 -1
- package/features/wcp/WcpFeature.d.ts +4 -1
- package/features/wcp/WcpFeature.js +12 -6
- package/features/wcp/WcpFeature.js.map +1 -1
- package/features/wcp/WcpLicenseLoader.d.ts +25 -0
- package/features/wcp/WcpLicenseLoader.js +58 -0
- package/features/wcp/WcpLicenseLoader.js.map +1 -0
- package/features/wcp/WcpLicenseProvider.d.ts +21 -0
- package/features/wcp/WcpLicenseProvider.js +14 -0
- package/features/wcp/WcpLicenseProvider.js.map +1 -0
- package/features/wcp/resolveWcpProjectEnvironment.d.ts +9 -0
- package/features/wcp/resolveWcpProjectEnvironment.js +23 -0
- package/features/wcp/resolveWcpProjectEnvironment.js.map +1 -0
- package/features/webhooks/Webhook/WebhookProvider.d.ts +12 -0
- package/features/webhooks/Webhook/WebhookProvider.js +28 -0
- package/features/webhooks/Webhook/WebhookProvider.js.map +1 -0
- package/features/webhooks/Webhook/abstractions/WebhookFactory.d.ts +16 -0
- package/features/webhooks/Webhook/abstractions/WebhookFactory.js +5 -0
- package/features/webhooks/Webhook/abstractions/WebhookFactory.js.map +1 -0
- package/features/webhooks/Webhook/abstractions/WebhookProvider.d.ts +9 -0
- package/features/webhooks/Webhook/abstractions/WebhookProvider.js +5 -0
- package/features/webhooks/Webhook/abstractions/WebhookProvider.js.map +1 -0
- package/features/webhooks/Webhook/feature.d.ts +4 -0
- package/features/webhooks/Webhook/feature.js +11 -0
- package/features/webhooks/Webhook/feature.js.map +1 -0
- package/features/webhooks/Webhook/index.d.ts +2 -0
- package/features/webhooks/Webhook/index.js +2 -0
- package/features/webhooks/WebhookDispatcher/NullWebhookDispatcher.d.ts +8 -0
- package/features/webhooks/WebhookDispatcher/NullWebhookDispatcher.js +11 -0
- package/features/webhooks/WebhookDispatcher/NullWebhookDispatcher.js.map +1 -0
- package/features/webhooks/WebhookDispatcher/abstractions.d.ts +12 -0
- package/features/webhooks/WebhookDispatcher/abstractions.js +5 -0
- package/features/webhooks/WebhookDispatcher/abstractions.js.map +1 -0
- package/features/webhooks/WebhookSignPayload/abstractions.d.ts +14 -0
- package/features/webhooks/WebhookSignPayload/abstractions.js +5 -0
- package/features/webhooks/WebhookSignPayload/abstractions.js.map +1 -0
- package/features/webhooks/WebhookVerifyPayload/abstractions.d.ts +11 -0
- package/features/webhooks/WebhookVerifyPayload/abstractions.js +5 -0
- package/features/webhooks/WebhookVerifyPayload/abstractions.js.map +1 -0
- package/features/webhooks/index.d.ts +5 -0
- package/features/webhooks/index.js +5 -0
- package/graphql/ApiCoreSchemaFactory.d.ts +16 -0
- package/graphql/ApiCoreSchemaFactory.js +58 -0
- package/graphql/ApiCoreSchemaFactory.js.map +1 -0
- package/graphql/featureFlags/FeatureFlagsSchemaFactory.d.ts +10 -0
- package/graphql/featureFlags/FeatureFlagsSchemaFactory.js +53 -0
- package/graphql/featureFlags/FeatureFlagsSchemaFactory.js.map +1 -0
- package/graphql/security/NotAuthorizedResponse.d.ts +2 -1
- package/graphql/security/NotAuthorizedResponse.js +12 -14
- package/graphql/security/NotAuthorizedResponse.js.map +1 -1
- package/graphql/security/ProfileMapper.js +12 -11
- package/graphql/security/ProfileMapper.js.map +1 -1
- package/graphql/security/SecuritySchemaFactory.d.ts +15 -0
- package/graphql/security/SecuritySchemaFactory.js +27 -0
- package/graphql/security/SecuritySchemaFactory.js.map +1 -0
- package/graphql/security/addApiKeySchema.d.ts +2 -0
- package/graphql/security/addApiKeySchema.js +108 -0
- package/graphql/security/addApiKeySchema.js.map +1 -0
- package/graphql/security/addIdentitySchema.d.ts +2 -0
- package/graphql/security/addIdentitySchema.js +170 -0
- package/graphql/security/addIdentitySchema.js.map +1 -0
- package/graphql/security/addRoleSchema.d.ts +2 -0
- package/graphql/security/addRoleSchema.js +137 -0
- package/graphql/security/addRoleSchema.js.map +1 -0
- package/graphql/security/addSecurityBaseSchema.d.ts +2 -0
- package/graphql/security/{base.gql.js → addSecurityBaseSchema.js} +14 -15
- package/graphql/security/addSecurityBaseSchema.js.map +1 -0
- package/graphql/security/addTeamSchema.d.ts +2 -0
- package/graphql/security/addTeamSchema.js +157 -0
- package/graphql/security/addTeamSchema.js.map +1 -0
- package/graphql/system/SystemSchemaFactory.d.ts +10 -0
- package/graphql/system/SystemSchemaFactory.js +70 -0
- package/graphql/system/SystemSchemaFactory.js.map +1 -0
- package/graphql/users/UsersSchemaFactory.d.ts +10 -0
- package/graphql/users/UsersSchemaFactory.js +195 -0
- package/graphql/users/UsersSchemaFactory.js.map +1 -0
- package/graphql/wcp/WcpSchemaFactory.d.ts +10 -0
- package/graphql/wcp/WcpSchemaFactory.js +100 -0
- package/graphql/wcp/WcpSchemaFactory.js.map +1 -0
- package/idp/JwksCache.d.ts +14 -3
- package/idp/JwksCache.js +100 -26
- package/idp/JwksCache.js.map +1 -1
- package/idp/JwksStoreFeature.d.ts +8 -0
- package/idp/JwksStoreFeature.js +11 -0
- package/idp/JwksStoreFeature.js.map +1 -0
- package/idp/JwtAuthenticator.js +34 -46
- package/idp/JwtAuthenticator.js.map +1 -1
- package/idp/MemoryJwksStore.d.ts +14 -0
- package/idp/MemoryJwksStore.js +21 -0
- package/idp/MemoryJwksStore.js.map +1 -0
- package/idp/OidcJwtIdentityProvider.js +55 -78
- package/idp/OidcJwtIdentityProvider.js.map +1 -1
- package/idp/abstractions.d.ts +28 -0
- package/idp/abstractions.js +6 -10
- package/idp/abstractions.js.map +1 -1
- package/idp/feature.d.ts +4 -1
- package/idp/feature.js +8 -8
- package/idp/feature.js.map +1 -1
- package/idp/index.d.ts +1 -0
- package/idp/index.js +2 -3
- package/idp/types.js +0 -3
- package/index.d.ts +3 -1
- package/index.js +3 -3
- package/models/base/BaseModel.js +51 -56
- package/models/base/BaseModel.js.map +1 -1
- package/models/base/ModelBuilder.d.ts +2 -2
- package/models/base/ModelBuilder.js +66 -60
- package/models/base/ModelBuilder.js.map +1 -1
- package/models/base/ModelFactory.js +0 -3
- package/models/base/__tests__/ModelBuilder.test.js +437 -454
- package/models/base/__tests__/ModelBuilder.test.js.map +1 -1
- package/models/base/abstractions.js +0 -3
- package/models/cms/FieldBuilder.d.ts +3 -2
- package/models/cms/FieldBuilder.js +112 -126
- package/models/cms/FieldBuilder.js.map +1 -1
- package/models/cms/FieldBuilderRegistry.d.ts +1 -1
- package/models/cms/FieldBuilderRegistry.js +13 -12
- package/models/cms/FieldBuilderRegistry.js.map +1 -1
- package/models/cms/FieldDefinitionsBuilder.d.ts +1 -0
- package/models/cms/FieldDefinitionsBuilder.js +37 -56
- package/models/cms/FieldDefinitionsBuilder.js.map +1 -1
- package/models/cms/PrivateCmsModelBuilder.js +84 -89
- package/models/cms/PrivateCmsModelBuilder.js.map +1 -1
- package/models/cms/PrivatePage/Page.fields.js +7 -6
- package/models/cms/PrivatePage/Page.fields.js.map +1 -1
- package/models/cms/PrivatePage/PageModelBuilder.js +18 -15
- package/models/cms/PrivatePage/PageModelBuilder.js.map +1 -1
- package/models/cms/PrivatePage/PageModelFactory.js +20 -25
- package/models/cms/PrivatePage/PageModelFactory.js.map +1 -1
- package/models/cms/PrivatePage/__tests__/PageModelFactory.test.js +218 -234
- package/models/cms/PrivatePage/__tests__/PageModelFactory.test.js.map +1 -1
- package/models/cms/PrivatePage/__tests__/PagePublishingDecorator.js +33 -36
- package/models/cms/PrivatePage/__tests__/PagePublishingDecorator.js.map +1 -1
- package/models/cms/PrivatePage/__tests__/PageSeoDecorator.js +25 -26
- package/models/cms/PrivatePage/__tests__/PageSeoDecorator.js.map +1 -1
- package/models/cms/PrivatePage/abstractions.js +3 -9
- package/models/cms/PrivatePage/abstractions.js.map +1 -1
- package/models/cms/__tests__/PrivateCmsModelBuilder.test.js +173 -185
- package/models/cms/__tests__/PrivateCmsModelBuilder.test.js.map +1 -1
- package/models/cms/abstractions.d.ts +1 -1
- package/models/cms/abstractions.js +3 -20
- package/models/cms/abstractions.js.map +1 -1
- package/models/cms/fieldsBuilder.md +4 -2
- package/models/cms/types.js +0 -3
- package/models/simple/Page/PageModelBuilder.js +15 -14
- package/models/simple/Page/PageModelBuilder.js.map +1 -1
- package/models/simple/Page/PageModelFactory.js +16 -15
- package/models/simple/Page/PageModelFactory.js.map +1 -1
- package/models/simple/Page/__tests__/PageModelBuilderDecorator.js +21 -20
- package/models/simple/Page/__tests__/PageModelBuilderDecorator.js.map +1 -1
- package/models/simple/Page/__tests__/PageModelBuilderDecorator2.js +17 -16
- package/models/simple/Page/__tests__/PageModelBuilderDecorator2.js.map +1 -1
- package/models/simple/Page/__tests__/PageModelFactory.test.js +28 -28
- package/models/simple/Page/__tests__/PageModelFactory.test.js.map +1 -1
- package/models/simple/Page/abstractions.d.ts +1 -11
- package/models/simple/Page/abstractions.js +9 -8
- package/models/simple/Page/abstractions.js.map +1 -1
- package/package.json +31 -72
- package/testing/environment.d.ts +14 -0
- package/testing/environment.js +18 -0
- package/testing/environment.js.map +1 -0
- package/types/core.d.ts +17 -5
- package/types/core.js +0 -3
- package/types/security.d.ts +14 -17
- package/types/security.js +0 -3
- package/types/tenancy.d.ts +0 -17
- package/types/tenancy.js +0 -3
- package/types/users.d.ts +2 -16
- package/types/users.js +0 -3
- package/createApiCore.d.ts +0 -7
- package/createApiCore.js +0 -17
- package/createApiCore.js.map +0 -1
- package/domain/tenancy/errors.js.map +0 -1
- package/exports/api/build-params.js.map +0 -1
- package/exports/api/event-publisher.js.map +0 -1
- package/exports/api/graphql.js.map +0 -1
- package/exports/api/key-value-store.js.map +0 -1
- package/exports/api/logger.js.map +0 -1
- package/exports/api/security/api-key.js.map +0 -1
- package/exports/api/security/authentication.js.map +0 -1
- package/exports/api/security/role.js.map +0 -1
- package/exports/api/security/user.js.map +0 -1
- package/exports/api/security.js.map +0 -1
- package/exports/api/system.js.map +0 -1
- package/exports/api/tasks.js.map +0 -1
- package/exports/api/tenancy.js.map +0 -1
- package/features/buildParams/index.js.map +0 -1
- package/features/eventPublisher/index.js.map +0 -1
- package/features/keyValueStore/index.js.map +0 -1
- package/features/logger/index.js.map +0 -1
- package/features/security/IdentityContext/index.js.map +0 -1
- package/features/security/apiKeys/CreateApiKey/index.js.map +0 -1
- package/features/security/apiKeys/DeleteApiKey/index.js.map +0 -1
- package/features/security/apiKeys/GetApiKey/index.js.map +0 -1
- package/features/security/apiKeys/GetApiKeyBySlug/index.js.map +0 -1
- package/features/security/apiKeys/GetApiKeyByToken/index.js.map +0 -1
- package/features/security/apiKeys/ListApiKeys/index.js.map +0 -1
- package/features/security/apiKeys/UpdateApiKey/index.js.map +0 -1
- package/features/security/apiKeys/shared/types.js.map +0 -1
- package/features/security/authentication/AuthenticationContext/index.js.map +0 -1
- package/features/security/authentication/Authenticator/index.js.map +0 -1
- package/features/security/authorization/AuthorizationContext/index.js.map +0 -1
- package/features/security/authorization/Authorizer/index.js.map +0 -1
- package/features/security/login/index.js.map +0 -1
- package/features/security/permissions/index.js.map +0 -1
- package/features/security/permissions/types.js.map +0 -1
- package/features/security/roles/CreateRole/index.js.map +0 -1
- package/features/security/roles/DeleteRole/index.js.map +0 -1
- package/features/security/roles/GetRole/index.js.map +0 -1
- package/features/security/roles/ListRoles/index.js.map +0 -1
- package/features/security/roles/UpdateRole/index.js.map +0 -1
- package/features/security/roles/shared/types.js.map +0 -1
- package/features/security/shared/abstractions.ts.bak +0 -52
- package/features/security/shared/index.js.map +0 -1
- package/features/security/teams/CreateTeam/index.js.map +0 -1
- package/features/security/teams/DeleteTeam/index.js.map +0 -1
- package/features/security/teams/GetTeam/index.js.map +0 -1
- package/features/security/teams/ListTeams/index.js.map +0 -1
- package/features/security/teams/UpdateTeam/index.js.map +0 -1
- package/features/security/teams/shared/types.js.map +0 -1
- package/features/system/InstallSystem/index.js.map +0 -1
- package/features/task/TaskController/index.js.map +0 -1
- package/features/task/TaskDefinition/index.js.map +0 -1
- package/features/task/TaskService/index.js.map +0 -1
- package/features/tenancy/CreateTenant/index.js.map +0 -1
- package/features/tenancy/DeleteTenant/index.js.map +0 -1
- package/features/tenancy/GetRootTenant/index.js.map +0 -1
- package/features/tenancy/GetTenantById/index.js.map +0 -1
- package/features/tenancy/InstallTenant/index.js.map +0 -1
- package/features/tenancy/ListTenants/index.js.map +0 -1
- package/features/tenancy/TenantContext/index.js.map +0 -1
- package/features/tenancy/UpdateTenant/index.js.map +0 -1
- package/features/users/CreateUser/index.js.map +0 -1
- package/features/users/DeleteUser/index.js.map +0 -1
- package/features/users/ExternalIdpUserSync/index.js.map +0 -1
- package/features/users/GetIdentityProfile/index.js.map +0 -1
- package/features/users/GetIdentityProfile/types.js.map +0 -1
- package/features/users/GetUser/index.js.map +0 -1
- package/features/users/ListUserTeams/index.js.map +0 -1
- package/features/users/ListUsers/index.js.map +0 -1
- package/features/users/UpdateUser/index.js.map +0 -1
- package/features/users/shared/types.js.map +0 -1
- package/features/wcp/WcpContext/index.js.map +0 -1
- package/features/wcp/WcpContext/types.js.map +0 -1
- package/graphql/security/apiKey.gql.d.ts +0 -4
- package/graphql/security/apiKey.gql.js +0 -99
- package/graphql/security/apiKey.gql.js.map +0 -1
- package/graphql/security/base.gql.d.ts +0 -4
- package/graphql/security/base.gql.js.map +0 -1
- package/graphql/security/identity.gql.d.ts +0 -4
- package/graphql/security/identity.gql.js +0 -163
- package/graphql/security/identity.gql.js.map +0 -1
- package/graphql/security/index.d.ts +0 -1
- package/graphql/security/index.js +0 -10
- package/graphql/security/index.js.map +0 -1
- package/graphql/security/role.gql.d.ts +0 -4
- package/graphql/security/role.gql.js +0 -114
- package/graphql/security/role.gql.js.map +0 -1
- package/graphql/security/team.gql.d.ts +0 -4
- package/graphql/security/team.gql.js +0 -127
- package/graphql/security/team.gql.js.map +0 -1
- package/graphql/system/createSystemGraphQL.d.ts +0 -2
- package/graphql/system/createSystemGraphQL.js +0 -57
- package/graphql/system/createSystemGraphQL.js.map +0 -1
- package/graphql/users/user.gql.d.ts +0 -3
- package/graphql/users/user.gql.js +0 -185
- package/graphql/users/user.gql.js.map +0 -1
- package/graphql/wcp/graphql.d.ts +0 -2
- package/graphql/wcp/graphql.js +0 -88
- package/graphql/wcp/graphql.js.map +0 -1
- package/idp/index.js.map +0 -1
- package/idp/types.js.map +0 -1
- package/index.js.map +0 -1
- package/legacy/security/LegacyContext.d.ts +0 -36
- package/legacy/security/LegacyContext.js +0 -205
- package/legacy/security/LegacyContext.js.map +0 -1
- package/legacy/security/createSecurityContext.d.ts +0 -3
- package/legacy/security/createSecurityContext.js +0 -25
- package/legacy/security/createSecurityContext.js.map +0 -1
- package/legacy/security/plugins/SecurityRolePlugin.d.ts +0 -16
- package/legacy/security/plugins/SecurityRolePlugin.js +0 -33
- package/legacy/security/plugins/SecurityRolePlugin.js.map +0 -1
- package/legacy/security/plugins/SecurityTeamPlugin.d.ts +0 -16
- package/legacy/security/plugins/SecurityTeamPlugin.js +0 -33
- package/legacy/security/plugins/SecurityTeamPlugin.js.map +0 -1
- package/legacy/security/plugins/apiKeyAuthentication.d.ts +0 -7
- package/legacy/security/plugins/apiKeyAuthentication.js +0 -29
- package/legacy/security/plugins/apiKeyAuthentication.js.map +0 -1
- package/legacy/security/plugins/apiKeyAuthorization.d.ts +0 -6
- package/legacy/security/plugins/apiKeyAuthorization.js +0 -22
- package/legacy/security/plugins/apiKeyAuthorization.js.map +0 -1
- package/legacy/security/plugins/authenticateUsingCookie.d.ts +0 -5
- package/legacy/security/plugins/authenticateUsingCookie.js +0 -27
- package/legacy/security/plugins/authenticateUsingCookie.js.map +0 -1
- package/legacy/security/plugins/authenticateUsingHttpHeader.d.ts +0 -5
- package/legacy/security/plugins/authenticateUsingHttpHeader.js +0 -23
- package/legacy/security/plugins/authenticateUsingHttpHeader.js.map +0 -1
- package/legacy/security/plugins/secureHeaders.d.ts +0 -1
- package/legacy/security/plugins/secureHeaders.js +0 -23
- package/legacy/security/plugins/secureHeaders.js.map +0 -1
- package/legacy/tenancy/LegacyContext.d.ts +0 -15
- package/legacy/tenancy/LegacyContext.js +0 -64
- package/legacy/tenancy/LegacyContext.js.map +0 -1
- package/legacy/tenancy/createTenancyContext.d.ts +0 -3
- package/legacy/tenancy/createTenancyContext.js +0 -51
- package/legacy/tenancy/createTenancyContext.js.map +0 -1
- package/legacy/users/LegacyContext.d.ts +0 -13
- package/legacy/users/LegacyContext.js +0 -70
- package/legacy/users/LegacyContext.js.map +0 -1
- package/legacy/users/createAdminUsersContext.d.ts +0 -3
- package/legacy/users/createAdminUsersContext.js +0 -12
- package/legacy/users/createAdminUsersContext.js.map +0 -1
- package/legacy/wcp/LegacyWcpContext.d.ts +0 -30
- package/legacy/wcp/LegacyWcpContext.js +0 -74
- package/legacy/wcp/LegacyWcpContext.js.map +0 -1
- package/legacy/wcp/context.d.ts +0 -7
- package/legacy/wcp/context.js +0 -50
- package/legacy/wcp/context.js.map +0 -1
- package/models/base/ModelFactory.js.map +0 -1
- package/models/base/abstractions.js.map +0 -1
- package/models/cms/types.js.map +0 -1
- package/types/core.js.map +0 -1
- package/types/security.js.map +0 -1
- package/types/tenancy.js.map +0 -1
- package/types/users.js.map +0 -1
|
@@ -19,16 +19,15 @@ export type InstallSystemInput = AppInstallationData[];
|
|
|
19
19
|
export interface IInstallSystemUseCase {
|
|
20
20
|
execute(input: InstallSystemInput): Promise<Result<void, IInstallSystemErrors[keyof IInstallSystemErrors]>>;
|
|
21
21
|
}
|
|
22
|
+
/** Run system-wide installation. */
|
|
22
23
|
export declare const InstallSystemUseCase: import("@webiny/di").Abstraction<IInstallSystemUseCase>;
|
|
23
24
|
export declare namespace InstallSystemUseCase {
|
|
24
25
|
type Interface = IInstallSystemUseCase;
|
|
25
26
|
type Input = InstallSystemInput;
|
|
26
27
|
}
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export declare const SystemInstalledHandler: import("@webiny/di").Abstraction<IEventHandler<DomainEvent<void>>>;
|
|
31
|
-
export declare namespace SystemInstalledHandler {
|
|
28
|
+
/** Hook into system lifecycle after the system is installed. */
|
|
29
|
+
export declare const SystemInstalledEventHandler: import("@webiny/di").Abstraction<IEventHandler<DomainEvent<void>>>;
|
|
30
|
+
export declare namespace SystemInstalledEventHandler {
|
|
32
31
|
type Interface = IEventHandler<DomainEvent>;
|
|
33
32
|
type Event = DomainEvent;
|
|
34
33
|
}
|
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
import { createAbstraction } from "@webiny/feature/api";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Types
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Use Case Abstraction
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
export const InstallSystemUseCase = createAbstraction("InstallSystemUseCase");
|
|
16
|
-
/**
|
|
17
|
-
* Event Handler Abstraction
|
|
18
|
-
*/
|
|
19
|
-
export const SystemInstalledHandler = createAbstraction("SystemInstalledHandler");
|
|
2
|
+
const InstallSystemUseCase = createAbstraction("InstallSystemUseCase");
|
|
3
|
+
const SystemInstalledEventHandler = createAbstraction("SystemInstalledEventHandler");
|
|
4
|
+
export { InstallSystemUseCase, SystemInstalledEventHandler };
|
|
20
5
|
|
|
21
6
|
//# sourceMappingURL=abstractions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/system/InstallSystem/abstractions.js","sources":["../../../../src/features/system/InstallSystem/abstractions.ts"],"sourcesContent":["import { createAbstraction, Result } from \"@webiny/feature/api\";\nimport type { IEventHandler, DomainEvent } from \"~/features/eventPublisher/index.js\";\nimport { InstallSystemError, SystemAlreadyInstalledError } from \"./errors.js\";\nimport {\n type AppInstallationData,\n InstallTenantUseCase\n} from \"~/features/tenancy/InstallTenant/index.js\";\nimport { CreateTenantUseCase } from \"~/features/tenancy/CreateTenant/index.js\";\n\n/**\n * Errors\n */\nexport interface IInstallSystemErrors {\n base:\n | InstallSystemError\n | SystemAlreadyInstalledError\n | CreateTenantUseCase.Errors\n | InstallTenantUseCase.Errors;\n}\n\n/**\n * Types\n */\nexport type InstallSystemInput = AppInstallationData[];\n\n/**\n * Use Case Abstraction\n */\nexport interface IInstallSystemUseCase {\n execute(\n input: InstallSystemInput\n ): Promise<Result<void, IInstallSystemErrors[keyof IInstallSystemErrors]>>;\n}\n\n/** Run system-wide installation. */\nexport const InstallSystemUseCase =\n createAbstraction<IInstallSystemUseCase>(\"InstallSystemUseCase\");\n\nexport namespace InstallSystemUseCase {\n export type Interface = IInstallSystemUseCase;\n export type Input = InstallSystemInput;\n}\n\n/** Hook into system lifecycle after the system is installed. */\nexport const SystemInstalledEventHandler = createAbstraction<IEventHandler<DomainEvent>>(\n \"SystemInstalledEventHandler\"\n);\n\nexport namespace SystemInstalledEventHandler {\n export type Interface = IEventHandler<DomainEvent>;\n export type Event = DomainEvent;\n}\n"],"names":["InstallSystemUseCase","createAbstraction","SystemInstalledEventHandler"],"mappings":";AAmCO,MAAMA,uBACTC,kBAAyC;AAQtC,MAAMC,8BAA8BD,kBACvC"}
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { BaseError } from "@webiny/feature/api";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
}
|
|
2
|
+
class InstallSystemError extends BaseError {
|
|
3
|
+
constructor(data){
|
|
4
|
+
super({
|
|
5
|
+
message: `System installation failed: ${data.reason}`,
|
|
6
|
+
data
|
|
7
|
+
}), this.code = "INSTALL_SYSTEM";
|
|
8
|
+
}
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
}
|
|
10
|
+
class SystemAlreadyInstalledError extends BaseError {
|
|
11
|
+
constructor(data = {}){
|
|
12
|
+
super({
|
|
13
|
+
message: "System is already installed!",
|
|
14
|
+
data
|
|
15
|
+
}), this.code = "SYSTEM_ALREADY_INSTALLED";
|
|
16
|
+
}
|
|
19
17
|
}
|
|
18
|
+
export { InstallSystemError, SystemAlreadyInstalledError };
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/system/InstallSystem/errors.js","sources":["../../../../src/features/system/InstallSystem/errors.ts"],"sourcesContent":["import { BaseError } from \"@webiny/feature/api\";\n\ntype InstallSystemErrorData = {\n reason: string;\n};\n\nexport class InstallSystemError extends BaseError<InstallSystemErrorData> {\n override readonly code = \"INSTALL_SYSTEM\" as const;\n\n constructor(data: InstallSystemErrorData) {\n super({\n message: `System installation failed: ${data.reason}`,\n data\n });\n }\n}\n\ntype SystemAlreadyInstalledErrorData = {\n message?: string;\n};\n\nexport class SystemAlreadyInstalledError extends BaseError<SystemAlreadyInstalledErrorData> {\n override readonly code = \"SYSTEM_ALREADY_INSTALLED\" as const;\n\n constructor(data: SystemAlreadyInstalledErrorData = {}) {\n super({\n message: \"System is already installed!\",\n data\n });\n }\n}\n"],"names":["InstallSystemError","BaseError","data","SystemAlreadyInstalledError"],"mappings":";AAMO,MAAMA,2BAA2BC;IAGpC,YAAYC,IAA4B,CAAE;QACtC,KAAK,CAAC;YACF,SAAS,CAAC,4BAA4B,EAAEA,KAAK,MAAM,EAAE;YACrDA;QACJ,SANc,IAAI,GAAG;IAOzB;AACJ;AAMO,MAAMC,oCAAoCF;IAG7C,YAAYC,OAAwC,CAAC,CAAC,CAAE;QACpD,KAAK,CAAC;YACF,SAAS;YACTA;QACJ,SANc,IAAI,GAAG;IAOzB;AACJ"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { DomainEvent } from "../../eventPublisher/index.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { SystemInstalledEventHandler } from "./abstractions.js";
|
|
3
|
+
class SystemInstalledEvent extends DomainEvent {
|
|
4
|
+
getHandlerAbstraction() {
|
|
5
|
+
return SystemInstalledEventHandler;
|
|
6
|
+
}
|
|
7
|
+
constructor(...args){
|
|
8
|
+
super(...args), this.eventType = "system.installed";
|
|
9
|
+
}
|
|
8
10
|
}
|
|
11
|
+
export { SystemInstalledEvent };
|
|
9
12
|
|
|
10
13
|
//# sourceMappingURL=events.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/system/InstallSystem/events.js","sources":["../../../../src/features/system/InstallSystem/events.ts"],"sourcesContent":["import { DomainEvent } from \"~/features/eventPublisher/index.js\";\nimport { SystemInstalledEventHandler } from \"./abstractions.js\";\n\nexport class SystemInstalledEvent extends DomainEvent {\n eventType = \"system.installed\" as const;\n\n getHandlerAbstraction() {\n return SystemInstalledEventHandler;\n }\n}\n"],"names":["SystemInstalledEvent","DomainEvent","SystemInstalledEventHandler"],"mappings":";;AAGO,MAAMA,6BAA6BC;IAGtC,wBAAwB;QACpB,OAAOC;IACX;;QALG,qBACH,SAAS,GAAG;;AAKhB"}
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Container } from "@webiny/di";
|
|
2
|
+
export declare const InstallSystemFeature: {
|
|
3
|
+
name: string;
|
|
4
|
+
register(container: Container): void;
|
|
5
|
+
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { createFeature } from "@webiny/feature/api";
|
|
2
2
|
import { InstallSystemUseCase } from "./InstallSystemUseCase.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
container.register(InstallSystemUseCase);
|
|
9
|
-
}
|
|
3
|
+
const InstallSystemFeature = createFeature({
|
|
4
|
+
name: "InstallSystem",
|
|
5
|
+
register (container) {
|
|
6
|
+
container.register(InstallSystemUseCase);
|
|
7
|
+
}
|
|
10
8
|
});
|
|
9
|
+
export { InstallSystemFeature };
|
|
11
10
|
|
|
12
11
|
//# sourceMappingURL=feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/system/InstallSystem/feature.js","sources":["../../../../src/features/system/InstallSystem/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport type { Container } from \"@webiny/di\";\nimport { InstallSystemUseCase } from \"./InstallSystemUseCase.js\";\n\nexport const InstallSystemFeature = createFeature({\n name: \"InstallSystem\",\n register(container: Container) {\n // Register use case (transient) - auto-wired with DI\n // Depends on EventPublisher, InstallTenantUseCase, GetRootTenantUseCase, and CreateTenantUseCase\n container.register(InstallSystemUseCase);\n }\n});\n"],"names":["InstallSystemFeature","createFeature","container","InstallSystemUseCase"],"mappings":";;AAIO,MAAMA,uBAAuBC,cAAc;IAC9C,MAAM;IACN,UAASC,SAAoB;QAGzBA,UAAU,QAAQ,CAACC;IACvB;AACJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { InstallSystemUseCase } from "./abstractions.js";
|
|
2
|
-
export {
|
|
2
|
+
export { SystemInstalledEventHandler } from "./abstractions.js";
|
|
3
3
|
export type { InstallSystemInput } from "./abstractions.js";
|
|
4
4
|
export { InstallSystemError } from "./errors.js";
|
|
5
5
|
export { SystemAlreadyInstalledError } from "./errors.js";
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export { InstallSystemUseCase } from "./abstractions.js";
|
|
2
|
-
export {
|
|
3
|
-
export { InstallSystemError } from "./errors.js";
|
|
4
|
-
export { SystemAlreadyInstalledError } from "./errors.js";
|
|
1
|
+
export { InstallSystemUseCase, SystemInstalledEventHandler } from "./abstractions.js";
|
|
2
|
+
export { InstallSystemError, SystemAlreadyInstalledError } from "./errors.js";
|
|
5
3
|
export { SystemInstalledEvent } from "./events.js";
|
|
6
|
-
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { createFeature } from "@webiny/feature/api";
|
|
2
2
|
import { InstallSystemFeature } from "./InstallSystem/feature.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
const SystemFeature = createFeature({
|
|
4
|
+
name: "SystemFeature",
|
|
5
|
+
register (container) {
|
|
6
|
+
InstallSystemFeature.register(container);
|
|
7
|
+
}
|
|
8
8
|
});
|
|
9
|
+
export { SystemFeature };
|
|
9
10
|
|
|
10
11
|
//# sourceMappingURL=SystemFeature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/system/SystemFeature.js","sources":["../../../src/features/system/SystemFeature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { InstallSystemFeature } from \"./InstallSystem/feature.js\";\n\nexport const SystemFeature = createFeature({\n name: \"SystemFeature\",\n register(container) {\n InstallSystemFeature.register(container);\n }\n});\n"],"names":["SystemFeature","createFeature","container","InstallSystemFeature"],"mappings":";;AAGO,MAAMA,gBAAgBC,cAAc;IACvC,MAAM;IACN,UAASC,SAAS;QACdC,qBAAqB,QAAQ,CAACD;IAClC;AACJ"}
|
|
@@ -7,6 +7,7 @@ import type { ITaskInput, ITaskOutput } from "../TaskDefinition/index.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export interface ITaskController<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> {
|
|
9
9
|
}
|
|
10
|
+
/** Runtime controller providing capabilities to running tasks. */
|
|
10
11
|
export declare const TaskController: import("@webiny/di").Abstraction<ITaskController<ITaskInput, ITaskOutput>>;
|
|
11
12
|
export declare namespace TaskController {
|
|
12
13
|
type Interface<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = ITaskController<I, O>;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { createAbstraction } from "@webiny/feature/api";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* TaskController provides runtime capabilities to task definitions.
|
|
5
|
-
* The actual interface is defined by the tasks package implementation via module augmentation.
|
|
6
|
-
*
|
|
7
|
-
* Import this from @webiny/api-core, but the full interface comes from @webiny/tasks.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export const TaskController = createAbstraction("TaskController");
|
|
2
|
+
const TaskController = createAbstraction("TaskController");
|
|
3
|
+
export { TaskController };
|
|
11
4
|
|
|
12
5
|
//# sourceMappingURL=abstractions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/task/TaskController/abstractions.js","sources":["../../../../src/features/task/TaskController/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ITaskInput, ITaskOutput } from \"../TaskDefinition/index.js\";\n\n/**\n * TaskController provides runtime capabilities to task definitions.\n * The actual interface is defined by the tasks package implementation via module augmentation.\n *\n * Import this from @webiny/api-core, but the full interface comes from @webiny/tasks.\n */\nexport interface ITaskController<\n // oxlint-disable-next-line typescript/no-unused-vars\n I extends ITaskInput = ITaskInput,\n // oxlint-disable-next-line typescript/no-unused-vars\n O extends ITaskOutput = ITaskOutput\n> {\n // Empty - augmented by tasks package\n}\n\n/** Runtime controller providing capabilities to running tasks. */\nexport const TaskController = createAbstraction<ITaskController>(\"TaskController\");\n\nexport namespace TaskController {\n export type Interface<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskController<I, O>;\n}\n"],"names":["TaskController","createAbstraction"],"mappings":";AAmBO,MAAMA,iBAAiBC,kBAAmC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import zod from "zod";
|
|
2
|
+
import type { Constructor } from "@webiny/di";
|
|
2
3
|
import type { GenericRecord } from "@webiny/api/types";
|
|
3
4
|
import type { ITask } from "../../../features/task/TaskService/index.js";
|
|
4
5
|
import { TaskController } from "../../../features/task/TaskController/index.js";
|
|
@@ -14,12 +15,34 @@ export interface ITaskOutput {
|
|
|
14
15
|
[key: string]: any;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* The task's own definition, minus its behaviour.
|
|
19
|
+
*
|
|
20
|
+
* Handed to `run()` and to every lifecycle hook so a decorator can tell which task it is wrapping
|
|
21
|
+
* and act on the definition's own fields. A decorator is registered against the abstraction, so it
|
|
22
|
+
* wraps every task; without this it has nothing to branch on but a hardcoded list of ids, which
|
|
23
|
+
* means editing the decorator every time a task is added.
|
|
24
|
+
*
|
|
25
|
+
* This is {@link ITaskMetadata}: identity and policy, no behaviour and no handler pointer. The
|
|
26
|
+
* object passed at runtime is the resolved task, so `run` is physically present; naming the metadata
|
|
27
|
+
* type here stops the obvious mistake of a handler calling `params.definition.run(...)` and
|
|
28
|
+
* recursing forever.
|
|
29
|
+
*
|
|
30
|
+
* Only the fields declared here arrive. A field a project adds to its own definition class is
|
|
31
|
+
* currently dropped, because `TaskDefinitionDefaultsDecorator` is a fixed pass-through that
|
|
32
|
+
* exposes a known set of getters and nothing else. Making them forward unknown
|
|
33
|
+
* properties would turn a definition into a place to declare policy (a rate limit, a set of tags)
|
|
34
|
+
* that a decorator acts on; `taskDefinitionInParams.test.ts` pins the current behaviour so that
|
|
35
|
+
* change announces itself.
|
|
36
|
+
*/
|
|
37
|
+
export type ITaskDefinitionInfo = ITaskMetadata;
|
|
38
|
+
/**
|
|
39
|
+
* Task run params - the input data, plus the definition being run
|
|
18
40
|
* All runtime dependencies come from TaskController (injected separately)
|
|
19
41
|
*/
|
|
20
42
|
export interface ITaskRunParams<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> {
|
|
21
43
|
input: I;
|
|
22
44
|
controller: TaskController.Interface<I, O>;
|
|
45
|
+
definition: ITaskDefinitionInfo;
|
|
23
46
|
}
|
|
24
47
|
/**
|
|
25
48
|
* Data for creating a new task
|
|
@@ -35,6 +58,7 @@ export interface ITaskCreateData<I = ITaskInput> {
|
|
|
35
58
|
*/
|
|
36
59
|
export interface ITaskBeforeTriggerParams<I = ITaskInput> {
|
|
37
60
|
data: ITaskCreateData<I>;
|
|
61
|
+
definition: ITaskDefinitionInfo;
|
|
38
62
|
}
|
|
39
63
|
/**
|
|
40
64
|
* Task result status enum
|
|
@@ -66,26 +90,44 @@ export interface ITaskResultAborted {
|
|
|
66
90
|
status: TaskResultStatus.ABORTED;
|
|
67
91
|
}
|
|
68
92
|
export type ITaskResult<I = ITaskInput, O extends ITaskOutput = ITaskOutput> = ITaskResultDone<O> | ITaskResultContinue<I> | ITaskResultError | ITaskResultAborted;
|
|
93
|
+
export type ISelfCleanupEvent = "onSuccess" | "onError" | "onAbort";
|
|
94
|
+
export type ISelfCleanup = "always" | "never" | ISelfCleanupEvent | ISelfCleanupEvent[];
|
|
69
95
|
export type ITaskLifecycleHook<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = {
|
|
70
96
|
task: ITask<I, O>;
|
|
97
|
+
definition: ITaskDefinitionInfo;
|
|
71
98
|
};
|
|
72
99
|
/**
|
|
73
|
-
*
|
|
100
|
+
* What a task IS: identity and runtime policy, with no behaviour and no dependencies.
|
|
101
|
+
*
|
|
102
|
+
* Listing tasks, resolving one by id, and applying defaults all need only this. Keeping it free of
|
|
103
|
+
* dependencies is the whole point — `GetRunnableTaskDefinitionUseCase` builds every registered definition
|
|
104
|
+
* to find one by id, so anything expensive here is paid 24 times per lookup.
|
|
74
105
|
*/
|
|
75
|
-
export interface
|
|
106
|
+
export interface ITaskMetadata {
|
|
76
107
|
id: string;
|
|
77
108
|
title: string;
|
|
78
109
|
description?: string;
|
|
79
110
|
maxIterations?: number;
|
|
80
111
|
databaseLogs?: boolean;
|
|
81
112
|
isPrivate?: boolean;
|
|
113
|
+
selfCleanup?: ISelfCleanup;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* What a task DOES. This is the half that carries dependencies (a CMS context, an OpenSearch
|
|
117
|
+
* client), so it is built only for the task actually being run.
|
|
118
|
+
*
|
|
119
|
+
* The lifecycle hooks live here rather than on {@link ITaskMetadata} because they need the same
|
|
120
|
+
* dependencies `run()` does — see `MockDataManagerTask`, whose `onError` and `onAbort` both use the
|
|
121
|
+
* OpenSearch client injected for `run()`.
|
|
122
|
+
*/
|
|
123
|
+
export interface ITaskHandler<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> {
|
|
82
124
|
/**
|
|
83
125
|
* Core run method - receives ONLY input params
|
|
84
126
|
* All runtime dependencies (logging, state management, etc.) come from TaskController
|
|
85
127
|
*/
|
|
86
128
|
run(params: ITaskRunParams<I, O>): Promise<ITaskResult<I, O>>;
|
|
87
129
|
/**
|
|
88
|
-
* Optional lifecycle hooks - receive task data, no context
|
|
130
|
+
* Optional lifecycle hooks - receive task data, no context.
|
|
89
131
|
*/
|
|
90
132
|
onBeforeTrigger?(params: ITaskBeforeTriggerParams<I>): Promise<void>;
|
|
91
133
|
onDone?(params: ITaskLifecycleHook<I, O>): Promise<void>;
|
|
@@ -98,22 +140,48 @@ export interface ITaskDefinition<I extends ITaskInput = ITaskInput, O extends IT
|
|
|
98
140
|
*/
|
|
99
141
|
createInputValidation?(params: ITaskCreateInputValidationParams): GenericRecord<keyof I, zod.Schema> | zod.Schema;
|
|
100
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* What you register: a task's {@link ITaskMetadata} plus the class that does the work.
|
|
145
|
+
*
|
|
146
|
+
* The definition takes no dependencies of its own, so `GetRunnableTaskDefinitionUseCase` can build every
|
|
147
|
+
* registered one to find a task by id without constructing anything expensive. Only the winner's
|
|
148
|
+
* `handler` gets built.
|
|
149
|
+
*/
|
|
150
|
+
export interface ITaskDefinition<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> extends ITaskMetadata {
|
|
151
|
+
handler: Constructor<ITaskHandler<I, O>>;
|
|
152
|
+
}
|
|
101
153
|
export interface ITaskCreateInputValidationParams {
|
|
102
154
|
validator: typeof zod;
|
|
103
155
|
}
|
|
156
|
+
/** Define a long-running background task with lifecycle hooks. */
|
|
104
157
|
export declare const TaskDefinition: import("@webiny/di").Abstraction<ITaskDefinition<ITaskInput, ITaskOutput>>;
|
|
158
|
+
/**
|
|
159
|
+
* The behaviour half of a task, resolved on demand by the runner via
|
|
160
|
+
* `container.resolveImplementation(definition.handler)`. Registered implementations are NOT
|
|
161
|
+
* registered against this abstraction — the definition points at the class directly, exactly as
|
|
162
|
+
* `HttpRouteDefinition` points at its `HttpRouteHandler`.
|
|
163
|
+
*/
|
|
164
|
+
export declare const TaskHandler: import("@webiny/di").Abstraction<ITaskHandler<ITaskInput, ITaskOutput>>;
|
|
105
165
|
/**
|
|
106
166
|
* IRunnableTaskDefinition represents a TaskDefinition after decoration/processing.
|
|
107
167
|
* All optional runtime properties are guaranteed to have values (with defaults applied).
|
|
108
168
|
* Used internally by the task runner to ensure consistent behavior.
|
|
109
169
|
*/
|
|
110
|
-
export interface IRunnableTaskDefinition<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> extends
|
|
170
|
+
export interface IRunnableTaskDefinition<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> extends ITaskMetadata, ITaskHandler<I, O> {
|
|
111
171
|
isPrivate: boolean;
|
|
112
172
|
databaseLogs: boolean;
|
|
113
173
|
maxIterations: number;
|
|
114
174
|
}
|
|
175
|
+
export declare namespace TaskHandler {
|
|
176
|
+
type Interface<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = ITaskHandler<I, O>;
|
|
177
|
+
type RunParams<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = ITaskRunParams<I, O>;
|
|
178
|
+
type Result<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = ITaskResult<I, O>;
|
|
179
|
+
type LifecycleHookParams<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = ITaskLifecycleHook<I, O>;
|
|
180
|
+
}
|
|
115
181
|
export declare namespace TaskDefinition {
|
|
116
182
|
type Interface<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = ITaskDefinition<I, O>;
|
|
183
|
+
type Metadata = ITaskMetadata;
|
|
184
|
+
type Handler<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = ITaskHandler<I, O>;
|
|
117
185
|
type TaskInput = ITaskInput;
|
|
118
186
|
type TaskOutput = ITaskOutput;
|
|
119
187
|
type Runnable<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = IRunnableTaskDefinition<I, O>;
|
|
@@ -128,4 +196,7 @@ export declare namespace TaskDefinition {
|
|
|
128
196
|
type TaskCreateData<I = ITaskInput> = ITaskCreateData<I>;
|
|
129
197
|
type BeforeTriggerParams<I = ITaskInput> = ITaskBeforeTriggerParams<I>;
|
|
130
198
|
type LifecycleHookParams<I extends ITaskInput = ITaskInput, O extends ITaskOutput = ITaskOutput> = ITaskLifecycleHook<I, O>;
|
|
199
|
+
type Info = ITaskDefinitionInfo;
|
|
200
|
+
type SelfCleanupEvent = ISelfCleanupEvent;
|
|
201
|
+
type SelfCleanup = ISelfCleanup;
|
|
131
202
|
}
|
|
@@ -1,43 +1,13 @@
|
|
|
1
1
|
import { createAbstraction } from "@webiny/feature/api";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Data for creating a new task
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Parameters for onBeforeTrigger lifecycle hook
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Task result status enum
|
|
18
|
-
*/
|
|
19
|
-
export let TaskResultStatus = /*#__PURE__*/function (TaskResultStatus) {
|
|
20
|
-
TaskResultStatus["DONE"] = "done";
|
|
21
|
-
TaskResultStatus["CONTINUE"] = "continue";
|
|
22
|
-
TaskResultStatus["ERROR"] = "error";
|
|
23
|
-
TaskResultStatus["ABORTED"] = "aborted";
|
|
24
|
-
return TaskResultStatus;
|
|
2
|
+
var abstractions_TaskResultStatus = /*#__PURE__*/ function(TaskResultStatus) {
|
|
3
|
+
TaskResultStatus["DONE"] = "done";
|
|
4
|
+
TaskResultStatus["CONTINUE"] = "continue";
|
|
5
|
+
TaskResultStatus["ERROR"] = "error";
|
|
6
|
+
TaskResultStatus["ABORTED"] = "aborted";
|
|
7
|
+
return TaskResultStatus;
|
|
25
8
|
}({});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Core TaskDefinition - minimal interface
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
export const TaskDefinition = createAbstraction("TaskDefinition");
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* IRunnableTaskDefinition represents a TaskDefinition after decoration/processing.
|
|
39
|
-
* All optional runtime properties are guaranteed to have values (with defaults applied).
|
|
40
|
-
* Used internally by the task runner to ensure consistent behavior.
|
|
41
|
-
*/
|
|
9
|
+
const TaskDefinition = createAbstraction("TaskDefinition");
|
|
10
|
+
const TaskHandler = createAbstraction("TaskHandler");
|
|
11
|
+
export { TaskDefinition, TaskHandler, abstractions_TaskResultStatus as TaskResultStatus };
|
|
42
12
|
|
|
43
13
|
//# sourceMappingURL=abstractions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createAbstraction","TaskResultStatus","TaskDefinition"],"sources":["abstractions.ts"],"sourcesContent":["import zod from \"zod\";\nimport { createAbstraction } from \"@webiny/feature/api\";\nimport type { GenericRecord } from \"@webiny/api/types\";\nimport type { ITask } from \"~/features/task/TaskService/index.js\";\nimport { TaskController } from \"~/features/task/TaskController/index.js\";\n\nexport type ITaskInput = GenericRecord;\n\nexport interface IResponseError {\n message: string;\n code?: string | null;\n data?: GenericRecord | null;\n stack?: string;\n}\n\nexport interface ITaskOutput {\n error?: IResponseError;\n [key: string]: any;\n}\n\n/**\n * Task run params - ONLY the input data\n * All runtime dependencies come from TaskController (injected separately)\n */\nexport interface ITaskRunParams<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n> {\n input: I;\n controller: TaskController.Interface<I, O>;\n}\n\n/**\n * Data for creating a new task\n */\nexport interface ITaskCreateData<I = ITaskInput> {\n definitionId: string;\n name: string;\n input: I;\n parentId?: string;\n}\n\n/**\n * Parameters for onBeforeTrigger lifecycle hook\n */\nexport interface ITaskBeforeTriggerParams<I = ITaskInput> {\n data: ITaskCreateData<I>;\n}\n\n/**\n * Task result status enum\n */\nexport enum TaskResultStatus {\n DONE = \"done\",\n CONTINUE = \"continue\",\n ERROR = \"error\",\n ABORTED = \"aborted\"\n}\n\n/**\n * Specific result types\n */\nexport interface ITaskResultDone<O extends ITaskOutput = ITaskOutput> {\n status: TaskResultStatus.DONE;\n message?: string;\n output?: O;\n}\n\nexport interface ITaskResultContinue<I = ITaskInput> {\n status: TaskResultStatus.CONTINUE;\n input: I;\n wait?: number; // seconds to wait before next iteration\n}\n\nexport interface ITaskResultError {\n status: TaskResultStatus.ERROR;\n error: IResponseError;\n}\n\nexport interface ITaskResultAborted {\n status: TaskResultStatus.ABORTED;\n}\n\nexport type ITaskResult<I = ITaskInput, O extends ITaskOutput = ITaskOutput> =\n | ITaskResultDone<O>\n | ITaskResultContinue<I>\n | ITaskResultError\n | ITaskResultAborted;\n\nexport type ITaskLifecycleHook<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n> = { task: ITask<I, O> };\n\n/**\n * Core TaskDefinition - minimal interface\n */\nexport interface ITaskDefinition<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n> {\n id: string;\n title: string;\n description?: string;\n maxIterations?: number;\n databaseLogs?: boolean;\n isPrivate?: boolean;\n\n /**\n * Core run method - receives ONLY input params\n * All runtime dependencies (logging, state management, etc.) come from TaskController\n */\n run(params: ITaskRunParams<I, O>): Promise<ITaskResult<I, O>>;\n\n /**\n * Optional lifecycle hooks - receive task data, no context\n */\n onBeforeTrigger?(params: ITaskBeforeTriggerParams<I>): Promise<void>;\n onDone?(params: ITaskLifecycleHook<I, O>): Promise<void>;\n onError?(params: ITaskLifecycleHook<I, O>): Promise<void>;\n onAbort?(params: ITaskLifecycleHook<I, O>): Promise<void>;\n onMaxIterations?(params: ITaskLifecycleHook<I, O>): Promise<void>;\n /**\n * Create a validation schema for the task input.\n * This will be used to validate the input before the task is triggered.\n */\n createInputValidation?(\n params: ITaskCreateInputValidationParams\n ): GenericRecord<keyof I, zod.Schema> | zod.Schema;\n}\n\nexport interface ITaskCreateInputValidationParams {\n validator: typeof zod;\n}\n\nexport const TaskDefinition = createAbstraction<ITaskDefinition>(\"TaskDefinition\");\n\n/**\n * IRunnableTaskDefinition represents a TaskDefinition after decoration/processing.\n * All optional runtime properties are guaranteed to have values (with defaults applied).\n * Used internally by the task runner to ensure consistent behavior.\n */\nexport interface IRunnableTaskDefinition<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n> extends ITaskDefinition<I, O> {\n // Override optional properties to be required with guaranteed values\n isPrivate: boolean;\n databaseLogs: boolean;\n maxIterations: number;\n}\n\nexport namespace TaskDefinition {\n export type Interface<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskDefinition<I, O>;\n\n export type TaskInput = ITaskInput;\n\n export type TaskOutput = ITaskOutput;\n\n export type Runnable<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = IRunnableTaskDefinition<I, O>;\n\n export type RunParams<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskRunParams<I, O>;\n\n export type Result<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskResult<I, O>;\n\n export type Task<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITask<I, O>;\n\n export type ResultDone<O extends ITaskOutput = ITaskOutput> = ITaskResultDone<O>;\n export type ResultContinue<I = ITaskInput> = ITaskResultContinue<I>;\n export type ResultError = ITaskResultError;\n export type ResultAborted = ITaskResultAborted;\n export type CreateInputValidationParams = ITaskCreateInputValidationParams;\n export type TaskCreateData<I = ITaskInput> = ITaskCreateData<I>;\n export type BeforeTriggerParams<I = ITaskInput> = ITaskBeforeTriggerParams<I>;\n export type LifecycleHookParams<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskLifecycleHook<I, O>;\n}\n"],"mappings":"AACA,SAASA,iBAAiB,QAAQ,qBAAqB;;AAmBvD;AACA;AACA;AACA;;AASA;AACA;AACA;;AAQA;AACA;AACA;;AAKA;AACA;AACA;AACA,WAAYC,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAO5B;AACA;AACA;;AAiCA;AACA;AACA;;AAuCA,OAAO,MAAMC,cAAc,GAAGF,iBAAiB,CAAkB,gBAAgB,CAAC;;AAElF;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"features/task/TaskDefinition/abstractions.js","sources":["../../../../src/features/task/TaskDefinition/abstractions.ts"],"sourcesContent":["import zod from \"zod\";\nimport type { Constructor } from \"@webiny/di\";\nimport { createAbstraction } from \"@webiny/feature/api\";\nimport type { GenericRecord } from \"@webiny/api/types\";\nimport type { ITask } from \"~/features/task/TaskService/index.js\";\nimport { TaskController } from \"~/features/task/TaskController/index.js\";\n\nexport type ITaskInput = GenericRecord;\n\nexport interface IResponseError {\n message: string;\n code?: string | null;\n data?: GenericRecord | null;\n stack?: string;\n}\n\nexport interface ITaskOutput {\n error?: IResponseError;\n [key: string]: any;\n}\n\n/**\n * The task's own definition, minus its behaviour.\n *\n * Handed to `run()` and to every lifecycle hook so a decorator can tell which task it is wrapping\n * and act on the definition's own fields. A decorator is registered against the abstraction, so it\n * wraps every task; without this it has nothing to branch on but a hardcoded list of ids, which\n * means editing the decorator every time a task is added.\n *\n * This is {@link ITaskMetadata}: identity and policy, no behaviour and no handler pointer. The\n * object passed at runtime is the resolved task, so `run` is physically present; naming the metadata\n * type here stops the obvious mistake of a handler calling `params.definition.run(...)` and\n * recursing forever.\n *\n * Only the fields declared here arrive. A field a project adds to its own definition class is\n * currently dropped, because `TaskDefinitionDefaultsDecorator` is a fixed pass-through that\n * exposes a known set of getters and nothing else. Making them forward unknown\n * properties would turn a definition into a place to declare policy (a rate limit, a set of tags)\n * that a decorator acts on; `taskDefinitionInParams.test.ts` pins the current behaviour so that\n * change announces itself.\n */\nexport type ITaskDefinitionInfo = ITaskMetadata;\n\n/**\n * Task run params - the input data, plus the definition being run\n * All runtime dependencies come from TaskController (injected separately)\n */\nexport interface ITaskRunParams<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n> {\n input: I;\n controller: TaskController.Interface<I, O>;\n definition: ITaskDefinitionInfo;\n}\n\n/**\n * Data for creating a new task\n */\nexport interface ITaskCreateData<I = ITaskInput> {\n definitionId: string;\n name: string;\n input: I;\n parentId?: string;\n}\n\n/**\n * Parameters for onBeforeTrigger lifecycle hook\n */\nexport interface ITaskBeforeTriggerParams<I = ITaskInput> {\n data: ITaskCreateData<I>;\n definition: ITaskDefinitionInfo;\n}\n\n/**\n * Task result status enum\n */\nexport enum TaskResultStatus {\n DONE = \"done\",\n CONTINUE = \"continue\",\n ERROR = \"error\",\n ABORTED = \"aborted\"\n}\n\n/**\n * Specific result types\n */\nexport interface ITaskResultDone<O extends ITaskOutput = ITaskOutput> {\n status: TaskResultStatus.DONE;\n message?: string;\n output?: O;\n}\n\nexport interface ITaskResultContinue<I = ITaskInput> {\n status: TaskResultStatus.CONTINUE;\n input: I;\n wait?: number; // seconds to wait before next iteration\n}\n\nexport interface ITaskResultError {\n status: TaskResultStatus.ERROR;\n error: IResponseError;\n}\n\nexport interface ITaskResultAborted {\n status: TaskResultStatus.ABORTED;\n}\n\nexport type ITaskResult<I = ITaskInput, O extends ITaskOutput = ITaskOutput> =\n | ITaskResultDone<O>\n | ITaskResultContinue<I>\n | ITaskResultError\n | ITaskResultAborted;\n\nexport type ISelfCleanupEvent = \"onSuccess\" | \"onError\" | \"onAbort\";\n\nexport type ISelfCleanup = \"always\" | \"never\" | ISelfCleanupEvent | ISelfCleanupEvent[];\n\nexport type ITaskLifecycleHook<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n> = {\n task: ITask<I, O>;\n definition: ITaskDefinitionInfo;\n};\n\n/**\n * What a task IS: identity and runtime policy, with no behaviour and no dependencies.\n *\n * Listing tasks, resolving one by id, and applying defaults all need only this. Keeping it free of\n * dependencies is the whole point — `GetRunnableTaskDefinitionUseCase` builds every registered definition\n * to find one by id, so anything expensive here is paid 24 times per lookup.\n */\nexport interface ITaskMetadata {\n id: string;\n title: string;\n description?: string;\n maxIterations?: number;\n databaseLogs?: boolean;\n isPrivate?: boolean;\n selfCleanup?: ISelfCleanup;\n}\n\n/**\n * What a task DOES. This is the half that carries dependencies (a CMS context, an OpenSearch\n * client), so it is built only for the task actually being run.\n *\n * The lifecycle hooks live here rather than on {@link ITaskMetadata} because they need the same\n * dependencies `run()` does — see `MockDataManagerTask`, whose `onError` and `onAbort` both use the\n * OpenSearch client injected for `run()`.\n */\nexport interface ITaskHandler<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n> {\n /**\n * Core run method - receives ONLY input params\n * All runtime dependencies (logging, state management, etc.) come from TaskController\n */\n run(params: ITaskRunParams<I, O>): Promise<ITaskResult<I, O>>;\n\n /**\n * Optional lifecycle hooks - receive task data, no context.\n */\n onBeforeTrigger?(params: ITaskBeforeTriggerParams<I>): Promise<void>;\n onDone?(params: ITaskLifecycleHook<I, O>): Promise<void>;\n onError?(params: ITaskLifecycleHook<I, O>): Promise<void>;\n onAbort?(params: ITaskLifecycleHook<I, O>): Promise<void>;\n onMaxIterations?(params: ITaskLifecycleHook<I, O>): Promise<void>;\n /**\n * Create a validation schema for the task input.\n * This will be used to validate the input before the task is triggered.\n */\n createInputValidation?(\n params: ITaskCreateInputValidationParams\n ): GenericRecord<keyof I, zod.Schema> | zod.Schema;\n}\n\n/**\n * What you register: a task's {@link ITaskMetadata} plus the class that does the work.\n *\n * The definition takes no dependencies of its own, so `GetRunnableTaskDefinitionUseCase` can build every\n * registered one to find a task by id without constructing anything expensive. Only the winner's\n * `handler` gets built.\n */\nexport interface ITaskDefinition<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n> extends ITaskMetadata {\n handler: Constructor<ITaskHandler<I, O>>;\n}\n\nexport interface ITaskCreateInputValidationParams {\n validator: typeof zod;\n}\n\n/** Define a long-running background task with lifecycle hooks. */\nexport const TaskDefinition = createAbstraction<ITaskDefinition>(\"TaskDefinition\");\n\n/**\n * The behaviour half of a task, resolved on demand by the runner via\n * `container.resolveImplementation(definition.handler)`. Registered implementations are NOT\n * registered against this abstraction — the definition points at the class directly, exactly as\n * `HttpRouteDefinition` points at its `HttpRouteHandler`.\n */\nexport const TaskHandler = createAbstraction<ITaskHandler>(\"TaskHandler\");\n\n/**\n * IRunnableTaskDefinition represents a TaskDefinition after decoration/processing.\n * All optional runtime properties are guaranteed to have values (with defaults applied).\n * Used internally by the task runner to ensure consistent behavior.\n */\nexport interface IRunnableTaskDefinition<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n>\n extends ITaskMetadata, ITaskHandler<I, O> {\n // Override optional properties to be required with guaranteed values\n isPrivate: boolean;\n databaseLogs: boolean;\n maxIterations: number;\n}\n\nexport namespace TaskHandler {\n export type Interface<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskHandler<I, O>;\n\n export type RunParams<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskRunParams<I, O>;\n\n export type Result<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskResult<I, O>;\n\n export type LifecycleHookParams<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskLifecycleHook<I, O>;\n}\n\nexport namespace TaskDefinition {\n export type Interface<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskDefinition<I, O>;\n\n export type Metadata = ITaskMetadata;\n\n export type Handler<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskHandler<I, O>;\n\n export type TaskInput = ITaskInput;\n\n export type TaskOutput = ITaskOutput;\n\n export type Runnable<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = IRunnableTaskDefinition<I, O>;\n\n export type RunParams<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskRunParams<I, O>;\n\n export type Result<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskResult<I, O>;\n\n export type Task<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITask<I, O>;\n\n export type ResultDone<O extends ITaskOutput = ITaskOutput> = ITaskResultDone<O>;\n export type ResultContinue<I = ITaskInput> = ITaskResultContinue<I>;\n export type ResultError = ITaskResultError;\n export type ResultAborted = ITaskResultAborted;\n export type CreateInputValidationParams = ITaskCreateInputValidationParams;\n export type TaskCreateData<I = ITaskInput> = ITaskCreateData<I>;\n export type BeforeTriggerParams<I = ITaskInput> = ITaskBeforeTriggerParams<I>;\n export type LifecycleHookParams<\n I extends ITaskInput = ITaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITaskLifecycleHook<I, O>;\n\n export type Info = ITaskDefinitionInfo;\n\n export type SelfCleanupEvent = ISelfCleanupEvent;\n export type SelfCleanup = ISelfCleanup;\n}\n"],"names":["TaskResultStatus","TaskDefinition","createAbstraction","TaskHandler"],"mappings":";AA6EO,IAAKA,gCAAgBA,WAAAA,GAAAA,SAAhBA,gBAAgB;;;;;WAAhBA;;AAwHL,MAAMC,iBAAiBC,kBAAmC;AAQ1D,MAAMC,cAAcD,kBAAgC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseError, Result } from "@webiny/feature/api";
|
|
2
2
|
import type { GenericRecord } from "@webiny/api/types.js";
|
|
3
3
|
import { type ITaskOutput, TaskDefinition } from "../../../features/task/TaskDefinition/index.js";
|
|
4
|
+
/** Trigger and manage long-running background tasks. */
|
|
4
5
|
export declare const TaskService: import("@webiny/di").Abstraction<ITaskService>;
|
|
5
6
|
export declare namespace TaskService {
|
|
6
7
|
type Interface = ITaskService;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { createAbstraction } from "@webiny/feature/api";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
TaskDataStatus["FAILED"] = "failed";
|
|
11
|
-
TaskDataStatus["SUCCESS"] = "success";
|
|
12
|
-
TaskDataStatus["ABORTED"] = "aborted";
|
|
13
|
-
return TaskDataStatus;
|
|
2
|
+
const TaskService = createAbstraction("TaskService");
|
|
3
|
+
var abstractions_TaskDataStatus = /*#__PURE__*/ function(TaskDataStatus) {
|
|
4
|
+
TaskDataStatus["PENDING"] = "pending";
|
|
5
|
+
TaskDataStatus["RUNNING"] = "running";
|
|
6
|
+
TaskDataStatus["FAILED"] = "failed";
|
|
7
|
+
TaskDataStatus["SUCCESS"] = "success";
|
|
8
|
+
TaskDataStatus["ABORTED"] = "aborted";
|
|
9
|
+
return TaskDataStatus;
|
|
14
10
|
}({});
|
|
11
|
+
export { TaskService, abstractions_TaskDataStatus as TaskDataStatus };
|
|
15
12
|
|
|
16
13
|
//# sourceMappingURL=abstractions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/task/TaskService/abstractions.js","sources":["../../../../src/features/task/TaskService/abstractions.ts"],"sourcesContent":["import { BaseError, createAbstraction, Result } from \"@webiny/feature/api\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\nimport { type ITaskOutput, TaskDefinition } from \"~/features/task/TaskDefinition/index.js\";\n\n/** Trigger and manage long-running background tasks. */\nexport const TaskService = createAbstraction<ITaskService>(\"TaskService\");\n\nexport namespace TaskService {\n export type Interface = ITaskService;\n /**\n * This is the output of `trigger` and `abort` actions.\n */\n export type GenericOutput = IGenericOutput;\n\n export type TaskInput = TaskDefinition.TaskInput;\n\n export type Task<\n I extends TaskDefinition.TaskInput = TaskDefinition.TaskInput,\n O extends ITaskOutput = ITaskOutput\n > = ITask<I, O>;\n}\n\n// The service info depends on the implementation.\n// We cannot have a more precise type here, since implementation can be anything (AWS, Azure, etc.).\nexport type IServiceInfo = GenericRecord;\n\nexport interface IResponseError {\n message: string;\n code?: string | null;\n data?: GenericRecord | null;\n stack?: string;\n}\n\nexport interface ITaskAbortParams {\n id: string;\n message?: string;\n}\n\nexport interface ITaskService {\n trigger: <\n T extends TaskDefinition.TaskInput = TaskDefinition.TaskInput,\n O extends IGenericOutput = IGenericOutput\n >(\n params: ITaskTriggerParams<T>\n ) => Promise<Result<ITask<T, O>, BaseError>>;\n abort: <\n T extends TaskDefinition.TaskInput = TaskDefinition.TaskInput,\n O extends IGenericOutput = IGenericOutput\n >(\n params: ITaskAbortParams\n ) => Promise<Result<ITask<T, O>, BaseError>>;\n fetchServiceInfo: (input: ITask<any, any> | string) => Promise<Result<IServiceInfo, BaseError>>;\n}\n\nexport interface IGenericOutput {\n error?: IResponseError;\n [key: string]:\n | string\n | string[]\n | number\n | boolean\n | undefined\n | Record<string, any>\n | IResponseError;\n}\n\nexport interface ITaskTriggerParams<I = TaskDefinition.TaskInput> {\n parent?: Pick<ITask, \"id\">;\n definition: string;\n name?: string;\n input?: I;\n delay?: number;\n}\n\nexport interface ITaskValues<T = GenericRecord, O extends ITaskOutput = ITaskOutput> {\n startedOn?: string;\n finishedOn?: string;\n eventResponse: GenericRecord | undefined;\n iterations: number;\n parentId?: string;\n name: string;\n taskStatus: TaskDataStatus;\n definitionId: string;\n executionName: string;\n input: T;\n output?: O;\n}\n\nexport interface ITask<T = GenericRecord, O extends ITaskOutput = ITaskOutput> extends ITaskValues<\n T,\n O\n> {\n /**\n * ID without the revision number (for example: #0001).\n */\n id: string;\n createdOn: string;\n savedOn: string;\n createdBy: ITaskIdentity;\n}\n\nexport enum TaskDataStatus {\n PENDING = \"pending\",\n RUNNING = \"running\",\n FAILED = \"failed\",\n SUCCESS = \"success\",\n ABORTED = \"aborted\"\n}\n\nexport interface ITaskIdentity {\n id: string;\n displayName: string;\n type: string;\n}\n"],"names":["TaskService","createAbstraction","TaskDataStatus"],"mappings":";AAKO,MAAMA,cAAcC,kBAAgC;AAgGpD,IAAKC,8BAAcA,WAAAA,GAAAA,SAAdA,cAAc;;;;;;WAAdA"}
|