@webiny/api-aco 6.6.0-alpha.1 → 6.6.0-alpha.11
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/AcoFeature.js +14 -36
- package/AcoFeature.js.map +1 -1
- package/AcoFolderSchemaFactory.d.ts +2 -0
- package/AcoFolderSchemaFactory.js +25 -7
- package/AcoFolderSchemaFactory.js.map +1 -1
- package/domain/folder/folder.model.js +2 -1
- package/domain/folder/folder.model.js.map +1 -1
- package/exports/api/aco/flp.d.ts +3 -3
- package/exports/api/aco/flp.js +2 -3
- package/features/ai/CreateFolderTool.d.ts +11 -6
- package/features/ai/CreateFolderTool.js +20 -11
- package/features/ai/CreateFolderTool.js.map +1 -1
- package/features/ai/CreateRoleTool.d.ts +54 -0
- package/features/ai/CreateRoleTool.js +71 -0
- package/features/ai/CreateRoleTool.js.map +1 -0
- package/features/ai/CreateTeamTool.d.ts +11 -6
- package/features/ai/CreateTeamTool.js +20 -11
- package/features/ai/CreateTeamTool.js.map +1 -1
- package/features/ai/DeleteFolderTool.d.ts +48 -0
- package/features/ai/DeleteFolderTool.js +55 -0
- package/features/ai/DeleteFolderTool.js.map +1 -0
- package/features/ai/DeleteRoleTool.d.ts +52 -0
- package/features/ai/DeleteRoleTool.js +79 -0
- package/features/ai/DeleteRoleTool.js.map +1 -0
- package/features/ai/DeleteTeamTool.d.ts +46 -0
- package/features/ai/DeleteTeamTool.js +56 -0
- package/features/ai/DeleteTeamTool.js.map +1 -0
- package/features/ai/GrantFolderAccessTool.d.ts +13 -8
- package/features/ai/GrantFolderAccessTool.js +20 -11
- package/features/ai/GrantFolderAccessTool.js.map +1 -1
- package/features/ai/ListFoldersTool.d.ts +11 -6
- package/features/ai/ListFoldersTool.js +21 -12
- package/features/ai/ListFoldersTool.js.map +1 -1
- package/features/ai/ListRolesTool.d.ts +12 -7
- package/features/ai/ListRolesTool.js +21 -12
- package/features/ai/ListRolesTool.js.map +1 -1
- package/features/ai/ListTeamsTool.d.ts +14 -7
- package/features/ai/ListTeamsTool.js +23 -13
- package/features/ai/ListTeamsTool.js.map +1 -1
- package/features/ai/RevokeFolderAccessTool.d.ts +12 -7
- package/features/ai/RevokeFolderAccessTool.js +21 -12
- package/features/ai/RevokeFolderAccessTool.js.map +1 -1
- package/features/ai/UpdateFolderTool.d.ts +57 -0
- package/features/ai/UpdateFolderTool.js +72 -0
- package/features/ai/UpdateFolderTool.js.map +1 -0
- package/features/ai/UpdateRoleTool.d.ts +46 -0
- package/features/ai/UpdateRoleTool.js +53 -0
- package/features/ai/UpdateRoleTool.js.map +1 -0
- package/features/ai/UpdateTeamTool.d.ts +52 -0
- package/features/ai/UpdateTeamTool.js +56 -0
- package/features/ai/UpdateTeamTool.js.map +1 -0
- package/features/ai/feature.d.ts +2 -2
- package/features/ai/feature.js +14 -0
- package/features/ai/feature.js.map +1 -1
- package/features/ai/index.d.ts +7 -0
- package/features/ai/index.js +7 -0
- package/features/ai/loadFolderPermissions.d.ts +4 -1
- package/features/ai/loadFolderPermissions.js +1 -1
- package/features/ai/loadFolderPermissions.js.map +1 -1
- package/features/cms/decorators/ListDeletedEntriesWithFlpDecorator.d.ts +4 -4
- package/features/cms/decorators/ListDeletedEntriesWithFlpDecorator.js +7 -8
- package/features/cms/decorators/ListDeletedEntriesWithFlpDecorator.js.map +1 -1
- package/features/cms/decorators/ListEntriesWithFlpDecorator.d.ts +3 -3
- package/features/cms/decorators/ListEntriesWithFlpDecorator.js +7 -8
- package/features/cms/decorators/ListEntriesWithFlpDecorator.js.map +1 -1
- package/features/cms/decorators/ListLatestEntriesWithFlpDecorator.d.ts +4 -4
- package/features/cms/decorators/ListLatestEntriesWithFlpDecorator.js +7 -8
- package/features/cms/decorators/ListLatestEntriesWithFlpDecorator.js.map +1 -1
- package/features/cms/decorators/ListPublishedEntriesWithFlpDecorator.d.ts +4 -4
- package/features/cms/decorators/ListPublishedEntriesWithFlpDecorator.js +7 -8
- package/features/cms/decorators/ListPublishedEntriesWithFlpDecorator.js.map +1 -1
- package/features/flp/CreateFlp/index.d.ts +0 -1
- package/features/flp/CreateFlp/index.js +0 -1
- package/features/flp/DeleteFlp/index.d.ts +0 -1
- package/features/flp/DeleteFlp/index.js +0 -1
- package/features/flp/FolderAccessListFilter/abstractions.d.ts +33 -0
- package/features/flp/FolderAccessListFilter/abstractions.js +5 -0
- package/features/flp/FolderAccessListFilter/abstractions.js.map +1 -0
- package/features/flp/FolderAccessListFilter/index.d.ts +1 -0
- package/features/flp/FolderAccessListFilter/index.js +1 -0
- package/features/flp/FolderCatalogSync/FolderCatalogSyncHandlersFeature.d.ts +8 -0
- package/features/flp/FolderCatalogSync/FolderCatalogSyncHandlersFeature.js +15 -0
- package/features/flp/FolderCatalogSync/FolderCatalogSyncHandlersFeature.js.map +1 -0
- package/features/flp/FolderCatalogSync/SyncFolderCatalogOnFolderCreatedHandler.d.ts +11 -0
- package/features/flp/FolderCatalogSync/SyncFolderCatalogOnFolderCreatedHandler.js +19 -0
- package/features/flp/FolderCatalogSync/SyncFolderCatalogOnFolderCreatedHandler.js.map +1 -0
- package/features/flp/FolderCatalogSync/SyncFolderCatalogOnFolderDeletedHandler.d.ts +11 -0
- package/features/flp/FolderCatalogSync/SyncFolderCatalogOnFolderDeletedHandler.js +19 -0
- package/features/flp/FolderCatalogSync/SyncFolderCatalogOnFolderDeletedHandler.js.map +1 -0
- package/features/flp/FolderCatalogSync/SyncFolderCatalogOnFolderUpdatedHandler.d.ts +11 -0
- package/features/flp/FolderCatalogSync/SyncFolderCatalogOnFolderUpdatedHandler.js +23 -0
- package/features/flp/FolderCatalogSync/SyncFolderCatalogOnFolderUpdatedHandler.js.map +1 -0
- package/features/flp/FolderCatalogSync/abstractions.d.ts +25 -0
- package/features/flp/FolderCatalogSync/abstractions.js +5 -0
- package/features/flp/FolderCatalogSync/abstractions.js.map +1 -0
- package/features/flp/FolderCatalogSync/index.d.ts +2 -0
- package/features/flp/FolderCatalogSync/index.js +2 -0
- package/features/flp/FolderLevelPermissions/FolderLevelPermissions.d.ts +5 -2
- package/features/flp/FolderLevelPermissions/FolderLevelPermissions.js +19 -5
- package/features/flp/FolderLevelPermissions/FolderLevelPermissions.js.map +1 -1
- package/features/flp/FolderLevelPermissions/NoopFolderLevelPermissions.d.ts +1 -0
- package/features/flp/FolderLevelPermissions/NoopFolderLevelPermissions.js +3 -0
- package/features/flp/FolderLevelPermissions/NoopFolderLevelPermissions.js.map +1 -1
- package/features/flp/FolderLevelPermissions/abstractions.d.ts +8 -2
- package/features/flp/FolderLevelPermissions/abstractions.js.map +1 -1
- package/features/flp/FolderLevelPermissions/useCases/GetDefaultPermissions/GetDefaultPermissionsWithTeams.d.ts +12 -0
- package/features/flp/FolderLevelPermissions/useCases/GetDefaultPermissions/GetDefaultPermissionsWithTeams.js +22 -14
- package/features/flp/FolderLevelPermissions/useCases/GetDefaultPermissions/GetDefaultPermissionsWithTeams.js.map +1 -1
- package/features/flp/FolderPermissionsRepository/abstractions.d.ts +28 -0
- package/features/flp/FolderPermissionsRepository/abstractions.js +5 -0
- package/features/flp/FolderPermissionsRepository/abstractions.js.map +1 -0
- package/features/flp/FolderPermissionsRepository/index.d.ts +1 -0
- package/features/flp/FolderPermissionsRepository/index.js +1 -0
- package/features/flp/GetFlp/GetFlpUseCase.d.ts +10 -5
- package/features/flp/GetFlp/GetFlpUseCase.js +13 -5
- package/features/flp/GetFlp/GetFlpUseCase.js.map +1 -1
- package/features/flp/GetFlp/decorators/GetFlpWithCodeFlps.d.ts +13 -0
- package/features/flp/GetFlp/decorators/GetFlpWithCodeFlps.js +26 -0
- package/features/flp/GetFlp/decorators/GetFlpWithCodeFlps.js.map +1 -0
- package/features/flp/GetFlp/feature.js +1 -3
- package/features/flp/GetFlp/feature.js.map +1 -1
- package/features/flp/ListFlps/ListFlpsUseCase.d.ts +11 -6
- package/features/flp/ListFlps/ListFlpsUseCase.js +13 -5
- package/features/flp/ListFlps/ListFlpsUseCase.js.map +1 -1
- package/features/flp/ListFlps/abstractions.d.ts +3 -9
- package/features/flp/ListFlps/abstractions.js.map +1 -1
- package/features/flp/ListFlps/decorators/ListFlpsWithCodeFlps.d.ts +13 -0
- package/features/flp/ListFlps/decorators/ListFlpsWithCodeFlps.js +27 -0
- package/features/flp/ListFlps/decorators/ListFlpsWithCodeFlps.js.map +1 -0
- package/features/flp/ListFlps/feature.js +1 -3
- package/features/flp/ListFlps/feature.js.map +1 -1
- package/features/flp/ListFolderAccess/GetUserEntryAccessUseCase.d.ts +14 -0
- package/features/flp/ListFolderAccess/GetUserEntryAccessUseCase.js +36 -0
- package/features/flp/ListFolderAccess/GetUserEntryAccessUseCase.js.map +1 -0
- package/features/flp/ListFolderAccess/GetUserFolderAccessUseCase.d.ts +25 -0
- package/features/flp/ListFolderAccess/GetUserFolderAccessUseCase.js +75 -0
- package/features/flp/ListFolderAccess/GetUserFolderAccessUseCase.js.map +1 -0
- package/features/flp/ListFolderAccess/ListEntryAccessUseCase.d.ts +13 -0
- package/features/flp/ListFolderAccess/ListEntryAccessUseCase.js +28 -0
- package/features/flp/ListFolderAccess/ListEntryAccessUseCase.js.map +1 -0
- package/features/flp/ListFolderAccess/ListFolderAccessUseCase.d.ts +24 -0
- package/features/flp/ListFolderAccess/ListFolderAccessUseCase.js +107 -0
- package/features/flp/ListFolderAccess/ListFolderAccessUseCase.js.map +1 -0
- package/features/flp/ListFolderAccess/ListUserFolderAccessUseCase.d.ts +28 -0
- package/features/flp/ListFolderAccess/ListUserFolderAccessUseCase.js +98 -0
- package/features/flp/ListFolderAccess/ListUserFolderAccessUseCase.js.map +1 -0
- package/features/flp/ListFolderAccess/UserFolderCandidates.d.ts +13 -0
- package/features/flp/ListFolderAccess/UserFolderCandidates.js +26 -0
- package/features/flp/ListFolderAccess/UserFolderCandidates.js.map +1 -0
- package/features/flp/ListFolderAccess/abstractions.d.ts +182 -0
- package/features/flp/ListFolderAccess/abstractions.js +10 -0
- package/features/flp/ListFolderAccess/abstractions.js.map +1 -0
- package/features/flp/{CreateFlpOnFolderCreated → ListFolderAccess}/feature.d.ts +1 -1
- package/features/flp/ListFolderAccess/feature.js +21 -0
- package/features/flp/ListFolderAccess/feature.js.map +1 -0
- package/features/flp/ListFolderAccess/index.d.ts +2 -0
- package/features/flp/ListFolderAccess/index.js +2 -0
- package/features/flp/ListFolderAccess/mayAskAboutUser.d.ts +3 -0
- package/features/flp/ListFolderAccess/mayAskAboutUser.js +9 -0
- package/features/flp/ListFolderAccess/mayAskAboutUser.js.map +1 -0
- package/features/flp/ListFolderAccess/userFolderLevel.d.ts +31 -0
- package/features/flp/ListFolderAccess/userFolderLevel.js +48 -0
- package/features/flp/ListFolderAccess/userFolderLevel.js.map +1 -0
- package/features/flp/UpdateFlp/abstractions.d.ts +6 -2
- package/features/flp/UpdateFlp/abstractions.js.map +1 -1
- package/features/flp/UpdateFlp/index.d.ts +0 -1
- package/features/flp/UpdateFlp/index.js +0 -1
- package/features/flp/shared/CodeFlpMerger.d.ts +26 -0
- package/features/flp/shared/CodeFlpMerger.js +20 -0
- package/features/flp/shared/CodeFlpMerger.js.map +1 -0
- package/features/flp/shared/CodeFlpPath.d.ts +15 -0
- package/features/flp/shared/CodeFlpPath.js +29 -0
- package/features/flp/shared/CodeFlpPath.js.map +1 -0
- package/features/flp/shared/CodeFlpTarget.d.ts +10 -0
- package/features/flp/shared/CodeFlpTarget.js +26 -0
- package/features/flp/shared/CodeFlpTarget.js.map +1 -0
- package/features/flp/shared/CodeFlpsProvider.d.ts +15 -0
- package/features/flp/shared/CodeFlpsProvider.js +36 -0
- package/features/flp/shared/CodeFlpsProvider.js.map +1 -0
- package/features/flp/shared/abstractions.d.ts +79 -0
- package/features/flp/shared/abstractions.js +19 -0
- package/features/flp/shared/abstractions.js.map +1 -0
- package/features/flp/shared/feature.d.ts +5 -0
- package/features/flp/shared/feature.js +17 -0
- package/features/flp/shared/feature.js.map +1 -0
- package/features/flp/shared/index.d.ts +4 -0
- package/features/flp/shared/index.js +4 -0
- package/features/folder/CreateFolder/decorators/CreateFolderWithFolderLevelPermissions.d.ts +9 -1
- package/features/folder/CreateFolder/decorators/CreateFolderWithFolderLevelPermissions.js +20 -3
- package/features/folder/CreateFolder/decorators/CreateFolderWithFolderLevelPermissions.js.map +1 -1
- package/features/folder/ListFolders/decorators/ListFoldersWithFolderLevelPermissions.d.ts +3 -7
- package/features/folder/ListFolders/decorators/ListFoldersWithFolderLevelPermissions.js +5 -50
- package/features/folder/ListFolders/decorators/ListFoldersWithFolderLevelPermissions.js.map +1 -1
- package/features/folder/NotifyFolderChange/NotifyFolderChangeUseCase.d.ts +11 -0
- package/features/folder/NotifyFolderChange/NotifyFolderChangeUseCase.js +38 -0
- package/features/folder/NotifyFolderChange/NotifyFolderChangeUseCase.js.map +1 -0
- package/features/{flp/DeleteFlpOnFolderDeleted/DeleteFlpOnFolderDeletedHandler.d.ts → folder/NotifyFolderChange/NotifyOnFolderDeletedHandler.d.ts} +5 -7
- package/features/folder/NotifyFolderChange/NotifyOnFolderDeletedHandler.js +24 -0
- package/features/folder/NotifyFolderChange/NotifyOnFolderDeletedHandler.js.map +1 -0
- package/features/folder/NotifyFolderChange/abstractions.d.ts +28 -0
- package/features/folder/NotifyFolderChange/abstractions.js +8 -0
- package/features/folder/NotifyFolderChange/abstractions.js.map +1 -0
- package/features/folder/NotifyFolderChange/feature.d.ts +8 -0
- package/features/folder/NotifyFolderChange/feature.js +13 -0
- package/features/folder/NotifyFolderChange/feature.js.map +1 -0
- package/features/folder/NotifyFolderChange/index.d.ts +2 -0
- package/features/folder/NotifyFolderChange/index.js +2 -0
- package/features/folder/UpdateFolder/UpdateFolderUseCase.d.ts +1 -0
- package/features/folder/UpdateFolder/UpdateFolderUseCase.js +13 -0
- package/features/folder/UpdateFolder/UpdateFolderUseCase.js.map +1 -1
- package/features/folder/UpdateFolder/decorators/UpdateFolderWithFolderLevelPermissions.d.ts +14 -1
- package/features/folder/UpdateFolder/decorators/UpdateFolderWithFolderLevelPermissions.js +54 -4
- package/features/folder/UpdateFolder/decorators/UpdateFolderWithFolderLevelPermissions.js.map +1 -1
- package/filter/filter.model.js +2 -1
- package/filter/filter.model.js.map +1 -1
- package/filter/filter.so.d.ts +0 -2
- package/filter/filter.so.js +20 -8
- package/filter/filter.so.js.map +1 -1
- package/flp/flp.types.d.ts +6 -1
- package/flp/index.d.ts +0 -1
- package/flp/index.js +0 -1
- package/flpTaskCatalog/CatalogFolderPermissionsRepository.d.ts +17 -0
- package/flpTaskCatalog/CatalogFolderPermissionsRepository.js +34 -0
- package/flpTaskCatalog/CatalogFolderPermissionsRepository.js.map +1 -0
- package/flpTaskCatalog/PostLoadFolderAccessListFilter.d.ts +24 -0
- package/flpTaskCatalog/PostLoadFolderAccessListFilter.js +63 -0
- package/flpTaskCatalog/PostLoadFolderAccessListFilter.js.map +1 -0
- package/flpTaskCatalog/TaskCatalogFlpFeature.d.ts +12 -0
- package/flpTaskCatalog/TaskCatalogFlpFeature.js +49 -0
- package/flpTaskCatalog/TaskCatalogFlpFeature.js.map +1 -0
- package/flpTaskCatalog/TaskFolderCatalogSync.d.ts +29 -0
- package/flpTaskCatalog/TaskFolderCatalogSync.js +57 -0
- package/flpTaskCatalog/TaskFolderCatalogSync.js.map +1 -0
- package/{flp → flpTaskCatalog}/flp.crud.d.ts +1 -1
- package/flpTaskCatalog/flp.crud.js.map +1 -0
- package/flpTaskCatalog/index.d.ts +1 -0
- package/flpTaskCatalog/index.js +1 -0
- package/{utils/decorators → flpTaskCatalog/listEntries}/ListEntriesFactory.d.ts +1 -1
- package/flpTaskCatalog/listEntries/ListEntriesFactory.js.map +1 -0
- package/flpTaskCatalog/listEntries/hasRootFolderId.js.map +1 -0
- package/{utils/decorators → flpTaskCatalog/listEntries}/isPageModel.js +1 -1
- package/flpTaskCatalog/listEntries/isPageModel.js.map +1 -0
- package/flpTaskCatalog/tasks/createFlp.task.d.ts +25 -0
- package/{flp → flpTaskCatalog}/tasks/createFlp.task.js +34 -17
- package/flpTaskCatalog/tasks/createFlp.task.js.map +1 -0
- package/flpTaskCatalog/tasks/deleteFlp.task.d.ts +23 -0
- package/{flp → flpTaskCatalog}/tasks/deleteFlp.task.js +24 -15
- package/flpTaskCatalog/tasks/deleteFlp.task.js.map +1 -0
- package/{flp → flpTaskCatalog}/tasks/syncFlp.task.d.ts +11 -6
- package/{flp → flpTaskCatalog}/tasks/syncFlp.task.js +45 -29
- package/flpTaskCatalog/tasks/syncFlp.task.js.map +1 -0
- package/flpTaskCatalog/tasks/updateFlp.task.d.ts +25 -0
- package/flpTaskCatalog/tasks/updateFlp.task.js +64 -0
- package/flpTaskCatalog/tasks/updateFlp.task.js.map +1 -0
- package/flpTaskCatalog/useCases/CreateFlpUseCase.d.ts +8 -0
- package/{features/flp/CreateFlp → flpTaskCatalog/useCases}/CreateFlpUseCase.js +1 -1
- package/flpTaskCatalog/useCases/CreateFlpUseCase.js.map +1 -0
- package/flpTaskCatalog/useCases/DeleteFlpUseCase.d.ts +8 -0
- package/flpTaskCatalog/useCases/DeleteFlpUseCase.js.map +1 -0
- package/{features/flp/UpdateFlp → flpTaskCatalog/useCases}/UpdateFlpUseCase.d.ts +8 -9
- package/{features/flp/UpdateFlp → flpTaskCatalog/useCases}/UpdateFlpUseCase.js +23 -30
- package/flpTaskCatalog/useCases/UpdateFlpUseCase.js.map +1 -0
- package/folder/createFolderTypeDefs.js +4 -1
- package/folder/createFolderTypeDefs.js.map +1 -1
- package/folder/folder.types.d.ts +2 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +21 -22
- package/types.d.ts +2 -3
- package/types.js.map +1 -1
- package/utils/createOperationsWrapper.d.ts +2 -2
- package/utils/createOperationsWrapper.js +5 -5
- package/utils/createOperationsWrapper.js.map +1 -1
- package/features/flp/CreateFlp/CreateFlpUseCase.d.ts +0 -8
- package/features/flp/CreateFlp/CreateFlpUseCase.js.map +0 -1
- package/features/flp/CreateFlp/feature.d.ts +0 -5
- package/features/flp/CreateFlp/feature.js +0 -13
- package/features/flp/CreateFlp/feature.js.map +0 -1
- package/features/flp/CreateFlpOnFolderCreated/CreateFlpOnFolderCreatedHandler.d.ts +0 -14
- package/features/flp/CreateFlpOnFolderCreated/CreateFlpOnFolderCreatedHandler.js +0 -37
- package/features/flp/CreateFlpOnFolderCreated/CreateFlpOnFolderCreatedHandler.js.map +0 -1
- package/features/flp/CreateFlpOnFolderCreated/feature.js +0 -11
- package/features/flp/CreateFlpOnFolderCreated/feature.js.map +0 -1
- package/features/flp/CreateFlpOnFolderCreated/index.d.ts +0 -1
- package/features/flp/CreateFlpOnFolderCreated/index.js +0 -1
- package/features/flp/DeleteFlp/DeleteFlpUseCase.d.ts +0 -8
- package/features/flp/DeleteFlp/DeleteFlpUseCase.js.map +0 -1
- package/features/flp/DeleteFlp/feature.d.ts +0 -5
- package/features/flp/DeleteFlp/feature.js +0 -13
- package/features/flp/DeleteFlp/feature.js.map +0 -1
- package/features/flp/DeleteFlpOnFolderDeleted/DeleteFlpOnFolderDeletedHandler.js +0 -37
- package/features/flp/DeleteFlpOnFolderDeleted/DeleteFlpOnFolderDeletedHandler.js.map +0 -1
- package/features/flp/DeleteFlpOnFolderDeleted/feature.d.ts +0 -4
- package/features/flp/DeleteFlpOnFolderDeleted/feature.js +0 -11
- package/features/flp/DeleteFlpOnFolderDeleted/feature.js.map +0 -1
- package/features/flp/DeleteFlpOnFolderDeleted/index.d.ts +0 -1
- package/features/flp/DeleteFlpOnFolderDeleted/index.js +0 -1
- package/features/flp/UpdateFlp/UpdateFlpUseCase.js.map +0 -1
- package/features/flp/UpdateFlp/feature.d.ts +0 -5
- package/features/flp/UpdateFlp/feature.js +0 -17
- package/features/flp/UpdateFlp/feature.js.map +0 -1
- package/features/flp/UpdateFlpOnFolderUpdated/UpdateFlpOnFolderUpdatedHandler.d.ts +0 -14
- package/features/flp/UpdateFlpOnFolderUpdated/UpdateFlpOnFolderUpdatedHandler.js +0 -39
- package/features/flp/UpdateFlpOnFolderUpdated/UpdateFlpOnFolderUpdatedHandler.js.map +0 -1
- package/features/flp/UpdateFlpOnFolderUpdated/feature.d.ts +0 -4
- package/features/flp/UpdateFlpOnFolderUpdated/feature.js +0 -11
- package/features/flp/UpdateFlpOnFolderUpdated/feature.js.map +0 -1
- package/features/flp/UpdateFlpOnFolderUpdated/index.d.ts +0 -1
- package/features/flp/UpdateFlpOnFolderUpdated/index.js +0 -1
- package/flp/flp.crud.js.map +0 -1
- package/flp/tasks/createFlp.task.d.ts +0 -18
- package/flp/tasks/createFlp.task.js.map +0 -1
- package/flp/tasks/deleteFlp.task.d.ts +0 -18
- package/flp/tasks/deleteFlp.task.js.map +0 -1
- package/flp/tasks/syncFlp.task.js.map +0 -1
- package/flp/tasks/updateFlp.task.d.ts +0 -18
- package/flp/tasks/updateFlp.task.js +0 -43
- package/flp/tasks/updateFlp.task.js.map +0 -1
- package/utils/decorators/CmsEntriesCrudDecorators.d.ts +0 -11
- package/utils/decorators/CmsEntriesCrudDecorators.js +0 -179
- package/utils/decorators/CmsEntriesCrudDecorators.js.map +0 -1
- package/utils/decorators/FilterEntriesByFolderFactory.d.ts +0 -7
- package/utils/decorators/FilterEntriesByFolderFactory.js +0 -22
- package/utils/decorators/FilterEntriesByFolderFactory.js.map +0 -1
- package/utils/decorators/ListEntriesFactory.js.map +0 -1
- package/utils/decorators/hasRootFolderId.js.map +0 -1
- package/utils/decorators/isPageModel.js.map +0 -1
- /package/{flp → flpTaskCatalog}/flp.crud.js +0 -0
- /package/{utils/decorators → flpTaskCatalog/listEntries}/ListEntriesFactory.js +0 -0
- /package/{utils/decorators → flpTaskCatalog/listEntries}/hasRootFolderId.d.ts +0 -0
- /package/{utils/decorators → flpTaskCatalog/listEntries}/hasRootFolderId.js +0 -0
- /package/{utils/decorators → flpTaskCatalog/listEntries}/isPageModel.d.ts +0 -0
- /package/{features/flp/DeleteFlp → flpTaskCatalog/useCases}/DeleteFlpUseCase.js +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AiSdkToolDefinition, AiSdkToolHandler } from "@webiny/api-core/features/ai/index.js";
|
|
3
|
+
import { GetFolderUseCase } from "../folder/GetFolder/index.js";
|
|
4
|
+
import { UpdateFolderUseCase } from "../folder/UpdateFolder/index.js";
|
|
5
|
+
const inputSchema = z.object({
|
|
6
|
+
folderId: z.string().describe("Folder id as returned by listFolders."),
|
|
7
|
+
currentTitle: z.string().describe("The folder's current title, exactly as listFolders returned it. The update is refused if it does not match."),
|
|
8
|
+
title: z.string().optional().describe("New title. Omit it to keep the current one."),
|
|
9
|
+
slug: z.string().optional().describe("New URL-safe identifier, lowercase with hyphens. It is part of the folder's path. Omit it to keep the current one; a new title does not change it."),
|
|
10
|
+
parentId: z.string().nullable().optional().describe("Id of the folder to move this one into, from listFolders and of the same type. null moves it to the root. Omit it to leave the folder where it is.")
|
|
11
|
+
});
|
|
12
|
+
class UpdateFolderToolHandlerImpl {
|
|
13
|
+
constructor(getFolder, updateFolder){
|
|
14
|
+
this.getFolder = getFolder;
|
|
15
|
+
this.updateFolder = updateFolder;
|
|
16
|
+
}
|
|
17
|
+
async execute(input) {
|
|
18
|
+
if (void 0 === input.title && void 0 === input.slug && void 0 === input.parentId) throw new Error("Nothing to update: pass a new title, a new slug or a parentId to move the folder.");
|
|
19
|
+
const found = await this.getFolder.execute(input.folderId);
|
|
20
|
+
if (found.isFail()) throw new Error(`Folder "${input.folderId}" not found: ${found.error.message}. Call listFolders for valid ids.`);
|
|
21
|
+
const folder = found.value;
|
|
22
|
+
if (folder.title !== input.currentTitle) throw new Error(`Folder "${input.folderId}" is titled "${folder.title}", not "${input.currentTitle}", so nothing was updated. Check the folder with listFolders.`);
|
|
23
|
+
if (input.parentId) await this.ensureSameType(folder, input.parentId);
|
|
24
|
+
const params = {};
|
|
25
|
+
if (void 0 !== input.title) params.title = input.title;
|
|
26
|
+
if (void 0 !== input.slug) params.slug = input.slug;
|
|
27
|
+
if (void 0 !== input.parentId) params.parentId = input.parentId;
|
|
28
|
+
const result = await this.updateFolder.execute(folder.id, params);
|
|
29
|
+
if (result.isFail()) throw new Error(`Could not update the folder: ${result.error.message}`);
|
|
30
|
+
const updated = result.value;
|
|
31
|
+
return {
|
|
32
|
+
id: updated.id,
|
|
33
|
+
title: updated.title,
|
|
34
|
+
slug: updated.slug,
|
|
35
|
+
path: updated.path,
|
|
36
|
+
parentId: updated.parentId ?? null,
|
|
37
|
+
type: updated.type
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
async ensureSameType(folder, parentId) {
|
|
41
|
+
const parentResult = await this.getFolder.execute(parentId);
|
|
42
|
+
if (parentResult.isFail()) throw new Error(`Parent folder "${parentId}" not found: ${parentResult.error.message}. Call listFolders for valid ids.`);
|
|
43
|
+
const parent = parentResult.value;
|
|
44
|
+
if (parent.type !== folder.type) throw new Error(`Folder "${parent.title}" is of type "${parent.type}", and this folder is "${folder.type}". A folder can only move within its own type.`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const UpdateFolderToolHandler = AiSdkToolHandler.createImplementation({
|
|
48
|
+
implementation: UpdateFolderToolHandlerImpl,
|
|
49
|
+
dependencies: [
|
|
50
|
+
GetFolderUseCase,
|
|
51
|
+
UpdateFolderUseCase
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
class UpdateFolderToolImpl {
|
|
55
|
+
constructor(){
|
|
56
|
+
this.name = "updateFolder";
|
|
57
|
+
this.title = "Update folder";
|
|
58
|
+
this.description = "Renames a folder, changes its slug, or moves it under another folder of the same type (parentId null moves it to the root). Call listFolders first for the id, the exact current title and the new parent. Access rules are changed with grantFolderAccess and revokeFolderAccess, not here. Requires user approval.";
|
|
59
|
+
this.inputSchema = inputSchema;
|
|
60
|
+
this.annotations = {
|
|
61
|
+
readOnlyHint: false
|
|
62
|
+
};
|
|
63
|
+
this.handler = UpdateFolderToolHandler;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const UpdateFolderTool = AiSdkToolDefinition.createImplementation({
|
|
67
|
+
implementation: UpdateFolderToolImpl,
|
|
68
|
+
dependencies: []
|
|
69
|
+
});
|
|
70
|
+
export { UpdateFolderTool };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=UpdateFolderTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/ai/UpdateFolderTool.js","sources":["../../../src/features/ai/UpdateFolderTool.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { AiSdkToolDefinition } from \"@webiny/api-core/features/ai/index.js\";\nimport { AiSdkToolHandler } from \"@webiny/api-core/features/ai/index.js\";\nimport { GetFolderUseCase } from \"~/features/folder/GetFolder/index.js\";\nimport { UpdateFolderUseCase } from \"~/features/folder/UpdateFolder/index.js\";\nimport type { UpdateFolderParams } from \"~/folder/folder.types.js\";\n\nconst inputSchema = z.object({\n folderId: z.string().describe(\"Folder id as returned by listFolders.\"),\n currentTitle: z\n .string()\n .describe(\n \"The folder's current title, exactly as listFolders returned it. The update is refused if it does not match.\"\n ),\n title: z.string().optional().describe(\"New title. Omit it to keep the current one.\"),\n slug: z\n .string()\n .optional()\n .describe(\n \"New URL-safe identifier, lowercase with hyphens. It is part of the folder's path. Omit it to keep the current one; a new title does not change it.\"\n ),\n parentId: z\n .string()\n .nullable()\n .optional()\n .describe(\n \"Id of the folder to move this one into, from listFolders and of the same type. null moves it to the root. Omit it to leave the folder where it is.\"\n )\n});\n\ntype Input = z.infer<typeof inputSchema>;\n\ninterface UpdatedFolder {\n id: string;\n title: string;\n slug: string;\n path: string;\n parentId: string | null;\n type: string;\n}\n\n/*\n * The current title is part of the input for the same reason as in deleteFolder: the approval then\n * names the folder that changes, and the handler checks that name against the stored folder.\n *\n * Only the fields the model passed are sent. Access rules are left out, so the update keeps the\n * stored ones, and `UpdateFolderUseCase` refuses a move into the folder itself or its subtree.\n *\n * A move under a folder of another type is refused here only. The folder feature accepts a parent\n * of another type on create and on update, but the admin lists each type's folders separately, so a\n * File Manager folder moved under a content model's folder disappears from both trees.\n */\nclass UpdateFolderToolHandlerImpl implements AiSdkToolHandler.Interface<Input> {\n constructor(\n private getFolder: GetFolderUseCase.Interface,\n private updateFolder: UpdateFolderUseCase.Interface\n ) {}\n\n async execute(input: Input): Promise<UpdatedFolder> {\n if (input.title === undefined && input.slug === undefined && input.parentId === undefined) {\n throw new Error(\n \"Nothing to update: pass a new title, a new slug or a parentId to move the folder.\"\n );\n }\n\n const found = await this.getFolder.execute(input.folderId);\n\n if (found.isFail()) {\n throw new Error(\n `Folder \"${input.folderId}\" not found: ${found.error.message}. Call listFolders for valid ids.`\n );\n }\n\n const folder = found.value;\n\n if (folder.title !== input.currentTitle) {\n throw new Error(\n `Folder \"${input.folderId}\" is titled \"${folder.title}\", not \"${input.currentTitle}\", so nothing was updated. Check the folder with listFolders.`\n );\n }\n\n if (input.parentId) {\n await this.ensureSameType(folder, input.parentId);\n }\n\n const params: UpdateFolderParams = {};\n\n if (input.title !== undefined) {\n params.title = input.title;\n }\n\n if (input.slug !== undefined) {\n params.slug = input.slug;\n }\n\n if (input.parentId !== undefined) {\n params.parentId = input.parentId;\n }\n\n const result = await this.updateFolder.execute(folder.id, params);\n\n if (result.isFail()) {\n throw new Error(`Could not update the folder: ${result.error.message}`);\n }\n\n const updated = result.value;\n\n return {\n id: updated.id,\n title: updated.title,\n slug: updated.slug,\n path: updated.path,\n parentId: updated.parentId ?? null,\n type: updated.type\n };\n }\n\n private async ensureSameType(folder: { type: string }, parentId: string): Promise<void> {\n const parentResult = await this.getFolder.execute(parentId);\n\n if (parentResult.isFail()) {\n throw new Error(\n `Parent folder \"${parentId}\" not found: ${parentResult.error.message}. Call listFolders for valid ids.`\n );\n }\n\n const parent = parentResult.value;\n\n if (parent.type !== folder.type) {\n throw new Error(\n `Folder \"${parent.title}\" is of type \"${parent.type}\", and this folder is \"${folder.type}\". A folder can only move within its own type.`\n );\n }\n }\n}\n\nconst UpdateFolderToolHandler = AiSdkToolHandler.createImplementation({\n implementation: UpdateFolderToolHandlerImpl,\n dependencies: [GetFolderUseCase, UpdateFolderUseCase]\n});\n\n/**\n * Renames or moves one folder.\n *\n * Not destructive: the old title, slug and parent can be set again. A new slug or parent changes the\n * folder's path and its subfolders' paths, and with them which code-defined access rules apply, so\n * it still waits for the user to approve the exact arguments.\n */\nclass UpdateFolderToolImpl implements AiSdkToolDefinition.Interface<Input> {\n readonly name = \"updateFolder\";\n readonly title = \"Update folder\";\n readonly description =\n \"Renames a folder, changes its slug, or moves it under another folder of the same type (parentId null moves it to the root). Call listFolders first for the id, the exact current title and the new parent. Access rules are changed with grantFolderAccess and revokeFolderAccess, not here. Requires user approval.\";\n readonly inputSchema = inputSchema;\n readonly annotations = { readOnlyHint: false };\n readonly handler = UpdateFolderToolHandler;\n}\n\nexport const UpdateFolderTool = AiSdkToolDefinition.createImplementation({\n implementation: UpdateFolderToolImpl,\n dependencies: []\n});\n"],"names":["inputSchema","z","UpdateFolderToolHandlerImpl","getFolder","updateFolder","input","undefined","Error","found","folder","params","result","updated","parentId","parentResult","parent","UpdateFolderToolHandler","AiSdkToolHandler","GetFolderUseCase","UpdateFolderUseCase","UpdateFolderToolImpl","UpdateFolderTool","AiSdkToolDefinition"],"mappings":";;;;AAOA,MAAMA,cAAcC,EAAE,MAAM,CAAC;IACzB,UAAUA,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC9B,cAAcA,EAAAA,MACH,GACN,QAAQ,CACL;IAER,OAAOA,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACtC,MAAMA,EAAAA,MACK,GACN,QAAQ,GACR,QAAQ,CACL;IAER,UAAUA,EAAAA,MACC,GACN,QAAQ,GACR,QAAQ,GACR,QAAQ,CACL;AAEZ;AAwBA,MAAMC;IACF,YACYC,SAAqC,EACrCC,YAA2C,CACrD;aAFUD,SAAS,GAATA;aACAC,YAAY,GAAZA;IACT;IAEH,MAAM,QAAQC,KAAY,EAA0B;QAChD,IAAIA,AAAgBC,WAAhBD,MAAM,KAAK,IAAkBA,AAAeC,WAAfD,MAAM,IAAI,IAAkBA,AAAmBC,WAAnBD,MAAM,QAAQ,EACvE,MAAM,IAAIE,MACN;QAIR,MAAMC,QAAQ,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAACH,MAAM,QAAQ;QAEzD,IAAIG,MAAM,MAAM,IACZ,MAAM,IAAID,MACN,CAAC,QAAQ,EAAEF,MAAM,QAAQ,CAAC,aAAa,EAAEG,MAAM,KAAK,CAAC,OAAO,CAAC,iCAAiC,CAAC;QAIvG,MAAMC,SAASD,MAAM,KAAK;QAE1B,IAAIC,OAAO,KAAK,KAAKJ,MAAM,YAAY,EACnC,MAAM,IAAIE,MACN,CAAC,QAAQ,EAAEF,MAAM,QAAQ,CAAC,aAAa,EAAEI,OAAO,KAAK,CAAC,QAAQ,EAAEJ,MAAM,YAAY,CAAC,6DAA6D,CAAC;QAIzJ,IAAIA,MAAM,QAAQ,EACd,MAAM,IAAI,CAAC,cAAc,CAACI,QAAQJ,MAAM,QAAQ;QAGpD,MAAMK,SAA6B,CAAC;QAEpC,IAAIL,AAAgBC,WAAhBD,MAAM,KAAK,EACXK,OAAO,KAAK,GAAGL,MAAM,KAAK;QAG9B,IAAIA,AAAeC,WAAfD,MAAM,IAAI,EACVK,OAAO,IAAI,GAAGL,MAAM,IAAI;QAG5B,IAAIA,AAAmBC,WAAnBD,MAAM,QAAQ,EACdK,OAAO,QAAQ,GAAGL,MAAM,QAAQ;QAGpC,MAAMM,SAAS,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAACF,OAAO,EAAE,EAAEC;QAE1D,IAAIC,OAAO,MAAM,IACb,MAAM,IAAIJ,MAAM,CAAC,6BAA6B,EAAEI,OAAO,KAAK,CAAC,OAAO,EAAE;QAG1E,MAAMC,UAAUD,OAAO,KAAK;QAE5B,OAAO;YACH,IAAIC,QAAQ,EAAE;YACd,OAAOA,QAAQ,KAAK;YACpB,MAAMA,QAAQ,IAAI;YAClB,MAAMA,QAAQ,IAAI;YAClB,UAAUA,QAAQ,QAAQ,IAAI;YAC9B,MAAMA,QAAQ,IAAI;QACtB;IACJ;IAEA,MAAc,eAAeH,MAAwB,EAAEI,QAAgB,EAAiB;QACpF,MAAMC,eAAe,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAACD;QAElD,IAAIC,aAAa,MAAM,IACnB,MAAM,IAAIP,MACN,CAAC,eAAe,EAAEM,SAAS,aAAa,EAAEC,aAAa,KAAK,CAAC,OAAO,CAAC,iCAAiC,CAAC;QAI/G,MAAMC,SAASD,aAAa,KAAK;QAEjC,IAAIC,OAAO,IAAI,KAAKN,OAAO,IAAI,EAC3B,MAAM,IAAIF,MACN,CAAC,QAAQ,EAAEQ,OAAO,KAAK,CAAC,cAAc,EAAEA,OAAO,IAAI,CAAC,uBAAuB,EAAEN,OAAO,IAAI,CAAC,8CAA8C,CAAC;IAGpJ;AACJ;AAEA,MAAMO,0BAA0BC,iBAAiB,oBAAoB,CAAC;IAClE,gBAAgBf;IAChB,cAAc;QAACgB;QAAkBC;KAAoB;AACzD;AASA,MAAMC;;aACO,IAAI,GAAG;aACP,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAGpB;aACd,WAAW,GAAG;YAAE,cAAc;QAAM;aACpC,OAAO,GAAGgB;;AACvB;AAEO,MAAMK,mBAAmBC,oBAAoB,oBAAoB,CAAC;IACrE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AiSdkToolDefinition } from "@webiny/api-core/features/ai/index.js";
|
|
3
|
+
import { AiSdkToolHandler } from "@webiny/api-core/features/ai/index.js";
|
|
4
|
+
import { UpdateRoleUseCase } from "@webiny/api-core/features/security/roles/UpdateRole/index.js";
|
|
5
|
+
declare const inputSchema: z.ZodObject<{
|
|
6
|
+
roleId: z.ZodString;
|
|
7
|
+
name: z.ZodOptional<z.ZodString>;
|
|
8
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type Input = z.infer<typeof inputSchema>;
|
|
11
|
+
interface UpdatedRole {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}
|
|
17
|
+
declare class UpdateRoleToolHandlerImpl implements AiSdkToolHandler.Interface<Input> {
|
|
18
|
+
private updateRole;
|
|
19
|
+
constructor(updateRole: UpdateRoleUseCase.Interface);
|
|
20
|
+
execute(input: Input): Promise<UpdatedRole>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Renames a role or changes its description. Permissions are out of reach for the same reason as in
|
|
24
|
+
* `createRole`. The slug cannot change because `UpdateRoleUseCase` does not accept one.
|
|
25
|
+
*/
|
|
26
|
+
declare class UpdateRoleToolImpl implements AiSdkToolDefinition.Interface<Input> {
|
|
27
|
+
readonly name = "updateRole";
|
|
28
|
+
readonly title = "Update role";
|
|
29
|
+
readonly description = "Changes a role's name or description. Call listRoles first for the id. Permissions cannot be changed with this tool; the user edits them on the Roles screen. Roles defined in code cannot be changed. Requires user approval.";
|
|
30
|
+
readonly inputSchema: z.ZodObject<{
|
|
31
|
+
roleId: z.ZodString;
|
|
32
|
+
name: z.ZodOptional<z.ZodString>;
|
|
33
|
+
description: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
readonly annotations: {
|
|
36
|
+
readOnlyHint: boolean;
|
|
37
|
+
idempotentHint: boolean;
|
|
38
|
+
};
|
|
39
|
+
readonly handler: typeof UpdateRoleToolHandlerImpl & {
|
|
40
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/api-core/features/ai/abstractions").IAiSdkToolHandler<any>>;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export declare const UpdateRoleTool: typeof UpdateRoleToolImpl & {
|
|
44
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/api-core/features/ai/abstractions").IAiSdkToolDefinition<any>>;
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AiSdkToolDefinition, AiSdkToolHandler } from "@webiny/api-core/features/ai/index.js";
|
|
3
|
+
import { UpdateRoleUseCase } from "@webiny/api-core/features/security/roles/UpdateRole/index.js";
|
|
4
|
+
const inputSchema = z.object({
|
|
5
|
+
roleId: z.string().describe("Role id as returned by listRoles."),
|
|
6
|
+
name: z.string().min(3).optional().describe("New role name. Omit it to keep the current one."),
|
|
7
|
+
description: z.string().max(500).optional().describe("New description. Omit it to keep the current one; an empty string clears it.")
|
|
8
|
+
});
|
|
9
|
+
class UpdateRoleToolHandlerImpl {
|
|
10
|
+
constructor(updateRole){
|
|
11
|
+
this.updateRole = updateRole;
|
|
12
|
+
}
|
|
13
|
+
async execute(input) {
|
|
14
|
+
const result = await this.updateRole.execute(input.roleId, {
|
|
15
|
+
name: input.name,
|
|
16
|
+
description: input.description
|
|
17
|
+
});
|
|
18
|
+
if (result.isFail()) throw new Error(`Could not update the role: ${result.error.message}`);
|
|
19
|
+
const role = result.value;
|
|
20
|
+
return {
|
|
21
|
+
id: role.id,
|
|
22
|
+
name: role.name,
|
|
23
|
+
slug: role.slug,
|
|
24
|
+
description: role.description
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const UpdateRoleToolHandler = AiSdkToolHandler.createImplementation({
|
|
29
|
+
implementation: UpdateRoleToolHandlerImpl,
|
|
30
|
+
dependencies: [
|
|
31
|
+
UpdateRoleUseCase
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
class UpdateRoleToolImpl {
|
|
35
|
+
constructor(){
|
|
36
|
+
this.name = "updateRole";
|
|
37
|
+
this.title = "Update role";
|
|
38
|
+
this.description = "Changes a role's name or description. Call listRoles first for the id. Permissions cannot be changed with this tool; the user edits them on the Roles screen. Roles defined in code cannot be changed. Requires user approval.";
|
|
39
|
+
this.inputSchema = inputSchema;
|
|
40
|
+
this.annotations = {
|
|
41
|
+
readOnlyHint: false,
|
|
42
|
+
idempotentHint: true
|
|
43
|
+
};
|
|
44
|
+
this.handler = UpdateRoleToolHandler;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const UpdateRoleTool = AiSdkToolDefinition.createImplementation({
|
|
48
|
+
implementation: UpdateRoleToolImpl,
|
|
49
|
+
dependencies: []
|
|
50
|
+
});
|
|
51
|
+
export { UpdateRoleTool };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=UpdateRoleTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/ai/UpdateRoleTool.js","sources":["../../../src/features/ai/UpdateRoleTool.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { AiSdkToolDefinition } from \"@webiny/api-core/features/ai/index.js\";\nimport { AiSdkToolHandler } from \"@webiny/api-core/features/ai/index.js\";\nimport { UpdateRoleUseCase } from \"@webiny/api-core/features/security/roles/UpdateRole/index.js\";\n\nconst inputSchema = z.object({\n roleId: z.string().describe(\"Role id as returned by listRoles.\"),\n name: z.string().min(3).optional().describe(\"New role name. Omit it to keep the current one.\"),\n description: z\n .string()\n .max(500)\n .optional()\n .describe(\"New description. Omit it to keep the current one; an empty string clears it.\")\n});\n\ntype Input = z.infer<typeof inputSchema>;\n\ninterface UpdatedRole {\n id: string;\n name: string;\n slug: string;\n description: string;\n}\n\nclass UpdateRoleToolHandlerImpl implements AiSdkToolHandler.Interface<Input> {\n constructor(private updateRole: UpdateRoleUseCase.Interface) {}\n\n async execute(input: Input): Promise<UpdatedRole> {\n // A field the model left out arrives as `undefined`; `UpdateRoleUseCase` leaves those alone.\n const result = await this.updateRole.execute(input.roleId, {\n name: input.name,\n description: input.description\n });\n\n if (result.isFail()) {\n throw new Error(`Could not update the role: ${result.error.message}`);\n }\n\n const role = result.value;\n\n return { id: role.id, name: role.name, slug: role.slug, description: role.description };\n }\n}\n\nconst UpdateRoleToolHandler = AiSdkToolHandler.createImplementation({\n implementation: UpdateRoleToolHandlerImpl,\n dependencies: [UpdateRoleUseCase]\n});\n\n/**\n * Renames a role or changes its description. Permissions are out of reach for the same reason as in\n * `createRole`. The slug cannot change because `UpdateRoleUseCase` does not accept one.\n */\nclass UpdateRoleToolImpl implements AiSdkToolDefinition.Interface<Input> {\n readonly name = \"updateRole\";\n readonly title = \"Update role\";\n readonly description =\n \"Changes a role's name or description. Call listRoles first for the id. Permissions cannot be changed with this tool; the user edits them on the Roles screen. Roles defined in code cannot be changed. Requires user approval.\";\n readonly inputSchema = inputSchema;\n readonly annotations = { readOnlyHint: false, idempotentHint: true };\n readonly handler = UpdateRoleToolHandler;\n}\n\nexport const UpdateRoleTool = AiSdkToolDefinition.createImplementation({\n implementation: UpdateRoleToolImpl,\n dependencies: []\n});\n"],"names":["inputSchema","z","UpdateRoleToolHandlerImpl","updateRole","input","result","Error","role","UpdateRoleToolHandler","AiSdkToolHandler","UpdateRoleUseCase","UpdateRoleToolImpl","UpdateRoleTool","AiSdkToolDefinition"],"mappings":";;;AAKA,MAAMA,cAAcC,EAAE,MAAM,CAAC;IACzB,QAAQA,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,MAAMA,EAAE,MAAM,GAAG,GAAG,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC5C,aAAaA,EAAAA,MACF,GACN,GAAG,CAAC,KACJ,QAAQ,GACR,QAAQ,CAAC;AAClB;AAWA,MAAMC;IACF,YAAoBC,UAAuC,CAAE;aAAzCA,UAAU,GAAVA;IAA0C;IAE9D,MAAM,QAAQC,KAAY,EAAwB;QAE9C,MAAMC,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAACD,MAAM,MAAM,EAAE;YACvD,MAAMA,MAAM,IAAI;YAChB,aAAaA,MAAM,WAAW;QAClC;QAEA,IAAIC,OAAO,MAAM,IACb,MAAM,IAAIC,MAAM,CAAC,2BAA2B,EAAED,OAAO,KAAK,CAAC,OAAO,EAAE;QAGxE,MAAME,OAAOF,OAAO,KAAK;QAEzB,OAAO;YAAE,IAAIE,KAAK,EAAE;YAAE,MAAMA,KAAK,IAAI;YAAE,MAAMA,KAAK,IAAI;YAAE,aAAaA,KAAK,WAAW;QAAC;IAC1F;AACJ;AAEA,MAAMC,wBAAwBC,iBAAiB,oBAAoB,CAAC;IAChE,gBAAgBP;IAChB,cAAc;QAACQ;KAAkB;AACrC;AAMA,MAAMC;;aACO,IAAI,GAAG;aACP,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAGX;aACd,WAAW,GAAG;YAAE,cAAc;YAAO,gBAAgB;QAAK;aAC1D,OAAO,GAAGQ;;AACvB;AAEO,MAAMI,iBAAiBC,oBAAoB,oBAAoB,CAAC;IACnE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AiSdkToolDefinition, AiSdkToolHandler } from "@webiny/api-core/features/ai/index.js";
|
|
3
|
+
import { UpdateTeam } from "@webiny/api-core/features/security/teams/UpdateTeam/index.js";
|
|
4
|
+
declare const inputSchema: z.ZodObject<{
|
|
5
|
+
teamId: z.ZodString;
|
|
6
|
+
name: z.ZodOptional<z.ZodString>;
|
|
7
|
+
description: z.ZodOptional<z.ZodString>;
|
|
8
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type Input = z.infer<typeof inputSchema>;
|
|
11
|
+
interface UpdatedTeam {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
description: string;
|
|
16
|
+
roles: string[];
|
|
17
|
+
}
|
|
18
|
+
declare class UpdateTeamToolHandlerImpl implements AiSdkToolHandler.Interface<Input> {
|
|
19
|
+
private updateTeam;
|
|
20
|
+
constructor(updateTeam: UpdateTeam.Interface);
|
|
21
|
+
execute(input: Input): Promise<UpdatedTeam>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Changes a team's name, description or roles. The slug cannot change: folder permissions refer to
|
|
25
|
+
* teams by slug.
|
|
26
|
+
*
|
|
27
|
+
* Needs approval for the same reason as `createTeam`: the roles decide what the team's members can
|
|
28
|
+
* do. `roles` replaces the stored list, and the approval shows that whole list, so a role the model
|
|
29
|
+
* left out is visible as missing before anything is written.
|
|
30
|
+
*/
|
|
31
|
+
declare class UpdateTeamToolImpl implements AiSdkToolDefinition.Interface<Input> {
|
|
32
|
+
readonly name = "updateTeam";
|
|
33
|
+
readonly title = "Update team";
|
|
34
|
+
readonly description = "Changes a team's name, description or roles. Call listTeams first for the id. `roles` replaces the team's whole role list, so pass every role it should keep; call listRoles to resolve them. System teams and teams defined in code cannot be changed. Requires user approval.";
|
|
35
|
+
readonly inputSchema: z.ZodObject<{
|
|
36
|
+
teamId: z.ZodString;
|
|
37
|
+
name: z.ZodOptional<z.ZodString>;
|
|
38
|
+
description: z.ZodOptional<z.ZodString>;
|
|
39
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
readonly annotations: {
|
|
42
|
+
readOnlyHint: boolean;
|
|
43
|
+
idempotentHint: boolean;
|
|
44
|
+
};
|
|
45
|
+
readonly handler: typeof UpdateTeamToolHandlerImpl & {
|
|
46
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/api-core/features/ai/abstractions").IAiSdkToolHandler<any>>;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export declare const UpdateTeamTool: typeof UpdateTeamToolImpl & {
|
|
50
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/api-core/features/ai/abstractions").IAiSdkToolDefinition<any>>;
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AiSdkToolDefinition, AiSdkToolHandler } from "@webiny/api-core/features/ai/index.js";
|
|
3
|
+
import { UpdateTeam } from "@webiny/api-core/features/security/teams/UpdateTeam/index.js";
|
|
4
|
+
const inputSchema = z.object({
|
|
5
|
+
teamId: z.string().describe("Team id as returned by listTeams."),
|
|
6
|
+
name: z.string().min(3).optional().describe("New team name. Omit it to keep the current one."),
|
|
7
|
+
description: z.string().max(500).optional().describe("New description. Omit it to keep the current one; an empty string clears it."),
|
|
8
|
+
roles: z.array(z.string()).optional().describe("The complete list of roles the team should have afterwards. It REPLACES the stored list, so include the roles to keep. Omit it to leave the roles alone. Resolve values with listRoles first.")
|
|
9
|
+
});
|
|
10
|
+
class UpdateTeamToolHandlerImpl {
|
|
11
|
+
constructor(updateTeam){
|
|
12
|
+
this.updateTeam = updateTeam;
|
|
13
|
+
}
|
|
14
|
+
async execute(input) {
|
|
15
|
+
const result = await this.updateTeam.execute(input.teamId, {
|
|
16
|
+
name: input.name,
|
|
17
|
+
description: input.description,
|
|
18
|
+
roles: input.roles
|
|
19
|
+
});
|
|
20
|
+
if (result.isFail()) throw new Error(`Could not update the team: ${result.error.message}`);
|
|
21
|
+
const team = result.value;
|
|
22
|
+
return {
|
|
23
|
+
id: team.id,
|
|
24
|
+
name: team.name,
|
|
25
|
+
slug: team.slug,
|
|
26
|
+
description: team.description,
|
|
27
|
+
roles: team.roles
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const UpdateTeamToolHandler = AiSdkToolHandler.createImplementation({
|
|
32
|
+
implementation: UpdateTeamToolHandlerImpl,
|
|
33
|
+
dependencies: [
|
|
34
|
+
UpdateTeam
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
class UpdateTeamToolImpl {
|
|
38
|
+
constructor(){
|
|
39
|
+
this.name = "updateTeam";
|
|
40
|
+
this.title = "Update team";
|
|
41
|
+
this.description = "Changes a team's name, description or roles. Call listTeams first for the id. `roles` replaces the team's whole role list, so pass every role it should keep; call listRoles to resolve them. System teams and teams defined in code cannot be changed. Requires user approval.";
|
|
42
|
+
this.inputSchema = inputSchema;
|
|
43
|
+
this.annotations = {
|
|
44
|
+
readOnlyHint: false,
|
|
45
|
+
idempotentHint: true
|
|
46
|
+
};
|
|
47
|
+
this.handler = UpdateTeamToolHandler;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const UpdateTeamTool = AiSdkToolDefinition.createImplementation({
|
|
51
|
+
implementation: UpdateTeamToolImpl,
|
|
52
|
+
dependencies: []
|
|
53
|
+
});
|
|
54
|
+
export { UpdateTeamTool };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=UpdateTeamTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/ai/UpdateTeamTool.js","sources":["../../../src/features/ai/UpdateTeamTool.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { AiSdkToolDefinition, AiSdkToolHandler } from \"@webiny/api-core/features/ai/index.js\";\nimport { UpdateTeam } from \"@webiny/api-core/features/security/teams/UpdateTeam/index.js\";\n\nconst inputSchema = z.object({\n teamId: z.string().describe(\"Team id as returned by listTeams.\"),\n name: z.string().min(3).optional().describe(\"New team name. Omit it to keep the current one.\"),\n description: z\n .string()\n .max(500)\n .optional()\n .describe(\"New description. Omit it to keep the current one; an empty string clears it.\"),\n roles: z\n .array(z.string())\n .optional()\n .describe(\n \"The complete list of roles the team should have afterwards. It REPLACES the stored list, so include the roles to keep. Omit it to leave the roles alone. Resolve values with listRoles first.\"\n )\n});\n\ntype Input = z.infer<typeof inputSchema>;\n\ninterface UpdatedTeam {\n id: string;\n name: string;\n slug: string;\n description: string;\n roles: string[];\n}\n\nclass UpdateTeamToolHandlerImpl implements AiSdkToolHandler.Interface<Input> {\n constructor(private updateTeam: UpdateTeam.Interface) {}\n\n async execute(input: Input): Promise<UpdatedTeam> {\n // A field the model left out arrives as `undefined`; `UpdateTeam` leaves those alone.\n const result = await this.updateTeam.execute(input.teamId, {\n name: input.name,\n description: input.description,\n roles: input.roles\n });\n\n if (result.isFail()) {\n throw new Error(`Could not update the team: ${result.error.message}`);\n }\n\n const team = result.value;\n\n return {\n id: team.id,\n name: team.name,\n slug: team.slug,\n description: team.description,\n // From the updated team, so the caller sees the resolved ids that were actually stored.\n roles: team.roles\n };\n }\n}\n\nconst UpdateTeamToolHandler = AiSdkToolHandler.createImplementation({\n implementation: UpdateTeamToolHandlerImpl,\n dependencies: [UpdateTeam]\n});\n\n/**\n * Changes a team's name, description or roles. The slug cannot change: folder permissions refer to\n * teams by slug.\n *\n * Needs approval for the same reason as `createTeam`: the roles decide what the team's members can\n * do. `roles` replaces the stored list, and the approval shows that whole list, so a role the model\n * left out is visible as missing before anything is written.\n */\nclass UpdateTeamToolImpl implements AiSdkToolDefinition.Interface<Input> {\n readonly name = \"updateTeam\";\n readonly title = \"Update team\";\n readonly description =\n \"Changes a team's name, description or roles. Call listTeams first for the id. `roles` replaces the team's whole role list, so pass every role it should keep; call listRoles to resolve them. System teams and teams defined in code cannot be changed. Requires user approval.\";\n readonly inputSchema = inputSchema;\n readonly annotations = { readOnlyHint: false, idempotentHint: true };\n readonly handler = UpdateTeamToolHandler;\n}\n\nexport const UpdateTeamTool = AiSdkToolDefinition.createImplementation({\n implementation: UpdateTeamToolImpl,\n dependencies: []\n});\n"],"names":["inputSchema","z","UpdateTeamToolHandlerImpl","updateTeam","input","result","Error","team","UpdateTeamToolHandler","AiSdkToolHandler","UpdateTeam","UpdateTeamToolImpl","UpdateTeamTool","AiSdkToolDefinition"],"mappings":";;;AAIA,MAAMA,cAAcC,EAAE,MAAM,CAAC;IACzB,QAAQA,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,MAAMA,EAAE,MAAM,GAAG,GAAG,CAAC,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC5C,aAAaA,EAAAA,MACF,GACN,GAAG,CAAC,KACJ,QAAQ,GACR,QAAQ,CAAC;IACd,OAAOA,EAAAA,KACG,CAACA,EAAE,MAAM,IACd,QAAQ,GACR,QAAQ,CACL;AAEZ;AAYA,MAAMC;IACF,YAAoBC,UAAgC,CAAE;aAAlCA,UAAU,GAAVA;IAAmC;IAEvD,MAAM,QAAQC,KAAY,EAAwB;QAE9C,MAAMC,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAACD,MAAM,MAAM,EAAE;YACvD,MAAMA,MAAM,IAAI;YAChB,aAAaA,MAAM,WAAW;YAC9B,OAAOA,MAAM,KAAK;QACtB;QAEA,IAAIC,OAAO,MAAM,IACb,MAAM,IAAIC,MAAM,CAAC,2BAA2B,EAAED,OAAO,KAAK,CAAC,OAAO,EAAE;QAGxE,MAAME,OAAOF,OAAO,KAAK;QAEzB,OAAO;YACH,IAAIE,KAAK,EAAE;YACX,MAAMA,KAAK,IAAI;YACf,MAAMA,KAAK,IAAI;YACf,aAAaA,KAAK,WAAW;YAE7B,OAAOA,KAAK,KAAK;QACrB;IACJ;AACJ;AAEA,MAAMC,wBAAwBC,iBAAiB,oBAAoB,CAAC;IAChE,gBAAgBP;IAChB,cAAc;QAACQ;KAAW;AAC9B;AAUA,MAAMC;;aACO,IAAI,GAAG;aACP,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAGX;aACd,WAAW,GAAG;YAAE,cAAc;YAAO,gBAAgB;QAAK;aAC1D,OAAO,GAAGQ;;AACvB;AAEO,MAAMI,iBAAiBC,oBAAoB,oBAAoB,CAAC;IACnE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
|
package/features/ai/feature.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Folder and
|
|
2
|
+
* Folder, team and role tools for AI callers.
|
|
3
3
|
*
|
|
4
|
-
* The list tools are read-only and run unattended. Anything that creates or changes access is a write,
|
|
4
|
+
* The list tools are read-only and run unattended. Anything that creates, renames, moves, deletes or changes access is a write,
|
|
5
5
|
* so it pauses for the user to approve the exact arguments. Access changes are deliberately one target
|
|
6
6
|
* per call — granting and revoking separately means the approval block shows the entire change, rather
|
|
7
7
|
* than a desired end state whose omissions quietly remove somebody's access.
|
package/features/ai/feature.js
CHANGED
|
@@ -4,8 +4,15 @@ import { ListFoldersTool } from "./ListFoldersTool.js";
|
|
|
4
4
|
import { GrantFolderAccessTool } from "./GrantFolderAccessTool.js";
|
|
5
5
|
import { RevokeFolderAccessTool } from "./RevokeFolderAccessTool.js";
|
|
6
6
|
import { CreateFolderTool } from "./CreateFolderTool.js";
|
|
7
|
+
import { UpdateFolderTool } from "./UpdateFolderTool.js";
|
|
8
|
+
import { DeleteFolderTool } from "./DeleteFolderTool.js";
|
|
7
9
|
import { CreateTeamTool } from "./CreateTeamTool.js";
|
|
10
|
+
import { UpdateTeamTool } from "./UpdateTeamTool.js";
|
|
11
|
+
import { DeleteTeamTool } from "./DeleteTeamTool.js";
|
|
8
12
|
import { ListRolesTool } from "./ListRolesTool.js";
|
|
13
|
+
import { CreateRoleTool } from "./CreateRoleTool.js";
|
|
14
|
+
import { UpdateRoleTool } from "./UpdateRoleTool.js";
|
|
15
|
+
import { DeleteRoleTool } from "./DeleteRoleTool.js";
|
|
9
16
|
const AcoAiToolsFeature = createFeature({
|
|
10
17
|
name: "Aco/AiTools",
|
|
11
18
|
register (container) {
|
|
@@ -14,8 +21,15 @@ const AcoAiToolsFeature = createFeature({
|
|
|
14
21
|
container.register(GrantFolderAccessTool);
|
|
15
22
|
container.register(RevokeFolderAccessTool);
|
|
16
23
|
container.register(CreateFolderTool);
|
|
24
|
+
container.register(UpdateFolderTool);
|
|
25
|
+
container.register(DeleteFolderTool);
|
|
17
26
|
container.register(CreateTeamTool);
|
|
27
|
+
container.register(UpdateTeamTool);
|
|
28
|
+
container.register(DeleteTeamTool);
|
|
18
29
|
container.register(ListRolesTool);
|
|
30
|
+
container.register(CreateRoleTool);
|
|
31
|
+
container.register(UpdateRoleTool);
|
|
32
|
+
container.register(DeleteRoleTool);
|
|
19
33
|
}
|
|
20
34
|
});
|
|
21
35
|
export { AcoAiToolsFeature };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/ai/feature.js","sources":["../../../src/features/ai/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { ListTeamsTool } from \"./ListTeamsTool.js\";\nimport { ListFoldersTool } from \"./ListFoldersTool.js\";\nimport { GrantFolderAccessTool } from \"./GrantFolderAccessTool.js\";\nimport { RevokeFolderAccessTool } from \"./RevokeFolderAccessTool.js\";\nimport { CreateFolderTool } from \"./CreateFolderTool.js\";\nimport { CreateTeamTool } from \"./CreateTeamTool.js\";\nimport { ListRolesTool } from \"./ListRolesTool.js\";\n\n/**\n * Folder and
|
|
1
|
+
{"version":3,"file":"features/ai/feature.js","sources":["../../../src/features/ai/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { ListTeamsTool } from \"./ListTeamsTool.js\";\nimport { ListFoldersTool } from \"./ListFoldersTool.js\";\nimport { GrantFolderAccessTool } from \"./GrantFolderAccessTool.js\";\nimport { RevokeFolderAccessTool } from \"./RevokeFolderAccessTool.js\";\nimport { CreateFolderTool } from \"./CreateFolderTool.js\";\nimport { UpdateFolderTool } from \"./UpdateFolderTool.js\";\nimport { DeleteFolderTool } from \"./DeleteFolderTool.js\";\nimport { CreateTeamTool } from \"./CreateTeamTool.js\";\nimport { UpdateTeamTool } from \"./UpdateTeamTool.js\";\nimport { DeleteTeamTool } from \"./DeleteTeamTool.js\";\nimport { ListRolesTool } from \"./ListRolesTool.js\";\nimport { CreateRoleTool } from \"./CreateRoleTool.js\";\nimport { UpdateRoleTool } from \"./UpdateRoleTool.js\";\nimport { DeleteRoleTool } from \"./DeleteRoleTool.js\";\n\n/**\n * Folder, team and role tools for AI callers.\n *\n * The list tools are read-only and run unattended. Anything that creates, renames, moves, deletes or changes access is a write,\n * so it pauses for the user to approve the exact arguments. Access changes are deliberately one target\n * per call — granting and revoking separately means the approval block shows the entire change, rather\n * than a desired end state whose omissions quietly remove somebody's access.\n */\nexport const AcoAiToolsFeature = createFeature({\n name: \"Aco/AiTools\",\n register(container) {\n container.register(ListTeamsTool);\n container.register(ListFoldersTool);\n container.register(GrantFolderAccessTool);\n container.register(RevokeFolderAccessTool);\n container.register(CreateFolderTool);\n container.register(UpdateFolderTool);\n container.register(DeleteFolderTool);\n container.register(CreateTeamTool);\n container.register(UpdateTeamTool);\n container.register(DeleteTeamTool);\n container.register(ListRolesTool);\n container.register(CreateRoleTool);\n container.register(UpdateRoleTool);\n container.register(DeleteRoleTool);\n }\n});\n"],"names":["AcoAiToolsFeature","createFeature","container","ListTeamsTool","ListFoldersTool","GrantFolderAccessTool","RevokeFolderAccessTool","CreateFolderTool","UpdateFolderTool","DeleteFolderTool","CreateTeamTool","UpdateTeamTool","DeleteTeamTool","ListRolesTool","CreateRoleTool","UpdateRoleTool","DeleteRoleTool"],"mappings":";;;;;;;;;;;;;;;AAwBO,MAAMA,oBAAoBC,cAAc;IAC3C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE;QACnBF,UAAU,QAAQ,CAACG;QACnBH,UAAU,QAAQ,CAACI;QACnBJ,UAAU,QAAQ,CAACK;QACnBL,UAAU,QAAQ,CAACM;QACnBN,UAAU,QAAQ,CAACO;QACnBP,UAAU,QAAQ,CAACQ;QACnBR,UAAU,QAAQ,CAACS;QACnBT,UAAU,QAAQ,CAACU;QACnBV,UAAU,QAAQ,CAACW;QACnBX,UAAU,QAAQ,CAACY;QACnBZ,UAAU,QAAQ,CAACa;QACnBb,UAAU,QAAQ,CAACc;IACvB;AACJ"}
|
package/features/ai/index.d.ts
CHANGED
|
@@ -2,7 +2,14 @@ export { AcoAiToolsFeature } from "./feature.js";
|
|
|
2
2
|
export { ListTeamsTool } from "./ListTeamsTool.js";
|
|
3
3
|
export { ListFoldersTool } from "./ListFoldersTool.js";
|
|
4
4
|
export { ListRolesTool } from "./ListRolesTool.js";
|
|
5
|
+
export { CreateRoleTool } from "./CreateRoleTool.js";
|
|
6
|
+
export { UpdateRoleTool } from "./UpdateRoleTool.js";
|
|
7
|
+
export { DeleteRoleTool } from "./DeleteRoleTool.js";
|
|
5
8
|
export { GrantFolderAccessTool } from "./GrantFolderAccessTool.js";
|
|
6
9
|
export { RevokeFolderAccessTool } from "./RevokeFolderAccessTool.js";
|
|
7
10
|
export { CreateFolderTool } from "./CreateFolderTool.js";
|
|
11
|
+
export { UpdateFolderTool } from "./UpdateFolderTool.js";
|
|
12
|
+
export { DeleteFolderTool } from "./DeleteFolderTool.js";
|
|
8
13
|
export { CreateTeamTool } from "./CreateTeamTool.js";
|
|
14
|
+
export { UpdateTeamTool } from "./UpdateTeamTool.js";
|
|
15
|
+
export { DeleteTeamTool } from "./DeleteTeamTool.js";
|
package/features/ai/index.js
CHANGED
|
@@ -2,7 +2,14 @@ export { AcoAiToolsFeature } from "./feature.js";
|
|
|
2
2
|
export { ListTeamsTool } from "./ListTeamsTool.js";
|
|
3
3
|
export { ListFoldersTool } from "./ListFoldersTool.js";
|
|
4
4
|
export { ListRolesTool } from "./ListRolesTool.js";
|
|
5
|
+
export { CreateRoleTool } from "./CreateRoleTool.js";
|
|
6
|
+
export { UpdateRoleTool } from "./UpdateRoleTool.js";
|
|
7
|
+
export { DeleteRoleTool } from "./DeleteRoleTool.js";
|
|
5
8
|
export { GrantFolderAccessTool } from "./GrantFolderAccessTool.js";
|
|
6
9
|
export { RevokeFolderAccessTool } from "./RevokeFolderAccessTool.js";
|
|
7
10
|
export { CreateFolderTool } from "./CreateFolderTool.js";
|
|
11
|
+
export { UpdateFolderTool } from "./UpdateFolderTool.js";
|
|
12
|
+
export { DeleteFolderTool } from "./DeleteFolderTool.js";
|
|
8
13
|
export { CreateTeamTool } from "./CreateTeamTool.js";
|
|
14
|
+
export { UpdateTeamTool } from "./UpdateTeamTool.js";
|
|
15
|
+
export { DeleteTeamTool } from "./DeleteTeamTool.js";
|
|
@@ -2,7 +2,10 @@ import type { GetFolderUseCase } from "../../features/folder/GetFolder/index.js"
|
|
|
2
2
|
import type { Folder, FolderPermission } from "../../types.js";
|
|
3
3
|
export interface LoadedFolderPermissions {
|
|
4
4
|
folder: Folder;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Rules set on this folder. The only ones it may change. Code-defined rules (`plugin`) are left
|
|
7
|
+
* out: they are merged in on read, and the update refuses any that are sent back.
|
|
8
|
+
*/
|
|
6
9
|
direct: FolderPermission[];
|
|
7
10
|
/** Targets granted by an ancestor or a role. Writing these back would detach the inheritance. */
|
|
8
11
|
inheritedTargets: Set<string>;
|
|
@@ -5,7 +5,7 @@ const loadFolderPermissions = async (getFolder, folderId)=>{
|
|
|
5
5
|
const permissions = folder.permissions ?? [];
|
|
6
6
|
return {
|
|
7
7
|
folder,
|
|
8
|
-
direct: permissions.filter((permission)=>!permission.inheritedFrom),
|
|
8
|
+
direct: permissions.filter((permission)=>!permission.inheritedFrom && !permission.plugin),
|
|
9
9
|
inheritedTargets: new Set(permissions.filter((permission)=>permission.inheritedFrom).map((p)=>String(p.target)))
|
|
10
10
|
};
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/ai/loadFolderPermissions.js","sources":["../../../src/features/ai/loadFolderPermissions.ts"],"sourcesContent":["import type { GetFolderUseCase } from \"~/features/folder/GetFolder/index.js\";\nimport type { Folder, FolderPermission } from \"~/types.js\";\n\nexport interface LoadedFolderPermissions {\n folder: Folder;\n
|
|
1
|
+
{"version":3,"file":"features/ai/loadFolderPermissions.js","sources":["../../../src/features/ai/loadFolderPermissions.ts"],"sourcesContent":["import type { GetFolderUseCase } from \"~/features/folder/GetFolder/index.js\";\nimport type { Folder, FolderPermission } from \"~/types.js\";\n\nexport interface LoadedFolderPermissions {\n folder: Folder;\n /**\n * Rules set on this folder. The only ones it may change. Code-defined rules (`plugin`) are left\n * out: they are merged in on read, and the update refuses any that are sent back.\n */\n direct: FolderPermission[];\n /** Targets granted by an ancestor or a role. Writing these back would detach the inheritance. */\n inheritedTargets: Set<string>;\n}\n\n/**\n * Reads a folder and separates the rules it owns from the ones it merely inherits.\n *\n * Every permission write starts here, because the field holds both kinds and a change has to preserve\n * the direct rules while leaving the inherited ones alone.\n */\nexport const loadFolderPermissions = async (\n getFolder: GetFolderUseCase.Interface,\n folderId: string\n): Promise<LoadedFolderPermissions> => {\n const result = await getFolder.execute(folderId);\n\n if (result.isFail()) {\n throw new Error(\n `Folder \"${folderId}\" not found: ${result.error.message}. Call listFolders for valid ids.`\n );\n }\n\n const folder = result.value;\n const permissions = folder.permissions ?? [];\n\n return {\n folder,\n direct: permissions.filter(permission => !permission.inheritedFrom && !permission.plugin),\n inheritedTargets: new Set(\n permissions.filter(permission => permission.inheritedFrom).map(p => String(p.target))\n )\n };\n};\n"],"names":["loadFolderPermissions","getFolder","folderId","result","Error","folder","permissions","permission","Set","p","String"],"mappings":"AAoBO,MAAMA,wBAAwB,OACjCC,WACAC;IAEA,MAAMC,SAAS,MAAMF,UAAU,OAAO,CAACC;IAEvC,IAAIC,OAAO,MAAM,IACb,MAAM,IAAIC,MACN,CAAC,QAAQ,EAAEF,SAAS,aAAa,EAAEC,OAAO,KAAK,CAAC,OAAO,CAAC,iCAAiC,CAAC;IAIlG,MAAME,SAASF,OAAO,KAAK;IAC3B,MAAMG,cAAcD,OAAO,WAAW,IAAI,EAAE;IAE5C,OAAO;QACHA;QACA,QAAQC,YAAY,MAAM,CAACC,CAAAA,aAAc,CAACA,WAAW,aAAa,IAAI,CAACA,WAAW,MAAM;QACxF,kBAAkB,IAAIC,IAClBF,YAAY,MAAM,CAACC,CAAAA,aAAcA,WAAW,aAAa,EAAE,GAAG,CAACE,CAAAA,IAAKC,OAAOD,EAAE,MAAM;IAE3F;AACJ"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ListDeletedEntriesUseCase } from "@webiny/api-headless-cms/features/contentEntry/ListEntries/abstractions.js";
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
2
|
+
import type { CmsEntryListParams, CmsEntryValues, CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
+
import { FolderAccessListFilter } from "../../../features/flp/FolderAccessListFilter/index.js";
|
|
4
4
|
declare class ListDeletedEntriesWithFlpDecoratorImpl implements ListDeletedEntriesUseCase.Interface {
|
|
5
|
+
private folderAccessListFilter;
|
|
5
6
|
private decoratee;
|
|
6
|
-
|
|
7
|
-
constructor(folderLevelPermissions: FolderLevelPermissions.Interface, decoratee: ListDeletedEntriesUseCase.Interface);
|
|
7
|
+
constructor(folderAccessListFilter: FolderAccessListFilter.Interface, decoratee: ListDeletedEntriesUseCase.Interface);
|
|
8
8
|
execute<T extends CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams): ListDeletedEntriesUseCase.Return<T>;
|
|
9
9
|
}
|
|
10
10
|
export declare const ListDeletedEntriesWithFlpDecorator: typeof ListDeletedEntriesWithFlpDecoratorImpl;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Result, createDecorator } from "@webiny/feature/api";
|
|
2
2
|
import { ListDeletedEntriesUseCase } from "@webiny/api-headless-cms/features/contentEntry/ListEntries/abstractions.js";
|
|
3
|
-
import {
|
|
4
|
-
import { ListEntriesFactory } from "../../../utils/decorators/ListEntriesFactory.js";
|
|
3
|
+
import { FolderAccessListFilter } from "../../flp/FolderAccessListFilter/index.js";
|
|
5
4
|
class ListDeletedEntriesWithFlpDecoratorImpl {
|
|
6
|
-
constructor(
|
|
5
|
+
constructor(folderAccessListFilter, decoratee){
|
|
6
|
+
this.folderAccessListFilter = folderAccessListFilter;
|
|
7
7
|
this.decoratee = decoratee;
|
|
8
|
-
this.listEntriesHandler = new ListEntriesFactory(folderLevelPermissions);
|
|
9
8
|
}
|
|
10
9
|
async execute(model, params) {
|
|
11
10
|
const loader = async (params)=>{
|
|
@@ -13,10 +12,10 @@ class ListDeletedEntriesWithFlpDecoratorImpl {
|
|
|
13
12
|
if (result.isFail()) throw result.error;
|
|
14
13
|
return result.value;
|
|
15
14
|
};
|
|
16
|
-
const { entries, meta } = await this.
|
|
15
|
+
const { entries, meta } = await this.folderAccessListFilter.listEntries({
|
|
17
16
|
model,
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
params,
|
|
18
|
+
loader
|
|
20
19
|
});
|
|
21
20
|
return Result.ok({
|
|
22
21
|
entries,
|
|
@@ -28,7 +27,7 @@ const ListDeletedEntriesWithFlpDecorator = createDecorator({
|
|
|
28
27
|
abstraction: ListDeletedEntriesUseCase,
|
|
29
28
|
decorator: ListDeletedEntriesWithFlpDecoratorImpl,
|
|
30
29
|
dependencies: [
|
|
31
|
-
|
|
30
|
+
FolderAccessListFilter
|
|
32
31
|
]
|
|
33
32
|
});
|
|
34
33
|
export { ListDeletedEntriesWithFlpDecorator };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/cms/decorators/ListDeletedEntriesWithFlpDecorator.js","sources":["../../../../src/features/cms/decorators/ListDeletedEntriesWithFlpDecorator.ts"],"sourcesContent":["import { createDecorator
|
|
1
|
+
{"version":3,"file":"features/cms/decorators/ListDeletedEntriesWithFlpDecorator.js","sources":["../../../../src/features/cms/decorators/ListDeletedEntriesWithFlpDecorator.ts"],"sourcesContent":["import { createDecorator, Result } from \"@webiny/feature/api\";\nimport { ListDeletedEntriesUseCase } from \"@webiny/api-headless-cms/features/contentEntry/ListEntries/abstractions.js\";\nimport type {\n CmsEntryListParams,\n CmsEntryValues,\n CmsModel\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport { FolderAccessListFilter } from \"~/features/flp/FolderAccessListFilter/index.js\";\n\nclass ListDeletedEntriesWithFlpDecoratorImpl implements ListDeletedEntriesUseCase.Interface {\n constructor(\n private folderAccessListFilter: FolderAccessListFilter.Interface,\n private decoratee: ListDeletedEntriesUseCase.Interface\n ) {}\n\n async execute<T extends CmsEntryValues>(\n model: CmsModel,\n params?: CmsEntryListParams\n ): ListDeletedEntriesUseCase.Return<T> {\n const loader = async (params?: CmsEntryListParams) => {\n const result = await this.decoratee.execute<T>(model, params);\n if (result.isFail()) {\n throw result.error;\n }\n return result.value;\n };\n\n const { entries, meta } = await this.folderAccessListFilter.listEntries<T>({\n model,\n params,\n loader\n });\n\n return Result.ok({ entries, meta });\n }\n}\n\nexport const ListDeletedEntriesWithFlpDecorator = createDecorator({\n abstraction: ListDeletedEntriesUseCase,\n decorator: ListDeletedEntriesWithFlpDecoratorImpl,\n dependencies: [FolderAccessListFilter]\n});\n"],"names":["ListDeletedEntriesWithFlpDecoratorImpl","folderAccessListFilter","decoratee","model","params","loader","result","entries","meta","Result","ListDeletedEntriesWithFlpDecorator","createDecorator","ListDeletedEntriesUseCase","FolderAccessListFilter"],"mappings":";;;AASA,MAAMA;IACF,YACYC,sBAAwD,EACxDC,SAA8C,CACxD;aAFUD,sBAAsB,GAAtBA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,QACFC,KAAe,EACfC,MAA2B,EACQ;QACnC,MAAMC,SAAS,OAAOD;YAClB,MAAME,SAAS,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAIH,OAAOC;YACtD,IAAIE,OAAO,MAAM,IACb,MAAMA,OAAO,KAAK;YAEtB,OAAOA,OAAO,KAAK;QACvB;QAEA,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAI;YACvEL;YACAC;YACAC;QACJ;QAEA,OAAOI,OAAO,EAAE,CAAC;YAAEF;YAASC;QAAK;IACrC;AACJ;AAEO,MAAME,qCAAqCC,gBAAgB;IAC9D,aAAaC;IACb,WAAWZ;IACX,cAAc;QAACa;KAAuB;AAC1C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ListEntriesUseCase } from "@webiny/api-headless-cms/features/contentEntry/ListEntries/abstractions.js";
|
|
2
2
|
import type { CmsEntryListParams, CmsEntryValues, CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { FolderAccessListFilter } from "../../../features/flp/FolderAccessListFilter/index.js";
|
|
4
4
|
declare class ListEntriesWithFlpDecoratorImpl implements ListEntriesUseCase.Interface {
|
|
5
|
+
private folderAccessListFilter;
|
|
5
6
|
private decoratee;
|
|
6
|
-
|
|
7
|
-
constructor(folderLevelPermissions: FolderLevelPermissions.Interface, decoratee: ListEntriesUseCase.Interface);
|
|
7
|
+
constructor(folderAccessListFilter: FolderAccessListFilter.Interface, decoratee: ListEntriesUseCase.Interface);
|
|
8
8
|
execute<T extends CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams): ListEntriesUseCase.Return<T>;
|
|
9
9
|
}
|
|
10
10
|
export declare const ListEntriesWithFlpDecorator: typeof ListEntriesWithFlpDecoratorImpl;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Result, createDecorator } from "@webiny/feature/api";
|
|
2
2
|
import { ListEntriesUseCase } from "@webiny/api-headless-cms/features/contentEntry/ListEntries/abstractions.js";
|
|
3
|
-
import {
|
|
4
|
-
import { ListEntriesFactory } from "../../../utils/decorators/ListEntriesFactory.js";
|
|
3
|
+
import { FolderAccessListFilter } from "../../flp/FolderAccessListFilter/index.js";
|
|
5
4
|
class ListEntriesWithFlpDecoratorImpl {
|
|
6
|
-
constructor(
|
|
5
|
+
constructor(folderAccessListFilter, decoratee){
|
|
6
|
+
this.folderAccessListFilter = folderAccessListFilter;
|
|
7
7
|
this.decoratee = decoratee;
|
|
8
|
-
this.listEntriesHandler = new ListEntriesFactory(folderLevelPermissions);
|
|
9
8
|
}
|
|
10
9
|
async execute(model, params) {
|
|
11
10
|
const loader = async (params)=>{
|
|
@@ -13,10 +12,10 @@ class ListEntriesWithFlpDecoratorImpl {
|
|
|
13
12
|
if (result.isFail()) throw result.error;
|
|
14
13
|
return result.value;
|
|
15
14
|
};
|
|
16
|
-
const { entries, meta } = await this.
|
|
15
|
+
const { entries, meta } = await this.folderAccessListFilter.listEntries({
|
|
17
16
|
model,
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
params,
|
|
18
|
+
loader
|
|
20
19
|
});
|
|
21
20
|
return Result.ok({
|
|
22
21
|
entries,
|
|
@@ -28,7 +27,7 @@ const ListEntriesWithFlpDecorator = createDecorator({
|
|
|
28
27
|
abstraction: ListEntriesUseCase,
|
|
29
28
|
decorator: ListEntriesWithFlpDecoratorImpl,
|
|
30
29
|
dependencies: [
|
|
31
|
-
|
|
30
|
+
FolderAccessListFilter
|
|
32
31
|
]
|
|
33
32
|
});
|
|
34
33
|
export { ListEntriesWithFlpDecorator };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/cms/decorators/ListEntriesWithFlpDecorator.js","sources":["../../../../src/features/cms/decorators/ListEntriesWithFlpDecorator.ts"],"sourcesContent":["import { createDecorator, Result } from \"@webiny/feature/api\";\nimport { ListEntriesUseCase } from \"@webiny/api-headless-cms/features/contentEntry/ListEntries/abstractions.js\";\nimport type {\n CmsEntryListParams,\n CmsEntryValues,\n CmsModel\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport {
|
|
1
|
+
{"version":3,"file":"features/cms/decorators/ListEntriesWithFlpDecorator.js","sources":["../../../../src/features/cms/decorators/ListEntriesWithFlpDecorator.ts"],"sourcesContent":["import { createDecorator, Result } from \"@webiny/feature/api\";\nimport { ListEntriesUseCase } from \"@webiny/api-headless-cms/features/contentEntry/ListEntries/abstractions.js\";\nimport type {\n CmsEntryListParams,\n CmsEntryValues,\n CmsModel\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport { FolderAccessListFilter } from \"~/features/flp/FolderAccessListFilter/index.js\";\n\nclass ListEntriesWithFlpDecoratorImpl implements ListEntriesUseCase.Interface {\n constructor(\n private folderAccessListFilter: FolderAccessListFilter.Interface,\n private decoratee: ListEntriesUseCase.Interface\n ) {}\n\n async execute<T extends CmsEntryValues>(\n model: CmsModel,\n params?: CmsEntryListParams\n ): ListEntriesUseCase.Return<T> {\n const loader = async (params?: CmsEntryListParams) => {\n const result = await this.decoratee.execute<T>(model, params);\n if (result.isFail()) {\n throw result.error;\n }\n return result.value;\n };\n\n const { entries, meta } = await this.folderAccessListFilter.listEntries<T>({\n model,\n params,\n loader\n });\n\n return Result.ok({ entries, meta });\n }\n}\n\nexport const ListEntriesWithFlpDecorator = createDecorator({\n abstraction: ListEntriesUseCase,\n decorator: ListEntriesWithFlpDecoratorImpl,\n dependencies: [FolderAccessListFilter]\n});\n"],"names":["ListEntriesWithFlpDecoratorImpl","folderAccessListFilter","decoratee","model","params","loader","result","entries","meta","Result","ListEntriesWithFlpDecorator","createDecorator","ListEntriesUseCase","FolderAccessListFilter"],"mappings":";;;AASA,MAAMA;IACF,YACYC,sBAAwD,EACxDC,SAAuC,CACjD;aAFUD,sBAAsB,GAAtBA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,QACFC,KAAe,EACfC,MAA2B,EACC;QAC5B,MAAMC,SAAS,OAAOD;YAClB,MAAME,SAAS,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAIH,OAAOC;YACtD,IAAIE,OAAO,MAAM,IACb,MAAMA,OAAO,KAAK;YAEtB,OAAOA,OAAO,KAAK;QACvB;QAEA,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAI;YACvEL;YACAC;YACAC;QACJ;QAEA,OAAOI,OAAO,EAAE,CAAC;YAAEF;YAASC;QAAK;IACrC;AACJ;AAEO,MAAME,8BAA8BC,gBAAgB;IACvD,aAAaC;IACb,WAAWZ;IACX,cAAc;QAACa;KAAuB;AAC1C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ListLatestEntriesUseCase } from "@webiny/api-headless-cms/features/contentEntry/ListEntries/abstractions.js";
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
2
|
+
import type { CmsEntryListParams, CmsEntryValues, CmsModel } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
+
import { FolderAccessListFilter } from "../../../features/flp/FolderAccessListFilter/index.js";
|
|
4
4
|
declare class ListLatestEntriesWithFlpDecoratorImpl implements ListLatestEntriesUseCase.Interface {
|
|
5
|
+
private folderAccessListFilter;
|
|
5
6
|
private decoratee;
|
|
6
|
-
|
|
7
|
-
constructor(folderLevelPermissions: FolderLevelPermissions.Interface, decoratee: ListLatestEntriesUseCase.Interface);
|
|
7
|
+
constructor(folderAccessListFilter: FolderAccessListFilter.Interface, decoratee: ListLatestEntriesUseCase.Interface);
|
|
8
8
|
execute<T extends CmsEntryValues>(model: CmsModel, params?: CmsEntryListParams): ListLatestEntriesUseCase.Return<T>;
|
|
9
9
|
}
|
|
10
10
|
export declare const ListLatestEntriesWithFlpDecorator: typeof ListLatestEntriesWithFlpDecoratorImpl;
|