@webiny/api-audit-logs 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.eb81deee7e
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/AuditLogsFeature.d.ts +8 -0
- package/AuditLogsFeature.js +32 -0
- package/AuditLogsFeature.js.map +1 -0
- package/README.md +11 -1
- package/abstractions.d.ts +15 -0
- package/abstractions.js +6 -0
- package/abstractions.js.map +1 -0
- package/config.d.ts +0 -13
- package/config.js +4 -291
- package/config.js.map +1 -1
- package/domain/errors.d.ts +5 -0
- package/domain/errors.js +11 -0
- package/domain/errors.js.map +1 -0
- package/events/AuditLogAfterCreateEvent.d.ts +6 -0
- package/events/AuditLogAfterCreateEvent.js +13 -0
- package/events/AuditLogAfterCreateEvent.js.map +1 -0
- package/events/AuditLogAfterUpdateEvent.d.ts +6 -0
- package/events/AuditLogAfterUpdateEvent.js +13 -0
- package/events/AuditLogAfterUpdateEvent.js.map +1 -0
- package/events/AuditLogBeforeCreateEvent.d.ts +6 -0
- package/events/AuditLogBeforeCreateEvent.js +13 -0
- package/events/AuditLogBeforeCreateEvent.js.map +1 -0
- package/events/AuditLogBeforeUpdateEvent.d.ts +6 -0
- package/events/AuditLogBeforeUpdateEvent.js +13 -0
- package/events/AuditLogBeforeUpdateEvent.js.map +1 -0
- package/events/abstractions.d.ts +38 -0
- package/events/abstractions.js +8 -0
- package/events/abstractions.js.map +1 -0
- package/events/index.d.ts +5 -0
- package/events/index.js +5 -0
- package/features/AuditLogPermissions/AuditLogPermissions.d.ts +15 -0
- package/features/AuditLogPermissions/AuditLogPermissions.js +24 -0
- package/features/AuditLogPermissions/AuditLogPermissions.js.map +1 -0
- package/features/AuditLogPermissions/abstractions.d.ts +11 -0
- package/features/AuditLogPermissions/abstractions.js +5 -0
- package/features/AuditLogPermissions/abstractions.js.map +1 -0
- package/features/AuditLogPermissions/feature.d.ts +4 -0
- package/features/AuditLogPermissions/feature.js +11 -0
- package/features/AuditLogPermissions/feature.js.map +1 -0
- package/features/CreateAuditLog/CreateAuditLogGateway.d.ts +12 -0
- package/features/CreateAuditLog/CreateAuditLogGateway.js +23 -0
- package/features/CreateAuditLog/CreateAuditLogGateway.js.map +1 -0
- package/features/CreateAuditLog/CreateAuditLogRepository.d.ts +14 -0
- package/features/CreateAuditLog/CreateAuditLogRepository.js +25 -0
- package/features/CreateAuditLog/CreateAuditLogRepository.js.map +1 -0
- package/features/CreateAuditLog/CreateAuditLogUseCase.d.ts +24 -0
- package/features/CreateAuditLog/CreateAuditLogUseCase.js +70 -0
- package/features/CreateAuditLog/CreateAuditLogUseCase.js.map +1 -0
- package/features/CreateAuditLog/abstractions.d.ts +42 -0
- package/features/CreateAuditLog/abstractions.js +7 -0
- package/features/CreateAuditLog/abstractions.js.map +1 -0
- package/features/CreateAuditLog/feature.d.ts +4 -0
- package/features/CreateAuditLog/feature.js +15 -0
- package/features/CreateAuditLog/feature.js.map +1 -0
- package/features/GetAuditLog/GetAuditLogGateway.d.ts +13 -0
- package/features/GetAuditLog/GetAuditLogGateway.js +21 -0
- package/features/GetAuditLog/GetAuditLogGateway.js.map +1 -0
- package/features/GetAuditLog/GetAuditLogRepository.d.ts +16 -0
- package/features/GetAuditLog/GetAuditLogRepository.js +32 -0
- package/features/GetAuditLog/GetAuditLogRepository.js.map +1 -0
- package/features/GetAuditLog/GetAuditLogUseCase.d.ts +15 -0
- package/features/GetAuditLog/GetAuditLogUseCase.js +29 -0
- package/features/GetAuditLog/GetAuditLogUseCase.js.map +1 -0
- package/features/GetAuditLog/abstractions.d.ts +42 -0
- package/features/GetAuditLog/abstractions.js +7 -0
- package/features/GetAuditLog/abstractions.js.map +1 -0
- package/features/GetAuditLog/feature.d.ts +4 -0
- package/features/GetAuditLog/feature.js +15 -0
- package/features/GetAuditLog/feature.js.map +1 -0
- package/features/ListAuditLogs/ListAuditLogsGateway.d.ts +12 -0
- package/features/ListAuditLogs/ListAuditLogsGateway.js +24 -0
- package/features/ListAuditLogs/ListAuditLogsGateway.js.map +1 -0
- package/features/ListAuditLogs/ListAuditLogsRepository.d.ts +17 -0
- package/features/ListAuditLogs/ListAuditLogsRepository.js +38 -0
- package/features/ListAuditLogs/ListAuditLogsRepository.js.map +1 -0
- package/features/ListAuditLogs/ListAuditLogsUseCase.d.ts +15 -0
- package/features/ListAuditLogs/ListAuditLogsUseCase.js +27 -0
- package/features/ListAuditLogs/ListAuditLogsUseCase.js.map +1 -0
- package/features/ListAuditLogs/abstractions.d.ts +55 -0
- package/features/ListAuditLogs/abstractions.js +7 -0
- package/features/ListAuditLogs/abstractions.js.map +1 -0
- package/features/ListAuditLogs/feature.d.ts +4 -0
- package/features/ListAuditLogs/feature.js +15 -0
- package/features/ListAuditLogs/feature.js.map +1 -0
- package/features/RecordAuditLog/RecordAuditLogUseCase.d.ts +30 -0
- package/features/RecordAuditLog/RecordAuditLogUseCase.js +108 -0
- package/features/RecordAuditLog/RecordAuditLogUseCase.js.map +1 -0
- package/features/RecordAuditLog/abstractions.d.ts +26 -0
- package/features/RecordAuditLog/abstractions.js +5 -0
- package/features/RecordAuditLog/abstractions.js.map +1 -0
- package/features/RecordAuditLog/feature.d.ts +4 -0
- package/features/RecordAuditLog/feature.js +11 -0
- package/features/RecordAuditLog/feature.js.map +1 -0
- package/features/UpdateAuditLog/UpdateAuditLogGateway.d.ts +12 -0
- package/features/UpdateAuditLog/UpdateAuditLogGateway.js +23 -0
- package/features/UpdateAuditLog/UpdateAuditLogGateway.js.map +1 -0
- package/features/UpdateAuditLog/UpdateAuditLogRepository.d.ts +14 -0
- package/features/UpdateAuditLog/UpdateAuditLogRepository.js +25 -0
- package/features/UpdateAuditLog/UpdateAuditLogRepository.js.map +1 -0
- package/features/UpdateAuditLog/UpdateAuditLogUseCase.d.ts +18 -0
- package/features/UpdateAuditLog/UpdateAuditLogUseCase.js +53 -0
- package/features/UpdateAuditLog/UpdateAuditLogUseCase.js.map +1 -0
- package/features/UpdateAuditLog/abstractions.d.ts +42 -0
- package/features/UpdateAuditLog/abstractions.js +7 -0
- package/features/UpdateAuditLog/abstractions.js.map +1 -0
- package/features/UpdateAuditLog/feature.d.ts +4 -0
- package/features/UpdateAuditLog/feature.js +15 -0
- package/features/UpdateAuditLog/feature.js.map +1 -0
- package/graphql/AuditLogsGraphQLSchema.d.ts +10 -0
- package/graphql/AuditLogsGraphQLSchema.js +139 -0
- package/graphql/AuditLogsGraphQLSchema.js.map +1 -0
- package/graphql/validation.d.ts +21 -0
- package/graphql/validation.js +31 -0
- package/graphql/validation.js.map +1 -0
- package/index.d.ts +3 -5
- package/index.js +2 -49
- package/package.json +34 -26
- package/storage/abstractions/Storage.d.ts +108 -0
- package/storage/abstractions/Storage.js +0 -0
- package/storage/types.d.ts +19 -0
- package/storage/types.js +0 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterCreateHandler.d.ts +11 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterCreateHandler.js +45 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterCreateHandler.js.map +1 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterDeleteHandler.d.ts +11 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterDeleteHandler.js +53 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterDeleteHandler.js.map +1 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterUpdateHandler.d.ts +11 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterUpdateHandler.js +51 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterUpdateHandler.js.map +1 -0
- package/subscriptions/aco/index.d.ts +2 -2
- package/subscriptions/aco/index.js +8 -15
- package/subscriptions/aco/index.js.map +1 -1
- package/subscriptions/ai/handlers/AuditLogAiAfterGenerateTextHandler.d.ts +11 -0
- package/subscriptions/ai/handlers/AuditLogAiAfterGenerateTextHandler.js +45 -0
- package/subscriptions/ai/handlers/AuditLogAiAfterGenerateTextHandler.js.map +1 -0
- package/subscriptions/ai/handlers/AuditLogAiBeforeGenerateTextHandler.d.ts +11 -0
- package/subscriptions/ai/handlers/AuditLogAiBeforeGenerateTextHandler.js +42 -0
- package/subscriptions/ai/handlers/AuditLogAiBeforeGenerateTextHandler.js.map +1 -0
- package/subscriptions/ai/handlers/AuditLogAiGenerateTextErrorHandler.d.ts +11 -0
- package/subscriptions/ai/handlers/AuditLogAiGenerateTextErrorHandler.js +44 -0
- package/subscriptions/ai/handlers/AuditLogAiGenerateTextErrorHandler.js.map +1 -0
- package/subscriptions/ai/index.d.ts +2 -0
- package/subscriptions/ai/index.js +11 -0
- package/subscriptions/ai/index.js.map +1 -0
- package/subscriptions/fileManager/handlers/AuditLogFileAfterCreateHandler.d.ts +11 -0
- package/subscriptions/fileManager/handlers/AuditLogFileAfterCreateHandler.js +35 -0
- package/subscriptions/fileManager/handlers/AuditLogFileAfterCreateHandler.js.map +1 -0
- package/subscriptions/fileManager/handlers/AuditLogFileAfterDeleteHandler.d.ts +11 -0
- package/subscriptions/fileManager/handlers/AuditLogFileAfterDeleteHandler.js +35 -0
- package/subscriptions/fileManager/handlers/AuditLogFileAfterDeleteHandler.js.map +1 -0
- package/subscriptions/fileManager/handlers/AuditLogFileAfterUpdateHandler.d.ts +11 -0
- package/subscriptions/fileManager/handlers/AuditLogFileAfterUpdateHandler.js +38 -0
- package/subscriptions/fileManager/handlers/AuditLogFileAfterUpdateHandler.js.map +1 -0
- package/subscriptions/fileManager/handlers/AuditLogSettingsAfterUpdateHandler.d.ts +11 -0
- package/subscriptions/fileManager/handlers/AuditLogSettingsAfterUpdateHandler.js +38 -0
- package/subscriptions/fileManager/handlers/AuditLogSettingsAfterUpdateHandler.js.map +1 -0
- package/subscriptions/fileManager/index.d.ts +2 -2
- package/subscriptions/fileManager/index.js +10 -14
- package/subscriptions/fileManager/index.js.map +1 -1
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterCreateEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterCreateEventHandler.js +36 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterCreateEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterDeleteEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterDeleteEventHandler.js +46 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterDeleteEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterPublishEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterPublishEventHandler.js +36 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterPublishEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterRestoreFromBinEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterRestoreFromBinEventHandler.js +36 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterRestoreFromBinEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterUnpublishEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterUnpublishEventHandler.js +36 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterUnpublishEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterUpdateEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterUpdateEventHandler.js +39 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryAfterUpdateEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryRevisionAfterCreateEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryRevisionAfterCreateEventHandler.js +36 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryRevisionAfterCreateEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryRevisionAfterDeleteEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryRevisionAfterDeleteEventHandler.js +36 -0
- package/subscriptions/headlessCms/handlers/AuditLogEntryRevisionAfterDeleteEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogGroupAfterCreateEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogGroupAfterCreateEventHandler.js +35 -0
- package/subscriptions/headlessCms/handlers/AuditLogGroupAfterCreateEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogGroupAfterDeleteEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogGroupAfterDeleteEventHandler.js +35 -0
- package/subscriptions/headlessCms/handlers/AuditLogGroupAfterDeleteEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogGroupAfterUpdateEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogGroupAfterUpdateEventHandler.js +38 -0
- package/subscriptions/headlessCms/handlers/AuditLogGroupAfterUpdateEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterCreateEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterCreateEventHandler.js +35 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterCreateEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterDeleteEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterDeleteEventHandler.js +35 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterDeleteEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterUpdateEventHandler.d.ts +11 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterUpdateEventHandler.js +38 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterUpdateEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/index.d.ts +2 -2
- package/subscriptions/headlessCms/index.js +30 -28
- package/subscriptions/headlessCms/index.js.map +1 -1
- package/subscriptions/index.d.ts +2 -2
- package/subscriptions/index.js +16 -22
- package/subscriptions/index.js.map +1 -1
- package/subscriptions/mailer/handlers/AuditLogMailerSettingsAfterSaveHandler.d.ts +11 -0
- package/subscriptions/mailer/handlers/AuditLogMailerSettingsAfterSaveHandler.js +37 -0
- package/subscriptions/mailer/handlers/AuditLogMailerSettingsAfterSaveHandler.js.map +1 -0
- package/subscriptions/mailer/index.d.ts +2 -2
- package/subscriptions/mailer/index.js +4 -10
- package/subscriptions/mailer/index.js.map +1 -1
- package/subscriptions/security/handlers/AuditLogApiKeyAfterCreateHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogApiKeyAfterCreateHandler.js +45 -0
- package/subscriptions/security/handlers/AuditLogApiKeyAfterCreateHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogApiKeyAfterDeleteHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogApiKeyAfterDeleteHandler.js +45 -0
- package/subscriptions/security/handlers/AuditLogApiKeyAfterDeleteHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogApiKeyAfterUpdateHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogApiKeyAfterUpdateHandler.js +49 -0
- package/subscriptions/security/handlers/AuditLogApiKeyAfterUpdateHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogRoleAfterCreateHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogRoleAfterCreateHandler.js +35 -0
- package/subscriptions/security/handlers/AuditLogRoleAfterCreateHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogRoleAfterDeleteHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogRoleAfterDeleteHandler.js +35 -0
- package/subscriptions/security/handlers/AuditLogRoleAfterDeleteHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogRoleAfterUpdateHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogRoleAfterUpdateHandler.js +38 -0
- package/subscriptions/security/handlers/AuditLogRoleAfterUpdateHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogTeamAfterCreateHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogTeamAfterCreateHandler.js +35 -0
- package/subscriptions/security/handlers/AuditLogTeamAfterCreateHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogTeamAfterDeleteHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogTeamAfterDeleteHandler.js +35 -0
- package/subscriptions/security/handlers/AuditLogTeamAfterDeleteHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogTeamAfterUpdateHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogTeamAfterUpdateHandler.js +38 -0
- package/subscriptions/security/handlers/AuditLogTeamAfterUpdateHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogUserAfterCreateHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogUserAfterCreateHandler.js +35 -0
- package/subscriptions/security/handlers/AuditLogUserAfterCreateHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogUserAfterDeleteHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogUserAfterDeleteHandler.js +35 -0
- package/subscriptions/security/handlers/AuditLogUserAfterDeleteHandler.js.map +1 -0
- package/subscriptions/security/handlers/AuditLogUserAfterUpdateHandler.d.ts +11 -0
- package/subscriptions/security/handlers/AuditLogUserAfterUpdateHandler.js +38 -0
- package/subscriptions/security/handlers/AuditLogUserAfterUpdateHandler.js.map +1 -0
- package/subscriptions/security/handlers/cleanupApiKey.d.ts +7 -0
- package/subscriptions/security/handlers/cleanupApiKey.js +12 -0
- package/subscriptions/security/handlers/cleanupApiKey.js.map +1 -0
- package/subscriptions/security/index.d.ts +2 -2
- package/subscriptions/security/index.js +26 -24
- package/subscriptions/security/index.js.map +1 -1
- package/subscriptions/websiteBuilder/index.d.ts +2 -0
- package/subscriptions/websiteBuilder/index.js +29 -0
- package/subscriptions/websiteBuilder/index.js.map +1 -0
- package/subscriptions/websiteBuilder/pages/PageAfterCreateHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/pages/PageAfterCreateHandler.js +35 -0
- package/subscriptions/websiteBuilder/pages/PageAfterCreateHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/pages/PageAfterCreateRevisionFromHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/pages/PageAfterCreateRevisionFromHandler.js +35 -0
- package/subscriptions/websiteBuilder/pages/PageAfterCreateRevisionFromHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/pages/PageAfterDeleteHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/pages/PageAfterDeleteHandler.js +35 -0
- package/subscriptions/websiteBuilder/pages/PageAfterDeleteHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/pages/PageAfterDuplicateHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/pages/PageAfterDuplicateHandler.js +38 -0
- package/subscriptions/websiteBuilder/pages/PageAfterDuplicateHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/pages/PageAfterMoveHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/pages/PageAfterMoveHandler.js +35 -0
- package/subscriptions/websiteBuilder/pages/PageAfterMoveHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/pages/PageAfterPublishHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/pages/PageAfterPublishHandler.js +35 -0
- package/subscriptions/websiteBuilder/pages/PageAfterPublishHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/pages/PageAfterUnpublishHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/pages/PageAfterUnpublishHandler.js +35 -0
- package/subscriptions/websiteBuilder/pages/PageAfterUnpublishHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/pages/PageAfterUpdateHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/pages/PageAfterUpdateHandler.js +38 -0
- package/subscriptions/websiteBuilder/pages/PageAfterUpdateHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterCreateHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterCreateHandler.js +35 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterCreateHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterDeleteHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterDeleteHandler.js +35 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterDeleteHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterMoveHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterMoveHandler.js +35 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterMoveHandler.js.map +1 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterUpdateHandler.d.ts +11 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterUpdateHandler.js +38 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterUpdateHandler.js.map +1 -0
- package/types.d.ts +14 -38
- package/types.js +0 -18
- package/utils/expiresAt.d.ts +4 -0
- package/utils/expiresAt.js +20 -0
- package/utils/expiresAt.js.map +1 -0
- package/utils/getAuditObject.d.ts +2 -1
- package/utils/getAuditObject.js +14 -22
- package/utils/getAuditObject.js.map +1 -1
- package/app/app.d.ts +0 -2
- package/app/app.js +0 -119
- package/app/app.js.map +0 -1
- package/app/contants.d.ts +0 -2
- package/app/contants.js +0 -10
- package/app/contants.js.map +0 -1
- package/app/createAppModifier.d.ts +0 -4
- package/app/createAppModifier.js +0 -14
- package/app/createAppModifier.js.map +0 -1
- package/app/index.d.ts +0 -4
- package/app/index.js +0 -43
- package/app/index.js.map +0 -1
- package/app/types.d.ts +0 -7
- package/app/types.js +0 -7
- package/app/types.js.map +0 -1
- package/index.js.map +0 -1
- package/subscriptions/aco/folders.d.ts +0 -4
- package/subscriptions/aco/folders.js +0 -94
- package/subscriptions/aco/folders.js.map +0 -1
- package/subscriptions/apw/changeRequests.d.ts +0 -4
- package/subscriptions/apw/changeRequests.js +0 -80
- package/subscriptions/apw/changeRequests.js.map +0 -1
- package/subscriptions/apw/comments.d.ts +0 -2
- package/subscriptions/apw/comments.js +0 -28
- package/subscriptions/apw/comments.js.map +0 -1
- package/subscriptions/apw/contentReviews.d.ts +0 -2
- package/subscriptions/apw/contentReviews.js +0 -28
- package/subscriptions/apw/contentReviews.js.map +0 -1
- package/subscriptions/apw/index.d.ts +0 -2
- package/subscriptions/apw/index.js +0 -26
- package/subscriptions/apw/index.js.map +0 -1
- package/subscriptions/apw/workflows.d.ts +0 -4
- package/subscriptions/apw/workflows.js +0 -64
- package/subscriptions/apw/workflows.js.map +0 -1
- package/subscriptions/fileManager/files.d.ts +0 -4
- package/subscriptions/fileManager/files.js +0 -64
- package/subscriptions/fileManager/files.js.map +0 -1
- package/subscriptions/fileManager/settings.d.ts +0 -2
- package/subscriptions/fileManager/settings.js +0 -32
- package/subscriptions/fileManager/settings.js.map +0 -1
- package/subscriptions/headlessCms/entries.d.ts +0 -9
- package/subscriptions/headlessCms/entries.js +0 -183
- package/subscriptions/headlessCms/entries.js.map +0 -1
- package/subscriptions/headlessCms/groups.d.ts +0 -4
- package/subscriptions/headlessCms/groups.js +0 -64
- package/subscriptions/headlessCms/groups.js.map +0 -1
- package/subscriptions/headlessCms/models.d.ts +0 -4
- package/subscriptions/headlessCms/models.js +0 -64
- package/subscriptions/headlessCms/models.js.map +0 -1
- package/subscriptions/headlessCms/utils/isSearchModelEntry.d.ts +0 -1
- package/subscriptions/headlessCms/utils/isSearchModelEntry.js +0 -13
- package/subscriptions/headlessCms/utils/isSearchModelEntry.js.map +0 -1
- package/subscriptions/i18n/index.d.ts +0 -2
- package/subscriptions/i18n/index.js +0 -15
- package/subscriptions/i18n/index.js.map +0 -1
- package/subscriptions/i18n/locales.d.ts +0 -4
- package/subscriptions/i18n/locales.js +0 -64
- package/subscriptions/i18n/locales.js.map +0 -1
- package/subscriptions/mailer/settings.d.ts +0 -2
- package/subscriptions/mailer/settings.js +0 -32
- package/subscriptions/mailer/settings.js.map +0 -1
- package/subscriptions/security/apiKeys.d.ts +0 -4
- package/subscriptions/security/apiKeys.js +0 -85
- package/subscriptions/security/apiKeys.js.map +0 -1
- package/subscriptions/security/roles.d.ts +0 -4
- package/subscriptions/security/roles.js +0 -64
- package/subscriptions/security/roles.js.map +0 -1
- package/subscriptions/security/teams.d.ts +0 -4
- package/subscriptions/security/teams.js +0 -64
- package/subscriptions/security/teams.js.map +0 -1
- package/subscriptions/security/users.d.ts +0 -4
- package/subscriptions/security/users.js +0 -64
- package/subscriptions/security/users.js.map +0 -1
- package/types.js.map +0 -1
- package/utils/getAuditConfig.d.ts +0 -36
- package/utils/getAuditConfig.js +0 -149
- package/utils/getAuditConfig.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/UpdateAuditLog/UpdateAuditLogRepository.js","sources":["../../../src/features/UpdateAuditLog/UpdateAuditLogRepository.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { AuditLogPersistenceError } from \"~/domain/errors.js\";\nimport type { IAuditLog } from \"~/storage/types.js\";\nimport { UpdateAuditLogRepository as Abstraction } from \"./abstractions.js\";\nimport { UpdateAuditLogGateway } from \"./abstractions.js\";\n\nclass UpdateAuditLogRepositoryImpl implements Abstraction.Interface {\n public constructor(private readonly gateway: UpdateAuditLogGateway.Interface) {}\n\n public async update(auditLog: IAuditLog): Promise<Result<IAuditLog, AuditLogPersistenceError>> {\n try {\n const updated = await this.gateway.update(auditLog);\n return Result.ok(updated);\n } catch (error) {\n return Result.fail(new AuditLogPersistenceError(error as Error));\n }\n }\n}\n\nexport const UpdateAuditLogRepository = Abstraction.createImplementation({\n implementation: UpdateAuditLogRepositoryImpl,\n dependencies: [UpdateAuditLogGateway]\n});\n"],"names":["UpdateAuditLogRepositoryImpl","gateway","auditLog","updated","Result","error","AuditLogPersistenceError","UpdateAuditLogRepository","Abstraction","UpdateAuditLogGateway"],"mappings":";;;AAMA,MAAMA;IACF,YAAoCC,OAAwC,CAAE;aAA1CA,OAAO,GAAPA;IAA2C;IAE/E,MAAa,OAAOC,QAAmB,EAAwD;QAC3F,IAAI;YACA,MAAMC,UAAU,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAACD;YAC1C,OAAOE,OAAO,EAAE,CAACD;QACrB,EAAE,OAAOE,OAAO;YACZ,OAAOD,OAAO,IAAI,CAAC,IAAIE,yBAAyBD;QACpD;IACJ;AACJ;AAEO,MAAME,oDAA2BC,yBAAAA,oBAAgC,CAAC;IACrE,gBAAgBR;IAChB,cAAc;QAACS;KAAsB;AACzC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Result } from "@webiny/feature/api";
|
|
2
|
+
import { EventPublisher } from "@webiny/api-core/features/eventPublisher/index.js";
|
|
3
|
+
import { AuditLogPermissions } from "../../features/AuditLogPermissions/abstractions.js";
|
|
4
|
+
import type { AuditLogPayload } from "../../types.js";
|
|
5
|
+
import type { IAuditLog } from "../../storage/types.js";
|
|
6
|
+
import { UpdateAuditLogUseCase as UseCaseAbstraction } from "./abstractions.js";
|
|
7
|
+
import { UpdateAuditLogRepository } from "./abstractions.js";
|
|
8
|
+
declare class UpdateAuditLogUseCaseImpl implements UseCaseAbstraction.Interface {
|
|
9
|
+
private readonly repository;
|
|
10
|
+
private readonly permissions;
|
|
11
|
+
private readonly eventPublisher;
|
|
12
|
+
constructor(repository: UpdateAuditLogRepository.Interface, permissions: AuditLogPermissions.Interface, eventPublisher: EventPublisher.Interface);
|
|
13
|
+
execute(original: IAuditLog, payload: Partial<AuditLogPayload>): Promise<Result<IAuditLog, UseCaseAbstraction.Error>>;
|
|
14
|
+
}
|
|
15
|
+
export declare const UpdateAuditLogUseCase: typeof UpdateAuditLogUseCaseImpl & {
|
|
16
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IUpdateAuditLogUseCase>;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Result } from "@webiny/feature/api";
|
|
2
|
+
import { NotAuthorizedError } from "@webiny/api-core/features/security/shared/errors.js";
|
|
3
|
+
import { EventPublisher } from "@webiny/api-core/features/eventPublisher/index.js";
|
|
4
|
+
import { AuditLogPermissions } from "../AuditLogPermissions/abstractions.js";
|
|
5
|
+
import { AuditLogAfterUpdateEvent, AuditLogBeforeUpdateEvent } from "../../events/index.js";
|
|
6
|
+
import { UpdateAuditLogRepository, UpdateAuditLogUseCase } from "./abstractions.js";
|
|
7
|
+
class UpdateAuditLogUseCaseImpl {
|
|
8
|
+
constructor(repository, permissions, eventPublisher){
|
|
9
|
+
this.repository = repository;
|
|
10
|
+
this.permissions = permissions;
|
|
11
|
+
this.eventPublisher = eventPublisher;
|
|
12
|
+
}
|
|
13
|
+
async execute(original, payload) {
|
|
14
|
+
let content = original.content;
|
|
15
|
+
if (payload.content) content = JSON.stringify(payload.content);
|
|
16
|
+
const auditLog = {
|
|
17
|
+
...original,
|
|
18
|
+
...payload,
|
|
19
|
+
content
|
|
20
|
+
};
|
|
21
|
+
const canAccess = await this.permissions.canAccess(auditLog.action);
|
|
22
|
+
if (!canAccess) return Result.fail(new NotAuthorizedError({
|
|
23
|
+
message: "You cannot access audit logs."
|
|
24
|
+
}));
|
|
25
|
+
const beforeUpdateEvent = new AuditLogBeforeUpdateEvent({
|
|
26
|
+
original,
|
|
27
|
+
auditLog,
|
|
28
|
+
setAuditLog (input) {
|
|
29
|
+
Object.assign(auditLog, input);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
await this.eventPublisher.publish(beforeUpdateEvent);
|
|
33
|
+
const result = await this.repository.update(auditLog);
|
|
34
|
+
if (result.isFail()) return Result.fail(result.error);
|
|
35
|
+
const afterUpdateEvent = new AuditLogAfterUpdateEvent({
|
|
36
|
+
original,
|
|
37
|
+
auditLog
|
|
38
|
+
});
|
|
39
|
+
await this.eventPublisher.publish(afterUpdateEvent);
|
|
40
|
+
return Result.ok(result.value);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const UpdateAuditLogUseCase_UpdateAuditLogUseCase = UpdateAuditLogUseCase.createImplementation({
|
|
44
|
+
implementation: UpdateAuditLogUseCaseImpl,
|
|
45
|
+
dependencies: [
|
|
46
|
+
UpdateAuditLogRepository,
|
|
47
|
+
AuditLogPermissions,
|
|
48
|
+
EventPublisher
|
|
49
|
+
]
|
|
50
|
+
});
|
|
51
|
+
export { UpdateAuditLogUseCase_UpdateAuditLogUseCase as UpdateAuditLogUseCase };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=UpdateAuditLogUseCase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/UpdateAuditLog/UpdateAuditLogUseCase.js","sources":["../../../src/features/UpdateAuditLog/UpdateAuditLogUseCase.ts"],"sourcesContent":["import { Result } from \"@webiny/feature/api\";\nimport { NotAuthorizedError } from \"@webiny/api-core/features/security/shared/errors.js\";\nimport { EventPublisher } from \"@webiny/api-core/features/eventPublisher/index.js\";\nimport { AuditLogPermissions } from \"~/features/AuditLogPermissions/abstractions.js\";\nimport { AuditLogBeforeUpdateEvent } from \"~/events/index.js\";\nimport { AuditLogAfterUpdateEvent } from \"~/events/index.js\";\nimport type { AuditLogPayload } from \"~/types.js\";\nimport type { IAuditLog } from \"~/storage/types.js\";\nimport { UpdateAuditLogUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { UpdateAuditLogRepository } from \"./abstractions.js\";\n\nclass UpdateAuditLogUseCaseImpl implements UseCaseAbstraction.Interface {\n public constructor(\n private readonly repository: UpdateAuditLogRepository.Interface,\n private readonly permissions: AuditLogPermissions.Interface,\n private readonly eventPublisher: EventPublisher.Interface\n ) {}\n\n public async execute(\n original: IAuditLog,\n payload: Partial<AuditLogPayload>\n ): Promise<Result<IAuditLog, UseCaseAbstraction.Error>> {\n let content = original.content;\n if (payload.content) {\n content = JSON.stringify(payload.content);\n }\n\n const auditLog: IAuditLog = {\n ...original,\n ...payload,\n content\n };\n\n const canAccess = await this.permissions.canAccess(auditLog.action);\n if (!canAccess) {\n return Result.fail(\n new NotAuthorizedError({ message: \"You cannot access audit logs.\" })\n );\n }\n\n const beforeUpdateEvent = new AuditLogBeforeUpdateEvent({\n original,\n auditLog,\n setAuditLog(input) {\n Object.assign(auditLog, input);\n }\n });\n await this.eventPublisher.publish(beforeUpdateEvent);\n\n const result = await this.repository.update(auditLog);\n if (result.isFail()) {\n return Result.fail(result.error);\n }\n\n const afterUpdateEvent = new AuditLogAfterUpdateEvent({ original, auditLog });\n await this.eventPublisher.publish(afterUpdateEvent);\n\n return Result.ok(result.value);\n }\n}\n\nexport const UpdateAuditLogUseCase = UseCaseAbstraction.createImplementation({\n implementation: UpdateAuditLogUseCaseImpl,\n dependencies: [UpdateAuditLogRepository, AuditLogPermissions, EventPublisher]\n});\n"],"names":["UpdateAuditLogUseCaseImpl","repository","permissions","eventPublisher","original","payload","content","JSON","auditLog","canAccess","Result","NotAuthorizedError","beforeUpdateEvent","AuditLogBeforeUpdateEvent","input","Object","result","afterUpdateEvent","AuditLogAfterUpdateEvent","UpdateAuditLogUseCase","UseCaseAbstraction","UpdateAuditLogRepository","AuditLogPermissions","EventPublisher"],"mappings":";;;;;;AAWA,MAAMA;IACF,YACqBC,UAA8C,EAC9CC,WAA0C,EAC1CC,cAAwC,CAC3D;aAHmBF,UAAU,GAAVA;aACAC,WAAW,GAAXA;aACAC,cAAc,GAAdA;IAClB;IAEH,MAAa,QACTC,QAAmB,EACnBC,OAAiC,EACmB;QACpD,IAAIC,UAAUF,SAAS,OAAO;QAC9B,IAAIC,QAAQ,OAAO,EACfC,UAAUC,KAAK,SAAS,CAACF,QAAQ,OAAO;QAG5C,MAAMG,WAAsB;YACxB,GAAGJ,QAAQ;YACX,GAAGC,OAAO;YACVC;QACJ;QAEA,MAAMG,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,SAAS,CAACD,SAAS,MAAM;QAClE,IAAI,CAACC,WACD,OAAOC,OAAO,IAAI,CACd,IAAIC,mBAAmB;YAAE,SAAS;QAAgC;QAI1E,MAAMC,oBAAoB,IAAIC,0BAA0B;YACpDT;YACAI;YACA,aAAYM,KAAK;gBACbC,OAAO,MAAM,CAACP,UAAUM;YAC5B;QACJ;QACA,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAACF;QAElC,MAAMI,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAACR;QAC5C,IAAIQ,OAAO,MAAM,IACb,OAAON,OAAO,IAAI,CAACM,OAAO,KAAK;QAGnC,MAAMC,mBAAmB,IAAIC,yBAAyB;YAAEd;YAAUI;QAAS;QAC3E,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAACS;QAElC,OAAOP,OAAO,EAAE,CAACM,OAAO,KAAK;IACjC;AACJ;AAEO,MAAMG,8CAAwBC,sBAAAA,oBAAuC,CAAC;IACzE,gBAAgBpB;IAChB,cAAc;QAACqB;QAA0BC;QAAqBC;KAAe;AACjF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Result } from "@webiny/feature/api";
|
|
2
|
+
import type { NotAuthorizedError } from "@webiny/api-core/features/security/shared/errors.js";
|
|
3
|
+
import type { AuditLogPayload } from "../../types.js";
|
|
4
|
+
import type { IAuditLog } from "../../storage/types.js";
|
|
5
|
+
import type { AuditLogPersistenceError } from "../../domain/errors.js";
|
|
6
|
+
/**
|
|
7
|
+
* UpdateAuditLog Use Case - Updates an existing audit log with new values.
|
|
8
|
+
*/
|
|
9
|
+
export interface IUpdateAuditLogUseCase {
|
|
10
|
+
execute(original: IAuditLog, payload: Partial<AuditLogPayload>): Promise<Result<IAuditLog, UseCaseError>>;
|
|
11
|
+
}
|
|
12
|
+
export interface IUpdateAuditLogUseCaseErrors {
|
|
13
|
+
notAuthorized: NotAuthorizedError;
|
|
14
|
+
persistence: AuditLogPersistenceError;
|
|
15
|
+
}
|
|
16
|
+
type UseCaseError = IUpdateAuditLogUseCaseErrors[keyof IUpdateAuditLogUseCaseErrors];
|
|
17
|
+
export declare const UpdateAuditLogUseCase: import("@webiny/di").Abstraction<IUpdateAuditLogUseCase>;
|
|
18
|
+
export declare namespace UpdateAuditLogUseCase {
|
|
19
|
+
type Interface = IUpdateAuditLogUseCase;
|
|
20
|
+
type Error = UseCaseError;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* UpdateAuditLogRepository - Stores an updated audit log.
|
|
24
|
+
*/
|
|
25
|
+
export interface IUpdateAuditLogRepository {
|
|
26
|
+
update(auditLog: IAuditLog): Promise<Result<IAuditLog, AuditLogPersistenceError>>;
|
|
27
|
+
}
|
|
28
|
+
export declare const UpdateAuditLogRepository: import("@webiny/di").Abstraction<IUpdateAuditLogRepository>;
|
|
29
|
+
export declare namespace UpdateAuditLogRepository {
|
|
30
|
+
type Interface = IUpdateAuditLogRepository;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* UpdateAuditLogGateway - Writes an updated audit log to the audit logs storage.
|
|
34
|
+
*/
|
|
35
|
+
export interface IUpdateAuditLogGateway {
|
|
36
|
+
update(auditLog: IAuditLog): Promise<IAuditLog>;
|
|
37
|
+
}
|
|
38
|
+
export declare const UpdateAuditLogGateway: import("@webiny/di").Abstraction<IUpdateAuditLogGateway>;
|
|
39
|
+
export declare namespace UpdateAuditLogGateway {
|
|
40
|
+
type Interface = IUpdateAuditLogGateway;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createAbstraction } from "@webiny/feature/api";
|
|
2
|
+
const UpdateAuditLogUseCase = createAbstraction("UpdateAuditLogUseCase");
|
|
3
|
+
const UpdateAuditLogRepository = createAbstraction("UpdateAuditLogRepository");
|
|
4
|
+
const UpdateAuditLogGateway = createAbstraction("UpdateAuditLogGateway");
|
|
5
|
+
export { UpdateAuditLogGateway, UpdateAuditLogRepository, UpdateAuditLogUseCase };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=abstractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/UpdateAuditLog/abstractions.js","sources":["../../../src/features/UpdateAuditLog/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { Result } from \"@webiny/feature/api\";\nimport type { NotAuthorizedError } from \"@webiny/api-core/features/security/shared/errors.js\";\nimport type { AuditLogPayload } from \"~/types.js\";\nimport type { IAuditLog } from \"~/storage/types.js\";\nimport type { AuditLogPersistenceError } from \"~/domain/errors.js\";\n\n/**\n * UpdateAuditLog Use Case - Updates an existing audit log with new values.\n */\nexport interface IUpdateAuditLogUseCase {\n execute(\n original: IAuditLog,\n payload: Partial<AuditLogPayload>\n ): Promise<Result<IAuditLog, UseCaseError>>;\n}\n\nexport interface IUpdateAuditLogUseCaseErrors {\n notAuthorized: NotAuthorizedError;\n persistence: AuditLogPersistenceError;\n}\n\ntype UseCaseError = IUpdateAuditLogUseCaseErrors[keyof IUpdateAuditLogUseCaseErrors];\n\nexport const UpdateAuditLogUseCase =\n createAbstraction<IUpdateAuditLogUseCase>(\"UpdateAuditLogUseCase\");\n\nexport namespace UpdateAuditLogUseCase {\n export type Interface = IUpdateAuditLogUseCase;\n export type Error = UseCaseError;\n}\n\n/**\n * UpdateAuditLogRepository - Stores an updated audit log.\n */\nexport interface IUpdateAuditLogRepository {\n update(auditLog: IAuditLog): Promise<Result<IAuditLog, AuditLogPersistenceError>>;\n}\n\nexport const UpdateAuditLogRepository = createAbstraction<IUpdateAuditLogRepository>(\n \"UpdateAuditLogRepository\"\n);\n\nexport namespace UpdateAuditLogRepository {\n export type Interface = IUpdateAuditLogRepository;\n}\n\n/**\n * UpdateAuditLogGateway - Writes an updated audit log to the audit logs storage.\n */\nexport interface IUpdateAuditLogGateway {\n update(auditLog: IAuditLog): Promise<IAuditLog>;\n}\n\nexport const UpdateAuditLogGateway =\n createAbstraction<IUpdateAuditLogGateway>(\"UpdateAuditLogGateway\");\n\nexport namespace UpdateAuditLogGateway {\n export type Interface = IUpdateAuditLogGateway;\n}\n"],"names":["UpdateAuditLogUseCase","createAbstraction","UpdateAuditLogRepository","UpdateAuditLogGateway"],"mappings":";AAwBO,MAAMA,wBACTC,kBAA0C;AAcvC,MAAMC,2BAA2BD,kBACpC;AAcG,MAAME,wBACTF,kBAA0C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/api";
|
|
2
|
+
import { UpdateAuditLogUseCase } from "./UpdateAuditLogUseCase.js";
|
|
3
|
+
import { UpdateAuditLogRepository } from "./UpdateAuditLogRepository.js";
|
|
4
|
+
import { UpdateAuditLogGateway } from "./UpdateAuditLogGateway.js";
|
|
5
|
+
const UpdateAuditLogFeature = createFeature({
|
|
6
|
+
name: "AuditLogs/UpdateAuditLog",
|
|
7
|
+
register (container) {
|
|
8
|
+
container.register(UpdateAuditLogUseCase);
|
|
9
|
+
container.register(UpdateAuditLogRepository).inSingletonScope();
|
|
10
|
+
container.register(UpdateAuditLogGateway).inSingletonScope();
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export { UpdateAuditLogFeature };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/UpdateAuditLog/feature.js","sources":["../../../src/features/UpdateAuditLog/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { UpdateAuditLogUseCase } from \"./UpdateAuditLogUseCase.js\";\nimport { UpdateAuditLogRepository } from \"./UpdateAuditLogRepository.js\";\nimport { UpdateAuditLogGateway } from \"./UpdateAuditLogGateway.js\";\n\nexport const UpdateAuditLogFeature = createFeature({\n name: \"AuditLogs/UpdateAuditLog\",\n register(container) {\n container.register(UpdateAuditLogUseCase);\n container.register(UpdateAuditLogRepository).inSingletonScope();\n container.register(UpdateAuditLogGateway).inSingletonScope();\n }\n});\n"],"names":["UpdateAuditLogFeature","createFeature","container","UpdateAuditLogUseCase","UpdateAuditLogRepository","UpdateAuditLogGateway"],"mappings":";;;;AAKO,MAAMA,wBAAwBC,cAAc;IAC/C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,0BAA0B,gBAAgB;QAC7DF,UAAU,QAAQ,CAACG,uBAAuB,gBAAgB;IAC9D;AACJ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
|
|
2
|
+
import { GraphQLSchemaBuilder } from "@webiny/api-graphql/features/GraphQLSchemaBuilder/abstractions.js";
|
|
3
|
+
declare class AuditLogsGraphQLSchemaImpl implements CoreGraphQLSchemaFactory.Interface {
|
|
4
|
+
getSchemaKey: () => string;
|
|
5
|
+
execute(builder: GraphQLSchemaBuilder.Interface): CoreGraphQLSchemaFactory.Return;
|
|
6
|
+
}
|
|
7
|
+
export declare const AuditLogsGraphQLSchema: typeof AuditLogsGraphQLSchemaImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/api-graphql/graphql/abstractions.core.js").ICoreGraphQLSchemaFactory>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { resolve, resolveList } from "@webiny/api-graphql";
|
|
2
|
+
import { staticSchemaKey } from "@webiny/api-graphql/graphql/staticSchemaKey.js";
|
|
3
|
+
import { CoreGraphQLSchemaFactory } from "@webiny/api-graphql/graphql/abstractions.js";
|
|
4
|
+
import { createZodError } from "@webiny/utils";
|
|
5
|
+
import { GetAuditLogUseCase } from "../features/GetAuditLog/abstractions.js";
|
|
6
|
+
import { ListAuditLogsUseCase } from "../features/ListAuditLogs/abstractions.js";
|
|
7
|
+
import { getValidationSchema, listValidationSchema } from "./validation.js";
|
|
8
|
+
const TYPE_DEFS = `
|
|
9
|
+
type AuditLogCreatedBy {
|
|
10
|
+
id: ID!
|
|
11
|
+
displayName: String
|
|
12
|
+
type: String
|
|
13
|
+
}
|
|
14
|
+
type AuditLog {
|
|
15
|
+
id: ID!
|
|
16
|
+
createdBy: AuditLogCreatedBy!
|
|
17
|
+
createdOn: DateTime!
|
|
18
|
+
app: String!
|
|
19
|
+
action: String!
|
|
20
|
+
message: String!
|
|
21
|
+
entity: String!
|
|
22
|
+
entityId: String!
|
|
23
|
+
tags: [String!]!
|
|
24
|
+
expiresAt: DateTime!
|
|
25
|
+
content: String
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type AuditLogListMeta {
|
|
29
|
+
cursor: String
|
|
30
|
+
hasMoreItems: Boolean!
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type AuditLogError {
|
|
34
|
+
code: String
|
|
35
|
+
message: String!
|
|
36
|
+
data: JSON
|
|
37
|
+
stack: String
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type AuditLogListResponse {
|
|
41
|
+
data: [AuditLog!]
|
|
42
|
+
meta: AuditLogListMeta
|
|
43
|
+
error: AuditLogError
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type AuditLogGetResponse {
|
|
47
|
+
data: AuditLog
|
|
48
|
+
error: AuditLogError
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
enum AuditLogsSort {
|
|
52
|
+
ASC
|
|
53
|
+
DESC
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
input ListAuditLogsWhere {
|
|
57
|
+
app: String
|
|
58
|
+
action: String
|
|
59
|
+
createdBy: String
|
|
60
|
+
entity: String
|
|
61
|
+
entityId: String
|
|
62
|
+
createdOn_gte: DateTime
|
|
63
|
+
createdOn_lte: DateTime
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
type AuditLogsQuery {
|
|
67
|
+
getAuditLog(id: ID!): AuditLogGetResponse
|
|
68
|
+
listAuditLogs(
|
|
69
|
+
where: ListAuditLogsWhere
|
|
70
|
+
sort: AuditLogsSort
|
|
71
|
+
limit: Number
|
|
72
|
+
after: String
|
|
73
|
+
): AuditLogListResponse!
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
extend type Query {
|
|
77
|
+
auditLogs: AuditLogsQuery
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
class AuditLogsGraphQLSchemaImpl {
|
|
81
|
+
async execute(builder) {
|
|
82
|
+
builder.addTypeDefs(TYPE_DEFS);
|
|
83
|
+
builder.addResolver({
|
|
84
|
+
path: "Query.auditLogs",
|
|
85
|
+
dependencies: [],
|
|
86
|
+
resolver: ()=>()=>({})
|
|
87
|
+
});
|
|
88
|
+
builder.addResolver({
|
|
89
|
+
path: "AuditLogsQuery.getAuditLog",
|
|
90
|
+
dependencies: [
|
|
91
|
+
GetAuditLogUseCase
|
|
92
|
+
],
|
|
93
|
+
resolver (getAuditLog) {
|
|
94
|
+
return async ({ args })=>resolve(async ()=>{
|
|
95
|
+
const validation = await getValidationSchema.safeParseAsync(args);
|
|
96
|
+
if (!validation.success) throw createZodError(validation.error);
|
|
97
|
+
const result = await getAuditLog.execute(validation.data.id);
|
|
98
|
+
if (result.isFail()) throw result.error;
|
|
99
|
+
return result.value;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
builder.addResolver({
|
|
104
|
+
path: "AuditLogsQuery.listAuditLogs",
|
|
105
|
+
dependencies: [
|
|
106
|
+
ListAuditLogsUseCase
|
|
107
|
+
],
|
|
108
|
+
resolver (listAuditLogs) {
|
|
109
|
+
return async ({ args })=>resolveList(async ()=>{
|
|
110
|
+
const validation = await listValidationSchema.safeParseAsync(args);
|
|
111
|
+
if (!validation.success) throw createZodError(validation.error);
|
|
112
|
+
const result = await listAuditLogs.execute({
|
|
113
|
+
...validation.data,
|
|
114
|
+
...validation.data.where
|
|
115
|
+
});
|
|
116
|
+
if (result.isFail()) throw result.error;
|
|
117
|
+
return {
|
|
118
|
+
items: result.value.items,
|
|
119
|
+
meta: {
|
|
120
|
+
...result.value.meta,
|
|
121
|
+
totalCount: 0
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return builder;
|
|
128
|
+
}
|
|
129
|
+
constructor(){
|
|
130
|
+
this.getSchemaKey = staticSchemaKey("api-audit-logs/AuditLogsGraphQLSchemaImpl");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const AuditLogsGraphQLSchema = CoreGraphQLSchemaFactory.createImplementation({
|
|
134
|
+
implementation: AuditLogsGraphQLSchemaImpl,
|
|
135
|
+
dependencies: []
|
|
136
|
+
});
|
|
137
|
+
export { AuditLogsGraphQLSchema };
|
|
138
|
+
|
|
139
|
+
//# sourceMappingURL=AuditLogsGraphQLSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql/AuditLogsGraphQLSchema.js","sources":["../../src/graphql/AuditLogsGraphQLSchema.ts"],"sourcesContent":["import { resolve } from \"@webiny/api-graphql\";\nimport { staticSchemaKey } from \"@webiny/api-graphql/graphql/staticSchemaKey.js\";\nimport { resolveList } from \"@webiny/api-graphql\";\nimport { CoreGraphQLSchemaFactory } from \"@webiny/api-graphql/graphql/abstractions.js\";\nimport { GraphQLSchemaBuilder } from \"@webiny/api-graphql/features/GraphQLSchemaBuilder/abstractions.js\";\nimport { createZodError } from \"@webiny/utils\";\nimport { GetAuditLogUseCase } from \"~/features/GetAuditLog/abstractions.js\";\nimport { ListAuditLogsUseCase } from \"~/features/ListAuditLogs/abstractions.js\";\nimport { getValidationSchema, listValidationSchema } from \"./validation.js\";\n\ninterface IListAuditLogsWhere {\n app?: string;\n action?: string;\n createdBy?: string;\n entity?: string;\n entityId?: string;\n createdOn_gte?: Date;\n createdOn_lte?: Date;\n}\n\ninterface IListAuditLogsArgs {\n where?: IListAuditLogsWhere;\n sort?: \"ASC\" | \"DESC\";\n limit?: number;\n after?: string;\n}\n\nconst TYPE_DEFS = /* GraphQL */ `\n type AuditLogCreatedBy {\n id: ID!\n displayName: String\n type: String\n }\n type AuditLog {\n id: ID!\n createdBy: AuditLogCreatedBy!\n createdOn: DateTime!\n app: String!\n action: String!\n message: String!\n entity: String!\n entityId: String!\n tags: [String!]!\n expiresAt: DateTime!\n content: String\n }\n\n type AuditLogListMeta {\n cursor: String\n hasMoreItems: Boolean!\n }\n\n type AuditLogError {\n code: String\n message: String!\n data: JSON\n stack: String\n }\n\n type AuditLogListResponse {\n data: [AuditLog!]\n meta: AuditLogListMeta\n error: AuditLogError\n }\n\n type AuditLogGetResponse {\n data: AuditLog\n error: AuditLogError\n }\n\n enum AuditLogsSort {\n ASC\n DESC\n }\n\n input ListAuditLogsWhere {\n app: String\n action: String\n createdBy: String\n entity: String\n entityId: String\n createdOn_gte: DateTime\n createdOn_lte: DateTime\n }\n\n type AuditLogsQuery {\n getAuditLog(id: ID!): AuditLogGetResponse\n listAuditLogs(\n where: ListAuditLogsWhere\n sort: AuditLogsSort\n limit: Number\n after: String\n ): AuditLogListResponse!\n }\n\n extend type Query {\n auditLogs: AuditLogsQuery\n }\n`;\n\nclass AuditLogsGraphQLSchemaImpl implements CoreGraphQLSchemaFactory.Interface {\n public getSchemaKey = staticSchemaKey(\"api-audit-logs/AuditLogsGraphQLSchemaImpl\");\n\n public async execute(builder: GraphQLSchemaBuilder.Interface): CoreGraphQLSchemaFactory.Return {\n builder.addTypeDefs(TYPE_DEFS);\n\n builder.addResolver({\n path: \"Query.auditLogs\",\n dependencies: [],\n resolver: () => () => ({})\n });\n\n builder.addResolver<{ id: string }>({\n path: \"AuditLogsQuery.getAuditLog\",\n dependencies: [GetAuditLogUseCase],\n resolver(getAuditLog: GetAuditLogUseCase.Interface) {\n return async ({ args }) => {\n return resolve(async () => {\n const validation = await getValidationSchema.safeParseAsync(args);\n\n if (!validation.success) {\n throw createZodError(validation.error);\n }\n\n const result = await getAuditLog.execute(validation.data.id);\n if (result.isFail()) {\n throw result.error;\n }\n return result.value;\n });\n };\n }\n });\n\n builder.addResolver<IListAuditLogsArgs>({\n path: \"AuditLogsQuery.listAuditLogs\",\n dependencies: [ListAuditLogsUseCase],\n resolver(listAuditLogs: ListAuditLogsUseCase.Interface) {\n return async ({ args }) => {\n return resolveList(async () => {\n const validation = await listValidationSchema.safeParseAsync(args);\n if (!validation.success) {\n throw createZodError(validation.error);\n }\n const result = await listAuditLogs.execute({\n ...validation.data,\n ...validation.data.where\n });\n if (result.isFail()) {\n throw result.error;\n }\n return {\n items: result.value.items,\n meta: {\n ...result.value.meta,\n totalCount: 0\n }\n };\n });\n };\n }\n });\n\n return builder;\n }\n}\n\nexport const AuditLogsGraphQLSchema = CoreGraphQLSchemaFactory.createImplementation({\n implementation: AuditLogsGraphQLSchemaImpl,\n dependencies: []\n});\n"],"names":["TYPE_DEFS","AuditLogsGraphQLSchemaImpl","builder","GetAuditLogUseCase","getAuditLog","args","resolve","validation","getValidationSchema","createZodError","result","ListAuditLogsUseCase","listAuditLogs","resolveList","listValidationSchema","staticSchemaKey","AuditLogsGraphQLSchema","CoreGraphQLSchemaFactory"],"mappings":";;;;;;;AA2BA,MAAMA,YAA0B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEjC,CAAC;AAED,MAAMC;IAGF,MAAa,QAAQC,OAAuC,EAAmC;QAC3FA,QAAQ,WAAW,CAACF;QAEpBE,QAAQ,WAAW,CAAC;YAChB,MAAM;YACN,cAAc,EAAE;YAChB,UAAU,IAAM,IAAO,EAAC;QAC5B;QAEAA,QAAQ,WAAW,CAAiB;YAChC,MAAM;YACN,cAAc;gBAACC;aAAmB;YAClC,UAASC,WAAyC;gBAC9C,OAAO,OAAO,EAAEC,IAAI,EAAE,GACXC,QAAQ;wBACX,MAAMC,aAAa,MAAMC,oBAAoB,cAAc,CAACH;wBAE5D,IAAI,CAACE,WAAW,OAAO,EACnB,MAAME,eAAeF,WAAW,KAAK;wBAGzC,MAAMG,SAAS,MAAMN,YAAY,OAAO,CAACG,WAAW,IAAI,CAAC,EAAE;wBAC3D,IAAIG,OAAO,MAAM,IACb,MAAMA,OAAO,KAAK;wBAEtB,OAAOA,OAAO,KAAK;oBACvB;YAER;QACJ;QAEAR,QAAQ,WAAW,CAAqB;YACpC,MAAM;YACN,cAAc;gBAACS;aAAqB;YACpC,UAASC,aAA6C;gBAClD,OAAO,OAAO,EAAEP,IAAI,EAAE,GACXQ,YAAY;wBACf,MAAMN,aAAa,MAAMO,qBAAqB,cAAc,CAACT;wBAC7D,IAAI,CAACE,WAAW,OAAO,EACnB,MAAME,eAAeF,WAAW,KAAK;wBAEzC,MAAMG,SAAS,MAAME,cAAc,OAAO,CAAC;4BACvC,GAAGL,WAAW,IAAI;4BAClB,GAAGA,WAAW,IAAI,CAAC,KAAK;wBAC5B;wBACA,IAAIG,OAAO,MAAM,IACb,MAAMA,OAAO,KAAK;wBAEtB,OAAO;4BACH,OAAOA,OAAO,KAAK,CAAC,KAAK;4BACzB,MAAM;gCACF,GAAGA,OAAO,KAAK,CAAC,IAAI;gCACpB,YAAY;4BAChB;wBACJ;oBACJ;YAER;QACJ;QAEA,OAAOR;IACX;;aA/DO,YAAY,GAAGa,gBAAgB;;AAgE1C;AAEO,MAAMC,yBAAyBC,yBAAyB,oBAAoB,CAAC;IAChF,gBAAgBhB;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import zod from "zod";
|
|
2
|
+
export declare const getValidationSchema: zod.ZodObject<{
|
|
3
|
+
id: zod.ZodString;
|
|
4
|
+
}, zod.core.$strip>;
|
|
5
|
+
export declare const listValidationSchema: zod.ZodObject<{
|
|
6
|
+
where: zod.ZodObject<{
|
|
7
|
+
app: zod.ZodOptional<zod.ZodString>;
|
|
8
|
+
entity: zod.ZodOptional<zod.ZodString>;
|
|
9
|
+
entityId: zod.ZodOptional<zod.ZodString>;
|
|
10
|
+
createdOn_gte: zod.ZodPreprocess<zod.ZodOptional<zod.ZodDate>>;
|
|
11
|
+
createdOn_lte: zod.ZodPreprocess<zod.ZodOptional<zod.ZodDate>>;
|
|
12
|
+
createdBy: zod.ZodOptional<zod.ZodString>;
|
|
13
|
+
action: zod.ZodOptional<zod.ZodString>;
|
|
14
|
+
}, zod.core.$strip>;
|
|
15
|
+
after: zod.ZodOptional<zod.ZodString>;
|
|
16
|
+
sort: zod.ZodOptional<zod.ZodEnum<{
|
|
17
|
+
ASC: "ASC";
|
|
18
|
+
DESC: "DESC";
|
|
19
|
+
}>>;
|
|
20
|
+
limit: zod.ZodDefault<zod.ZodPreprocess<zod.ZodOptional<zod.ZodNumber>>>;
|
|
21
|
+
}, zod.core.$strip>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import zod from "zod";
|
|
2
|
+
const getValidationSchema = zod.object({
|
|
3
|
+
id: zod.string().min(1, "ID is required.")
|
|
4
|
+
});
|
|
5
|
+
const listValidationSchema = zod.object({
|
|
6
|
+
where: zod.object({
|
|
7
|
+
app: zod.string().min(1, "App is required.").optional(),
|
|
8
|
+
entity: zod.string().optional(),
|
|
9
|
+
entityId: zod.string().min(1, "Entity ID is required.").optional(),
|
|
10
|
+
createdOn_gte: zod.preprocess((input)=>{
|
|
11
|
+
if ("string" == typeof input || input instanceof Date) return new Date(input);
|
|
12
|
+
}, zod.date().optional()),
|
|
13
|
+
createdOn_lte: zod.preprocess((input)=>{
|
|
14
|
+
if ("string" == typeof input || input instanceof Date) return new Date(input);
|
|
15
|
+
}, zod.date().optional()),
|
|
16
|
+
createdBy: zod.string().optional(),
|
|
17
|
+
action: zod.string().optional()
|
|
18
|
+
}),
|
|
19
|
+
after: zod.string().optional(),
|
|
20
|
+
sort: zod["enum"]([
|
|
21
|
+
"ASC",
|
|
22
|
+
"DESC"
|
|
23
|
+
]).optional(),
|
|
24
|
+
limit: zod.preprocess((input)=>{
|
|
25
|
+
if ("string" == typeof input) return parseInt(input);
|
|
26
|
+
return input;
|
|
27
|
+
}, zod.number().min(1).max(100).optional()).default(25)
|
|
28
|
+
});
|
|
29
|
+
export { getValidationSchema, listValidationSchema };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql/validation.js","sources":["../../src/graphql/validation.ts"],"sourcesContent":["import zod from \"zod\";\n\nexport const getValidationSchema = zod.object({\n id: zod.string().min(1, \"ID is required.\")\n});\n\nexport const listValidationSchema = zod.object({\n where: zod.object({\n app: zod.string().min(1, \"App is required.\").optional(),\n entity: zod.string().optional(),\n entityId: zod.string().min(1, \"Entity ID is required.\").optional(),\n createdOn_gte: zod.preprocess(input => {\n if (typeof input == \"string\" || input instanceof Date) {\n return new Date(input);\n }\n return undefined;\n }, zod.date().optional()),\n createdOn_lte: zod.preprocess(input => {\n if (typeof input == \"string\" || input instanceof Date) {\n return new Date(input);\n }\n return undefined;\n }, zod.date().optional()),\n createdBy: zod.string().optional(),\n action: zod.string().optional()\n }),\n after: zod.string().optional(),\n sort: zod.enum([\"ASC\", \"DESC\"]).optional(),\n limit: zod\n .preprocess(input => {\n if (typeof input == \"string\") {\n return parseInt(input);\n }\n return input;\n }, zod.number().min(1).max(100).optional())\n .default(25)\n});\n"],"names":["getValidationSchema","zod","listValidationSchema","input","Date","parseInt"],"mappings":";AAEO,MAAMA,sBAAsBC,IAAI,MAAM,CAAC;IAC1C,IAAIA,IAAI,MAAM,GAAG,GAAG,CAAC,GAAG;AAC5B;AAEO,MAAMC,uBAAuBD,IAAI,MAAM,CAAC;IAC3C,OAAOA,IAAI,MAAM,CAAC;QACd,KAAKA,IAAI,MAAM,GAAG,GAAG,CAAC,GAAG,oBAAoB,QAAQ;QACrD,QAAQA,IAAI,MAAM,GAAG,QAAQ;QAC7B,UAAUA,IAAI,MAAM,GAAG,GAAG,CAAC,GAAG,0BAA0B,QAAQ;QAChE,eAAeA,IAAI,UAAU,CAACE,CAAAA;YAC1B,IAAI,AAAgB,YAAhB,OAAOA,SAAqBA,iBAAiBC,MAC7C,OAAO,IAAIA,KAAKD;QAGxB,GAAGF,IAAI,IAAI,GAAG,QAAQ;QACtB,eAAeA,IAAI,UAAU,CAACE,CAAAA;YAC1B,IAAI,AAAgB,YAAhB,OAAOA,SAAqBA,iBAAiBC,MAC7C,OAAO,IAAIA,KAAKD;QAGxB,GAAGF,IAAI,IAAI,GAAG,QAAQ;QACtB,WAAWA,IAAI,MAAM,GAAG,QAAQ;QAChC,QAAQA,IAAI,MAAM,GAAG,QAAQ;IACjC;IACA,OAAOA,IAAI,MAAM,GAAG,QAAQ;IAC5B,MAAMA,GAAG,CAAHA,OAAQ,CAAC;QAAC;QAAO;KAAO,EAAE,QAAQ;IACxC,OAAOA,IAAAA,UACQ,CAACE,CAAAA;QACR,IAAI,AAAgB,YAAhB,OAAOA,OACP,OAAOE,SAASF;QAEpB,OAAOA;IACX,GAAGF,IAAI,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,QAAQ,IACvC,OAAO,CAAC;AACjB"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export * from "./config";
|
|
5
|
-
export * from "./app/createAppModifier";
|
|
1
|
+
export * from "./config.js";
|
|
2
|
+
export { AuditLogsFeature } from "./AuditLogsFeature.js";
|
|
3
|
+
export type { AuditLogsFeatureConfig } from "./AuditLogsFeature.js";
|
package/index.js
CHANGED
|
@@ -1,49 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
createAuditLogs: true
|
|
8
|
-
};
|
|
9
|
-
exports.createAuditLogs = void 0;
|
|
10
|
-
var _api = require("@webiny/api");
|
|
11
|
-
var _subscriptions = require("./subscriptions");
|
|
12
|
-
var _app = require("./app");
|
|
13
|
-
var _config = require("./config");
|
|
14
|
-
Object.keys(_config).forEach(function (key) {
|
|
15
|
-
if (key === "default" || key === "__esModule") return;
|
|
16
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
-
if (key in exports && exports[key] === _config[key]) return;
|
|
18
|
-
Object.defineProperty(exports, key, {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _config[key];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
var _createAppModifier = require("./app/createAppModifier");
|
|
26
|
-
Object.keys(_createAppModifier).forEach(function (key) {
|
|
27
|
-
if (key === "default" || key === "__esModule") return;
|
|
28
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
29
|
-
if (key in exports && exports[key] === _createAppModifier[key]) return;
|
|
30
|
-
Object.defineProperty(exports, key, {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _createAppModifier[key];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
const createAuditLogs = () => {
|
|
38
|
-
const subscriptionsPlugin = new _api.ContextPlugin(async context => {
|
|
39
|
-
if (!context.wcp.canUseFeature("auditLogs")) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
(0, _subscriptions.createSubscriptionHooks)(context);
|
|
43
|
-
});
|
|
44
|
-
subscriptionsPlugin.name = "auditLogs.context.subscriptions";
|
|
45
|
-
return [subscriptionsPlugin, (0, _app.createAcoAuditLogsContext)()];
|
|
46
|
-
};
|
|
47
|
-
exports.createAuditLogs = createAuditLogs;
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./config.js";
|
|
2
|
+
export { AuditLogsFeature } from "./AuditLogsFeature.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-audit-logs",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.0.0-unstable.eb81deee7e",
|
|
4
|
+
"exports": {
|
|
5
|
+
".": "./index.js",
|
|
6
|
+
"./*": "./*"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
5
9
|
"repository": {
|
|
6
10
|
"type": "git",
|
|
7
11
|
"url": "https://github.com/webiny/webiny-js.git",
|
|
@@ -15,33 +19,37 @@
|
|
|
15
19
|
"watch": "node ../cli/bin.js run watch"
|
|
16
20
|
},
|
|
17
21
|
"publishConfig": {
|
|
18
|
-
"access": "public"
|
|
19
|
-
"directory": "dist"
|
|
22
|
+
"access": "public"
|
|
20
23
|
},
|
|
21
24
|
"devDependencies": {
|
|
22
|
-
"@webiny/api-
|
|
23
|
-
"@webiny/
|
|
24
|
-
"@webiny/
|
|
25
|
-
"@webiny/
|
|
26
|
-
"@webiny/
|
|
27
|
-
"@webiny/
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"@webiny/plugins": "0.0.0-unstable.eb196ccd2f",
|
|
32
|
-
"@webiny/project-utils": "0.0.0-unstable.eb196ccd2f",
|
|
33
|
-
"graphql": "15.9.0",
|
|
34
|
-
"typescript": "5.3.3"
|
|
25
|
+
"@webiny/api-headless-cms-testing": "0.0.0-unstable.eb81deee7e",
|
|
26
|
+
"@webiny/db-dynamodb": "0.0.0-unstable.eb81deee7e",
|
|
27
|
+
"@webiny/di": "1.1.0",
|
|
28
|
+
"@webiny/event-handler-core": "0.0.0-unstable.eb81deee7e",
|
|
29
|
+
"@webiny/handler": "0.0.0-unstable.eb81deee7e",
|
|
30
|
+
"@webiny/plugins": "0.0.0-unstable.eb81deee7e",
|
|
31
|
+
"graphql": "16.14.2",
|
|
32
|
+
"typescript": "7.0.2",
|
|
33
|
+
"vitest": "4.1.11"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@webiny/api": "0.0.0-unstable.
|
|
38
|
-
"@webiny/api-aco": "0.0.0-unstable.
|
|
39
|
-
"@webiny/api-
|
|
40
|
-
"@webiny/api-
|
|
41
|
-
"@webiny/
|
|
42
|
-
"@webiny/
|
|
43
|
-
"@webiny/
|
|
44
|
-
"@webiny/
|
|
36
|
+
"@webiny/api": "0.0.0-unstable.eb81deee7e",
|
|
37
|
+
"@webiny/api-aco": "0.0.0-unstable.eb81deee7e",
|
|
38
|
+
"@webiny/api-core": "0.0.0-unstable.eb81deee7e",
|
|
39
|
+
"@webiny/api-file-manager": "0.0.0-unstable.eb81deee7e",
|
|
40
|
+
"@webiny/api-graphql": "0.0.0-unstable.eb81deee7e",
|
|
41
|
+
"@webiny/api-headless-cms": "0.0.0-unstable.eb81deee7e",
|
|
42
|
+
"@webiny/api-mailer": "0.0.0-unstable.eb81deee7e",
|
|
43
|
+
"@webiny/api-website-builder": "0.0.0-unstable.eb81deee7e",
|
|
44
|
+
"@webiny/build-tools": "0.0.0-unstable.eb81deee7e",
|
|
45
|
+
"@webiny/common-audit-logs": "0.0.0-unstable.eb81deee7e",
|
|
46
|
+
"@webiny/error": "0.0.0-unstable.eb81deee7e",
|
|
47
|
+
"@webiny/feature": "0.0.0-unstable.eb81deee7e",
|
|
48
|
+
"@webiny/utils": "0.0.0-unstable.eb81deee7e",
|
|
49
|
+
"@webiny/wcp": "0.0.0-unstable.eb81deee7e",
|
|
50
|
+
"zod": "4.4.3"
|
|
45
51
|
},
|
|
46
|
-
"
|
|
52
|
+
"webiny": {
|
|
53
|
+
"publishFrom": "dist"
|
|
54
|
+
}
|
|
47
55
|
}
|