@atlaskit/rovo-triggers 5.17.0 → 5.19.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
+ ## 5.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`88e83be9c053a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88e83be9c053a) -
8
+ [ux] add 'Add to dashboard' button for rovo charts
9
+
10
+ ## 5.18.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [`0cf05c1fb7671`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0cf05c1fb7671) -
15
+ jiraCreateContext added to the chat context store
16
+
3
17
  ## 5.17.0
4
18
 
5
19
  ### Minor Changes
package/dist/cjs/types.js CHANGED
@@ -7,7 +7,8 @@ exports.Topics = void 0;
7
7
  var Topics = exports.Topics = {
8
8
  AI_MATE: 'ai-mate',
9
9
  AI_MATE_ACTIONS: 'ai-mate-actions',
10
- AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts'
10
+ AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts',
11
+ AVP: 'avp'
11
12
  };
12
13
 
13
14
  // Can only specify either `agentId` or `agentExternalConfigReference`, not both
@@ -23,6 +24,9 @@ var Topics = exports.Topics = {
23
24
  // Not using the PayloadCore because the `data: type | undefined` is necessary
24
25
  // but `| undefined` will cause `data` to be removed by PayloadCore
25
26
 
27
+ // Not using the PayloadCore because the `data: type | undefined` is necessary
28
+ // but `| undefined` will cause `data` to be removed by PayloadCore
29
+
26
30
  /** Inserts a prompt into the chat input - either:
27
31
  * - A prompt without a placeholder - sends as a message
28
32
  * - A prompt with a placeholder - inserts the prompt into the chat input
@@ -38,4 +42,13 @@ var Topics = exports.Topics = {
38
42
  * - Used to programmatically open a specific action in the conversation actions list
39
43
  * - The action screen must be already open, and the actions list populated
40
44
  * - The action must exist in the current actions list
45
+ */
46
+
47
+ /**
48
+ * Result shape when a chart is added to an AVP dashboard.
49
+ * Matches the return type of ChartApiService.addChartToDashboard().
50
+ */
51
+
52
+ /**
53
+ * Fired when a chart is added to an AVP dashboard from a Rovo generated chart
41
54
  */
@@ -1,7 +1,8 @@
1
1
  export const Topics = {
2
2
  AI_MATE: 'ai-mate',
3
3
  AI_MATE_ACTIONS: 'ai-mate-actions',
4
- AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts'
4
+ AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts',
5
+ AVP: 'avp'
5
6
  };
6
7
 
7
8
  // Can only specify either `agentId` or `agentExternalConfigReference`, not both
@@ -17,6 +18,9 @@ export const Topics = {
17
18
  // Not using the PayloadCore because the `data: type | undefined` is necessary
18
19
  // but `| undefined` will cause `data` to be removed by PayloadCore
19
20
 
21
+ // Not using the PayloadCore because the `data: type | undefined` is necessary
22
+ // but `| undefined` will cause `data` to be removed by PayloadCore
23
+
20
24
  /** Inserts a prompt into the chat input - either:
21
25
  * - A prompt without a placeholder - sends as a message
22
26
  * - A prompt with a placeholder - inserts the prompt into the chat input
@@ -32,4 +36,13 @@ export const Topics = {
32
36
  * - Used to programmatically open a specific action in the conversation actions list
33
37
  * - The action screen must be already open, and the actions list populated
34
38
  * - The action must exist in the current actions list
39
+ */
40
+
41
+ /**
42
+ * Result shape when a chart is added to an AVP dashboard.
43
+ * Matches the return type of ChartApiService.addChartToDashboard().
44
+ */
45
+
46
+ /**
47
+ * Fired when a chart is added to an AVP dashboard from a Rovo generated chart
35
48
  */
package/dist/esm/types.js CHANGED
@@ -1,7 +1,8 @@
1
1
  export var Topics = {
2
2
  AI_MATE: 'ai-mate',
3
3
  AI_MATE_ACTIONS: 'ai-mate-actions',
4
- AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts'
4
+ AI_MATE_INSERT_URLS: 'ai-mate-chat-inserts',
5
+ AVP: 'avp'
5
6
  };
6
7
 
7
8
  // Can only specify either `agentId` or `agentExternalConfigReference`, not both
@@ -17,6 +18,9 @@ export var Topics = {
17
18
  // Not using the PayloadCore because the `data: type | undefined` is necessary
18
19
  // but `| undefined` will cause `data` to be removed by PayloadCore
19
20
 
21
+ // Not using the PayloadCore because the `data: type | undefined` is necessary
22
+ // but `| undefined` will cause `data` to be removed by PayloadCore
23
+
20
24
  /** Inserts a prompt into the chat input - either:
21
25
  * - A prompt without a placeholder - sends as a message
22
26
  * - A prompt with a placeholder - inserts the prompt into the chat input
@@ -32,4 +36,13 @@ export var Topics = {
32
36
  * - Used to programmatically open a specific action in the conversation actions list
33
37
  * - The action screen must be already open, and the actions list populated
34
38
  * - The action must exist in the current actions list
39
+ */
40
+
41
+ /**
42
+ * Result shape when a chart is added to an AVP dashboard.
43
+ * Matches the return type of ChartApiService.addChartToDashboard().
44
+ */
45
+
46
+ /**
47
+ * Fired when a chart is added to an AVP dashboard from a Rovo generated chart
35
48
  */
@@ -7,6 +7,7 @@ export declare const Topics: {
7
7
  readonly AI_MATE: "ai-mate";
8
8
  readonly AI_MATE_ACTIONS: "ai-mate-actions";
9
9
  readonly AI_MATE_INSERT_URLS: "ai-mate-chat-inserts";
10
+ readonly AVP: "avp";
10
11
  };
11
12
  export type Topic = (typeof Topics)[keyof typeof Topics];
12
13
  export type PayloadCore<TKey extends string, TData = void> = {
@@ -98,6 +99,14 @@ export type BrowserContextPayloadData = {
98
99
  export type WorkflowContextPayloadData = {
99
100
  currentWorkflowDocument?: Record<string, unknown>;
100
101
  };
102
+ export type JiraCreateContextPayloadData = {
103
+ draftWorkItems: {
104
+ projectIdOrKey: string;
105
+ issueTypeId: string;
106
+ summary: string;
107
+ fields: Record<string, any>;
108
+ }[];
109
+ };
101
110
  export type EditorContextPayload = PayloadCore<'editor-context-payload'> & {
102
111
  data: EditorContextPayloadData;
103
112
  };
@@ -107,6 +116,9 @@ export type BrowserContextPayload = PayloadCore<'browser-context-payload'> & {
107
116
  export type WhiteboardContextPayload = PayloadCore<'whiteboard-context-payload'> & {
108
117
  data: WhiteboardContextPayloadData;
109
118
  };
119
+ export type JiraCreateContextPayload = PayloadCore<'jira-create-context-payload'> & {
120
+ data: JiraCreateContextPayloadData;
121
+ };
110
122
  export type ChatDraftPayload = PayloadCore<'chat-draft'>;
111
123
  export type OpenBrowseAgentPayload = PayloadCore<'open-browse-agent-modal'>;
112
124
  export type OpenBrowseAgentSidebarPayload = PayloadCore<'open-browse-agent-sidebar'>;
@@ -165,6 +177,18 @@ export type InsertUrlsPayload = PayloadCore<'insert-urls-into-prompt-input', {
165
177
  export type SelectActionPayload = PayloadCore<'select-action', {
166
178
  actionId: string;
167
179
  }>;
180
+ /**
181
+ * Result shape when a chart is added to an AVP dashboard.
182
+ * Matches the return type of ChartApiService.addChartToDashboard().
183
+ */
184
+ export type AddChartToDashboardResult = {
185
+ chart: Record<string, unknown> | null;
186
+ canvasLayout: Record<string, unknown> | null;
187
+ };
188
+ /**
189
+ * Fired when a chart is added to an AVP dashboard from a Rovo generated chart
190
+ */
191
+ export type AddChartToDashboardPayload = PayloadCore<'add-chart-to-dashboard', AddChartToDashboardResult>;
168
192
  export type TransitionId = string;
169
193
  export type StatusId = string;
170
194
  export type StatusCategory = 'TODO' | 'IN_PROGRESS' | 'DONE' | 'UNDEFINED';
@@ -307,7 +331,7 @@ export type OpenChatDebugModalPayload = PayloadCore<'open-chat-debug-modal'>;
307
331
  export type OpenChatFeedbackModalPayload = PayloadCore<'open-chat-feedback-modal', {
308
332
  answerQuality: 'good' | 'bad' | 'general';
309
333
  }>;
310
- export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload;
334
+ export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload;
311
335
  export type Callback = (payload: Payload) => void;
312
336
  export type TopicEvents = {
313
337
  [key in Topic]?: Array<{
@@ -7,6 +7,7 @@ export declare const Topics: {
7
7
  readonly AI_MATE: "ai-mate";
8
8
  readonly AI_MATE_ACTIONS: "ai-mate-actions";
9
9
  readonly AI_MATE_INSERT_URLS: "ai-mate-chat-inserts";
10
+ readonly AVP: "avp";
10
11
  };
11
12
  export type Topic = (typeof Topics)[keyof typeof Topics];
12
13
  export type PayloadCore<TKey extends string, TData = void> = {
@@ -98,6 +99,14 @@ export type BrowserContextPayloadData = {
98
99
  export type WorkflowContextPayloadData = {
99
100
  currentWorkflowDocument?: Record<string, unknown>;
100
101
  };
102
+ export type JiraCreateContextPayloadData = {
103
+ draftWorkItems: {
104
+ projectIdOrKey: string;
105
+ issueTypeId: string;
106
+ summary: string;
107
+ fields: Record<string, any>;
108
+ }[];
109
+ };
101
110
  export type EditorContextPayload = PayloadCore<'editor-context-payload'> & {
102
111
  data: EditorContextPayloadData;
103
112
  };
@@ -107,6 +116,9 @@ export type BrowserContextPayload = PayloadCore<'browser-context-payload'> & {
107
116
  export type WhiteboardContextPayload = PayloadCore<'whiteboard-context-payload'> & {
108
117
  data: WhiteboardContextPayloadData;
109
118
  };
119
+ export type JiraCreateContextPayload = PayloadCore<'jira-create-context-payload'> & {
120
+ data: JiraCreateContextPayloadData;
121
+ };
110
122
  export type ChatDraftPayload = PayloadCore<'chat-draft'>;
111
123
  export type OpenBrowseAgentPayload = PayloadCore<'open-browse-agent-modal'>;
112
124
  export type OpenBrowseAgentSidebarPayload = PayloadCore<'open-browse-agent-sidebar'>;
@@ -165,6 +177,18 @@ export type InsertUrlsPayload = PayloadCore<'insert-urls-into-prompt-input', {
165
177
  export type SelectActionPayload = PayloadCore<'select-action', {
166
178
  actionId: string;
167
179
  }>;
180
+ /**
181
+ * Result shape when a chart is added to an AVP dashboard.
182
+ * Matches the return type of ChartApiService.addChartToDashboard().
183
+ */
184
+ export type AddChartToDashboardResult = {
185
+ chart: Record<string, unknown> | null;
186
+ canvasLayout: Record<string, unknown> | null;
187
+ };
188
+ /**
189
+ * Fired when a chart is added to an AVP dashboard from a Rovo generated chart
190
+ */
191
+ export type AddChartToDashboardPayload = PayloadCore<'add-chart-to-dashboard', AddChartToDashboardResult>;
168
192
  export type TransitionId = string;
169
193
  export type StatusId = string;
170
194
  export type StatusCategory = 'TODO' | 'IN_PROGRESS' | 'DONE' | 'UNDEFINED';
@@ -307,7 +331,7 @@ export type OpenChatDebugModalPayload = PayloadCore<'open-chat-debug-modal'>;
307
331
  export type OpenChatFeedbackModalPayload = PayloadCore<'open-chat-feedback-modal', {
308
332
  answerQuality: 'good' | 'bad' | 'general';
309
333
  }>;
310
- export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload;
334
+ export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | JiraCreateContextPayload | DatabaseContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | InsertUrlsPayload | SelectActionPayload | AddChartToDashboardPayload | GenericExternalActionErrorPayload | OpenChatDebugModalPayload | OpenChatFeedbackModalPayload | JsmJourneyBuilderActionsPayload | StudioAutomationBuildUpdatePayload | SolutionArchitectHandoffPayload | SolutionPlanStateUpdatePayload | SolutionDraftAgentUpdatePayload | SolutionArchitectAgentActivationPayload | UpdateAgentConfigurationPayload;
311
335
  export type Callback = (payload: Payload) => void;
312
336
  export type TopicEvents = {
313
337
  [key in Topic]?: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "5.17.0",
3
+ "version": "5.19.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": {