@atlaskit/rovo-triggers 6.1.0 → 6.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 +21 -0
- package/dist/cjs/common/utils/post-message-to-pubsub/index.js +2 -3
- package/dist/es2019/common/utils/post-message-to-pubsub/index.js +2 -3
- package/dist/esm/common/utils/post-message-to-pubsub/index.js +2 -3
- package/dist/types/types.d.ts +19 -1
- package/dist/types-ts4.5/types.d.ts +19 -1
- package/package.json +2 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/rovo-triggers
|
|
2
2
|
|
|
3
|
+
## 6.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b8323b0e8414e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b8323b0e8414e) -
|
|
8
|
+
Add searchArtifact parameter to the sendMessage API Integrate searchArtifact to chat-new pubsub
|
|
9
|
+
event and add to search
|
|
10
|
+
|
|
11
|
+
## 6.2.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`4fa6da872648d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4fa6da872648d) -
|
|
16
|
+
Cleanup feature gate `ai-mate-pub-sub-post-message-origin-fix`.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`69e5d70a23296`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/69e5d70a23296) -
|
|
21
|
+
Fix 3P connector recommendation matching to use ORS generator name as primary identifier,
|
|
22
|
+
enablingmatching regardless of SmartLinks auth state
|
|
23
|
+
|
|
3
24
|
## 6.1.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -8,7 +8,6 @@ exports.useRovoPostMessageToPubsub = exports.isAllowedOrigin = exports.RovoPostM
|
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _bindEventListener = require("bind-event-listener");
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _main = require("../../../main");
|
|
13
12
|
var ROVO_POST_MESSAGE_EVENT_TYPE = exports.ROVO_POST_MESSAGE_EVENT_TYPE = 'rovo-post-message';
|
|
14
13
|
var ROVO_POST_MESSAGE_ACK_EVENT_TYPE = exports.ROVO_POST_MESSAGE_ACK_EVENT_TYPE = 'rovo-post-message-ack';
|
|
@@ -41,9 +40,9 @@ var RovoPostMessagePubsubListener = exports.RovoPostMessagePubsubListener = func
|
|
|
41
40
|
eventType: ROVO_POST_MESSAGE_ACK_EVENT_TYPE,
|
|
42
41
|
payloadId: eventData.payloadId
|
|
43
42
|
};
|
|
44
|
-
(_event$source = event.source) === null || _event$source === void 0 || _event$source.postMessage(ackPayload,
|
|
43
|
+
(_event$source = event.source) === null || _event$source === void 0 || _event$source.postMessage(ackPayload, {
|
|
45
44
|
targetOrigin: '*'
|
|
46
|
-
}
|
|
45
|
+
});
|
|
47
46
|
publish(event.data.payload);
|
|
48
47
|
}
|
|
49
48
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { usePublish } from '../../../main';
|
|
5
4
|
export const ROVO_POST_MESSAGE_EVENT_TYPE = 'rovo-post-message';
|
|
6
5
|
export const ROVO_POST_MESSAGE_ACK_EVENT_TYPE = 'rovo-post-message-ack';
|
|
@@ -31,9 +30,9 @@ export const RovoPostMessagePubsubListener = () => {
|
|
|
31
30
|
eventType: ROVO_POST_MESSAGE_ACK_EVENT_TYPE,
|
|
32
31
|
payloadId: eventData.payloadId
|
|
33
32
|
};
|
|
34
|
-
(_event$source = event.source) === null || _event$source === void 0 ? void 0 : _event$source.postMessage(ackPayload,
|
|
33
|
+
(_event$source = event.source) === null || _event$source === void 0 ? void 0 : _event$source.postMessage(ackPayload, {
|
|
35
34
|
targetOrigin: '*'
|
|
36
|
-
}
|
|
35
|
+
});
|
|
37
36
|
publish(event.data.payload);
|
|
38
37
|
}
|
|
39
38
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { bind } from 'bind-event-listener';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { usePublish } from '../../../main';
|
|
6
5
|
export var ROVO_POST_MESSAGE_EVENT_TYPE = 'rovo-post-message';
|
|
7
6
|
export var ROVO_POST_MESSAGE_ACK_EVENT_TYPE = 'rovo-post-message-ack';
|
|
@@ -34,9 +33,9 @@ export var RovoPostMessagePubsubListener = function RovoPostMessagePubsubListene
|
|
|
34
33
|
eventType: ROVO_POST_MESSAGE_ACK_EVENT_TYPE,
|
|
35
34
|
payloadId: eventData.payloadId
|
|
36
35
|
};
|
|
37
|
-
(_event$source = event.source) === null || _event$source === void 0 || _event$source.postMessage(ackPayload,
|
|
36
|
+
(_event$source = event.source) === null || _event$source === void 0 || _event$source.postMessage(ackPayload, {
|
|
38
37
|
targetOrigin: '*'
|
|
39
|
-
}
|
|
38
|
+
});
|
|
40
39
|
publish(event.data.payload);
|
|
41
40
|
}
|
|
42
41
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -86,6 +86,12 @@ export type ChatNewPayload = PayloadCore<'chat-new', {
|
|
|
86
86
|
versionNumber?: number;
|
|
87
87
|
};
|
|
88
88
|
spaceId?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Optional artifact representing the object the user is currently interacting with or
|
|
91
|
+
* acting on (e.g. 3P forge artifacts that are not resolvable without an ARI).
|
|
92
|
+
* Sent as `search_artifact` in `body.context`.
|
|
93
|
+
*/
|
|
94
|
+
searchArtifact?: SendMessageSearchArtifact;
|
|
89
95
|
} & Partial<TargetAgentParam> & PlaceholderParam>;
|
|
90
96
|
export type EditorContextPayloadData = {
|
|
91
97
|
document: {
|
|
@@ -416,6 +422,11 @@ export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'>
|
|
|
416
422
|
* enabling the chat to cross-reference with Knowledge API without a mapping table.
|
|
417
423
|
*/
|
|
418
424
|
orsAuthKey: string;
|
|
425
|
+
/**
|
|
426
|
+
* Human-readable provider name from ORS generator (e.g. 'Google Drive', 'Slack').
|
|
427
|
+
* Available regardless of SmartLinks auth state — matched against connector friendlyName.
|
|
428
|
+
*/
|
|
429
|
+
generatorName?: string;
|
|
419
430
|
/** Number of occurrences on the page — used for ranking in the banner. */
|
|
420
431
|
count: number;
|
|
421
432
|
}>;
|
|
@@ -428,6 +439,7 @@ export type SpaceSelectedPayload = PayloadCore<'space-selected', {
|
|
|
428
439
|
description?: string;
|
|
429
440
|
}>;
|
|
430
441
|
export type SpaceDeselectedPayload = PayloadCore<'space-deselected'>;
|
|
442
|
+
export type RecommendedSpacesSelectedPayload = PayloadCore<'recommended-spaces-selected'>;
|
|
431
443
|
/** Published after a new conversation is linked to a Rovo Space (e.g. space landing chat). */
|
|
432
444
|
export type SpaceConversationCreatedPayload = PayloadCore<'space-conversation-created', {
|
|
433
445
|
spaceId: string;
|
|
@@ -438,7 +450,7 @@ export type SmartlinksSubscriptionChangedPayload = PayloadCore<'smartlinks-subsc
|
|
|
438
450
|
openChat: false;
|
|
439
451
|
isActive: boolean;
|
|
440
452
|
};
|
|
441
|
-
export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | 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 | SolutionArchitectAgentActivationFlowStartedPayload | SolutionArchitectAgentActivationFlowStoppedPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload | SpaceSelectedPayload | SpaceDeselectedPayload | SpaceConversationCreatedPayload | TaskPlanConfirmedPayload | TaskAskQuestionRenderedPayload | TaskPlanRenderedPayload | TaskSkipAllQuestionsPayload | TaskCancelPlanPayload | TaskAskQuestionConfirmedPayload | TaskModifyPlanRequestedPayload | TaskModifyPlanSubmittedPayload;
|
|
453
|
+
export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | 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 | SolutionArchitectAgentActivationFlowStartedPayload | SolutionArchitectAgentActivationFlowStoppedPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload | SpaceSelectedPayload | SpaceDeselectedPayload | RecommendedSpacesSelectedPayload | SpaceConversationCreatedPayload | TaskPlanConfirmedPayload | TaskAskQuestionRenderedPayload | TaskPlanRenderedPayload | TaskSkipAllQuestionsPayload | TaskCancelPlanPayload | TaskAskQuestionConfirmedPayload | TaskModifyPlanRequestedPayload | TaskModifyPlanSubmittedPayload;
|
|
442
454
|
export type TaskPlanConfirmedPayload = PayloadCore<'task-plan-confirmed', {
|
|
443
455
|
conversationId: string;
|
|
444
456
|
planTitle: string;
|
|
@@ -495,4 +507,10 @@ export type UploadedFile = {
|
|
|
495
507
|
error?: string;
|
|
496
508
|
fileObject?: File;
|
|
497
509
|
};
|
|
510
|
+
type SendMessageSearchArtifact = {
|
|
511
|
+
/** The Atlassian Resource Identifier (ARI) of the object. */
|
|
512
|
+
ari?: string;
|
|
513
|
+
/** The URL of the object. */
|
|
514
|
+
url?: string;
|
|
515
|
+
};
|
|
498
516
|
export {};
|
|
@@ -86,6 +86,12 @@ export type ChatNewPayload = PayloadCore<'chat-new', {
|
|
|
86
86
|
versionNumber?: number;
|
|
87
87
|
};
|
|
88
88
|
spaceId?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Optional artifact representing the object the user is currently interacting with or
|
|
91
|
+
* acting on (e.g. 3P forge artifacts that are not resolvable without an ARI).
|
|
92
|
+
* Sent as `search_artifact` in `body.context`.
|
|
93
|
+
*/
|
|
94
|
+
searchArtifact?: SendMessageSearchArtifact;
|
|
89
95
|
} & Partial<TargetAgentParam> & PlaceholderParam>;
|
|
90
96
|
export type EditorContextPayloadData = {
|
|
91
97
|
document: {
|
|
@@ -416,6 +422,11 @@ export type SmartLinksContextPayload = PayloadCore<'smartlinks-context-payload'>
|
|
|
416
422
|
* enabling the chat to cross-reference with Knowledge API without a mapping table.
|
|
417
423
|
*/
|
|
418
424
|
orsAuthKey: string;
|
|
425
|
+
/**
|
|
426
|
+
* Human-readable provider name from ORS generator (e.g. 'Google Drive', 'Slack').
|
|
427
|
+
* Available regardless of SmartLinks auth state — matched against connector friendlyName.
|
|
428
|
+
*/
|
|
429
|
+
generatorName?: string;
|
|
419
430
|
/** Number of occurrences on the page — used for ranking in the banner. */
|
|
420
431
|
count: number;
|
|
421
432
|
}>;
|
|
@@ -428,6 +439,7 @@ export type SpaceSelectedPayload = PayloadCore<'space-selected', {
|
|
|
428
439
|
description?: string;
|
|
429
440
|
}>;
|
|
430
441
|
export type SpaceDeselectedPayload = PayloadCore<'space-deselected'>;
|
|
442
|
+
export type RecommendedSpacesSelectedPayload = PayloadCore<'recommended-spaces-selected'>;
|
|
431
443
|
/** Published after a new conversation is linked to a Rovo Space (e.g. space landing chat). */
|
|
432
444
|
export type SpaceConversationCreatedPayload = PayloadCore<'space-conversation-created', {
|
|
433
445
|
spaceId: string;
|
|
@@ -438,7 +450,7 @@ export type SmartlinksSubscriptionChangedPayload = PayloadCore<'smartlinks-subsc
|
|
|
438
450
|
openChat: false;
|
|
439
451
|
isActive: boolean;
|
|
440
452
|
};
|
|
441
|
-
export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | 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 | SolutionArchitectAgentActivationFlowStartedPayload | SolutionArchitectAgentActivationFlowStoppedPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload | SpaceSelectedPayload | SpaceDeselectedPayload | SpaceConversationCreatedPayload | TaskPlanConfirmedPayload | TaskAskQuestionRenderedPayload | TaskPlanRenderedPayload | TaskSkipAllQuestionsPayload | TaskCancelPlanPayload | TaskAskQuestionConfirmedPayload | TaskModifyPlanRequestedPayload | TaskModifyPlanSubmittedPayload;
|
|
453
|
+
export type Payload = MessageSendPayload | ChatClosePayload | SmartCreationModalOpenPayload | ChatNewPayload | ChatDraftPayload | EditorContextPayload | ChatOpenPayload | OpenBrowseAgentPayload | SmartlinksSubscriptionChangedPayload | 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 | SolutionArchitectAgentActivationFlowStartedPayload | SolutionArchitectAgentActivationFlowStoppedPayload | UpdateAgentConfigurationPayload | StudioLandingPageRedirectPayload | UploadAndInsertMediaPayload | SmartLinksContextPayload | SpaceSelectedPayload | SpaceDeselectedPayload | RecommendedSpacesSelectedPayload | SpaceConversationCreatedPayload | TaskPlanConfirmedPayload | TaskAskQuestionRenderedPayload | TaskPlanRenderedPayload | TaskSkipAllQuestionsPayload | TaskCancelPlanPayload | TaskAskQuestionConfirmedPayload | TaskModifyPlanRequestedPayload | TaskModifyPlanSubmittedPayload;
|
|
442
454
|
export type TaskPlanConfirmedPayload = PayloadCore<'task-plan-confirmed', {
|
|
443
455
|
conversationId: string;
|
|
444
456
|
planTitle: string;
|
|
@@ -495,4 +507,10 @@ export type UploadedFile = {
|
|
|
495
507
|
error?: string;
|
|
496
508
|
fileObject?: File;
|
|
497
509
|
};
|
|
510
|
+
type SendMessageSearchArtifact = {
|
|
511
|
+
/** The Atlassian Resource Identifier (ARI) of the object. */
|
|
512
|
+
ari?: string;
|
|
513
|
+
/** The URL of the object. */
|
|
514
|
+
url?: string;
|
|
515
|
+
};
|
|
498
516
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-triggers",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.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": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
],
|
|
37
37
|
"atlaskit:src": "src/index.ts",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@atlaskit/adf-schema": "^52.
|
|
39
|
+
"@atlaskit/adf-schema": "^52.12.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"bind-event-listener": "^3.0.0"
|
|
@@ -91,10 +91,5 @@
|
|
|
91
91
|
"import-no-extraneous-disable-for-examples-and-docs"
|
|
92
92
|
]
|
|
93
93
|
}
|
|
94
|
-
},
|
|
95
|
-
"platform-feature-flags": {
|
|
96
|
-
"ai-mate-pub-sub-post-message-origin-fix": {
|
|
97
|
-
"type": "boolean"
|
|
98
|
-
}
|
|
99
94
|
}
|
|
100
95
|
}
|