commandbar 1.9.0 → 1.10.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.
Files changed (50) hide show
  1. package/build/{internal/src/client → commandbar/src/shared/services/analytics}/EventHandler.d.ts +32 -10
  2. package/build/commandbar/src/shared/services/analytics/types.d.ts +77 -0
  3. package/build/commandbar-js/src/index.d.ts +2 -2
  4. package/build/commandbar-js/src/index.js +1 -1
  5. package/build/internal/src/client/AddContextOptions.d.ts +4 -0
  6. package/build/internal/src/client/CommandBarClientSDK.d.ts +46 -13
  7. package/build/internal/src/client/CommandBarSDK.d.ts +17 -10
  8. package/build/internal/src/client/SDKConfig.d.ts +3 -2
  9. package/build/internal/src/client/symbols.d.ts +5 -1
  10. package/build/internal/src/middleware/CommandFromClientV.d.ts +22 -10
  11. package/build/internal/src/middleware/IRecordSettings.d.ts +3 -0
  12. package/build/internal/src/middleware/OrganizationV.d.ts +200 -6
  13. package/build/internal/src/middleware/{ResourceSettingsV.d.ts → RecordSettingsV.d.ts} +2 -2
  14. package/build/internal/src/middleware/additionalResource.d.ts +96 -15
  15. package/build/internal/src/middleware/billing.d.ts +0 -2
  16. package/build/internal/src/middleware/chat.d.ts +2196 -176
  17. package/build/internal/src/middleware/checklist.d.ts +504 -63
  18. package/build/internal/src/middleware/command.d.ts +1809 -385
  19. package/build/internal/src/middleware/endUser.d.ts +33 -5
  20. package/build/internal/src/middleware/entityChanges.d.ts +17 -0
  21. package/build/internal/src/middleware/experienceTemplate.d.ts +59 -0
  22. package/build/internal/src/middleware/experiencesSearch.d.ts +3579 -0
  23. package/build/internal/src/middleware/flags.d.ts +20 -0
  24. package/build/internal/src/middleware/helpDocsIntegration.d.ts +9 -0
  25. package/build/internal/src/middleware/helpDocsSearch.d.ts +371 -35
  26. package/build/internal/src/middleware/helpers/actions.d.ts +66 -16
  27. package/build/internal/src/middleware/helpers/commandTemplate.d.ts +70 -8
  28. package/build/internal/src/middleware/helpers/copilotPersonality.d.ts +12 -0
  29. package/build/internal/src/middleware/helpers/goals.d.ts +4 -2
  30. package/build/internal/src/middleware/helpers/pushTrigger.d.ts +22 -0
  31. package/build/internal/src/middleware/helpers/rules.d.ts +45 -36
  32. package/build/internal/src/middleware/network.d.ts +15 -0
  33. package/build/internal/src/middleware/nudge.d.ts +1103 -124
  34. package/build/internal/src/middleware/organization.d.ts +1288 -61
  35. package/build/internal/src/middleware/organizationSettings.d.ts +320 -12
  36. package/build/internal/src/middleware/profile.d.ts +2 -0
  37. package/build/internal/src/middleware/recommendationSet.d.ts +96 -15
  38. package/build/internal/src/middleware/releases.d.ts +1 -1
  39. package/build/internal/src/middleware/theme.d.ts +431 -0
  40. package/build/internal/src/middleware/types.d.ts +52 -15
  41. package/build/internal/src/middleware/user.d.ts +1 -0
  42. package/build/internal/src/util/dispatchCustomEvent.d.ts +3 -3
  43. package/build/internal/src/util/operatingSystem.d.ts +2 -4
  44. package/package.json +1 -1
  45. package/src/index.ts +2 -2
  46. package/src/init.ts +12 -6
  47. package/src/snippet.ts +2 -2
  48. package/build/internal/src/client/AnalyticsEventTypes.d.ts +0 -1
  49. package/build/internal/src/middleware/IResourceSettings.d.ts +0 -3
  50. package/build/internal/src/middleware/dashboardFlags.d.ts +0 -9
@@ -0,0 +1,431 @@
1
+ import * as t from 'io-ts';
2
+ export declare const ThemeModeV: t.TypeC<{
3
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
4
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
5
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
6
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
7
+ }>;
8
+ export declare const ThemeV2V: t.UnionC<[t.TypeC<{
9
+ light_mode: t.TypeC<{
10
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
11
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
12
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
13
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
14
+ }>;
15
+ dark_mode: t.TypeC<{
16
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
17
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
18
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
19
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
20
+ }>;
21
+ }>, t.NullC, t.UndefinedC]>;
22
+ export declare const ThemeV: t.TypeC<{
23
+ id: t.StringC;
24
+ slug: t.StringC;
25
+ name: t.StringC;
26
+ default: t.BooleanC;
27
+ themeV2: t.UnionC<[t.TypeC<{
28
+ light_mode: t.TypeC<{
29
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
30
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
31
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
32
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
33
+ }>;
34
+ dark_mode: t.TypeC<{
35
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
36
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
37
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
38
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
39
+ }>;
40
+ }>, t.NullC, t.UndefinedC]>;
41
+ themeV2_draft: t.UnionC<[t.TypeC<{
42
+ light_mode: t.TypeC<{
43
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
44
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
45
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
46
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
47
+ }>;
48
+ dark_mode: t.TypeC<{
49
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
50
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
51
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
52
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
53
+ }>;
54
+ }>, t.NullC, t.UndefinedC]>;
55
+ organization: t.StringC;
56
+ }>;
57
+ export declare const ThemePatchV: t.PartialC<{
58
+ id: t.StringC;
59
+ slug: t.StringC;
60
+ name: t.StringC;
61
+ default: t.BooleanC;
62
+ themeV2: t.UnionC<[t.TypeC<{
63
+ light_mode: t.TypeC<{
64
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
65
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
66
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
67
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
68
+ }>;
69
+ dark_mode: t.TypeC<{
70
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
71
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
72
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
73
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
74
+ }>;
75
+ }>, t.NullC, t.UndefinedC]>;
76
+ themeV2_draft: t.UnionC<[t.TypeC<{
77
+ light_mode: t.TypeC<{
78
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
79
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
80
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
81
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
82
+ }>;
83
+ dark_mode: t.TypeC<{
84
+ var_defaults: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
85
+ var_overrides: t.RecordC<t.StringC, t.UnionC<[t.StringC, t.NumberC]>>;
86
+ component_overrides: t.RecordC<t.StringC, t.AnyC>;
87
+ mobile_overrides: t.RecordC<t.StringC, t.AnyC>;
88
+ }>;
89
+ }>, t.NullC, t.UndefinedC]>;
90
+ organization: t.StringC;
91
+ }>;
92
+ export declare class Theme {
93
+ static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
94
+ id: string;
95
+ slug: string;
96
+ name: string;
97
+ default: boolean;
98
+ themeV2: {
99
+ light_mode: {
100
+ var_defaults: {
101
+ [x: string]: string | number;
102
+ };
103
+ var_overrides: {
104
+ [x: string]: string | number;
105
+ };
106
+ component_overrides: {
107
+ [x: string]: any;
108
+ };
109
+ mobile_overrides: {
110
+ [x: string]: any;
111
+ };
112
+ };
113
+ dark_mode: {
114
+ var_defaults: {
115
+ [x: string]: string | number;
116
+ };
117
+ var_overrides: {
118
+ [x: string]: string | number;
119
+ };
120
+ component_overrides: {
121
+ [x: string]: any;
122
+ };
123
+ mobile_overrides: {
124
+ [x: string]: any;
125
+ };
126
+ };
127
+ } | null | undefined;
128
+ themeV2_draft: {
129
+ light_mode: {
130
+ var_defaults: {
131
+ [x: string]: string | number;
132
+ };
133
+ var_overrides: {
134
+ [x: string]: string | number;
135
+ };
136
+ component_overrides: {
137
+ [x: string]: any;
138
+ };
139
+ mobile_overrides: {
140
+ [x: string]: any;
141
+ };
142
+ };
143
+ dark_mode: {
144
+ var_defaults: {
145
+ [x: string]: string | number;
146
+ };
147
+ var_overrides: {
148
+ [x: string]: string | number;
149
+ };
150
+ component_overrides: {
151
+ [x: string]: any;
152
+ };
153
+ mobile_overrides: {
154
+ [x: string]: any;
155
+ };
156
+ };
157
+ } | null | undefined;
158
+ organization: string;
159
+ }[]>;
160
+ static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
161
+ onSuccess?: (() => void) | undefined;
162
+ onError?: ((err: string) => void) | undefined;
163
+ } | undefined) => Promise<{
164
+ id: string;
165
+ slug: string;
166
+ name: string;
167
+ default: boolean;
168
+ themeV2: {
169
+ light_mode: {
170
+ var_defaults: {
171
+ [x: string]: string | number;
172
+ };
173
+ var_overrides: {
174
+ [x: string]: string | number;
175
+ };
176
+ component_overrides: {
177
+ [x: string]: any;
178
+ };
179
+ mobile_overrides: {
180
+ [x: string]: any;
181
+ };
182
+ };
183
+ dark_mode: {
184
+ var_defaults: {
185
+ [x: string]: string | number;
186
+ };
187
+ var_overrides: {
188
+ [x: string]: string | number;
189
+ };
190
+ component_overrides: {
191
+ [x: string]: any;
192
+ };
193
+ mobile_overrides: {
194
+ [x: string]: any;
195
+ };
196
+ };
197
+ } | null | undefined;
198
+ themeV2_draft: {
199
+ light_mode: {
200
+ var_defaults: {
201
+ [x: string]: string | number;
202
+ };
203
+ var_overrides: {
204
+ [x: string]: string | number;
205
+ };
206
+ component_overrides: {
207
+ [x: string]: any;
208
+ };
209
+ mobile_overrides: {
210
+ [x: string]: any;
211
+ };
212
+ };
213
+ dark_mode: {
214
+ var_defaults: {
215
+ [x: string]: string | number;
216
+ };
217
+ var_overrides: {
218
+ [x: string]: string | number;
219
+ };
220
+ component_overrides: {
221
+ [x: string]: any;
222
+ };
223
+ mobile_overrides: {
224
+ [x: string]: any;
225
+ };
226
+ };
227
+ } | null | undefined;
228
+ organization: string;
229
+ }>;
230
+ static update: (theme: t.TypeOf<typeof ThemePatchV>) => Promise<{
231
+ id: string;
232
+ slug: string;
233
+ name: string;
234
+ default: boolean;
235
+ themeV2: {
236
+ light_mode: {
237
+ var_defaults: {
238
+ [x: string]: string | number;
239
+ };
240
+ var_overrides: {
241
+ [x: string]: string | number;
242
+ };
243
+ component_overrides: {
244
+ [x: string]: any;
245
+ };
246
+ mobile_overrides: {
247
+ [x: string]: any;
248
+ };
249
+ };
250
+ dark_mode: {
251
+ var_defaults: {
252
+ [x: string]: string | number;
253
+ };
254
+ var_overrides: {
255
+ [x: string]: string | number;
256
+ };
257
+ component_overrides: {
258
+ [x: string]: any;
259
+ };
260
+ mobile_overrides: {
261
+ [x: string]: any;
262
+ };
263
+ };
264
+ } | null | undefined;
265
+ themeV2_draft: {
266
+ light_mode: {
267
+ var_defaults: {
268
+ [x: string]: string | number;
269
+ };
270
+ var_overrides: {
271
+ [x: string]: string | number;
272
+ };
273
+ component_overrides: {
274
+ [x: string]: any;
275
+ };
276
+ mobile_overrides: {
277
+ [x: string]: any;
278
+ };
279
+ };
280
+ dark_mode: {
281
+ var_defaults: {
282
+ [x: string]: string | number;
283
+ };
284
+ var_overrides: {
285
+ [x: string]: string | number;
286
+ };
287
+ component_overrides: {
288
+ [x: string]: any;
289
+ };
290
+ mobile_overrides: {
291
+ [x: string]: any;
292
+ };
293
+ };
294
+ } | null | undefined;
295
+ organization: string;
296
+ }>;
297
+ static create: (object: {
298
+ id?: string | undefined;
299
+ slug?: string | undefined;
300
+ name?: string | undefined;
301
+ default?: boolean | undefined;
302
+ themeV2?: {
303
+ light_mode: {
304
+ var_defaults: {
305
+ [x: string]: string | number;
306
+ };
307
+ var_overrides: {
308
+ [x: string]: string | number;
309
+ };
310
+ component_overrides: {
311
+ [x: string]: any;
312
+ };
313
+ mobile_overrides: {
314
+ [x: string]: any;
315
+ };
316
+ };
317
+ dark_mode: {
318
+ var_defaults: {
319
+ [x: string]: string | number;
320
+ };
321
+ var_overrides: {
322
+ [x: string]: string | number;
323
+ };
324
+ component_overrides: {
325
+ [x: string]: any;
326
+ };
327
+ mobile_overrides: {
328
+ [x: string]: any;
329
+ };
330
+ };
331
+ } | null | undefined;
332
+ themeV2_draft?: {
333
+ light_mode: {
334
+ var_defaults: {
335
+ [x: string]: string | number;
336
+ };
337
+ var_overrides: {
338
+ [x: string]: string | number;
339
+ };
340
+ component_overrides: {
341
+ [x: string]: any;
342
+ };
343
+ mobile_overrides: {
344
+ [x: string]: any;
345
+ };
346
+ };
347
+ dark_mode: {
348
+ var_defaults: {
349
+ [x: string]: string | number;
350
+ };
351
+ var_overrides: {
352
+ [x: string]: string | number;
353
+ };
354
+ component_overrides: {
355
+ [x: string]: any;
356
+ };
357
+ mobile_overrides: {
358
+ [x: string]: any;
359
+ };
360
+ };
361
+ } | null | undefined;
362
+ organization?: string | undefined;
363
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
364
+ id: string;
365
+ slug: string;
366
+ name: string;
367
+ default: boolean;
368
+ themeV2: {
369
+ light_mode: {
370
+ var_defaults: {
371
+ [x: string]: string | number;
372
+ };
373
+ var_overrides: {
374
+ [x: string]: string | number;
375
+ };
376
+ component_overrides: {
377
+ [x: string]: any;
378
+ };
379
+ mobile_overrides: {
380
+ [x: string]: any;
381
+ };
382
+ };
383
+ dark_mode: {
384
+ var_defaults: {
385
+ [x: string]: string | number;
386
+ };
387
+ var_overrides: {
388
+ [x: string]: string | number;
389
+ };
390
+ component_overrides: {
391
+ [x: string]: any;
392
+ };
393
+ mobile_overrides: {
394
+ [x: string]: any;
395
+ };
396
+ };
397
+ } | null | undefined;
398
+ themeV2_draft: {
399
+ light_mode: {
400
+ var_defaults: {
401
+ [x: string]: string | number;
402
+ };
403
+ var_overrides: {
404
+ [x: string]: string | number;
405
+ };
406
+ component_overrides: {
407
+ [x: string]: any;
408
+ };
409
+ mobile_overrides: {
410
+ [x: string]: any;
411
+ };
412
+ };
413
+ dark_mode: {
414
+ var_defaults: {
415
+ [x: string]: string | number;
416
+ };
417
+ var_overrides: {
418
+ [x: string]: string | number;
419
+ };
420
+ component_overrides: {
421
+ [x: string]: any;
422
+ };
423
+ mobile_overrides: {
424
+ [x: string]: any;
425
+ };
426
+ };
427
+ } | null | undefined;
428
+ organization: string;
429
+ }>;
430
+ static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
431
+ }
@@ -1,13 +1,13 @@
1
1
  /*******************************************************************************/
2
2
  import * as t from 'io-ts';
3
- import { BatchEditorCommandResponseV, BatchOperationV, CommandV, HelpSyncCommandV, EditorCommandV, EditorCommandLiteV, CommandLiteV } from './command';
3
+ import { BatchEditorCommandResponseV, BatchOperationV, CommandV, EditorCommandV, EditorCommandLiteV, CommandLiteV, ContentTypeV } from './command';
4
4
  import { ArgumentMapV, ArgumentTypeV, ConditionV, ConditionOperatorV, StepArgumentTypeV, ContextArgumentV, SetArgumentV, DynamicArgumentV } from './helpers/argument';
5
5
  import { GenericBatchRequest } from './generics';
6
6
  import { OptionGroupRenderAsV } from './helpers/optionGroup';
7
- import { TemplateV, TemplateOptionsV, RequestTemplateV } from './helpers/commandTemplate';
8
- import { ActionV, CommandActionV, LabeledActionV, OpenChatActionV, NudgeActionV, QuestlistActionV, RequestV } from './helpers/actions';
7
+ import { TemplateV, TemplateOptionsV, RequestTemplateV, VideoTemplateV } from './helpers/commandTemplate';
8
+ import { ActionV, CommandActionV, LabeledActionV, OpenChatActionV, NudgeActionV, QuestlistActionV, RequestV, OpenChatActionTypeV, CommandActionMetaTypeV } from './helpers/actions';
9
9
  import { CommandCategoryV } from './commandCategory';
10
- import { OrganizationStatusV, KeyEventV, ResourceSettingsByContextKeyV, InternalSettingsV, OrganizationV } from './organization';
10
+ import { OrganizationStatusV, KeyEventV, RecordSettingsByContextKeyV, InternalSettingsV, OrganizationV } from './organization';
11
11
  import { OrganizationSettingsV } from './organizationSettings';
12
12
  import { UserV } from './user';
13
13
  import { ContextV } from './context';
@@ -15,8 +15,9 @@ import { GuideV } from './guide';
15
15
  import { HistoryEventV } from './historyEvent';
16
16
  import { HelpDocSyncLogMessageV, HelpDocsSyncV } from './helpDocsSync';
17
17
  import { HelpDocsIntegrationV } from './helpDocsIntegration';
18
- import { EndUserStoreDataV, EndUserV, NudgeInteractionStateV, NudgeInteractionsV, QuestlistInteractionStateV, QuestlistInteractionsV, DecideResponseV } from './endUser';
18
+ import { EndUserStoreDataV, EndUserV, NudgeInteractionStateV, NudgeInteractionsV, ChecklistInteractionStateV, ChecklistInteractionsV, DecideResponseV } from './endUser';
19
19
  import { SkinV } from './skin';
20
+ import { ThemeV, ThemeV2V, ThemeModeV } from './theme';
20
21
  import { ProfileV } from './profile';
21
22
  import { PlaceholderV } from './placeholder';
22
23
  import { EnvReleaseInfoV, ReleaseStepV, ReleaseV } from './releases';
@@ -25,25 +26,30 @@ import { NudgeContentBlockV, NudgeContentButtonBlockV, NudgeContentHelpDocBlockV
25
26
  import { TabV } from './tab';
26
27
  import { RuleExpressionAndV, RuleExpressionOrV, RuleExpressionV } from './helpers/rules';
27
28
  import { ChecklistItemV, ChecklistV } from './checklist';
28
- import { DashboardFlagsV } from './dashboardFlags';
29
29
  import { PushTriggerV } from './helpers/pushTrigger';
30
30
  import { FrequencyLimitV } from './helpers/frequencyLimit';
31
31
  import { AudienceV } from './helpers/audience';
32
32
  import { AdditionalResourceV } from './additionalResource';
33
33
  import { RecommendationSetV } from './recommendationSet';
34
34
  import { BillingProfileV, UsageV } from './billing';
35
- import { UserMessageV, AIMessageV, MessageV, AIAnswerPayloadV, AIAnswerV, ContinuationsPayloadV, ContinuationV, CreateAnswerFeedbackPayloadV, QuestionSuggestionsPayloadV, QuestionSuggestionsV, ExperienceV, CreateChatPayloadV } from './chat';
35
+ import { UserMessageV, AIMessageV, MessageV, AIAnswerPayloadV, AIAnswerV, ContinuationsPayloadV, ContinuationV, CreateAnswerFeedbackPayloadV, QuestionSuggestionsPayloadV, QuestionSuggestionsV, ExperienceV, CreateChatPayloadV, ChatV, CopilotSettingsPreviewV } from './chat';
36
36
  import { HelpDocHitV, SearchHelpDocsPayloadV, SearchHelpDocsResponseV } from './helpDocsSearch';
37
+ import { ExperienceHitV, ExperienceTypeOptions, SearchExperiencesPayloadV, SearchExperiencesResponseV } from './experiencesSearch';
37
38
  import { HelpHubLauncherSettingsV } from './helpHub';
39
+ import { EntityChangeV } from './entityChanges';
40
+ import { Flags } from './flags';
41
+ import { CopilotPersonalityAdjectiveV, CopilotPersonalityResponseFormatV, CopilotPersonalityResponseLengthV, CopilotPersonalityV } from './helpers/copilotPersonality';
42
+ import { ExperienceTemplateV } from './experienceTemplate';
38
43
  /*******************************************************************************/
39
44
  export type IInitOptions = {
40
45
  debug?: boolean;
41
46
  environment?: string;
42
47
  version?: string;
43
- config?: IConfigEndpointResponse;
48
+ config?: any;
49
+ nonce?: string;
44
50
  };
45
51
  /** Additional foobar init options */
46
- export declare const SUPPORTED_FOOBAR_INIT_DEPLOYMENT_OPTIONS: readonly ["labs", "prod"];
52
+ export declare const SUPPORTED_FOOBAR_INIT_DEPLOYMENT_OPTIONS: readonly ["dev", "labs", "prod"];
47
53
  export type IInitOptionsFoobar = IInitOptions & {
48
54
  deployment?: (typeof SUPPORTED_FOOBAR_INIT_DEPLOYMENT_OPTIONS)[number];
49
55
  disable_analytics?: boolean;
@@ -55,13 +61,13 @@ export type ICommandType = t.TypeOf<typeof CommandV> & unknown;
55
61
  export type IEditorCommandType = t.TypeOf<typeof EditorCommandV> & unknown;
56
62
  export type IEditorCommandTypeLite = t.TypeOf<typeof EditorCommandLiteV> & unknown;
57
63
  export type ICommandTypeLite = t.TypeOf<typeof CommandLiteV> & unknown;
58
- export type IHelpSyncCommandType = t.TypeOf<typeof HelpSyncCommandV> & unknown;
59
64
  export type { ICommandFromClientType } from './ICommandFromClientType';
60
65
  export type ICommandCategoryType = t.TypeOf<typeof CommandCategoryV> & unknown;
61
66
  export type IGuideType = t.TypeOf<typeof GuideV> & {
62
67
  preview?: boolean;
63
68
  } & unknown;
64
69
  export type IHistoryEventType = t.TypeOf<typeof HistoryEventV> & unknown;
70
+ export type IEntityChangeType = t.TypeOf<typeof EntityChangeV> & unknown;
65
71
  export type IHelpDocsSyncType = t.TypeOf<typeof HelpDocsSyncV> & unknown;
66
72
  export type IHelpDocsSyncLogMessageType = t.TypeOf<typeof HelpDocSyncLogMessageV> & unknown;
67
73
  export type IHelpDocsIntegrationType = t.TypeOf<typeof HelpDocsIntegrationV> & unknown;
@@ -69,13 +75,16 @@ export type IHelpHubLauncherSettingsType = t.TypeOf<typeof HelpHubLauncherSettin
69
75
  export type IOrganizationType = t.TypeOf<typeof OrganizationV> & unknown;
70
76
  export type IOrganizationStatusType = t.TypeOf<typeof OrganizationStatusV> & unknown;
71
77
  export type IInternalSettingsType = t.TypeOf<typeof InternalSettingsV> & unknown;
72
- export type IDashboardFlagsType = t.TypeOf<typeof DashboardFlagsV> & unknown;
73
78
  export type ISkinType = t.TypeOf<typeof SkinV> & unknown;
79
+ export type IThemeType = t.TypeOf<typeof ThemeV> & unknown;
80
+ export type IThemeV2Type = t.TypeOf<typeof ThemeV2V> & unknown;
81
+ export type IThemeModeType = t.TypeOf<typeof ThemeModeV> & unknown;
74
82
  export type IProfileType = t.TypeOf<typeof ProfileV> & unknown;
75
83
  export type IOrganizationSettingsType = t.TypeOf<typeof OrganizationSettingsV> & unknown;
76
84
  export type IPlaceholderType = t.TypeOf<typeof PlaceholderV> & unknown;
77
85
  export type ITabType = t.TypeOf<typeof TabV> & unknown;
78
86
  export type IEnvironmentType = t.TypeOf<typeof EnvironmentV> & unknown;
87
+ export type IChatType = t.TypeOf<typeof ChatV> & unknown;
79
88
  export type IReleaseStep = t.TypeOf<typeof ReleaseStepV> & unknown;
80
89
  export type IRelease = t.TypeOf<typeof ReleaseV> & unknown;
81
90
  export type IEnvReleaseInfo = t.TypeOf<typeof EnvReleaseInfoV> & unknown;
@@ -91,6 +100,7 @@ export type IArgumentMap = t.TypeOf<typeof ArgumentMapV> & unknown;
91
100
  export type IArgumentType = t.TypeOf<typeof ArgumentTypeV> & unknown;
92
101
  export type IStepArgumentType = t.TypeOf<typeof StepArgumentTypeV> & unknown;
93
102
  export type ITemplate = t.TypeOf<typeof TemplateV> & unknown;
103
+ export type IVideoTemplate = t.TypeOf<typeof VideoTemplateV> & unknown;
94
104
  export type RequestTemplateType = t.TypeOf<typeof RequestTemplateV> & unknown;
95
105
  export type RequestType = t.TypeOf<typeof RequestV> & unknown;
96
106
  export type ITemplateOptions = t.TypeOf<typeof TemplateOptionsV> & unknown;
@@ -109,6 +119,11 @@ export type IAudienceType = t.TypeOf<typeof AudienceV> & unknown;
109
119
  export type IPushTrigger = t.TypeOf<typeof PushTriggerV> & unknown;
110
120
  export type IFrequencyLimit = t.TypeOf<typeof FrequencyLimitV> & unknown;
111
121
  export type INudgeStepType = t.TypeOf<typeof NudgeStepV> & unknown;
122
+ export type INudgeTooltipStepType = INudgeStepType & {
123
+ form_factor: {
124
+ type: 'tooltip';
125
+ };
126
+ };
112
127
  export type INudgeStepContentBlockType = t.TypeOf<typeof NudgeContentBlockV> & unknown;
113
128
  export type INudgeStepContentMarkdownBlockType = t.TypeOf<typeof NudgeContentMarkdownBlockV> & unknown;
114
129
  export type INudgeStepContentImageBlockType = t.TypeOf<typeof NudgeContentImageBlockV> & unknown;
@@ -118,6 +133,7 @@ export type INudgeStepContentSurveyTextBlockType = t.TypeOf<typeof NudgeContentS
118
133
  export type INudgeStepContentSurveyTextShortBlockType = t.TypeOf<typeof NudgeStepContentSurveyTextShortBlockTypeV> & unknown;
119
134
  export type INudgeContentSurveyRatingBlockType = t.TypeOf<typeof NudgeContentSurveyRatingBlockV> & unknown;
120
135
  export type INudgeContentListBlock = t.TypeOf<typeof NudgeContentListBlockV> & unknown;
136
+ export type INudgeStepSurveyBlockType = INudgeStepContentSurveyTextBlockType | INudgeStepContentSurveyTextShortBlockType | INudgeContentSurveyRatingBlockType | INudgeContentListBlock;
121
137
  export type INudgeStepContentButtonBlockType = t.TypeOf<typeof NudgeContentButtonBlockV> & unknown;
122
138
  export type INudgeButtonAction = t.TypeOf<typeof NudgeButtonActionV> & unknown;
123
139
  export type INudgeButtonConditionalAction = t.TypeOf<typeof NudgeConditionalActionV> & unknown;
@@ -126,11 +142,14 @@ export type INudgeClientType = {
126
142
  passedConditionsInLastEvaluation: boolean;
127
143
  lastTriggeredTs?: number;
128
144
  };
145
+ export type IExperienceTemplate = t.TypeOf<typeof ExperienceTemplateV> & unknown;
129
146
  export type LabeledAction = t.TypeOf<typeof LabeledActionV> & unknown;
130
147
  export type OpenChatAction = t.TypeOf<typeof OpenChatActionV> & unknown;
148
+ export type OpenChatActionType = t.TypeOf<typeof OpenChatActionTypeV> & unknown;
131
149
  export type QuestlistAction = t.TypeOf<typeof QuestlistActionV> & unknown;
132
150
  export type NudgeAction = t.TypeOf<typeof NudgeActionV> & unknown;
133
151
  export type CommandAction = t.TypeOf<typeof CommandActionV> & unknown;
152
+ export type CommandActionMetaType = t.TypeOf<typeof CommandActionMetaTypeV> & unknown;
134
153
  export type Action = t.TypeOf<typeof ActionV> & unknown;
135
154
  export type IBillingProfile = t.TypeOf<typeof BillingProfileV> & unknown;
136
155
  export type IChecklist = t.TypeOf<typeof ChecklistV> & {
@@ -141,8 +160,8 @@ export type IChecklist = t.TypeOf<typeof ChecklistV> & {
141
160
  };
142
161
  } & unknown;
143
162
  export type IChecklistItem = t.TypeOf<typeof ChecklistItemV> & unknown;
144
- export type ChecklistInteractionState = t.TypeOf<typeof QuestlistInteractionStateV> & unknown;
145
- export type ChecklistInteractions = t.TypeOf<typeof QuestlistInteractionsV> & unknown;
163
+ export type ChecklistInteractionState = t.TypeOf<typeof ChecklistInteractionStateV> & unknown;
164
+ export type ChecklistInteractions = t.TypeOf<typeof ChecklistInteractionsV> & unknown;
146
165
  export type NudgeInteractionState = t.TypeOf<typeof NudgeInteractionStateV> & unknown;
147
166
  export type NudgeInteractions = t.TypeOf<typeof NudgeInteractionsV> & unknown;
148
167
  export type IMessageType = t.TypeOf<typeof MessageV> & unknown;
@@ -160,6 +179,16 @@ export type ICreateAnswerFeedbackPayloadType = t.TypeOf<typeof CreateAnswerFeedb
160
179
  export type ISearchHelpDocsPayloadType = t.TypeOf<typeof SearchHelpDocsPayloadV> & unknown;
161
180
  export type ISearchHelpDocsResponseType = t.TypeOf<typeof SearchHelpDocsResponseV> & unknown;
162
181
  export type IHelpDocHitType = t.TypeOf<typeof HelpDocHitV> & unknown;
182
+ export type ISearchExperiencesPayloadType = t.TypeOf<typeof SearchExperiencesPayloadV> & unknown;
183
+ export type ISearchExperiencesResponseType = t.TypeOf<typeof SearchExperiencesResponseV> & unknown;
184
+ export type IExperienceTypeOptions = t.TypeOf<typeof ExperienceTypeOptions> & unknown;
185
+ export type IExperienceHitType = t.TypeOf<typeof ExperienceHitV> & unknown;
186
+ export type ContentType = t.TypeOf<typeof ContentTypeV> & unknown;
187
+ export type ICopilotPersonalityType = t.TypeOf<typeof CopilotPersonalityV> & unknown;
188
+ export type ICopilotPersonalityAdjectivesType = t.TypeOf<typeof CopilotPersonalityAdjectiveV> & unknown;
189
+ export type ICopilotPersonalityResponseLengthType = t.TypeOf<typeof CopilotPersonalityResponseLengthV> & unknown;
190
+ export type ICopilotPersonalityResponseFormatType = t.TypeOf<typeof CopilotPersonalityResponseFormatV> & unknown;
191
+ export type ICopilotSettingsPreviewType = t.TypeOf<typeof CopilotSettingsPreviewV> & unknown;
163
192
  export interface ICommandInput {
164
193
  text: string;
165
194
  command: ICommandType;
@@ -213,6 +242,9 @@ export type IConfigEndpointResponse = {
213
242
  checklists?: IChecklist[];
214
243
  helphub_additional_resources?: IAdditionalResource[];
215
244
  helphub_recommendation_sets?: IRecommendationSet[];
245
+ __meta__?: {
246
+ latest_foobar_version?: string;
247
+ };
216
248
  };
217
249
  export type IConfigType = {
218
250
  commands: ICommandType[];
@@ -225,12 +257,17 @@ export type IConfigType = {
225
257
  checklists: IChecklist[];
226
258
  helphub_additional_resources: IAdditionalResource[];
227
259
  helphub_recommendation_sets: IRecommendationSet[];
260
+ __meta__?: {
261
+ latest_foobar_version?: string;
262
+ };
263
+ flags: Flags;
228
264
  };
229
- export type { IResourceSettings } from './IResourceSettings';
230
- export type IResourceSettingsByContextKey = t.TypeOf<typeof ResourceSettingsByContextKeyV> & unknown;
265
+ export type { IRecordSettings } from './IRecordSettings';
266
+ export type IRecordSettingsByContextKey = t.TypeOf<typeof RecordSettingsByContextKeyV> & unknown;
231
267
  export type { DetailPreviewObjectType, DetailPreviewType, DataRowMetadata } from './detailPreview';
232
268
  /*******************************************************************************/
233
269
  export declare const isCommand: (command?: ICommandType | any) => command is ICommandType;
234
270
  export declare const isResource: (option: any) => option is IResourceType;
235
271
  export declare const isContextArgument: (argument: IArgumentType) => argument is IContextArgumentType;
236
272
  export declare const isTimeArgument: (argument: IArgumentType) => argument is IDynamicArgumentType;
273
+ export declare const isSurveyBlock: (block: INudgeStepContentBlockType) => block is INudgeStepSurveyBlockType;
@@ -10,6 +10,7 @@ export declare const UserV: t.IntersectionC<[t.TypeC<{
10
10
  profile: t.NumberC;
11
11
  has_updated_password: t.BooleanC;
12
12
  is_active: t.BooleanC;
13
+ is_hijacked: t.BooleanC;
13
14
  }>, t.PartialC<{
14
15
  intercom_hash: t.StringC;
15
16
  }>]>;
@@ -1,14 +1,14 @@
1
- import { INudgeType } from '../middleware/types';
1
+ import type { INudgeType } from '../middleware/types';
2
2
  export type TUpdateEditorRouteDetails = {
3
3
  type: 'nudge';
4
4
  nudge: INudgeType;
5
- nudgeId: string | number;
6
- stepId: string | number;
5
+ stepIndex: number;
7
6
  } | {
8
7
  type: 'checklist';
9
8
  checklistId: string | number;
10
9
  } | {
11
10
  type: 'route';
12
11
  route_replacement: string;
12
+ action?: string;
13
13
  };
14
14
  export declare function dispatchCustomEvent<T>(eventType: string, detail: T, canBubble?: boolean, cancelable?: boolean): CustomEvent<T>;
@@ -1,10 +1,8 @@
1
1
  export type PlatformType = 'mac' | 'ios' | 'windows' | 'android' | 'linux';
2
2
  export type BrowserType = 'chrome' | 'firefox' | 'safari' | 'opera' | 'edge' | 'brave' | 'arc' | 'ie10' | 'ie11';
3
3
  export type DeviceType = 'mobile' | 'desktop';
4
- export declare const EDITOR_MOBILE_PREVIEW_SCREEN_HEIGHT: number;
5
- export declare const EDITOR_MOBILE_PREVIEW_SCREEN_WIDTH: number;
6
- export declare const EDITOR_MOBILE_PREVIEW_TOP_BAR_HEIGHT = 48;
7
- export declare const EDITOR_MOBILE_PREVIEW_BOTTOM_BAR_HEIGHT = 48;
4
+ export declare const EDITOR_MOBILE_PREVIEW_SCREEN_HEIGHT = 932;
5
+ export declare const EDITOR_MOBILE_PREVIEW_SCREEN_WIDTH = 430;
8
6
  export declare const isMobileDevice: () => boolean;
9
7
  export declare const getDeviceType: () => DeviceType;
10
8
  export declare const getBrowser: () => BrowserType | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandbar",
3
- "version": "1.9.0",
3
+ "version": "1.10.1",
4
4
  "description": "Javascript Utility for CommandBar",
5
5
  "main": "build/commandbar-js/src/index.js",
6
6
  "types": "build/commandbar-js/src/index.d.ts",