@atlaskit/rovo-triggers 10.8.0 → 10.9.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 10.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`8e44006c20d9c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e44006c20d9c) -
8
+ Cache preview-card content by key, and have each mounted preview card refresh itself in response
9
+ to a confluence-content-finalized pubsub event published on a dedicated ai-mate-aifc topic by the
10
+ finalize popup, fixing stale post-finalize state under the cwr-be-based-multi-creation-v0
11
+ experiment.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 10.8.0
4
18
 
5
19
  ### Minor Changes
package/dist/cjs/types.js CHANGED
@@ -3,12 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Topics = exports.JIRA_WORK_ITEMS_CREATING_EVENT = exports.JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = exports.JIRA_WORK_ITEMS_CREATED_EVENT = exports.JIRA_INLINE_AGENT_CREATION_AGENT_ASSIGNED_EVENT = void 0;
6
+ exports.Topics = exports.JIRA_WORK_ITEMS_CREATING_EVENT = exports.JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = exports.JIRA_WORK_ITEMS_CREATED_EVENT = exports.JIRA_INLINE_AGENT_CREATION_AGENT_ASSIGNED_EVENT = exports.CONFLUENCE_CONTENT_FINALIZED_EVENT = void 0;
7
7
  var Topics = exports.Topics = {
8
8
  AI_MATE: 'ai-mate',
9
9
  AI_MATE_ACTIONS: 'ai-mate-actions',
10
10
  AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts',
11
11
  AI_MATE_CHAT_INPUT_OVERLAY: 'ai-mate-chat-input-overlay',
12
+ AI_MATE_AIFC: 'ai-mate-aifc',
12
13
  AVP: 'avp'
13
14
  };
14
15
 
@@ -127,4 +128,10 @@ var JIRA_WORK_ITEMS_CREATED_EVENT = exports.JIRA_WORK_ITEMS_CREATED_EVENT = 'jir
127
128
  * {@link JIRA_WORK_ITEMS_CREATING_EVENT}. Subscribers use `invocationId` to revert any optimistic
128
129
  * rows they rendered for that batch.
129
130
  */
130
- var JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = exports.JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = 'jira-work-items-create-failed';
131
+ var JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = exports.JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = 'jira-work-items-create-failed';
132
+ /**
133
+ * Published when staged Confluence content has been published
134
+ * out of the Rovo system space into a real space. Any surface showing that content (e.g. a mounted
135
+ * Rovo preview card) subscribes and refreshes its own state
136
+ */
137
+ var CONFLUENCE_CONTENT_FINALIZED_EVENT = exports.CONFLUENCE_CONTENT_FINALIZED_EVENT = 'confluence-content-finalized';
@@ -3,6 +3,7 @@ export const Topics = {
3
3
  AI_MATE_ACTIONS: 'ai-mate-actions',
4
4
  AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts',
5
5
  AI_MATE_CHAT_INPUT_OVERLAY: 'ai-mate-chat-input-overlay',
6
+ AI_MATE_AIFC: 'ai-mate-aifc',
6
7
  AVP: 'avp'
7
8
  };
8
9
 
@@ -121,4 +122,10 @@ export const JIRA_WORK_ITEMS_CREATED_EVENT = 'jira-work-items-created';
121
122
  * {@link JIRA_WORK_ITEMS_CREATING_EVENT}. Subscribers use `invocationId` to revert any optimistic
122
123
  * rows they rendered for that batch.
123
124
  */
124
- export const JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = 'jira-work-items-create-failed';
125
+ export const JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = 'jira-work-items-create-failed';
126
+ /**
127
+ * Published when staged Confluence content has been published
128
+ * out of the Rovo system space into a real space. Any surface showing that content (e.g. a mounted
129
+ * Rovo preview card) subscribes and refreshes its own state
130
+ */
131
+ export const CONFLUENCE_CONTENT_FINALIZED_EVENT = 'confluence-content-finalized';
package/dist/esm/types.js CHANGED
@@ -3,6 +3,7 @@ export var Topics = {
3
3
  AI_MATE_ACTIONS: 'ai-mate-actions',
4
4
  AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts',
5
5
  AI_MATE_CHAT_INPUT_OVERLAY: 'ai-mate-chat-input-overlay',
6
+ AI_MATE_AIFC: 'ai-mate-aifc',
6
7
  AVP: 'avp'
7
8
  };
8
9
 
@@ -121,4 +122,10 @@ export var JIRA_WORK_ITEMS_CREATED_EVENT = 'jira-work-items-created';
121
122
  * {@link JIRA_WORK_ITEMS_CREATING_EVENT}. Subscribers use `invocationId` to revert any optimistic
122
123
  * rows they rendered for that batch.
123
124
  */
124
- export var JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = 'jira-work-items-create-failed';
125
+ export var JIRA_WORK_ITEMS_CREATE_FAILED_EVENT = 'jira-work-items-create-failed';
126
+ /**
127
+ * Published when staged Confluence content has been published
128
+ * out of the Rovo system space into a real space. Any surface showing that content (e.g. a mounted
129
+ * Rovo preview card) subscribes and refreshes its own state
130
+ */
131
+ export var CONFLUENCE_CONTENT_FINALIZED_EVENT = 'confluence-content-finalized';
@@ -10,6 +10,7 @@ export declare const Topics: {
10
10
  readonly AI_MATE_ACTIONS: 'ai-mate-actions';
11
11
  readonly AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts';
12
12
  readonly AI_MATE_CHAT_INPUT_OVERLAY: 'ai-mate-chat-input-overlay';
13
+ readonly AI_MATE_AIFC: 'ai-mate-aifc';
13
14
  readonly AVP: 'avp';
14
15
  };
15
16
  export type Topic = (typeof Topics)[keyof typeof Topics];
@@ -610,7 +611,7 @@ export type SmartlinksSubscriptionChangedPayload = PayloadCore<'smartlinks-subsc
610
611
  * is expected to be open at a time.
611
612
  */
612
613
  export type CloseInContextAifcModalPayload = PayloadCore<'close-in-context-aifc-modal'>;
613
- export type Payload = MessageSendPayload | ChatClosePayload | CloseInContextAifcModalPayload | SmartCreationModalOpenPayload | ChatNewPayload | InsightsOpenInChatPayload | InsightsChatExitedPayload | ChatDraftPayload | ChatSmartLink3PPostAuthLaunchPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | JiraInlineAgentCreationAgentAssignedPayload | JiraWorkItemsCreatingPayload | JiraWorkItemsCreatedPayload | JiraWorkItemsCreateFailedPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | InsertSkillPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | SolutionArchitectAgentActivationFlowStartedPayload | SolutionArchitectAgentActivationFlowStoppedPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload | SpaceSelectedPayload | SpaceDeselectedPayload | RecommendedSpacesSelectedPayload | CustomSkillUpdatePayload | TaskPlanConfirmedPayload | TaskAskQuestionRenderedPayload | TaskPlanRenderedPayload | TaskSkipAllQuestionsPayload | TaskCancelPlanPayload | TaskAskQuestionConfirmedPayload | TaskModifyPlanRequestedPayload | TaskModifyPlanSubmittedPayload;
614
+ export type Payload = MessageSendPayload | ChatClosePayload | CloseInContextAifcModalPayload | SmartCreationModalOpenPayload | ChatNewPayload | InsightsOpenInChatPayload | InsightsChatExitedPayload | ChatDraftPayload | ChatSmartLink3PPostAuthLaunchPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | JiraInlineAgentCreationAgentAssignedPayload | JiraWorkItemsCreatingPayload | JiraWorkItemsCreatedPayload | JiraWorkItemsCreateFailedPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | InsertSkillPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | SolutionArchitectAgentActivationFlowStartedPayload | SolutionArchitectAgentActivationFlowStoppedPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload | SpaceSelectedPayload | SpaceDeselectedPayload | RecommendedSpacesSelectedPayload | CustomSkillUpdatePayload | TaskPlanConfirmedPayload | TaskAskQuestionRenderedPayload | TaskPlanRenderedPayload | TaskSkipAllQuestionsPayload | TaskCancelPlanPayload | TaskAskQuestionConfirmedPayload | TaskModifyPlanRequestedPayload | TaskModifyPlanSubmittedPayload | ConfluenceContentFinalizedPayload;
614
615
  export type TaskPlanConfirmedPayload = PayloadCore<'task-plan-confirmed', {
615
616
  conversationId: string;
616
617
  planTitle: string;
@@ -696,6 +697,23 @@ export type JiraWorkItemsCreateFailedPayload = PayloadCore<typeof JIRA_WORK_ITEM
696
697
  /** Identifies the batch; matches the {@link JIRA_WORK_ITEMS_CREATING_EVENT} `invocationId` to revert its optimistic rows. */
697
698
  invocationId: string;
698
699
  }>;
700
+ /**
701
+ * Published when staged Confluence content has been published
702
+ * out of the Rovo system space into a real space. Any surface showing that content (e.g. a mounted
703
+ * Rovo preview card) subscribes and refreshes its own state
704
+ */
705
+ export declare const CONFLUENCE_CONTENT_FINALIZED_EVENT: 'confluence-content-finalized';
706
+ export type ConfluenceContentFinalizedPayload = PayloadCore<typeof CONFLUENCE_CONTENT_FINALIZED_EVENT, {
707
+ /**
708
+ * Every content id the finalize attempt covered, successful or not. A failed item's content
709
+ * just stays in the Rovo system space, so a subscriber's refetch harmlessly reconfirms that.
710
+ * Content ids are unique across sites, so subscribers match on this alone.
711
+ */
712
+ contentIds: string[];
713
+ }> & {
714
+ /** Never opens chat — internal signal only. */
715
+ openChat: false;
716
+ };
699
717
  export type Callback = (payload: Payload) => void;
700
718
  export type TopicEvents = {
701
719
  [key in Topic]?: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "10.8.0",
3
+ "version": "10.9.0",
4
4
  "description": "Provides various trigger events to drive Rovo Chat functionality, such as a publish-subscribe and URL parameter hooks",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/primitives": "^22.2.0",
45
45
  "@atlaskit/ssr": "workspace:^",
46
46
  "@atlassian/a11y-jest-testing": "^0.15.0",
47
- "@atlassian/conversation-assistant-service-api": "^16.1.0",
47
+ "@atlassian/conversation-assistant-service-api": "^16.3.0",
48
48
  "@atlassian/feature-flags-test-utils": "^1.2.0",
49
49
  "@testing-library/react": "^16.3.0",
50
50
  "react": "^18.2.0",