@memberjunction/ng-conversations 6.1.4 → 6.2.0-edge.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -3
- package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts +19 -3
- package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts.map +1 -1
- package/dist/lib/components/active-tasks/active-tasks-panel.component.js +39 -7
- package/dist/lib/components/active-tasks/active-tasks-panel.component.js.map +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts +74 -6
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts.map +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.js +111 -21
- package/dist/lib/components/agent/active-agent-indicator.component.js.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.d.ts +31 -5
- package/dist/lib/components/agent/agent-process-panel.component.d.ts.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.js +71 -15
- package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +65 -9
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.js +169 -57
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
- package/dist/lib/components/attachment/image-viewer.component.d.ts +77 -11
- package/dist/lib/components/attachment/image-viewer.component.d.ts.map +1 -1
- package/dist/lib/components/attachment/image-viewer.component.js +181 -47
- package/dist/lib/components/attachment/image-viewer.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts +129 -19
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js +350 -116
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts +60 -8
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.js +130 -46
- package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts +63 -3
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.js +113 -19
- package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.d.ts +54 -8
- package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.js +130 -46
- package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.d.ts +70 -10
- package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.js +175 -53
- package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts +89 -9
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +220 -70
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts +89 -11
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +154 -40
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +390 -38
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +951 -367
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.d.ts +213 -18
- package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.js +388 -44
- package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +12 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.js +26 -4
- package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +1090 -123
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +2407 -731
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +139 -19
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.js +296 -59
- package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +579 -78
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +2322 -823
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts +40 -4
- package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/pinned-messages-panel.component.js +72 -14
- package/dist/lib/components/conversation/pinned-messages-panel.component.js.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.d.ts +57 -11
- package/dist/lib/components/dialogs/input-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.js +128 -16
- package/dist/lib/components/dialogs/input-dialog.component.js.map +1 -1
- package/dist/lib/components/dialogs/rating-dialog.component.d.ts +68 -10
- package/dist/lib/components/dialogs/rating-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/dialogs/rating-dialog.component.js +151 -27
- package/dist/lib/components/dialogs/rating-dialog.component.js.map +1 -1
- package/dist/lib/components/export/export-modal.component.d.ts +84 -10
- package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
- package/dist/lib/components/export/export-modal.component.js +173 -49
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts +29 -3
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts.map +1 -1
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js +58 -12
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js.map +1 -1
- package/dist/lib/components/library/library-full-view.component.d.ts +57 -8
- package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/library/library-full-view.component.js +119 -35
- package/dist/lib/components/library/library-full-view.component.js.map +1 -1
- package/dist/lib/components/members/members-modal.component.d.ts +76 -10
- package/dist/lib/components/members/members-modal.component.d.ts.map +1 -1
- package/dist/lib/components/members/members-modal.component.js +164 -50
- package/dist/lib/components/members/members-modal.component.js.map +1 -1
- package/dist/lib/components/message/actionable-commands.component.d.ts +37 -5
- package/dist/lib/components/message/actionable-commands.component.d.ts.map +1 -1
- package/dist/lib/components/message/actionable-commands.component.js +82 -16
- package/dist/lib/components/message/actionable-commands.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts +46 -10
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.js +120 -36
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +549 -74
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +1250 -421
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +411 -29
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +896 -222
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +288 -29
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +561 -123
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts +64 -5
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +101 -11
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/notification/activity-indicator.component.d.ts +6 -2
- package/dist/lib/components/notification/activity-indicator.component.d.ts.map +1 -1
- package/dist/lib/components/notification/activity-indicator.component.js +13 -3
- package/dist/lib/components/notification/activity-indicator.component.js.map +1 -1
- package/dist/lib/components/notification/notification-badge.component.d.ts +15 -3
- package/dist/lib/components/notification/notification-badge.component.d.ts.map +1 -1
- package/dist/lib/components/notification/notification-badge.component.js +36 -8
- package/dist/lib/components/notification/notification-badge.component.js.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.d.ts +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.js +4 -4
- package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts +93 -11
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +348 -87
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts +78 -8
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +177 -46
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/realtime/channels/channel-onboarding-panel.component.d.ts +1 -1
- package/dist/lib/components/realtime/channels/channel-onboarding-panel.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/channel-onboarding-panel.component.js.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.d.ts +1 -1
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.js +3 -0
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.js.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.d.ts +2 -1
- package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.js +1 -1
- package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.js +2 -2
- package/dist/lib/components/realtime/realtime-activity-rail.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.d.ts +3 -1
- package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.js +26 -8
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-delegation-card.component.js +2 -2
- package/dist/lib/components/realtime/realtime-delegation-card.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +4 -4
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +19 -19
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.d.ts +2 -3
- package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.js +3 -2
- package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.d.ts +17 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.js +122 -45
- package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.d.ts +47 -31
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.js +138 -124
- package/dist/lib/components/realtime/realtime-session-timeline-card.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts +4 -4
- package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js +4 -4
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js +3 -3
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.d.ts +13 -11
- package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.js +29 -25
- package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +4 -2
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +7 -3
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +133 -22
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +312 -83
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts +69 -9
- package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/share/share-modal.component.js +139 -31
- package/dist/lib/components/share/share-modal.component.js.map +1 -1
- package/dist/lib/components/shared/user-picker.component.d.ts +48 -8
- package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -1
- package/dist/lib/components/shared/user-picker.component.js +110 -30
- package/dist/lib/components/shared/user-picker.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +114 -11
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +199 -21
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/sidebar/routines-section.component.d.ts +20 -1
- package/dist/lib/components/sidebar/routines-section.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/routines-section.component.js +25 -5
- package/dist/lib/components/sidebar/routines-section.component.js.map +1 -1
- package/dist/lib/components/slots/slot-interfaces.d.ts +19 -0
- package/dist/lib/components/slots/slot-interfaces.d.ts.map +1 -1
- package/dist/lib/components/slots/slot-interfaces.js.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.d.ts +95 -13
- package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.js +223 -75
- package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
- package/dist/lib/components/tasks/task-widget.component.d.ts +46 -6
- package/dist/lib/components/tasks/task-widget.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/task-widget.component.js +100 -16
- package/dist/lib/components/tasks/task-widget.component.js.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +64 -7
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.js +127 -27
- package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.d.ts +66 -8
- package/dist/lib/components/thread/thread-panel.component.d.ts.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.js +146 -36
- package/dist/lib/components/thread/thread-panel.component.js.map +1 -1
- package/dist/lib/components/toast/toast.component.d.ts +11 -1
- package/dist/lib/components/toast/toast.component.d.ts.map +1 -1
- package/dist/lib/components/toast/toast.component.js +25 -5
- package/dist/lib/components/toast/toast.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +385 -42
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +887 -291
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +8 -0
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js +8 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -1
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/directives/chat-slot.directive.d.ts +5 -1
- package/dist/lib/directives/chat-slot.directive.d.ts.map +1 -1
- package/dist/lib/directives/chat-slot.directive.js.map +1 -1
- package/dist/lib/directives/search-shortcut.directive.d.ts +9 -1
- package/dist/lib/directives/search-shortcut.directive.d.ts.map +1 -1
- package/dist/lib/directives/search-shortcut.directive.js +14 -4
- package/dist/lib/directives/search-shortcut.directive.js.map +1 -1
- package/dist/lib/events/chat-events.d.ts +34 -7
- package/dist/lib/events/chat-events.d.ts.map +1 -1
- package/dist/lib/events/chat-events.js +37 -7
- package/dist/lib/events/chat-events.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +103 -0
- package/dist/lib/models/agent-turn.model.d.ts.map +1 -0
- package/dist/lib/models/agent-turn.model.js +12 -0
- package/dist/lib/models/agent-turn.model.js.map +1 -0
- package/dist/lib/models/collection-view.model.js.map +1 -1
- package/dist/lib/models/conversation-state.model.d.ts +8 -0
- package/dist/lib/models/conversation-state.model.d.ts.map +1 -1
- package/dist/lib/models/conversation-state.model.js.map +1 -1
- package/dist/lib/models/lazy-artifact-info.d.ts +44 -12
- package/dist/lib/models/lazy-artifact-info.d.ts.map +1 -1
- package/dist/lib/models/lazy-artifact-info.js +98 -34
- package/dist/lib/models/lazy-artifact-info.js.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +30 -4
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js +71 -19
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts +17 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +48 -16
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts +39 -0
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +152 -17
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts +58 -5
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +135 -35
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/browser-realtime-media-host.d.ts +24 -0
- package/dist/lib/services/browser-realtime-media-host.d.ts.map +1 -0
- package/dist/lib/services/browser-realtime-media-host.js +95 -0
- package/dist/lib/services/browser-realtime-media-host.js.map +1 -0
- package/dist/lib/services/collection-permission.service.d.ts +28 -0
- package/dist/lib/services/collection-permission.service.d.ts.map +1 -1
- package/dist/lib/services/collection-permission.service.js +88 -32
- package/dist/lib/services/collection-permission.service.js.map +1 -1
- package/dist/lib/services/collection-state.service.d.ts +11 -1
- package/dist/lib/services/collection-state.service.d.ts.map +1 -1
- package/dist/lib/services/collection-state.service.js +25 -5
- package/dist/lib/services/collection-state.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +26 -4
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +57 -18
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-attachment.service.d.ts +41 -2
- package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-attachment.service.js +80 -13
- package/dist/lib/services/conversation-attachment.service.js.map +1 -1
- package/dist/lib/services/conversation-streaming.service.d.ts +22 -0
- package/dist/lib/services/conversation-streaming.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-streaming.service.js +50 -10
- package/dist/lib/services/conversation-streaming.service.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts +31 -0
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +71 -15
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/dialog.service.d.ts +13 -0
- package/dist/lib/services/dialog.service.d.ts.map +1 -1
- package/dist/lib/services/dialog.service.js +25 -5
- package/dist/lib/services/dialog.service.js.map +1 -1
- package/dist/lib/services/export.service.d.ts +2 -0
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +5 -1
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/graphql-attachment-blob-store.d.ts +44 -0
- package/dist/lib/services/graphql-attachment-blob-store.d.ts.map +1 -0
- package/dist/lib/services/graphql-attachment-blob-store.js +113 -0
- package/dist/lib/services/graphql-attachment-blob-store.js.map +1 -0
- package/dist/lib/services/mention-autocomplete.service.d.ts +17 -141
- package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -1
- package/dist/lib/services/mention-autocomplete.service.js +15 -460
- package/dist/lib/services/mention-autocomplete.service.js.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts +10 -0
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +25 -5
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/lib/services/notification.service.d.ts +54 -6
- package/dist/lib/services/notification.service.d.ts.map +1 -1
- package/dist/lib/services/notification.service.js +123 -27
- package/dist/lib/services/notification.service.js.map +1 -1
- package/dist/lib/services/realtime-audio-recorder.d.ts +4 -4
- package/dist/lib/services/realtime-audio-recorder.js +12 -12
- package/dist/lib/services/realtime-audio-recorder.js.map +1 -1
- package/dist/lib/services/realtime-pcm-wav.d.ts +4 -0
- package/dist/lib/services/realtime-pcm-wav.d.ts.map +1 -1
- package/dist/lib/services/realtime-pcm-wav.js +10 -2
- package/dist/lib/services/realtime-pcm-wav.js.map +1 -1
- package/dist/lib/services/realtime-session-review.service.d.ts +1 -1
- package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session-review.service.js +1 -1
- package/dist/lib/services/realtime-session-review.service.js.map +1 -1
- package/dist/lib/services/realtime-session.service.d.ts +16 -1150
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +28 -2430
- package/dist/lib/services/realtime-session.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +42 -9
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +103 -23
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/services/toast.service.d.ts +19 -1
- package/dist/lib/services/toast.service.d.ts.map +1 -1
- package/dist/lib/services/toast.service.js +45 -9
- package/dist/lib/services/toast.service.js.map +1 -1
- package/dist/lib/services/ui-command-handler.service.d.ts +16 -2
- package/dist/lib/services/ui-command-handler.service.d.ts.map +1 -1
- package/dist/lib/services/ui-command-handler.service.js +36 -8
- package/dist/lib/services/ui-command-handler.service.js.map +1 -1
- package/dist/lib/utils/agent-artifact-summary.d.ts +2 -2
- package/dist/lib/utils/agent-artifact-summary.js +3 -3
- package/dist/lib/utils/agent-artifact-summary.js.map +1 -1
- package/dist/lib/utils/agent-turn-routing.d.ts +69 -0
- package/dist/lib/utils/agent-turn-routing.d.ts.map +1 -0
- package/dist/lib/utils/agent-turn-routing.js +96 -0
- package/dist/lib/utils/agent-turn-routing.js.map +1 -0
- package/dist/lib/utils/artifact-panel-action.d.ts +15 -4
- package/dist/lib/utils/artifact-panel-action.d.ts.map +1 -1
- package/dist/lib/utils/artifact-panel-action.js +10 -2
- package/dist/lib/utils/artifact-panel-action.js.map +1 -1
- package/dist/lib/utils/distinct-artifacts.d.ts +2 -0
- package/dist/lib/utils/distinct-artifacts.d.ts.map +1 -1
- package/dist/lib/utils/distinct-artifacts.js +5 -1
- package/dist/lib/utils/distinct-artifacts.js.map +1 -1
- package/dist/lib/utils/plan-mode-preference.d.ts +2 -2
- package/dist/lib/utils/plan-mode-preference.js +6 -6
- package/dist/lib/utils/plan-mode-preference.js.map +1 -1
- package/dist/lib/utils/realtime-session-timeline.d.ts +8 -79
- package/dist/lib/utils/realtime-session-timeline.d.ts.map +1 -1
- package/dist/lib/utils/realtime-session-timeline.js +8 -89
- package/dist/lib/utils/realtime-session-timeline.js.map +1 -1
- package/dist/public-api.d.ts +5 -2
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +9 -2
- package/dist/public-api.js.map +1 -1
- package/package.json +33 -32
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts +0 -384
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts.map +0 -1
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.js +0 -231
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.js.map +0 -1
- package/dist/lib/services/delegation-result-parser.d.ts +0 -50
- package/dist/lib/services/delegation-result-parser.d.ts.map +0 -1
- package/dist/lib/services/delegation-result-parser.js +0 -60
- package/dist/lib/services/delegation-result-parser.js.map +0 -1
- package/dist/lib/services/narration-template.d.ts +0 -42
- package/dist/lib/services/narration-template.d.ts.map +0 -1
- package/dist/lib/services/narration-template.js +0 -73
- package/dist/lib/services/narration-template.js.map +0 -1
- package/dist/lib/services/skill-picker-narrowing.d.ts +0 -13
- package/dist/lib/services/skill-picker-narrowing.d.ts.map +0 -1
- package/dist/lib/services/skill-picker-narrowing.js +0 -13
- package/dist/lib/services/skill-picker-narrowing.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-state.service.js","sourceRoot":"","sources":["../../../src/lib/services/artifact-state.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAc,aAAa,EAAE,MAAM,MAAM,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAA+B,MAAM,sBAAsB,CAAC;;;AAGtF;;;GAGG;AAIH,MAAM,OAAO,oBAAoB;IAwBX;IAvBZ,kBAAkB,GAAG,IAAI,eAAe,CAAgB,IAAI,CAAC,CAAC;IAC9D,qBAAqB,GAAG,IAAI,eAAe,CAAgB,IAAI,CAAC,CAAC;IACjE,WAAW,GAAG,IAAI,eAAe,CAAgC,IAAI,GAAG,EAAE,CAAC,CAAC;IAC5E,aAAa,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;IACpD,WAAW,GAAG,IAAI,eAAe,CAAkB,MAAM,CAAC,CAAC;IAEnE,4BAA4B;IACZ,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE,CAAC;IAC3D,oBAAoB,GAAG,IAAI,CAAC,qBAAqB,CAAC,YAAY,EAAE,CAAC;IACjE,YAAY,G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C,YAAY,EAAE,OAAO,IAAI,2CAA2C,CAAC;gBACzG,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;8GAlgBU,oBAAoB;gEAApB,oBAAoB,WAApB,oBAAoB,mBAFnB,MAAM;;iFAEP,oBAAoB;cAHhC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable, combineLatest } from 'rxjs';\nimport { map, shareReplay } from 'rxjs/operators';\nimport { MJArtifactEntity, MJArtifactVersionEntity } from '@memberjunction/core-entities';\nimport { Metadata, RunView, UserInfo, IMetadataProvider } from '@memberjunction/core';\nimport { ArtifactPermissionService } from './artifact-permission.service';\n\n/**\n * State management for artifacts and the artifact panel\n * Handles artifact CRUD operations and caching with permission enforcement\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ArtifactStateService {\n private _activeArtifactId$ = new BehaviorSubject<string | null>(null);\n private _activeVersionNumber$ = new BehaviorSubject<number | null>(null);\n private _artifacts$ = new BehaviorSubject<Map<string, MJArtifactEntity>>(new Map());\n private _isPanelOpen$ = new BehaviorSubject<boolean>(false);\n private _panelMode$ = new BehaviorSubject<'view' | 'edit'>('view');\n\n // Public observable streams\n public readonly activeArtifactId$ = this._activeArtifactId$.asObservable();\n public readonly activeVersionNumber$ = this._activeVersionNumber$.asObservable();\n public readonly isPanelOpen$ = this._isPanelOpen$.asObservable();\n public readonly panelMode$ = this._panelMode$.asObservable();\n\n // Derived observable for active artifact\n public readonly activeArtifact$: Observable<MJArtifactEntity | null> = combineLatest([\n this.activeArtifactId$,\n this._artifacts$\n ]).pipe(\n map(([id, artifacts]) => id ? artifacts.get(id) || null : null),\n shareReplay(1)\n );\n\n private _provider: IMetadataProvider | null = null;\n\n constructor(private artifactPermissionService: ArtifactPermissionService) {}\n\n /**\n * The metadata provider this service uses. When unset, falls back to Metadata.Provider.\n * Setting it propagates to the dependent artifact-permission service.\n */\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n if (value !== null) {\n this.artifactPermissionService.Provider = value;\n }\n }\n\n /**\n * Check if current user can read an artifact\n * @param artifactId The artifact ID\n * @param currentUser The current user context\n * @returns True if user has read permission\n */\n async canReadArtifact(artifactId: string, currentUser: UserInfo): Promise<boolean> {\n return this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'read', currentUser);\n }\n\n /**\n * Check if current user can edit an artifact\n * @param artifactId The artifact ID\n * @param currentUser The current user context\n * @returns True if user has edit permission\n */\n async canEditArtifact(artifactId: string, currentUser: UserInfo): Promise<boolean> {\n return this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'edit', currentUser);\n }\n\n /**\n * Check if current user can share an artifact\n * @param artifactId The artifact ID\n * @param currentUser The current user context\n * @returns True if user has share permission\n */\n async canShareArtifact(artifactId: string, currentUser: UserInfo): Promise<boolean> {\n return this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'share', currentUser);\n }\n\n /**\n * Opens an artifact in the panel\n * @param id The artifact ID\n * @param versionNumber Optional specific version number\n */\n openArtifact(id: string, versionNumber?: number): void {\n this._activeArtifactId$.next(id);\n this._activeVersionNumber$.next(versionNumber || null);\n this._isPanelOpen$.next(true);\n }\n\n /**\n * Opens an artifact by version ID\n * @param versionId The artifact version ID\n */\n async openArtifactByVersionId(versionId: string): Promise<void> {\n try {\n const md = this.Provider;\n const version = await md.GetEntityObject<MJArtifactVersionEntity>('MJ: Artifact Versions');\n const loaded = await version.Load(versionId);\n\n if (loaded) {\n // Open the artifact with the specific version number\n this.openArtifact(version.ArtifactID, version.VersionNumber);\n } else {\n console.error('Failed to load artifact version:', versionId);\n }\n } catch (error) {\n console.error('Error loading artifact version:', error);\n }\n }\n\n /**\n * Closes the artifact panel\n */\n closeArtifact(): void {\n this._activeArtifactId$.next(null);\n this._activeVersionNumber$.next(null);\n this._isPanelOpen$.next(false);\n this._panelMode$.next('view');\n }\n\n /**\n * Toggles the panel open/closed state\n */\n togglePanel(): void {\n this._isPanelOpen$.next(!this._isPanelOpen$.value);\n }\n\n /**\n * Sets the panel mode\n * @param mode The mode ('view' or 'edit')\n */\n setPanelMode(mode: 'view' | 'edit'): void {\n this._panelMode$.next(mode);\n }\n\n /**\n * Caches an artifact in memory\n * @param artifact The artifact to cache\n */\n cacheArtifact(artifact: MJArtifactEntity): void {\n const current = this._artifacts$.value;\n current.set(artifact.ID, artifact);\n this._artifacts$.next(new Map(current));\n }\n\n /**\n * Removes an artifact from cache\n * @param id The artifact ID\n */\n removeCachedArtifact(id: string): void {\n const current = this._artifacts$.value;\n current.delete(id);\n this._artifacts$.next(new Map(current));\n }\n\n /**\n * Clears all cached artifacts\n */\n clearCache(): void {\n this._artifacts$.next(new Map());\n }\n\n /**\n * Loads artifacts for a conversation\n * @param conversationId The conversation ID\n * @param currentUser The current user context\n * @returns Array of artifacts\n */\n async loadArtifactsForConversation(conversationId: string, currentUser: UserInfo): Promise<MJArtifactEntity[]> {\n try {\n const rv = RunView.FromMetadataProvider(this.Provider);\n const result = await rv.RunView<MJArtifactEntity>(\n {\n EntityName: 'MJ: Artifacts',\n ExtraFilter: `ConversationID='${conversationId}'`,\n OrderBy: '__mj_CreatedAt DESC',\n MaxRows: 1000,\n ResultType: 'entity_object'\n },\n currentUser\n );\n\n if (result.Success && result.Results) {\n // Cache all artifacts\n result.Results.forEach(artifact => this.cacheArtifact(artifact));\n return result.Results;\n }\n return [];\n } catch (error) {\n console.error('Error loading artifacts:', error);\n return [];\n }\n }\n\n /**\n * Loads artifacts for a collection\n * @param collectionId The collection ID\n * @param currentUser The current user context\n * @returns Array of artifacts\n */\n async loadArtifactsForCollection(collectionId: string, currentUser: UserInfo): Promise<MJArtifactEntity[]> {\n try {\n const rv = RunView.FromMetadataProvider(this.Provider);\n // Load artifacts through the collection join - use subquery to get artifact IDs from versions\n const artifactsResult = await rv.RunView<MJArtifactEntity>(\n {\n EntityName: 'MJ: Artifacts',\n ExtraFilter: `ID IN (\n SELECT DISTINCT av.ArtifactID\n FROM [__mj].[vwArtifactVersions] av\n INNER JOIN [__mj].[vwCollectionArtifacts] ca ON ca.ArtifactVersionID = av.ID\n WHERE ca.CollectionID = '${collectionId}'\n )`,\n OrderBy: '__mj_CreatedAt DESC',\n ResultType: 'entity_object'\n },\n currentUser\n );\n\n if (artifactsResult.Success && artifactsResult.Results) {\n artifactsResult.Results.forEach(artifact => this.cacheArtifact(artifact));\n return artifactsResult.Results;\n }\n return [];\n } catch (error) {\n console.error('Error loading collection artifacts:', error);\n return [];\n }\n }\n\n /**\n * Loads artifact VERSIONS for a collection (all versions, not deduplicated by artifact ID)\n * This method returns each version as a separate item with its parent artifact metadata\n * @param collectionId The collection ID\n * @param currentUser The current user context\n * @returns Array of objects containing version and parent artifact info\n */\n async loadArtifactVersionsForCollection(\n collectionId: string,\n currentUser: UserInfo,\n bypassCache: boolean = false\n ): Promise<Array<{ version: MJArtifactVersionEntity; artifact: MJArtifactEntity }>> {\n try {\n const rv = RunView.FromMetadataProvider(this.Provider);\n\n // Resolve membership from the join entity directly rather than via a subquery\n // embedded in an Artifact Versions filter. The server RunView cache is invalidated\n // per-entity: removing a Collection Artifacts link does NOT invalidate a cached\n // 'MJ: Artifact Versions' query whose subquery happens to reference the link table,\n // so the removed artifact would keep appearing. Querying the join entity directly\n // means this read is invalidated whenever a link is added or removed.\n //\n // `bypassCache` is passed right after a move: the link delete's cache invalidation\n // is asynchronous relative to Delete() resolving, so an immediate cached read can\n // still return the old membership. Bypassing reads the committed DB state directly.\n const linkResult = await rv.RunView<{ ArtifactVersionID: string }>({\n EntityName: 'MJ: Collection Artifacts',\n ExtraFilter: `CollectionID='${collectionId}'`,\n Fields: ['ArtifactVersionID'],\n ResultType: 'simple',\n BypassCache: bypassCache\n }, currentUser);\n\n if (!linkResult.Success) {\n return [];\n }\n\n const versionIds = [...new Set(\n (linkResult.Results ?? [])\n .map(r => r.ArtifactVersionID)\n .filter((id): id is string => !!id)\n )];\n\n if (versionIds.length === 0) {\n return [];\n }\n\n // Load the specific versions that are members of this collection.\n const versionResult = await rv.RunView<MJArtifactVersionEntity>({\n EntityName: 'MJ: Artifact Versions',\n ExtraFilter: `ID IN (${versionIds.map(id => `'${id}'`).join(',')})`,\n OrderBy: '__mj_UpdatedAt DESC',\n ResultType: 'entity_object'\n }, currentUser);\n\n if (!versionResult.Success || !versionResult.Results) {\n return [];\n }\n\n // Load parent artifacts for display metadata\n const artifactIds = [...new Set(versionResult.Results.map(v => v.ArtifactID))];\n const artifactMap = new Map<string, MJArtifactEntity>();\n\n if (artifactIds.length > 0) {\n const artifactFilter = artifactIds.map(id => `ID='${id}'`).join(' OR ');\n const artifactResult = await rv.RunView<MJArtifactEntity>({\n EntityName: 'MJ: Artifacts',\n ExtraFilter: artifactFilter,\n ResultType: 'entity_object'\n }, currentUser);\n\n if (artifactResult.Success && artifactResult.Results) {\n artifactResult.Results.forEach(a => {\n artifactMap.set(a.ID, a);\n this.cacheArtifact(a); // Cache parent artifacts\n });\n }\n }\n\n // Combine version + artifact\n return versionResult.Results\n .map(version => ({\n version,\n artifact: artifactMap.get(version.ArtifactID)!\n }))\n .filter(item => item.artifact != null);\n } catch (error) {\n console.error('Error loading collection artifact versions:', error);\n return [];\n }\n }\n\n /**\n * Loads a single artifact by ID\n * @param id The artifact ID\n * @param currentUser The current user context\n * @returns The artifact entity or null\n */\n async loadArtifact(id: string, currentUser: UserInfo): Promise<MJArtifactEntity | null> {\n try {\n const md = this.Provider;\n const artifact = await md.GetEntityObject<MJArtifactEntity>('MJ: Artifacts', currentUser);\n const loaded = await artifact.Load(id);\n\n if (loaded) {\n this.cacheArtifact(artifact);\n return artifact;\n }\n return null;\n } catch (error) {\n console.error('Error loading artifact:', error);\n return null;\n }\n }\n\n /**\n * Creates a new artifact\n * @param data Artifact data\n * @param currentUser The current user context\n * @returns The created artifact\n */\n async createArtifact(data: Partial<MJArtifactEntity>, currentUser: UserInfo): Promise<MJArtifactEntity> {\n const md = this.Provider;\n const artifact = await md.GetEntityObject<MJArtifactEntity>('MJ: Artifacts', currentUser);\n\n Object.assign(artifact, data);\n\n const saved = await artifact.Save();\n if (saved) {\n this.cacheArtifact(artifact);\n return artifact;\n } else {\n throw new Error(artifact.LatestResult?.Message || 'Failed to create artifact');\n }\n }\n\n /**\n * Updates an artifact\n * @param id The artifact ID\n * @param updates The fields to update\n * @param currentUser The current user context\n * @returns True if successful\n */\n async updateArtifact(id: string, updates: Partial<MJArtifactEntity>, currentUser: UserInfo): Promise<boolean> {\n // Check edit permission\n const canEdit = await this.artifactPermissionService.checkPermission(id, currentUser.ID, 'edit', currentUser);\n if (!canEdit) {\n throw new Error('You do not have permission to edit this artifact');\n }\n\n const md = this.Provider;\n const artifact = await md.GetEntityObject<MJArtifactEntity>('MJ: Artifacts', currentUser);\n\n const loaded = await artifact.Load(id);\n if (!loaded) {\n throw new Error('Artifact not found');\n }\n\n Object.assign(artifact, updates);\n\n const saved = await artifact.Save();\n if (saved) {\n this.cacheArtifact(artifact);\n return true;\n } else {\n throw new Error(artifact.LatestResult?.Message || 'Failed to update artifact');\n }\n }\n\n /**\n * Deletes an artifact\n * @param id The artifact ID\n * @param currentUser The current user context\n * @returns True if successful\n */\n async deleteArtifact(id: string, currentUser: UserInfo): Promise<boolean> {\n // Check edit permission (required for deletion)\n const canEdit = await this.artifactPermissionService.checkPermission(id, currentUser.ID, 'edit', currentUser);\n if (!canEdit) {\n throw new Error('You do not have permission to delete this artifact');\n }\n\n const md = this.Provider;\n const artifact = await md.GetEntityObject<MJArtifactEntity>('MJ: Artifacts', currentUser);\n\n const loaded = await artifact.Load(id);\n if (!loaded) {\n throw new Error('Artifact not found');\n }\n\n const deleted = await artifact.Delete();\n if (deleted) {\n this.removeCachedArtifact(id);\n if (this._activeArtifactId$.value === id) {\n this.closeArtifact();\n }\n return true;\n } else {\n throw new Error(artifact.LatestResult?.Message || 'Failed to delete artifact');\n }\n }\n\n /**\n * Adds an artifact version to a collection\n * @param artifactId The artifact ID (for permission checking)\n * @param collectionId The collection ID\n * @param currentUser The current user context\n * @param versionId Optional specific version ID. If not provided, uses latest version\n */\n async addToCollection(artifactId: string, collectionId: string, currentUser: UserInfo, versionId?: string): Promise<void> {\n // Check edit permission (required to modify collection membership)\n const canEdit = await this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'edit', currentUser);\n if (!canEdit) {\n throw new Error('You do not have permission to add this artifact to a collection');\n }\n\n // Get version ID if not provided\n let targetVersionId = versionId;\n if (!targetVersionId) {\n const rv = RunView.FromMetadataProvider(this.Provider);\n const versionResult = await rv.RunView<any>(\n {\n EntityName: 'MJ: Artifact Versions',\n ExtraFilter: `ArtifactID='${artifactId}'`,\n OrderBy: 'VersionNumber DESC',\n MaxRows: 1,\n ResultType: 'entity_object'\n },\n currentUser\n );\n\n if (!versionResult.Success || !versionResult.Results || versionResult.Results.length === 0) {\n throw new Error('No versions found for artifact');\n }\n\n targetVersionId = versionResult.Results[0].ID;\n }\n\n const md = this.Provider;\n const collectionArtifact = await md.GetEntityObject('MJ: Collection Artifacts', currentUser);\n\n (collectionArtifact as any).CollectionID = collectionId;\n (collectionArtifact as any).ArtifactVersionID = targetVersionId;\n\n const saved = await collectionArtifact.Save();\n if (!saved) {\n throw new Error('Failed to add artifact to collection');\n }\n }\n\n /**\n * Removes all versions of an artifact from a collection\n * @param artifactId The artifact ID\n * @param collectionId The collection ID\n * @param currentUser The current user context\n */\n async removeFromCollection(artifactId: string, collectionId: string, currentUser: UserInfo): Promise<void> {\n // Check edit permission (required to modify collection membership)\n const canEdit = await this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'edit', currentUser);\n if (!canEdit) {\n throw new Error('You do not have permission to remove this artifact from a collection');\n }\n\n const rv = RunView.FromMetadataProvider(this.Provider);\n // Find all versions of this artifact in the collection\n const result = await rv.RunView<any>(\n {\n EntityName: 'MJ: Collection Artifacts',\n ExtraFilter: `CollectionID='${collectionId}' AND ArtifactVersionID IN (\n SELECT ID FROM [__mj].[vwArtifactVersions] WHERE ArtifactID='${artifactId}'\n )`,\n ResultType: 'entity_object'\n },\n currentUser\n );\n\n if (!result.Success) {\n throw new Error(result.ErrorMessage || 'Failed to find collection artifact');\n }\n\n if (!result.Results || result.Results.length === 0) {\n throw new Error('Collection artifact link not found');\n }\n\n // Delete all version associations\n for (const collectionArtifact of result.Results) {\n const deleted = await collectionArtifact.Delete();\n if (!deleted) {\n const errorMsg = collectionArtifact.LatestResult?.Message || 'Failed to remove artifact from collection';\n throw new Error(errorMsg);\n }\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"artifact-state.service.js","sourceRoot":"","sources":["../../../src/lib/services/artifact-state.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAc,aAAa,EAAE,MAAM,MAAM,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAA+B,MAAM,sBAAsB,CAAC;;;AAGtF;;;GAGG;AAIH,MAAM,OAAO,oBAAoB;IAiDX;IAhDZ,kBAAkB,GAAG,IAAI,eAAe,CAAgB,IAAI,CAAC,CAAC;IAC9D,qBAAqB,GAAG,IAAI,eAAe,CAAgB,IAAI,CAAC,CAAC;IACjE,WAAW,GAAG,IAAI,eAAe,CAAgC,IAAI,GAAG,EAAE,CAAC,CAAC;IAC5E,aAAa,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;IACpD,WAAW,GAAG,IAAI,eAAe,CAAkB,MAAM,CAAC,CAAC;IAEnE,4BAA4B;IACZ,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE,CAAC;IAE3E,iDAAiD;IACjD,IAAW,iBAAiB;QAC1B,OAAO,IAAI,CAAC,iBAAiB,CAAC;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,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,YAAY,IAAI,oCAAoC,CAAC,CAAC;QAC/E,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnD,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACxD,CAAC;QAED,kCAAkC;QAClC,KAAK,MAAM,kBAAkB,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAChD,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,CAAC;YAClD,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,QAAQ,GAAG,kBAAkB,CAAC,YAAY,EAAE,OAAO,IAAI,2CAA2C,CAAC;gBACzG,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;IAED,oDAAoD;IACpD,KAAK,CAAC,oBAAoB,CAAC,UAAkB,EAAE,YAAoB,EAAE,WAAqB;QACxF,OAAO,IAAI,CAAC,oBAAoB,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAC1E,CAAC;8GAnoBU,oBAAoB;gEAApB,oBAAoB,WAApB,oBAAoB,mBAFnB,MAAM;;iFAEP,oBAAoB;cAHhC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable, combineLatest } from 'rxjs';\nimport { map, shareReplay } from 'rxjs/operators';\nimport { MJArtifactEntity, MJArtifactVersionEntity } from '@memberjunction/core-entities';\nimport { Metadata, RunView, UserInfo, IMetadataProvider } from '@memberjunction/core';\nimport { ArtifactPermissionService } from './artifact-permission.service';\n\n/**\n * State management for artifacts and the artifact panel\n * Handles artifact CRUD operations and caching with permission enforcement\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ArtifactStateService {\n private _activeArtifactId$ = new BehaviorSubject<string | null>(null);\n private _activeVersionNumber$ = new BehaviorSubject<number | null>(null);\n private _artifacts$ = new BehaviorSubject<Map<string, MJArtifactEntity>>(new Map());\n private _isPanelOpen$ = new BehaviorSubject<boolean>(false);\n private _panelMode$ = new BehaviorSubject<'view' | 'edit'>('view');\n\n // Public observable streams\n public readonly ActiveArtifactId$ = this._activeArtifactId$.asObservable();\n\n /** @deprecated Use {@link ActiveArtifactId$}. */\n public get activeArtifactId$() {\n return this.ActiveArtifactId$;\n }\n public readonly ActiveVersionNumber$ = this._activeVersionNumber$.asObservable();\n\n /** @deprecated Use {@link ActiveVersionNumber$}. */\n public get activeVersionNumber$() {\n return this.ActiveVersionNumber$;\n }\n public readonly IsPanelOpen$ = this._isPanelOpen$.asObservable();\n\n /** @deprecated Use {@link IsPanelOpen$}. */\n public get isPanelOpen$() {\n return this.IsPanelOpen$;\n }\n public readonly PanelMode$ = this._panelMode$.asObservable();\n\n /** @deprecated Use {@link PanelMode$}. */\n public get panelMode$() {\n return this.PanelMode$;\n }\n\n // Derived observable for active artifact\n public readonly ActiveArtifact$: Observable<MJArtifactEntity | null> = combineLatest([\n this.ActiveArtifactId$,\n this._artifacts$\n ]).pipe(\n map(([id, artifacts]) => id ? artifacts.get(id) || null : null),\n shareReplay(1)\n );\n\n /** @deprecated Use {@link ActiveArtifact$}. */\n public get activeArtifact$(): Observable<MJArtifactEntity | null> {\n return this.ActiveArtifact$;\n }\n\n private _provider: IMetadataProvider | null = null;\n\n constructor(private artifactPermissionService: ArtifactPermissionService) {}\n\n /**\n * The metadata provider this service uses. When unset, falls back to Metadata.Provider.\n * Setting it propagates to the dependent artifact-permission service.\n */\n public get Provider(): IMetadataProvider {\n return this._provider ?? Metadata.Provider;\n }\n public set Provider(value: IMetadataProvider | null) {\n this._provider = value;\n if (value !== null) {\n this.artifactPermissionService.Provider = value;\n }\n }\n\n /**\n * Check if current user can read an artifact\n * @param artifactId The artifact ID\n * @param currentUser The current user context\n * @returns True if user has read permission\n */\n async CanReadArtifact(artifactId: string, currentUser: UserInfo): Promise<boolean> {\n return this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'read', currentUser);\n }\n\n /** @deprecated Use {@link CanReadArtifact}. */\n async canReadArtifact(artifactId: string, currentUser: UserInfo): Promise<boolean> {\n return this.CanReadArtifact(artifactId, currentUser);\n }\n\n /**\n * Check if current user can edit an artifact\n * @param artifactId The artifact ID\n * @param currentUser The current user context\n * @returns True if user has edit permission\n */\n async CanEditArtifact(artifactId: string, currentUser: UserInfo): Promise<boolean> {\n return this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'edit', currentUser);\n }\n\n /** @deprecated Use {@link CanEditArtifact}. */\n async canEditArtifact(artifactId: string, currentUser: UserInfo): Promise<boolean> {\n return this.CanEditArtifact(artifactId, currentUser);\n }\n\n /**\n * Check if current user can share an artifact\n * @param artifactId The artifact ID\n * @param currentUser The current user context\n * @returns True if user has share permission\n */\n async CanShareArtifact(artifactId: string, currentUser: UserInfo): Promise<boolean> {\n return this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'share', currentUser);\n }\n\n /** @deprecated Use {@link CanShareArtifact}. */\n async canShareArtifact(artifactId: string, currentUser: UserInfo): Promise<boolean> {\n return this.CanShareArtifact(artifactId, currentUser);\n }\n\n /**\n * Opens an artifact in the panel\n * @param id The artifact ID\n * @param versionNumber Optional specific version number\n */\n OpenArtifact(id: string, versionNumber?: number): void {\n this._activeArtifactId$.next(id);\n this._activeVersionNumber$.next(versionNumber || null);\n this._isPanelOpen$.next(true);\n }\n\n /** @deprecated Use {@link OpenArtifact}. */\n openArtifact(id: string, versionNumber?: number): void {\n return this.OpenArtifact(id, versionNumber);\n }\n\n /**\n * Opens an artifact by version ID\n * @param versionId The artifact version ID\n */\n async OpenArtifactByVersionId(versionId: string): Promise<void> {\n try {\n const md = this.Provider;\n const version = await md.GetEntityObject<MJArtifactVersionEntity>('MJ: Artifact Versions');\n const loaded = await version.Load(versionId);\n\n if (loaded) {\n // Open the artifact with the specific version number\n this.OpenArtifact(version.ArtifactID, version.VersionNumber);\n } else {\n console.error('Failed to load artifact version:', versionId);\n }\n } catch (error) {\n console.error('Error loading artifact version:', error);\n }\n }\n\n /** @deprecated Use {@link OpenArtifactByVersionId}. */\n async openArtifactByVersionId(versionId: string): Promise<void> {\n return this.OpenArtifactByVersionId(versionId);\n }\n\n /**\n * Closes the artifact panel\n */\n CloseArtifact(): void {\n this._activeArtifactId$.next(null);\n this._activeVersionNumber$.next(null);\n this._isPanelOpen$.next(false);\n this._panelMode$.next('view');\n }\n\n /** @deprecated Use {@link CloseArtifact}. */\n closeArtifact(): void {\n return this.CloseArtifact();\n }\n\n /**\n * Toggles the panel open/closed state\n */\n TogglePanel(): void {\n this._isPanelOpen$.next(!this._isPanelOpen$.value);\n }\n\n /** @deprecated Use {@link TogglePanel}. */\n togglePanel(): void {\n return this.TogglePanel();\n }\n\n /**\n * Sets the panel mode\n * @param mode The mode ('view' or 'edit')\n */\n SetPanelMode(mode: 'view' | 'edit'): void {\n this._panelMode$.next(mode);\n }\n\n /** @deprecated Use {@link SetPanelMode}. */\n setPanelMode(mode: 'view' | 'edit'): void {\n return this.SetPanelMode(mode);\n }\n\n /**\n * Caches an artifact in memory\n * @param artifact The artifact to cache\n */\n CacheArtifact(artifact: MJArtifactEntity): void {\n const current = this._artifacts$.value;\n current.set(artifact.ID, artifact);\n this._artifacts$.next(new Map(current));\n }\n\n /** @deprecated Use {@link CacheArtifact}. */\n cacheArtifact(artifact: MJArtifactEntity): void {\n return this.CacheArtifact(artifact);\n }\n\n /**\n * Removes an artifact from cache\n * @param id The artifact ID\n */\n RemoveCachedArtifact(id: string): void {\n const current = this._artifacts$.value;\n current.delete(id);\n this._artifacts$.next(new Map(current));\n }\n\n /** @deprecated Use {@link RemoveCachedArtifact}. */\n removeCachedArtifact(id: string): void {\n return this.RemoveCachedArtifact(id);\n }\n\n /**\n * Clears all cached artifacts\n */\n ClearCache(): void {\n this._artifacts$.next(new Map());\n }\n\n /** @deprecated Use {@link ClearCache}. */\n clearCache(): void {\n return this.ClearCache();\n }\n\n /**\n * Loads artifacts for a conversation\n * @param conversationId The conversation ID\n * @param currentUser The current user context\n * @returns Array of artifacts\n */\n async LoadArtifactsForConversation(conversationId: string, currentUser: UserInfo): Promise<MJArtifactEntity[]> {\n try {\n const rv = RunView.FromMetadataProvider(this.Provider);\n const result = await rv.RunView<MJArtifactEntity>(\n {\n EntityName: 'MJ: Artifacts',\n ExtraFilter: `ConversationID='${conversationId}'`,\n OrderBy: '__mj_CreatedAt DESC',\n MaxRows: 1000,\n ResultType: 'entity_object'\n },\n currentUser\n );\n\n if (result.Success && result.Results) {\n // Cache all artifacts\n result.Results.forEach(artifact => this.CacheArtifact(artifact));\n return result.Results;\n }\n return [];\n } catch (error) {\n console.error('Error loading artifacts:', error);\n return [];\n }\n }\n\n /** @deprecated Use {@link LoadArtifactsForConversation}. */\n async loadArtifactsForConversation(conversationId: string, currentUser: UserInfo): Promise<MJArtifactEntity[]> {\n return this.LoadArtifactsForConversation(conversationId, currentUser);\n }\n\n /**\n * Loads artifacts for a collection\n * @param collectionId The collection ID\n * @param currentUser The current user context\n * @returns Array of artifacts\n */\n async LoadArtifactsForCollection(collectionId: string, currentUser: UserInfo): Promise<MJArtifactEntity[]> {\n try {\n const rv = RunView.FromMetadataProvider(this.Provider);\n // Load artifacts through the collection join - use subquery to get artifact IDs from versions\n const artifactsResult = await rv.RunView<MJArtifactEntity>(\n {\n EntityName: 'MJ: Artifacts',\n ExtraFilter: `ID IN (\n SELECT DISTINCT av.ArtifactID\n FROM [__mj].[vwArtifactVersions] av\n INNER JOIN [__mj].[vwCollectionArtifacts] ca ON ca.ArtifactVersionID = av.ID\n WHERE ca.CollectionID = '${collectionId}'\n )`,\n OrderBy: '__mj_CreatedAt DESC',\n ResultType: 'entity_object'\n },\n currentUser\n );\n\n if (artifactsResult.Success && artifactsResult.Results) {\n artifactsResult.Results.forEach(artifact => this.CacheArtifact(artifact));\n return artifactsResult.Results;\n }\n return [];\n } catch (error) {\n console.error('Error loading collection artifacts:', error);\n return [];\n }\n }\n\n /** @deprecated Use {@link LoadArtifactsForCollection}. */\n async loadArtifactsForCollection(collectionId: string, currentUser: UserInfo): Promise<MJArtifactEntity[]> {\n return this.LoadArtifactsForCollection(collectionId, currentUser);\n }\n\n /**\n * Loads artifact VERSIONS for a collection (all versions, not deduplicated by artifact ID)\n * This method returns each version as a separate item with its parent artifact metadata\n * @param collectionId The collection ID\n * @param currentUser The current user context\n * @returns Array of objects containing version and parent artifact info\n */\n async LoadArtifactVersionsForCollection(\n collectionId: string,\n currentUser: UserInfo,\n bypassCache: boolean = false\n ): Promise<Array<{ version: MJArtifactVersionEntity; artifact: MJArtifactEntity }>> {\n try {\n const rv = RunView.FromMetadataProvider(this.Provider);\n\n // Resolve membership from the join entity directly rather than via a subquery\n // embedded in an Artifact Versions filter. The server RunView cache is invalidated\n // per-entity: removing a Collection Artifacts link does NOT invalidate a cached\n // 'MJ: Artifact Versions' query whose subquery happens to reference the link table,\n // so the removed artifact would keep appearing. Querying the join entity directly\n // means this read is invalidated whenever a link is added or removed.\n //\n // `bypassCache` is passed right after a move: the link delete's cache invalidation\n // is asynchronous relative to Delete() resolving, so an immediate cached read can\n // still return the old membership. Bypassing reads the committed DB state directly.\n const linkResult = await rv.RunView<{ ArtifactVersionID: string }>({\n EntityName: 'MJ: Collection Artifacts',\n ExtraFilter: `CollectionID='${collectionId}'`,\n Fields: ['ArtifactVersionID'],\n ResultType: 'simple',\n BypassCache: bypassCache\n }, currentUser);\n\n if (!linkResult.Success) {\n return [];\n }\n\n const versionIds = [...new Set(\n (linkResult.Results ?? [])\n .map(r => r.ArtifactVersionID)\n .filter((id): id is string => !!id)\n )];\n\n if (versionIds.length === 0) {\n return [];\n }\n\n // Load the specific versions that are members of this collection.\n const versionResult = await rv.RunView<MJArtifactVersionEntity>({\n EntityName: 'MJ: Artifact Versions',\n ExtraFilter: `ID IN (${versionIds.map(id => `'${id}'`).join(',')})`,\n OrderBy: '__mj_UpdatedAt DESC',\n ResultType: 'entity_object'\n }, currentUser);\n\n if (!versionResult.Success || !versionResult.Results) {\n return [];\n }\n\n // Load parent artifacts for display metadata\n const artifactIds = [...new Set(versionResult.Results.map(v => v.ArtifactID))];\n const artifactMap = new Map<string, MJArtifactEntity>();\n\n if (artifactIds.length > 0) {\n const artifactFilter = artifactIds.map(id => `ID='${id}'`).join(' OR ');\n const artifactResult = await rv.RunView<MJArtifactEntity>({\n EntityName: 'MJ: Artifacts',\n ExtraFilter: artifactFilter,\n ResultType: 'entity_object'\n }, currentUser);\n\n if (artifactResult.Success && artifactResult.Results) {\n artifactResult.Results.forEach(a => {\n artifactMap.set(a.ID, a);\n this.CacheArtifact(a); // Cache parent artifacts\n });\n }\n }\n\n // Combine version + artifact\n return versionResult.Results\n .map(version => ({\n version,\n artifact: artifactMap.get(version.ArtifactID)!\n }))\n .filter(item => item.artifact != null);\n } catch (error) {\n console.error('Error loading collection artifact versions:', error);\n return [];\n }\n }\n\n /** @deprecated Use {@link LoadArtifactVersionsForCollection}. */\n async loadArtifactVersionsForCollection(\n collectionId: string,\n currentUser: UserInfo,\n bypassCache: boolean = false\n ): Promise<Array<{ version: MJArtifactVersionEntity; artifact: MJArtifactEntity }>> {\n return this.LoadArtifactVersionsForCollection(collectionId, currentUser, bypassCache);\n }\n\n /**\n * Loads a single artifact by ID\n * @param id The artifact ID\n * @param currentUser The current user context\n * @returns The artifact entity or null\n */\n async LoadArtifact(id: string, currentUser: UserInfo): Promise<MJArtifactEntity | null> {\n try {\n const md = this.Provider;\n const artifact = await md.GetEntityObject<MJArtifactEntity>('MJ: Artifacts', currentUser);\n const loaded = await artifact.Load(id);\n\n if (loaded) {\n this.CacheArtifact(artifact);\n return artifact;\n }\n return null;\n } catch (error) {\n console.error('Error loading artifact:', error);\n return null;\n }\n }\n\n /** @deprecated Use {@link LoadArtifact}. */\n async loadArtifact(id: string, currentUser: UserInfo): Promise<MJArtifactEntity | null> {\n return this.LoadArtifact(id, currentUser);\n }\n\n /**\n * Creates a new artifact\n * @param data Artifact data\n * @param currentUser The current user context\n * @returns The created artifact\n */\n async CreateArtifact(data: Partial<MJArtifactEntity>, currentUser: UserInfo): Promise<MJArtifactEntity> {\n const md = this.Provider;\n const artifact = await md.GetEntityObject<MJArtifactEntity>('MJ: Artifacts', currentUser);\n\n Object.assign(artifact, data);\n\n const saved = await artifact.Save();\n if (saved) {\n this.CacheArtifact(artifact);\n return artifact;\n } else {\n throw new Error(artifact.LatestResult?.Message || 'Failed to create artifact');\n }\n }\n\n /** @deprecated Use {@link CreateArtifact}. */\n async createArtifact(data: Partial<MJArtifactEntity>, currentUser: UserInfo): Promise<MJArtifactEntity> {\n return this.CreateArtifact(data, currentUser);\n }\n\n /**\n * Updates an artifact\n * @param id The artifact ID\n * @param updates The fields to update\n * @param currentUser The current user context\n * @returns True if successful\n */\n async UpdateArtifact(id: string, updates: Partial<MJArtifactEntity>, currentUser: UserInfo): Promise<boolean> {\n // Check edit permission\n const canEdit = await this.artifactPermissionService.checkPermission(id, currentUser.ID, 'edit', currentUser);\n if (!canEdit) {\n throw new Error('You do not have permission to edit this artifact');\n }\n\n const md = this.Provider;\n const artifact = await md.GetEntityObject<MJArtifactEntity>('MJ: Artifacts', currentUser);\n\n const loaded = await artifact.Load(id);\n if (!loaded) {\n throw new Error('Artifact not found');\n }\n\n Object.assign(artifact, updates);\n\n const saved = await artifact.Save();\n if (saved) {\n this.CacheArtifact(artifact);\n return true;\n } else {\n throw new Error(artifact.LatestResult?.Message || 'Failed to update artifact');\n }\n }\n\n /** @deprecated Use {@link UpdateArtifact}. */\n async updateArtifact(id: string, updates: Partial<MJArtifactEntity>, currentUser: UserInfo): Promise<boolean> {\n return this.UpdateArtifact(id, updates, currentUser);\n }\n\n /**\n * Deletes an artifact\n * @param id The artifact ID\n * @param currentUser The current user context\n * @returns True if successful\n */\n async DeleteArtifact(id: string, currentUser: UserInfo): Promise<boolean> {\n // Check edit permission (required for deletion)\n const canEdit = await this.artifactPermissionService.checkPermission(id, currentUser.ID, 'edit', currentUser);\n if (!canEdit) {\n throw new Error('You do not have permission to delete this artifact');\n }\n\n const md = this.Provider;\n const artifact = await md.GetEntityObject<MJArtifactEntity>('MJ: Artifacts', currentUser);\n\n const loaded = await artifact.Load(id);\n if (!loaded) {\n throw new Error('Artifact not found');\n }\n\n const deleted = await artifact.Delete();\n if (deleted) {\n this.RemoveCachedArtifact(id);\n if (this._activeArtifactId$.value === id) {\n this.CloseArtifact();\n }\n return true;\n } else {\n throw new Error(artifact.LatestResult?.Message || 'Failed to delete artifact');\n }\n }\n\n /** @deprecated Use {@link DeleteArtifact}. */\n async deleteArtifact(id: string, currentUser: UserInfo): Promise<boolean> {\n return this.DeleteArtifact(id, currentUser);\n }\n\n /**\n * Adds an artifact version to a collection\n * @param artifactId The artifact ID (for permission checking)\n * @param collectionId The collection ID\n * @param currentUser The current user context\n * @param versionId Optional specific version ID. If not provided, uses latest version\n */\n async AddToCollection(artifactId: string, collectionId: string, currentUser: UserInfo, versionId?: string): Promise<void> {\n // Check edit permission (required to modify collection membership)\n const canEdit = await this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'edit', currentUser);\n if (!canEdit) {\n throw new Error('You do not have permission to add this artifact to a collection');\n }\n\n // Get version ID if not provided\n let targetVersionId = versionId;\n if (!targetVersionId) {\n const rv = RunView.FromMetadataProvider(this.Provider);\n const versionResult = await rv.RunView<any>(\n {\n EntityName: 'MJ: Artifact Versions',\n ExtraFilter: `ArtifactID='${artifactId}'`,\n OrderBy: 'VersionNumber DESC',\n MaxRows: 1,\n ResultType: 'entity_object'\n },\n currentUser\n );\n\n if (!versionResult.Success || !versionResult.Results || versionResult.Results.length === 0) {\n throw new Error('No versions found for artifact');\n }\n\n targetVersionId = versionResult.Results[0].ID;\n }\n\n const md = this.Provider;\n const collectionArtifact = await md.GetEntityObject('MJ: Collection Artifacts', currentUser);\n\n (collectionArtifact as any).CollectionID = collectionId;\n (collectionArtifact as any).ArtifactVersionID = targetVersionId;\n\n const saved = await collectionArtifact.Save();\n if (!saved) {\n throw new Error('Failed to add artifact to collection');\n }\n }\n\n /** @deprecated Use {@link AddToCollection}. */\n async addToCollection(artifactId: string, collectionId: string, currentUser: UserInfo, versionId?: string): Promise<void> {\n return this.AddToCollection(artifactId, collectionId, currentUser, versionId);\n }\n\n /**\n * Removes all versions of an artifact from a collection\n * @param artifactId The artifact ID\n * @param collectionId The collection ID\n * @param currentUser The current user context\n */\n async RemoveFromCollection(artifactId: string, collectionId: string, currentUser: UserInfo): Promise<void> {\n // Check edit permission (required to modify collection membership)\n const canEdit = await this.artifactPermissionService.checkPermission(artifactId, currentUser.ID, 'edit', currentUser);\n if (!canEdit) {\n throw new Error('You do not have permission to remove this artifact from a collection');\n }\n\n const rv = RunView.FromMetadataProvider(this.Provider);\n // Find all versions of this artifact in the collection\n const result = await rv.RunView<any>(\n {\n EntityName: 'MJ: Collection Artifacts',\n ExtraFilter: `CollectionID='${collectionId}' AND ArtifactVersionID IN (\n SELECT ID FROM [__mj].[vwArtifactVersions] WHERE ArtifactID='${artifactId}'\n )`,\n ResultType: 'entity_object'\n },\n currentUser\n );\n\n if (!result.Success) {\n throw new Error(result.ErrorMessage || 'Failed to find collection artifact');\n }\n\n if (!result.Results || result.Results.length === 0) {\n throw new Error('Collection artifact link not found');\n }\n\n // Delete all version associations\n for (const collectionArtifact of result.Results) {\n const deleted = await collectionArtifact.Delete();\n if (!deleted) {\n const errorMsg = collectionArtifact.LatestResult?.Message || 'Failed to remove artifact from collection';\n throw new Error(errorMsg);\n }\n }\n }\n\n /** @deprecated Use {@link RemoveFromCollection}. */\n async removeFromCollection(artifactId: string, collectionId: string, currentUser: UserInfo): Promise<void> {\n return this.RemoveFromCollection(artifactId, collectionId, currentUser);\n }\n}"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IRealtimeMediaHost, IRealtimeSessionRecorder } from '@memberjunction/realtime-runtime';
|
|
2
|
+
/**
|
|
3
|
+
* The browser's implementation of the realtime runtime's media seam.
|
|
4
|
+
*
|
|
5
|
+
* Everything here is the half of a realtime session that genuinely *is* platform-specific:
|
|
6
|
+
* how the microphone is requested, and how captured audio becomes bytes we can upload. The
|
|
7
|
+
* orchestration around it — mint, connect, transcripts, tools, narration, channels, teardown —
|
|
8
|
+
* lives in `@memberjunction/realtime-runtime` and is identical on every host.
|
|
9
|
+
*/
|
|
10
|
+
export declare class BrowserRealtimeMediaHost implements IRealtimeMediaHost {
|
|
11
|
+
/**
|
|
12
|
+
* Requests the microphone through the standard Web API, which surfaces the browser's own
|
|
13
|
+
* permission prompt. A denial rejects, and the runtime treats that as a failed session start.
|
|
14
|
+
*/
|
|
15
|
+
AcquireMicrophone(): Promise<MediaStream>;
|
|
16
|
+
/**
|
|
17
|
+
* Wraps the browser recorder so the runtime never sees a `Blob`.
|
|
18
|
+
*
|
|
19
|
+
* Returns `null` when the platform cannot record, which the runtime treats as "recording is
|
|
20
|
+
* simply off" rather than an error — recording is consent-gated and optional by design.
|
|
21
|
+
*/
|
|
22
|
+
CreateRecorder(): IRealtimeSessionRecorder | null;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=browser-realtime-media-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-realtime-media-host.d.ts","sourceRoot":"","sources":["../../../src/lib/services/browser-realtime-media-host.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAClB,wBAAwB,EAC3B,MAAM,kCAAkC,CAAC;AAG1C;;;;;;;GAOG;AACH,qBAAa,wBAAyB,YAAW,kBAAkB;IAC/D;;;OAGG;IACU,iBAAiB,IAAI,OAAO,CAAC,WAAW,CAAC;IAItD;;;;;OAKG;IACI,cAAc,IAAI,wBAAwB,GAAG,IAAI;CAG3D"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { RealtimeAudioRecorder } from './realtime-audio-recorder';
|
|
2
|
+
/**
|
|
3
|
+
* The browser's implementation of the realtime runtime's media seam.
|
|
4
|
+
*
|
|
5
|
+
* Everything here is the half of a realtime session that genuinely *is* platform-specific:
|
|
6
|
+
* how the microphone is requested, and how captured audio becomes bytes we can upload. The
|
|
7
|
+
* orchestration around it — mint, connect, transcripts, tools, narration, channels, teardown —
|
|
8
|
+
* lives in `@memberjunction/realtime-runtime` and is identical on every host.
|
|
9
|
+
*/
|
|
10
|
+
export class BrowserRealtimeMediaHost {
|
|
11
|
+
/**
|
|
12
|
+
* Requests the microphone through the standard Web API, which surfaces the browser's own
|
|
13
|
+
* permission prompt. A denial rejects, and the runtime treats that as a failed session start.
|
|
14
|
+
*/
|
|
15
|
+
async AcquireMicrophone() {
|
|
16
|
+
return navigator.mediaDevices.getUserMedia({ audio: true });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Wraps the browser recorder so the runtime never sees a `Blob`.
|
|
20
|
+
*
|
|
21
|
+
* Returns `null` when the platform cannot record, which the runtime treats as "recording is
|
|
22
|
+
* simply off" rather than an error — recording is consent-gated and optional by design.
|
|
23
|
+
*/
|
|
24
|
+
CreateRecorder() {
|
|
25
|
+
return new BrowserRealtimeSessionRecorder(new RealtimeAudioRecorder());
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Adapts {@link RealtimeAudioRecorder} (which speaks `Blob`, because that is what `MediaRecorder`
|
|
30
|
+
* and the Web Audio API hand you) to the runtime's byte-agnostic recorder contract.
|
|
31
|
+
*
|
|
32
|
+
* The base64 encoding that used to sit in the session service lives here now. That is the correct
|
|
33
|
+
* home for it: a browser reaches for `FileReader`, React Native reads a file off disk, and a test
|
|
34
|
+
* harness holds bytes in memory — three different answers to a question the orchestration layer
|
|
35
|
+
* should never have been asking.
|
|
36
|
+
*/
|
|
37
|
+
class BrowserRealtimeSessionRecorder {
|
|
38
|
+
recorder;
|
|
39
|
+
constructor(recorder) {
|
|
40
|
+
this.recorder = recorder;
|
|
41
|
+
}
|
|
42
|
+
get IsRecording() {
|
|
43
|
+
return this.recorder.IsRecording;
|
|
44
|
+
}
|
|
45
|
+
get SampleRate() {
|
|
46
|
+
return this.recorder.SampleRate;
|
|
47
|
+
}
|
|
48
|
+
get MimeType() {
|
|
49
|
+
return this.recorder.MimeType;
|
|
50
|
+
}
|
|
51
|
+
Start(micStream, remoteStream) {
|
|
52
|
+
this.recorder.Start(micStream, remoteStream);
|
|
53
|
+
}
|
|
54
|
+
AttachRemoteStream(stream) {
|
|
55
|
+
this.recorder.AttachRemoteStream(stream);
|
|
56
|
+
}
|
|
57
|
+
NowOffsetMs() {
|
|
58
|
+
return this.recorder.NowOffsetMs();
|
|
59
|
+
}
|
|
60
|
+
GetPeaks() {
|
|
61
|
+
return this.recorder.GetPeaks();
|
|
62
|
+
}
|
|
63
|
+
async SnapshotNewSegmentBase64() {
|
|
64
|
+
const segment = this.recorder.SnapshotNewSegment();
|
|
65
|
+
if (!segment || segment.size === 0) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
return this.blobToBase64(segment);
|
|
69
|
+
}
|
|
70
|
+
async StopAndEncode() {
|
|
71
|
+
const blob = await this.recorder.Stop();
|
|
72
|
+
if (!blob || blob.size === 0) {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
return this.blobToBase64(blob);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Encodes a {@link Blob} as base64 with the `data:` prefix stripped, via {@link FileReader}.
|
|
79
|
+
* Resolves to `null` rather than rejecting — a failed encode costs us the recording, never
|
|
80
|
+
* the live call.
|
|
81
|
+
*/
|
|
82
|
+
blobToBase64(blob) {
|
|
83
|
+
return new Promise((resolve) => {
|
|
84
|
+
const reader = new FileReader();
|
|
85
|
+
reader.onloadend = () => {
|
|
86
|
+
const result = typeof reader.result === 'string' ? reader.result : '';
|
|
87
|
+
const comma = result.indexOf(',');
|
|
88
|
+
resolve(comma >= 0 ? result.slice(comma + 1) : null);
|
|
89
|
+
};
|
|
90
|
+
reader.onerror = () => resolve(null);
|
|
91
|
+
reader.readAsDataURL(blob);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=browser-realtime-media-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-realtime-media-host.js","sourceRoot":"","sources":["../../../src/lib/services/browser-realtime-media-host.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE;;;;;;;GAOG;AACH,MAAM,OAAO,wBAAwB;IACjC;;;OAGG;IACI,KAAK,CAAC,iBAAiB;QAC1B,OAAO,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAED;;;;;OAKG;IACI,cAAc;QACjB,OAAO,IAAI,8BAA8B,CAAC,IAAI,qBAAqB,EAAE,CAAC,CAAC;IAC3E,CAAC;CACJ;AAED;;;;;;;;GAQG;AACH,MAAM,8BAA8B;IACH;IAA7B,YAA6B,QAA+B;QAA/B,aAAQ,GAAR,QAAQ,CAAuB;IAAG,CAAC;IAEhE,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;IACrC,CAAC;IAED,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;IACpC,CAAC;IAED,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAClC,CAAC;IAEM,KAAK,CAAC,SAAsB,EAAE,YAAgC;QACjE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC;IAEM,kBAAkB,CAAC,MAAmB;QACzC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;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C;YACzD,CAAC,CAAC;YACF,MAAM,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACrC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACP,CAAC;CACJ","sourcesContent":["import {\n IRealtimeMediaHost,\n IRealtimeSessionRecorder,\n} from '@memberjunction/realtime-runtime';\nimport { RealtimeAudioRecorder } from './realtime-audio-recorder';\n\n/**\n * The browser's implementation of the realtime runtime's media seam.\n *\n * Everything here is the half of a realtime session that genuinely *is* platform-specific:\n * how the microphone is requested, and how captured audio becomes bytes we can upload. The\n * orchestration around it — mint, connect, transcripts, tools, narration, channels, teardown —\n * lives in `@memberjunction/realtime-runtime` and is identical on every host.\n */\nexport class BrowserRealtimeMediaHost implements IRealtimeMediaHost {\n /**\n * Requests the microphone through the standard Web API, which surfaces the browser's own\n * permission prompt. A denial rejects, and the runtime treats that as a failed session start.\n */\n public async AcquireMicrophone(): Promise<MediaStream> {\n return navigator.mediaDevices.getUserMedia({ audio: true });\n }\n\n /**\n * Wraps the browser recorder so the runtime never sees a `Blob`.\n *\n * Returns `null` when the platform cannot record, which the runtime treats as \"recording is\n * simply off\" rather than an error — recording is consent-gated and optional by design.\n */\n public CreateRecorder(): IRealtimeSessionRecorder | null {\n return new BrowserRealtimeSessionRecorder(new RealtimeAudioRecorder());\n }\n}\n\n/**\n * Adapts {@link RealtimeAudioRecorder} (which speaks `Blob`, because that is what `MediaRecorder`\n * and the Web Audio API hand you) to the runtime's byte-agnostic recorder contract.\n *\n * The base64 encoding that used to sit in the session service lives here now. That is the correct\n * home for it: a browser reaches for `FileReader`, React Native reads a file off disk, and a test\n * harness holds bytes in memory — three different answers to a question the orchestration layer\n * should never have been asking.\n */\nclass BrowserRealtimeSessionRecorder implements IRealtimeSessionRecorder {\n constructor(private readonly recorder: RealtimeAudioRecorder) {}\n\n public get IsRecording(): boolean {\n return this.recorder.IsRecording;\n }\n\n public get SampleRate(): number {\n return this.recorder.SampleRate;\n }\n\n public get MimeType(): string {\n return this.recorder.MimeType;\n }\n\n public Start(micStream: MediaStream, remoteStream: MediaStream | null): void {\n this.recorder.Start(micStream, remoteStream);\n }\n\n public AttachRemoteStream(stream: MediaStream): void {\n this.recorder.AttachRemoteStream(stream);\n }\n\n public NowOffsetMs(): number {\n return this.recorder.NowOffsetMs();\n }\n\n public GetPeaks(): number[] {\n return this.recorder.GetPeaks();\n }\n\n public async SnapshotNewSegmentBase64(): Promise<string | null> {\n const segment = this.recorder.SnapshotNewSegment();\n if (!segment || segment.size === 0) {\n return null;\n }\n return this.blobToBase64(segment);\n }\n\n public async StopAndEncode(): Promise<string | null> {\n const blob = await this.recorder.Stop();\n if (!blob || blob.size === 0) {\n return null;\n }\n return this.blobToBase64(blob);\n }\n\n /**\n * Encodes a {@link Blob} as base64 with the `data:` prefix stripped, via {@link FileReader}.\n * Resolves to `null` rather than rejecting — a failed encode costs us the recording, never\n * the live call.\n */\n private blobToBase64(blob: Blob): Promise<string | null> {\n return new Promise<string | null>((resolve) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const result = typeof reader.result === 'string' ? reader.result : '';\n const comma = result.indexOf(',');\n resolve(comma >= 0 ? result.slice(comma + 1) : null);\n };\n reader.onerror = () => resolve(null);\n reader.readAsDataURL(blob);\n });\n }\n}\n"]}
|
|
@@ -30,22 +30,32 @@ export declare class CollectionPermissionService {
|
|
|
30
30
|
/**
|
|
31
31
|
* Load all permissions for a collection
|
|
32
32
|
*/
|
|
33
|
+
LoadPermissions(collectionId: string, currentUser: UserInfo): Promise<CollectionPermission[]>;
|
|
34
|
+
/** @deprecated Use {@link LoadPermissions}. */
|
|
33
35
|
loadPermissions(collectionId: string, currentUser: UserInfo): Promise<CollectionPermission[]>;
|
|
34
36
|
/**
|
|
35
37
|
* Check if user has permission for a collection
|
|
36
38
|
*/
|
|
39
|
+
CheckPermission(collectionId: string, userId: string, currentUser: UserInfo): Promise<CollectionPermission | null>;
|
|
40
|
+
/** @deprecated Use {@link CheckPermission}. */
|
|
37
41
|
checkPermission(collectionId: string, userId: string, currentUser: UserInfo): Promise<CollectionPermission | null>;
|
|
38
42
|
/**
|
|
39
43
|
* Check permissions for multiple collections at once (efficient bulk loading)
|
|
40
44
|
*/
|
|
45
|
+
CheckBulkPermissions(collectionIds: string[], userId: string, currentUser: UserInfo): Promise<Map<string, CollectionPermission>>;
|
|
46
|
+
/** @deprecated Use {@link CheckBulkPermissions}. */
|
|
41
47
|
checkBulkPermissions(collectionIds: string[], userId: string, currentUser: UserInfo): Promise<Map<string, CollectionPermission>>;
|
|
42
48
|
/**
|
|
43
49
|
* Grant permission to a user
|
|
44
50
|
*/
|
|
51
|
+
GrantPermission(collectionId: string, userId: string, permissions: PermissionSet, sharedByUserId: string, currentUser: UserInfo): Promise<MJCollectionPermissionEntity>;
|
|
52
|
+
/** @deprecated Use {@link GrantPermission}. */
|
|
45
53
|
grantPermission(collectionId: string, userId: string, permissions: PermissionSet, sharedByUserId: string, currentUser: UserInfo): Promise<MJCollectionPermissionEntity>;
|
|
46
54
|
/**
|
|
47
55
|
* Grant permission and cascade to all child collections
|
|
48
56
|
*/
|
|
57
|
+
GrantPermissionCascade(collectionId: string, userId: string, permissions: PermissionSet, sharedByUserId: string, currentUser: UserInfo): Promise<void>;
|
|
58
|
+
/** @deprecated Use {@link GrantPermissionCascade}. */
|
|
49
59
|
grantPermissionCascade(collectionId: string, userId: string, permissions: PermissionSet, sharedByUserId: string, currentUser: UserInfo): Promise<void>;
|
|
50
60
|
/**
|
|
51
61
|
* Recursively grant permissions on all child collections
|
|
@@ -54,10 +64,14 @@ export declare class CollectionPermissionService {
|
|
|
54
64
|
/**
|
|
55
65
|
* Update existing permission
|
|
56
66
|
*/
|
|
67
|
+
UpdatePermission(permissionId: string, permissions: PermissionSet, currentUser: UserInfo): Promise<boolean>;
|
|
68
|
+
/** @deprecated Use {@link UpdatePermission}. */
|
|
57
69
|
updatePermission(permissionId: string, permissions: PermissionSet, currentUser: UserInfo): Promise<boolean>;
|
|
58
70
|
/**
|
|
59
71
|
* Update permission and cascade to all child collections
|
|
60
72
|
*/
|
|
73
|
+
UpdatePermissionCascade(collectionId: string, userId: string, permissions: PermissionSet, currentUser: UserInfo): Promise<void>;
|
|
74
|
+
/** @deprecated Use {@link UpdatePermissionCascade}. */
|
|
61
75
|
updatePermissionCascade(collectionId: string, userId: string, permissions: PermissionSet, currentUser: UserInfo): Promise<void>;
|
|
62
76
|
/**
|
|
63
77
|
* Recursively update permissions on all child collections
|
|
@@ -66,10 +80,14 @@ export declare class CollectionPermissionService {
|
|
|
66
80
|
/**
|
|
67
81
|
* Revoke permission
|
|
68
82
|
*/
|
|
83
|
+
RevokePermission(permissionId: string, currentUser: UserInfo): Promise<boolean>;
|
|
84
|
+
/** @deprecated Use {@link RevokePermission}. */
|
|
69
85
|
revokePermission(permissionId: string, currentUser: UserInfo): Promise<boolean>;
|
|
70
86
|
/**
|
|
71
87
|
* Revoke permission and cascade to all child collections
|
|
72
88
|
*/
|
|
89
|
+
RevokePermissionCascade(collectionId: string, userId: string, currentUser: UserInfo): Promise<void>;
|
|
90
|
+
/** @deprecated Use {@link RevokePermissionCascade}. */
|
|
73
91
|
revokePermissionCascade(collectionId: string, userId: string, currentUser: UserInfo): Promise<void>;
|
|
74
92
|
/**
|
|
75
93
|
* Recursively revoke permissions on all child collections
|
|
@@ -78,22 +96,32 @@ export declare class CollectionPermissionService {
|
|
|
78
96
|
/**
|
|
79
97
|
* Validate that requested permissions don't exceed granter's permissions
|
|
80
98
|
*/
|
|
99
|
+
ValidatePermissions(requested: PermissionSet, granter: PermissionSet, isOwner: boolean): boolean;
|
|
100
|
+
/** @deprecated Use {@link ValidatePermissions}. */
|
|
81
101
|
validatePermissions(requested: PermissionSet, granter: PermissionSet, isOwner: boolean): boolean;
|
|
82
102
|
/**
|
|
83
103
|
* Get available permissions for a user to grant based on their own permissions
|
|
84
104
|
*/
|
|
105
|
+
GetAvailablePermissions(userPermissions: PermissionSet, isOwner: boolean): string[];
|
|
106
|
+
/** @deprecated Use {@link GetAvailablePermissions}. */
|
|
85
107
|
getAvailablePermissions(userPermissions: PermissionSet, isOwner: boolean): string[];
|
|
86
108
|
/**
|
|
87
109
|
* Copy all permissions from parent collection to child collection
|
|
88
110
|
*/
|
|
111
|
+
CopyParentPermissions(parentCollectionId: string, childCollectionId: string, currentUser: UserInfo): Promise<void>;
|
|
112
|
+
/** @deprecated Use {@link CopyParentPermissions}. */
|
|
89
113
|
copyParentPermissions(parentCollectionId: string, childCollectionId: string, currentUser: UserInfo): Promise<void>;
|
|
90
114
|
/**
|
|
91
115
|
* Delete all permissions for a collection
|
|
92
116
|
*/
|
|
117
|
+
DeleteAllPermissions(collectionId: string, currentUser: UserInfo): Promise<void>;
|
|
118
|
+
/** @deprecated Use {@link DeleteAllPermissions}. */
|
|
93
119
|
deleteAllPermissions(collectionId: string, currentUser: UserInfo): Promise<void>;
|
|
94
120
|
/**
|
|
95
121
|
* Create owner permission record (all permissions enabled)
|
|
96
122
|
*/
|
|
123
|
+
CreateOwnerPermission(collectionId: string, ownerId: string, currentUser: UserInfo): Promise<void>;
|
|
124
|
+
/** @deprecated Use {@link CreateOwnerPermission}. */
|
|
97
125
|
createOwnerPermission(collectionId: string, ownerId: string, currentUser: UserInfo): Promise<void>;
|
|
98
126
|
private mapToPermission;
|
|
99
127
|
static ɵfac: i0.ɵɵFactoryDeclaration<CollectionPermissionService, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-permission.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/collection-permission.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAqB,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;;AAE7E,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,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C,IAAI,CAAC;IAQtF;;OAEG;IACG,qBAAqB,CACvB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,QAAQ,GACtB,OAAO,CAAC,IAAI,CAAC;IAehB,OAAO,CAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"collection-permission.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/collection-permission.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAqB,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;;AAE7E,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,qBAGa,2BAA2B;IACpC,OAAO,CAAC,SAAS,CAAkC;IAEnD;;OAEG;IACH,IAAW,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,EAElD;IAED,IAAW,QAAQ,IAAI,iBAAiB,CAEvC;IAED;;OAEG;IACG,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAenG,+CAA+C;IACzC,eA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