@knime/product-features 4.0.0 → 4.1.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 +8 -0
- package/dist/analytics.js +2385 -0
- package/dist/analytics.js.map +1 -0
- package/dist/authUtils.js +149 -0
- package/dist/authUtils.js.map +1 -0
- package/dist/embeddingSDK.js +219 -0
- package/dist/embeddingSDK.js.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/src/analytics/analytics.d.ts +44 -0
- package/dist/src/analytics/analytics.d.ts.map +1 -0
- package/dist/src/analytics/index.d.ts +3 -0
- package/dist/src/analytics/index.d.ts.map +1 -0
- package/dist/src/analytics/schema/cloudhome-event-functions.d.ts +82 -0
- package/dist/src/analytics/schema/cloudhome-event-functions.d.ts.map +1 -0
- package/dist/src/analytics/schema/editor-event-functions.d.ts +151 -0
- package/dist/src/analytics/schema/editor-event-functions.d.ts.map +1 -0
- package/dist/src/analytics/types.d.ts +37 -0
- package/dist/src/analytics/types.d.ts.map +1 -0
- package/dist/src/analytics/utils/toSnakeCaseDeep.d.ts +5 -0
- package/dist/src/analytics/utils/toSnakeCaseDeep.d.ts.map +1 -0
- package/dist/src/authUtils/client.d.ts +13 -0
- package/dist/src/authUtils/client.d.ts.map +1 -0
- package/dist/src/authUtils/index.d.ts +49 -0
- package/dist/src/authUtils/index.d.ts.map +1 -0
- package/dist/src/authUtils/logger.d.ts +2 -0
- package/dist/src/authUtils/logger.d.ts.map +1 -0
- package/dist/src/authUtils/refresher.d.ts +9 -0
- package/dist/src/authUtils/refresher.d.ts.map +1 -0
- package/dist/src/authUtils/shared.d.ts +8 -0
- package/dist/src/authUtils/shared.d.ts.map +1 -0
- package/dist/src/authUtils/types.d.ts +17 -0
- package/dist/src/authUtils/types.d.ts.map +1 -0
- package/dist/src/authUtils/useAuthState.d.ts +17 -0
- package/dist/src/authUtils/useAuthState.d.ts.map +1 -0
- package/dist/src/embeddingSDK/guest.d.ts +27 -0
- package/dist/src/embeddingSDK/guest.d.ts.map +1 -0
- package/dist/src/embeddingSDK/host.d.ts +23 -0
- package/dist/src/embeddingSDK/host.d.ts.map +1 -0
- package/dist/src/embeddingSDK/index.d.ts +8 -0
- package/dist/src/embeddingSDK/index.d.ts.map +1 -0
- package/dist/src/embeddingSDK/messages.d.ts +36 -0
- package/dist/src/embeddingSDK/messages.d.ts.map +1 -0
- package/dist/src/embeddingSDK/types.d.ts +117 -0
- package/dist/src/embeddingSDK/types.d.ts.map +1 -0
- package/dist/src/embeddingSDK/util.d.ts +11 -0
- package/dist/src/embeddingSDK/util.d.ts.map +1 -0
- package/dist/toasts.js +1 -1
- package/package.json +20 -4
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { c as promise_exports } from "./dist-DvDWkkNg.js";
|
|
3
|
+
//#region src/embeddingSDK/messages.ts
|
|
4
|
+
/**
|
|
5
|
+
* ----------- IMPORTANT NOTES ---------------
|
|
6
|
+
* 1. These messages are considered API. So they **must** remain
|
|
7
|
+
* backwards compatible
|
|
8
|
+
* 2. Instead of removal of properties from the embedding context payload,
|
|
9
|
+
* we must use deprecation notes that list which AP version last used the
|
|
10
|
+
* deprecated property
|
|
11
|
+
* 3. The message variable name can change, but not it's value. This is because
|
|
12
|
+
* these values are used since AP browser embedding was first implemented, so
|
|
13
|
+
* they must be retained in order to preserve backwars compatibility
|
|
14
|
+
*/
|
|
15
|
+
var MESSAGES = {
|
|
16
|
+
/**
|
|
17
|
+
* Message used to establish a handshake and setup
|
|
18
|
+
* before waiting for embedding context transfer
|
|
19
|
+
*/
|
|
20
|
+
AWAITING_EMBEDDING_CONTEXT: "KNIME_UI__AWAITING_CONNECTION_INFO",
|
|
21
|
+
/**
|
|
22
|
+
* Message that contains the embedding context information
|
|
23
|
+
*/
|
|
24
|
+
EMBEDDING_CONTEXT: "KNIME_UI__CONNECTION_INFO",
|
|
25
|
+
/**
|
|
26
|
+
* Message used for when embedding failed
|
|
27
|
+
*/
|
|
28
|
+
EMBEDDING_FAILED: "KNIME_UI__CONNECTION_FAIL",
|
|
29
|
+
/**
|
|
30
|
+
* Message to report user activity events
|
|
31
|
+
*/
|
|
32
|
+
USER_ACTIVITY: "KNIME_UI__USER_ACTIVITY",
|
|
33
|
+
/**
|
|
34
|
+
* General purpose event to transfer data between host application and embedded
|
|
35
|
+
* application.
|
|
36
|
+
*/
|
|
37
|
+
GENERIC_EVENT: "KNIME_UI__GENERIC_EVENT"
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/embeddingSDK/guest.ts
|
|
41
|
+
var guest_exports = /* @__PURE__ */ __exportAll({
|
|
42
|
+
clearContext: () => clearContext,
|
|
43
|
+
dispatchGenericEventToHost: () => dispatchGenericEventToHost,
|
|
44
|
+
getContext: () => getContext,
|
|
45
|
+
notifyActivityChange: () => notifyActivityChange,
|
|
46
|
+
sendEmbeddingFailureMessage: () => sendEmbeddingFailureMessage,
|
|
47
|
+
setContext: () => setContext,
|
|
48
|
+
waitForContext: () => waitForContext
|
|
49
|
+
});
|
|
50
|
+
var __embeddingContext;
|
|
51
|
+
var logger$1 = () => consola.withTag("Embedding SDK::GUEST application");
|
|
52
|
+
/**
|
|
53
|
+
* Manually set the Embedding context. Use with caution as this should be done
|
|
54
|
+
* automatically out-of-the-box. It's mostly exposed to be helpful for dev setups
|
|
55
|
+
*/
|
|
56
|
+
var setContext = (value) => {
|
|
57
|
+
if (__embeddingContext) {
|
|
58
|
+
logger$1().warn("Cannot set context, it is already set");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
__embeddingContext = Object.freeze(value);
|
|
62
|
+
};
|
|
63
|
+
var getContext = () => {
|
|
64
|
+
if (!__embeddingContext) {
|
|
65
|
+
logger$1().warn("Embedding:: Context was accessed before it was set.");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
return __embeddingContext;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Only relevant for tests
|
|
72
|
+
*/
|
|
73
|
+
var clearContext = () => {};
|
|
74
|
+
var defaultvalidator = () => ({
|
|
75
|
+
valid: true,
|
|
76
|
+
error: null
|
|
77
|
+
});
|
|
78
|
+
var PARENT_ORIGIN = "*";
|
|
79
|
+
/**
|
|
80
|
+
* Wait for host application to send a message containing the embedding context
|
|
81
|
+
*/
|
|
82
|
+
var waitForContext = (validator = defaultvalidator) => {
|
|
83
|
+
const { promise, reject, resolve } = promise_exports.createUnwrappedPromise();
|
|
84
|
+
function teardown() {
|
|
85
|
+
window.removeEventListener("message", onMessage);
|
|
86
|
+
}
|
|
87
|
+
function onMessage(event) {
|
|
88
|
+
if (event.data.type !== MESSAGES.EMBEDDING_CONTEXT) return;
|
|
89
|
+
const { data } = event;
|
|
90
|
+
const validation = validator(data.payload);
|
|
91
|
+
if (!validation.valid) {
|
|
92
|
+
logger$1().fatal("Incorrect embedding context payload", {
|
|
93
|
+
data,
|
|
94
|
+
error: validation.error
|
|
95
|
+
});
|
|
96
|
+
reject(new Error(validation.error));
|
|
97
|
+
teardown();
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
logger$1().info("Received embedding context message", data);
|
|
101
|
+
setContext(data.payload);
|
|
102
|
+
resolve(data.payload);
|
|
103
|
+
teardown();
|
|
104
|
+
}
|
|
105
|
+
window.addEventListener("message", onMessage, false);
|
|
106
|
+
logger$1().info("Awaiting to receive embedding context");
|
|
107
|
+
window.parent.postMessage({ type: MESSAGES.AWAITING_EMBEDDING_CONTEXT }, PARENT_ORIGIN);
|
|
108
|
+
return promise;
|
|
109
|
+
};
|
|
110
|
+
var sendEmbeddingFailureMessage = (error) => {
|
|
111
|
+
window.parent.postMessage({
|
|
112
|
+
type: MESSAGES.EMBEDDING_FAILED,
|
|
113
|
+
error
|
|
114
|
+
}, PARENT_ORIGIN);
|
|
115
|
+
};
|
|
116
|
+
var dispatchGenericEventToHost = (event) => {
|
|
117
|
+
logger$1().info("Sending GenericEvent", { event });
|
|
118
|
+
window.parent.postMessage({
|
|
119
|
+
type: MESSAGES.GENERIC_EVENT,
|
|
120
|
+
payload: event
|
|
121
|
+
}, PARENT_ORIGIN);
|
|
122
|
+
};
|
|
123
|
+
var notifyActivityChange = (userActivityInfo) => {
|
|
124
|
+
logger$1().info("Sending user activity info", { payload: userActivityInfo });
|
|
125
|
+
window.parent.postMessage({
|
|
126
|
+
type: MESSAGES.USER_ACTIVITY,
|
|
127
|
+
payload: userActivityInfo
|
|
128
|
+
}, PARENT_ORIGIN);
|
|
129
|
+
};
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/embeddingSDK/util.ts
|
|
132
|
+
var messageValidators = {
|
|
133
|
+
isInitializationMessage: (event) => [MESSAGES.AWAITING_EMBEDDING_CONTEXT, MESSAGES.EMBEDDING_FAILED].includes(event.data?.type),
|
|
134
|
+
isUserActivityMessage: (event) => MESSAGES.USER_ACTIVITY === event.data?.type,
|
|
135
|
+
isGenericEvent: (event) => event.data?.type === MESSAGES.GENERIC_EVENT
|
|
136
|
+
};
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region src/embeddingSDK/host.ts
|
|
139
|
+
var host_exports = /* @__PURE__ */ __exportAll({
|
|
140
|
+
init: () => init,
|
|
141
|
+
listenToActivityEvents: () => listenToActivityEvents,
|
|
142
|
+
sendEmbeddingContext: () => sendEmbeddingContext,
|
|
143
|
+
setupGenericEventHandlers: () => setupGenericEventHandlers
|
|
144
|
+
});
|
|
145
|
+
var logger = () => consola.withTag("Embedding SDK::HOST embedder");
|
|
146
|
+
/**
|
|
147
|
+
* This function acts as a handshake to make sure the event with the
|
|
148
|
+
* embedding context is only sent once the embedded application is ready to
|
|
149
|
+
* receive it and not earlier. It also listens to possible embedding failure
|
|
150
|
+
* from the child application
|
|
151
|
+
*/
|
|
152
|
+
var init = (callbacks) => {
|
|
153
|
+
let _initDone = false;
|
|
154
|
+
function onMessage(event) {
|
|
155
|
+
if (!messageValidators.isInitializationMessage(event)) return;
|
|
156
|
+
if (event.data?.type === MESSAGES.AWAITING_EMBEDDING_CONTEXT) {
|
|
157
|
+
if (_initDone) return;
|
|
158
|
+
logger().info("Got confirmation to send embedding context");
|
|
159
|
+
callbacks.onReady();
|
|
160
|
+
_initDone = true;
|
|
161
|
+
}
|
|
162
|
+
if (event.data?.type === MESSAGES.EMBEDDING_FAILED) {
|
|
163
|
+
logger().error("Received embedding failure message", { event: event.data });
|
|
164
|
+
callbacks.onError(event.data.error);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
window.addEventListener("message", onMessage);
|
|
168
|
+
logger().info("Initialization done");
|
|
169
|
+
};
|
|
170
|
+
var sendEmbeddingContext = (iframe, targetOrigin, context) => {
|
|
171
|
+
logger().info("Sending embedding context", context);
|
|
172
|
+
iframe.contentWindow?.postMessage({
|
|
173
|
+
type: MESSAGES.EMBEDDING_CONTEXT,
|
|
174
|
+
payload: {
|
|
175
|
+
url: context.wsConnectionUri,
|
|
176
|
+
...context
|
|
177
|
+
}
|
|
178
|
+
}, targetOrigin);
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Sets up a listener to receive user activity events to detect idleness
|
|
182
|
+
*/
|
|
183
|
+
var listenToActivityEvents = (callbacks) => {
|
|
184
|
+
const onMessage = (event) => {
|
|
185
|
+
if (!messageValidators.isUserActivityMessage(event)) return;
|
|
186
|
+
logger().info("Received user activity change event", { event: event.data });
|
|
187
|
+
callbacks.onActivity(event.data.payload);
|
|
188
|
+
};
|
|
189
|
+
window.addEventListener("message", onMessage);
|
|
190
|
+
logger().info("Attaching user activity listener");
|
|
191
|
+
return () => window.removeEventListener("message", onMessage);
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Sets up handlers for commands dispatched from the embedded guest application
|
|
195
|
+
*/
|
|
196
|
+
var setupGenericEventHandlers = (handlers) => {
|
|
197
|
+
const onMessage = (event) => {
|
|
198
|
+
if (!messageValidators.isGenericEvent(event)) return;
|
|
199
|
+
const genericEvent = event.data.payload;
|
|
200
|
+
logger().info("Received GenericEvent", { event: event.data });
|
|
201
|
+
if (Object.prototype.hasOwnProperty.call(handlers, genericEvent.kind) && typeof handlers[genericEvent.kind] === "function") {
|
|
202
|
+
logger().trace("Calling provided handler", { event: event.data });
|
|
203
|
+
handlers[genericEvent.kind]?.(genericEvent);
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
window.addEventListener("message", onMessage);
|
|
207
|
+
logger().info("Attaching listener for GenericEvents");
|
|
208
|
+
return () => window.removeEventListener("message", onMessage);
|
|
209
|
+
};
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/embeddingSDK/index.ts
|
|
212
|
+
var embeddingSDK = {
|
|
213
|
+
host: host_exports,
|
|
214
|
+
guest: guest_exports
|
|
215
|
+
};
|
|
216
|
+
//#endregion
|
|
217
|
+
export { embeddingSDK };
|
|
218
|
+
|
|
219
|
+
//# sourceMappingURL=embeddingSDK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeddingSDK.js","names":[],"sources":["../src/embeddingSDK/messages.ts","../src/embeddingSDK/guest.ts","../src/embeddingSDK/util.ts","../src/embeddingSDK/host.ts","../src/embeddingSDK/index.ts"],"sourcesContent":["/**\n * ----------- IMPORTANT NOTES ---------------\n * 1. These messages are considered API. So they **must** remain\n * backwards compatible\n * 2. Instead of removal of properties from the embedding context payload,\n * we must use deprecation notes that list which AP version last used the\n * deprecated property\n * 3. The message variable name can change, but not it's value. This is because\n * these values are used since AP browser embedding was first implemented, so\n * they must be retained in order to preserve backwars compatibility\n */\n\nexport const MESSAGES = {\n /**\n * Message used to establish a handshake and setup\n * before waiting for embedding context transfer\n */\n AWAITING_EMBEDDING_CONTEXT: \"KNIME_UI__AWAITING_CONNECTION_INFO\",\n /**\n * Message that contains the embedding context information\n */\n EMBEDDING_CONTEXT: \"KNIME_UI__CONNECTION_INFO\",\n /**\n * Message used for when embedding failed\n */\n EMBEDDING_FAILED: \"KNIME_UI__CONNECTION_FAIL\",\n /**\n * Message to report user activity events\n */\n USER_ACTIVITY: \"KNIME_UI__USER_ACTIVITY\",\n /**\n * General purpose event to transfer data between host application and embedded\n * application.\n */\n GENERIC_EVENT: \"KNIME_UI__GENERIC_EVENT\",\n} as const;\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport { promise as PromiseUtils } from \"@knime/utils\";\n\nimport { MESSAGES } from \"./messages\";\nimport {\n type EmbeddingContext,\n type GenericEvent,\n type UserActivityInfo,\n} from \"./types\";\n\nlet __embeddingContext: Readonly<EmbeddingContext>;\nconst logger = () => consola.withTag(\"Embedding SDK::GUEST application\");\n\n/**\n * Manually set the Embedding context. Use with caution as this should be done\n * automatically out-of-the-box. It's mostly exposed to be helpful for dev setups\n */\nexport const setContext = (value: EmbeddingContext) => {\n if (__embeddingContext) {\n logger().warn(\"Cannot set context, it is already set\");\n return;\n }\n\n __embeddingContext = Object.freeze(value);\n};\n\nexport const getContext = () => {\n if (!__embeddingContext) {\n logger().warn(\"Embedding:: Context was accessed before it was set.\");\n return undefined;\n }\n\n return __embeddingContext;\n};\n\n/**\n * Only relevant for tests\n */\nexport const clearContext = () => {\n if (import.meta.env.PROD) {\n return;\n }\n\n // @ts-expect-error should not be called in prod\n __embeddingContext = undefined;\n};\n\ntype EmbeddingContextValidator = (\n context: EmbeddingContext,\n) => { valid: true; error: null } | { valid: false; error: string };\nconst defaultvalidator: EmbeddingContextValidator = () => ({\n valid: true,\n error: null,\n});\n\nconst PARENT_ORIGIN = \"*\";\n\n/**\n * Wait for host application to send a message containing the embedding context\n */\nexport const waitForContext = (\n validator: EmbeddingContextValidator = defaultvalidator,\n): Promise<EmbeddingContext> => {\n const { promise, reject, resolve } =\n PromiseUtils.createUnwrappedPromise<EmbeddingContext>();\n\n function teardown() {\n window.removeEventListener(\"message\", onMessage);\n }\n\n function onMessage(event: MessageEvent) {\n if (event.data.type !== MESSAGES.EMBEDDING_CONTEXT) {\n return;\n }\n\n const { data } = event as MessageEvent<{\n type: string;\n payload: EmbeddingContext;\n }>;\n\n const validation = validator(data.payload);\n if (!validation.valid) {\n logger().fatal(\"Incorrect embedding context payload\", {\n data,\n error: validation.error,\n });\n reject(new Error(validation.error));\n teardown();\n return;\n }\n\n logger().info(\"Received embedding context message\", data);\n\n setContext(data.payload);\n resolve(data.payload);\n teardown();\n }\n\n window.addEventListener(\"message\", onMessage, false);\n\n // send message to parent after postmessage listener has been set-up\n logger().info(\"Awaiting to receive embedding context\");\n window.parent.postMessage(\n { type: MESSAGES.AWAITING_EMBEDDING_CONTEXT },\n PARENT_ORIGIN,\n );\n\n return promise;\n};\n\nexport const sendEmbeddingFailureMessage = (error: unknown) => {\n window.parent.postMessage(\n { type: MESSAGES.EMBEDDING_FAILED, error },\n PARENT_ORIGIN,\n );\n};\n\nexport const dispatchGenericEventToHost = (event: GenericEvent) => {\n logger().info(\"Sending GenericEvent\", { event });\n\n window.parent.postMessage(\n { type: MESSAGES.GENERIC_EVENT, payload: event },\n PARENT_ORIGIN,\n );\n};\n\nexport const notifyActivityChange = (userActivityInfo: UserActivityInfo) => {\n logger().info(\"Sending user activity info\", { payload: userActivityInfo });\n\n window.parent.postMessage(\n { type: MESSAGES.USER_ACTIVITY, payload: userActivityInfo },\n PARENT_ORIGIN,\n );\n};\n","import { MESSAGES } from \"./messages\";\nimport { type GenericEvent, type GenericEventByKind } from \"./types\";\n\nexport const messageValidators = {\n isInitializationMessage: (event: MessageEvent) =>\n [MESSAGES.AWAITING_EMBEDDING_CONTEXT, MESSAGES.EMBEDDING_FAILED].includes(\n event.data?.type,\n ),\n\n isUserActivityMessage: (event: MessageEvent) =>\n MESSAGES.USER_ACTIVITY === event.data?.type,\n\n isGenericEvent: <K extends GenericEvent[\"kind\"]>(\n event: MessageEvent,\n ): event is MessageEvent<{\n type: typeof MESSAGES.GENERIC_EVENT;\n payload: GenericEventByKind<K>;\n }> => event.data?.type === MESSAGES.GENERIC_EVENT,\n};\n","import { MESSAGES } from \"./messages\";\nimport {\n type EmbeddingContext,\n type GenericEvent,\n type GenericEventHandlers,\n type UserActivityInfo,\n} from \"./types\";\nimport { messageValidators } from \"./util\";\n\nconst logger = () => consola.withTag(\"Embedding SDK::HOST embedder\");\n\n/**\n * This function acts as a handshake to make sure the event with the\n * embedding context is only sent once the embedded application is ready to\n * receive it and not earlier. It also listens to possible embedding failure\n * from the child application\n */\nexport const init = (callbacks: {\n onReady: () => void;\n onError: (error: Error) => void;\n}) => {\n let _initDone = false;\n\n function onMessage(event: MessageEvent) {\n if (!messageValidators.isInitializationMessage(event)) {\n return;\n }\n\n if (event.data?.type === MESSAGES.AWAITING_EMBEDDING_CONTEXT) {\n if (_initDone) {\n return;\n }\n\n logger().info(\"Got confirmation to send embedding context\");\n callbacks.onReady();\n _initDone = true;\n }\n\n if (event.data?.type === MESSAGES.EMBEDDING_FAILED) {\n logger().error(\"Received embedding failure message\", {\n event: event.data,\n });\n callbacks.onError(event.data.error);\n }\n }\n\n window.addEventListener(\"message\", onMessage);\n logger().info(\"Initialization done\");\n};\n\nexport const sendEmbeddingContext = (\n iframe: HTMLIFrameElement,\n targetOrigin: string,\n context: EmbeddingContext,\n) => {\n logger().info(\"Sending embedding context\", context);\n\n iframe.contentWindow?.postMessage(\n {\n type: MESSAGES.EMBEDDING_CONTEXT,\n payload: {\n // AP uses `url` instead of `wsConnectionUri` in older versions, so it needs\n // to be present to preserve backwards compatibility\n url: context.wsConnectionUri,\n\n ...context,\n } satisfies EmbeddingContext,\n },\n targetOrigin,\n );\n};\n\n/**\n * Sets up a listener to receive user activity events to detect idleness\n */\nexport const listenToActivityEvents = (callbacks: {\n onActivity: (event: UserActivityInfo) => void;\n}) => {\n const onMessage = (event: MessageEvent) => {\n if (!messageValidators.isUserActivityMessage(event)) {\n return;\n }\n\n logger().info(\"Received user activity change event\", {\n event: event.data,\n });\n callbacks.onActivity(event.data.payload);\n };\n\n window.addEventListener(\"message\", onMessage);\n logger().info(\"Attaching user activity listener\");\n\n return () => window.removeEventListener(\"message\", onMessage);\n};\n\n/**\n * Sets up handlers for commands dispatched from the embedded guest application\n */\nexport const setupGenericEventHandlers = <K extends GenericEvent[\"kind\"]>(\n handlers: GenericEventHandlers,\n) => {\n const onMessage = (event: MessageEvent) => {\n if (!messageValidators.isGenericEvent<K>(event)) {\n return;\n }\n\n const genericEvent = event.data.payload;\n logger().info(\"Received GenericEvent\", { event: event.data });\n\n const isCallable =\n Object.prototype.hasOwnProperty.call(handlers, genericEvent.kind) &&\n typeof handlers[genericEvent.kind] === \"function\";\n\n if (isCallable) {\n logger().trace(\"Calling provided handler\", { event: event.data });\n handlers[genericEvent.kind]?.(genericEvent);\n }\n };\n\n window.addEventListener(\"message\", onMessage);\n logger().info(\"Attaching listener for GenericEvents\");\n\n return () => window.removeEventListener(\"message\", onMessage);\n};\n","import * as guest from \"./guest\";\nimport * as host from \"./host\";\n\nexport const embeddingSDK = { host, guest };\nexport * from \"./types\";\n"],"mappings":";;;;;;;;;;;;;;AAYA,IAAa,WAAW;;;;;CAKtB,4BAA4B;;;;CAI5B,mBAAmB;;;;CAInB,kBAAkB;;;;CAIlB,eAAe;;;;;CAKf,eAAe;AACjB;;;;;;;;;;;;ACzBA,IAAI;AACJ,IAAM,iBAAe,QAAQ,QAAQ,kCAAkC;;;;;AAMvE,IAAa,cAAc,UAA4B;CACrD,IAAI,oBAAoB;EACtB,SAAO,CAAC,CAAC,KAAK,uCAAuC;EACrD;CACF;CAEA,qBAAqB,OAAO,OAAO,KAAK;AAC1C;AAEA,IAAa,mBAAmB;CAC9B,IAAI,CAAC,oBAAoB;EACvB,SAAO,CAAC,CAAC,KAAK,qDAAqD;EACnE;CACF;CAEA,OAAO;AACT;;;;AAKA,IAAa,qBAAqB,CAOlC;AAKA,IAAM,0BAAqD;CACzD,OAAO;CACP,OAAO;AACT;AAEA,IAAM,gBAAgB;;;;AAKtB,IAAa,kBACX,YAAuC,qBACT;CAC9B,MAAM,EA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AC5C;EAGF,MAAM,eAAe,MAAM,KAAK;EAChC,OAAO,CAAC,CAAC,KAAK,yBAAyB,EAAE,OAAO,MAAM,KAAK,CAAC;EAM5D,IAHE,OAAO,UAAU,eAAe,KAAK,UAAU,aAAa,IAAI,KAChE,OAAO,SAAS,aAAa,UAAU,YAEzB;GACd,OAAO,CAAC,CAAC,MAAM,4BAA4B,EAAE,OAAO,MAAM,KAAK,CAAC;GAChE,SAAS,aAAa,KAAK,GAAG,YAAY;EAC5C;CACF;CAEA,OAAO,iBAAiB,WAAW,SAAS;CAC5C,OAAO,CAAC,CAAC,KAAK,sCAAsC;CAEpD,aAAa,OAAO,oBAAoB,WAAW,SAAS;AAC9D;;;ACxHA,IAAa,eAAe;CAAE,MAAA;CAAM,OAAA;AAAM"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll as t };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AnalyticsEventSender, DefaultContext, Metadata } from './types';
|
|
2
|
+
import * as cloudHomeFunctions from "./schema/cloudhome-event-functions";
|
|
3
|
+
import * as editorFunctions from "./schema/editor-event-functions";
|
|
4
|
+
/**
|
|
5
|
+
* Unwraps the inner function imported from the generated functions.
|
|
6
|
+
* With this supply the context here and just expose the inner function
|
|
7
|
+
* but also ensure we keep the same names and type constraints
|
|
8
|
+
*/
|
|
9
|
+
type UnwrapFunction<T> = T extends (ctx: DefaultContext) => infer R ? R extends (...args: infer P) => infer Q ? (...args: P) => Q : never : never;
|
|
10
|
+
type EditorFunctionMap = typeof editorFunctions;
|
|
11
|
+
type CloudHomeFunctionMap = typeof cloudHomeFunctions;
|
|
12
|
+
type EditorBuilderFunctions = {
|
|
13
|
+
[K in keyof EditorFunctionMap]: UnwrapFunction<EditorFunctionMap[K]>;
|
|
14
|
+
};
|
|
15
|
+
type CloudHomeBuilderFunctions = {
|
|
16
|
+
[K in keyof CloudHomeFunctionMap]: UnwrapFunction<CloudHomeFunctionMap[K]>;
|
|
17
|
+
};
|
|
18
|
+
type EditorSenderFunctions = {
|
|
19
|
+
[K in keyof EditorBuilderFunctions]: (...args: Parameters<EditorBuilderFunctions[K]>) => void;
|
|
20
|
+
};
|
|
21
|
+
type CloudHomeSenderFunctions = {
|
|
22
|
+
[K in keyof CloudHomeBuilderFunctions]: (...args: Parameters<CloudHomeBuilderFunctions[K]>) => void;
|
|
23
|
+
};
|
|
24
|
+
type SenderFunctions<T extends DefaultContext> = T["eventSource"] extends "editor" ? EditorSenderFunctions : CloudHomeSenderFunctions;
|
|
25
|
+
export declare const analyticsEvents: Readonly<{
|
|
26
|
+
METADATA: Metadata;
|
|
27
|
+
/**
|
|
28
|
+
* Initialize the analytic event tracker
|
|
29
|
+
*/
|
|
30
|
+
init: <T extends DefaultContext>(params: {
|
|
31
|
+
/**
|
|
32
|
+
* Context for the initialized tracker. This will remain unchanged throughout the lifecycle
|
|
33
|
+
* of this tracker
|
|
34
|
+
*/
|
|
35
|
+
context: T;
|
|
36
|
+
/**
|
|
37
|
+
* Sender interface; will be used to determine how to handle each event when its
|
|
38
|
+
* corresponding track function is invoked
|
|
39
|
+
*/
|
|
40
|
+
sender: AnalyticsEventSender;
|
|
41
|
+
}) => SenderFunctions<T>;
|
|
42
|
+
}>;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../../src/analytics/analytics.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O,MAAM,eAAe;;IAE1B;;OAEG;WACI,CAAC,SAAS,cAAc,UAAU;QACvC;;;WAGG;QACH,OAAO,EAAE,CAAC,CAAC;QACX;;;WAGG;QACH,MAAM,EAAE,oBAAoB,CAAC;KAC9B;EAyBD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/analytics/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { AnalyticsEvent, DefaultContext, EventFunctionArgs } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Fired when the user clicks Run from the deployments page
|
|
4
|
+
*/
|
|
5
|
+
export declare const adHocExecutionStartedDeploymentsPage: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
6
|
+
/**
|
|
7
|
+
* Fired when the user clicks Run in the ad hoc execution panel
|
|
8
|
+
*/
|
|
9
|
+
export declare const adHocExecutionStartedExecutionPanel: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
10
|
+
/**
|
|
11
|
+
* Fired when the user clicks Run from the workflow page deployments table
|
|
12
|
+
*/
|
|
13
|
+
export declare const adHocExecutionStartedWorkflowPageDeploymentsTable: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
14
|
+
/**
|
|
15
|
+
* Fired when the user clicks the Create button in the version creation side panel on the component details page
|
|
16
|
+
*/
|
|
17
|
+
export declare const versionCreatedFromComponentDetails: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
18
|
+
/**
|
|
19
|
+
* Fired when the user clicks the Create button in the version creation side panel on the workflow details page
|
|
20
|
+
*/
|
|
21
|
+
export declare const versionCreatedFromWorkflowDetails: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
22
|
+
/**
|
|
23
|
+
* Fired when the user creates a new secret by clicking Create in the side panel on the team secrets page
|
|
24
|
+
*/
|
|
25
|
+
export declare const secretCreatedTeamSecrets: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
26
|
+
/**
|
|
27
|
+
* Fired when the user creates a new secret by clicking Create in the side panel on the personal secrets page
|
|
28
|
+
*/
|
|
29
|
+
export declare const secretCreatedPersonalSecrets: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
30
|
+
/**
|
|
31
|
+
* Fired when the user clicks the Create button in the deployment creation side panel on the workflow details page
|
|
32
|
+
*/
|
|
33
|
+
export declare const deploymentCreatedFromWorkflowDetails: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"deploymentCreatedFromWorkflowDetails">) => AnalyticsEvent;
|
|
34
|
+
/**
|
|
35
|
+
* Fired when the user shares a deployment via the access management side panel on the deployments page
|
|
36
|
+
*/
|
|
37
|
+
export declare const deploymentSharedDeploymentsAccessPanel: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"deploymentSharedDeploymentsAccessPanel">) => AnalyticsEvent;
|
|
38
|
+
/**
|
|
39
|
+
* Fired when the user shares a deployment via the sharing popup on the deployments page
|
|
40
|
+
*/
|
|
41
|
+
export declare const deploymentSharedDeploymentsSharingPopup: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"deploymentSharedDeploymentsSharingPopup">) => AnalyticsEvent;
|
|
42
|
+
/**
|
|
43
|
+
* Fired when the user shares a deployment via the access management side panel on the workflow page
|
|
44
|
+
*/
|
|
45
|
+
export declare const deploymentSharedWorkflowAccessPanel: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"deploymentSharedWorkflowAccessPanel">) => AnalyticsEvent;
|
|
46
|
+
/**
|
|
47
|
+
* Fired when the user shares a deployment via the sharing popup on the workflow page
|
|
48
|
+
*/
|
|
49
|
+
export declare const deploymentSharedWorkflowSharingPopup: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"deploymentSharedWorkflowSharingPopup">) => AnalyticsEvent;
|
|
50
|
+
/**
|
|
51
|
+
* Fired when the user uploads items via the upload button in the main area on the space page
|
|
52
|
+
*/
|
|
53
|
+
export declare const objectUploadedFromSpacePage: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"objectUploadedFromSpacePage">) => AnalyticsEvent;
|
|
54
|
+
/**
|
|
55
|
+
* Fired when the user invites a team member on the spaces page, via: Manage team members toolbar button -> Manage members side panel -> Add members popup
|
|
56
|
+
*/
|
|
57
|
+
export declare const teamMemberInvitedFromManageTeamMembersPanel: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"teamMemberInvitedFromManageTeamMembersPanel">) => AnalyticsEvent;
|
|
58
|
+
/**
|
|
59
|
+
* Fired when the user invites a team member on the spaces page, via: space card -> Share space context menu item -> Share space popup
|
|
60
|
+
*/
|
|
61
|
+
export declare const teamMemberInvitedFromSpaceCardShareSpacePopup: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"teamMemberInvitedFromSpaceCardShareSpacePopup">) => AnalyticsEvent;
|
|
62
|
+
/**
|
|
63
|
+
* Fired when the user invites a team member on the spaces page, via: space card -> Manage access context menu item -> Manage space access side panel -> Share space popup
|
|
64
|
+
*/
|
|
65
|
+
export declare const teamMemberInvitedFromSpaceCardManageAccessPanel: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"teamMemberInvitedFromSpaceCardManageAccessPanel">) => AnalyticsEvent;
|
|
66
|
+
/**
|
|
67
|
+
* Fired when the user invites a team member on the space page, via: Share space toolbar button -> Share space popup
|
|
68
|
+
*/
|
|
69
|
+
export declare const teamMemberInvitedFromSpacePageShareSpacePopup: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"teamMemberInvitedFromSpacePageShareSpacePopup">) => AnalyticsEvent;
|
|
70
|
+
/**
|
|
71
|
+
* Fired when the user invites a team member on the space page, via: Manage access toolbar button -> Manage space access side panel -> Share space popup
|
|
72
|
+
*/
|
|
73
|
+
export declare const teamMemberInvitedFromSpacePageManageAccessPanel: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"teamMemberInvitedFromSpacePageManageAccessPanel">) => AnalyticsEvent;
|
|
74
|
+
/**
|
|
75
|
+
* Fired when the user invites a team member on the secrets page, via: secrets table -> Share context menu item -> Share secret popup
|
|
76
|
+
*/
|
|
77
|
+
export declare const teamMemberInvitedFromSecretsPageShareSecretPopup: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"teamMemberInvitedFromSecretsPageShareSecretPopup">) => AnalyticsEvent;
|
|
78
|
+
/**
|
|
79
|
+
* Fired when the user invites a team member on the space page, via: secrets table -> Manage access context menu item -> Manage secret access side panel -> Share secret popup
|
|
80
|
+
*/
|
|
81
|
+
export declare const teamMemberInvitedFromSecretsPageManageAccessPanel: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"teamMemberInvitedFromSecretsPageManageAccessPanel">) => AnalyticsEvent;
|
|
82
|
+
//# sourceMappingURL=cloudhome-event-functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudhome-event-functions.d.ts","sourceRoot":"","sources":["../../../../src/analytics/schema/cloudhome-event-functions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAA6C,MAAM,UAAU,CAAC;AAG7H;;GAEG;AACH,eAAO,MAAM,oCAAoC,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,WAAS,cAmB7F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mCAAmC,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,WAAS,cAmB5F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iDAAiD,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,WAAS,cAmB1G,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kCAAkC,GAAI,CAAC,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AM,2CAA2C,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,MAAM,WAAW,iBAAiB,CAAC,6CAA6C,CAAC,KAAG,cAmB/K,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6CAA6C,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,MAAM,WAAW,iBAAiB,CAAC,+CAA+C,CAAC,KAAG,cAmBnL,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+CAA+C,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,MAAM,WAAW,iBAAiB,CAAC,iDAAiD,CAAC,KAAG,cAmBvL,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6CAA6C,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,MAAM,WAAW,iBAAiB,CAAC,+CAA+C,CAAC,KAAG,cAmBnL,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+CAA+C,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,MAAM,WAAW,iBAAiB,CAAC,iDAAiD,CAAC,KAAG,cAmBvL,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gDAAgD,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,MAAM,WAAW,iBAAiB,CAAC,kDAAkD,CAAC,KAAG,cAmBzL,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iDAAiD,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,MAAM,WAAW,iBAAiB,CAAC,mDAAmD,CAAC,KAAG,cAmB3L,CAAC"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { AnalyticsEvent, DefaultContext, EventFunctionArgs } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* This is KAI Prompted QA
|
|
4
|
+
*/
|
|
5
|
+
export declare const kaiPromptedQA: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
6
|
+
export declare const kaiPromptedBuild: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
7
|
+
export declare const kaiPromptedQuickBuild: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"kaiPromptedQuickBuild">) => AnalyticsEvent;
|
|
8
|
+
/**
|
|
9
|
+
* This is the sessions started
|
|
10
|
+
*/
|
|
11
|
+
export declare const sessionStarted: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
12
|
+
export declare const layoutEditorOpenedCtxMenu: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
13
|
+
export declare const layoutEditorOpenedKeyboard: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
14
|
+
export declare const layoutEditorOpenedToolbar: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
15
|
+
export declare const annotationCreatedCtxMenu: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
16
|
+
export declare const annotationCreatedKaiExplain: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
17
|
+
export declare const workflowSavedToolbar: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"workflowSavedToolbar">) => AnalyticsEvent;
|
|
18
|
+
export declare const workflowSavedKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"workflowSavedKeyboard">) => AnalyticsEvent;
|
|
19
|
+
export declare const connectionCreatedPortDragDrop: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"connectionCreatedPortDragDrop">) => AnalyticsEvent;
|
|
20
|
+
export declare const connectionCreatedKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"connectionCreatedKeyboard">) => AnalyticsEvent;
|
|
21
|
+
export declare const connectionCreatedCtxMenu: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"connectionCreatedCtxMenu">) => AnalyticsEvent;
|
|
22
|
+
export declare const nodeCreatedNodeRepoDragDrop: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedNodeRepoDragDrop">) => AnalyticsEvent;
|
|
23
|
+
export declare const nodeCreatedNodeRepoDoubleClick: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedNodeRepoDoubleClick">) => AnalyticsEvent;
|
|
24
|
+
export declare const nodeCreatedNodeRepoKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedNodeRepoKeyboard">) => AnalyticsEvent;
|
|
25
|
+
export declare const nodeCreatedExplorerDragDrop: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedExplorerDragDrop">) => AnalyticsEvent;
|
|
26
|
+
export declare const nodeCreatedQamClick: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedQamClick">) => AnalyticsEvent;
|
|
27
|
+
export declare const nodeCreatedQamKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedQamKeyboard">) => AnalyticsEvent;
|
|
28
|
+
export declare const nodeCreatedKaiQaDragDrop: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedKaiQaDragDrop">) => AnalyticsEvent;
|
|
29
|
+
export declare const nodeCreatedKaiQaKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedKaiQaKeyboard">) => AnalyticsEvent;
|
|
30
|
+
export declare const qamOpenedPortDragDrop: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"qamOpenedPortDragDrop">) => AnalyticsEvent;
|
|
31
|
+
export declare const qamOpenedCanvasDoubleClick: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
32
|
+
export declare const qamOpenedKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"qamOpenedKeyboard">) => AnalyticsEvent;
|
|
33
|
+
export declare const qamOpenedCtxMenu: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
34
|
+
export declare const nodeSearchedNodeRepo: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeSearchedNodeRepo">) => AnalyticsEvent;
|
|
35
|
+
export declare const nodeSearchedQam: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeSearchedQam">) => AnalyticsEvent;
|
|
36
|
+
export declare const workflowInfoOpened: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
37
|
+
export declare const nodeRepositoryOpened: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
38
|
+
export declare const spaceExplorerOpened: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
39
|
+
export declare const kaiOpened: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
40
|
+
export declare const workflowMonitorOpened: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
41
|
+
export declare const versionHistoryOpened: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
42
|
+
export declare const actionUndoneToolbar: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
43
|
+
export declare const actionUndoneKeyboard: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
44
|
+
export declare const actionRedoneToolbar: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
45
|
+
export declare const actionRedoneKeyboard: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
46
|
+
export declare const versionCreated: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
47
|
+
export declare const sessionEnded: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"sessionEnded">) => AnalyticsEvent;
|
|
48
|
+
export declare const sessionInterrupted: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
49
|
+
export declare const sessionResumed: <T extends DefaultContext>(ctx: T) => () => AnalyticsEvent;
|
|
50
|
+
export declare const containerNodeCreatedCtxMenu: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"containerNodeCreatedCtxMenu">) => AnalyticsEvent;
|
|
51
|
+
export declare const containerNodeCreatedKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"containerNodeCreatedKeyboard">) => AnalyticsEvent;
|
|
52
|
+
export declare const hintShown: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"hintShown">) => AnalyticsEvent;
|
|
53
|
+
/**
|
|
54
|
+
* Fired when the empty state indicating a port has no view becomes visible - helps prioritize which missing port views should be migrated next by comparing how often they are being viewed
|
|
55
|
+
*/
|
|
56
|
+
export declare const outdatedPortViewShown: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"outdatedPortViewShown">) => AnalyticsEvent;
|
|
57
|
+
export declare const hintClosed: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"hintClosed">) => AnalyticsEvent;
|
|
58
|
+
/**
|
|
59
|
+
* Fired when the user clicks Apply and Execute in the node configuration panel
|
|
60
|
+
*/
|
|
61
|
+
export declare const applyAndExecuteNodeConfig: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"applyAndExecuteNodeConfig">) => AnalyticsEvent;
|
|
62
|
+
/**
|
|
63
|
+
* Fired when the user triggers Apply and Execute in the node configuration panel via keyboard shortcut
|
|
64
|
+
*/
|
|
65
|
+
export declare const applyAndExecuteNodeConfigKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"applyAndExecuteNodeConfigKeyboard">) => AnalyticsEvent;
|
|
66
|
+
/**
|
|
67
|
+
* Fired when the user clicks Execute in the node configuration panel
|
|
68
|
+
*/
|
|
69
|
+
export declare const executeNodeConfig: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"executeNodeConfig">) => AnalyticsEvent;
|
|
70
|
+
export declare const configurationCompletedApply: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"configurationCompletedApply">) => AnalyticsEvent;
|
|
71
|
+
export declare const configurationCompletedAutoApply: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"configurationCompletedAutoApply">) => AnalyticsEvent;
|
|
72
|
+
export declare const containerNodeEnteredCanvasDoubleClick: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"containerNodeEnteredCanvasDoubleClick">) => AnalyticsEvent;
|
|
73
|
+
export declare const containerNodeEnteredKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"containerNodeEnteredKeyboard">) => AnalyticsEvent;
|
|
74
|
+
export declare const containerNodeEnteredCtxMenu: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"containerNodeEnteredCtxMenu">) => AnalyticsEvent;
|
|
75
|
+
export declare const containerNodeExitedKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"containerNodeExitedKeyboard">) => AnalyticsEvent;
|
|
76
|
+
export declare const containerNodeExitedToolbar: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"containerNodeExitedToolbar">) => AnalyticsEvent;
|
|
77
|
+
export declare const nodeCreatedCanvasDragDropFile: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedCanvasDragDropFile">) => AnalyticsEvent;
|
|
78
|
+
export declare const nodeCreatedFloatingToolsAddByFile: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeCreatedFloatingToolsAddByFile">) => AnalyticsEvent;
|
|
79
|
+
/**
|
|
80
|
+
* Fired when the user submits feedback for a node
|
|
81
|
+
*/
|
|
82
|
+
export declare const nodeConfigFeedbackSubmitted: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeConfigFeedbackSubmitted">) => AnalyticsEvent;
|
|
83
|
+
/**
|
|
84
|
+
* Fired when the user requests the migration of a node's auto-generated dialog to a modern dialog
|
|
85
|
+
*/
|
|
86
|
+
export declare const nodeMigrationRequested: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"nodeMigrationRequested">) => AnalyticsEvent;
|
|
87
|
+
/**
|
|
88
|
+
* Fired when the user executes all nodes via the context menu
|
|
89
|
+
*/
|
|
90
|
+
export declare const executeAllNodesCtxMenu: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"executeAllNodesCtxMenu">) => AnalyticsEvent;
|
|
91
|
+
/**
|
|
92
|
+
* Fired when the user executes all nodes via the keyboard shortcut
|
|
93
|
+
*/
|
|
94
|
+
export declare const executeAllNodesKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"executeAllNodesKeyboard">) => AnalyticsEvent;
|
|
95
|
+
/**
|
|
96
|
+
* Fired when the user executes all nodes via the workflow toolbar
|
|
97
|
+
*/
|
|
98
|
+
export declare const executeAllNodesToolbar: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"executeAllNodesToolbar">) => AnalyticsEvent;
|
|
99
|
+
/**
|
|
100
|
+
* Fired when the user executes a selection of nodes via the context menu
|
|
101
|
+
*/
|
|
102
|
+
export declare const executeSelectedNodesCtxMenu: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"executeSelectedNodesCtxMenu">) => AnalyticsEvent;
|
|
103
|
+
/**
|
|
104
|
+
* Fired when the user executes a selection of nodes via the keyboard shortcut
|
|
105
|
+
*/
|
|
106
|
+
export declare const executeSelectedNodesKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"executeSelectedNodesKeyboard">) => AnalyticsEvent;
|
|
107
|
+
/**
|
|
108
|
+
* Fired when the user executes a selection of nodes via the workflow toolbar
|
|
109
|
+
*/
|
|
110
|
+
export declare const executeSelectedNodesToolbar: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"executeSelectedNodesToolbar">) => AnalyticsEvent;
|
|
111
|
+
/**
|
|
112
|
+
* Fired when the user executes a single node via the node action bar
|
|
113
|
+
*/
|
|
114
|
+
export declare const executeNodeActionBar: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"executeNodeActionBar">) => AnalyticsEvent;
|
|
115
|
+
/**
|
|
116
|
+
* Fired when the user executes a single node via the workflow monitor
|
|
117
|
+
*/
|
|
118
|
+
export declare const executeNodeFromMonitor: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"executeNodeFromMonitor">) => AnalyticsEvent;
|
|
119
|
+
/**
|
|
120
|
+
* Fired when the user resumes loop execution via the keyboard shortcut
|
|
121
|
+
*/
|
|
122
|
+
export declare const resumeLoopExecutionKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"resumeLoopExecutionKeyboard">) => AnalyticsEvent;
|
|
123
|
+
/**
|
|
124
|
+
* Fired when the user resumes loop execution via the node action bar
|
|
125
|
+
*/
|
|
126
|
+
export declare const resumeLoopExecutionActionBar: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"resumeLoopExecutionActionBar">) => AnalyticsEvent;
|
|
127
|
+
/**
|
|
128
|
+
* Fired when the user steps through loop execution via the keyboard shortcut
|
|
129
|
+
*/
|
|
130
|
+
export declare const stepLoopExecutionKeyboard: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"stepLoopExecutionKeyboard">) => AnalyticsEvent;
|
|
131
|
+
/**
|
|
132
|
+
* Fired when the user steps through loop execution via the node action bar
|
|
133
|
+
*/
|
|
134
|
+
export declare const stepLoopExecutionActionBar: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"stepLoopExecutionActionBar">) => AnalyticsEvent;
|
|
135
|
+
/**
|
|
136
|
+
* Fired when the user resumes loop execution via the context menu
|
|
137
|
+
*/
|
|
138
|
+
export declare const resumeLoopExecutionCtxMenu: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"resumeLoopExecutionCtxMenu">) => AnalyticsEvent;
|
|
139
|
+
/**
|
|
140
|
+
* Fired when the user steps through loop execution via the context menu
|
|
141
|
+
*/
|
|
142
|
+
export declare const stepLoopExecutionCtxMenu: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"stepLoopExecutionCtxMenu">) => AnalyticsEvent;
|
|
143
|
+
/**
|
|
144
|
+
* Fired when the user uploads items via the upload button in the space explorer
|
|
145
|
+
*/
|
|
146
|
+
export declare const objectUploaded: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"objectUploaded">) => AnalyticsEvent;
|
|
147
|
+
/**
|
|
148
|
+
* Fired when the user uploads items by dropping a file on the canvas
|
|
149
|
+
*/
|
|
150
|
+
export declare const objectUploadedCanvasDragDropFile: <T extends DefaultContext>(ctx: T) => (eventData: EventFunctionArgs<"objectUploadedCanvasDragDropFile">) => AnalyticsEvent;
|
|
151
|
+
//# sourceMappingURL=editor-event-functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-event-functions.d.ts","sourceRoot":"","sources":["../../../../src/analytics/schema/editor-event-functions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAA6C,MAAM,UAAU,CAAC;AAG7H;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,WAAS,cAkBtE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,WAAS,cAkBzE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,MAAM,WAAW,iBAAiB,CAAC,uBAAuB,CAAC,KAAG,cAkBnI,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,WAAS,cAkBvE,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,WAAS,cAkBlF,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,cAAc,EAAE,KAAK,CAAC,WAAS,cAkBnF,CAAC;AAEF,eAAO,MAAM,yBAAyB,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,cAAc,EAAE,KAAK,CAAC,MAAM,WAAW,iBAAiB,CAAC,kCAAkC,CAAC,KAAG,cAkBzJ,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AnalyticsEventSchema } from './schema/schema';
|
|
2
|
+
export type DefaultContext = {
|
|
3
|
+
eventSource: "cloudhome" | "editor";
|
|
4
|
+
} & Record<string, string | boolean | number>;
|
|
5
|
+
export type Metadata = Omit<AnalyticsEventSchema, "events">;
|
|
6
|
+
type NewEvents = AnalyticsEventSchema["events"];
|
|
7
|
+
type EventNames = keyof NewEvents;
|
|
8
|
+
/**
|
|
9
|
+
* These are fields that are present on every event, but their values are generated at runtime
|
|
10
|
+
*/
|
|
11
|
+
export type GeneratedStaticFields = {
|
|
12
|
+
unique_event_id: string;
|
|
13
|
+
timestamp: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* These are fields that are present on every event, but their values are statically set for each
|
|
17
|
+
* event in the schema file
|
|
18
|
+
*/
|
|
19
|
+
export type SchemaStaticFields = Omit<NewEvents[EventNames], "payload">;
|
|
20
|
+
export type AnalyticsEvent = {
|
|
21
|
+
id: string;
|
|
22
|
+
data: SchemaStaticFields & {
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type AnalyticsEventSender = {
|
|
27
|
+
/**
|
|
28
|
+
* Function to send the event according to the API the adapter is implementing
|
|
29
|
+
*/
|
|
30
|
+
send: (params: {
|
|
31
|
+
event: AnalyticsEvent;
|
|
32
|
+
metadata: Metadata;
|
|
33
|
+
}) => void;
|
|
34
|
+
};
|
|
35
|
+
export type EventFunctionArgs<T extends EventNames> = NewEvents[T]["payload"] extends null ? never : NewEvents[T]["payload"];
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/analytics/types.ts"],"names":[],"m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