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.
@@ -45,10 +45,9 @@ export declare class AnalyticsV2 {
45
45
  } | null | undefined;
46
46
  } | null | undefined;
47
47
  }) => CBEvent, applyScrubbers?: (event: CBEvent) => CBEvent);
48
- flushServerQueue(useSendBeacon?: boolean): void;
48
+ enable(): void;
49
49
  track(name: CBEventName, properties?: CBEventProperties, additionalProperties?: Partial<Omit<CBEvent, 'name' | 'properties'>>, forceFlush?: boolean): void;
50
50
  identifyAsAdmin(): void;
51
51
  setBootStatus(hasBooted: boolean): void;
52
52
  setDecide(decide: IDecideResponseType | null | undefined): void;
53
- enable(): void;
54
53
  }
@@ -1,7 +1,6 @@
1
1
  declare const org = "<org_id>";
2
2
  declare let api: string;
3
3
  declare let cdn: string | undefined;
4
- declare const polyfills: string;
5
4
  declare const w: Record<string, unknown>;
6
5
  declare function loadScript(src: string, async?: boolean): void;
7
6
  declare function bootstrap(): void;
@@ -61,6 +61,7 @@ export type InstanceAttributes = {
61
61
  formFactor: FormFactorConfig;
62
62
  products: ProductConfig;
63
63
  copilotAPIHeaders?: Record<string, string>;
64
+ userTimezone?: string;
64
65
  };
65
66
  export type MetaAttributes = {
66
67
  wp_plugin_version?: string;
@@ -15,6 +15,9 @@ export declare const CommandFromClientV: t.IntersectionC<[t.TypeC<{
15
15
  value: t.StringC;
16
16
  }>, t.PartialC<{
17
17
  operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
18
+ meta: t.TypeC<{
19
+ command: t.StringC;
20
+ }>;
18
21
  }>]>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
19
22
  commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
20
23
  object: t.StringC;
@@ -149,10 +149,13 @@ declare const OrganizationAdditionalV: t.IntersectionC<[t.TypeC<{
149
149
  value: t.StringC;
150
150
  }>, t.PartialC<{
151
151
  operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
152
+ meta: t.TypeC<{
153
+ command: t.StringC;
154
+ }>;
152
155
  }>]>, t.TypeC<{
153
156
  type: t.LiteralC<"open_chat">;
154
157
  meta: t.TypeC<{
155
- 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<"">]>;
158
+ 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<"">]>;
156
159
  }>;
157
160
  }>, t.TypeC<{
158
161
  type: t.LiteralC<"dismiss">;
@@ -181,6 +184,7 @@ declare const OrganizationAdditionalV: t.IntersectionC<[t.TypeC<{
181
184
  }>]>;
182
185
  }>>;
183
186
  helphub_search_action: t.UnionC<[t.LiteralC<"search">, t.LiteralC<"ask">]>;
187
+ helphub_custom_theme: t.UnionC<[t.StringC, t.NullC]>;
184
188
  copilot_negative_feedback_fallback_enabled: t.BooleanC;
185
189
  copilot_negative_feedback_fallback_message: t.UnionC<[t.StringC, t.NullC]>;
186
190
  copilot_negative_feedback_fallback_actions: t.ArrayC<t.TypeC<{
@@ -205,10 +209,13 @@ declare const OrganizationAdditionalV: t.IntersectionC<[t.TypeC<{
205
209
  value: t.StringC;
206
210
  }>, t.PartialC<{
207
211
  operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
212
+ meta: t.TypeC<{
213
+ command: t.StringC;
214
+ }>;
208
215
  }>]>, t.TypeC<{
209
216
  type: t.LiteralC<"open_chat">;
210
217
  meta: t.TypeC<{
211
- 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<"">]>;
218
+ 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<"">]>;
212
219
  }>;
213
220
  }>, t.TypeC<{
214
221
  type: t.LiteralC<"dismiss">;
@@ -309,6 +316,21 @@ declare const OrganizationAdditionalV: t.IntersectionC<[t.TypeC<{
309
316
  ab_test_conditions: t.BooleanC;
310
317
  spotlight_ask_copilot_enabled: t.BooleanC;
311
318
  spotlight_ask_copilot_label: t.UnionC<[t.StringC, t.NullC]>;
319
+ spotlight_custom_theme: t.UnionC<[t.StringC, t.NullC]>;
320
+ spotlight_ask_copilot_audience: t.UnionC<[t.UnionC<[t.TypeC<{
321
+ type: t.LiteralC<"all_users">;
322
+ }>, t.TypeC<{
323
+ type: t.LiteralC<"rule_expression">;
324
+ expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
325
+ }>, t.TypeC<{
326
+ type: t.LiteralC<"named_rule_reference">;
327
+ rule_reference: t.IntersectionC<[t.TypeC<{
328
+ type: t.LiteralC<"named_rule">;
329
+ rule_id: t.UnionC<[t.NumberC, t.StringC]>;
330
+ }>, t.PartialC<{
331
+ reason: t.StringC;
332
+ }>]>;
333
+ }>]>, t.NullC]>;
312
334
  /** @deprecated Replaced by the `copilot_enabled` field */
313
335
  helphub_ai_enabled: t.BooleanC;
314
336
  /** @deprecated Removed entirely */
@@ -481,10 +503,13 @@ export declare const OrganizationV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
481
503
  value: t.StringC;
482
504
  }>, t.PartialC<{
483
505
  operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
506
+ meta: t.TypeC<{
507
+ command: t.StringC;
508
+ }>;
484
509
  }>]>, t.TypeC<{
485
510
  type: t.LiteralC<"open_chat">;
486
511
  meta: t.TypeC<{
487
- 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<"">]>;
512
+ 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<"">]>;
488
513
  }>;
489
514
  }>, t.TypeC<{
490
515
  type: t.LiteralC<"dismiss">;
@@ -513,6 +538,7 @@ export declare const OrganizationV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
513
538
  }>]>;
514
539
  }>>;
515
540
  helphub_search_action: t.UnionC<[t.LiteralC<"search">, t.LiteralC<"ask">]>;
541
+ helphub_custom_theme: t.UnionC<[t.StringC, t.NullC]>;
516
542
  copilot_negative_feedback_fallback_enabled: t.BooleanC;
517
543
  copilot_negative_feedback_fallback_message: t.UnionC<[t.StringC, t.NullC]>;
518
544
  copilot_negative_feedback_fallback_actions: t.ArrayC<t.TypeC<{
@@ -537,10 +563,13 @@ export declare const OrganizationV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
537
563
  value: t.StringC;
538
564
  }>, t.PartialC<{
539
565
  operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
566
+ meta: t.TypeC<{
567
+ command: t.StringC;
568
+ }>;
540
569
  }>]>, t.TypeC<{
541
570
  type: t.LiteralC<"open_chat">;
542
571
  meta: t.TypeC<{
543
- 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<"">]>;
572
+ 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<"">]>;
544
573
  }>;
545
574
  }>, t.TypeC<{
546
575
  type: t.LiteralC<"dismiss">;
@@ -641,6 +670,21 @@ export declare const OrganizationV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
641
670
  ab_test_conditions: t.BooleanC;
642
671
  spotlight_ask_copilot_enabled: t.BooleanC;
643
672
  spotlight_ask_copilot_label: t.UnionC<[t.StringC, t.NullC]>;
673
+ spotlight_custom_theme: t.UnionC<[t.StringC, t.NullC]>;
674
+ spotlight_ask_copilot_audience: t.UnionC<[t.UnionC<[t.TypeC<{
675
+ type: t.LiteralC<"all_users">;
676
+ }>, t.TypeC<{
677
+ type: t.LiteralC<"rule_expression">;
678
+ expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
679
+ }>, t.TypeC<{
680
+ type: t.LiteralC<"named_rule_reference">;
681
+ rule_reference: t.IntersectionC<[t.TypeC<{
682
+ type: t.LiteralC<"named_rule">;
683
+ rule_id: t.UnionC<[t.NumberC, t.StringC]>;
684
+ }>, t.PartialC<{
685
+ reason: t.StringC;
686
+ }>]>;
687
+ }>]>, t.NullC]>;
644
688
  /** @deprecated Replaced by the `copilot_enabled` field */
645
689
  helphub_ai_enabled: t.BooleanC;
646
690
  /** @deprecated Removed entirely */
@@ -28,10 +28,13 @@ export declare const AdditionalResourceV: t.IntersectionC<[t.TypeC<{}>, t.Inters
28
28
  value: t.StringC;
29
29
  }>, t.PartialC<{
30
30
  operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
31
+ meta: t.TypeC<{
32
+ command: t.StringC;
33
+ }>;
31
34
  }>]>, t.TypeC<{
32
35
  type: t.LiteralC<"open_chat">;
33
36
  meta: t.TypeC<{
34
- 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<"">]>;
37
+ 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<"">]>;
35
38
  }>;
36
39
  }>, t.TypeC<{
37
40
  type: t.LiteralC<"dismiss">;
@@ -89,10 +92,13 @@ export declare const BatchAdditionalResourceResponseV: t.TypeC<{
89
92
  value: t.StringC;
90
93
  }>, t.PartialC<{
91
94
  operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
95
+ meta: t.TypeC<{
96
+ command: t.StringC;
97
+ }>;
92
98
  }>]>, t.TypeC<{
93
99
  type: t.LiteralC<"open_chat">;
94
100
  meta: t.TypeC<{
95
- 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<"">]>;
101
+ 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<"">]>;
96
102
  }>;
97
103
  }>, t.TypeC<{
98
104
  type: t.LiteralC<"dismiss">;
@@ -148,10 +154,13 @@ export declare const decode: (data: any) => {} & {
148
154
  value: string;
149
155
  } & {
150
156
  operation?: "self" | "router" | "blank" | undefined;
157
+ meta?: {
158
+ command: string;
159
+ } | undefined;
151
160
  }) | {
152
161
  type: "open_chat";
153
162
  meta: {
154
- type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
163
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
155
164
  };
156
165
  } | {
157
166
  type: "dismiss";
@@ -208,10 +217,13 @@ export declare const list: (onSuccess?: (() => void) | undefined, onError?: ((er
208
217
  value: string;
209
218
  } & {
210
219
  operation?: "self" | "router" | "blank" | undefined;
220
+ meta?: {
221
+ command: string;
222
+ } | undefined;
211
223
  }) | {
212
224
  type: "open_chat";
213
225
  meta: {
214
- type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
226
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
215
227
  };
216
228
  } | {
217
229
  type: "dismiss";
@@ -268,10 +280,13 @@ export declare const create: (object: {} & {
268
280
  value: string;
269
281
  } & {
270
282
  operation?: "self" | "router" | "blank" | undefined;
283
+ meta?: {
284
+ command: string;
285
+ } | undefined;
271
286
  }) | {
272
287
  type: "open_chat";
273
288
  meta: {
274
- type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
289
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
275
290
  };
276
291
  } | {
277
292
  type: "dismiss";
@@ -327,10 +342,13 @@ export declare const create: (object: {} & {
327
342
  value: string;
328
343
  } & {
329
344
  operation?: "self" | "router" | "blank" | undefined;
345
+ meta?: {
346
+ command: string;
347
+ } | undefined;
330
348
  }) | {
331
349
  type: "open_chat";
332
350
  meta: {
333
- type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
351
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
334
352
  };
335
353
  } | {
336
354
  type: "dismiss";
@@ -388,10 +406,13 @@ export declare const update: (object: {} & {
388
406
  value: string;
389
407
  } & {
390
408
  operation?: "self" | "router" | "blank" | undefined;
409
+ meta?: {
410
+ command: string;
411
+ } | undefined;
391
412
  }) | {
392
413
  type: "open_chat";
393
414
  meta: {
394
- type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
415
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
395
416
  };
396
417
  } | {
397
418
  type: "dismiss";
@@ -447,10 +468,13 @@ export declare const update: (object: {} & {
447
468
  value: string;
448
469
  } & {
449
470
  operation?: "self" | "router" | "blank" | undefined;
471
+ meta?: {
472
+ command: string;
473
+ } | undefined;
450
474
  }) | {
451
475
  type: "open_chat";
452
476
  meta: {
453
- type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
477
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
454
478
  };
455
479
  } | {
456
480
  type: "dismiss";
@@ -508,10 +532,13 @@ export declare const batch: (request: t.TypeOf<typeof GenericBatchRequest>) => P
508
532
  value: string;
509
533
  } & {
510
534
  operation?: "self" | "router" | "blank" | undefined;
535
+ meta?: {
536
+ command: string;
537
+ } | undefined;
511
538
  }) | {
512
539
  type: "open_chat";
513
540
  meta: {
514
- type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
541
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "pylon" | "zendesk_handoff";
515
542
  };
516
543
  } | {
517
544
  type: "dismiss";