@webiny/api-core 6.3.0 → 6.4.0-beta.1
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.js +22 -18
- package/ApiCoreFeature.js.map +1 -1
- package/createApiCore.d.ts +1 -1
- package/createApiCore.js +14 -9
- package/createApiCore.js.map +1 -1
- package/domain/identity/SystemIdentityValue.js +9 -8
- package/domain/identity/SystemIdentityValue.js.map +1 -1
- package/domain/security/ApiToken.js +5 -11
- 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.js +0 -3
- package/exports/api/event-publisher.js +0 -3
- package/exports/api/graphql.js +0 -2
- package/exports/api/key-value-store.js +0 -3
- package/exports/api/logger.js +0 -3
- package/exports/api/security/api-key.js +0 -2
- package/exports/api/security/authentication.js +0 -2
- package/exports/api/security/role.js +1 -3
- package/exports/api/security/user.js +0 -2
- package/exports/api/security.js +3 -7
- package/exports/api/system.js +0 -2
- package/exports/api/tasks.js +0 -2
- 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.js +1 -3
- package/features/ai/Ai.js +100 -117
- package/features/ai/Ai.js.map +1 -1
- package/features/ai/AiSdkTools.js +23 -19
- package/features/ai/AiSdkTools.js.map +1 -1
- package/features/ai/AnthropicSdkFactory.js +82 -65
- package/features/ai/AnthropicSdkFactory.js.map +1 -1
- package/features/ai/OpenAiSdkFactory.js +234 -181
- package/features/ai/OpenAiSdkFactory.js.map +1 -1
- package/features/ai/abstractions.js +7 -32
- package/features/ai/abstractions.js.map +1 -1
- package/features/ai/feature.js +9 -8
- package/features/ai/feature.js.map +1 -1
- package/features/ai/index.js +1 -3
- package/features/buildParams/BuildParams.js +20 -14
- package/features/buildParams/BuildParams.js.map +1 -1
- package/features/buildParams/abstractions.js +3 -4
- package/features/buildParams/abstractions.js.map +1 -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/encryption/EncryptionService.js +50 -46
- package/features/encryption/EncryptionService.js.map +1 -1
- package/features/encryption/abstractions.js +2 -2
- package/features/encryption/abstractions.js.map +1 -1
- package/features/encryption/feature.js +6 -5
- package/features/encryption/feature.js.map +1 -1
- package/features/encryption/index.js +0 -2
- 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.js +7 -12
- package/features/eventPublisher/abstractions.js.map +1 -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/feature.js +6 -5
- package/features/featureFlags/feature.js.map +1 -1
- package/features/keyValueStore/GlobalKeyValueStore.js +28 -23
- package/features/keyValueStore/GlobalKeyValueStore.js.map +1 -1
- package/features/keyValueStore/KeyValueStore.js +30 -27
- package/features/keyValueStore/KeyValueStore.js.map +1 -1
- package/features/keyValueStore/KeyValueStoreRepository.d.ts +2 -2
- package/features/keyValueStore/KeyValueStoreRepository.js +34 -41
- package/features/keyValueStore/KeyValueStoreRepository.js.map +1 -1
- package/features/keyValueStore/abstractions.d.ts +6 -2
- package/features/keyValueStore/abstractions.js +5 -20
- package/features/keyValueStore/abstractions.js.map +1 -1
- package/features/keyValueStore/errors.js +16 -17
- package/features/keyValueStore/errors.js.map +1 -1
- package/features/keyValueStore/feature.js +9 -9
- package/features/keyValueStore/feature.js.map +1 -1
- package/features/keyValueStore/index.js +1 -3
- package/features/logger/LoggerService.js +41 -45
- package/features/logger/LoggerService.js.map +1 -1
- package/features/logger/abstractions.js +2 -2
- package/features/logger/abstractions.js.map +1 -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.js +11 -14
- package/features/masker/Masker.js.map +1 -1
- package/features/masker/abstractions.js +2 -1
- package/features/masker/abstractions.js.map +1 -1
- package/features/masker/feature.js +7 -6
- package/features/masker/feature.js.map +1 -1
- package/features/masker/index.js +0 -2
- 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.js +69 -106
- package/features/security/IdentityContext/IdentityContext.js.map +1 -1
- package/features/security/IdentityContext/abstractions.js +2 -2
- package/features/security/IdentityContext/abstractions.js.map +1 -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.js +13 -21
- package/features/security/SecurityFeature.js.map +1 -1
- package/features/security/apiKeys/CreateApiKey/CreateApiKeyUseCase.js +48 -49
- package/features/security/apiKeys/CreateApiKey/CreateApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/CreateApiKey/abstractions.js +2 -2
- package/features/security/apiKeys/CreateApiKey/abstractions.js.map +1 -1
- package/features/security/apiKeys/CreateApiKey/events.js +17 -16
- package/features/security/apiKeys/CreateApiKey/events.js.map +1 -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.js +2 -2
- package/features/security/apiKeys/DeleteApiKey/abstractions.js.map +1 -1
- package/features/security/apiKeys/DeleteApiKey/events.js +17 -16
- package/features/security/apiKeys/DeleteApiKey/events.js.map +1 -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.js +16 -14
- package/features/security/apiKeys/GetApiKey/GetApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKey/abstractions.js +2 -2
- package/features/security/apiKeys/GetApiKey/abstractions.js.map +1 -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.js +13 -10
- package/features/security/apiKeys/GetApiKeyBySlug/GetApiKeyBySlugUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyBySlug/abstractions.js +2 -2
- package/features/security/apiKeys/GetApiKeyBySlug/abstractions.js.map +1 -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.js +13 -10
- package/features/security/apiKeys/GetApiKeyByToken/GetApiKeyByTokenUseCase.js.map +1 -1
- package/features/security/apiKeys/GetApiKeyByToken/abstractions.js +2 -2
- package/features/security/apiKeys/GetApiKeyByToken/abstractions.js.map +1 -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.js +2 -2
- package/features/security/apiKeys/ListApiKeys/abstractions.js.map +1 -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 +39 -42
- package/features/security/apiKeys/UpdateApiKey/UpdateApiKeyUseCase.js.map +1 -1
- package/features/security/apiKeys/UpdateApiKey/abstractions.js +2 -2
- package/features/security/apiKeys/UpdateApiKey/abstractions.js.map +1 -1
- package/features/security/apiKeys/UpdateApiKey/events.js +17 -16
- package/features/security/apiKeys/UpdateApiKey/events.js.map +1 -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.js +14 -16
- package/features/security/apiKeys/feature.js.map +1 -1
- package/features/security/apiKeys/shared/ApiKeyProvider.js +42 -42
- package/features/security/apiKeys/shared/ApiKeyProvider.js.map +1 -1
- package/features/security/apiKeys/shared/ApiKeysRepository.js +108 -135
- package/features/security/apiKeys/shared/ApiKeysRepository.js.map +1 -1
- package/features/security/apiKeys/shared/abstractions.js +4 -6
- 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.js +6 -16
- package/features/security/apiKeys/shared/generateToken.js.map +1 -1
- 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.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.js +33 -43
- package/features/security/authentication/AuthenticationContext/SetIdTokenCookie.js.map +1 -1
- package/features/security/authentication/AuthenticationContext/abstractions.js +2 -2
- 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.js +17 -16
- package/features/security/authentication/AuthenticationContext/events.js.map +1 -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.js +2 -2
- 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.js +46 -59
- package/features/security/authorization/AuthorizationContext/AuthorizationContext.js.map +1 -1
- package/features/security/authorization/AuthorizationContext/abstractions.js +3 -4
- package/features/security/authorization/AuthorizationContext/abstractions.js.map +1 -1
- package/features/security/authorization/AuthorizationContext/feature.js +10 -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.js +2 -2
- package/features/security/authorization/Authorizer/abstractions.js.map +1 -1
- package/features/security/authorization/Authorizer/index.js +0 -2
- package/features/security/authorization/GroupsTeamsAuthorizer/GetPermissionsFromIdentity.js +60 -64
- 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.js +7 -6
- package/features/security/authorization/GroupsTeamsAuthorizer/feature.js.map +1 -1
- package/features/security/login/abstractions.js +9 -8
- package/features/security/login/abstractions.js.map +1 -1
- package/features/security/login/index.js +0 -2
- package/features/security/permissions/createPermissionSchema.js +6 -5
- package/features/security/permissions/createPermissionSchema.js.map +1 -1
- package/features/security/permissions/createPermissions.js +148 -236
- package/features/security/permissions/createPermissions.js.map +1 -1
- package/features/security/permissions/index.js +0 -2
- package/features/security/permissions/types.js +0 -3
- package/features/security/roles/CreateRole/CreateRoleUseCase.js +53 -59
- package/features/security/roles/CreateRole/CreateRoleUseCase.js.map +1 -1
- package/features/security/roles/CreateRole/abstractions.js +2 -2
- package/features/security/roles/CreateRole/abstractions.js.map +1 -1
- package/features/security/roles/CreateRole/events.js +17 -16
- package/features/security/roles/CreateRole/events.js.map +1 -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.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.js +2 -2
- package/features/security/roles/DeleteRole/abstractions.js.map +1 -1
- package/features/security/roles/DeleteRole/events.js +17 -16
- package/features/security/roles/DeleteRole/events.js.map +1 -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.js +2 -2
- package/features/security/roles/GetRole/abstractions.js.map +1 -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 +38 -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.js +2 -2
- package/features/security/roles/ListRoles/abstractions.js.map +1 -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 +43 -50
- package/features/security/roles/UpdateRole/UpdateRoleUseCase.js.map +1 -1
- package/features/security/roles/UpdateRole/abstractions.js +2 -2
- package/features/security/roles/UpdateRole/abstractions.js.map +1 -1
- package/features/security/roles/UpdateRole/events.js +17 -16
- package/features/security/roles/UpdateRole/events.js.map +1 -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.js +7 -6
- package/features/security/roles/UpdateRole/schema.js.map +1 -1
- package/features/security/roles/feature.js +14 -18
- package/features/security/roles/feature.js.map +1 -1
- package/features/security/roles/shared/RoleProvider.js +27 -21
- package/features/security/roles/shared/RoleProvider.js.map +1 -1
- package/features/security/roles/shared/RolesRepository.js +96 -113
- package/features/security/roles/shared/RolesRepository.js.map +1 -1
- package/features/security/roles/shared/abstractions.js +3 -4
- 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.js +4 -6
- package/features/security/shared/abstractions.js.map +1 -1
- package/features/security/shared/errors.js +8 -8
- package/features/security/shared/errors.js.map +1 -1
- package/features/security/shared/index.js +0 -2
- package/features/security/teams/CreateTeam/CreateTeamUseCase.js +53 -59
- package/features/security/teams/CreateTeam/CreateTeamUseCase.js.map +1 -1
- package/features/security/teams/CreateTeam/abstractions.js +2 -2
- package/features/security/teams/CreateTeam/abstractions.js.map +1 -1
- package/features/security/teams/CreateTeam/events.js +17 -16
- package/features/security/teams/CreateTeam/events.js.map +1 -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.js +0 -2
- 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.js +2 -2
- package/features/security/teams/DeleteTeam/abstractions.js.map +1 -1
- package/features/security/teams/DeleteTeam/events.js +17 -16
- package/features/security/teams/DeleteTeam/events.js.map +1 -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.js +2 -2
- package/features/security/teams/GetTeam/abstractions.js.map +1 -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.js +2 -2
- package/features/security/teams/ListTeams/abstractions.js.map +1 -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.js +46 -58
- package/features/security/teams/UpdateTeam/UpdateTeamUseCase.js.map +1 -1
- package/features/security/teams/UpdateTeam/abstractions.js +2 -2
- package/features/security/teams/UpdateTeam/abstractions.js.map +1 -1
- package/features/security/teams/UpdateTeam/events.js +17 -16
- package/features/security/teams/UpdateTeam/events.js.map +1 -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.js +5 -4
- package/features/security/teams/UpdateTeam/schema.js.map +1 -1
- package/features/security/teams/feature.js +13 -17
- package/features/security/teams/feature.js.map +1 -1
- package/features/security/teams/shared/TeamProvider.js +27 -21
- package/features/security/teams/shared/TeamProvider.js.map +1 -1
- package/features/security/teams/shared/TeamsRepository.js +100 -118
- package/features/security/teams/shared/TeamsRepository.js.map +1 -1
- package/features/security/teams/shared/abstractions.js +3 -4
- package/features/security/teams/shared/abstractions.js.map +1 -1
- package/features/security/teams/shared/decorators/TeamsRepositoryCachingDecorator.js +40 -62
- package/features/security/teams/shared/decorators/TeamsRepositoryCachingDecorator.js.map +1 -1
- package/features/security/teams/shared/errors.js +62 -70
- package/features/security/teams/shared/errors.js.map +1 -1
- 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.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.js +6 -7
- package/features/security/utils/verifyJwtUsingJwk.js.map +1 -1
- package/features/system/InstallSystem/InstallSystemUseCase.js +45 -44
- package/features/system/InstallSystem/InstallSystemUseCase.js.map +1 -1
- package/features/system/InstallSystem/abstractions.js +3 -17
- 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 +8 -5
- package/features/system/InstallSystem/events.js.map +1 -1
- package/features/system/InstallSystem/feature.js +6 -7
- package/features/system/InstallSystem/feature.js.map +1 -1
- package/features/system/InstallSystem/index.js +2 -6
- package/features/system/SystemFeature.js +6 -5
- package/features/system/SystemFeature.js.map +1 -1
- package/features/task/TaskController/abstractions.js +2 -10
- package/features/task/TaskController/abstractions.js.map +1 -1
- package/features/task/TaskController/index.js +0 -2
- package/features/task/TaskDefinition/abstractions.js +8 -40
- package/features/task/TaskDefinition/abstractions.js.map +1 -1
- package/features/task/TaskDefinition/index.js +0 -2
- package/features/task/TaskService/abstractions.js +9 -13
- 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.js +44 -41
- package/features/tenancy/CreateTenant/CreateTenantUseCase.js.map +1 -1
- package/features/tenancy/CreateTenant/abstractions.js +6 -29
- 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.js +9 -8
- package/features/tenancy/CreateTenant/feature.js.map +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.js +6 -10
- 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.js +9 -8
- package/features/tenancy/DeleteTenant/feature.js.map +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.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.js +4 -6
- package/features/tenancy/GetTenantById/abstractions.js.map +1 -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.js +95 -113
- package/features/tenancy/InstallTenant/InstallTenantUseCase.js.map +1 -1
- package/features/tenancy/InstallTenant/abstractions.js +4 -15
- 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 +8 -5
- package/features/tenancy/InstallTenant/events.js.map +1 -1
- package/features/tenancy/InstallTenant/feature.js +6 -5
- package/features/tenancy/InstallTenant/feature.js.map +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.js +8 -7
- package/features/tenancy/ListTenants/feature.js.map +1 -1
- package/features/tenancy/ListTenants/index.js +1 -3
- package/features/tenancy/TenancyFeature.js +20 -26
- package/features/tenancy/TenancyFeature.js.map +1 -1
- package/features/tenancy/TenantContext/TenantContext.js +46 -48
- package/features/tenancy/TenantContext/TenantContext.js.map +1 -1
- package/features/tenancy/TenantContext/abstractions.js +2 -2
- 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.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.js +37 -36
- package/features/tenancy/UpdateTenant/UpdateTenantUseCase.js.map +1 -1
- package/features/tenancy/UpdateTenant/abstractions.js +6 -10
- 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.js +8 -7
- package/features/tenancy/UpdateTenant/feature.js.map +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.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.js +2 -13
- package/features/users/CreateUser/abstractions.js.map +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.js +17 -18
- package/features/users/CreateUser/events.js.map +1 -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.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.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.js +17 -18
- package/features/users/DeleteUser/events.js.map +1 -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.js +60 -74
- package/features/users/ExternalIdpUserSync/ExternalIdpUserSyncHandler.js.map +1 -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.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.js +2 -11
- package/features/users/GetUser/abstractions.js.map +1 -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.js +2 -11
- package/features/users/ListUserTeams/abstractions.js.map +1 -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.js +2 -11
- package/features/users/ListUsers/abstractions.js.map +1 -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.js +2 -13
- package/features/users/UpdateUser/abstractions.js.map +1 -1
- package/features/users/UpdateUser/events.js +17 -18
- package/features/users/UpdateUser/events.js.map +1 -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.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.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.js +0 -3
- package/features/wcp/WcpContext/WcpContext.js +138 -142
- 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.js +135 -134
- package/features/wcp/WcpContext/decorators/WcpContextWithFeatureFlagsDecorator.js.map +1 -1
- package/features/wcp/WcpContext/feature.js +6 -5
- package/features/wcp/WcpContext/feature.js.map +1 -1
- package/features/wcp/WcpContext/index.js +0 -2
- 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.js +7 -6
- package/features/wcp/WcpFeature.js.map +1 -1
- 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 +14 -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/security/NotAuthorizedResponse.js +11 -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/apiKey.gql.js +38 -47
- package/graphql/security/apiKey.gql.js.map +1 -1
- package/graphql/security/base.gql.js +11 -10
- package/graphql/security/base.gql.js.map +1 -1
- package/graphql/security/identity.gql.js +87 -97
- package/graphql/security/identity.gql.js.map +1 -1
- package/graphql/security/index.js +13 -8
- package/graphql/security/index.js.map +1 -1
- package/graphql/security/role.gql.js +49 -57
- package/graphql/security/role.gql.js.map +1 -1
- package/graphql/security/team.gql.js +61 -69
- package/graphql/security/team.gql.js.map +1 -1
- package/graphql/system/createSystemGraphQL.js +31 -34
- package/graphql/system/createSystemGraphQL.js.map +1 -1
- package/graphql/users/user.gql.js +87 -105
- package/graphql/users/user.gql.js.map +1 -1
- package/graphql/wcp/graphql.js +25 -28
- package/graphql/wcp/graphql.js.map +1 -1
- package/idp/JwksCache.js +22 -28
- package/idp/JwksCache.js.map +1 -1
- package/idp/JwtAuthenticator.js +34 -46
- package/idp/JwtAuthenticator.js.map +1 -1
- package/idp/OidcJwtIdentityProvider.js +55 -82
- package/idp/OidcJwtIdentityProvider.js.map +1 -1
- package/idp/abstractions.js +5 -14
- package/idp/abstractions.js.map +1 -1
- package/idp/feature.js +8 -7
- package/idp/feature.js.map +1 -1
- package/idp/index.js +1 -3
- package/idp/types.js +0 -3
- package/index.js +0 -2
- package/legacy/security/LegacyContext.js +133 -186
- package/legacy/security/LegacyContext.js.map +1 -1
- package/legacy/security/createSecurityContext.js +5 -9
- package/legacy/security/createSecurityContext.js.map +1 -1
- package/legacy/security/plugins/apiKeyAuthentication.js +15 -24
- package/legacy/security/plugins/apiKeyAuthentication.js.map +1 -1
- package/legacy/security/plugins/apiKeyAuthorization.js +9 -18
- package/legacy/security/plugins/apiKeyAuthorization.js.map +1 -1
- package/legacy/security/plugins/authenticateUsingCookie.js +18 -22
- package/legacy/security/plugins/authenticateUsingCookie.js.map +1 -1
- package/legacy/security/plugins/authenticateUsingHttpHeader.d.ts +1 -1
- package/legacy/security/plugins/authenticateUsingHttpHeader.js +15 -18
- package/legacy/security/plugins/authenticateUsingHttpHeader.js.map +1 -1
- package/legacy/security/plugins/secureHeaders.js +28 -21
- package/legacy/security/plugins/secureHeaders.js.map +1 -1
- package/legacy/tenancy/LegacyContext.js +45 -52
- package/legacy/tenancy/LegacyContext.js.map +1 -1
- package/legacy/tenancy/createTenancyContext.js +22 -42
- package/legacy/tenancy/createTenancyContext.js.map +1 -1
- package/legacy/users/LegacyContext.js +39 -54
- package/legacy/users/LegacyContext.js.map +1 -1
- package/legacy/users/createAdminUsersContext.js +7 -7
- package/legacy/users/createAdminUsersContext.js.map +1 -1
- package/legacy/wcp/LegacyWcpContext.js +80 -79
- package/legacy/wcp/LegacyWcpContext.js.map +1 -1
- package/legacy/wcp/context.d.ts +1 -3
- package/legacy/wcp/context.js +33 -37
- package/legacy/wcp/context.js.map +1 -1
- package/models/base/BaseModel.js +51 -56
- package/models/base/BaseModel.js.map +1 -1
- package/models/base/ModelBuilder.js +65 -78
- 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.js +112 -121
- package/models/cms/FieldBuilder.js.map +1 -1
- package/models/cms/FieldBuilderRegistry.js +13 -12
- package/models/cms/FieldBuilderRegistry.js.map +1 -1
- package/models/cms/FieldDefinitionsBuilder.js +37 -54
- 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.js +3 -20
- package/models/cms/abstractions.js.map +1 -1
- 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.js +9 -8
- package/models/simple/Page/abstractions.js.map +1 -1
- package/package.json +22 -22
- package/types/core.js +0 -3
- package/types/security.js +0 -3
- package/types/tenancy.js +0 -3
- package/types/users.js +0 -3
- 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/exports/api.js.map +0 -1
- package/features/ai/index.js.map +0 -1
- package/features/buildParams/index.js.map +0 -1
- package/features/encryption/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/masker/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/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/idp/index.js.map +0 -1
- package/idp/types.js.map +0 -1
- package/index.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
|
@@ -1,187 +1,240 @@
|
|
|
1
1
|
import { createImplementation } from "@webiny/feature/api";
|
|
2
|
-
import { AiSdkFactory
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
2
|
+
import { AiSdkFactory } from "./abstractions.js";
|
|
3
|
+
const OPENAI_MODELS = [
|
|
4
|
+
{
|
|
5
|
+
id: "gpt-5",
|
|
6
|
+
name: "GPT-5"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
id: "gpt-5-2025-08-07",
|
|
10
|
+
name: "GPT-5"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "gpt-5-chat-latest",
|
|
14
|
+
name: "GPT-5"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "gpt-5-mini",
|
|
18
|
+
name: "GPT-5 Mini"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "gpt-5-mini-2025-08-07",
|
|
22
|
+
name: "GPT-5 Mini"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "gpt-5-nano",
|
|
26
|
+
name: "GPT-5 Nano"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: "gpt-5-nano-2025-08-07",
|
|
30
|
+
name: "GPT-5 Nano"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "gpt-5.1",
|
|
34
|
+
name: "GPT-5.1"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: "gpt-5.1-2025-11-13",
|
|
38
|
+
name: "GPT-5.1"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "gpt-5.1-chat-latest",
|
|
42
|
+
name: "GPT-5.1"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "gpt-5.2",
|
|
46
|
+
name: "GPT-5.2"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: "gpt-5.2-2025-12-11",
|
|
50
|
+
name: "GPT-5.2"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "gpt-5.2-chat-latest",
|
|
54
|
+
name: "GPT-5.2"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "gpt-5.2-pro",
|
|
58
|
+
name: "GPT-5.2 Pro"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "gpt-5.2-pro-2025-12-11",
|
|
62
|
+
name: "GPT-5.2 Pro"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "gpt-5.3-chat-latest",
|
|
66
|
+
name: "GPT-5.3"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: "gpt-5.4",
|
|
70
|
+
name: "GPT-5.4"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "gpt-5.4-2026-03-05",
|
|
74
|
+
name: "GPT-5.4"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "gpt-5.4-mini",
|
|
78
|
+
name: "GPT-5.4 Mini"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "gpt-5.4-mini-2026-03-17",
|
|
82
|
+
name: "GPT-5.4 Mini"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: "gpt-5.4-nano",
|
|
86
|
+
name: "GPT-5.4 Nano"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "gpt-5.4-nano-2026-03-17",
|
|
90
|
+
name: "GPT-5.4 Nano"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: "gpt-5.4-pro",
|
|
94
|
+
name: "GPT-5.4 Pro"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "gpt-5.4-pro-2026-03-05",
|
|
98
|
+
name: "GPT-5.4 Pro"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: "gpt-4.1",
|
|
102
|
+
name: "GPT-4.1"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "gpt-4.1-2025-04-14",
|
|
106
|
+
name: "GPT-4.1"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "gpt-4.1-mini",
|
|
110
|
+
name: "GPT-4.1 Mini"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "gpt-4.1-mini-2025-04-14",
|
|
114
|
+
name: "GPT-4.1 Mini"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "gpt-4.1-nano",
|
|
118
|
+
name: "GPT-4.1 Nano"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: "gpt-4.1-nano-2025-04-14",
|
|
122
|
+
name: "GPT-4.1 Nano"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "gpt-4o",
|
|
126
|
+
name: "GPT-4o"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "gpt-4o-2024-05-13",
|
|
130
|
+
name: "GPT-4o"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: "gpt-4o-2024-08-06",
|
|
134
|
+
name: "GPT-4o"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: "gpt-4o-2024-11-20",
|
|
138
|
+
name: "GPT-4o"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: "gpt-4o-audio-preview",
|
|
142
|
+
name: "GPT-4o Audio Preview"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
id: "gpt-4o-audio-preview-2024-12-17",
|
|
146
|
+
name: "GPT-4o Audio Preview"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: "gpt-4o-search-preview",
|
|
150
|
+
name: "GPT-4o Search Preview"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: "gpt-4o-search-preview-2025-03-11",
|
|
154
|
+
name: "GPT-4o Search Preview"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: "gpt-4o-mini-search-preview",
|
|
158
|
+
name: "GPT-4o Mini Search Preview"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "gpt-4o-mini-search-preview-2025-03-11",
|
|
162
|
+
name: "GPT-4o Mini Search Preview"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: "gpt-4o-mini",
|
|
166
|
+
name: "GPT-4o Mini"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: "gpt-4o-mini-2024-07-18",
|
|
170
|
+
name: "GPT-4o Mini"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: "gpt-3.5-turbo-0125",
|
|
174
|
+
name: "GPT-3.5 Turbo"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
id: "gpt-3.5-turbo",
|
|
178
|
+
name: "GPT-3.5 Turbo"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: "gpt-3.5-turbo-1106",
|
|
182
|
+
name: "GPT-3.5 Turbo"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: "o1",
|
|
186
|
+
name: "o1"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: "o1-2024-12-17",
|
|
190
|
+
name: "o1"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "o3",
|
|
194
|
+
name: "o3"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
id: "o3-2025-04-16",
|
|
198
|
+
name: "o3"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
id: "o3-mini",
|
|
202
|
+
name: "o3 Mini"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "o3-mini-2025-01-31",
|
|
206
|
+
name: "o3 Mini"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
id: "o4-mini",
|
|
210
|
+
name: "o4 Mini"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
id: "o4-mini-2025-04-16",
|
|
214
|
+
name: "o4 Mini"
|
|
215
|
+
}
|
|
216
|
+
];
|
|
165
217
|
class OpenAiSdkFactoryImpl {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
218
|
+
async execute(apiKey) {
|
|
219
|
+
const { createOpenAI } = await import("@ai-sdk/openai");
|
|
220
|
+
const provider = createOpenAI({
|
|
221
|
+
apiKey: apiKey ?? process.env.WEBINY_API_OPENAI_API_KEY
|
|
222
|
+
});
|
|
223
|
+
return {
|
|
224
|
+
languageModel: (modelId)=>provider.chat(modelId)
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
constructor(){
|
|
228
|
+
this.id = "openai";
|
|
229
|
+
this.name = "OpenAI";
|
|
230
|
+
this.models = OPENAI_MODELS;
|
|
231
|
+
}
|
|
180
232
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
233
|
+
const OpenAiSdkFactory = createImplementation({
|
|
234
|
+
abstraction: AiSdkFactory,
|
|
235
|
+
implementation: OpenAiSdkFactoryImpl,
|
|
236
|
+
dependencies: []
|
|
185
237
|
});
|
|
238
|
+
export { OpenAiSdkFactory };
|
|
186
239
|
|
|
187
240
|
//# sourceMappingURL=OpenAiSdkFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/ai/OpenAiSdkFactory.js","sources":["../../../src/features/ai/OpenAiSdkFactory.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/feature/api\";\nimport { AiSdkFactory as AiSdkFactoryAbstraction } from \"./abstractions.js\";\nimport type { IAiSdk, IAiSdkModel } from \"./abstractions.js\";\n\n// 'gpt-5' | 'gpt-5-2025-08-07' | 'gpt-5-mini' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.3-chat-latest' | 'gpt-5.4' | 'gpt-5.4-2026-03-05' | 'gpt-5.4-mini' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.4-pro' | 'gpt-5.4-pro-2026-03-05'\n\nconst OPENAI_MODELS: IAiSdkModel[] = [\n { id: \"gpt-5\", name: \"GPT-5\" },\n { id: \"gpt-5-2025-08-07\", name: \"GPT-5\" },\n { id: \"gpt-5-chat-latest\", name: \"GPT-5\" },\n { id: \"gpt-5-mini\", name: \"GPT-5 Mini\" },\n { id: \"gpt-5-mini-2025-08-07\", name: \"GPT-5 Mini\" },\n { id: \"gpt-5-nano\", name: \"GPT-5 Nano\" },\n { id: \"gpt-5-nano-2025-08-07\", name: \"GPT-5 Nano\" },\n { id: \"gpt-5.1\", name: \"GPT-5.1\" },\n { id: \"gpt-5.1-2025-11-13\", name: \"GPT-5.1\" },\n { id: \"gpt-5.1-chat-latest\", name: \"GPT-5.1\" },\n { id: \"gpt-5.2\", name: \"GPT-5.2\" },\n { id: \"gpt-5.2-2025-12-11\", name: \"GPT-5.2\" },\n { id: \"gpt-5.2-chat-latest\", name: \"GPT-5.2\" },\n { id: \"gpt-5.2-pro\", name: \"GPT-5.2 Pro\" },\n { id: \"gpt-5.2-pro-2025-12-11\", name: \"GPT-5.2 Pro\" },\n { id: \"gpt-5.3-chat-latest\", name: \"GPT-5.3\" },\n { id: \"gpt-5.4\", name: \"GPT-5.4\" },\n { id: \"gpt-5.4-2026-03-05\", name: \"GPT-5.4\" },\n { id: \"gpt-5.4-mini\", name: \"GPT-5.4 Mini\" },\n { id: \"gpt-5.4-mini-2026-03-17\", name: \"GPT-5.4 Mini\" },\n { id: \"gpt-5.4-nano\", name: \"GPT-5.4 Nano\" },\n { id: \"gpt-5.4-nano-2026-03-17\", name: \"GPT-5.4 Nano\" },\n { id: \"gpt-5.4-pro\", name: \"GPT-5.4 Pro\" },\n { id: \"gpt-5.4-pro-2026-03-05\", name: \"GPT-5.4 Pro\" },\n { id: \"gpt-4.1\", name: \"GPT-4.1\" },\n { id: \"gpt-4.1-2025-04-14\", name: \"GPT-4.1\" },\n { id: \"gpt-4.1-mini\", name: \"GPT-4.1 Mini\" },\n { id: \"gpt-4.1-mini-2025-04-14\", name: \"GPT-4.1 Mini\" },\n { id: \"gpt-4.1-nano\", name: \"GPT-4.1 Nano\" },\n { id: \"gpt-4.1-nano-2025-04-14\", name: \"GPT-4.1 Nano\" },\n { id: \"gpt-4o\", name: \"GPT-4o\" },\n { id: \"gpt-4o-2024-05-13\", name: \"GPT-4o\" },\n { id: \"gpt-4o-2024-08-06\", name: \"GPT-4o\" },\n { id: \"gpt-4o-2024-11-20\", name: \"GPT-4o\" },\n { id: \"gpt-4o-audio-preview\", name: \"GPT-4o Audio Preview\" },\n { id: \"gpt-4o-audio-preview-2024-12-17\", name: \"GPT-4o Audio Preview\" },\n { id: \"gpt-4o-search-preview\", name: \"GPT-4o Search Preview\" },\n { id: \"gpt-4o-search-preview-2025-03-11\", name: \"GPT-4o Search Preview\" },\n { id: \"gpt-4o-mini-search-preview\", name: \"GPT-4o Mini Search Preview\" },\n { id: \"gpt-4o-mini-search-preview-2025-03-11\", name: \"GPT-4o Mini Search Preview\" },\n { id: \"gpt-4o-mini\", name: \"GPT-4o Mini\" },\n { id: \"gpt-4o-mini-2024-07-18\", name: \"GPT-4o Mini\" },\n { id: \"gpt-3.5-turbo-0125\", name: \"GPT-3.5 Turbo\" },\n { id: \"gpt-3.5-turbo\", name: \"GPT-3.5 Turbo\" },\n { id: \"gpt-3.5-turbo-1106\", name: \"GPT-3.5 Turbo\" },\n { id: \"o1\", name: \"o1\" },\n { id: \"o1-2024-12-17\", name: \"o1\" },\n { id: \"o3\", name: \"o3\" },\n { id: \"o3-2025-04-16\", name: \"o3\" },\n { id: \"o3-mini\", name: \"o3 Mini\" },\n { id: \"o3-mini-2025-01-31\", name: \"o3 Mini\" },\n { id: \"o4-mini\", name: \"o4 Mini\" },\n { id: \"o4-mini-2025-04-16\", name: \"o4 Mini\" }\n];\n\nclass OpenAiSdkFactoryImpl implements AiSdkFactoryAbstraction.Interface {\n readonly id = \"openai\";\n readonly name = \"OpenAI\";\n readonly models = OPENAI_MODELS;\n\n async execute(apiKey?: string): Promise<IAiSdk> {\n const { createOpenAI } = await import(\"@ai-sdk/openai\");\n const provider = createOpenAI({\n apiKey: apiKey ?? process.env.WEBINY_API_OPENAI_API_KEY\n });\n return {\n languageModel: modelId => provider.chat(modelId)\n };\n }\n}\n\nexport const OpenAiSdkFactory = createImplementation({\n abstraction: AiSdkFactoryAbstraction,\n implementation: OpenAiSdkFactoryImpl,\n dependencies: []\n});\n"],"names":["OPENAI_MODELS","OpenAiSdkFactoryImpl","apiKey","createOpenAI","provider","process","modelId","OpenAiSdkFactory","createImplementation","AiSdkFactoryAbstraction"],"mappings":";;AAMA,MAAMA,gBAA+B;IACjC;QAAE,IAAI;QAAS,MAAM;IAAQ;IAC7B;QAAE,IAAI;QAAoB,MAAM;IAAQ;IACxC;QAAE,IAAI;QAAqB,MAAM;IAAQ;IACzC;QAAE,IAAI;QAAc,MAAM;IAAa;IACvC;QAAE,IAAI;QAAyB,MAAM;IAAa;IAClD;QAAE,IAAI;QAAc,MAAM;IAAa;IACvC;QAAE,IAAI;QAAyB,MAAM;IAAa;IAClD;QAAE,IAAI;QAAW,MAAM;IAAU;IACjC;QAAE,IAAI;QAAsB,MAAM;IAAU;IAC5C;QAAE,IAAI;QAAuB,MAAM;IAAU;IAC7C;QAAE,IAAI;QAAW,MAAM;IAAU;IACjC;QAAE,IAAI;QAAsB,MAAM;IAAU;IAC5C;QAAE,IAAI;QAAuB,MAAM;IAAU;IAC7C;QAAE,IAAI;QAAe,MAAM;IAAc;IACzC;QAAE,IAAI;QAA0B,MAAM;IAAc;IACpD;QAAE,IAAI;QAAuB,MAAM;IAAU;IAC7C;QAAE,IAAI;QAAW,MAAM;IAAU;IACjC;QAAE,IAAI;QAAsB,MAAM;IAAU;IAC5C;QAAE,IAAI;QAAgB,MAAM;IAAe;IAC3C;QAAE,IAAI;QAA2B,MAAM;IAAe;IACtD;QAAE,IAAI;QAAgB,MAAM;IAAe;IAC3C;QAAE,IAAI;QAA2B,MAAM;IAAe;IACtD;QAAE,IAAI;QAAe,MAAM;IAAc;IACzC;QAAE,IAAI;QAA0B,MAAM;IAAc;IACpD;QAAE,IAAI;QAAW,MAAM;IAAU;IACjC;QAAE,IAAI;QAAsB,MAAM;IAAU;IAC5C;QAAE,IAAI;QAAgB,MAAM;IAAe;IAC3C;QAAE,IAAI;QAA2B,MAAM;IAAe;IACtD;QAAE,IAAI;QAAgB,MAAM;IAAe;IAC3C;QAAE,IAAI;QAA2B,MAAM;IAAe;IACtD;QAAE,IAAI;QAAU,MAAM;IAAS;IAC/B;QAAE,IAAI;QAAqB,MAAM;IAAS;IAC1C;QAAE,IAAI;QAAqB,MAAM;IAAS;IAC1C;QAAE,IAAI;QAAqB,MAAM;IAAS;IAC1C;QAAE,IAAI;QAAwB,MAAM;IAAuB;IAC3D;QAAE,IAAI;QAAmC,MAAM;IAAuB;IACtE;QAAE,IAAI;QAAyB,MAAM;IAAwB;IAC7D;QAAE,IAAI;QAAoC,MAAM;IAAwB;IACxE;QAAE,IAAI;QAA8B,MAAM;IAA6B;IACvE;QAAE,IAAI;QAAyC,MAAM;IAA6B;IAClF;QAAE,IAAI;QAAe,MAAM;IAAc;IACzC;QAAE,IAAI;QAA0B,MAAM;IAAc;IACpD;QAAE,IAAI;QAAsB,MAAM;IAAgB;IAClD;QAAE,IAAI;QAAiB,MAAM;IAAgB;IAC7C;QAAE,IAAI;QAAsB,MAAM;IAAgB;IAClD;QAAE,IAAI;QAAM,MAAM;IAAK;IACvB;QAAE,IAAI;QAAiB,MAAM;IAAK;IAClC;QAAE,IAAI;QAAM,MAAM;IAAK;IACvB;QAAE,IAAI;QAAiB,MAAM;IAAK;IAClC;QAAE,IAAI;QAAW,MAAM;IAAU;IACjC;QAAE,IAAI;QAAsB,MAAM;IAAU;IAC5C;QAAE,IAAI;QAAW,MAAM;IAAU;IACjC;QAAE,IAAI;QAAsB,MAAM;IAAU;CAC/C;AAED,MAAMC;IAKF,MAAM,QAAQC,MAAe,EAAmB;QAC5C,MAAM,EAAEC,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC;QACtC,MAAMC,WAAWD,aAAa;YAC1B,QAAQD,UAAUG,QAAQ,GAAG,CAAC,yBAAyB;QAC3D;QACA,OAAO;YACH,eAAeC,CAAAA,UAAWF,SAAS,IAAI,CAACE;QAC5C;IACJ;;aAZS,EAAE,GAAG;aACL,IAAI,GAAG;aACP,MAAM,GAAGN;;AAWtB;AAEO,MAAMO,mBAAmBC,qBAAqB;IACjD,aAAaC;IACb,gBAAgBR;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
import { createAbstraction } from "@webiny/feature/api";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** Factory that asynchronously initialises an AI SDK. Register one per provider namespace. */
|
|
11
|
-
export const AiSdkFactory = createAbstraction("AiSdkFactory");
|
|
12
|
-
|
|
13
|
-
// AiConnection
|
|
14
|
-
|
|
15
|
-
// AiConnectionFactory
|
|
16
|
-
|
|
17
|
-
/** Factory that asynchronously produces an AiConnection. */
|
|
18
|
-
export const AiConnectionFactory = createAbstraction("AiConnectionFactory");
|
|
19
|
-
|
|
20
|
-
// Ai
|
|
21
|
-
|
|
22
|
-
/** Interact with AI language models using registered providers. */
|
|
23
|
-
export const Ai = createAbstraction("Ai");
|
|
24
|
-
|
|
25
|
-
// AiSdkTool
|
|
26
|
-
|
|
27
|
-
/** A single tool that can be provided to AI generateText/streamText calls. */
|
|
28
|
-
export const AiSdkTool = createAbstraction("AiSdkTool");
|
|
29
|
-
|
|
30
|
-
// AiSdkTools
|
|
31
|
-
|
|
32
|
-
/** Collection of AI SDK tools. Returns a ready-to-use ToolSet for generateText/streamText. */
|
|
33
|
-
export const AiSdkTools = createAbstraction("AiSdkTools");
|
|
2
|
+
const AiSdk = createAbstraction("AiSdk");
|
|
3
|
+
const AiSdkFactory = createAbstraction("AiSdkFactory");
|
|
4
|
+
const AiConnectionFactory = createAbstraction("AiConnectionFactory");
|
|
5
|
+
const Ai = createAbstraction("Ai");
|
|
6
|
+
const AiSdkTool = createAbstraction("AiSdkTool");
|
|
7
|
+
const AiSdkTools = createAbstraction("AiSdkTools");
|
|
8
|
+
export { Ai, AiConnectionFactory, AiSdk, AiSdkFactory, AiSdkTool, AiSdkTools };
|
|
34
9
|
|
|
35
10
|
//# sourceMappingURL=abstractions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/ai/abstractions.js","sources":["../../../src/features/ai/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { generateText } from \"ai\";\nimport type { streamText } from \"ai\";\nimport type { LanguageModel } from \"ai\";\nimport type { FlexibleSchema, ToolSet } from \"ai\";\n\n// AiSdk\n\nexport interface IAiSdkModel {\n id: string; // raw model id, e.g. \"claude-sonnet-4-5\"\n name: string; // human-friendly name, e.g. \"Claude Sonnet 4.5\"\n}\n\nexport interface IAiSdk {\n languageModel(modelId: string): LanguageModel;\n}\n\n/** A single AI SDK instance (e.g. OpenAI, Anthropic) that resolves model instances. */\nexport const AiSdk = createAbstraction<IAiSdk>(\"AiSdk\");\n\nexport namespace AiSdk {\n export type Interface = IAiSdk;\n}\n\n// AiSdkFactory\n\nexport interface IAiSdkFactory {\n readonly id: string; // machine id, e.g. \"anthropic\"\n readonly name: string; // human-friendly name, e.g. \"Anthropic\"\n readonly models: readonly IAiSdkModel[]; // static model list, no API call needed\n execute(apiKey?: string): Promise<IAiSdk>;\n}\n\n/** Factory that asynchronously initialises an AI SDK. Register one per provider namespace. */\nexport const AiSdkFactory = createAbstraction<IAiSdkFactory>(\"AiSdkFactory\");\n\nexport namespace AiSdkFactory {\n export type Interface = IAiSdkFactory;\n}\n\n// AiConnection\n\nexport interface IAiConnectionInline {\n readonly sdkName: string;\n readonly apiKey?: string;\n}\n\nexport interface IAiConnection extends IAiConnectionInline {\n readonly id: string;\n}\n\n// AiConnectionFactory\n\nexport interface IAiConnectionFactory {\n execute(): Promise<IAiConnection>;\n}\n\n/** Factory that asynchronously produces an AiConnection. */\nexport const AiConnectionFactory = createAbstraction<IAiConnectionFactory>(\"AiConnectionFactory\");\n\nexport namespace AiConnectionFactory {\n export type Interface = IAiConnectionFactory;\n}\n\n// Ai\n\ntype SDKGenerateTextParams = Parameters<typeof generateText>[0];\ntype SDKStreamTextParams = Parameters<typeof streamText>[0];\n\nexport type AiGenerateTextParams = Omit<SDKGenerateTextParams, \"model\"> & {\n model: string;\n connection?: string | IAiConnectionInline;\n};\nexport type AiStreamTextParams = Omit<SDKStreamTextParams, \"model\"> & {\n model: string;\n connection?: string | IAiConnectionInline;\n};\n\nexport interface AiModel {\n providerId: string; // e.g. \"anthropic\"\n providerName: string; // e.g. \"Anthropic\"\n modelId: string; // e.g. \"claude-sonnet-4-5\"\n modelName: string; // e.g. \"Claude Sonnet 4.5\"\n}\n\nexport interface IAi {\n generateText(params: AiGenerateTextParams): ReturnType<typeof generateText>;\n streamText(params: AiStreamTextParams): Promise<ReturnType<typeof streamText>>;\n listModels(): Promise<AiModel[]>;\n listModelsByConnections(): Promise<AiModel[]>;\n listModelsByConnection(connection: string | IAiConnectionInline): Promise<AiModel[]>;\n}\n\n/** Interact with AI language models using registered providers. */\nexport const Ai = createAbstraction<IAi>(\"Ai\");\n\nexport namespace Ai {\n export type Interface = IAi;\n export type GenerateTextParams = AiGenerateTextParams;\n export type StreamTextParams = AiStreamTextParams;\n}\n\n// AiSdkTool\n\nexport interface IAiSdkTool<TInput = any> {\n readonly name: string;\n readonly description: string;\n readonly inputSchema: FlexibleSchema<TInput>;\n execute(input: TInput): Promise<unknown>;\n}\n\n/** A single tool that can be provided to AI generateText/streamText calls. */\nexport const AiSdkTool = createAbstraction<IAiSdkTool>(\"AiSdkTool\");\n\nexport namespace AiSdkTool {\n export type Interface = IAiSdkTool;\n}\n\n// AiSdkTools\n\nexport interface IAiSdkTools {\n getToolSet(): ToolSet;\n}\n\n/** Collection of AI SDK tools. Returns a ready-to-use ToolSet for generateText/streamText. */\nexport const AiSdkTools = createAbstraction<IAiSdkTools>(\"AiSdkTools\");\n\nexport namespace AiSdkTools {\n export type Interface = IAiSdkTools;\n}\n"],"names":["AiSdk","createAbstraction","AiSdkFactory","AiConnectionFactory","Ai","AiSdkTool","AiSdkTools"],"mappings":";AAkBO,MAAMA,QAAQC,kBAA0B;AAgBxC,MAAMC,eAAeD,kBAAiC;AAwBtD,MAAME,sBAAsBF,kBAAwC;AAoCpE,MAAMG,KAAKH,kBAAuB;AAkBlC,MAAMI,YAAYJ,kBAA8B;AAahD,MAAMK,aAAaL,kBAA+B"}
|
package/features/ai/feature.js
CHANGED
|
@@ -3,14 +3,15 @@ import { OpenAiSdkFactory } from "./OpenAiSdkFactory.js";
|
|
|
3
3
|
import { AnthropicSdkFactory } from "./AnthropicSdkFactory.js";
|
|
4
4
|
import { Ai } from "./Ai.js";
|
|
5
5
|
import { AiSdkTools } from "./AiSdkTools.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
const AiFeature = createFeature({
|
|
7
|
+
name: "AiFeature",
|
|
8
|
+
register (container) {
|
|
9
|
+
container.register(OpenAiSdkFactory);
|
|
10
|
+
container.register(AnthropicSdkFactory);
|
|
11
|
+
container.register(Ai);
|
|
12
|
+
container.register(AiSdkTools);
|
|
13
|
+
}
|
|
14
14
|
});
|
|
15
|
+
export { AiFeature };
|
|
15
16
|
|
|
16
17
|
//# sourceMappingURL=feature.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/ai/feature.js","sources":["../../../src/features/ai/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { OpenAiSdkFactory } from \"./OpenAiSdkFactory.js\";\nimport { AnthropicSdkFactory } from \"./AnthropicSdkFactory.js\";\nimport { Ai } from \"./Ai.js\";\nimport { AiSdkTools } from \"./AiSdkTools.js\";\n\nexport const AiFeature = createFeature({\n name: \"AiFeature\",\n register(container) {\n container.register(OpenAiSdkFactory);\n container.register(AnthropicSdkFactory);\n container.register(Ai);\n container.register(AiSdkTools);\n }\n});\n"],"names":["AiFeature","createFeature","container","OpenAiSdkFactory","AnthropicSdkFactory","Ai","AiSdkTools"],"mappings":";;;;;AAMO,MAAMA,YAAYC,cAAc;IACnC,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE;QACnBF,UAAU,QAAQ,CAACG;QACnBH,UAAU,QAAQ,CAACI;IACvB;AACJ"}
|
package/features/ai/index.js
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Ai, AiConnectionFactory, AiSdk, AiSdkFactory, AiSdkTool, AiSdkTools } from "./abstractions.js";
|
|
2
2
|
export { AiFeature } from "./feature.js";
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import { BuildParam, BuildParams
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { BuildParam, BuildParams } from "./abstractions.js";
|
|
2
|
+
class BuildParamsImpl {
|
|
3
|
+
constructor(params){
|
|
4
|
+
this.params = params;
|
|
5
|
+
}
|
|
6
|
+
get(key) {
|
|
7
|
+
const param = this.params.find((p)=>p.key === key);
|
|
8
|
+
return param ? param.value : null;
|
|
9
|
+
}
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const BuildParams_BuildParams = BuildParams.createImplementation({
|
|
12
|
+
implementation: BuildParamsImpl,
|
|
13
|
+
dependencies: [
|
|
14
|
+
[
|
|
15
|
+
BuildParam,
|
|
16
|
+
{
|
|
17
|
+
multiple: true
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
]
|
|
16
21
|
});
|
|
22
|
+
export { BuildParamsImpl, BuildParams_BuildParams as BuildParams };
|
|
17
23
|
|
|
18
24
|
//# sourceMappingURL=BuildParams.js.map
|