commandbar 1.12.0 → 1.13.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/build/commandbar/src/shared/services/analytics/v2/client.d.ts +1 -2
- package/build/commandbar-js/src/snippet.d.ts +0 -1
- package/build/internal/src/client/CommandBarClientSDK.d.ts +1 -0
- package/build/internal/src/middleware/CommandFromClientV.d.ts +3 -0
- package/build/internal/src/middleware/OrganizationV.d.ts +48 -4
- package/build/internal/src/middleware/additionalResource.d.ts +36 -9
- package/build/internal/src/middleware/chat.d.ts +439 -76
- package/build/internal/src/middleware/checklist.d.ts +40 -10
- package/build/internal/src/middleware/command.d.ts +259 -46
- package/build/internal/src/middleware/experienceTemplate.d.ts +64 -16
- package/build/internal/src/middleware/experiencesSearch.d.ts +77 -14
- package/build/internal/src/middleware/flags.d.ts +3 -5
- package/build/internal/src/middleware/helpDocsSearch.d.ts +55 -10
- package/build/internal/src/middleware/helpers/actions.d.ts +21 -6
- package/build/internal/src/middleware/helpers/commandTemplate.d.ts +14 -2
- package/build/internal/src/middleware/keyword.d.ts +82 -0
- package/build/internal/src/middleware/network.d.ts +2 -2
- package/build/internal/src/middleware/nudge.d.ts +96 -24
- package/build/internal/src/middleware/organization.d.ts +140 -16
- package/build/internal/src/middleware/organizationSettings.d.ts +96 -8
- package/build/internal/src/middleware/recommendationSet.d.ts +36 -9
- package/build/internal/src/middleware/types.d.ts +6 -1
- package/package.json +1 -1
- package/src/snippet.ts +1 -14
@@ -42,10 +42,13 @@ export declare const RecommendationSetAdditionalV: t.TypeC<{
|
|
42
42
|
value: t.StringC;
|
43
43
|
}>, t.PartialC<{
|
44
44
|
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
45
|
+
meta: t.TypeC<{
|
46
|
+
command: t.StringC;
|
47
|
+
}>;
|
45
48
|
}>]>, t.TypeC<{
|
46
49
|
type: t.LiteralC<"open_chat">;
|
47
50
|
meta: t.TypeC<{
|
48
|
-
type: t.UnionC<[t.LiteralC<"intercom">, t.LiteralC<"helpscout">, t.LiteralC<"freshdesk">, t.LiteralC<"freshchat">, t.LiteralC<"crisp">, t.LiteralC<"zendesk">, t.LiteralC<"liveChat">, t.LiteralC<"gist">, t.LiteralC<"olark">, t.LiteralC<"hubspot">, t.LiteralC<"drift">, t.LiteralC<"zendesk_handoff">, t.LiteralC<"">]>;
|
51
|
+
type: t.UnionC<[t.LiteralC<"intercom">, t.LiteralC<"helpscout">, t.LiteralC<"freshdesk">, t.LiteralC<"freshchat">, t.LiteralC<"crisp">, t.LiteralC<"zendesk">, t.LiteralC<"liveChat">, t.LiteralC<"gist">, t.LiteralC<"olark">, t.LiteralC<"hubspot">, t.LiteralC<"drift">, t.LiteralC<"pylon">, t.LiteralC<"zendesk_handoff">, t.LiteralC<"">]>;
|
49
52
|
}>;
|
50
53
|
}>, t.TypeC<{
|
51
54
|
type: t.LiteralC<"dismiss">;
|
@@ -118,10 +121,13 @@ export declare const RecommendationSetV: t.IntersectionC<[t.TypeC<{
|
|
118
121
|
value: t.StringC;
|
119
122
|
}>, t.PartialC<{
|
120
123
|
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
124
|
+
meta: t.TypeC<{
|
125
|
+
command: t.StringC;
|
126
|
+
}>;
|
121
127
|
}>]>, t.TypeC<{
|
122
128
|
type: t.LiteralC<"open_chat">;
|
123
129
|
meta: t.TypeC<{
|
124
|
-
type: t.UnionC<[t.LiteralC<"intercom">, t.LiteralC<"helpscout">, t.LiteralC<"freshdesk">, t.LiteralC<"freshchat">, t.LiteralC<"crisp">, t.LiteralC<"zendesk">, t.LiteralC<"liveChat">, t.LiteralC<"gist">, t.LiteralC<"olark">, t.LiteralC<"hubspot">, t.LiteralC<"drift">, t.LiteralC<"zendesk_handoff">, t.LiteralC<"">]>;
|
130
|
+
type: t.UnionC<[t.LiteralC<"intercom">, t.LiteralC<"helpscout">, t.LiteralC<"freshdesk">, t.LiteralC<"freshchat">, t.LiteralC<"crisp">, t.LiteralC<"zendesk">, t.LiteralC<"liveChat">, t.LiteralC<"gist">, t.LiteralC<"olark">, t.LiteralC<"hubspot">, t.LiteralC<"drift">, t.LiteralC<"pylon">, t.LiteralC<"zendesk_handoff">, t.LiteralC<"">]>;
|
125
131
|
}>;
|
126
132
|
}>, t.TypeC<{
|
127
133
|
type: t.LiteralC<"dismiss">;
|
@@ -193,10 +199,13 @@ export declare class RecommendationSet {
|
|
193
199
|
value: string;
|
194
200
|
} & {
|
195
201
|
operation?: "self" | "router" | "blank" | undefined;
|
202
|
+
meta?: {
|
203
|
+
command: string;
|
204
|
+
} | undefined;
|
196
205
|
}) | {
|
197
206
|
type: "open_chat";
|
198
207
|
meta: {
|
199
|
-
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
|
208
|
+
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
|
200
209
|
};
|
201
210
|
} | {
|
202
211
|
type: "dismiss";
|
@@ -269,10 +278,13 @@ export declare class RecommendationSet {
|
|
269
278
|
value: string;
|
270
279
|
} & {
|
271
280
|
operation?: "self" | "router" | "blank" | undefined;
|
281
|
+
meta?: {
|
282
|
+
command: string;
|
283
|
+
} | undefined;
|
272
284
|
}) | {
|
273
285
|
type: "open_chat";
|
274
286
|
meta: {
|
275
|
-
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
|
287
|
+
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
|
276
288
|
};
|
277
289
|
} | {
|
278
290
|
type: "dismiss";
|
@@ -344,10 +356,13 @@ export declare class RecommendationSet {
|
|
344
356
|
value: string;
|
345
357
|
} & {
|
346
358
|
operation?: "self" | "router" | "blank" | undefined;
|
359
|
+
meta?: {
|
360
|
+
command: string;
|
361
|
+
} | undefined;
|
347
362
|
}) | {
|
348
363
|
type: "open_chat";
|
349
364
|
meta: {
|
350
|
-
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
|
365
|
+
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
|
351
366
|
};
|
352
367
|
} | {
|
353
368
|
type: "dismiss";
|
@@ -420,10 +435,13 @@ export declare class RecommendationSet {
|
|
420
435
|
value: string;
|
421
436
|
} & {
|
422
437
|
operation?: "self" | "router" | "blank" | undefined;
|
438
|
+
meta?: {
|
439
|
+
command: string;
|
440
|
+
} | undefined;
|
423
441
|
}) | {
|
424
442
|
type: "open_chat";
|
425
443
|
meta: {
|
426
|
-
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
|
444
|
+
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
|
427
445
|
};
|
428
446
|
} | {
|
429
447
|
type: "dismiss";
|
@@ -495,10 +513,13 @@ export declare class RecommendationSet {
|
|
495
513
|
value: string;
|
496
514
|
} & {
|
497
515
|
operation?: "self" | "router" | "blank" | undefined;
|
516
|
+
meta?: {
|
517
|
+
command: string;
|
518
|
+
} | undefined;
|
498
519
|
}) | {
|
499
520
|
type: "open_chat";
|
500
521
|
meta: {
|
501
|
-
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
|
522
|
+
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
|
502
523
|
};
|
503
524
|
} | {
|
504
525
|
type: "dismiss";
|
@@ -572,10 +593,13 @@ export declare class RecommendationSet {
|
|
572
593
|
value: string;
|
573
594
|
} & {
|
574
595
|
operation?: "self" | "router" | "blank" | undefined;
|
596
|
+
meta?: {
|
597
|
+
command: string;
|
598
|
+
} | undefined;
|
575
599
|
}) | {
|
576
600
|
type: "open_chat";
|
577
601
|
meta: {
|
578
|
-
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
|
602
|
+
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
|
579
603
|
};
|
580
604
|
} | {
|
581
605
|
type: "dismiss";
|
@@ -651,10 +675,13 @@ export declare class RecommendationSet {
|
|
651
675
|
value: string;
|
652
676
|
} & {
|
653
677
|
operation?: "self" | "router" | "blank" | undefined;
|
678
|
+
meta?: {
|
679
|
+
command: string;
|
680
|
+
} | undefined;
|
654
681
|
}) | {
|
655
682
|
type: "open_chat";
|
656
683
|
meta: {
|
657
|
-
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
|
684
|
+
type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
|
658
685
|
};
|
659
686
|
} | {
|
660
687
|
type: "dismiss";
|
@@ -31,7 +31,7 @@ import { AudienceV } from './helpers/audience';
|
|
31
31
|
import { AdditionalResourceV } from './additionalResource';
|
32
32
|
import { RecommendationSetV } from './recommendationSet';
|
33
33
|
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 } from './chat';
|
34
|
+
import { UserMessageV, AIMessageV, AIMessageExtraV, MessageV, AIAnswerPayloadV, AIAnswerV, ContinuationsPayloadV, ContinuationV, CreateAnswerFeedbackPayloadV, QuestionSuggestionsPayloadV, QuestionSuggestionsV, ExperienceV, CreateChatPayloadV, ChatV, CopilotSettingsPreviewV, HandoffPayloadV, ExternalChatPayloadV, ExternalChatHistoryV, UserAttachmentV } from './chat';
|
35
35
|
import { HelpDocHitV, SearchHelpDocsPayloadV, SearchHelpDocsResponseV } from './helpDocsSearch';
|
36
36
|
import { ExperienceHitV, ExperienceTypeOptions, SearchExperiencesPayloadV, SearchExperiencesResponseV } from './experiencesSearch';
|
37
37
|
import { HelpHubLauncherSettingsV, HelpHubSearchActionsV } from './helpHub';
|
@@ -42,6 +42,7 @@ import { ExperienceTemplateV } from './experienceTemplate';
|
|
42
42
|
import { APIV } from './api';
|
43
43
|
import { LocalizedMessagePatchV, LocalizedMessageV, LocalizedMessages } from './localizedMessage';
|
44
44
|
import { WorkflowV } from './workflow';
|
45
|
+
import { KeywordV } from './keyword';
|
45
46
|
/*******************************************************************************/
|
46
47
|
export type IInitOptions = {
|
47
48
|
apiOrigin?: string;
|
@@ -151,6 +152,7 @@ export type INudgeClientType = {
|
|
151
152
|
passedConditionsInLastEvaluation: boolean;
|
152
153
|
lastTriggeredTs?: number;
|
153
154
|
};
|
155
|
+
export type IKeyword = t.TypeOf<typeof KeywordV> & unknown;
|
154
156
|
export type IExperienceTemplate = t.TypeOf<typeof ExperienceTemplateV> & unknown;
|
155
157
|
export type LabeledAction = t.TypeOf<typeof LabeledActionV> & unknown;
|
156
158
|
export type OpenChatAction = t.TypeOf<typeof OpenChatActionV> & unknown;
|
@@ -176,6 +178,7 @@ export type NudgeInteractions = t.TypeOf<typeof NudgeInteractionsV> & unknown;
|
|
176
178
|
export type IMessageType = t.TypeOf<typeof MessageV> & unknown;
|
177
179
|
export type IUserMessageType = t.TypeOf<typeof UserMessageV> & unknown;
|
178
180
|
export type IAIMessageType = t.TypeOf<typeof AIMessageV> & unknown;
|
181
|
+
export type IUserAttachmentType = t.TypeOf<typeof UserAttachmentV> & unknown;
|
179
182
|
export type IAIMessageExtraType = t.TypeOf<typeof AIMessageExtraV> & unknown;
|
180
183
|
export type IQuestionSuggestionsType = t.TypeOf<typeof QuestionSuggestionsV> & unknown;
|
181
184
|
export type IQuestionSuggestionsPayloadType = t.TypeOf<typeof QuestionSuggestionsPayloadV> & unknown;
|
@@ -264,6 +267,7 @@ export type IConfigEndpointResponse = {
|
|
264
267
|
};
|
265
268
|
localized_messages: LocalizedMessages;
|
266
269
|
themes?: IThemeType[];
|
270
|
+
keywords: IKeyword[];
|
267
271
|
};
|
268
272
|
export type IConfigType = {
|
269
273
|
commands: ICommandType[];
|
@@ -282,6 +286,7 @@ export type IConfigType = {
|
|
282
286
|
flags: Flags;
|
283
287
|
localized_messages: LocalizedMessages;
|
284
288
|
themes: IThemeType[];
|
289
|
+
keywords: IKeyword[];
|
285
290
|
};
|
286
291
|
export type { IRecordSettings } from './IRecordSettings';
|
287
292
|
export type IRecordSettingsByContextKey = t.TypeOf<typeof RecordSettingsByContextKeyV> & unknown;
|
package/package.json
CHANGED
package/src/snippet.ts
CHANGED
@@ -6,7 +6,6 @@ const org = '<org_id>';
|
|
6
6
|
let api = 'https://api.commandbar.com';
|
7
7
|
let cdn: string | undefined = undefined;
|
8
8
|
|
9
|
-
const polyfills = ['Object.assign', 'Symbol', 'Symbol.for'].join('%2C');
|
10
9
|
const w = window as unknown as Record<string, unknown>;
|
11
10
|
|
12
11
|
function loadScript(src: string, async = false) {
|
@@ -38,11 +37,6 @@ function bootstrap() {
|
|
38
37
|
api = 'http://localhost:8000';
|
39
38
|
cdn = undefined;
|
40
39
|
}
|
41
|
-
if (lc && lc.includes('api=preview_')) {
|
42
|
-
const branchIdentifier = /api=preview_([^;$]+)/.exec(lc)?.[1];
|
43
|
-
api = `https://${branchIdentifier}.commandbar.xyz:8000`;
|
44
|
-
cdn = undefined;
|
45
|
-
}
|
46
40
|
|
47
41
|
const proxy = Object.assign(
|
48
42
|
{
|
@@ -95,11 +89,4 @@ function bootstrap() {
|
|
95
89
|
loadScript(`${api}/latest/${org}?${params.join('&')}`, true);
|
96
90
|
}
|
97
91
|
|
98
|
-
|
99
|
-
w.__CommandBarBootstrap__ = bootstrap;
|
100
|
-
loadScript(
|
101
|
-
'https://polyfill.io/v3/polyfill.min.js?version=3.101.0&callback=__CommandBarBootstrap__&features=' + polyfills,
|
102
|
-
);
|
103
|
-
} else {
|
104
|
-
bootstrap();
|
105
|
-
}
|
92
|
+
bootstrap();
|