@webiny/app-admin 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/base/Admin.js +19 -2
- package/base/Admin.js.map +1 -1
- package/base/Base/DefaultFieldRenderers.js +4 -0
- package/base/Base/DefaultFieldRenderers.js.map +1 -1
- package/base/Base/FieldRenderers/AutoCompleteRenderer.js +1 -0
- package/base/Base/FieldRenderers/AutoCompleteRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/BirthdayInputRenderer.d.ts +21 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.js +39 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.test.d.ts +1 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js +123 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js +21 -4
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +11 -2
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +2 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +14 -5
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +16 -25
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +18 -3
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/{TemplatePicker.d.ts → TemplatePicker/AddTemplateButton.d.ts} +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js +24 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.d.ts +13 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js +21 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.d.ts +3 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js +35 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.d.ts +8 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js +22 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js +52 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.d.ts +8 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js +16 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js +22 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.d.ts +3 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js +35 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.d.ts +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.js +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.d.ts +6 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.js +0 -0
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.d.ts +8 -3
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js +25 -17
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.d.ts +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js +106 -0
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js.map +1 -0
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js +3 -2
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/SelectRenderer.js +4 -2
- package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -1
- package/base/Base.js +2 -1
- package/base/Base.js.map +1 -1
- package/base/createRootContainer.js +4 -0
- package/base/createRootContainer.js.map +1 -1
- package/base/resolveApiUrl.d.ts +10 -0
- package/base/resolveApiUrl.js +11 -3
- package/base/resolveApiUrl.js.map +1 -1
- package/base/ui/AssumedPermissionsSelector.d.ts +47 -0
- package/base/ui/AssumedPermissionsSelector.js +7 -0
- package/base/ui/AssumedPermissionsSelector.js.map +1 -0
- package/base/ui/DebuggerIndicator.d.ts +23 -0
- package/base/ui/DebuggerIndicator.js +5 -0
- package/base/ui/DebuggerIndicator.js.map +1 -0
- package/base/ui/Layout.d.ts +20 -0
- package/base/ui/Layout.js +2 -1
- package/base/ui/Layout.js.map +1 -1
- package/components/DeveloperMode/DeveloperMode.d.ts +1 -3
- package/components/DeveloperMode/DeveloperMode.js.map +1 -1
- package/components/Filters/Filters.js +7 -1
- package/components/Filters/Filters.js.map +1 -1
- package/components/IconPicker/IconPickerComponent.js +1 -1
- package/components/IconPicker/IconPickerComponent.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +2 -2
- package/components/SplitView/SplitView.js +7 -7
- package/components/SplitView/SplitView.js.map +1 -1
- package/config/AdminConfig/Widget.d.ts +9 -1
- package/config/AdminConfig/Widget.js +6 -2
- package/config/AdminConfig/Widget.js.map +1 -1
- package/domain/Identity.js +1 -1
- package/domain/Identity.js.map +1 -1
- package/exports/admin/ui.d.ts +4 -0
- package/exports/admin/ui.js +4 -1
- package/exports/admin.d.ts +4 -0
- package/exports/admin.js +2 -0
- package/features/accessManagement/roles/roleEvents/AddCreatedRoleToCache.d.ts +12 -0
- package/features/accessManagement/roles/roleEvents/AddCreatedRoleToCache.js +18 -0
- package/features/accessManagement/roles/roleEvents/AddCreatedRoleToCache.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/RefreshRoleInCacheRepository.d.ts +18 -0
- package/features/accessManagement/roles/roleEvents/RefreshRoleInCacheRepository.js +26 -0
- package/features/accessManagement/roles/roleEvents/RefreshRoleInCacheRepository.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/RefreshUpdatedRoleInCache.d.ts +12 -0
- package/features/accessManagement/roles/roleEvents/RefreshUpdatedRoleInCache.js +18 -0
- package/features/accessManagement/roles/roleEvents/RefreshUpdatedRoleInCache.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/RemoveDeletedRoleFromCache.d.ts +12 -0
- package/features/accessManagement/roles/roleEvents/RemoveDeletedRoleFromCache.js +20 -0
- package/features/accessManagement/roles/roleEvents/RemoveDeletedRoleFromCache.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/RoleCreatedEvent.d.ts +14 -0
- package/features/accessManagement/roles/roleEvents/RoleCreatedEvent.js +13 -0
- package/features/accessManagement/roles/roleEvents/RoleCreatedEvent.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/RoleDeletedEvent.d.ts +9 -0
- package/features/accessManagement/roles/roleEvents/RoleDeletedEvent.js +13 -0
- package/features/accessManagement/roles/roleEvents/RoleDeletedEvent.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/RoleUpdatedEvent.d.ts +9 -0
- package/features/accessManagement/roles/roleEvents/RoleUpdatedEvent.js +13 -0
- package/features/accessManagement/roles/roleEvents/RoleUpdatedEvent.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/RoleWebsocketMessages.d.ts +12 -0
- package/features/accessManagement/roles/roleEvents/RoleWebsocketMessages.js +49 -0
- package/features/accessManagement/roles/roleEvents/RoleWebsocketMessages.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/abstractions.d.ts +33 -0
- package/features/accessManagement/roles/roleEvents/abstractions.js +8 -0
- package/features/accessManagement/roles/roleEvents/abstractions.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/feature.d.ts +5 -0
- package/features/accessManagement/roles/roleEvents/feature.js +19 -0
- package/features/accessManagement/roles/roleEvents/feature.js.map +1 -0
- package/features/accessManagement/roles/roleEvents/index.d.ts +1 -0
- package/features/accessManagement/roles/roleEvents/index.js +1 -0
- package/features/accessManagement/teams/teamEvents/AddCreatedTeamToCache.d.ts +12 -0
- package/features/accessManagement/teams/teamEvents/AddCreatedTeamToCache.js +18 -0
- package/features/accessManagement/teams/teamEvents/AddCreatedTeamToCache.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/RefreshTeamInCacheRepository.d.ts +18 -0
- package/features/accessManagement/teams/teamEvents/RefreshTeamInCacheRepository.js +26 -0
- package/features/accessManagement/teams/teamEvents/RefreshTeamInCacheRepository.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/RefreshUpdatedTeamInCache.d.ts +12 -0
- package/features/accessManagement/teams/teamEvents/RefreshUpdatedTeamInCache.js +18 -0
- package/features/accessManagement/teams/teamEvents/RefreshUpdatedTeamInCache.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/RemoveDeletedTeamFromCache.d.ts +12 -0
- package/features/accessManagement/teams/teamEvents/RemoveDeletedTeamFromCache.js +20 -0
- package/features/accessManagement/teams/teamEvents/RemoveDeletedTeamFromCache.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/TeamCreatedEvent.d.ts +14 -0
- package/features/accessManagement/teams/teamEvents/TeamCreatedEvent.js +13 -0
- package/features/accessManagement/teams/teamEvents/TeamCreatedEvent.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/TeamDeletedEvent.d.ts +9 -0
- package/features/accessManagement/teams/teamEvents/TeamDeletedEvent.js +13 -0
- package/features/accessManagement/teams/teamEvents/TeamDeletedEvent.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/TeamUpdatedEvent.d.ts +9 -0
- package/features/accessManagement/teams/teamEvents/TeamUpdatedEvent.js +13 -0
- package/features/accessManagement/teams/teamEvents/TeamUpdatedEvent.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/TeamWebsocketMessages.d.ts +12 -0
- package/features/accessManagement/teams/teamEvents/TeamWebsocketMessages.js +48 -0
- package/features/accessManagement/teams/teamEvents/TeamWebsocketMessages.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/abstractions.d.ts +33 -0
- package/features/accessManagement/teams/teamEvents/abstractions.js +8 -0
- package/features/accessManagement/teams/teamEvents/abstractions.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/feature.d.ts +5 -0
- package/features/accessManagement/teams/teamEvents/feature.js +19 -0
- package/features/accessManagement/teams/teamEvents/feature.js.map +1 -0
- package/features/accessManagement/teams/teamEvents/index.d.ts +1 -0
- package/features/accessManagement/teams/teamEvents/index.js +1 -0
- package/features/{aiChat/AiChatGateway.d.ts → adminAssistant/AdminAssistantGateway.d.ts} +7 -7
- package/features/{aiChat/AiChatGateway.js → adminAssistant/AdminAssistantGateway.js} +11 -11
- package/features/adminAssistant/AdminAssistantGateway.js.map +1 -0
- package/features/adminAssistant/AdminAssistantPresenter.d.ts +56 -0
- package/features/adminAssistant/AdminAssistantPresenter.js +335 -0
- package/features/adminAssistant/AdminAssistantPresenter.js.map +1 -0
- package/features/adminAssistant/abstractions.d.ts +181 -0
- package/features/adminAssistant/abstractions.js +6 -0
- package/features/adminAssistant/abstractions.js.map +1 -0
- package/features/adminAssistant/feature.d.ts +3 -0
- package/features/adminAssistant/feature.js +19 -0
- package/features/adminAssistant/feature.js.map +1 -0
- package/features/adminAssistant/index.d.ts +6 -0
- package/features/adminAssistant/index.js +3 -0
- package/features/adminAssistant/turnsFromMessages.d.ts +12 -0
- package/features/adminAssistant/turnsFromMessages.js +75 -0
- package/features/adminAssistant/turnsFromMessages.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.d.ts +11 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js +44 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.d.ts +10 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js +19 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.d.ts +16 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js +5 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.d.ts +10 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js +5 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/index.d.ts +6 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/index.js +2 -0
- package/features/adminUsers/account/getCurrentUser/feature.d.ts +3 -0
- package/features/adminUsers/account/getCurrentUser/feature.js +19 -0
- package/features/adminUsers/account/getCurrentUser/feature.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/index.d.ts +1 -0
- package/features/adminUsers/account/getCurrentUser/index.js +1 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.d.ts +11 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js +48 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.d.ts +10 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js +19 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.d.ts +26 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js +5 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.d.ts +13 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js +5 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/index.d.ts +8 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/index.js +2 -0
- package/features/adminUsers/account/updateCurrentUser/feature.d.ts +3 -0
- package/features/adminUsers/account/updateCurrentUser/feature.js +19 -0
- package/features/adminUsers/account/updateCurrentUser/feature.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/index.d.ts +1 -0
- package/features/adminUsers/account/updateCurrentUser/index.js +1 -0
- package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.d.ts +6 -0
- package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js +22 -0
- package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js.map +1 -0
- package/features/adminUsers/passwordPolicy/abstractions.d.ts +20 -0
- package/features/adminUsers/passwordPolicy/abstractions.js +5 -0
- package/features/adminUsers/passwordPolicy/abstractions.js.map +1 -0
- package/features/adminUsers/passwordPolicy/feature.d.ts +8 -0
- package/features/adminUsers/passwordPolicy/feature.js +18 -0
- package/features/adminUsers/passwordPolicy/feature.js.map +1 -0
- package/features/adminUsers/passwordPolicy/index.d.ts +3 -0
- package/features/adminUsers/passwordPolicy/index.js +3 -0
- package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.d.ts +10 -0
- package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js +11 -0
- package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js.map +1 -0
- package/features/adminUsers/permissions/abstractions.d.ts +17 -0
- package/features/adminUsers/permissions/abstractions.js +6 -0
- package/features/adminUsers/permissions/abstractions.js.map +1 -0
- package/features/adminUsers/permissions/feature.d.ts +14 -0
- package/features/adminUsers/permissions/feature.js +7 -0
- package/features/adminUsers/permissions/feature.js.map +1 -0
- package/features/adminUsers/permissionsSchema.d.ts +10 -0
- package/features/adminUsers/permissionsSchema.js +18 -0
- package/features/adminUsers/permissionsSchema.js.map +1 -0
- package/features/adminUsers/users/createUser/CreateUserGateway.d.ts +11 -0
- package/features/adminUsers/users/createUser/CreateUserGateway.js +49 -0
- package/features/adminUsers/users/createUser/CreateUserGateway.js.map +1 -0
- package/features/adminUsers/users/createUser/CreateUserUseCase.d.ts +10 -0
- package/features/adminUsers/users/createUser/CreateUserUseCase.js +18 -0
- package/features/adminUsers/users/createUser/CreateUserUseCase.js.map +1 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.d.ts +21 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js +5 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js.map +1 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.d.ts +14 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js +5 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js.map +1 -0
- package/features/adminUsers/users/createUser/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/createUser/abstractions/index.js +2 -0
- package/features/adminUsers/users/createUser/feature.d.ts +3 -0
- package/features/adminUsers/users/createUser/feature.js +19 -0
- package/features/adminUsers/users/createUser/feature.js.map +1 -0
- package/features/adminUsers/users/createUser/index.d.ts +2 -0
- package/features/adminUsers/users/createUser/index.js +2 -0
- package/features/adminUsers/users/deleteUser/DeleteUserGateway.d.ts +11 -0
- package/features/adminUsers/users/deleteUser/DeleteUserGateway.js +40 -0
- package/features/adminUsers/users/deleteUser/DeleteUserGateway.js.map +1 -0
- package/features/adminUsers/users/deleteUser/DeleteUserUseCase.d.ts +10 -0
- package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js +18 -0
- package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js.map +1 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.d.ts +11 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js +5 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js.map +1 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.d.ts +11 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js +5 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js.map +1 -0
- package/features/adminUsers/users/deleteUser/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/deleteUser/abstractions/index.js +2 -0
- package/features/adminUsers/users/deleteUser/feature.d.ts +3 -0
- package/features/adminUsers/users/deleteUser/feature.js +19 -0
- package/features/adminUsers/users/deleteUser/feature.js.map +1 -0
- package/features/adminUsers/users/deleteUser/index.d.ts +2 -0
- package/features/adminUsers/users/deleteUser/index.js +2 -0
- package/features/adminUsers/users/getUser/GetUserGateway.d.ts +11 -0
- package/features/adminUsers/users/getUser/GetUserGateway.js +57 -0
- package/features/adminUsers/users/getUser/GetUserGateway.js.map +1 -0
- package/features/adminUsers/users/getUser/GetUserUseCase.d.ts +10 -0
- package/features/adminUsers/users/getUser/GetUserUseCase.js +18 -0
- package/features/adminUsers/users/getUser/GetUserUseCase.js.map +1 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserGateway.d.ts +32 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js +5 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js.map +1 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.d.ts +14 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js +5 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js.map +1 -0
- package/features/adminUsers/users/getUser/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/getUser/abstractions/index.js +2 -0
- package/features/adminUsers/users/getUser/feature.d.ts +3 -0
- package/features/adminUsers/users/getUser/feature.js +19 -0
- package/features/adminUsers/users/getUser/feature.js.map +1 -0
- package/features/adminUsers/users/getUser/index.d.ts +2 -0
- package/features/adminUsers/users/getUser/index.js +2 -0
- package/features/adminUsers/users/listUsers/ListUsersGateway.d.ts +11 -0
- package/features/adminUsers/users/listUsers/ListUsersGateway.js +39 -0
- package/features/adminUsers/users/listUsers/ListUsersGateway.js.map +1 -0
- package/features/adminUsers/users/listUsers/ListUsersUseCase.d.ts +10 -0
- package/features/adminUsers/users/listUsers/ListUsersUseCase.js +18 -0
- package/features/adminUsers/users/listUsers/ListUsersUseCase.js.map +1 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.d.ts +17 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js +5 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js.map +1 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.d.ts +10 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js +5 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js.map +1 -0
- package/features/adminUsers/users/listUsers/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/listUsers/abstractions/index.js +2 -0
- package/features/adminUsers/users/listUsers/feature.d.ts +3 -0
- package/features/adminUsers/users/listUsers/feature.js +19 -0
- package/features/adminUsers/users/listUsers/feature.js.map +1 -0
- package/features/adminUsers/users/listUsers/index.d.ts +2 -0
- package/features/adminUsers/users/listUsers/index.js +2 -0
- package/features/adminUsers/users/updateUser/UpdateUserGateway.d.ts +11 -0
- package/features/adminUsers/users/updateUser/UpdateUserGateway.js +59 -0
- package/features/adminUsers/users/updateUser/UpdateUserGateway.js.map +1 -0
- package/features/adminUsers/users/updateUser/UpdateUserUseCase.d.ts +10 -0
- package/features/adminUsers/users/updateUser/UpdateUserUseCase.js +18 -0
- package/features/adminUsers/users/updateUser/UpdateUserUseCase.js.map +1 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.d.ts +33 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js +5 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js.map +1 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.d.ts +15 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js +5 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js.map +1 -0
- package/features/adminUsers/users/updateUser/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/updateUser/abstractions/index.js +2 -0
- package/features/adminUsers/users/updateUser/feature.d.ts +3 -0
- package/features/adminUsers/users/updateUser/feature.js +19 -0
- package/features/adminUsers/users/updateUser/feature.js.map +1 -0
- package/features/adminUsers/users/updateUser/index.d.ts +2 -0
- package/features/adminUsers/users/updateUser/index.js +2 -0
- package/features/aiChats/AiChatsGateway.d.ts +15 -0
- package/features/aiChats/AiChatsGateway.js +107 -0
- package/features/aiChats/AiChatsGateway.js.map +1 -0
- package/features/aiChats/AiChatsRepository.d.ts +34 -0
- package/features/aiChats/AiChatsRepository.js +91 -0
- package/features/aiChats/AiChatsRepository.js.map +1 -0
- package/features/aiChats/abstractions.d.ts +64 -0
- package/features/aiChats/abstractions.js +6 -0
- package/features/aiChats/abstractions.js.map +1 -0
- package/features/aiChats/feature.d.ts +3 -0
- package/features/aiChats/feature.js +19 -0
- package/features/aiChats/feature.js.map +1 -0
- package/features/aiChats/index.d.ts +7 -0
- package/features/aiChats/index.js +2 -0
- package/features/aiChats/messageOf.d.ts +2 -0
- package/features/aiChats/messageOf.js +7 -0
- package/features/aiChats/messageOf.js.map +1 -0
- package/features/aiSettings/abstractions.d.ts +16 -0
- package/features/aiSettings/abstractions.js +5 -0
- package/features/aiSettings/abstractions.js.map +1 -0
- package/features/aiSettings/index.d.ts +2 -0
- package/features/aiSettings/index.js +1 -0
- package/features/assumePermissions/ApiStreamClientDecorator.d.ts +16 -0
- package/features/assumePermissions/ApiStreamClientDecorator.js +29 -0
- package/features/assumePermissions/ApiStreamClientDecorator.js.map +1 -0
- package/features/assumePermissions/AssumePermissionsContext.d.ts +17 -0
- package/features/assumePermissions/AssumePermissionsContext.js +32 -0
- package/features/assumePermissions/AssumePermissionsContext.js.map +1 -0
- package/features/assumePermissions/AssumePermissionsUseCase.d.ts +33 -0
- package/features/assumePermissions/AssumePermissionsUseCase.js +48 -0
- package/features/assumePermissions/AssumePermissionsUseCase.js.map +1 -0
- package/features/assumePermissions/GraphQLClientDecorator.d.ts +16 -0
- package/features/assumePermissions/GraphQLClientDecorator.js +29 -0
- package/features/assumePermissions/GraphQLClientDecorator.js.map +1 -0
- package/features/assumePermissions/ListAssumableTargetsGateway.d.ts +13 -0
- package/features/assumePermissions/ListAssumableTargetsGateway.js +74 -0
- package/features/assumePermissions/ListAssumableTargetsGateway.js.map +1 -0
- package/features/assumePermissions/ListAssumableTargetsUseCase.d.ts +16 -0
- package/features/assumePermissions/ListAssumableTargetsUseCase.js +38 -0
- package/features/assumePermissions/ListAssumableTargetsUseCase.js.map +1 -0
- package/features/assumePermissions/LogInUseCaseDecorator.d.ts +33 -0
- package/features/assumePermissions/LogInUseCaseDecorator.js +36 -0
- package/features/assumePermissions/LogInUseCaseDecorator.js.map +1 -0
- package/features/assumePermissions/LogOutUseCaseDecorator.d.ts +16 -0
- package/features/assumePermissions/LogOutUseCaseDecorator.js +21 -0
- package/features/assumePermissions/LogOutUseCaseDecorator.js.map +1 -0
- package/features/assumePermissions/abstractions.d.ts +78 -0
- package/features/assumePermissions/abstractions.js +8 -0
- package/features/assumePermissions/abstractions.js.map +1 -0
- package/features/assumePermissions/assumePermissionsHeader.d.ts +3 -0
- package/features/assumePermissions/assumePermissionsHeader.js +7 -0
- package/features/assumePermissions/assumePermissionsHeader.js.map +1 -0
- package/features/assumePermissions/feature.d.ts +4 -0
- package/features/assumePermissions/feature.js +32 -0
- package/features/assumePermissions/feature.js.map +1 -0
- package/features/assumePermissions/index.d.ts +4 -0
- package/features/assumePermissions/index.js +2 -0
- package/features/banners/Banners.d.ts +15 -0
- package/features/banners/Banners.js +39 -0
- package/features/banners/Banners.js.map +1 -0
- package/features/banners/abstractions.d.ts +34 -0
- package/features/banners/abstractions.js +5 -0
- package/features/banners/abstractions.js.map +1 -0
- package/features/banners/feature.d.ts +3 -0
- package/features/banners/feature.js +17 -0
- package/features/banners/feature.js.map +1 -0
- package/features/banners/index.d.ts +2 -0
- package/features/banners/index.js +2 -0
- package/features/dateFormatter/formatUtcOffset.d.ts +1 -0
- package/features/dateFormatter/formatUtcOffset.js +11 -0
- package/features/dateFormatter/formatUtcOffset.js.map +1 -0
- package/features/debugger/DebugSessionsRepository.d.ts +35 -0
- package/features/debugger/DebugSessionsRepository.js +57 -0
- package/features/debugger/DebugSessionsRepository.js.map +1 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.d.ts +17 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.js +21 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.js.map +1 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.test.d.ts +1 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.test.js +112 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.test.js.map +1 -0
- package/features/debugger/abstractions.d.ts +50 -0
- package/features/debugger/abstractions.js +5 -0
- package/features/debugger/abstractions.js.map +1 -0
- package/features/debugger/constants.d.ts +1 -0
- package/features/debugger/constants.js +4 -0
- package/features/debugger/constants.js.map +1 -0
- package/features/debugger/feature.d.ts +3 -0
- package/features/debugger/feature.js +19 -0
- package/features/debugger/feature.js.map +1 -0
- package/features/debugger/index.d.ts +3 -0
- package/features/debugger/index.js +3 -0
- package/features/formModel/AccessControlRuleEvaluator.d.ts +12 -0
- package/features/formModel/AccessControlRuleEvaluator.js +30 -0
- package/features/formModel/AccessControlRuleEvaluator.js.map +1 -0
- package/features/formModel/AccessControlRuleEvaluator.test.d.ts +1 -0
- package/features/formModel/AccessControlRuleEvaluator.test.js +219 -0
- package/features/formModel/AccessControlRuleEvaluator.test.js.map +1 -0
- package/features/formModel/ConditionRuleEvaluator.js +34 -4
- package/features/formModel/ConditionRuleEvaluator.js.map +1 -1
- package/features/formModel/Field.d.ts +14 -1
- package/features/formModel/Field.js +41 -5
- package/features/formModel/Field.js.map +1 -1
- package/features/formModel/FieldBuilder.d.ts +3 -3
- package/features/formModel/FieldBuilder.js +2 -1
- package/features/formModel/FieldBuilder.js.map +1 -1
- package/features/formModel/FieldBuilder.test.js +158 -1
- package/features/formModel/FieldBuilder.test.js.map +1 -1
- package/features/formModel/FocusManager.js +10 -3
- package/features/formModel/FocusManager.js.map +1 -1
- package/features/formModel/FormErrors.js +1 -1
- package/features/formModel/FormErrors.js.map +1 -1
- package/features/formModel/FormModel.d.ts +2 -0
- package/features/formModel/FormModel.js +32 -9
- package/features/formModel/FormModel.js.map +1 -1
- package/features/formModel/FormModel.test.js +835 -4
- package/features/formModel/FormModel.test.js.map +1 -1
- package/features/formModel/ObjectField.d.ts +12 -1
- package/features/formModel/ObjectField.js +70 -20
- package/features/formModel/ObjectField.js.map +1 -1
- package/features/formModel/Rules.test.js +224 -16
- package/features/formModel/Rules.test.js.map +1 -1
- package/features/formModel/abstractions.d.ts +56 -4
- package/features/formModel/abstractions.js +2 -1
- package/features/formModel/abstractions.js.map +1 -1
- package/features/formModel/createFieldRenderer.d.ts +42 -0
- package/features/formModel/createFieldRenderer.js +33 -10
- package/features/formModel/createFieldRenderer.js.map +1 -1
- package/features/formModel/feature.js +2 -0
- package/features/formModel/feature.js.map +1 -1
- package/features/formModel/fieldTypes/DateTimeFieldType.d.ts +67 -4
- package/features/formModel/fieldTypes/DateTimeFieldType.js +88 -22
- package/features/formModel/fieldTypes/DateTimeFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/ObjectFieldType.d.ts +3 -1
- package/features/formModel/fieldTypes/ObjectFieldType.js +23 -1
- package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/dateLimits.d.ts +37 -0
- package/features/formModel/fieldTypes/dateLimits.js +64 -0
- package/features/formModel/fieldTypes/dateLimits.js.map +1 -0
- package/features/formModel/fieldTypes/dateLimits.test.d.ts +1 -0
- package/features/formModel/fieldTypes/dateLimits.test.js +60 -0
- package/features/formModel/fieldTypes/dateLimits.test.js.map +1 -0
- package/features/formModel/hasSubtreeFocusRequest.d.ts +12 -0
- package/features/formModel/hasSubtreeFocusRequest.js +15 -0
- package/features/formModel/hasSubtreeFocusRequest.js.map +1 -0
- package/features/formModel/index.d.ts +3 -2
- package/features/formModel/index.js +2 -1
- package/features/formModel/jsonSchema/JsonSchema.d.ts +18 -0
- package/features/formModel/jsonSchema/JsonSchema.js +0 -0
- package/features/formModel/jsonSchema/JsonSchemaFieldOptions.d.ts +4 -0
- package/features/formModel/jsonSchema/JsonSchemaFieldOptions.js +0 -0
- package/features/formModel/jsonSchema/JsonSchemaIssue.d.ts +4 -0
- package/features/formModel/jsonSchema/JsonSchemaIssue.js +0 -0
- package/features/formModel/jsonSchema/JsonSchemaValidationResult.d.ts +5 -0
- package/features/formModel/jsonSchema/JsonSchemaValidationResult.js +0 -0
- package/features/formModel/jsonSchema/JsonSchemaValidator.d.ts +4 -0
- package/features/formModel/jsonSchema/JsonSchemaValidator.js +0 -0
- package/features/formModel/jsonSchema/PlainObject.d.ts +1 -0
- package/features/formModel/jsonSchema/PlainObject.js +0 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.d.ts +5 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js +154 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js.map +1 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.d.ts +1 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js +643 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js.map +1 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.d.ts +3 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.js +40 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.js.map +1 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.test.d.ts +1 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js +141 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js.map +1 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.d.ts +3 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js +52 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js.map +1 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.d.ts +1 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js +250 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js.map +1 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.d.ts +3 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.js +31 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.js.map +1 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.test.d.ts +1 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.test.js +123 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.test.js.map +1 -0
- package/features/formModel/jsonSchema/isPlainObject.d.ts +2 -0
- package/features/formModel/jsonSchema/isPlainObject.js +4 -0
- package/features/formModel/jsonSchema/isPlainObject.js.map +1 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.d.ts +3 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js +30 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js.map +1 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.d.ts +1 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js +207 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js.map +1 -0
- package/features/formModel/jsonSchema/normalizeJsonSchema.d.ts +2 -0
- package/features/formModel/jsonSchema/normalizeJsonSchema.js +10 -0
- package/features/formModel/jsonSchema/normalizeJsonSchema.js.map +1 -0
- package/features/formModel/renderers.d.ts +1 -0
- package/features/formModel/renderers.js +1 -0
- package/features/notifications/Notifications.d.ts +1 -0
- package/features/notifications/Notifications.js +3 -0
- package/features/notifications/Notifications.js.map +1 -1
- package/features/notifications/Notifications.test.d.ts +1 -0
- package/features/notifications/Notifications.test.js +106 -0
- package/features/notifications/Notifications.test.js.map +1 -0
- package/features/notifications/NotificationsRenderer.d.ts +2 -1
- package/features/notifications/NotificationsRenderer.js +23 -4
- package/features/notifications/NotificationsRenderer.js.map +1 -1
- package/features/notifications/NotificationsRenderer.test.d.ts +1 -0
- package/features/notifications/NotificationsRenderer.test.js +261 -0
- package/features/notifications/NotificationsRenderer.test.js.map +1 -0
- package/features/notifications/abstractions.d.ts +13 -2
- package/features/notifications/abstractions.js.map +1 -1
- package/features/security/LogIn/LogInUseCase.d.ts +0 -1
- package/features/security/LogIn/LogInUseCase.js +2 -5
- package/features/security/LogIn/LogInUseCase.js.map +1 -1
- package/features/security/LogIn/hasAppPermissions.d.ts +2 -0
- package/features/security/LogIn/hasAppPermissions.js +8 -0
- package/features/security/LogIn/hasAppPermissions.js.map +1 -0
- package/features/wcp/ReactLicense.d.ts +6 -1
- package/features/wcp/ReactLicense.js +17 -2
- package/features/wcp/ReactLicense.js.map +1 -1
- package/features/wcp/WcpGateway.js +4 -0
- package/features/wcp/WcpGateway.js.map +1 -1
- package/hooks/useHotkeys.js +6 -4
- package/hooks/useHotkeys.js.map +1 -1
- package/index.d.ts +27 -3
- package/index.js +23 -6
- package/modules/AccessManagementExtension.js +9 -1
- package/modules/AccessManagementExtension.js.map +1 -1
- package/modules/DebuggerExtension.d.ts +2 -0
- package/modules/DebuggerExtension.js +55 -0
- package/modules/DebuggerExtension.js.map +1 -0
- package/package.json +41 -41
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js +1 -2
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js.map +1 -1
- package/presentation/accessManagement/roles/RolesPresenter.js +1 -2
- package/presentation/accessManagement/roles/RolesPresenter.js.map +1 -1
- package/presentation/accessManagement/roles/components/RolesDataList.d.ts +10 -0
- package/presentation/accessManagement/roles/components/RolesDataList.js +146 -0
- package/presentation/accessManagement/roles/components/RolesDataList.js.map +1 -0
- package/presentation/accessManagement/roles/components/RolesForm.d.ts +13 -0
- package/presentation/accessManagement/roles/components/RolesForm.js +114 -0
- package/presentation/accessManagement/roles/components/RolesForm.js.map +1 -0
- package/presentation/accessManagement/roles/components/RolesView.js +6 -216
- package/presentation/accessManagement/roles/components/RolesView.js.map +1 -1
- package/presentation/accessManagement/teams/TeamsPresenter.js +1 -2
- package/presentation/accessManagement/teams/TeamsPresenter.js.map +1 -1
- package/presentation/accessManagement/teams/components/TeamsDataList.d.ts +10 -0
- package/presentation/accessManagement/teams/components/TeamsDataList.js +146 -0
- package/presentation/accessManagement/teams/components/TeamsDataList.js.map +1 -0
- package/presentation/accessManagement/teams/components/TeamsForm.d.ts +13 -0
- package/presentation/accessManagement/teams/components/TeamsForm.js +96 -0
- package/presentation/accessManagement/teams/components/TeamsForm.js.map +1 -0
- package/presentation/accessManagement/teams/components/TeamsView.js +6 -198
- package/presentation/accessManagement/teams/components/TeamsView.js.map +1 -1
- package/presentation/adminUsers/AdminUsers.d.ts +10 -0
- package/presentation/adminUsers/AdminUsers.js +77 -0
- package/presentation/adminUsers/AdminUsers.js.map +1 -0
- package/presentation/adminUsers/SecurityPermission.d.ts +2 -0
- package/presentation/adminUsers/SecurityPermission.js +15 -0
- package/presentation/adminUsers/SecurityPermission.js.map +1 -0
- package/presentation/adminUsers/UserItem.d.ts +10 -0
- package/presentation/adminUsers/UserItem.js +0 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImage.d.ts +3 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImage.js +31 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImage.js.map +1 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.d.ts +10 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js +53 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js.map +1 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.d.ts +7 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js +28 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js.map +1 -0
- package/presentation/adminUsers/components/AvatarImage/index.d.ts +1 -0
- package/presentation/adminUsers/components/AvatarImage/index.js +1 -0
- package/presentation/adminUsers/routes.d.ts +10 -0
- package/presentation/adminUsers/routes.js +20 -0
- package/presentation/adminUsers/routes.js.map +1 -0
- package/presentation/adminUsers/userMenu/AccountDetails.d.ts +6 -0
- package/presentation/adminUsers/userMenu/AccountDetails.js +20 -0
- package/presentation/adminUsers/userMenu/AccountDetails.js.map +1 -0
- package/presentation/adminUsers/userMenu/useIsDefaultTenant.d.ts +1 -0
- package/presentation/adminUsers/userMenu/useIsDefaultTenant.js +9 -0
- package/presentation/adminUsers/userMenu/useIsDefaultTenant.js.map +1 -0
- package/presentation/adminUsers/views/Account/Account.d.ts +2 -0
- package/presentation/adminUsers/views/Account/Account.js +137 -0
- package/presentation/adminUsers/views/Account/Account.js.map +1 -0
- package/presentation/adminUsers/views/Account/index.d.ts +1 -0
- package/presentation/adminUsers/views/Account/index.js +1 -0
- package/presentation/adminUsers/views/Users/UsersDataList.d.ts +3 -0
- package/presentation/adminUsers/views/Users/UsersDataList.js +180 -0
- package/presentation/adminUsers/views/Users/UsersDataList.js.map +1 -0
- package/presentation/adminUsers/views/Users/UsersForm.d.ts +5 -0
- package/presentation/adminUsers/views/Users/UsersForm.js +175 -0
- package/presentation/adminUsers/views/Users/UsersForm.js.map +1 -0
- package/presentation/adminUsers/views/Users/UsersView.d.ts +2 -0
- package/presentation/adminUsers/views/Users/UsersView.js +15 -0
- package/presentation/adminUsers/views/Users/UsersView.js.map +1 -0
- package/presentation/adminUsers/views/Users/components/DeleteAction.d.ts +7 -0
- package/presentation/adminUsers/views/Users/components/DeleteAction.js +29 -0
- package/presentation/adminUsers/views/Users/components/DeleteAction.js.map +1 -0
- package/presentation/adminUsers/views/Users/hooks/useUserForm.d.ts +27 -0
- package/presentation/adminUsers/views/Users/hooks/useUserForm.js +101 -0
- package/presentation/adminUsers/views/Users/hooks/useUserForm.js.map +1 -0
- package/presentation/adminUsers/views/Users/search.js +21 -0
- package/presentation/adminUsers/views/Users/search.js.map +1 -0
- package/presentation/adminUsers/views/Users/search.svg +20 -0
- package/presentation/adminUsers/views/utils.d.ts +3 -0
- package/presentation/adminUsers/views/utils.js +12 -0
- package/presentation/adminUsers/views/utils.js.map +1 -0
- package/presentation/aiChats/AiChatsPanelPresenter.d.ts +28 -0
- package/presentation/aiChats/AiChatsPanelPresenter.js +132 -0
- package/presentation/aiChats/AiChatsPanelPresenter.js.map +1 -0
- package/presentation/aiChats/abstractions.d.ts +69 -0
- package/presentation/aiChats/abstractions.js +5 -0
- package/presentation/aiChats/abstractions.js.map +1 -0
- package/presentation/aiChats/feature.d.ts +3 -0
- package/presentation/aiChats/feature.js +17 -0
- package/presentation/aiChats/feature.js.map +1 -0
- package/presentation/aiChats/index.d.ts +2 -0
- package/presentation/aiChats/index.js +2 -0
- package/presentation/assumePermissions/AssumePermissionsPresenter.d.ts +36 -0
- package/presentation/assumePermissions/AssumePermissionsPresenter.js +153 -0
- package/presentation/assumePermissions/AssumePermissionsPresenter.js.map +1 -0
- package/presentation/assumePermissions/abstractions.d.ts +30 -0
- package/presentation/assumePermissions/abstractions.js +5 -0
- package/presentation/assumePermissions/abstractions.js.map +1 -0
- package/presentation/assumePermissions/components/AssumePermissionsButton.d.ts +14 -0
- package/presentation/assumePermissions/components/AssumePermissionsButton.js +42 -0
- package/presentation/assumePermissions/components/AssumePermissionsButton.js.map +1 -0
- package/presentation/assumePermissions/components/AssumedPermissionsBanner.d.ts +11 -0
- package/presentation/assumePermissions/components/AssumedPermissionsBanner.js +25 -0
- package/presentation/assumePermissions/components/AssumedPermissionsBanner.js.map +1 -0
- package/presentation/assumePermissions/components/AssumedPermissionsSelector.d.ts +2 -0
- package/presentation/assumePermissions/components/AssumedPermissionsSelector.js +68 -0
- package/presentation/assumePermissions/components/AssumedPermissionsSelector.js.map +1 -0
- package/presentation/assumePermissions/feature.d.ts +3 -0
- package/presentation/assumePermissions/feature.js +17 -0
- package/presentation/assumePermissions/feature.js.map +1 -0
- package/presentation/assumePermissions/index.d.ts +4 -0
- package/presentation/assumePermissions/index.js +4 -0
- package/presentation/banners/BannersPresenter.d.ts +14 -0
- package/presentation/banners/BannersPresenter.js +60 -0
- package/presentation/banners/BannersPresenter.js.map +1 -0
- package/presentation/banners/abstractions.d.ts +24 -0
- package/presentation/banners/abstractions.js +5 -0
- package/presentation/banners/abstractions.js.map +1 -0
- package/presentation/banners/components/Banner.d.ts +10 -0
- package/presentation/banners/components/Banner.js +32 -0
- package/presentation/banners/components/Banner.js.map +1 -0
- package/presentation/banners/components/BannerBar.d.ts +11 -0
- package/presentation/banners/components/BannerBar.js +51 -0
- package/presentation/banners/components/BannerBar.js.map +1 -0
- package/presentation/banners/feature.d.ts +3 -0
- package/presentation/banners/feature.js +17 -0
- package/presentation/banners/feature.js.map +1 -0
- package/presentation/banners/index.d.ts +6 -0
- package/presentation/banners/index.js +4 -0
- package/presentation/banners/useBanner.d.ts +10 -0
- package/presentation/banners/useBanner.js +15 -0
- package/presentation/banners/useBanner.js.map +1 -0
- package/presentation/commandPalette/CommandPalettePresenter.js +3 -1
- package/presentation/commandPalette/CommandPalettePresenter.js.map +1 -1
- package/presentation/commandPalette/abstractions.d.ts +5 -0
- package/presentation/commandPalette/abstractions.js.map +1 -1
- package/presentation/commandPalette/commands/AiChatsCommand.d.ts +24 -0
- package/presentation/commandPalette/commands/AiChatsCommand.js +41 -0
- package/presentation/commandPalette/commands/AiChatsCommand.js.map +1 -0
- package/presentation/commandPalette/commands/AskAiCommand.d.ts +1 -0
- package/presentation/commandPalette/commands/AskAiCommand.js +3 -2
- package/presentation/commandPalette/commands/AskAiCommand.js.map +1 -1
- package/presentation/commandPalette/commands/feature.js +2 -0
- package/presentation/commandPalette/commands/feature.js.map +1 -1
- package/presentation/createReactiveComponent.d.ts +1 -0
- package/presentation/createReactiveComponent.js +1 -0
- package/presentation/debugger/DebuggerPresenter.d.ts +14 -0
- package/presentation/debugger/DebuggerPresenter.js +45 -0
- package/presentation/debugger/DebuggerPresenter.js.map +1 -0
- package/presentation/debugger/abstractions.d.ts +17 -0
- package/presentation/debugger/abstractions.js +5 -0
- package/presentation/debugger/abstractions.js.map +1 -0
- package/presentation/debugger/components/DebuggerIndicator.d.ts +2 -0
- package/presentation/debugger/components/DebuggerIndicator.js +45 -0
- package/presentation/debugger/components/DebuggerIndicator.js.map +1 -0
- package/presentation/debugger/components/DebuggerView.d.ts +4 -0
- package/presentation/debugger/components/DebuggerView.js +44 -0
- package/presentation/debugger/components/DebuggerView.js.map +1 -0
- package/presentation/debugger/downloadJson.d.ts +7 -0
- package/presentation/debugger/downloadJson.js +17 -0
- package/presentation/debugger/downloadJson.js.map +1 -0
- package/presentation/debugger/feature.d.ts +3 -0
- package/presentation/debugger/feature.js +17 -0
- package/presentation/debugger/feature.js.map +1 -0
- package/presentation/debugger/routes.d.ts +4 -0
- package/presentation/debugger/routes.js +10 -0
- package/presentation/debugger/routes.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +4 -3
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -1
- package/presentation/listPresenter/FolderAwareDataSource.d.ts +5 -0
- package/presentation/listPresenter/FolderAwareDataSource.js +4 -3
- package/presentation/listPresenter/FolderAwareDataSource.js.map +1 -1
- package/presentation/listPresenter/QueryMatcher.d.ts +28 -5
- package/presentation/listPresenter/QueryMatcher.js +72 -2
- package/presentation/listPresenter/QueryMatcher.js.map +1 -1
- package/presentation/listPresenter/QueryMatcher.test.d.ts +1 -0
- package/presentation/listPresenter/QueryMatcher.test.js +345 -0
- package/presentation/listPresenter/QueryMatcher.test.js.map +1 -0
- package/presentation/trashBin/TrashBinPresenter.js +3 -1
- package/presentation/trashBin/TrashBinPresenter.js.map +1 -1
- package/presentation/trashBin/TrashBinPresenter.test.d.ts +1 -0
- package/presentation/trashBin/TrashBinPresenter.test.js +91 -0
- package/presentation/trashBin/TrashBinPresenter.test.js.map +1 -0
- package/presentation/trashBin/abstractions.d.ts +1 -1
- package/presentation/trashBin/abstractions.js.map +1 -1
- package/presentation/trashBin/components/BulkActions/DeleteItems.js +5 -1
- package/presentation/trashBin/components/BulkActions/DeleteItems.js.map +1 -1
- package/presentation/trashBin/components/BulkActions/DeleteItems.test.d.ts +1 -0
- package/presentation/trashBin/components/BulkActions/DeleteItems.test.js +100 -0
- package/presentation/trashBin/components/BulkActions/DeleteItems.test.js.map +1 -0
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.js +2 -1
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.js.map +1 -1
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.d.ts +1 -0
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js +67 -0
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js.map +1 -0
- package/static/svg/search.43fa797c.svg +20 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +0 -68
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +0 -1
- package/features/aiChat/AiChatGateway.js.map +0 -1
- package/features/aiChat/AiChatPresenter.d.ts +0 -32
- package/features/aiChat/AiChatPresenter.js +0 -220
- package/features/aiChat/AiChatPresenter.js.map +0 -1
- package/features/aiChat/abstractions.d.ts +0 -124
- package/features/aiChat/abstractions.js +0 -6
- package/features/aiChat/abstractions.js.map +0 -1
- package/features/aiChat/feature.d.ts +0 -3
- package/features/aiChat/feature.js +0 -19
- package/features/aiChat/feature.js.map +0 -1
- package/features/aiChat/index.d.ts +0 -6
- package/features/aiChat/index.js +0 -3
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +0 -8
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +0 -17
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +0 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.d.ts +0 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +0 -16
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminAssistant/AdminAssistantPresenter.js","sources":["../../../src/features/adminAssistant/AdminAssistantPresenter.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport { AdminAssistantGateway } from \"./abstractions.js\";\nimport type { AdminAssistantRequest } from \"./abstractions.js\";\nimport { AdminAssistantPresenter as Abstraction } from \"./abstractions.js\";\nimport type { AiTurnViewModel } from \"./abstractions.js\";\nimport { AiChatsRepository } from \"~/features/aiChats/abstractions.js\";\nimport type { AiChatSaveFailure } from \"~/features/aiChats/abstractions.js\";\nimport { messageOf } from \"~/features/aiChats/messageOf.js\";\nimport { turnsFromMessages } from \"./turnsFromMessages.js\";\n\n/** A turn plus the state the view never sees. `needsSetup` is derived from `errorCode`. */\ninterface Turn extends Omit<AiTurnViewModel, \"needsSetup\"> {\n /** The server's code for the failure, when it sent one. */\n errorCode?: string;\n}\n\n/** The code a run fails with when the project's AI settings give the assistant no model. */\nconst NOT_CONFIGURED = \"AI_CAPABILITY_NOT_CONFIGURED\";\n\nconst emptyTurn = (question: string): Turn => ({\n question,\n text: \"\",\n answerStart: 0,\n tools: [],\n completed: [],\n failed: [],\n running: false,\n pendingApprovals: [],\n followUps: [],\n settled: false\n});\n\n/**\n * Owns the palette's AI conversation.\n *\n * A presenter rather than component state: several pieces change together, a network stream drives\n * them, and an abort has to outlive any one render.\n *\n * Registered as a singleton, so `reset` genuinely clears rather than relying on unmount.\n *\n * The server keeps the conversation: a question sends only the chat id and the question, and the\n * assistant reads the history from the saved chat and saves the run when it ends. The turns here\n * are what is shown, never what is sent.\n */\nclass AdminAssistantPresenterImpl implements Abstraction.Interface {\n private turns: Turn[] = [];\n private busy = false;\n private model: string | undefined = undefined;\n private chatId: string | null = null;\n private opening = false;\n private storageError: string | null = null;\n private saveFailure: AiChatSaveFailure | null = null;\n private controller: AbortController | null = null;\n /*\n * Bumped whenever the conversation is replaced. An open that finishes after that belongs to a\n * conversation that is gone, and must not write its turns onto the new one.\n */\n private generation = 0;\n\n constructor(\n private gateway: AdminAssistantGateway.Interface,\n private chats: AiChatsRepository.Interface\n ) {\n // Machinery, not state anything renders, so keep them out of the map.\n makeAutoObservable<AdminAssistantPresenterImpl, \"controller\" | \"generation\" | \"chats\">(\n this,\n { controller: false, generation: false, chats: false }\n );\n }\n\n get vm(): Abstraction.ViewModel {\n const vm: Abstraction.ViewModel = {\n busy: this.busy,\n chatId: this.chatId,\n opening: this.opening,\n storageError: this.storageError,\n saveFailure: this.saveFailure,\n setupRequired: this.setupRequired,\n turns: this.turns.map(turn => {\n const view: AiTurnViewModel = {\n question: turn.question,\n text: turn.text,\n answerStart: turn.answerStart,\n tools: turn.tools,\n completed: turn.completed,\n failed: turn.failed,\n running: turn.running,\n pendingApprovals: turn.pendingApprovals,\n followUps: turn.followUps,\n settled: turn.settled,\n needsSetup: turn.errorCode === NOT_CONFIGURED\n };\n\n if (turn.error !== undefined) {\n view.error = turn.error;\n }\n\n return view;\n })\n };\n\n if (this.model !== undefined) {\n vm.model = this.model;\n }\n\n return vm;\n }\n\n ask(question: string): void {\n const trimmed = question.trim();\n\n /*\n * While a saved chat loads, a question would land in a conversation about to be replaced.\n * With no model set up it would fail the same way, so only \"Try again\" asks.\n */\n if (!trimmed || this.busy || this.opening || this.setupRequired) {\n return;\n }\n\n // Asking something else rejects a change still waiting; the server does the same.\n this.dropPendingApprovals();\n this.clearStorageError();\n\n const index = this.turns.length;\n this.addTurn(trimmed);\n const request = this.request({ prompt: trimmed });\n void this.run(index, request);\n }\n\n decide(turnIndex: number, approved: boolean): void {\n const turn = this.turns[turnIndex];\n\n if (!turn?.pendingApprovals.length || this.busy || this.opening) {\n return;\n }\n\n // The paused run is resumed from the saved chat, so a run that was not saved cannot be.\n if (!this.chatId || this.saveFailure) {\n this.patch(turnIndex, {\n pendingApprovals: [],\n error: \"This change can't run because the chat wasn't saved. Ask again to retry.\"\n });\n return;\n }\n\n const approvals = turn.pendingApprovals.map(approval => ({\n approvalId: approval.approvalId,\n approved\n }));\n\n // Clear the block immediately so the plan cannot be submitted twice.\n this.patch(turnIndex, {\n pendingApprovals: [],\n followUps: [],\n settled: false,\n running: true\n });\n\n const request = this.request({ approvals });\n void this.run(turnIndex, request, true);\n }\n\n /*\n * The newest turn asked again in place, from an empty answer: one that failed, or one that ran\n * but was not saved. Either way the saved chat does not have it, so the server answers it again\n * with the same history it had the first time.\n */\n retry(): void {\n const index = this.turns.length - 1;\n const turn = this.turns[index];\n\n if (!turn || this.busy || this.opening) {\n return;\n }\n // A run that cannot be saved by asking again is left for a new chat.\n if (!turn.error && this.saveFailure !== \"retryable\") {\n return;\n }\n\n this.clearStorageError();\n const fresh = emptyTurn(turn.question);\n this.replaceTurn(index, { ...fresh, running: true });\n const request = this.request({ prompt: turn.question });\n void this.run(index, request);\n }\n\n private get setupRequired(): boolean {\n const newest = this.turns[this.turns.length - 1];\n return newest?.errorCode === NOT_CONFIGURED;\n }\n\n reset(): void {\n this.controller?.abort();\n this.controller = null;\n this.generation++;\n this.clear();\n }\n\n async open(chatId: string): Promise<void> {\n this.reset();\n const generation = this.generation;\n this.setOpening(true);\n\n try {\n const chat = await this.chats.get(chatId);\n if (generation !== this.generation) {\n return;\n }\n const turns = turnsFromMessages(chat.messages);\n this.setConversation(chat.id, turns);\n } catch (error) {\n if (generation === this.generation) {\n const message = messageOf(error);\n this.setStorageError(message);\n }\n } finally {\n if (generation === this.generation) {\n this.setOpening(false);\n }\n }\n }\n\n /** A request for the chat on screen: the server reads its history from the saved chat. */\n private request(rest: Omit<AdminAssistantRequest, \"chatId\">): AdminAssistantRequest {\n const request: AdminAssistantRequest = { ...rest };\n if (this.chatId) {\n request.chatId = this.chatId;\n }\n return request;\n }\n\n private async run(\n index: number,\n request: AdminAssistantRequest,\n resuming = false\n ): Promise<void> {\n this.controller?.abort();\n const controller = new AbortController();\n this.controller = controller;\n\n this.setBusy(true);\n\n try {\n /*\n * Resuming continues the same turn: the tools already called, the text already shown and\n * the messages already collected all still belong to it. Starting from empty would strand\n * earlier chips as running and, worse, drop the assistant message carrying the `tool_use`\n * that the replayed `tool_result` refers to.\n */\n const existing = resuming ? this.turns[index] : undefined;\n let text = existing?.text ?? \"\";\n const tools: string[] = existing ? [...existing.tools] : [];\n const completed: string[] = existing ? [...existing.completed] : [];\n const failed: string[] = existing ? [...existing.failed] : [];\n /*\n * A resumed run writes on after the text shown before the approval pause. Without a\n * break, the two ran together (\"...a new folder:Understood, no folder was created.\").\n */\n let separateFromExisting = text.length > 0;\n\n for await (const event of this.gateway.stream(request, controller.signal)) {\n if (event.type === \"start\") {\n this.setModel(event.model);\n continue;\n }\n\n if (event.type === \"text\") {\n text += separateFromExisting ? `\\n\\n${event.text}` : event.text;\n separateFromExisting = false;\n this.patch(index, { text, running: false });\n continue;\n }\n\n if (event.type === \"tool-call\") {\n tools.push(event.name);\n this.patch(index, {\n tools: [...tools],\n running: true,\n answerStart: text.length\n });\n continue;\n }\n\n if (event.type === \"tool-result\") {\n completed.push(event.name);\n this.patch(index, { completed: [...completed] });\n continue;\n }\n\n if (event.type === \"tool-error\") {\n failed.push(event.name);\n this.patch(index, { failed: [...failed] });\n continue;\n }\n\n if (event.type === \"follow-ups\") {\n this.patch(index, { followUps: event.questions });\n continue;\n }\n\n if (event.type === \"approval\") {\n this.patch(index, { pendingApprovals: event.approvals, running: false });\n continue;\n }\n\n if (event.type === \"saved\") {\n this.setSaved(event.chat);\n continue;\n }\n\n /*\n * A resumed run may have carried out the change the user approved. Asking again\n * would start before that change, so the model proposes it again and approving\n * twice makes it twice. Only a new chat is offered then.\n */\n if (event.type === \"not-saved\") {\n const failure = event.retryable && !resuming ? \"retryable\" : \"final\";\n this.setSaveFailed(event.message, failure);\n continue;\n }\n\n if (event.type === \"done\") {\n this.patch(index, { settled: true, running: false });\n continue;\n }\n\n if (event.type === \"error\") {\n this.patch(index, {\n error: event.message,\n errorCode: event.code,\n settled: true,\n running: false\n });\n return;\n }\n }\n } catch (error) {\n // An abort is the palette closing, not a failure worth showing.\n if (!controller.signal.aborted) {\n this.patch(index, {\n error: error instanceof Error ? error.message : String(error),\n settled: true,\n running: false\n });\n }\n } finally {\n this.setBusy(false);\n }\n }\n\n /*\n * Every mutation below is its own method on purpose. `run` awaits, and a mutation after an await\n * has escaped the action it started in; `makeAutoObservable` makes these methods actions, so\n * calling them from there is correct.\n */\n private addTurn(question: string): void {\n this.turns = [...this.turns, { ...emptyTurn(question), running: true }];\n }\n\n private replaceTurn(index: number, turn: Turn): void {\n this.turns = this.turns.map((existing, i) => (i === index ? turn : existing));\n }\n\n private patch(index: number, change: Partial<Turn>): void {\n this.turns = this.turns.map((turn, i) => (i === index ? { ...turn, ...change } : turn));\n }\n\n private setBusy(busy: boolean): void {\n this.busy = busy;\n }\n\n private setModel(model: string): void {\n this.model = model;\n }\n\n private setOpening(opening: boolean): void {\n this.opening = opening;\n }\n\n private setConversation(chatId: string, turns: Turn[]): void {\n this.chatId = chatId;\n this.turns = turns;\n }\n\n // The chats list learns of the chat from here, so it shows up without being read again.\n private setSaved(chat: AiChatsRepository.Summary): void {\n this.chatId = chat.id;\n this.storageError = null;\n this.saveFailure = null;\n this.chats.remember(chat);\n }\n\n private dropPendingApprovals(): void {\n this.turns = this.turns.map(turn => {\n if (turn.pendingApprovals.length === 0) {\n return turn;\n }\n return { ...turn, pendingApprovals: [] };\n });\n }\n\n private setStorageError(message: string): void {\n this.storageError = message;\n this.saveFailure = null;\n }\n\n private setSaveFailed(message: string, failure: AiChatSaveFailure): void {\n this.storageError = message;\n this.saveFailure = failure;\n }\n\n private clearStorageError(): void {\n this.storageError = null;\n this.saveFailure = null;\n }\n\n private clear(): void {\n this.turns = [];\n this.busy = false;\n this.chatId = null;\n this.opening = false;\n this.storageError = null;\n this.saveFailure = null;\n }\n}\n\nexport const AdminAssistantPresenter = Abstraction.createImplementation({\n implementation: AdminAssistantPresenterImpl,\n dependencies: [AdminAssistantGateway, AiChatsRepository]\n});\n"],"names":["NOT_CONFIGURED","emptyTurn","question","AdminAssistantPresenterImpl","gateway","chats","undefined","makeAutoObservable","vm","turn","view","trimmed","index","request","turnIndex","approved","approvals","approval","fresh","newest","chatId","generation","chat","turns","turnsFromMessages","error","message","messageOf","rest","resuming","controller","AbortController","existing","text","tools","completed","failed","separateFromExisting","event","failure","Error","String","i","change","busy","model","opening","AdminAssistantPresenter","Abstraction","AdminAssistantGateway","AiChatsRepository"],"mappings":";;;;;AAiBA,MAAMA,iBAAiB;AAEvB,MAAMC,YAAY,CAACC,WAA4B;QAC3CA;QACA,MAAM;QACN,aAAa;QACb,OAAO,EAAE;QACT,WAAW,EAAE;QACb,QAAQ,EAAE;QACV,SAAS;QACT,kBAAkB,EAAE;QACpB,WAAW,EAAE;QACb,SAAS;IACb;AAcA,MAAMC;IAeF,YACYC,OAAwC,EACxCC,KAAkC,CAC5C;aAFUD,OAAO,GAAPA;aACAC,KAAK,GAALA;aAhBJ,KAAK,GAAW,EAAE;aAClB,IAAI,GAAG;aACP,KAAK,GAAuBC;aAC5B,MAAM,GAAkB;aACxB,OAAO,GAAG;aACV,YAAY,GAAkB;aAC9B,WAAW,GAA6B;aACxC,UAAU,GAA2B;QAI5C,KACO,UAAU,GAAG;QAOjBC,mBACI,IAAI,EACJ;YAAE,YAAY;YAAO,YAAY;YAAO,OAAO;QAAM;IAE7D;IAEA,IAAI,KAA4B;QAC5B,MAAMC,KAA4B;YAC9B,MAAM,IAAI,CAAC,IAAI;YACf,QAAQ,IAAI,CAAC,MAAM;YACnB,SAAS,IAAI,CAAC,OAAO;YACrB,cAAc,IAAI,CAAC,YAAY;YAC/B,aAAa,IAAI,CAAC,WAAW;YAC7B,eAAe,IAAI,CAAC,aAAa;YACjC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAACC,CAAAA;gBAClB,MAAMC,OAAwB;oBAC1B,UAAUD,KAAK,QAAQ;oBACvB,MAAMA,KAAK,IAAI;oBACf,aAAaA,KAAK,WAAW;oBAC7B,OAAOA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AACJ;AAEO,MAAMQ,kDAA0BC,wBAAAA,oBAAgC,CAAC;IACpE,gBAAgB7C;IAChB,cAAc;QAAC8C;QAAuBC;KAAkB;AAC5D"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import type { AiChatSaveFailure } from "../../features/aiChats/abstractions.js";
|
|
2
|
+
import type { AiChatsRepository } from "../../features/aiChats/abstractions.js";
|
|
3
|
+
/**
|
|
4
|
+
* A message of a saved chat. Opaque on purpose: the admin only reads them to show an opened chat,
|
|
5
|
+
* and the server is the one that sends them to the model.
|
|
6
|
+
*/
|
|
7
|
+
export type AdminAssistantMessage = {
|
|
8
|
+
role: string;
|
|
9
|
+
content: unknown;
|
|
10
|
+
};
|
|
11
|
+
/** A tool the assistant invoked, so the UI can show its work rather than just an answer. */
|
|
12
|
+
export interface AdminAssistantToolCall {
|
|
13
|
+
name: string;
|
|
14
|
+
input: unknown;
|
|
15
|
+
}
|
|
16
|
+
/** A tool call the assistant wants to make but has not made, because it changes something. */
|
|
17
|
+
export interface AdminAssistantPendingApproval {
|
|
18
|
+
approvalId: string;
|
|
19
|
+
toolName: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
input: unknown;
|
|
22
|
+
/** The tool declared itself destructive — the UI should say so more loudly. */
|
|
23
|
+
destructive: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface AdminAssistantDecision {
|
|
26
|
+
approvalId: string;
|
|
27
|
+
approved: boolean;
|
|
28
|
+
reason?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A question, or the decisions on the calls a run paused on. The server reads the rest of the
|
|
32
|
+
* conversation from the saved chat, so only its id is sent; without one, a question starts a chat.
|
|
33
|
+
*/
|
|
34
|
+
export interface AdminAssistantRequest {
|
|
35
|
+
chatId?: string;
|
|
36
|
+
prompt?: string;
|
|
37
|
+
/** Approve or reject calls the server paused on. Needs the `chatId` of the paused run. */
|
|
38
|
+
approvals?: AdminAssistantDecision[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* What the assistant emits while it works. Mirrors the server's `AdminAssistantEvent`; declared here so the
|
|
42
|
+
* admin bundle carries no server or AI SDK code.
|
|
43
|
+
*/
|
|
44
|
+
export type AdminAssistantStreamEvent = {
|
|
45
|
+
type: "start";
|
|
46
|
+
model: string;
|
|
47
|
+
} | {
|
|
48
|
+
type: "text";
|
|
49
|
+
text: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: "tool-call";
|
|
52
|
+
name: string;
|
|
53
|
+
} | {
|
|
54
|
+
type: "tool-result";
|
|
55
|
+
name: string;
|
|
56
|
+
} | {
|
|
57
|
+
type: "tool-error";
|
|
58
|
+
name: string;
|
|
59
|
+
message: string;
|
|
60
|
+
} | {
|
|
61
|
+
type: "follow-ups";
|
|
62
|
+
questions: string[];
|
|
63
|
+
} | {
|
|
64
|
+
type: "approval";
|
|
65
|
+
approvals: AdminAssistantPendingApproval[];
|
|
66
|
+
} | {
|
|
67
|
+
type: "saved";
|
|
68
|
+
chat: AiChatsRepository.Summary;
|
|
69
|
+
} | {
|
|
70
|
+
type: "not-saved";
|
|
71
|
+
message: string;
|
|
72
|
+
retryable: boolean;
|
|
73
|
+
} | {
|
|
74
|
+
type: "done";
|
|
75
|
+
steps: number;
|
|
76
|
+
} | {
|
|
77
|
+
type: "error";
|
|
78
|
+
message: string;
|
|
79
|
+
code?: "AI_CAPABILITY_NOT_CONFIGURED";
|
|
80
|
+
};
|
|
81
|
+
export interface IAdminAssistantGateway {
|
|
82
|
+
/**
|
|
83
|
+
* Run and yield progress as it arrives. Preferred in the UI: a multi-tool question takes tens of
|
|
84
|
+
* seconds, and an approval request is worth showing the moment it appears.
|
|
85
|
+
*/
|
|
86
|
+
stream(request: AdminAssistantRequest, signal?: AbortSignal): AsyncIterable<AdminAssistantStreamEvent>;
|
|
87
|
+
}
|
|
88
|
+
/** Sends a question to the server-side AI assistant (`POST /ai/chat`). */
|
|
89
|
+
export declare const AdminAssistantGateway: import("@webiny/di").Abstraction<IAdminAssistantGateway>;
|
|
90
|
+
export declare namespace AdminAssistantGateway {
|
|
91
|
+
type Interface = IAdminAssistantGateway;
|
|
92
|
+
type Message = AdminAssistantMessage;
|
|
93
|
+
type ToolCall = AdminAssistantToolCall;
|
|
94
|
+
type PendingApproval = AdminAssistantPendingApproval;
|
|
95
|
+
type Decision = AdminAssistantDecision;
|
|
96
|
+
type Request = AdminAssistantRequest;
|
|
97
|
+
type StreamEvent = AdminAssistantStreamEvent;
|
|
98
|
+
}
|
|
99
|
+
/** One question and the answer to it, as the view needs it. */
|
|
100
|
+
export interface AiTurnViewModel {
|
|
101
|
+
question: string;
|
|
102
|
+
/** Answer text so far. Grows as the stream arrives. */
|
|
103
|
+
text: string;
|
|
104
|
+
/**
|
|
105
|
+
* Where the answer proper starts in `text`: after the last tool call. Text before it is the
|
|
106
|
+
* model saying what it is about to look up, which is no summary of the answer.
|
|
107
|
+
*/
|
|
108
|
+
answerStart: number;
|
|
109
|
+
/** Tools called this turn, in call order. */
|
|
110
|
+
tools: string[];
|
|
111
|
+
/**
|
|
112
|
+
* Tools that returned. A call pending approval still emits `tool-call`, so this is the only way
|
|
113
|
+
* to tell a completed tool from one merely proposed.
|
|
114
|
+
*/
|
|
115
|
+
completed: string[];
|
|
116
|
+
/** Tools that threw. Settles the chip as a failure; the run continues. */
|
|
117
|
+
failed: string[];
|
|
118
|
+
/** Set while a tool is running and no answer text has arrived yet. */
|
|
119
|
+
running: boolean;
|
|
120
|
+
pendingApprovals: AdminAssistantPendingApproval[];
|
|
121
|
+
/** Questions the assistant suggests asking next. Empty until the answer is in. */
|
|
122
|
+
followUps: string[];
|
|
123
|
+
settled: boolean;
|
|
124
|
+
error?: string;
|
|
125
|
+
/**
|
|
126
|
+
* The turn failed because the project has no model set up. Shown as a setup screen rather
|
|
127
|
+
* than an error; `error` holds the server's reason, which names the setting to fix.
|
|
128
|
+
*/
|
|
129
|
+
needsSetup: boolean;
|
|
130
|
+
}
|
|
131
|
+
export interface IAdminAssistantViewModel {
|
|
132
|
+
turns: AiTurnViewModel[];
|
|
133
|
+
/** A run is in flight. Asking again or deciding again is refused while true. */
|
|
134
|
+
busy: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* The model the last run used, fully qualified. Absent before the first run, since the admin
|
|
137
|
+
* only learns it from the server.
|
|
138
|
+
*/
|
|
139
|
+
model?: string;
|
|
140
|
+
/** The saved chat this conversation is, once its first turn is saved or a chat is opened. */
|
|
141
|
+
chatId: string | null;
|
|
142
|
+
/** A saved chat is being read. */
|
|
143
|
+
opening: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Why the last run was not saved, or the last open failed. The conversation on screen carries
|
|
146
|
+
* on either way; this is only so the view can say it is not saved.
|
|
147
|
+
*/
|
|
148
|
+
storageError: string | null;
|
|
149
|
+
/**
|
|
150
|
+
* Set when it was a run that was not saved, so the view can offer what fixes it. Null for an
|
|
151
|
+
* open.
|
|
152
|
+
*/
|
|
153
|
+
saveFailure: AiChatSaveFailure | null;
|
|
154
|
+
/**
|
|
155
|
+
* The newest turn needs a model set up first. No question is taken until "Try again" (`retry`)
|
|
156
|
+
* succeeds, so the view can stop taking input.
|
|
157
|
+
*/
|
|
158
|
+
setupRequired: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface IAdminAssistantPresenter {
|
|
161
|
+
readonly vm: IAdminAssistantViewModel;
|
|
162
|
+
/**
|
|
163
|
+
* Ask a question in the chat on screen. A change still waiting on a decision is rejected.
|
|
164
|
+
* Refused while `setupRequired`.
|
|
165
|
+
*/
|
|
166
|
+
ask(question: string): void;
|
|
167
|
+
/** Approve or reject the calls a turn paused on, then resume it. */
|
|
168
|
+
decide(turnIndex: number, approved: boolean): void;
|
|
169
|
+
/** Drop the conversation and stop anything in flight. The saved chat is kept. */
|
|
170
|
+
reset(): void;
|
|
171
|
+
/** Replace the conversation with a saved chat, so asking again continues it. */
|
|
172
|
+
open(chatId: string): Promise<void>;
|
|
173
|
+
/** Ask the newest question again, when its run failed or was not saved. */
|
|
174
|
+
retry(): void;
|
|
175
|
+
}
|
|
176
|
+
export declare const AdminAssistantPresenter: import("@webiny/di").Abstraction<IAdminAssistantPresenter>;
|
|
177
|
+
export declare namespace AdminAssistantPresenter {
|
|
178
|
+
type Interface = IAdminAssistantPresenter;
|
|
179
|
+
type ViewModel = IAdminAssistantViewModel;
|
|
180
|
+
type Turn = AiTurnViewModel;
|
|
181
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createAbstraction } from "@webiny/feature/admin";
|
|
2
|
+
const AdminAssistantGateway = createAbstraction("AdminAssistantGateway");
|
|
3
|
+
const AdminAssistantPresenter = createAbstraction("AdminAssistantPresenter");
|
|
4
|
+
export { AdminAssistantGateway, AdminAssistantPresenter };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=abstractions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminAssistant/abstractions.js","sources":["../../../src/features/adminAssistant/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { AiChatSaveFailure } from \"~/features/aiChats/abstractions.js\";\nimport type { AiChatsRepository } from \"~/features/aiChats/abstractions.js\";\n\n/**\n * A message of a saved chat. Opaque on purpose: the admin only reads them to show an opened chat,\n * and the server is the one that sends them to the model.\n */\nexport type AdminAssistantMessage = { role: string; content: unknown };\n\n/** A tool the assistant invoked, so the UI can show its work rather than just an answer. */\nexport interface AdminAssistantToolCall {\n name: string;\n input: unknown;\n}\n\n/** A tool call the assistant wants to make but has not made, because it changes something. */\nexport interface AdminAssistantPendingApproval {\n approvalId: string;\n toolName: string;\n title?: string;\n input: unknown;\n /** The tool declared itself destructive — the UI should say so more loudly. */\n destructive: boolean;\n}\n\nexport interface AdminAssistantDecision {\n approvalId: string;\n approved: boolean;\n reason?: string;\n}\n\n/**\n * A question, or the decisions on the calls a run paused on. The server reads the rest of the\n * conversation from the saved chat, so only its id is sent; without one, a question starts a chat.\n */\nexport interface AdminAssistantRequest {\n chatId?: string;\n prompt?: string;\n /** Approve or reject calls the server paused on. Needs the `chatId` of the paused run. */\n approvals?: AdminAssistantDecision[];\n}\n\n/**\n * What the assistant emits while it works. Mirrors the server's `AdminAssistantEvent`; declared here so the\n * admin bundle carries no server or AI SDK code.\n */\nexport type AdminAssistantStreamEvent =\n // The run is going ahead, on this model (\"anthropic/claude-sonnet-4-5\").\n | { type: \"start\"; model: string }\n | { type: \"text\"; text: string }\n | { type: \"tool-call\"; name: string }\n | { type: \"tool-result\"; name: string }\n // A tool threw. Pairs with `tool-call` by name, and does not end the run.\n | { type: \"tool-error\"; name: string; message: string }\n | { type: \"follow-ups\"; questions: string[] }\n | { type: \"approval\"; approvals: AdminAssistantPendingApproval[] }\n // The run was saved, as a new chat or onto the one asked about.\n | { type: \"saved\"; chat: AiChatsRepository.Summary }\n // The run finished but the server could not save it. `retryable` says whether asking again could.\n | { type: \"not-saved\"; message: string; retryable: boolean }\n // Comes after `saved` or `not-saved`.\n | { type: \"done\"; steps: number }\n | { type: \"error\"; message: string; code?: \"AI_CAPABILITY_NOT_CONFIGURED\" };\n\nexport interface IAdminAssistantGateway {\n /**\n * Run and yield progress as it arrives. Preferred in the UI: a multi-tool question takes tens of\n * seconds, and an approval request is worth showing the moment it appears.\n */\n stream(\n request: AdminAssistantRequest,\n signal?: AbortSignal\n ): AsyncIterable<AdminAssistantStreamEvent>;\n}\n\n/** Sends a question to the server-side AI assistant (`POST /ai/chat`). */\nexport const AdminAssistantGateway =\n createAbstraction<IAdminAssistantGateway>(\"AdminAssistantGateway\");\n\nexport namespace AdminAssistantGateway {\n export type Interface = IAdminAssistantGateway;\n export type Message = AdminAssistantMessage;\n export type ToolCall = AdminAssistantToolCall;\n export type PendingApproval = AdminAssistantPendingApproval;\n export type Decision = AdminAssistantDecision;\n export type Request = AdminAssistantRequest;\n export type StreamEvent = AdminAssistantStreamEvent;\n}\n\n/** One question and the answer to it, as the view needs it. */\nexport interface AiTurnViewModel {\n question: string;\n /** Answer text so far. Grows as the stream arrives. */\n text: string;\n /**\n * Where the answer proper starts in `text`: after the last tool call. Text before it is the\n * model saying what it is about to look up, which is no summary of the answer.\n */\n answerStart: number;\n /** Tools called this turn, in call order. */\n tools: string[];\n /**\n * Tools that returned. A call pending approval still emits `tool-call`, so this is the only way\n * to tell a completed tool from one merely proposed.\n */\n completed: string[];\n /** Tools that threw. Settles the chip as a failure; the run continues. */\n failed: string[];\n /** Set while a tool is running and no answer text has arrived yet. */\n running: boolean;\n pendingApprovals: AdminAssistantPendingApproval[];\n /** Questions the assistant suggests asking next. Empty until the answer is in. */\n followUps: string[];\n settled: boolean;\n error?: string;\n /**\n * The turn failed because the project has no model set up. Shown as a setup screen rather\n * than an error; `error` holds the server's reason, which names the setting to fix.\n */\n needsSetup: boolean;\n}\n\nexport interface IAdminAssistantViewModel {\n turns: AiTurnViewModel[];\n /** A run is in flight. Asking again or deciding again is refused while true. */\n busy: boolean;\n /**\n * The model the last run used, fully qualified. Absent before the first run, since the admin\n * only learns it from the server.\n */\n model?: string;\n /** The saved chat this conversation is, once its first turn is saved or a chat is opened. */\n chatId: string | null;\n /** A saved chat is being read. */\n opening: boolean;\n /**\n * Why the last run was not saved, or the last open failed. The conversation on screen carries\n * on either way; this is only so the view can say it is not saved.\n */\n storageError: string | null;\n /**\n * Set when it was a run that was not saved, so the view can offer what fixes it. Null for an\n * open.\n */\n saveFailure: AiChatSaveFailure | null;\n /**\n * The newest turn needs a model set up first. No question is taken until \"Try again\" (`retry`)\n * succeeds, so the view can stop taking input.\n */\n setupRequired: boolean;\n}\n\nexport interface IAdminAssistantPresenter {\n readonly vm: IAdminAssistantViewModel;\n /**\n * Ask a question in the chat on screen. A change still waiting on a decision is rejected.\n * Refused while `setupRequired`.\n */\n ask(question: string): void;\n /** Approve or reject the calls a turn paused on, then resume it. */\n decide(turnIndex: number, approved: boolean): void;\n /** Drop the conversation and stop anything in flight. The saved chat is kept. */\n reset(): void;\n /** Replace the conversation with a saved chat, so asking again continues it. */\n open(chatId: string): Promise<void>;\n /** Ask the newest question again, when its run failed or was not saved. */\n retry(): void;\n}\n\nexport const AdminAssistantPresenter =\n createAbstraction<IAdminAssistantPresenter>(\"AdminAssistantPresenter\");\n\nexport namespace AdminAssistantPresenter {\n export type Interface = IAdminAssistantPresenter;\n export type ViewModel = IAdminAssistantViewModel;\n export type Turn = AiTurnViewModel;\n}\n"],"names":["AdminAssistantGateway","createAbstraction","AdminAssistantPresenter"],"mappings":";AA6EO,MAAMA,wBACTC,kBAA0C;AA4FvC,MAAMC,0BACTD,kBAA4C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { AdminAssistantGateway } from "./AdminAssistantGateway.js";
|
|
3
|
+
import { AdminAssistantPresenter } from "./AdminAssistantPresenter.js";
|
|
4
|
+
import { AdminAssistantPresenter as external_abstractions_js_AdminAssistantPresenter } from "./abstractions.js";
|
|
5
|
+
const AdminAssistantFeature = createFeature({
|
|
6
|
+
name: "AdminAssistant",
|
|
7
|
+
register (container) {
|
|
8
|
+
container.register(AdminAssistantGateway);
|
|
9
|
+
container.register(AdminAssistantPresenter).inSingletonScope();
|
|
10
|
+
},
|
|
11
|
+
resolve (container) {
|
|
12
|
+
return {
|
|
13
|
+
presenter: container.resolve(external_abstractions_js_AdminAssistantPresenter)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export { AdminAssistantFeature };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminAssistant/feature.js","sources":["../../../src/features/adminAssistant/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { AdminAssistantGateway } from \"./AdminAssistantGateway.js\";\nimport { AdminAssistantPresenter } from \"./AdminAssistantPresenter.js\";\nimport { AdminAssistantPresenter as Abstraction } from \"./abstractions.js\";\n\nexport const AdminAssistantFeature = createFeature({\n name: \"AdminAssistant\",\n register(container) {\n container.register(AdminAssistantGateway);\n // Singleton so the conversation survives re-renders of the palette that reads it.\n container.register(AdminAssistantPresenter).inSingletonScope();\n },\n resolve(container) {\n return { presenter: container.resolve(Abstraction) };\n }\n});\n"],"names":["AdminAssistantFeature","createFeature","container","AdminAssistantGateway","AdminAssistantPresenter","Abstraction"],"mappings":";;;;AAKO,MAAMA,wBAAwBC,cAAc;IAC/C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QAEnBD,UAAU,QAAQ,CAACE,yBAAyB,gBAAgB;IAChE;IACA,SAAQF,SAAS;QACb,OAAO;YAAE,WAAWA,UAAU,OAAO,CAACG;QAAa;IACvD;AACJ"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AdminAssistantGateway } from "./abstractions.js";
|
|
2
|
+
export type { IAdminAssistantGateway, AdminAssistantMessage, AdminAssistantToolCall, AdminAssistantPendingApproval, AdminAssistantDecision, AdminAssistantRequest, AdminAssistantStreamEvent } from "./abstractions.js";
|
|
3
|
+
export { AdminAssistantGateway as AdminAssistantGatewayImplementation } from "./AdminAssistantGateway.js";
|
|
4
|
+
export { AdminAssistantFeature } from "./feature.js";
|
|
5
|
+
export { AdminAssistantPresenter } from "./abstractions.js";
|
|
6
|
+
export type { AiTurnViewModel, IAdminAssistantPresenter, IAdminAssistantViewModel } from "./abstractions.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AdminAssistantMessage } from "./abstractions.js";
|
|
2
|
+
import type { AiTurnViewModel } from "./abstractions.js";
|
|
3
|
+
/** A rebuilt turn. The server keeps the messages, so carrying on needs none of them here. */
|
|
4
|
+
export type RestoredTurn = Omit<AiTurnViewModel, "needsSetup">;
|
|
5
|
+
/**
|
|
6
|
+
* Turns a saved conversation back into the turns the palette shows.
|
|
7
|
+
*
|
|
8
|
+
* The inverse of how the assistant replays a conversation: every user message starts a turn, and
|
|
9
|
+
* the assistant and tool messages after it are that turn's. The follow-up questions come from the
|
|
10
|
+
* call that suggested them, so a reopened chat offers the same ones it ended with.
|
|
11
|
+
*/
|
|
12
|
+
export declare const turnsFromMessages: (messages: AdminAssistantMessage[]) => RestoredTurn[];
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const FOLLOW_UPS_TOOL = "suggestFollowUps";
|
|
2
|
+
const MAX_FOLLOW_UPS = 3;
|
|
3
|
+
const followUpsOf = (part)=>{
|
|
4
|
+
const questions = part.input?.questions;
|
|
5
|
+
if (!Array.isArray(questions)) return [];
|
|
6
|
+
const result = [];
|
|
7
|
+
for (const question of questions)if ("string" == typeof question && question.trim()) result.push(question.trim());
|
|
8
|
+
return result.slice(0, MAX_FOLLOW_UPS);
|
|
9
|
+
};
|
|
10
|
+
const partsOf = (message)=>{
|
|
11
|
+
if (!Array.isArray(message.content)) return [];
|
|
12
|
+
return message.content.filter((part)=>"object" == typeof part && null !== part);
|
|
13
|
+
};
|
|
14
|
+
const textOf = (message)=>{
|
|
15
|
+
if ("string" == typeof message.content) return message.content;
|
|
16
|
+
const texts = [];
|
|
17
|
+
for (const part of partsOf(message))if ("text" === part.type && "string" == typeof part.text) texts.push(part.text);
|
|
18
|
+
return texts.join("");
|
|
19
|
+
};
|
|
20
|
+
const FAILED_OUTPUTS = new Set([
|
|
21
|
+
"error-text",
|
|
22
|
+
"error-json"
|
|
23
|
+
]);
|
|
24
|
+
const startTurn = (question)=>({
|
|
25
|
+
question,
|
|
26
|
+
text: "",
|
|
27
|
+
answerStart: 0,
|
|
28
|
+
tools: [],
|
|
29
|
+
completed: [],
|
|
30
|
+
failed: [],
|
|
31
|
+
running: false,
|
|
32
|
+
pendingApprovals: [],
|
|
33
|
+
followUps: [],
|
|
34
|
+
settled: true
|
|
35
|
+
});
|
|
36
|
+
const addToTurn = (turn, message)=>{
|
|
37
|
+
if ("assistant" === message.role) {
|
|
38
|
+
const text = textOf(message);
|
|
39
|
+
if (text) turn.text = turn.text ? `${turn.text}\n\n${text}` : text;
|
|
40
|
+
for (const part of partsOf(message))if ("tool-call" === part.type && "string" == typeof part.toolName) {
|
|
41
|
+
if (part.toolName === FOLLOW_UPS_TOOL) {
|
|
42
|
+
turn.followUps = followUpsOf(part);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
turn.tools.push(part.toolName);
|
|
46
|
+
turn.answerStart = turn.text.length;
|
|
47
|
+
}
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if ("tool" !== message.role) return;
|
|
51
|
+
for (const part of partsOf(message)){
|
|
52
|
+
if ("tool-result" !== part.type || "string" != typeof part.toolName) continue;
|
|
53
|
+
if (part.toolName === FOLLOW_UPS_TOOL) continue;
|
|
54
|
+
const outputType = String(part.output?.type);
|
|
55
|
+
if (FAILED_OUTPUTS.has(outputType)) turn.failed.push(part.toolName);
|
|
56
|
+
else turn.completed.push(part.toolName);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const turnsFromMessages = (messages)=>{
|
|
60
|
+
const turns = [];
|
|
61
|
+
for (const message of messages){
|
|
62
|
+
if ("user" === message.role) {
|
|
63
|
+
const question = textOf(message);
|
|
64
|
+
const turn = startTurn(question);
|
|
65
|
+
turns.push(turn);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const current = turns[turns.length - 1];
|
|
69
|
+
if (current) addToTurn(current, message);
|
|
70
|
+
}
|
|
71
|
+
return turns;
|
|
72
|
+
};
|
|
73
|
+
export { turnsFromMessages };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=turnsFromMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminAssistant/turnsFromMessages.js","sources":["../../../src/features/adminAssistant/turnsFromMessages.ts"],"sourcesContent":["import type { AdminAssistantMessage } from \"./abstractions.js\";\nimport type { AiTurnViewModel } from \"./abstractions.js\";\n\n/** A rebuilt turn. The server keeps the messages, so carrying on needs none of them here. */\nexport type RestoredTurn = Omit<AiTurnViewModel, \"needsSetup\">;\n\ninterface Part {\n type?: unknown;\n text?: unknown;\n toolName?: unknown;\n input?: { questions?: unknown };\n output?: { type?: unknown };\n}\n\n/*\n * The tool the server's assistant calls to hand over follow-up questions. It is how the answer\n * ends, not work the user asked for, so the live stream never reports it as a tool, and neither does\n * a reopened chat. Mirrors `FOLLOW_UPS_TOOL` in `@webiny/ai-powerups`, which the admin cannot import.\n */\nconst FOLLOW_UPS_TOOL = \"suggestFollowUps\";\nconst MAX_FOLLOW_UPS = 3;\n\nconst followUpsOf = (part: Part): string[] => {\n const questions = part.input?.questions;\n if (!Array.isArray(questions)) {\n return [];\n }\n\n const result: string[] = [];\n for (const question of questions) {\n if (typeof question === \"string\" && question.trim()) {\n result.push(question.trim());\n }\n }\n return result.slice(0, MAX_FOLLOW_UPS);\n};\n\nconst partsOf = (message: AdminAssistantMessage): Part[] => {\n if (!Array.isArray(message.content)) {\n return [];\n }\n return message.content.filter(\n (part): part is Part => typeof part === \"object\" && part !== null\n );\n};\n\nconst textOf = (message: AdminAssistantMessage): string => {\n if (typeof message.content === \"string\") {\n return message.content;\n }\n\n const texts: string[] = [];\n for (const part of partsOf(message)) {\n if (part.type === \"text\" && typeof part.text === \"string\") {\n texts.push(part.text);\n }\n }\n return texts.join(\"\");\n};\n\nconst FAILED_OUTPUTS = new Set([\"error-text\", \"error-json\"]);\n\nconst startTurn = (question: string): RestoredTurn => ({\n question,\n text: \"\",\n answerStart: 0,\n tools: [],\n completed: [],\n failed: [],\n running: false,\n pendingApprovals: [],\n followUps: [],\n settled: true\n});\n\n/** Reads what an assistant or tool message adds to the turn it belongs to. */\nconst addToTurn = (turn: RestoredTurn, message: AdminAssistantMessage): void => {\n if (message.role === \"assistant\") {\n // Each assistant message is a step. Steps were streamed as one answer, a paragraph apart.\n const text = textOf(message);\n if (text) {\n turn.text = turn.text ? `${turn.text}\\n\\n${text}` : text;\n }\n\n for (const part of partsOf(message)) {\n if (part.type !== \"tool-call\" || typeof part.toolName !== \"string\") {\n continue;\n }\n if (part.toolName === FOLLOW_UPS_TOOL) {\n turn.followUps = followUpsOf(part);\n continue;\n }\n turn.tools.push(part.toolName);\n turn.answerStart = turn.text.length;\n }\n return;\n }\n\n if (message.role !== \"tool\") {\n return;\n }\n\n for (const part of partsOf(message)) {\n if (part.type !== \"tool-result\" || typeof part.toolName !== \"string\") {\n continue;\n }\n if (part.toolName === FOLLOW_UPS_TOOL) {\n continue;\n }\n const outputType = String(part.output?.type);\n if (FAILED_OUTPUTS.has(outputType)) {\n turn.failed.push(part.toolName);\n } else {\n turn.completed.push(part.toolName);\n }\n }\n};\n\n/**\n * Turns a saved conversation back into the turns the palette shows.\n *\n * The inverse of how the assistant replays a conversation: every user message starts a turn, and\n * the assistant and tool messages after it are that turn's. The follow-up questions come from the\n * call that suggested them, so a reopened chat offers the same ones it ended with.\n */\nexport const turnsFromMessages = (messages: AdminAssistantMessage[]): RestoredTurn[] => {\n const turns: RestoredTurn[] = [];\n\n for (const message of messages) {\n if (message.role === \"user\") {\n const question = textOf(message);\n const turn = startTurn(question);\n turns.push(turn);\n continue;\n }\n\n const current = turns[turns.length - 1];\n if (current) {\n addToTurn(current, message);\n }\n }\n\n return turns;\n};\n"],"names":["FOLLOW_UPS_TOOL","MAX_FOLLOW_UPS","followUpsOf","part","questions","Array","result","question","partsOf","message","textOf","texts","FAILED_OUTPUTS","Set","startTurn","addToTurn","turn","text","outputType","String","turnsFromMessages","messages","turns","current"],"mappings":"AAmBA,MAAMA,kBAAkB;AACxB,MAAMC,iBAAiB;AAEvB,MAAMC,cAAc,CAACC;IACjB,MAAMC,YAAYD,KAAK,KAAK,EAAE;IAC9B,IAAI,CAACE,MAAM,OAAO,CAACD,YACf,OAAO,EAAE;IAGb,MAAME,SAAmB,EAAE;IAC3B,KAAK,MAAMC,YAAYH,UACnB,IAAI,AAAoB,YAApB,OAAOG,YAAyBA,SAAS,IAAI,IAC7CD,OAAO,IAAI,CAACC,SAAS,IAAI;I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a,KAAK,KAAK,CAAC,IAAI,CAACb,KAAK,QAAQ;YAC7Ba,KAAK,WAAW,GAAGA,KAAK,IAAI,CAAC,MAAM;;QAEvC;IACJ;IAEA,IAAIP,AAAiB,WAAjBA,QAAQ,IAAI,EACZ;IAGJ,KAAK,MAAMN,QAAQK,QAAQC,SAAU;QACjC,IAAIN,AAAc,kBAAdA,KAAK,IAAI,IAAsB,AAAyB,YAAzB,OAAOA,KAAK,QAAQ,EACnD;QAEJ,IAAIA,KAAK,QAAQ,KAAKH,iBAClB;QAEJ,MAAMkB,aAAaC,OAAOhB,KAAK,MAAM,EAAE;QACvC,IAAIS,eAAe,GAAG,CAACM,aACnBF,KAAK,MAAM,CAAC,IAAI,CAACb,KAAK,QAAQ;aAE9Ba,KAAK,SAAS,CAAC,IAAI,CAACb,KAAK,QAAQ;IAEzC;AACJ;AASO,MAAMiB,oBAAoB,CAACC;IAC9B,MAAMC,QAAwB,EAAE;IAEhC,KAAK,MAAMb,WAAWY,SAAU;QAC5B,IAAIZ,AAAiB,WAAjBA,QAAQ,IAAI,EAAa;YACzB,MAAMF,WAAWG,OAAOD;YACxB,MAAMO,OAAOF,UAAUP;YACvBe,MAAM,IAAI,CAACN;YACX;QACJ;QAEA,MAAMO,UAAUD,KAAK,CAACA,MAAM,MAAM,GAAG,EAAE;QACvC,IAAIC,SACAR,UAAUQ,SAASd;IAE3B;IAEA,OAAOa;AACX"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GetCurrentUserGateway as GatewayAbstraction } from "./abstractions/index.js";
|
|
2
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient";
|
|
3
|
+
declare class GetCurrentUserGatewayImpl implements GatewayAbstraction.Interface {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: MainGraphQLClient.Interface);
|
|
6
|
+
execute(): Promise<GatewayAbstraction.Result>;
|
|
7
|
+
}
|
|
8
|
+
export declare const GetCurrentUserGateway: typeof GetCurrentUserGatewayImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/GetCurrentUserGateway.js").IGetCurrentUserGateway>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { GetCurrentUserGateway } from "./abstractions/index.js";
|
|
2
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient";
|
|
3
|
+
const GET_CURRENT_USER = `
|
|
4
|
+
query GetCurrentUser {
|
|
5
|
+
adminUsers {
|
|
6
|
+
user: getCurrentUser {
|
|
7
|
+
data {
|
|
8
|
+
id
|
|
9
|
+
email
|
|
10
|
+
firstName
|
|
11
|
+
lastName
|
|
12
|
+
avatar
|
|
13
|
+
external
|
|
14
|
+
}
|
|
15
|
+
error {
|
|
16
|
+
code
|
|
17
|
+
message
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
class GetCurrentUserGatewayImpl {
|
|
24
|
+
constructor(client){
|
|
25
|
+
this.client = client;
|
|
26
|
+
}
|
|
27
|
+
async execute() {
|
|
28
|
+
const response = await this.client.execute({
|
|
29
|
+
query: GET_CURRENT_USER
|
|
30
|
+
});
|
|
31
|
+
const { data, error } = response.adminUsers.user;
|
|
32
|
+
if (!data) throw new Error(error?.message || "Could not fetch current user.");
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const GetCurrentUserGateway_GetCurrentUserGateway = GetCurrentUserGateway.createImplementation({
|
|
37
|
+
implementation: GetCurrentUserGatewayImpl,
|
|
38
|
+
dependencies: [
|
|
39
|
+
MainGraphQLClient
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
export { GetCurrentUserGateway_GetCurrentUserGateway as GetCurrentUserGateway };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=GetCurrentUserGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js","sources":["../../../../../src/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.ts"],"sourcesContent":["import { GetCurrentUserGateway as GatewayAbstraction } from \"./abstractions/index.js\";\nimport { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient\";\n\nconst GET_CURRENT_USER = /* GraphQL */ `\n query GetCurrentUser {\n adminUsers {\n user: getCurrentUser {\n data {\n id\n email\n firstName\n lastName\n avatar\n external\n }\n error {\n code\n message\n }\n }\n }\n }\n`;\n\ntype GetCurrentUserResponse = {\n adminUsers: {\n user:\n | { data: GatewayAbstraction.Result; error: null }\n | { data: null; error: { code: string; message: string } };\n };\n};\n\nclass GetCurrentUserGatewayImpl implements GatewayAbstraction.Interface {\n constructor(private readonly client: MainGraphQLClient.Interface) {}\n\n async execute(): Promise<GatewayAbstraction.Result> {\n const response = await this.client.execute<GetCurrentUserResponse>({\n query: GET_CURRENT_USER\n });\n\n const { data, error } = response.adminUsers.user;\n\n if (!data) {\n throw new Error(error?.message || \"Could not fetch current user.\");\n }\n\n return data;\n }\n}\n\nexport const GetCurrentUserGateway = GatewayAbstraction.createImplementation({\n implementation: GetCurrentUserGatewayImpl,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["GET_CURRENT_USER","GetCurrentUserGatewayImpl","client","response","data","error","Error","GetCurrentUserGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;AAGA,MAAMA,mBAAiC,CAAC;;;;;;;;;;;;;;;;;;;AAmBxC,CAAC;AAUD,MAAMC;IACF,YAA6BC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAEnE,MAAM,UAA8C;QAChD,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAyB;YAC/D,OAAOH;QACX;QAEA,MAAM,EAAEI,IAAI,EAAEC,KAAK,EAAE,GAAGF,SAAS,UAAU,CAAC,IAAI;QAEhD,IAAI,CAACC,MACD,MAAM,IAAIE,MAAMD,OAAO,WAAW;QAGtC,OAAOD;IACX;AACJ;AAEO,MAAMG,8CAAwBC,sBAAAA,oBAAuC,CAAC;IACzE,gBAAgBP;IAChB,cAAc;QAACQ;KAAkB;AACrC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GetCurrentUserUseCase as UseCaseAbstraction, GetCurrentUserGateway } from "./abstractions/index.js";
|
|
2
|
+
declare class GetCurrentUserUseCaseImpl implements UseCaseAbstraction.Interface {
|
|
3
|
+
private readonly gateway;
|
|
4
|
+
constructor(gateway: GetCurrentUserGateway.Interface);
|
|
5
|
+
execute(): Promise<UseCaseAbstraction.Result>;
|
|
6
|
+
}
|
|
7
|
+
export declare const GetCurrentUserUseCase: typeof GetCurrentUserUseCaseImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/GetCurrentUserUseCase.js").IGetCurrentUserUseCase>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { GetCurrentUserGateway, GetCurrentUserUseCase } from "./abstractions/index.js";
|
|
2
|
+
class GetCurrentUserUseCaseImpl {
|
|
3
|
+
constructor(gateway){
|
|
4
|
+
this.gateway = gateway;
|
|
5
|
+
}
|
|
6
|
+
async execute() {
|
|
7
|
+
const result = await this.gateway.execute();
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const GetCurrentUserUseCase_GetCurrentUserUseCase = GetCurrentUserUseCase.createImplementation({
|
|
12
|
+
implementation: GetCurrentUserUseCaseImpl,
|
|
13
|
+
dependencies: [
|
|
14
|
+
GetCurrentUserGateway
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
export { GetCurrentUserUseCase_GetCurrentUserUseCase as GetCurrentUserUseCase };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=GetCurrentUserUseCase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js","sources":["../../../../../src/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.ts"],"sourcesContent":["import {\n GetCurrentUserUseCase as UseCaseAbstraction,\n GetCurrentUserGateway\n} from \"./abstractions/index.js\";\n\nclass GetCurrentUserUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private readonly gateway: GetCurrentUserGateway.Interface) {}\n\n async execute(): Promise<UseCaseAbstraction.Result> {\n const result = await this.gateway.execute();\n return result;\n }\n}\n\nexport const GetCurrentUserUseCase = UseCaseAbstraction.createImplementation({\n implementation: GetCurrentUserUseCaseImpl,\n dependencies: [GetCurrentUserGateway]\n});\n"],"names":["GetCurrentUserUseCaseImpl","gateway","result","GetCurrentUserUseCase","UseCaseAbstraction","GetCurrentUserGateway"],"mappings":";AAKA,MAAMA;IACF,YAA6BC,OAAwC,CAAE;aAA1CA,OAAO,GAAPA;IAA2C;IAExE,MAAM,UAA8C;QAChD,MAAMC,SAAS,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO;QACzC,OAAOA;IACX;AACJ;AAEO,MAAMC,8CAAwBC,sBAAAA,oBAAuC,CAAC;IACzE,gBAAgBJ;IAChB,cAAc;QAACK;KAAsB;AACzC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IGetCurrentUserGatewayResult {
|
|
2
|
+
id: string;
|
|
3
|
+
email: string;
|
|
4
|
+
firstName: string;
|
|
5
|
+
lastName: string;
|
|
6
|
+
avatar: any;
|
|
7
|
+
external: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface IGetCurrentUserGateway {
|
|
10
|
+
execute(): Promise<IGetCurrentUserGatewayResult>;
|
|
11
|
+
}
|
|
12
|
+
export declare const GetCurrentUserGateway: import("@webiny/di").Abstraction<IGetCurrentUserGateway>;
|
|
13
|
+
export declare namespace GetCurrentUserGateway {
|
|
14
|
+
type Interface = IGetCurrentUserGateway;
|
|
15
|
+
type Result = IGetCurrentUserGatewayResult;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js","sources":["../../../../../../src/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface IGetCurrentUserGatewayResult {\n id: string;\n email: string;\n firstName: string;\n lastName: string;\n avatar: any;\n external: boolean;\n}\n\nexport interface IGetCurrentUserGateway {\n execute(): Promise<IGetCurrentUserGatewayResult>;\n}\n\nexport const GetCurrentUserGateway = createAbstraction<IGetCurrentUserGateway>(\n \"AdminUsers/GetCurrentUserGateway\"\n);\n\nexport namespace GetCurrentUserGateway {\n export type Interface = IGetCurrentUserGateway;\n export type Result = IGetCurrentUserGatewayResult;\n}\n"],"names":["GetCurrentUserGateway","createAbstraction"],"mappings":";AAeO,MAAMA,wBAAwBC,kBACjC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IGetCurrentUserGatewayResult } from "./GetCurrentUserGateway.js";
|
|
2
|
+
export type IGetCurrentUserUseCaseResult = IGetCurrentUserGatewayResult;
|
|
3
|
+
export interface IGetCurrentUserUseCase {
|
|
4
|
+
execute(): Promise<IGetCurrentUserUseCaseResult>;
|
|
5
|
+
}
|
|
6
|
+
export declare const GetCurrentUserUseCase: import("@webiny/di").Abstraction<IGetCurrentUserUseCase>;
|
|
7
|
+
export declare namespace GetCurrentUserUseCase {
|
|
8
|
+
type Interface = IGetCurrentUserUseCase;
|
|
9
|
+
type Result = IGetCurrentUserUseCaseResult;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js","sources":["../../../../../../src/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { IGetCurrentUserGatewayResult } from \"./GetCurrentUserGateway.js\";\n\nexport type IGetCurrentUserUseCaseResult = IGetCurrentUserGatewayResult;\n\nexport interface IGetCurrentUserUseCase {\n execute(): Promise<IGetCurrentUserUseCaseResult>;\n}\n\nexport const GetCurrentUserUseCase = createAbstraction<IGetCurrentUserUseCase>(\n \"AdminUsers/GetCurrentUserUseCase\"\n);\n\nexport namespace GetCurrentUserUseCase {\n export type Interface = IGetCurrentUserUseCase;\n export type Result = IGetCurrentUserUseCaseResult;\n}\n"],"names":["GetCurrentUserUseCase","createAbstraction"],"mappings":";AASO,MAAMA,wBAAwBC,kBACjC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { GetCurrentUserGateway } from "./GetCurrentUserGateway.js";
|
|
2
|
+
export type { IGetCurrentUserGateway } from "./GetCurrentUserGateway.js";
|
|
3
|
+
export type { IGetCurrentUserGatewayResult } from "./GetCurrentUserGateway.js";
|
|
4
|
+
export { GetCurrentUserUseCase } from "./GetCurrentUserUseCase.js";
|
|
5
|
+
export type { IGetCurrentUserUseCase } from "./GetCurrentUserUseCase.js";
|
|
6
|
+
export type { IGetCurrentUserUseCaseResult } from "./GetCurrentUserUseCase.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { GetCurrentUserUseCase } from "./abstractions/index.js";
|
|
3
|
+
import { GetCurrentUserUseCase as external_GetCurrentUserUseCase_js_GetCurrentUserUseCase } from "./GetCurrentUserUseCase.js";
|
|
4
|
+
import { GetCurrentUserGateway } from "./GetCurrentUserGateway.js";
|
|
5
|
+
const GetCurrentUserFeature = createFeature({
|
|
6
|
+
name: "AdminUsers/GetCurrentUser",
|
|
7
|
+
register (container) {
|
|
8
|
+
container.register(external_GetCurrentUserUseCase_js_GetCurrentUserUseCase);
|
|
9
|
+
container.register(GetCurrentUserGateway).inSingletonScope();
|
|
10
|
+
},
|
|
11
|
+
resolve (container) {
|
|
12
|
+
return {
|
|
13
|
+
useCase: container.resolve(GetCurrentUserUseCase)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export { GetCurrentUserFeature };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/account/getCurrentUser/feature.js","sources":["../../../../../src/features/adminUsers/account/getCurrentUser/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { GetCurrentUserUseCase as UseCaseAbstraction } from \"./abstractions/index.js\";\nimport { GetCurrentUserUseCase } from \"./GetCurrentUserUseCase.js\";\nimport { GetCurrentUserGateway } from \"./GetCurrentUserGateway.js\";\n\nexport const GetCurrentUserFeature = createFeature({\n name: \"AdminUsers/GetCurrentUser\",\n register(container) {\n container.register(GetCurrentUserUseCase);\n container.register(GetCurrentUserGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["GetCurrentUserFeature","createFeature","container","GetCurrentUserUseCase","GetCurrentUserGateway","UseCaseAbstraction"],"mappings":";;;;AAKO,MAAMA,wBAAwBC,cAAc;IAC/C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,uBAAuB,gBAAgB;IAC9D;IACA,SAAQF,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACG;QAC/B;IACJ;AACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetCurrentUserFeature } from "./feature.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetCurrentUserFeature } from "./feature.js";
|