commandbar 1.13.0 → 1.13.1
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/build/commandbar/src/shared/services/analytics/EventHandler.d.ts +2 -0
- package/build/commandbar-js/src/index.js +1 -1
- package/build/commandbar-js/src/init.d.ts +10 -1
- package/build/internal/src/client/CommandBarClientSDK.d.ts +4 -0
- package/build/internal/src/client/CommandBarProxySDK.d.ts +2 -3
- package/build/internal/src/client/SDKConfig.d.ts +1 -0
- package/build/internal/src/client/symbols.d.ts +2 -0
- package/build/internal/src/middleware/CommandFromClientV.d.ts +4 -0
- package/build/internal/src/middleware/OrganizationV.d.ts +56 -8
- package/build/internal/src/middleware/additionalResource.d.ts +200 -137
- package/build/internal/src/middleware/api.d.ts +7 -7
- package/build/internal/src/middleware/chat.d.ts +22868 -11601
- package/build/internal/src/middleware/checklist.d.ts +209 -139
- package/build/internal/src/middleware/command.d.ts +2547 -2170
- package/build/internal/src/middleware/endUser.d.ts +0 -32
- package/build/internal/src/middleware/experienceTemplate.d.ts +399 -263
- package/build/internal/src/middleware/experiencesSearch.d.ts +816 -718
- package/build/internal/src/middleware/flags.d.ts +6 -3
- package/build/internal/src/middleware/helpDocsSearch.d.ts +584 -514
- package/build/internal/src/middleware/helpers/actions.d.ts +66 -28
- package/build/internal/src/middleware/helpers/commandTemplate.d.ts +18 -4
- package/build/internal/src/middleware/helpers/rules.d.ts +19 -4
- package/build/internal/src/middleware/nudge.d.ts +482 -281
- package/build/internal/src/middleware/organization.d.ts +825 -670
- package/build/internal/src/middleware/organizationSettings.d.ts +210 -130
- package/build/internal/src/middleware/profile.d.ts +1 -1
- package/build/internal/src/middleware/recommendationSet.d.ts +200 -137
- package/build/internal/src/middleware/theme.d.ts +7 -0
- package/build/internal/src/middleware/types.d.ts +16 -20
- package/package.json +1 -1
- package/src/init.ts +13 -2
- package/build/commandbar/src/shared/services/analytics/event-queue.d.ts +0 -13
- package/build/commandbar/src/shared/services/analytics/v2/client.d.ts +0 -53
- package/build/commandbar/src/shared/services/analytics/v2/helpers.d.ts +0 -6
- package/build/commandbar/src/shared/services/analytics/v2/schema.d.ts +0 -152
- package/build/commandbar/src/shared/services/analytics/v2/types.d.ts +0 -4
- package/build/internal/src/client/CommandBarSDK.d.ts +0 -99
- package/build/internal/src/client/globals.d.ts +0 -27
- package/build/internal/src/util/dispatchCustomEvent.d.ts +0 -14
- package/build/internal/src/util/sentry.d.ts +0 -23
@@ -1,11 +1,10 @@
|
|
1
|
-
/*******************************************************************************/
|
2
1
|
import * as t from 'io-ts';
|
3
2
|
import { BatchEditorCommandResponseV, BatchOperationV, CommandV, EditorCommandV, EditorCommandLiteV, CommandLiteV, ContentTypeV } from './command';
|
4
3
|
import { ArgumentMapV, ArgumentTypeV, ConditionV, ConditionOperatorV, StepArgumentTypeV, ContextArgumentV, SetArgumentV, DynamicArgumentV } from './helpers/argument';
|
5
4
|
import { GenericBatchRequest } from './generics';
|
6
5
|
import { OptionGroupRenderAsV } from './helpers/optionGroup';
|
7
6
|
import { TemplateV, TemplateOptionsV, RequestTemplateV, VideoTemplateV } from './helpers/commandTemplate';
|
8
|
-
import { ActionV, CommandActionV, LabeledActionV, OpenChatActionV, NudgeActionV, QuestlistActionV, RequestV, OpenChatActionTypeV, CommandActionMetaTypeV } from './helpers/actions';
|
7
|
+
import { ActionV, CommandActionV, LabeledActionV, OpenChatActionV, NudgeActionV, QuestlistActionV, RequestV, OpenChatActionTypeV, CommandActionMetaTypeV, ChatHandoffActionV, ChatHandoffActionTypeV } from './helpers/actions';
|
9
8
|
import { CommandCategoryV } from './commandCategory';
|
10
9
|
import { OrganizationStatusV, KeyEventV, RecordSettingsByContextKeyV, InternalSettingsV, OrganizationV } from './organization';
|
11
10
|
import { OrganizationSettingsV } from './organizationSettings';
|
@@ -31,7 +30,7 @@ import { AudienceV } from './helpers/audience';
|
|
31
30
|
import { AdditionalResourceV } from './additionalResource';
|
32
31
|
import { RecommendationSetV } from './recommendationSet';
|
33
32
|
import { BillingProfileV, UsageV } from './billing';
|
34
|
-
import { UserMessageV, AIMessageV, AIMessageExtraV, MessageV, AIAnswerPayloadV, AIAnswerV, ContinuationsPayloadV, ContinuationV, CreateAnswerFeedbackPayloadV, QuestionSuggestionsPayloadV, QuestionSuggestionsV, ExperienceV, CreateChatPayloadV, ChatV, CopilotSettingsPreviewV, HandoffPayloadV, ExternalChatPayloadV, ExternalChatHistoryV, UserAttachmentV } from './chat';
|
33
|
+
import { UserMessageV, AIMessageV, AIMessageExtraV, MessageV, AIAnswerPayloadV, AIAnswerV, ContinuationsPayloadV, ContinuationV, CreateAnswerFeedbackPayloadV, QuestionSuggestionsPayloadV, QuestionSuggestionsV, ExperienceV, CreateChatPayloadV, ChatV, CopilotSettingsPreviewV, HandoffPayloadV, ExternalChatPayloadV, ExternalChatHistoryV, ChatOwnershipV, UserAttachmentV, SourceDocV } from './chat';
|
35
34
|
import { HelpDocHitV, SearchHelpDocsPayloadV, SearchHelpDocsResponseV } from './helpDocsSearch';
|
36
35
|
import { ExperienceHitV, ExperienceTypeOptions, SearchExperiencesPayloadV, SearchExperiencesResponseV } from './experiencesSearch';
|
37
36
|
import { HelpHubLauncherSettingsV, HelpHubSearchActionsV } from './helpHub';
|
@@ -44,23 +43,6 @@ import { LocalizedMessagePatchV, LocalizedMessageV, LocalizedMessages } from './
|
|
44
43
|
import { WorkflowV } from './workflow';
|
45
44
|
import { KeywordV } from './keyword';
|
46
45
|
/*******************************************************************************/
|
47
|
-
export type IInitOptions = {
|
48
|
-
apiOrigin?: string;
|
49
|
-
cdnOrigin?: string;
|
50
|
-
debug?: boolean;
|
51
|
-
environment?: string;
|
52
|
-
version?: string;
|
53
|
-
config?: any;
|
54
|
-
nonce?: string;
|
55
|
-
silentMode?: boolean;
|
56
|
-
};
|
57
|
-
/** Additional foobar init options */
|
58
|
-
export declare const SUPPORTED_FOOBAR_INIT_DEPLOYMENT_OPTIONS: readonly ["dev", "labs", "prod"];
|
59
|
-
export type IInitOptionsFoobar = IInitOptions & {
|
60
|
-
deployment?: (typeof SUPPORTED_FOOBAR_INIT_DEPLOYMENT_OPTIONS)[number];
|
61
|
-
disable_analytics?: boolean;
|
62
|
-
};
|
63
|
-
/*******************************************************************************/
|
64
46
|
export type IContextType = t.TypeOf<typeof ContextV> & unknown;
|
65
47
|
export type IUserType = t.TypeOf<typeof UserV> & unknown;
|
66
48
|
export type ICommandType = t.TypeOf<typeof CommandV> & unknown;
|
@@ -133,6 +115,11 @@ export type INudgePinStepType = INudgeStepType & {
|
|
133
115
|
type: 'pin';
|
134
116
|
};
|
135
117
|
};
|
118
|
+
export type INudgeCursorStepType = INudgePinStepType & {
|
119
|
+
form_factor: {
|
120
|
+
copilot_intro: true;
|
121
|
+
};
|
122
|
+
};
|
136
123
|
export type INudgeAnchorableStepType = INudgeTooltipStepType | INudgePinStepType;
|
137
124
|
export type INudgeStepContentBlockType = t.TypeOf<typeof NudgeContentBlockV> & unknown;
|
138
125
|
export type INudgeStepContentMarkdownBlockType = t.TypeOf<typeof NudgeContentMarkdownBlockV> & unknown;
|
@@ -157,6 +144,8 @@ export type IExperienceTemplate = t.TypeOf<typeof ExperienceTemplateV> & unknown
|
|
157
144
|
export type LabeledAction = t.TypeOf<typeof LabeledActionV> & unknown;
|
158
145
|
export type OpenChatAction = t.TypeOf<typeof OpenChatActionV> & unknown;
|
159
146
|
export type OpenChatActionType = t.TypeOf<typeof OpenChatActionTypeV> & unknown;
|
147
|
+
export type ChatHandoffAction = t.TypeOf<typeof ChatHandoffActionV> & unknown;
|
148
|
+
export type ChatHandoffActionType = t.TypeOf<typeof ChatHandoffActionTypeV> & unknown;
|
160
149
|
export type QuestlistAction = t.TypeOf<typeof QuestlistActionV> & unknown;
|
161
150
|
export type NudgeAction = t.TypeOf<typeof NudgeActionV> & unknown;
|
162
151
|
export type CommandAction = t.TypeOf<typeof CommandActionV> & unknown;
|
@@ -184,6 +173,7 @@ export type IQuestionSuggestionsType = t.TypeOf<typeof QuestionSuggestionsV> & u
|
|
184
173
|
export type IQuestionSuggestionsPayloadType = t.TypeOf<typeof QuestionSuggestionsPayloadV> & unknown;
|
185
174
|
export type ICreateChatPayloadType = t.TypeOf<typeof CreateChatPayloadV> & unknown;
|
186
175
|
export type IContinuationType = t.TypeOf<typeof ContinuationV> & unknown;
|
176
|
+
export type ISourceDocType = t.TypeOf<typeof SourceDocV> & unknown;
|
187
177
|
export type IExperienceType = t.TypeOf<typeof ExperienceV> & unknown;
|
188
178
|
export type IContinuationsPayloadType = t.TypeOf<typeof ContinuationsPayloadV> & unknown;
|
189
179
|
export type IAIAnswerType = t.TypeOf<typeof AIAnswerV> & unknown;
|
@@ -191,6 +181,7 @@ export type IAIAnswerPayloadType = t.TypeOf<typeof AIAnswerPayloadV> & unknown;
|
|
191
181
|
export type IHandoffPayloadType = t.TypeOf<typeof HandoffPayloadV> & unknown;
|
192
182
|
export type IExternalChatPayloadType = t.TypeOf<typeof ExternalChatPayloadV> & unknown;
|
193
183
|
export type IExternalChatHistoryType = t.TypeOf<typeof ExternalChatHistoryV> & unknown;
|
184
|
+
export type IChatOwnershipType = t.TypeOf<typeof ChatOwnershipV> & unknown;
|
194
185
|
export type ICreateAnswerFeedbackPayloadType = t.TypeOf<typeof CreateAnswerFeedbackPayloadV> & unknown;
|
195
186
|
export type ISearchHelpDocsPayloadType = t.TypeOf<typeof SearchHelpDocsPayloadV> & unknown;
|
196
187
|
export type ISearchHelpDocsResponseType = t.TypeOf<typeof SearchHelpDocsResponseV> & unknown;
|
@@ -297,3 +288,8 @@ export declare const isResource: (option: any) => option is IResourceType;
|
|
297
288
|
export declare const isContextArgument: (argument: IArgumentType) => argument is IContextArgumentType;
|
298
289
|
export declare const isTimeArgument: (argument: IArgumentType) => argument is IDynamicArgumentType;
|
299
290
|
export declare const isSurveyBlock: (block: INudgeStepContentBlockType) => block is INudgeStepSurveyBlockType;
|
291
|
+
export type WidgetTableauSelection = {
|
292
|
+
type: 'all' | 'nudge' | 'checklist' | 'spotlight' | 'helphub' | 'copilot';
|
293
|
+
id: string | number;
|
294
|
+
nudgeStepIndex?: number;
|
295
|
+
};
|
package/package.json
CHANGED
package/src/init.ts
CHANGED
@@ -3,14 +3,13 @@ import 'es6-object-assign/auto';
|
|
3
3
|
import 'es6-symbol/implement';
|
4
4
|
import { getProxySDK } from '../../internal/src/client/proxy';
|
5
5
|
import { _configuration } from '../../internal/src/client/symbols';
|
6
|
-
import { IInitOptions } from '../../internal/src/middleware/types';
|
7
6
|
|
8
7
|
const getSrc = (org: string, opts: IInitOptions) => {
|
9
8
|
let origin = opts.apiOrigin || 'https://api.commandbar.com';
|
10
9
|
const params = [];
|
11
10
|
|
12
11
|
const lc = localStorage.getItem('commandbar.lc');
|
13
|
-
if (lc && lc.includes('
|
12
|
+
if (lc && lc.includes('local')) {
|
14
13
|
// for debugging purposes
|
15
14
|
origin = 'http://localhost:8000';
|
16
15
|
}
|
@@ -60,6 +59,18 @@ const loadLatest = (org: string, opts: IInitOptions) => {
|
|
60
59
|
document.head.appendChild(el);
|
61
60
|
};
|
62
61
|
|
62
|
+
export type IInitOptions = {
|
63
|
+
apiOrigin?: string;
|
64
|
+
cdnOrigin?: string;
|
65
|
+
|
66
|
+
debug?: boolean;
|
67
|
+
environment?: string;
|
68
|
+
version?: string;
|
69
|
+
config?: any;
|
70
|
+
nonce?: string;
|
71
|
+
silentMode?: boolean;
|
72
|
+
};
|
73
|
+
|
63
74
|
const DEFAULT_OPTS = {
|
64
75
|
debug: false,
|
65
76
|
silentMode: false,
|
@@ -1,13 +0,0 @@
|
|
1
|
-
type FlushOptions = {
|
2
|
-
useSendBeacon?: boolean;
|
3
|
-
};
|
4
|
-
export declare class EventQueue<E> {
|
5
|
-
_queue: E[];
|
6
|
-
maxQueueSize: number;
|
7
|
-
handleEvents: (events: E[], options: FlushOptions) => void;
|
8
|
-
constructor(handleEvents: (events: E[], options: FlushOptions) => void, maxQueueSize?: number);
|
9
|
-
enqueue(event: E, forceFlush?: boolean): void;
|
10
|
-
flush(options?: FlushOptions): void;
|
11
|
-
destroy(): void;
|
12
|
-
}
|
13
|
-
export {};
|
@@ -1,53 +0,0 @@
|
|
1
|
-
import { CBEvent, CBEventName, CBRawEvent } from './types';
|
2
|
-
import { CBEventProperties } from './schema';
|
3
|
-
import { IDecideResponseType } from '../../../../../../internal/src/middleware/types';
|
4
|
-
export declare class AnalyticsV2 {
|
5
|
-
hasBooted: boolean;
|
6
|
-
private enabled;
|
7
|
-
private eventQueue;
|
8
|
-
private decide;
|
9
|
-
private applyEnrichments;
|
10
|
-
private applyScrubbers;
|
11
|
-
constructor(applyEnrichments?: (event: CBRawEvent & Partial<CBEvent>, meta: {
|
12
|
-
decide: {
|
13
|
-
user_property_targeting: boolean | null | undefined;
|
14
|
-
nudges: {
|
15
|
-
[x: string]: boolean | {
|
16
|
-
[x: string]: any;
|
17
|
-
} | null | undefined;
|
18
|
-
[x: number]: boolean | {
|
19
|
-
[x: string]: any;
|
20
|
-
} | null | undefined;
|
21
|
-
} | null | undefined;
|
22
|
-
checklists: {
|
23
|
-
[x: string]: boolean | {
|
24
|
-
[x: string]: any;
|
25
|
-
} | null | undefined;
|
26
|
-
[x: number]: boolean | {
|
27
|
-
[x: string]: any;
|
28
|
-
} | null | undefined;
|
29
|
-
} | null | undefined;
|
30
|
-
recommendation_sets: {
|
31
|
-
[x: string]: boolean | {
|
32
|
-
[x: string]: any;
|
33
|
-
} | null | undefined;
|
34
|
-
[x: number]: boolean | {
|
35
|
-
[x: string]: any;
|
36
|
-
} | null | undefined;
|
37
|
-
} | null | undefined;
|
38
|
-
commands: {
|
39
|
-
[x: string]: boolean | {
|
40
|
-
[x: string]: any;
|
41
|
-
} | null | undefined;
|
42
|
-
[x: number]: boolean | {
|
43
|
-
[x: string]: any;
|
44
|
-
} | null | undefined;
|
45
|
-
} | null | undefined;
|
46
|
-
} | null | undefined;
|
47
|
-
}) => CBEvent, applyScrubbers?: (event: CBEvent) => CBEvent);
|
48
|
-
enable(): void;
|
49
|
-
track(name: CBEventName, properties?: CBEventProperties, additionalProperties?: Partial<Omit<CBEvent, 'name' | 'properties'>>, forceFlush?: boolean): void;
|
50
|
-
identifyAsAdmin(): void;
|
51
|
-
setBootStatus(hasBooted: boolean): void;
|
52
|
-
setDecide(decide: IDecideResponseType | null | undefined): void;
|
53
|
-
}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
export declare const shouldReportToServer: () => boolean;
|
2
|
-
export declare const isSilentMode: () => boolean;
|
3
|
-
export type ScrubberType = (typeof allowedCategories)[number];
|
4
|
-
declare const allowedCategories: readonly ["commands", "help_hub_search", "user_inputs_and_deadends", "records", "urls"];
|
5
|
-
export declare const getEventAttributeBlockList: () => (typeof allowedCategories)[number][];
|
6
|
-
export {};
|
@@ -1,152 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This file was automatically generated by json-schema-to-typescript.
|
3
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
4
|
-
* and run json-schema-to-typescript to regenerate this file.
|
5
|
-
*/
|
6
|
-
export interface CBClientEvent {
|
7
|
-
/**
|
8
|
-
* The version of the schema used.
|
9
|
-
*/
|
10
|
-
version: 1 | 2;
|
11
|
-
name: "cb:identify" | "cb:decide" | "cb:pageview" | "cb:click" | "cb:input" | "cb:nudge_viewed" | "cb:nudge_dismissed" | "cb:nudge_snoozed" | "cb:nudge_cta_clicked" | "cb:nudge_survey_submitted" | "cb:nudge_checklist_item_skipped" | "cb:nudge_checklist_item_completed" | "cb:nudge_checklist_completed" | "cb:assistance_modal_opened" | "cb:assistance_modal_closed" | "cb:copilot_viewed" | "cb:copilot_chat_started" | "cb:copilot_chat_restarted" | "cb:copilot_chat_message_sent" | "cb:copilot_chat_message_feedback" | "cb:copilot_follow_up_clicked" | "cb:copilot_source_clicked" | "cb:copilot_link_clicked" | "cb:copilot_experience_clicked" | "cb:helphub_viewed" | "cb:helphub_search_input" | "cb:helphub_search_executed" | "cb:helphub_search_result_clicked" | "cb:helphub_suggested_query_clicked" | "cb:helphub_doc_link_copied" | "cb:helphub_additional_resource_clicked" | "cb:helphub_recommendation_clicked" | "cb:spotlight_opened" | "cb:spotlight_closed" | "cb:spotlight_search_input" | "cb:spotlight_search_executed" | "cb:spotlight_search_result_clicked" | "cb:action_executed" | "cb:content_viewed" | "cb:content_closed" | "cb:content_link_clicked" | "cb:content_scrolled" | "cb:content_play_clicked" | "cb:content_pause_clicked";
|
12
|
-
/**
|
13
|
-
* Whether the user is an admin of the related organization.
|
14
|
-
*/
|
15
|
-
is_admin: boolean;
|
16
|
-
/**
|
17
|
-
* Whether the event was fired while in simulate mode.
|
18
|
-
*/
|
19
|
-
is_simulated: boolean;
|
20
|
-
/**
|
21
|
-
* Object containing key-value pairs of user properties.
|
22
|
-
*/
|
23
|
-
end_user_properties: {
|
24
|
-
[k: string]: unknown;
|
25
|
-
};
|
26
|
-
/**
|
27
|
-
* Object containing the response from /decide/.
|
28
|
-
*/
|
29
|
-
decide?: {
|
30
|
-
[k: string]: unknown;
|
31
|
-
};
|
32
|
-
/**
|
33
|
-
* The unique identifier for the organization.
|
34
|
-
*/
|
35
|
-
organization_key: string;
|
36
|
-
/**
|
37
|
-
* The unique identifier for the user generating the event.
|
38
|
-
*/
|
39
|
-
distinct_id: string;
|
40
|
-
/**
|
41
|
-
* The unique identifier for the anonymous user generating the event.
|
42
|
-
*/
|
43
|
-
anon_distinct_id: string | null;
|
44
|
-
/**
|
45
|
-
* The timestamp when the event occurred, including timezone information. Must be in ISO 8601 format.
|
46
|
-
*/
|
47
|
-
timestamp: string;
|
48
|
-
/**
|
49
|
-
* The timestamp when the event was sent to the server.
|
50
|
-
*/
|
51
|
-
sent_at: string;
|
52
|
-
/**
|
53
|
-
* Object containing key-value pairs, where keys are package names and values are their respective version strings.
|
54
|
-
*/
|
55
|
-
client_version?: {
|
56
|
-
[k: string]: string;
|
57
|
-
};
|
58
|
-
/**
|
59
|
-
* A special code used during the launch process.
|
60
|
-
*/
|
61
|
-
launch_code?: string;
|
62
|
-
/**
|
63
|
-
* Detailed information about the current web page.
|
64
|
-
*/
|
65
|
-
page: {
|
66
|
-
/**
|
67
|
-
* The domain of the current URL.
|
68
|
-
*/
|
69
|
-
domain: string;
|
70
|
-
/**
|
71
|
-
* The hash segment of the current URL, typically following a '#'.
|
72
|
-
*/
|
73
|
-
hash: string;
|
74
|
-
/**
|
75
|
-
* The path of the current URL, typically following the domain and a '/'.
|
76
|
-
*/
|
77
|
-
path: string;
|
78
|
-
/**
|
79
|
-
* The query string of the current URL, typically following a '?'.
|
80
|
-
*/
|
81
|
-
query: string;
|
82
|
-
/**
|
83
|
-
* The title of the current web page.
|
84
|
-
*/
|
85
|
-
title: string;
|
86
|
-
};
|
87
|
-
user_agent?: string | null;
|
88
|
-
/**
|
89
|
-
* List of scrubbers used to scrub the event.
|
90
|
-
*/
|
91
|
-
scrubbers: string[];
|
92
|
-
source?: CBEventSource;
|
93
|
-
properties: CBEventProperties;
|
94
|
-
/**
|
95
|
-
* Serialized state of the current nudge or null if not applicable.
|
96
|
-
*/
|
97
|
-
nudge?: {
|
98
|
-
[k: string]: unknown;
|
99
|
-
};
|
100
|
-
/**
|
101
|
-
* Serialized state of Copilot or null if not applicable.
|
102
|
-
*/
|
103
|
-
copilot?: {
|
104
|
-
[k: string]: unknown;
|
105
|
-
};
|
106
|
-
/**
|
107
|
-
* Serialized state of HelpHub or null if not applicable.
|
108
|
-
*/
|
109
|
-
helphub?: {
|
110
|
-
[k: string]: unknown;
|
111
|
-
};
|
112
|
-
/**
|
113
|
-
* Serialized state of Spotlight or null if not applicable.
|
114
|
-
*/
|
115
|
-
spotlight?: {
|
116
|
-
[k: string]: unknown;
|
117
|
-
};
|
118
|
-
/**
|
119
|
-
* Serialized state of the current action or null if not applicable.
|
120
|
-
*/
|
121
|
-
action?: {
|
122
|
-
[k: string]: unknown;
|
123
|
-
};
|
124
|
-
/**
|
125
|
-
* Serialized state of the current content or null if not applicable.
|
126
|
-
*/
|
127
|
-
content?: {
|
128
|
-
[k: string]: unknown;
|
129
|
-
};
|
130
|
-
}
|
131
|
-
/**
|
132
|
-
* Information about the source of the event.
|
133
|
-
*/
|
134
|
-
export interface CBEventSource {
|
135
|
-
/**
|
136
|
-
* The type of the source.
|
137
|
-
*/
|
138
|
-
type: string;
|
139
|
-
/**
|
140
|
-
* The unique identifier of the source.
|
141
|
-
*/
|
142
|
-
id?: string;
|
143
|
-
/**
|
144
|
-
* Additional properties.
|
145
|
-
*/
|
146
|
-
properties?: {
|
147
|
-
[k: string]: unknown;
|
148
|
-
};
|
149
|
-
}
|
150
|
-
export interface CBEventProperties {
|
151
|
-
[k: string]: unknown;
|
152
|
-
}
|
@@ -1,99 +0,0 @@
|
|
1
|
-
import { TUpdateEditorRouteDetails } from '../util/dispatchCustomEvent';
|
2
|
-
import { CommandBarClientSDK, InstanceAttributes, MetaAttributes, Metadata, ProductConfig, ProductDebugOptions } from './CommandBarClientSDK';
|
3
|
-
import type { Hub } from '@sentry/browser';
|
4
|
-
import { _analytics, _configuration, _configure, _configUser, _dispose, _disposed, _eventSubscriptions, _userProperties, _isProxy, _loadEditor, _perf, _programmaticTheme, _reload, _reloadCommands, _reloadOrganization, _reloadPlaceholders, _reloadNudges, _reloadHelpHub, _startNudgeDebug, _showNudgeStepMock, _closeNudgeMocks, _stopChecklistPreview, _stopNudgeDebug, _reloadChecklists, _report, _search, _sentry, _setDashboard, _setPreviewMode, _setTestMode, _showGuide, _showMessage, _user, _instanceAttributes, _setEditorVisible, _shareConfig, _shareContextSettings, _shareProgrammaticCommands, _metaAttributes, _previewChecklist, _shareEditorRouteWithBar, _fingerprint, _updateEditorRoute, _startDebug, _stopDebug, _previewRecommendationSet, _previewCopilotSettings, _stopRecommendationSetPreview, _getDebugSnapshot, _updateEditorPreviewDevice, _getEditorPreviewDevice, _shareTrackedEvents, _setThemeV2, _showWidgetTableau, _setActiveChat, _getActiveChat } from './symbols';
|
5
|
-
import { SDKConfig } from './SDKConfig';
|
6
|
-
import { IChecklist, ICommandType, IConfigType, ICopilotSettingsPreviewType, INudgeType, IRecommendationSet, IRecordSettingsByContextKey, IThemeV2Type } from '../middleware/types';
|
7
|
-
import { DeviceType } from '../util/operatingSystem';
|
8
|
-
import type { EVENT_NAME } from '../../../commandbar/src/shared/services/analytics/types';
|
9
|
-
import type { EventSubscriber } from '../../../commandbar/src/shared/services/analytics/EventHandler';
|
10
|
-
import type { AnalyticsV2 } from '../../../commandbar/src/shared/services/analytics/v2/client';
|
11
|
-
export type { SDKConfig } from './SDKConfig';
|
12
|
-
export declare const _reloadTargets: string[];
|
13
|
-
export interface CommandBarInternalSDK {
|
14
|
-
[_instanceAttributes]: InstanceAttributes;
|
15
|
-
[_metaAttributes]: MetaAttributes;
|
16
|
-
[_perf]: boolean;
|
17
|
-
[_programmaticTheme]: string | undefined;
|
18
|
-
[_sentry]: Hub | undefined;
|
19
|
-
[_search]: string;
|
20
|
-
[_user]: string | null | undefined;
|
21
|
-
[_fingerprint]: string | undefined;
|
22
|
-
[_userProperties]: Metadata | undefined;
|
23
|
-
[_analytics]: AnalyticsV2;
|
24
|
-
[_eventSubscriptions]: Map<symbol, EventSubscriber> | undefined;
|
25
|
-
/** @deprecated */
|
26
|
-
readonly [_configure]: (uuid: string) => void;
|
27
|
-
readonly [_configuration]: SDKConfig;
|
28
|
-
readonly [_configUser]: () => Promise<void>;
|
29
|
-
readonly [_dispose]: () => void;
|
30
|
-
readonly [_disposed]: false;
|
31
|
-
readonly [_isProxy]: false;
|
32
|
-
readonly [_loadEditor]: () => void;
|
33
|
-
readonly [_shareEditorRouteWithBar]: (path: string) => void;
|
34
|
-
readonly [_updateEditorPreviewDevice]: (device: DeviceType) => void;
|
35
|
-
readonly [_getEditorPreviewDevice]: () => DeviceType;
|
36
|
-
readonly [_reload]: (reloadTargets: (typeof _reloadTargets)[number][]) => void;
|
37
|
-
readonly [_reloadCommands]: (preLoadedConfig?: IConfigType) => void;
|
38
|
-
readonly [_reloadOrganization]: (preLoadedConfig?: IConfigType) => void;
|
39
|
-
readonly [_reloadPlaceholders]: (preLoadedConfig?: IConfigType) => void;
|
40
|
-
readonly [_reloadNudges]: (preLoadedConfig?: IConfigType) => void;
|
41
|
-
readonly [_reloadHelpHub]: (preLoadedConfig?: IConfigType) => void;
|
42
|
-
readonly [_previewRecommendationSet]: (data: {
|
43
|
-
recommendationSet?: IRecommendationSet;
|
44
|
-
}) => void;
|
45
|
-
readonly [_previewCopilotSettings]: (data: {
|
46
|
-
settings: ICopilotSettingsPreviewType;
|
47
|
-
}) => void;
|
48
|
-
readonly [_stopRecommendationSetPreview]: () => void;
|
49
|
-
readonly [_startNudgeDebug]: (data: {
|
50
|
-
nudge: INudgeType;
|
51
|
-
}) => void;
|
52
|
-
readonly [_showNudgeStepMock]: (data: {
|
53
|
-
nudge: INudgeType;
|
54
|
-
stepIndex: number;
|
55
|
-
forceOpen?: boolean;
|
56
|
-
}) => void;
|
57
|
-
readonly [_closeNudgeMocks]: () => void;
|
58
|
-
readonly [_stopChecklistPreview]: () => void;
|
59
|
-
readonly [_stopNudgeDebug]: (data: {
|
60
|
-
index?: number;
|
61
|
-
}) => void;
|
62
|
-
readonly [_previewChecklist]: (data: {
|
63
|
-
checklist: IChecklist;
|
64
|
-
clearData?: boolean;
|
65
|
-
}) => void;
|
66
|
-
readonly [_reloadChecklists]: () => void;
|
67
|
-
readonly [_setThemeV2]: (themeV2: IThemeV2Type, mode: 'light_mode' | 'dark_mode') => void;
|
68
|
-
readonly [_showWidgetTableau]: (show: boolean) => void;
|
69
|
-
readonly [_setActiveChat]: (chatId: string | null) => void;
|
70
|
-
readonly [_getActiveChat]: () => string | null;
|
71
|
-
/** @deprecated */
|
72
|
-
readonly [_report]: (event: EVENT_NAME, data?: Metadata) => void;
|
73
|
-
/** @deprecated */
|
74
|
-
readonly [_setDashboard]: (element: HTMLElement) => void;
|
75
|
-
readonly [_setPreviewMode]: (on: boolean) => void;
|
76
|
-
readonly [_setTestMode]: (on: boolean) => void;
|
77
|
-
readonly [_setEditorVisible]: (visible: boolean) => void;
|
78
|
-
readonly [_shareContextSettings]: () => {
|
79
|
-
local: IRecordSettingsByContextKey;
|
80
|
-
server: IRecordSettingsByContextKey;
|
81
|
-
};
|
82
|
-
readonly [_shareConfig]: () => any;
|
83
|
-
readonly [_shareProgrammaticCommands]: () => ICommandType[];
|
84
|
-
readonly [_shareTrackedEvents]: () => {
|
85
|
-
trackedEvents: string[];
|
86
|
-
};
|
87
|
-
readonly [_startDebug]: (data: ProductDebugOptions) => void;
|
88
|
-
readonly [_stopDebug]: (product?: ProductConfig[number]) => void;
|
89
|
-
readonly [_getDebugSnapshot]: (data?: {
|
90
|
-
nudgeId?: INudgeType['id'];
|
91
|
-
stepIndex?: number;
|
92
|
-
}) => void;
|
93
|
-
readonly [_updateEditorRoute]: (data: TUpdateEditorRouteDetails) => void;
|
94
|
-
/** @deprecated */
|
95
|
-
readonly [_showGuide]: (eventName: string, preview?: boolean) => void;
|
96
|
-
/** @deprecated */
|
97
|
-
readonly [_showMessage]: (eventName: string, preview?: boolean) => void;
|
98
|
-
}
|
99
|
-
export type CommandBarSDK = CommandBarInternalSDK & CommandBarClientSDK;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import { CommandBarClientSDK } from './CommandBarClientSDK';
|
2
|
-
import { CommandBarSDK } from './CommandBarSDK';
|
3
|
-
declare global {
|
4
|
-
interface Navigator {
|
5
|
-
brave?: {
|
6
|
-
isBrave(): Promise<boolean>;
|
7
|
-
};
|
8
|
-
}
|
9
|
-
interface Window {
|
10
|
-
CommandBar: CommandBarClientSDK;
|
11
|
-
_CommandBarTmpQueueProcessing: CommandBarSDK | undefined;
|
12
|
-
Navigator: Navigator;
|
13
|
-
_cbIsWebView?: boolean;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
export { initProxySDK, getProxySDK } from './proxy';
|
17
|
-
/**
|
18
|
-
* Returns the CommandBar global SDK.
|
19
|
-
* The SDK object might be a proxy instead if `initSDK` has not yet been called.
|
20
|
-
*/
|
21
|
-
export declare function getSDK(): CommandBarSDK;
|
22
|
-
/**
|
23
|
-
* Returns the CommandBar global, coerced to match the client interface.
|
24
|
-
* The SDK object might be a proxy instead if `initSDK` has not yet been called.
|
25
|
-
*/
|
26
|
-
export declare function getClientSDK(): CommandBarClientSDK;
|
27
|
-
export declare const SDK_INTERNAL_PREFIX = "__commandbar_INTERNAL_";
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import type { INudgeType } from '../middleware/types';
|
2
|
-
export type TUpdateEditorRouteDetails = {
|
3
|
-
type: 'nudge';
|
4
|
-
nudge: INudgeType;
|
5
|
-
stepIndex: number;
|
6
|
-
} | {
|
7
|
-
type: 'checklist';
|
8
|
-
checklistId: string | number;
|
9
|
-
} | {
|
10
|
-
type: 'route';
|
11
|
-
route_replacement: string;
|
12
|
-
action?: string;
|
13
|
-
};
|
14
|
-
export declare function dispatchCustomEvent<T>(eventType: string, detail: T, canBubble?: boolean, cancelable?: boolean): CustomEvent<T>;
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Hub } from '@sentry/core';
|
3
|
-
export declare const SENTRY_COMMANDBAR_DSN = "https://ebf252b62885436e858a66d157aee9ea@o451734.ingest.sentry.io/5608348";
|
4
|
-
export declare const sentryHubFactory: (dsn: string) => Hub | undefined;
|
5
|
-
export declare const initSentryAndAddToSdk: () => void;
|
6
|
-
export declare const getSentry: () => Hub | undefined;
|
7
|
-
export declare const startSentryTransaction: (context: import("@sentry/types").TransactionContext, customSamplingContext?: import("@sentry/types").CustomSamplingContext | undefined) => import("@sentry/browser").Transaction | null | undefined;
|
8
|
-
interface Props {
|
9
|
-
children: React.ReactNode;
|
10
|
-
}
|
11
|
-
interface State {
|
12
|
-
error: boolean;
|
13
|
-
}
|
14
|
-
export declare class SentryErrorBoundary extends React.Component<Props, State> {
|
15
|
-
constructor(props: Props);
|
16
|
-
captureRejection: (ev: PromiseRejectionEvent) => void;
|
17
|
-
static getDerivedStateFromError(_error: Error): {
|
18
|
-
error: boolean;
|
19
|
-
};
|
20
|
-
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
|
21
|
-
render(): React.ReactNode;
|
22
|
-
}
|
23
|
-
export {};
|