@atlaskit/rovo-triggers 3.8.0 → 3.10.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 +16 -0
- package/dist/cjs/main.js +6 -1
- package/dist/es2019/main.js +6 -1
- package/dist/esm/main.js +6 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.d.ts +3 -14
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +3 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/rovo-triggers
|
|
2
2
|
|
|
3
|
+
## 3.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`93ca2cbba6084`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/93ca2cbba6084) -
|
|
8
|
+
Clean up the integrate_aiwb_to_rovo_chat feature flag
|
|
9
|
+
|
|
10
|
+
## 3.9.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`13fbf4dfcc7a4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/13fbf4dfcc7a4) -
|
|
15
|
+
Prevent Rovo pubsub subscribers from being erreonously dropped
|
|
16
|
+
- [`0a6f3cc9c2aeb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0a6f3cc9c2aeb) -
|
|
17
|
+
Open chat sidebar when using inline prompt with agent
|
|
18
|
+
|
|
3
19
|
## 3.8.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/cjs/main.js
CHANGED
|
@@ -15,12 +15,17 @@ var createPubSub = function createPubSub() {
|
|
|
15
15
|
var subscribedEvents = {};
|
|
16
16
|
var publishQueue = {};
|
|
17
17
|
var wildcardEvents = [];
|
|
18
|
+
var subIdCounter = 0;
|
|
19
|
+
var generateSubId = function generateSubId() {
|
|
20
|
+
subIdCounter += 1;
|
|
21
|
+
return subIdCounter.toString();
|
|
22
|
+
};
|
|
18
23
|
var subscribe = function subscribe(_ref, callback) {
|
|
19
24
|
var _subscribedEvents$top;
|
|
20
25
|
var topic = _ref.topic,
|
|
21
26
|
triggerLatest = _ref.triggerLatest;
|
|
22
27
|
var events = (_subscribedEvents$top = subscribedEvents[topic]) !== null && _subscribedEvents$top !== void 0 ? _subscribedEvents$top : [];
|
|
23
|
-
var subId =
|
|
28
|
+
var subId = generateSubId();
|
|
24
29
|
var subExists = events.some(function (_ref2) {
|
|
25
30
|
var id = _ref2.id;
|
|
26
31
|
return id === subId;
|
package/dist/es2019/main.js
CHANGED
|
@@ -4,13 +4,18 @@ const createPubSub = () => {
|
|
|
4
4
|
let subscribedEvents = {};
|
|
5
5
|
let publishQueue = {};
|
|
6
6
|
let wildcardEvents = [];
|
|
7
|
+
let subIdCounter = 0;
|
|
8
|
+
const generateSubId = () => {
|
|
9
|
+
subIdCounter += 1;
|
|
10
|
+
return subIdCounter.toString();
|
|
11
|
+
};
|
|
7
12
|
const subscribe = ({
|
|
8
13
|
topic,
|
|
9
14
|
triggerLatest
|
|
10
15
|
}, callback) => {
|
|
11
16
|
var _subscribedEvents$top;
|
|
12
17
|
const events = (_subscribedEvents$top = subscribedEvents[topic]) !== null && _subscribedEvents$top !== void 0 ? _subscribedEvents$top : [];
|
|
13
|
-
const subId =
|
|
18
|
+
const subId = generateSubId();
|
|
14
19
|
const subExists = events.some(({
|
|
15
20
|
id
|
|
16
21
|
}) => id === subId);
|
package/dist/esm/main.js
CHANGED
|
@@ -8,12 +8,17 @@ var createPubSub = function createPubSub() {
|
|
|
8
8
|
var subscribedEvents = {};
|
|
9
9
|
var publishQueue = {};
|
|
10
10
|
var wildcardEvents = [];
|
|
11
|
+
var subIdCounter = 0;
|
|
12
|
+
var generateSubId = function generateSubId() {
|
|
13
|
+
subIdCounter += 1;
|
|
14
|
+
return subIdCounter.toString();
|
|
15
|
+
};
|
|
11
16
|
var subscribe = function subscribe(_ref, callback) {
|
|
12
17
|
var _subscribedEvents$top;
|
|
13
18
|
var topic = _ref.topic,
|
|
14
19
|
triggerLatest = _ref.triggerLatest;
|
|
15
20
|
var events = (_subscribedEvents$top = subscribedEvents[topic]) !== null && _subscribedEvents$top !== void 0 ? _subscribedEvents$top : [];
|
|
16
|
-
var subId =
|
|
21
|
+
var subId = generateSubId();
|
|
17
22
|
var subExists = events.some(function (_ref2) {
|
|
18
23
|
var id = _ref2.id;
|
|
19
24
|
return id === subId;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { usePublish, useSubscribe, useSubscribeAll, Subscriber } from './main';
|
|
2
|
-
export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, BrowserContextPayloadData, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction,
|
|
2
|
+
export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, BrowserContextPayloadData, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, 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';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ type TargetAgentParam = {
|
|
|
25
25
|
agentExternalConfigReference: string;
|
|
26
26
|
};
|
|
27
27
|
export type ChatNewPayload = PayloadCore<'chat-new', {
|
|
28
|
-
name
|
|
28
|
+
name?: string;
|
|
29
29
|
dialogues: Array<{
|
|
30
30
|
human_message: {
|
|
31
31
|
content: string;
|
|
@@ -37,6 +37,7 @@ export type ChatNewPayload = PayloadCore<'chat-new', {
|
|
|
37
37
|
};
|
|
38
38
|
}>;
|
|
39
39
|
prompt?: string | DocNode;
|
|
40
|
+
contentContext?: 'staging-area' | 'global';
|
|
40
41
|
sourceId?: string;
|
|
41
42
|
} & Partial<TargetAgentParam>>;
|
|
42
43
|
export type EditorContextPayloadData = {
|
|
@@ -235,20 +236,8 @@ export type DashboardInsightsActionsPayload = PayloadCore<'dashboard-insights-ac
|
|
|
235
236
|
export type DashboardInsightsActionsPayloadData = {
|
|
236
237
|
content: string;
|
|
237
238
|
} | undefined;
|
|
238
|
-
type ChildIssues = {
|
|
239
|
-
summary: string;
|
|
240
|
-
description: string;
|
|
241
|
-
issueType: string;
|
|
242
|
-
};
|
|
243
|
-
export type JiraIssueWorkBreakdownAction = {
|
|
244
|
-
operationType: 'UPDATE';
|
|
245
|
-
childIssues: ChildIssues[];
|
|
246
|
-
};
|
|
247
|
-
export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-breakdown-actions', {
|
|
248
|
-
operations: JiraIssueWorkBreakdownAction;
|
|
249
|
-
}>;
|
|
250
239
|
export type SetChatContextPayload = PayloadCore<'set-message-context', ChatContextPayload>;
|
|
251
|
-
export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload |
|
|
240
|
+
export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | ChatCallToActionClickedPayload | ChatCallToActionLoomScriptDisplayed;
|
|
252
241
|
export type Callback = (payload: Payload) => void;
|
|
253
242
|
export type TopicEvents = {
|
|
254
243
|
[key in Topic]?: Array<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { usePublish, useSubscribe, useSubscribeAll, Subscriber } from './main';
|
|
2
|
-
export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, BrowserContextPayloadData, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction,
|
|
2
|
+
export type { Payload, Callback, Topic, WorkflowContextPayloadData, EditorContextPayloadData, WhiteboardContextPayloadData, BrowserContextPayloadData, AddStatusRovoPayload, UpdateStatusRovoPayload, DeleteStatusRovoPayload, AddNewTransitionRovoPayload, UpdateTransitionRovoPayload, DeleteTransitionRovoPayload, AddRuleRovoPayload, UpdateRuleRovoPayload, DeleteRuleRovoPayload, JiraWorkflowWizardAction, 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';
|
|
@@ -25,7 +25,7 @@ type TargetAgentParam = {
|
|
|
25
25
|
agentExternalConfigReference: string;
|
|
26
26
|
};
|
|
27
27
|
export type ChatNewPayload = PayloadCore<'chat-new', {
|
|
28
|
-
name
|
|
28
|
+
name?: string;
|
|
29
29
|
dialogues: Array<{
|
|
30
30
|
human_message: {
|
|
31
31
|
content: string;
|
|
@@ -37,6 +37,7 @@ export type ChatNewPayload = PayloadCore<'chat-new', {
|
|
|
37
37
|
};
|
|
38
38
|
}>;
|
|
39
39
|
prompt?: string | DocNode;
|
|
40
|
+
contentContext?: 'staging-area' | 'global';
|
|
40
41
|
sourceId?: string;
|
|
41
42
|
} & Partial<TargetAgentParam>>;
|
|
42
43
|
export type EditorContextPayloadData = {
|
|
@@ -235,20 +236,8 @@ export type DashboardInsightsActionsPayload = PayloadCore<'dashboard-insights-ac
|
|
|
235
236
|
export type DashboardInsightsActionsPayloadData = {
|
|
236
237
|
content: string;
|
|
237
238
|
} | undefined;
|
|
238
|
-
type ChildIssues = {
|
|
239
|
-
summary: string;
|
|
240
|
-
description: string;
|
|
241
|
-
issueType: string;
|
|
242
|
-
};
|
|
243
|
-
export type JiraIssueWorkBreakdownAction = {
|
|
244
|
-
operationType: 'UPDATE';
|
|
245
|
-
childIssues: ChildIssues[];
|
|
246
|
-
};
|
|
247
|
-
export type JiraIssueWorkBreakdownActionPayload = PayloadCore<'jira-issue-work-breakdown-actions', {
|
|
248
|
-
operations: JiraIssueWorkBreakdownAction;
|
|
249
|
-
}>;
|
|
250
239
|
export type SetChatContextPayload = PayloadCore<'set-message-context', ChatContextPayload>;
|
|
251
|
-
export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload |
|
|
240
|
+
export type Payload = MessageSendPayload | ChatClosePayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | OpenBrowseAgentSidebarPayload | EditorSuggestionPayload | EditorAgentChangedPayload | BrowserContextPayload | WhiteboardContextPayload | ForgeAppAuthSuccess | ForgeAppAuthFailure | JiraWorkflowWizardActionsPayload | InsertPromptPayload | DashboardInsightsActionsPayload | SetChatContextPayload | ChatCallToActionClickedPayload | ChatCallToActionLoomScriptDisplayed;
|
|
252
241
|
export type Callback = (payload: Payload) => void;
|
|
253
242
|
export type TopicEvents = {
|
|
254
243
|
[key in Topic]?: Array<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-triggers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.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": {
|