@webiny/api-audit-logs 0.0.0-unstable.a9593f74dd → 0.0.0-unstable.b6d7105cee
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/README.md +11 -1
- package/abstractions.d.ts +10 -0
- package/abstractions.js +6 -0
- package/abstractions.js.map +1 -0
- package/config.d.ts +0 -11
- package/config.js +4 -282
- package/config.js.map +1 -1
- package/context/AuditLogsContextValue.d.ts +10 -0
- package/context/AuditLogsContextValue.js +129 -0
- package/context/AuditLogsContextValue.js.map +1 -0
- package/context/index.d.ts +6 -0
- package/context/index.js +25 -0
- package/context/index.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 +43 -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/graphql/schema.d.ts +3 -0
- package/graphql/schema.js +115 -0
- package/graphql/schema.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 +5 -4
- package/index.js +21 -46
- package/index.js.map +1 -1
- package/package.json +35 -37
- 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 +36 -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 +39 -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 +42 -0
- package/subscriptions/aco/handlers/AuditLogFolderAfterUpdateHandler.js.map +1 -0
- package/subscriptions/aco/index.d.ts +1 -1
- 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 +41 -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 +38 -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 +40 -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 +31 -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 +31 -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 +34 -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 +34 -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 +32 -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 +37 -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 +32 -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 +32 -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 +32 -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 +35 -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 +32 -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 +32 -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 +31 -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 +31 -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 +34 -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 +31 -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 +31 -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 +34 -0
- package/subscriptions/headlessCms/handlers/AuditLogModelAfterUpdateEventHandler.js.map +1 -0
- package/subscriptions/headlessCms/index.d.ts +1 -1
- package/subscriptions/headlessCms/index.js +30 -27
- package/subscriptions/headlessCms/index.js.map +1 -1
- package/subscriptions/index.d.ts +1 -1
- package/subscriptions/index.js +16 -26
- package/subscriptions/index.js.map +1 -1
- package/subscriptions/mailer/handlers/AuditLogMailerSettingsAfterSaveHandler.d.ts +11 -0
- package/subscriptions/mailer/handlers/AuditLogMailerSettingsAfterSaveHandler.js +33 -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 +41 -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 +41 -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 +45 -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 +31 -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 +31 -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 +34 -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 +31 -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 +31 -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 +34 -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 +31 -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 +31 -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 +34 -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 +31 -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 +31 -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 +31 -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 +34 -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 +31 -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 +31 -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 +31 -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 +34 -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 +31 -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 +31 -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 +31 -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 +34 -0
- package/subscriptions/websiteBuilder/redirects/RedirectAfterUpdateHandler.js.map +1 -0
- package/types.d.ts +37 -43
- 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/getAuditConfig.d.ts +4 -36
- package/utils/getAuditConfig.js +75 -130
- package/utils/getAuditConfig.js.map +1 -1
- 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 -120
- package/app/app.js.map +0 -1
- package/app/contants.d.ts +0 -2
- package/app/contants.js +0 -12
- 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/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/formBuilder/formRevisions.d.ts +0 -6
- package/subscriptions/formBuilder/formRevisions.js +0 -96
- package/subscriptions/formBuilder/formRevisions.js.map +0 -1
- package/subscriptions/formBuilder/formSubmissions.d.ts +0 -2
- package/subscriptions/formBuilder/formSubmissions.js +0 -28
- package/subscriptions/formBuilder/formSubmissions.js.map +0 -1
- package/subscriptions/formBuilder/forms.d.ts +0 -5
- package/subscriptions/formBuilder/forms.js +0 -76
- package/subscriptions/formBuilder/forms.js.map +0 -1
- package/subscriptions/formBuilder/index.d.ts +0 -2
- package/subscriptions/formBuilder/index.js +0 -26
- package/subscriptions/formBuilder/index.js.map +0 -1
- package/subscriptions/formBuilder/settings.d.ts +0 -2
- package/subscriptions/formBuilder/settings.js +0 -32
- package/subscriptions/formBuilder/settings.js.map +0 -1
- package/subscriptions/headlessCms/entries.d.ts +0 -8
- package/subscriptions/headlessCms/entries.js +0 -157
- 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/pageBuilder/blockCategories.d.ts +0 -4
- package/subscriptions/pageBuilder/blockCategories.js +0 -64
- package/subscriptions/pageBuilder/blockCategories.js.map +0 -1
- package/subscriptions/pageBuilder/blocks.d.ts +0 -6
- package/subscriptions/pageBuilder/blocks.js +0 -96
- package/subscriptions/pageBuilder/blocks.js.map +0 -1
- package/subscriptions/pageBuilder/categories.d.ts +0 -4
- package/subscriptions/pageBuilder/categories.js +0 -64
- package/subscriptions/pageBuilder/categories.js.map +0 -1
- package/subscriptions/pageBuilder/index.d.ts +0 -2
- package/subscriptions/pageBuilder/index.js +0 -51
- package/subscriptions/pageBuilder/index.js.map +0 -1
- package/subscriptions/pageBuilder/menus.d.ts +0 -4
- package/subscriptions/pageBuilder/menus.js +0 -64
- package/subscriptions/pageBuilder/menus.js.map +0 -1
- package/subscriptions/pageBuilder/pageElements.d.ts +0 -4
- package/subscriptions/pageBuilder/pageElements.js +0 -64
- package/subscriptions/pageBuilder/pageElements.js.map +0 -1
- package/subscriptions/pageBuilder/pageRevisions.d.ts +0 -6
- package/subscriptions/pageBuilder/pageRevisions.js +0 -101
- package/subscriptions/pageBuilder/pageRevisions.js.map +0 -1
- package/subscriptions/pageBuilder/pages.d.ts +0 -4
- package/subscriptions/pageBuilder/pages.js +0 -60
- package/subscriptions/pageBuilder/pages.js.map +0 -1
- package/subscriptions/pageBuilder/settings.d.ts +0 -2
- package/subscriptions/pageBuilder/settings.js +0 -32
- package/subscriptions/pageBuilder/settings.js.map +0 -1
- package/subscriptions/pageBuilder/templates.d.ts +0 -6
- package/subscriptions/pageBuilder/templates.js +0 -96
- package/subscriptions/pageBuilder/templates.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/compressor.d.ts +0 -11
- package/utils/compressor.js +0 -110
- package/utils/compressor.js.map +0 -1
package/README.md
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
# @webiny/api-audit-logs
|
|
1
|
+
# @webiny/api-audit-logs
|
|
2
|
+
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> This package is part of the [Webiny](https://www.webiny.com) monorepo.
|
|
5
|
+
> It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
|
|
6
|
+
|
|
7
|
+
📘 **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
_This README file is automatically generated during the publish process._
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuditLogsContext as Context } from "./types.js";
|
|
2
|
+
import type { IStorage } from "./storage/abstractions/Storage.js";
|
|
3
|
+
export declare const AuditLogsContext: import("@webiny/di").Abstraction<Context>;
|
|
4
|
+
export declare namespace AuditLogsContext {
|
|
5
|
+
type Interface = Context;
|
|
6
|
+
}
|
|
7
|
+
export declare const AuditLogsStorage: import("@webiny/di").Abstraction<IStorage>;
|
|
8
|
+
export declare namespace AuditLogsStorage {
|
|
9
|
+
type Interface = IStorage;
|
|
10
|
+
}
|
package/abstractions.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createAbstraction } from "@webiny/feature/api";
|
|
2
|
+
const AuditLogsContext = createAbstraction("AuditLogsContext");
|
|
3
|
+
const AuditLogsStorage = createAbstraction("AuditLogsStorage");
|
|
4
|
+
export { AuditLogsContext, AuditLogsStorage };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=abstractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstractions.js","sources":["../src/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { AuditLogsContext as Context } from \"~/types.js\";\nimport type { IStorage } from \"~/storage/abstractions/Storage.js\";\n\n// TODO: this is a bridge for legacy context; needs review and refactor of code that uses it.\n\nexport const AuditLogsContext = createAbstraction<Context>(\"AuditLogsContext\");\n\nexport namespace AuditLogsContext {\n export type Interface = Context;\n}\n\nexport const AuditLogsStorage = createAbstraction<IStorage>(\"AuditLogsStorage\");\n\nexport namespace AuditLogsStorage {\n export type Interface = IStorage;\n}\n"],"names":["AuditLogsContext","createAbstraction","AuditLogsStorage"],"mappings":";AAMO,MAAMA,mBAAmBC,kBAA2B;AAMpD,MAAMC,mBAAmBD,kBAA4B"}
|
package/config.d.ts
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
import { App } from "./types";
|
|
2
|
-
export declare enum ActionType {
|
|
3
|
-
CREATE = "CREATE",
|
|
4
|
-
UPDATE = "UPDATE",
|
|
5
|
-
DELETE = "DELETE",
|
|
6
|
-
PUBLISH = "PUBLISH",
|
|
7
|
-
UNPUBLISH = "UNPUBLISH",
|
|
8
|
-
IMPORT = "IMPORT",
|
|
9
|
-
EXPORT = "EXPORT"
|
|
10
|
-
}
|
|
11
|
-
export declare const auditLogsApps: App[];
|
|
12
1
|
export declare const AUDIT: import("./types").AuditObject;
|
package/config.js
CHANGED
|
@@ -1,284 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.auditLogsApps = exports.ActionType = exports.AUDIT = void 0;
|
|
7
|
-
var _getAuditObject = require("./utils/getAuditObject");
|
|
8
|
-
let ActionType = /*#__PURE__*/function (ActionType) {
|
|
9
|
-
ActionType["CREATE"] = "CREATE";
|
|
10
|
-
ActionType["UPDATE"] = "UPDATE";
|
|
11
|
-
ActionType["DELETE"] = "DELETE";
|
|
12
|
-
ActionType["PUBLISH"] = "PUBLISH";
|
|
13
|
-
ActionType["UNPUBLISH"] = "UNPUBLISH";
|
|
14
|
-
ActionType["IMPORT"] = "IMPORT";
|
|
15
|
-
ActionType["EXPORT"] = "EXPORT";
|
|
16
|
-
return ActionType;
|
|
17
|
-
}({});
|
|
18
|
-
exports.ActionType = ActionType;
|
|
19
|
-
const commonActions = {
|
|
20
|
-
CREATE: {
|
|
21
|
-
type: ActionType.CREATE,
|
|
22
|
-
displayName: "Create"
|
|
23
|
-
},
|
|
24
|
-
UPDATE: {
|
|
25
|
-
type: ActionType.UPDATE,
|
|
26
|
-
displayName: "Update"
|
|
27
|
-
},
|
|
28
|
-
DELETE: {
|
|
29
|
-
type: ActionType.DELETE,
|
|
30
|
-
displayName: "Delete"
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const publishActions = {
|
|
34
|
-
PUBLISH: {
|
|
35
|
-
type: ActionType.PUBLISH,
|
|
36
|
-
displayName: "Publish"
|
|
37
|
-
},
|
|
38
|
-
UNPUBLISH: {
|
|
39
|
-
type: ActionType.UNPUBLISH,
|
|
40
|
-
displayName: "Unpublish"
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const importExportActions = {
|
|
44
|
-
IMPORT: {
|
|
45
|
-
type: ActionType.IMPORT,
|
|
46
|
-
displayName: "Import"
|
|
47
|
-
},
|
|
48
|
-
EXPORT: {
|
|
49
|
-
type: ActionType.EXPORT,
|
|
50
|
-
displayName: "Export"
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
const auditLogsApps = [{
|
|
54
|
-
app: "APW",
|
|
55
|
-
displayName: "APW",
|
|
56
|
-
entities: [{
|
|
57
|
-
type: "CHANGE_REQUEST",
|
|
58
|
-
displayName: "Change Request",
|
|
59
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE, {
|
|
60
|
-
type: "MARK_RESOLVED",
|
|
61
|
-
displayName: "Mark resolved"
|
|
62
|
-
}, {
|
|
63
|
-
type: "MARK_UNRESOLVED",
|
|
64
|
-
displayName: "Mark unresolved"
|
|
65
|
-
}]
|
|
66
|
-
}, {
|
|
67
|
-
type: "COMMENT",
|
|
68
|
-
displayName: "Comment",
|
|
69
|
-
actions: [commonActions.CREATE]
|
|
70
|
-
}, {
|
|
71
|
-
type: "CONTENT_REVIEW",
|
|
72
|
-
displayName: "Content Review",
|
|
73
|
-
linkToEntity(id) {
|
|
74
|
-
return `/apw/content-reviews/${id}`;
|
|
75
|
-
},
|
|
76
|
-
actions: [commonActions.CREATE]
|
|
77
|
-
}, {
|
|
78
|
-
type: "WORKFLOW",
|
|
79
|
-
displayName: "Workflow",
|
|
80
|
-
linkToEntity(id) {
|
|
81
|
-
return `/apw/publishing-workflows?id=${id}`;
|
|
82
|
-
},
|
|
83
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
84
|
-
}]
|
|
85
|
-
}, {
|
|
86
|
-
app: "FILE_MANAGER",
|
|
87
|
-
displayName: "File Manager",
|
|
88
|
-
entities: [{
|
|
89
|
-
type: "FILE",
|
|
90
|
-
displayName: "File",
|
|
91
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
92
|
-
}, {
|
|
93
|
-
type: "FILE_FOLDER",
|
|
94
|
-
displayName: "File folder",
|
|
95
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
96
|
-
}, {
|
|
97
|
-
type: "SETTINGS",
|
|
98
|
-
displayName: "Settings",
|
|
99
|
-
actions: [commonActions.UPDATE]
|
|
100
|
-
}]
|
|
101
|
-
}, {
|
|
102
|
-
app: "FORM_BUILDER",
|
|
103
|
-
displayName: "Form Builder",
|
|
104
|
-
entities: [{
|
|
105
|
-
type: "FORM",
|
|
106
|
-
displayName: "Form",
|
|
107
|
-
linkToEntity(id) {
|
|
108
|
-
return `/form-builder/forms?id=${id}`;
|
|
109
|
-
},
|
|
110
|
-
actions: [commonActions.CREATE, commonActions.DELETE, importExportActions.EXPORT, importExportActions.IMPORT]
|
|
111
|
-
}, {
|
|
112
|
-
type: "FORM_REVISION",
|
|
113
|
-
displayName: "Form revision",
|
|
114
|
-
linkToEntity(id) {
|
|
115
|
-
return `/form-builder/forms?id=${id}`;
|
|
116
|
-
},
|
|
117
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE, publishActions.PUBLISH, publishActions.UNPUBLISH]
|
|
118
|
-
}, {
|
|
119
|
-
type: "FORM_SUBMISSION",
|
|
120
|
-
displayName: "Form submission",
|
|
121
|
-
actions: [importExportActions.EXPORT]
|
|
122
|
-
}, {
|
|
123
|
-
type: "SETTINGS",
|
|
124
|
-
displayName: "Settings",
|
|
125
|
-
actions: [commonActions.UPDATE]
|
|
126
|
-
}]
|
|
127
|
-
}, {
|
|
128
|
-
app: "HEADLESS_CMS",
|
|
129
|
-
displayName: "Headless CMS",
|
|
130
|
-
entities: [{
|
|
131
|
-
type: "ENTRY",
|
|
132
|
-
displayName: "Entry",
|
|
133
|
-
actions: [commonActions.CREATE, commonActions.DELETE]
|
|
134
|
-
}, {
|
|
135
|
-
type: "ENTRY_REVISION",
|
|
136
|
-
displayName: "Entry revision",
|
|
137
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE, publishActions.PUBLISH, publishActions.UNPUBLISH]
|
|
138
|
-
}, {
|
|
139
|
-
type: "GROUP",
|
|
140
|
-
displayName: "Group",
|
|
141
|
-
linkToEntity(id) {
|
|
142
|
-
return `/cms/content-model-groups?id=${id}`;
|
|
143
|
-
},
|
|
144
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
145
|
-
}, {
|
|
146
|
-
type: "MODEL",
|
|
147
|
-
displayName: "Model",
|
|
148
|
-
linkToEntity(modelId) {
|
|
149
|
-
return `/cms/content-models/${modelId}`;
|
|
150
|
-
},
|
|
151
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
152
|
-
}, {
|
|
153
|
-
type: "MODEL_FOLDER",
|
|
154
|
-
displayName: "Model folder",
|
|
155
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
156
|
-
}]
|
|
157
|
-
}, {
|
|
158
|
-
app: "I18N",
|
|
159
|
-
displayName: "i18n",
|
|
160
|
-
entities: [{
|
|
161
|
-
type: "LOCALE",
|
|
162
|
-
displayName: "Locale",
|
|
163
|
-
linkToEntity(id) {
|
|
164
|
-
return `/i18n/locales?code=${id}`;
|
|
165
|
-
},
|
|
166
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
167
|
-
}]
|
|
168
|
-
}, {
|
|
169
|
-
app: "MAILER",
|
|
170
|
-
displayName: "Mailer",
|
|
171
|
-
entities: [{
|
|
172
|
-
type: "SETTINGS",
|
|
173
|
-
displayName: "Settings",
|
|
174
|
-
actions: [commonActions.UPDATE]
|
|
175
|
-
}]
|
|
176
|
-
}, {
|
|
177
|
-
app: "PAGE_BUILDER",
|
|
178
|
-
displayName: "Page Builder",
|
|
179
|
-
entities: [{
|
|
180
|
-
type: "BLOCK",
|
|
181
|
-
displayName: "Block",
|
|
182
|
-
linkToEntity(id) {
|
|
183
|
-
return `/page-builder/block-editor/${id}`;
|
|
184
|
-
},
|
|
185
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE, importExportActions.EXPORT, importExportActions.IMPORT]
|
|
186
|
-
}, {
|
|
187
|
-
type: "BLOCK_CATEGORY",
|
|
188
|
-
displayName: "Block category",
|
|
189
|
-
linkToEntity(slug) {
|
|
190
|
-
return `/page-builder/block-categories?slug=${slug}`;
|
|
191
|
-
},
|
|
192
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
193
|
-
}, {
|
|
194
|
-
type: "CATEGORY",
|
|
195
|
-
displayName: "Category",
|
|
196
|
-
linkToEntity(slug) {
|
|
197
|
-
return `/page-builder/categories?slug=${slug}`;
|
|
198
|
-
},
|
|
199
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
200
|
-
}, {
|
|
201
|
-
type: "MENU",
|
|
202
|
-
displayName: "Menu",
|
|
203
|
-
linkToEntity(slug) {
|
|
204
|
-
return `/page-builder/menus?slug=${slug}`;
|
|
205
|
-
},
|
|
206
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
207
|
-
}, {
|
|
208
|
-
type: "PAGE",
|
|
209
|
-
displayName: "Page",
|
|
210
|
-
linkToEntity(id) {
|
|
211
|
-
return `/page-builder/editor/${id}`;
|
|
212
|
-
},
|
|
213
|
-
actions: [commonActions.CREATE, commonActions.DELETE, importExportActions.EXPORT, importExportActions.IMPORT]
|
|
214
|
-
}, {
|
|
215
|
-
type: "PAGE_ELEMENT",
|
|
216
|
-
displayName: "Page element",
|
|
217
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
218
|
-
}, {
|
|
219
|
-
type: "PAGE_FOLDER",
|
|
220
|
-
displayName: "Page folder",
|
|
221
|
-
linkToEntity(id) {
|
|
222
|
-
return `/page-builder/pages?folderId=${id}`;
|
|
223
|
-
},
|
|
224
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
225
|
-
}, {
|
|
226
|
-
type: "PAGE_REVISION",
|
|
227
|
-
displayName: "Page revision",
|
|
228
|
-
linkToEntity(id) {
|
|
229
|
-
return `/page-builder/editor/${id}`;
|
|
230
|
-
},
|
|
231
|
-
actions: [commonActions.CREATE, {
|
|
232
|
-
...commonActions.UPDATE,
|
|
233
|
-
newEntryDelay: 60
|
|
234
|
-
}, commonActions.DELETE, publishActions.PUBLISH, publishActions.UNPUBLISH]
|
|
235
|
-
}, {
|
|
236
|
-
type: "SETTINGS",
|
|
237
|
-
displayName: "Settings",
|
|
238
|
-
actions: [commonActions.UPDATE]
|
|
239
|
-
}, {
|
|
240
|
-
type: "TEMPLATE",
|
|
241
|
-
displayName: "Template",
|
|
242
|
-
linkToEntity(id) {
|
|
243
|
-
return `/page-builder/page-templates?id=${id}`;
|
|
244
|
-
},
|
|
245
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE, importExportActions.EXPORT, importExportActions.IMPORT]
|
|
246
|
-
}]
|
|
247
|
-
}, {
|
|
248
|
-
app: "SECURITY",
|
|
249
|
-
displayName: "Security",
|
|
250
|
-
entities: [{
|
|
251
|
-
type: "API_KEY",
|
|
252
|
-
displayName: "API Key",
|
|
253
|
-
linkToEntity(id) {
|
|
254
|
-
return `/access-management/api-keys?id=${id}`;
|
|
255
|
-
},
|
|
256
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
257
|
-
}, {
|
|
258
|
-
type: "ROLE",
|
|
259
|
-
displayName: "Role",
|
|
260
|
-
linkToEntity(id) {
|
|
261
|
-
return `/access-management/roles?id=${id}`;
|
|
262
|
-
},
|
|
263
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
264
|
-
}, {
|
|
265
|
-
type: "TEAM",
|
|
266
|
-
displayName: "Team",
|
|
267
|
-
linkToEntity(id) {
|
|
268
|
-
return `/access-management/teams?id=${id}`;
|
|
269
|
-
},
|
|
270
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
271
|
-
}, {
|
|
272
|
-
type: "USER",
|
|
273
|
-
displayName: "User",
|
|
274
|
-
linkToEntity(id) {
|
|
275
|
-
return `/admin-users?id=${id}`;
|
|
276
|
-
},
|
|
277
|
-
actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]
|
|
278
|
-
}]
|
|
279
|
-
}];
|
|
280
|
-
exports.auditLogsApps = auditLogsApps;
|
|
281
|
-
const AUDIT = (0, _getAuditObject.getAuditObject)(auditLogsApps);
|
|
282
|
-
exports.AUDIT = AUDIT;
|
|
1
|
+
import { getAuditObject } from "./utils/getAuditObject.js";
|
|
2
|
+
import { apps } from "@webiny/common-audit-logs";
|
|
3
|
+
const AUDIT = getAuditObject(apps);
|
|
4
|
+
export { AUDIT };
|
|
283
5
|
|
|
284
6
|
//# sourceMappingURL=config.js.map
|
package/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_getAuditObject","require","ActionType","exports","commonActions","CREATE","type","displayName","UPDATE","DELETE","publishActions","PUBLISH","UNPUBLISH","importExportActions","IMPORT","EXPORT","auditLogsApps","app","entities","actions","linkToEntity","id","modelId","slug","newEntryDelay","AUDIT","getAuditObject"],"sources":["config.ts"],"sourcesContent":["import { getAuditObject } from \"~/utils/getAuditObject\";\nimport { App } from \"~/types\";\n\nexport enum ActionType {\n CREATE = \"CREATE\",\n UPDATE = \"UPDATE\",\n DELETE = \"DELETE\",\n PUBLISH = \"PUBLISH\",\n UNPUBLISH = \"UNPUBLISH\",\n IMPORT = \"IMPORT\",\n EXPORT = \"EXPORT\"\n}\n\nconst commonActions = {\n CREATE: { type: ActionType.CREATE, displayName: \"Create\" },\n UPDATE: { type: ActionType.UPDATE, displayName: \"Update\" },\n DELETE: { type: ActionType.DELETE, displayName: \"Delete\" }\n};\n\nconst publishActions = {\n PUBLISH: { type: ActionType.PUBLISH, displayName: \"Publish\" },\n UNPUBLISH: { type: ActionType.UNPUBLISH, displayName: \"Unpublish\" }\n};\n\nconst importExportActions = {\n IMPORT: { type: ActionType.IMPORT, displayName: \"Import\" },\n EXPORT: { type: ActionType.EXPORT, displayName: \"Export\" }\n};\n\nexport const auditLogsApps: App[] = [\n {\n app: \"APW\",\n displayName: \"APW\",\n entities: [\n {\n type: \"CHANGE_REQUEST\",\n displayName: \"Change Request\",\n actions: [\n commonActions.CREATE,\n commonActions.UPDATE,\n commonActions.DELETE,\n { type: \"MARK_RESOLVED\", displayName: \"Mark resolved\" },\n { type: \"MARK_UNRESOLVED\", displayName: \"Mark unresolved\" }\n ]\n },\n {\n type: \"COMMENT\",\n displayName: \"Comment\",\n actions: [commonActions.CREATE]\n },\n {\n type: \"CONTENT_REVIEW\",\n displayName: \"Content Review\",\n linkToEntity(id) {\n return `/apw/content-reviews/${id}`;\n },\n actions: [commonActions.CREATE]\n },\n {\n type: \"WORKFLOW\",\n displayName: \"Workflow\",\n linkToEntity(id) {\n return `/apw/publishing-workflows?id=${id}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n }\n ]\n },\n {\n app: \"FILE_MANAGER\",\n displayName: \"File Manager\",\n entities: [\n {\n type: \"FILE\",\n displayName: \"File\",\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"FILE_FOLDER\",\n displayName: \"File folder\",\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"SETTINGS\",\n displayName: \"Settings\",\n actions: [commonActions.UPDATE]\n }\n ]\n },\n {\n app: \"FORM_BUILDER\",\n displayName: \"Form Builder\",\n entities: [\n {\n type: \"FORM\",\n displayName: \"Form\",\n linkToEntity(id) {\n return `/form-builder/forms?id=${id}`;\n },\n actions: [\n commonActions.CREATE,\n commonActions.DELETE,\n importExportActions.EXPORT,\n importExportActions.IMPORT\n ]\n },\n {\n type: \"FORM_REVISION\",\n displayName: \"Form revision\",\n linkToEntity(id) {\n return `/form-builder/forms?id=${id}`;\n },\n actions: [\n commonActions.CREATE,\n commonActions.UPDATE,\n commonActions.DELETE,\n publishActions.PUBLISH,\n publishActions.UNPUBLISH\n ]\n },\n {\n type: \"FORM_SUBMISSION\",\n displayName: \"Form submission\",\n actions: [importExportActions.EXPORT]\n },\n {\n type: \"SETTINGS\",\n displayName: \"Settings\",\n actions: [commonActions.UPDATE]\n }\n ]\n },\n {\n app: \"HEADLESS_CMS\",\n displayName: \"Headless CMS\",\n entities: [\n {\n type: \"ENTRY\",\n displayName: \"Entry\",\n actions: [commonActions.CREATE, commonActions.DELETE]\n },\n {\n type: \"ENTRY_REVISION\",\n displayName: \"Entry revision\",\n actions: [\n commonActions.CREATE,\n commonActions.UPDATE,\n commonActions.DELETE,\n publishActions.PUBLISH,\n publishActions.UNPUBLISH\n ]\n },\n {\n type: \"GROUP\",\n displayName: \"Group\",\n linkToEntity(id) {\n return `/cms/content-model-groups?id=${id}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"MODEL\",\n displayName: \"Model\",\n linkToEntity(modelId) {\n return `/cms/content-models/${modelId}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"MODEL_FOLDER\",\n displayName: \"Model folder\",\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n }\n ]\n },\n {\n app: \"I18N\",\n displayName: \"i18n\",\n entities: [\n {\n type: \"LOCALE\",\n displayName: \"Locale\",\n linkToEntity(id) {\n return `/i18n/locales?code=${id}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n }\n ]\n },\n {\n app: \"MAILER\",\n displayName: \"Mailer\",\n entities: [\n {\n type: \"SETTINGS\",\n displayName: \"Settings\",\n actions: [commonActions.UPDATE]\n }\n ]\n },\n {\n app: \"PAGE_BUILDER\",\n displayName: \"Page Builder\",\n entities: [\n {\n type: \"BLOCK\",\n displayName: \"Block\",\n linkToEntity(id) {\n return `/page-builder/block-editor/${id}`;\n },\n actions: [\n commonActions.CREATE,\n commonActions.UPDATE,\n commonActions.DELETE,\n importExportActions.EXPORT,\n importExportActions.IMPORT\n ]\n },\n {\n type: \"BLOCK_CATEGORY\",\n displayName: \"Block category\",\n linkToEntity(slug) {\n return `/page-builder/block-categories?slug=${slug}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"CATEGORY\",\n displayName: \"Category\",\n linkToEntity(slug) {\n return `/page-builder/categories?slug=${slug}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"MENU\",\n displayName: \"Menu\",\n linkToEntity(slug) {\n return `/page-builder/menus?slug=${slug}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"PAGE\",\n displayName: \"Page\",\n linkToEntity(id) {\n return `/page-builder/editor/${id}`;\n },\n actions: [\n commonActions.CREATE,\n commonActions.DELETE,\n importExportActions.EXPORT,\n importExportActions.IMPORT\n ]\n },\n {\n type: \"PAGE_ELEMENT\",\n displayName: \"Page element\",\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"PAGE_FOLDER\",\n displayName: \"Page folder\",\n linkToEntity(id) {\n return `/page-builder/pages?folderId=${id}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"PAGE_REVISION\",\n displayName: \"Page revision\",\n linkToEntity(id) {\n return `/page-builder/editor/${id}`;\n },\n actions: [\n commonActions.CREATE,\n { ...commonActions.UPDATE, newEntryDelay: 60 },\n commonActions.DELETE,\n publishActions.PUBLISH,\n publishActions.UNPUBLISH\n ]\n },\n {\n type: \"SETTINGS\",\n displayName: \"Settings\",\n actions: [commonActions.UPDATE]\n },\n {\n type: \"TEMPLATE\",\n displayName: \"Template\",\n linkToEntity(id) {\n return `/page-builder/page-templates?id=${id}`;\n },\n actions: [\n commonActions.CREATE,\n commonActions.UPDATE,\n commonActions.DELETE,\n importExportActions.EXPORT,\n importExportActions.IMPORT\n ]\n }\n ]\n },\n {\n app: \"SECURITY\",\n displayName: \"Security\",\n entities: [\n {\n type: \"API_KEY\",\n displayName: \"API Key\",\n linkToEntity(id) {\n return `/access-management/api-keys?id=${id}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"ROLE\",\n displayName: \"Role\",\n linkToEntity(id) {\n return `/access-management/roles?id=${id}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"TEAM\",\n displayName: \"Team\",\n linkToEntity(id) {\n return `/access-management/teams?id=${id}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n },\n {\n type: \"USER\",\n displayName: \"User\",\n linkToEntity(id) {\n return `/admin-users?id=${id}`;\n },\n actions: [commonActions.CREATE, commonActions.UPDATE, commonActions.DELETE]\n }\n ]\n }\n];\n\nexport const AUDIT = getAuditObject(auditLogsApps);\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAwD,IAG5CC,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA;AAAAC,OAAA,CAAAD,UAAA,GAAAA,UAAA;AAUtB,MAAME,aAAa,GAAG;EAClBC,MAAM,EAAE;IAAEC,IAAI,EAAEJ,UAAU,CAACG,MAAM;IAAEE,WAAW,EAAE;EAAS,CAAC;EAC1DC,MAAM,EAAE;IAAEF,IAAI,EAAEJ,UAAU,CAACM,MAAM;IAAED,WAAW,EAAE;EAAS,CAAC;EAC1DE,MAAM,EAAE;IAAEH,IAAI,EAAEJ,UAAU,CAACO,MAAM;IAAEF,WAAW,EAAE;EAAS;AAC7D,CAAC;AAED,MAAMG,cAAc,GAAG;EACnBC,OAAO,EAAE;IAAEL,IAAI,EAAEJ,UAAU,CAACS,OAAO;IAAEJ,WAAW,EAAE;EAAU,CAAC;EAC7DK,SAAS,EAAE;IAAEN,IAAI,EAAEJ,UAAU,CAACU,SAAS;IAAEL,WAAW,EAAE;EAAY;AACtE,CAAC;AAED,MAAMM,mBAAmB,GAAG;EACxBC,MAAM,EAAE;IAAER,IAAI,EAAEJ,UAAU,CAACY,MAAM;IAA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ACIH,IAAI,EAAE,MAAM;IACZC,WAAW,EAAE,MAAM;IACnBa,YAAYA,CAACC,EAAE,EAAE;MACb,OAAQ,mBAAkBA,EAAG,EAAC;IAClC,CAAC;IACDF,OAAO,EAAE,CAACf,aAAa,CAACC,MAAM,EAAED,aAAa,CAACI,MAAM,EAAEJ,aAAa,CAACK,MAAM;EAC9E,CAAC;AAET,CAAC,CACJ;AAACN,OAAA,CAAAa,aAAA,GAAAA,aAAA;AAEK,MAAMS,KAAK,GAAG,IAAAC,8BAAc,EAACV,aAAa,CAAC;AAACb,OAAA,CAAAsB,KAAA,GAAAA,KAAA"}
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../src/config.ts"],"sourcesContent":["import { getAuditObject } from \"~/utils/getAuditObject.js\";\nimport { apps } from \"@webiny/common-audit-logs\";\n\nexport const AUDIT = getAuditObject(apps);\n"],"names":["AUDIT","getAuditObject","apps"],"mappings":";;AAGO,MAAMA,QAAQC,eAAeC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuditLogsContext, AuditLogsContextValue } from "../types.js";
|
|
2
|
+
import type { IStorage } from "../storage/abstractions/Storage.js";
|
|
3
|
+
import type { EventPublisher } from "@webiny/api-core/features/eventPublisher/index.js";
|
|
4
|
+
export interface IAuditLogsContextValueParams {
|
|
5
|
+
getContext: () => AuditLogsContext;
|
|
6
|
+
deleteLogsAfterDays: number;
|
|
7
|
+
storage: IStorage;
|
|
8
|
+
eventPublisher: EventPublisher.Interface;
|
|
9
|
+
}
|
|
10
|
+
export declare const createAuditLogsContextValue: (params: IAuditLogsContextValueParams) => AuditLogsContextValue;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { convertExpiresAtDaysToDate } from "../utils/expiresAt.js";
|
|
2
|
+
import { mdbid } from "@webiny/utils/mdbid.js";
|
|
3
|
+
import { NotAuthorizedError } from "@webiny/api-core/features/security/shared/index.js";
|
|
4
|
+
import { AuditLogAfterCreateEvent, AuditLogAfterUpdateEvent, AuditLogBeforeCreateEvent, AuditLogBeforeUpdateEvent } from "../events/index.js";
|
|
5
|
+
class AuditLogsContextValueImpl {
|
|
6
|
+
constructor(params){
|
|
7
|
+
this.getContext = params.getContext;
|
|
8
|
+
this.deleteLogsAfterDays = params.deleteLogsAfterDays;
|
|
9
|
+
this.storage = params.storage;
|
|
10
|
+
this.eventPublisher = params.eventPublisher;
|
|
11
|
+
}
|
|
12
|
+
async createAuditLog(payload) {
|
|
13
|
+
const context = this.getContext();
|
|
14
|
+
const expiresAt = convertExpiresAtDaysToDate(this.deleteLogsAfterDays);
|
|
15
|
+
const auditLog = {
|
|
16
|
+
id: mdbid(),
|
|
17
|
+
tenant: this.getTenantId(),
|
|
18
|
+
createdBy: this.getIdentity(),
|
|
19
|
+
createdOn: new Date(),
|
|
20
|
+
...payload,
|
|
21
|
+
content: JSON.stringify(payload.content),
|
|
22
|
+
expiresAt
|
|
23
|
+
};
|
|
24
|
+
await this.checkPermissions(auditLog);
|
|
25
|
+
const beforeCreateEvent = new AuditLogBeforeCreateEvent({
|
|
26
|
+
auditLog: auditLog,
|
|
27
|
+
context,
|
|
28
|
+
setAuditLog (input) {
|
|
29
|
+
Object.assign(auditLog, input);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
await this.eventPublisher.publish(beforeCreateEvent);
|
|
33
|
+
const result = await this.storage.store({
|
|
34
|
+
data: auditLog
|
|
35
|
+
});
|
|
36
|
+
if (result.success) {
|
|
37
|
+
const afterCreateEvent = new AuditLogAfterCreateEvent({
|
|
38
|
+
auditLog: auditLog,
|
|
39
|
+
context
|
|
40
|
+
});
|
|
41
|
+
await this.eventPublisher.publish(afterCreateEvent);
|
|
42
|
+
return result.data;
|
|
43
|
+
}
|
|
44
|
+
throw result.error;
|
|
45
|
+
}
|
|
46
|
+
async updateAuditLog(original, payload) {
|
|
47
|
+
const context = this.getContext();
|
|
48
|
+
const auditLog = {
|
|
49
|
+
...original,
|
|
50
|
+
...payload,
|
|
51
|
+
content: payload.content ? JSON.stringify(payload.content) : original.content
|
|
52
|
+
};
|
|
53
|
+
await this.checkPermissions(auditLog);
|
|
54
|
+
const beforeUpdateEvent = new AuditLogBeforeUpdateEvent({
|
|
55
|
+
original,
|
|
56
|
+
auditLog,
|
|
57
|
+
context,
|
|
58
|
+
setAuditLog (input) {
|
|
59
|
+
Object.assign(auditLog, input);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
await this.eventPublisher.publish(beforeUpdateEvent);
|
|
63
|
+
const result = await this.storage.store({
|
|
64
|
+
data: auditLog
|
|
65
|
+
});
|
|
66
|
+
if (result.success) {
|
|
67
|
+
const afterUpdateEvent = new AuditLogAfterUpdateEvent({
|
|
68
|
+
original: original,
|
|
69
|
+
auditLog: auditLog,
|
|
70
|
+
context
|
|
71
|
+
});
|
|
72
|
+
await this.eventPublisher.publish(afterUpdateEvent);
|
|
73
|
+
return result.data;
|
|
74
|
+
}
|
|
75
|
+
throw result.error;
|
|
76
|
+
}
|
|
77
|
+
async getAuditLog(id) {
|
|
78
|
+
const result = await this.storage.fetch({
|
|
79
|
+
id,
|
|
80
|
+
tenant: this.getTenantId()
|
|
81
|
+
});
|
|
82
|
+
if (result.success) {
|
|
83
|
+
await this.checkPermissions(result.data);
|
|
84
|
+
return result.data;
|
|
85
|
+
}
|
|
86
|
+
throw result.error;
|
|
87
|
+
}
|
|
88
|
+
async listAuditLogs(params) {
|
|
89
|
+
const result = await this.storage.list({
|
|
90
|
+
...params,
|
|
91
|
+
tenant: this.getTenantId()
|
|
92
|
+
});
|
|
93
|
+
if (result.success) return {
|
|
94
|
+
items: result.data,
|
|
95
|
+
meta: {
|
|
96
|
+
cursor: result.meta.after || null,
|
|
97
|
+
hasMoreItems: result.meta.hasMoreItems
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
throw result.error;
|
|
101
|
+
}
|
|
102
|
+
async checkPermissions(auditLog) {
|
|
103
|
+
if (!auditLog.action) throw new Error("Audit log action is not defined. Cannot check permissions.");
|
|
104
|
+
const permissions = await this.getContext().security.getPermissions("al.*");
|
|
105
|
+
for (const permission of permissions){
|
|
106
|
+
if ("*" === permission.name) return;
|
|
107
|
+
if ("al.*" === permission.name) return;
|
|
108
|
+
if (permission.name === `al.${auditLog.action}`) return;
|
|
109
|
+
}
|
|
110
|
+
throw new NotAuthorizedError({
|
|
111
|
+
message: "You cannot access audit logs."
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
getTenantId() {
|
|
115
|
+
return this.getContext().tenancy.getCurrentTenant().id;
|
|
116
|
+
}
|
|
117
|
+
getIdentity() {
|
|
118
|
+
const identity = this.getContext().security.getIdentity();
|
|
119
|
+
return {
|
|
120
|
+
id: identity.id,
|
|
121
|
+
type: identity.type,
|
|
122
|
+
displayName: identity.displayName || "unknown"
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
const createAuditLogsContextValue = (params)=>new AuditLogsContextValueImpl(params);
|
|
127
|
+
export { createAuditLogsContextValue };
|
|
128
|
+
|
|
129
|
+
//# sourceMappingURL=AuditLogsContextValue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context/AuditLogsContextValue.js","sources":["../../src/context/AuditLogsContextValue.ts"],"sourcesContent":["import type {\n AuditLogPayload,\n AuditLogsContext,\n AuditLogsContextValue,\n IListAuditLogsParams,\n IListAuditLogsResult\n} from \"~/types.js\";\nimport { convertExpiresAtDaysToDate } from \"~/utils/expiresAt.js\";\nimport type { IAuditLog, IAuditLogCreatedBy } from \"~/storage/types.js\";\nimport { mdbid } from \"@webiny/utils/mdbid.js\";\nimport type { IStorage, IStorageListParams } from \"~/storage/abstractions/Storage.js\";\nimport { NotAuthorizedError } from \"@webiny/api-core/features/security/shared/index.js\";\nimport type { EventPublisher } from \"@webiny/api-core/features/eventPublisher/index.js\";\nimport {\n AuditLogBeforeCreateEvent,\n AuditLogAfterCreateEvent,\n AuditLogBeforeUpdateEvent,\n AuditLogAfterUpdateEvent\n} from \"~/events/index.js\";\n\nexport interface IAuditLogsContextValueParams {\n getContext: () => AuditLogsContext;\n deleteLogsAfterDays: number;\n storage: IStorage;\n eventPublisher: EventPublisher.Interface;\n}\n\nclass AuditLogsContextValueImpl implements AuditLogsContextValue {\n private readonly getContext;\n public readonly deleteLogsAfterDays;\n private readonly storage: IStorage;\n private readonly eventPublisher: EventPublisher.Interface;\n\n public constructor(params: IAuditLogsContextValueParams) {\n this.getContext = params.getContext;\n this.deleteLogsAfterDays = params.deleteLogsAfterDays;\n this.storage = params.storage;\n this.eventPublisher = params.eventPublisher;\n }\n\n public async createAuditLog(payload: AuditLogPayload): Promise<IAuditLog> {\n const context = this.getContext();\n const expiresAt = convertExpiresAtDaysToDate(this.deleteLogsAfterDays);\n\n const auditLog: IAuditLog = {\n id: mdbid(),\n tenant: this.getTenantId(),\n createdBy: this.getIdentity(),\n createdOn: new Date(),\n ...payload,\n content: JSON.stringify(payload.content),\n expiresAt\n };\n await this.checkPermissions(auditLog);\n\n const beforeCreateEvent = new AuditLogBeforeCreateEvent({\n auditLog: auditLog,\n context,\n setAuditLog(input) {\n Object.assign(auditLog, input);\n }\n });\n await this.eventPublisher.publish(beforeCreateEvent);\n\n const result = await this.storage.store({\n data: auditLog\n });\n if (result.success) {\n const afterCreateEvent = new AuditLogAfterCreateEvent({\n auditLog: auditLog,\n context\n });\n await this.eventPublisher.publish(afterCreateEvent);\n return result.data;\n }\n throw result.error;\n }\n\n public async updateAuditLog(\n original: IAuditLog,\n payload: Partial<AuditLogPayload>\n ): Promise<IAuditLog> {\n const context = this.getContext();\n const auditLog: IAuditLog = {\n ...original,\n ...payload,\n content: payload.content ? JSON.stringify(payload.content) : original.content\n };\n await this.checkPermissions(auditLog);\n\n const beforeUpdateEvent = new AuditLogBeforeUpdateEvent({\n original,\n auditLog,\n context,\n setAuditLog(input) {\n Object.assign(auditLog, input);\n }\n });\n await this.eventPublisher.publish(beforeUpdateEvent);\n\n const result = await this.storage.store({\n data: auditLog\n });\n if (result.success) {\n const afterUpdateEvent = new AuditLogAfterUpdateEvent({\n original: original,\n auditLog: auditLog,\n context\n });\n await this.eventPublisher.publish(afterUpdateEvent);\n return result.data;\n }\n throw result.error;\n }\n\n public async getAuditLog(id: string): Promise<IAuditLog | null> {\n const result = await this.storage.fetch({\n id,\n tenant: this.getTenantId()\n });\n if (result.success) {\n await this.checkPermissions(result.data);\n return result.data;\n }\n throw result.error;\n }\n\n public async listAuditLogs(params: IListAuditLogsParams): Promise<IListAuditLogsResult> {\n const result = await this.storage.list({\n ...params,\n tenant: this.getTenantId()\n } as unknown as IStorageListParams);\n if (result.success) {\n return {\n items: result.data,\n meta: {\n cursor: result.meta.after || null,\n hasMoreItems: result.meta.hasMoreItems\n }\n };\n }\n throw result.error;\n }\n\n private async checkPermissions(auditLog: Pick<IAuditLog, \"action\">): Promise<void> {\n if (!auditLog.action) {\n throw new Error(\"Audit log action is not defined. Cannot check permissions.\");\n }\n const permissions = await this.getContext().security.getPermissions(\"al.*\");\n for (const permission of permissions) {\n if (permission.name === \"*\") {\n return;\n }\n if (permission.name === \"al.*\") {\n return;\n } else if (permission.name === `al.${auditLog.action}`) {\n return;\n }\n }\n\n throw new NotAuthorizedError({\n message: \"You cannot access audit logs.\"\n });\n }\n\n private getTenantId(): string {\n return this.getContext().tenancy.getCurrentTenant().id;\n }\n\n private getIdentity(): IAuditLogCreatedBy {\n const identity = this.getContext().security.getIdentity();\n return {\n id: identity.id,\n type: identity.type,\n displayName: identity.displayName || \"unknown\"\n };\n }\n}\n\nexport const createAuditLogsContextValue = (\n params: IAuditLogsContextValueParams\n): AuditLogsContextValue => {\n return new AuditLogsContextValueImpl(params);\n};\n"],"names":["AuditLogsContextValueImpl","params","payload","context","expiresAt","convertExpiresAtDaysToDate","auditLog","mdbid","Date","JSON","beforeCreateEvent","AuditLogBeforeCreateEvent","input","Object","result","afterCreateEvent","AuditLogAfterCreateEvent","original","beforeUpdateEvent","AuditLogBeforeUpdateEvent","afterUpdateEvent","AuditLogAfterUpdateEvent","id","Error","permissions","permission","NotAuthorizedError","identity","createAuditLogsContextValue"],"mappings":";;;;AA2BA,MAAMA;IAMF,YAAmBC,MAAoC,CAAE;QACrD,IAAI,CAAC,UAAU,GAAGA,OAAO,UAAU;QACnC,IAAI,CAAC,mBAAmB,GAAGA,OAAO,mBAAmB;QACrD,IAAI,CAAC,OAAO,GAAGA,OAAO,OAAO;QAC7B,IAAI,CAAC,cAAc,GAAGA,OAAO,cAAc;IAC/C;IAEA,MAAa,eAAeC,OAAwB,EAAsB;QACtE,MAAMC,UAAU,IAAI,CAAC,UAAU;QAC/B,MAAMC,YAAYC,2BAA2B,IAAI,CAAC,mBAAmB;QAErE,MAAMC,WAAsB;YACxB,IAAIC;YACJ,QAAQ,IAAI,CAAC,WAAW;YACxB,WAAW,IAAI,CAAC,WAAW;YAC3B,WAAW,IAAIC;YACf,GAAGN,OAAO;YACV,SAASO,KAAK,SAAS,CAACP,QAAQ,OAAO;YACvCE;QACJ;QACA,MAAM,IAAI,CAAC,gBAAgB,CAACE;QAE5B,MAAMI,oBAAoB,IAAIC,0BAA0B;YACpD,UAAUL;YACVH;YACA,aAAYS,KAAK;gBACbC,OAAO,MAAM,CAACP,UAAUM;YAC5B;QACJ;QACA,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAACF;QAElC,MAAMI,SAAS,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;YACpC,MAAMR;QACV;QACA,IAAIQ,OAAO,OAAO,EAAE;YAChB,MAAMC,mBAAmB,IAAIC,yBAAyB;gBAClD,UAAUV;gBACVH;YACJ;YACA,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAACY;YAClC,OAAOD,OAAO,IAAI;QACtB;QACA,MAAMA,OAAO,KAAK;IACtB;IAEA,MAAa,eACTG,QAAmB,EACnBf,OAAiC,EACf;QAClB,MAAMC,UAAU,IAAI,CAAC,UAAU;QAC/B,MAAMG,WAAsB;YACxB,GAAGW,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MA,OAAO,KAAK;IACtB;IAEA,MAAc,iBAAiBR,QAAmC,EAAiB;QAC/E,IAAI,CAACA,SAAS,MAAM,EAChB,MAAM,IAAIiB,MAAM;QAEpB,MAAMC,cAAc,MAAM,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC;QACpE,KAAK,MAAMC,cAAcD,YAAa;YAClC,IAAIC,AAAoB,QAApBA,WAAW,IAAI,EACf;YAEJ,IAAIA,AAAoB,WAApBA,WAAW,IAAI,EACf;YACG,IAAIA,WAAW,IAAI,KAAK,CAAC,GAAG,EAAEnB,SAAS,MAAM,EAAE,EAClD;QAER;QAEA,MAAM,IAAIoB,mBAAmB;YACzB,SAAS;QACb;IACJ;IAEQ,cAAsB;QAC1B,OAAO,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,gBAAgB,GAAG,EAAE;IAC1D;IAEQ,cAAkC;QACtC,MAAMC,WAAW,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,WAAW;QACvD,OAAO;YACH,IAAIA,SAAS,EAAE;YACf,MAAMA,SAAS,IAAI;YACnB,aAAaA,SAAS,WAAW,IAAI;QACzC;IACJ;AACJ;AAEO,MAAMC,8BAA8B,CACvC3B,SAEO,IAAID,0BAA0BC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ContextPlugin } from "@webiny/api";
|
|
2
|
+
import type { AuditLogsContext } from "../types.js";
|
|
3
|
+
export interface ISetupContextOptions {
|
|
4
|
+
deleteLogsAfterDays: number | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare const createAuditLogsContext: (params?: ISetupContextOptions) => ContextPlugin<AuditLogsContext>;
|
package/context/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ContextPlugin } from "@webiny/api";
|
|
2
|
+
import { EventPublisher } from "@webiny/api-core/features/eventPublisher/index.js";
|
|
3
|
+
import { createAuditLogsContextValue } from "./AuditLogsContextValue.js";
|
|
4
|
+
import { AuditLogsStorage } from "../abstractions.js";
|
|
5
|
+
const getDeleteLogsAfterDays = (days)=>{
|
|
6
|
+
if (days && days > 0) return days;
|
|
7
|
+
return 60;
|
|
8
|
+
};
|
|
9
|
+
const createAuditLogsContext = (params)=>{
|
|
10
|
+
const plugin = new ContextPlugin(async (context)=>{
|
|
11
|
+
const storage = context.container.resolve(AuditLogsStorage);
|
|
12
|
+
const eventPublisher = context.container.resolve(EventPublisher);
|
|
13
|
+
context.auditLogs = createAuditLogsContextValue({
|
|
14
|
+
getContext: ()=>context,
|
|
15
|
+
deleteLogsAfterDays: getDeleteLogsAfterDays(params?.deleteLogsAfterDays),
|
|
16
|
+
storage,
|
|
17
|
+
eventPublisher
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
plugin.name = "audit-logs.createContext";
|
|
21
|
+
return plugin;
|
|
22
|
+
};
|
|
23
|
+
export { createAuditLogsContext };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context/index.js","sources":["../../src/context/index.ts"],"sourcesContent":["import { ContextPlugin } from \"@webiny/api\";\nimport { EventPublisher } from \"@webiny/api-core/features/eventPublisher/index.js\";\nimport type { AuditLogsContext } from \"~/types.js\";\nimport { createAuditLogsContextValue } from \"./AuditLogsContextValue.js\";\nimport { AuditLogsStorage } from \"~/abstractions.js\";\n\nexport interface ISetupContextOptions {\n deleteLogsAfterDays: number | undefined;\n}\n\nconst getDeleteLogsAfterDays = (days?: number): number => {\n if (days && days > 0) {\n return days;\n }\n /**\n * Default days to delete logs after.\n */\n return 60;\n};\n\nexport const createAuditLogsContext = (params?: ISetupContextOptions) => {\n const plugin = new ContextPlugin<AuditLogsContext>(async context => {\n const storage = context.container.resolve(AuditLogsStorage);\n\n const eventPublisher = context.container.resolve(EventPublisher);\n\n context.auditLogs = createAuditLogsContextValue({\n getContext: () => {\n return context;\n },\n deleteLogsAfterDays: getDeleteLogsAfterDays(params?.deleteLogsAfterDays),\n storage,\n eventPublisher\n });\n });\n\n plugin.name = \"audit-logs.createContext\";\n\n return plugin;\n};\n"],"names":["getDeleteLogsAfterDays","days","createAuditLogsContext","params","plugin","ContextPlugin","context","storage","AuditLogsStorage","eventPublisher","EventPublisher","createAuditLogsContextValue"],"mappings":";;;;AAUA,MAAMA,yBAAyB,CAACC;IAC5B,IAAIA,QAAQA,OAAO,GACf,OAAOA;IAKX,OAAO;AACX;AAEO,MAAMC,yBAAyB,CAACC;IACnC,MAAMC,SAAS,IAAIC,cAAgC,OAAMC;QACrD,MAAMC,UAAUD,QAAQ,SAAS,CAAC,OAAO,CAACE;QAE1C,MAAMC,iBAAiBH,QAAQ,SAAS,CAAC,OAAO,CAACI;QAEjDJ,QAAQ,SAAS,GAAGK,4BAA4B;YAC5C,YAAY,IACDL;YAEX,qBAAqBN,uBAAuBG,QAAQ;YACpDI;YACAE;QACJ;IACJ;IAEAL,OAAO,IAAI,GAAG;IAEd,OAAOA;AACX"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DomainEvent } from "@webiny/api-core/features/eventPublisher/index.js";
|
|
2
|
+
import { AuditLogAfterCreatePayload } from "./abstractions.js";
|
|
3
|
+
export declare class AuditLogAfterCreateEvent extends DomainEvent<AuditLogAfterCreatePayload> {
|
|
4
|
+
eventType: "auditLog.afterCreate";
|
|
5
|
+
getHandlerAbstraction(): import("@webiny/di").Abstraction<import("@webiny/api-core/features/eventPublisher/abstractions.js").IEventHandler<DomainEvent<AuditLogAfterCreatePayload>>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DomainEvent } from "@webiny/api-core/features/eventPublisher/index.js";
|
|
2
|
+
import { AuditLogAfterCreateHandler } from "./abstractions.js";
|
|
3
|
+
class AuditLogAfterCreateEvent extends DomainEvent {
|
|
4
|
+
getHandlerAbstraction() {
|
|
5
|
+
return AuditLogAfterCreateHandler;
|
|
6
|
+
}
|
|
7
|
+
constructor(...args){
|
|
8
|
+
super(...args), this.eventType = "auditLog.afterCreate";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export { AuditLogAfterCreateEvent };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=AuditLogAfterCreateEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events/AuditLogAfterCreateEvent.js","sources":["../../src/events/AuditLogAfterCreateEvent.ts"],"sourcesContent":["import { DomainEvent } from \"@webiny/api-core/features/eventPublisher/index.js\";\nimport { AuditLogAfterCreateHandler, AuditLogAfterCreatePayload } from \"./abstractions.js\";\n\nexport class AuditLogAfterCreateEvent extends DomainEvent<AuditLogAfterCreatePayload> {\n eventType = \"auditLog.afterCreate\" as const;\n\n getHandlerAbstraction() {\n return AuditLogAfterCreateHandler;\n }\n}\n"],"names":["AuditLogAfterCreateEvent","DomainEvent","AuditLogAfterCreateHandler"],"mappings":";;AAGO,MAAMA,iCAAiCC;IAG1C,wBAAwB;QACpB,OAAOC;IACX;;QALG,qBACH,SAAS,GAAG;;AAKhB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DomainEvent } from "@webiny/api-core/features/eventPublisher/index.js";
|
|
2
|
+
import { AuditLogAfterUpdatePayload } from "./abstractions.js";
|
|
3
|
+
export declare class AuditLogAfterUpdateEvent extends DomainEvent<AuditLogAfterUpdatePayload> {
|
|
4
|
+
eventType: "auditLog.afterUpdate";
|
|
5
|
+
getHandlerAbstraction(): import("@webiny/di").Abstraction<import("@webiny/api-core/features/eventPublisher/abstractions.js").IEventHandler<DomainEvent<AuditLogAfterUpdatePayload>>>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DomainEvent } from "@webiny/api-core/features/eventPublisher/index.js";
|
|
2
|
+
import { AuditLogAfterUpdateHandler } from "./abstractions.js";
|
|
3
|
+
class AuditLogAfterUpdateEvent extends DomainEvent {
|
|
4
|
+
getHandlerAbstraction() {
|
|
5
|
+
return AuditLogAfterUpdateHandler;
|
|
6
|
+
}
|
|
7
|
+
constructor(...args){
|
|
8
|
+
super(...args), this.eventType = "auditLog.afterUpdate";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export { AuditLogAfterUpdateEvent };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=AuditLogAfterUpdateEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events/AuditLogAfterUpdateEvent.js","sources":["../../src/events/AuditLogAfterUpdateEvent.ts"],"sourcesContent":["import { DomainEvent } from \"@webiny/api-core/features/eventPublisher/index.js\";\nimport { AuditLogAfterUpdateHandler, AuditLogAfterUpdatePayload } from \"./abstractions.js\";\n\nexport class AuditLogAfterUpdateEvent extends DomainEvent<AuditLogAfterUpdatePayload> {\n eventType = \"auditLog.afterUpdate\" as const;\n\n getHandlerAbstraction() {\n return AuditLogAfterUpdateHandler;\n }\n}\n"],"names":["AuditLogAfterUpdateEvent","DomainEvent","AuditLogAfterUpdateHandler"],"mappings":";;AAGO,MAAMA,iCAAiCC;IAG1C,wBAAwB;QACpB,OAAOC;IACX;;QALG,qBACH,SAAS,GAAG;;AAKhB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DomainEvent } from "@webiny/api-core/features/eventPublisher/index.js";
|
|
2
|
+
import { AuditLogBeforeCreatePayload } from "./abstractions.js";
|
|
3
|
+
export declare class AuditLogBeforeCreateEvent extends DomainEvent<AuditLogBeforeCreatePayload> {
|
|
4
|
+
eventType: "auditLog.beforeCreate";
|
|
5
|
+
getHandlerAbstraction(): import("@webiny/di").Abstraction<import("@webiny/api-core/features/eventPublisher/abstractions.js").IEventHandler<DomainEvent<AuditLogBeforeCreatePayload>>>;
|
|
6
|
+
}
|