@atlaskit/rovo-triggers 3.2.0 → 3.4.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,24 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 3.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`cd33693cf4431`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd33693cf4431) -
8
+ Add new whiteboards context to pass along to llm as needed
9
+
10
+ ## 3.3.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#201076](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/201076)
15
+ [`9c5b61c98daf3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9c5b61c98daf3) -
16
+ [ux] Add a new package `loom-script-in-confluence-chat-call-to-action-panel` which has a new
17
+ call-to-action panel for future use in chat history, this component is still not consumed
18
+ anywhere. Also added a new event in `rovo-triggers` forthe cta being clicked. This change relates
19
+ to the experiment
20
+ https://hello.atlassian.net/wiki/spaces/Growth/pages/5129359003/Loom+AI+readtime+prompt+and+script+for+confluence+pages+Project+Poster.
21
+
3
22
  ## 3.2.0
4
23
 
5
24
  ### Minor Changes
package/dist/cjs/types.js CHANGED
@@ -16,6 +16,17 @@ var Topics = exports.Topics = {
16
16
  // Not using the PayloadCore because the `data: type | undefined` is necessary
17
17
  // but `| undefined` will cause `data` to be removed by PayloadCore
18
18
 
19
+ // Not using the PayloadCore because the `data: type | undefined` is necessary
20
+ // but `| undefined` will cause `data` to be removed by PayloadCore
21
+
22
+ /**
23
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
24
+ */
25
+
26
+ /**
27
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
28
+ */
29
+
19
30
  /** Inserts a prompt into the chat input - either:
20
31
  * - A prompt without a placeholder - sends as a message
21
32
  * - A prompt with a placeholder - inserts the prompt into the chat input
@@ -10,6 +10,17 @@ export const Topics = {
10
10
  // Not using the PayloadCore because the `data: type | undefined` is necessary
11
11
  // but `| undefined` will cause `data` to be removed by PayloadCore
12
12
 
13
+ // Not using the PayloadCore because the `data: type | undefined` is necessary
14
+ // but `| undefined` will cause `data` to be removed by PayloadCore
15
+
16
+ /**
17
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
18
+ */
19
+
20
+ /**
21
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
22
+ */
23
+
13
24
  /** Inserts a prompt into the chat input - either:
14
25
  * - A prompt without a placeholder - sends as a message
15
26
  * - A prompt with a placeholder - inserts the prompt into the chat input
package/dist/esm/types.js CHANGED
@@ -10,6 +10,17 @@ export var Topics = {
10
10
  // Not using the PayloadCore because the `data: type | undefined` is necessary
11
11
  // but `| undefined` will cause `data` to be removed by PayloadCore
12
12
 
13
+ // Not using the PayloadCore because the `data: type | undefined` is necessary
14
+ // but `| undefined` will cause `data` to be removed by PayloadCore
15
+
16
+ /**
17
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
18
+ */
19
+
20
+ /**
21
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
22
+ */
23
+
13
24
  /** Inserts a prompt into the chat input - either:
14
25
  * - A prompt without a placeholder - sends as a message
15
26
  * - A prompt with a placeholder - inserts the prompt into the chat input
@@ -9,7 +9,7 @@ export declare const RovoPostMessagePubsubListener: () => null;
9
9
  */
10
10
  export declare const useRovoPostMessageToPubsub: () => {
11
11
  publishWithPostMessage: ({ targetWindow, payload, onAcknowledgeTimeout, }: {
12
- targetWindow?: Window | undefined;
12
+ targetWindow?: Window;
13
13
  payload: Payload;
14
14
  onAcknowledgeTimeout: (params: {
15
15
  payload: Payload;
@@ -1,5 +1,5 @@
1
1
  export { usePublish, useSubscribe, useSubscribeAll, Subscriber } from './main';
2
- export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, BrowserContextPayloadData, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, JiraIssueWorkBreakdownAction, DashboardInsightsActionsPayload, DashboardInsightsActionsPayloadData, } from './types';
2
+ export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, BrowserContextPayloadData, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, JiraIssueWorkBreakdownAction, DashboardInsightsActionsPayload, DashboardInsightsActionsPayloadData, ChatCallToActionClickedPayload, ValidChatCallToActionUseCases, ValidSourceIdsForChatCallToAction, } from './types';
3
3
  export { getRovoParams, updatePageRovoParams, addRovoParamsToUrl, assertOnlySpecificFieldsDefined, encodeRovoParams, getListOfRovoParams, } from './common/utils/params';
4
4
  export type { RovoChatParams, RovoChatPathway } from './common/utils/params/types';
5
5
  export { useRovoPostMessageToPubsub, RovoPostMessagePubsubListener, } from './common/utils/post-message-to-pubsub';
@@ -8,8 +8,8 @@ export declare const useSubscribeAll: (callback: Callback) => void;
8
8
  export declare const usePublish: (topic: Topic) => (payload: Payload) => void;
9
9
  export declare const Subscriber: ({ topic, triggerLatest, onEvent, flushQueueOnUnmount, }: {
10
10
  topic: Topic;
11
- triggerLatest?: boolean | undefined;
11
+ triggerLatest?: boolean;
12
12
  onEvent: Callback;
13
- flushQueueOnUnmount?: boolean | undefined;
13
+ flushQueueOnUnmount?: boolean;
14
14
  }) => null;
15
15
  export {};
@@ -49,6 +49,11 @@ export type EditorContextPayloadData = {
49
49
  content: string;
50
50
  };
51
51
  } | undefined;
52
+ export type WhiteboardContextPayloadData = {
53
+ type: 'image/svg+xml' | 'text/plain';
54
+ content: string;
55
+ contentId?: string;
56
+ } | undefined;
52
57
  export type BrowserContextPayloadData = {
53
58
  context: {
54
59
  browserUrl: string;
@@ -65,6 +70,9 @@ export type EditorContextPayload = PayloadCore<'editor-context-payload'> & {
65
70
  export type BrowserContextPayload = PayloadCore<'browser-context-payload'> & {
66
71
  data: BrowserContextPayloadData;
67
72
  };
73
+ export type WhiteboardContextPayload = PayloadCore<'whiteboard-context-payload'> & {
74
+ data: WhiteboardContextPayloadData;
75
+ };
68
76
  export type ChatDraftPayload = PayloadCore<'chat-draft'>;
69
77
  export type OpenBrowseAgentPayload = PayloadCore<'open-browse-agent-modal'>;
70
78
  export type OpenBrowseAgentSidebarPayload = PayloadCore<'open-browse-agent-sidebar'>;
@@ -84,6 +92,17 @@ export type ChatOpenPayload = PayloadCore<'chat-open', {
84
92
  channelId: string;
85
93
  agentId?: string;
86
94
  }>;
95
+ /**
96
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
97
+ */
98
+ export type ValidChatCallToActionUseCases = 'loom-confluence-page-script-co-use' | 'loom-confluence-page-script-cross-join';
99
+ /**
100
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
101
+ */
102
+ export type ValidSourceIdsForChatCallToAction = 'confluence-page-loom-script-co-use-touchpoint' | 'confluence-page-loom-script-cross-join-touchpoint';
103
+ export type ChatCallToActionClickedPayload = PayloadCore<'chat-cta-clicked', {
104
+ useCaseId: ValidChatCallToActionUseCases;
105
+ }>;
87
106
  export type ForgeAppAuthSuccess = PayloadCore<'forge-auth-success', {
88
107
  is3pActionAuth?: boolean;
89
108
  }>;
@@ -222,7 +241,7 @@ export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-b
222
241
  operations: JiraIssueWorkBreakdownAction;
223
242
  }>;
224
243
  export type SetChatContextPayload = PayloadCore<'set-message-context', ChatContextPayload>;
225
- export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload;
244
+ export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload | ChatCallToActionClickedPayload;
226
245
  export type Callback = (payload: Payload) => void;
227
246
  export type TopicEvents = {
228
247
  [key in Topic]?: Array<{
@@ -9,7 +9,7 @@ export declare const RovoPostMessagePubsubListener: () => null;
9
9
  */
10
10
  export declare const useRovoPostMessageToPubsub: () => {
11
11
  publishWithPostMessage: ({ targetWindow, payload, onAcknowledgeTimeout, }: {
12
- targetWindow?: Window | undefined;
12
+ targetWindow?: Window;
13
13
  payload: Payload;
14
14
  onAcknowledgeTimeout: (params: {
15
15
  payload: Payload;
@@ -1,5 +1,5 @@
1
1
  export { usePublish, useSubscribe, useSubscribeAll, Subscriber } from './main';
2
- export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, BrowserContextPayloadData, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, JiraIssueWorkBreakdownAction, DashboardInsightsActionsPayload, DashboardInsightsActionsPayloadData, } from './types';
2
+ export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, BrowserContextPayloadData, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, JiraIssueWorkBreakdownAction, DashboardInsightsActionsPayload, DashboardInsightsActionsPayloadData, ChatCallToActionClickedPayload, ValidChatCallToActionUseCases, ValidSourceIdsForChatCallToAction, } from './types';
3
3
  export { getRovoParams, updatePageRovoParams, addRovoParamsToUrl, assertOnlySpecificFieldsDefined, encodeRovoParams, getListOfRovoParams, } from './common/utils/params';
4
4
  export type { RovoChatParams, RovoChatPathway } from './common/utils/params/types';
5
5
  export { useRovoPostMessageToPubsub, RovoPostMessagePubsubListener, } from './common/utils/post-message-to-pubsub';
@@ -8,8 +8,8 @@ export declare const useSubscribeAll: (callback: Callback) => void;
8
8
  export declare const usePublish: (topic: Topic) => (payload: Payload) => void;
9
9
  export declare const Subscriber: ({ topic, triggerLatest, onEvent, flushQueueOnUnmount, }: {
10
10
  topic: Topic;
11
- triggerLatest?: boolean | undefined;
11
+ triggerLatest?: boolean;
12
12
  onEvent: Callback;
13
- flushQueueOnUnmount?: boolean | undefined;
13
+ flushQueueOnUnmount?: boolean;
14
14
  }) => null;
15
15
  export {};
@@ -49,6 +49,11 @@ export type EditorContextPayloadData = {
49
49
  content: string;
50
50
  };
51
51
  } | undefined;
52
+ export type WhiteboardContextPayloadData = {
53
+ type: 'image/svg+xml' | 'text/plain';
54
+ content: string;
55
+ contentId?: string;
56
+ } | undefined;
52
57
  export type BrowserContextPayloadData = {
53
58
  context: {
54
59
  browserUrl: string;
@@ -65,6 +70,9 @@ export type EditorContextPayload = PayloadCore<'editor-context-payload'> & {
65
70
  export type BrowserContextPayload = PayloadCore<'browser-context-payload'> & {
66
71
  data: BrowserContextPayloadData;
67
72
  };
73
+ export type WhiteboardContextPayload = PayloadCore<'whiteboard-context-payload'> & {
74
+ data: WhiteboardContextPayloadData;
75
+ };
68
76
  export type ChatDraftPayload = PayloadCore<'chat-draft'>;
69
77
  export type OpenBrowseAgentPayload = PayloadCore<'open-browse-agent-modal'>;
70
78
  export type OpenBrowseAgentSidebarPayload = PayloadCore<'open-browse-agent-sidebar'>;
@@ -84,6 +92,17 @@ export type ChatOpenPayload = PayloadCore<'chat-open', {
84
92
  channelId: string;
85
93
  agentId?: string;
86
94
  }>;
95
+ /**
96
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
97
+ */
98
+ export type ValidChatCallToActionUseCases = 'loom-confluence-page-script-co-use' | 'loom-confluence-page-script-cross-join';
99
+ /**
100
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
101
+ */
102
+ export type ValidSourceIdsForChatCallToAction = 'confluence-page-loom-script-co-use-touchpoint' | 'confluence-page-loom-script-cross-join-touchpoint';
103
+ export type ChatCallToActionClickedPayload = PayloadCore<'chat-cta-clicked', {
104
+ useCaseId: ValidChatCallToActionUseCases;
105
+ }>;
87
106
  export type ForgeAppAuthSuccess = PayloadCore<'forge-auth-success', {
88
107
  is3pActionAuth?: boolean;
89
108
  }>;
@@ -222,7 +241,7 @@ export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-b
222
241
  operations: JiraIssueWorkBreakdownAction;
223
242
  }>;
224
243
  export type SetChatContextPayload = PayloadCore<'set-message-context', ChatContextPayload>;
225
- export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload;
244
+ export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload | ChatCallToActionClickedPayload;
226
245
  export type Callback = (payload: Payload) => void;
227
246
  export type TopicEvents = {
228
247
  [key in Topic]?: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "3.2.0",
3
+ "version": "3.4.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": {