@atlaskit/rovo-triggers 3.1.6 → 3.3.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,25 @@
1
1
  # @atlaskit/rovo-triggers
2
2
 
3
+ ## 3.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#201076](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/201076)
8
+ [`9c5b61c98daf3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9c5b61c98daf3) -
9
+ [ux] Add a new package `loom-script-in-confluence-chat-call-to-action-panel` which has a new
10
+ call-to-action panel for future use in chat history, this component is still not consumed
11
+ anywhere. Also added a new event in `rovo-triggers` forthe cta being clicked. This change relates
12
+ to the experiment
13
+ https://hello.atlassian.net/wiki/spaces/Growth/pages/5129359003/Loom+AI+readtime+prompt+and+script+for+confluence+pages+Project+Poster.
14
+
15
+ ## 3.2.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [`0e29af758fdf4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0e29af758fdf4) -
20
+ Add in support for getting ADF from staging area editor and passing it to the conversation
21
+ assistant
22
+
3
23
  ## 3.1.6
4
24
 
5
25
  ### Patch Changes
package/dist/cjs/types.js CHANGED
@@ -16,6 +16,14 @@ 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
+ /**
20
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
21
+ */
22
+
23
+ /**
24
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
25
+ */
26
+
19
27
  /** Inserts a prompt into the chat input - either:
20
28
  * - A prompt without a placeholder - sends as a message
21
29
  * - A prompt with a placeholder - inserts the prompt into the chat input
@@ -10,6 +10,14 @@ 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
+ /**
14
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
15
+ */
16
+
17
+ /**
18
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
19
+ */
20
+
13
21
  /** Inserts a prompt into the chat input - either:
14
22
  * - A prompt without a placeholder - sends as a message
15
23
  * - A prompt with a placeholder - inserts the prompt into the chat input
package/dist/esm/types.js CHANGED
@@ -10,6 +10,14 @@ 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
+ /**
14
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
15
+ */
16
+
17
+ /**
18
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
19
+ */
20
+
13
21
  /** Inserts a prompt into the chat input - either:
14
22
  * - A prompt without a placeholder - sends as a message
15
23
  * - 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, 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 {};
@@ -84,6 +84,17 @@ export type ChatOpenPayload = PayloadCore<'chat-open', {
84
84
  channelId: string;
85
85
  agentId?: string;
86
86
  }>;
87
+ /**
88
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
89
+ */
90
+ export type ValidChatCallToActionUseCases = 'loom-confluence-page-script-co-use' | 'loom-confluence-page-script-cross-join';
91
+ /**
92
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
93
+ */
94
+ export type ValidSourceIdsForChatCallToAction = 'confluence-page-loom-script-co-use-touchpoint' | 'confluence-page-loom-script-cross-join-touchpoint';
95
+ export type ChatCallToActionClickedPayload = PayloadCore<'chat-cta-clicked', {
96
+ useCaseId: ValidChatCallToActionUseCases;
97
+ }>;
87
98
  export type ForgeAppAuthSuccess = PayloadCore<'forge-auth-success', {
88
99
  is3pActionAuth?: boolean;
89
100
  }>;
@@ -222,7 +233,7 @@ export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-b
222
233
  operations: JiraIssueWorkBreakdownAction;
223
234
  }>;
224
235
  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;
236
+ export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload | ChatCallToActionClickedPayload;
226
237
  export type Callback = (payload: Payload) => void;
227
238
  export type TopicEvents = {
228
239
  [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, 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 {};
@@ -84,6 +84,17 @@ export type ChatOpenPayload = PayloadCore<'chat-open', {
84
84
  channelId: string;
85
85
  agentId?: string;
86
86
  }>;
87
+ /**
88
+ * Possible `useCaseIds` for when the cta is clicked and sends a {@link ChatCallToActionClickedPayload} event
89
+ */
90
+ export type ValidChatCallToActionUseCases = 'loom-confluence-page-script-co-use' | 'loom-confluence-page-script-cross-join';
91
+ /**
92
+ * Source Ids that will initiate a chat containing a call-to-action from the first assistant message
93
+ */
94
+ export type ValidSourceIdsForChatCallToAction = 'confluence-page-loom-script-co-use-touchpoint' | 'confluence-page-loom-script-cross-join-touchpoint';
95
+ export type ChatCallToActionClickedPayload = PayloadCore<'chat-cta-clicked', {
96
+ useCaseId: ValidChatCallToActionUseCases;
97
+ }>;
87
98
  export type ForgeAppAuthSuccess = PayloadCore<'forge-auth-success', {
88
99
  is3pActionAuth?: boolean;
89
100
  }>;
@@ -222,7 +233,7 @@ export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-b
222
233
  operations: JiraIssueWorkBreakdownAction;
223
234
  }>;
224
235
  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;
236
+ export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | JiraIssueWorkBreakdownActionPayload | DashboardInsightsActionsPayload | SetChatContextPayload | ChatCallToActionClickedPayload;
226
237
  export type Callback = (payload: Payload) => void;
227
238
  export type TopicEvents = {
228
239
  [key in Topic]?: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-triggers",
3
- "version": "3.1.6",
3
+ "version": "3.3.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": {
@@ -50,7 +50,6 @@
50
50
  "@testing-library/react": "^13.4.0",
51
51
  "@testing-library/react-hooks": "^8.0.1",
52
52
  "react-dom": "^18.2.0",
53
- "typescript": "~5.4.2",
54
53
  "wait-for-expect": "^1.2.0"
55
54
  },
56
55
  "techstack": {