commandbar 1.6.9 → 1.6.12

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.
@@ -1,5 +1,6 @@
1
1
  /*******************************************************************************/
2
2
  import * as t from 'io-ts';
3
+ import { GenericBatchRequest } from './generics';
3
4
  export declare const CommandCategoryV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
4
5
  id: t.NumberC;
5
6
  organization: t.UnionC<[t.NumberC, t.StringC]>;
@@ -13,8 +14,31 @@ export declare const CommandCategoryV: t.IntersectionC<[t.IntersectionC<[t.TypeC
13
14
  setting_pin_to_bottom: t.BooleanC;
14
15
  search_tab_enabled: t.BooleanC;
15
16
  search_tab_name: t.StringC;
17
+ slash_filter_enabled: t.BooleanC;
18
+ slash_filter_keyword: t.UnionC<[t.StringC, t.NullC]>;
16
19
  search_tab_instruction: t.StringC;
20
+ track_recents: t.BooleanC;
17
21
  }>]>;
22
+ export declare const BatchEditorCategoryResponseV: t.TypeC<{
23
+ batch: t.ArrayC<t.IntersectionC<[t.IntersectionC<[t.TypeC<{
24
+ id: t.NumberC;
25
+ organization: t.UnionC<[t.NumberC, t.StringC]>;
26
+ name: t.StringC;
27
+ }>, t.PartialC<{}>]>, t.TypeC<{
28
+ sort_key: t.UnionC<[t.NumberC, t.NullC]>;
29
+ icon: t.UnionC<[t.StringC, t.NullC]>;
30
+ render_as: t.UnionC<[t.LiteralC<"list">, t.LiteralC<"grid">]>;
31
+ setting_hide_before_search: t.BooleanC;
32
+ setting_max_options_count: t.UnionC<[t.NumberC, t.NullC]>;
33
+ setting_pin_to_bottom: t.BooleanC;
34
+ search_tab_enabled: t.BooleanC;
35
+ search_tab_name: t.StringC;
36
+ slash_filter_enabled: t.BooleanC;
37
+ slash_filter_keyword: t.UnionC<[t.StringC, t.NullC]>;
38
+ search_tab_instruction: t.StringC;
39
+ track_recents: t.BooleanC;
40
+ }>]>>;
41
+ }>;
18
42
  export declare class CommandCategory {
19
43
  static create: (object: {
20
44
  id: number;
@@ -29,7 +53,10 @@ export declare class CommandCategory {
29
53
  setting_pin_to_bottom: boolean;
30
54
  search_tab_enabled: boolean;
31
55
  search_tab_name: string;
56
+ slash_filter_enabled: boolean;
57
+ slash_filter_keyword: string | null;
32
58
  search_tab_instruction: string;
59
+ track_recents: boolean;
33
60
  }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
34
61
  id: number;
35
62
  organization: string | number;
@@ -43,7 +70,10 @@ export declare class CommandCategory {
43
70
  setting_pin_to_bottom: boolean;
44
71
  search_tab_enabled: boolean;
45
72
  search_tab_name: string;
73
+ slash_filter_enabled: boolean;
74
+ slash_filter_keyword: string | null;
46
75
  search_tab_instruction: string;
76
+ track_recents: boolean;
47
77
  }>;
48
78
  static update: (object: {
49
79
  id: number;
@@ -58,7 +88,10 @@ export declare class CommandCategory {
58
88
  setting_pin_to_bottom: boolean;
59
89
  search_tab_enabled: boolean;
60
90
  search_tab_name: string;
91
+ slash_filter_enabled: boolean;
92
+ slash_filter_keyword: string | null;
61
93
  search_tab_instruction: string;
94
+ track_recents: boolean;
62
95
  }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
63
96
  id: number;
64
97
  organization: string | number;
@@ -72,7 +105,10 @@ export declare class CommandCategory {
72
105
  setting_pin_to_bottom: boolean;
73
106
  search_tab_enabled: boolean;
74
107
  search_tab_name: string;
108
+ slash_filter_enabled: boolean;
109
+ slash_filter_keyword: string | null;
75
110
  search_tab_instruction: string;
111
+ track_recents: boolean;
76
112
  }>;
77
113
  static delete: (id: string | number, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
78
114
  static decode: (data: any) => {
@@ -88,6 +124,29 @@ export declare class CommandCategory {
88
124
  setting_pin_to_bottom: boolean;
89
125
  search_tab_enabled: boolean;
90
126
  search_tab_name: string;
127
+ slash_filter_enabled: boolean;
128
+ slash_filter_keyword: string | null;
91
129
  search_tab_instruction: string;
130
+ track_recents: boolean;
92
131
  };
132
+ static batch: (request: t.TypeOf<typeof GenericBatchRequest>) => Promise<{
133
+ batch: ({
134
+ id: number;
135
+ organization: string | number;
136
+ name: string;
137
+ } & {} & {
138
+ sort_key: number | null;
139
+ icon: string | null;
140
+ render_as: "grid" | "list";
141
+ setting_hide_before_search: boolean;
142
+ setting_max_options_count: number | null;
143
+ setting_pin_to_bottom: boolean;
144
+ search_tab_enabled: boolean;
145
+ search_tab_name: string;
146
+ slash_filter_enabled: boolean;
147
+ slash_filter_keyword: string | null;
148
+ search_tab_instruction: string;
149
+ track_recents: boolean;
150
+ })[];
151
+ }>;
93
152
  }
@@ -1,7 +1,7 @@
1
1
  /*******************************************************************************/
2
2
  import * as t from 'io-ts';
3
3
  export declare const DetailPreviewObjectV: t.TypeC<{
4
- type: t.UnionC<[t.LiteralC<"plaintext">, t.LiteralC<"markdown">, t.LiteralC<"html">, t.LiteralC<"reader">, t.LiteralC<"react">]>;
4
+ type: t.UnionC<[t.LiteralC<"plaintext">, t.LiteralC<"markdown">, t.LiteralC<"html">, t.LiteralC<"react">, t.LiteralC<"video">, t.NullC]>;
5
5
  value: t.StringC;
6
6
  }>;
7
7
  export declare type DetailPreviewObjectType = t.TypeOf<typeof DetailPreviewObjectV>;
@@ -14,4 +14,8 @@ export declare type DataRowMedata = {
14
14
  uid?: string;
15
15
  };
16
16
  export declare const DEFAULT_DETAIL_PREVIEW_TYPE: DetailPreviewObjectType['type'];
17
- export declare const standardize: (item: undefined | null | DetailPreviewType) => undefined | DetailPreviewObjectType[];
17
+ export declare const standardize: (item: undefined | null | DetailPreviewType) => null | DetailPreviewObjectType[];
18
+ export declare const getFirstDetail: (detail?: DetailPreviewType | null | undefined) => DetailPreviewObjectType | {
19
+ type: null;
20
+ value: null;
21
+ };
@@ -5,31 +5,35 @@ declare const GenericObject: t.TypeC<{
5
5
  id: t.UnionC<[t.NumberC, t.StringC]>;
6
6
  }>;
7
7
  export declare type GenericObjectType = t.TypeOf<typeof GenericObject>;
8
- declare function createObject<T, Q, O, I>(output: t.Type<T, O, I>, input: t.Type<Q, O, I>, url: string, params?: Record<string, string>): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
9
- declare function readObject<T, O, I>(arg: t.Type<T, O, I>, url: string): (arg0: string, params?: Record<string, string>, callbacks?: {
8
+ export declare const GenericBatchRequest: t.TypeC<{
9
+ batch: t.ArrayC<t.UnknownC>;
10
+ note: t.StringC;
11
+ }>;
12
+ declare function createObject<T, Q, O, I>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, O, I> & t.HasProps, url: string, params?: Record<string, string>): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
13
+ declare function readObject<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, url: string): (arg0: string, params?: Record<string, string>, callbacks?: {
10
14
  onSuccess?: () => void;
11
15
  onError?: (err: string) => void;
12
16
  }) => Promise<T>;
13
- declare function listObject<T, O, I>(arg: t.Type<T, O, I>, obj: string): (onSuccess?: () => void, onError?: (err: string) => void) => Promise<T[]>;
14
- declare function updateObject<T, O, I, Q extends GenericObjectType>(output: t.Type<T, O, I>, input: t.Type<Q, O, I>, url: string, params?: Record<string, string>): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
15
- declare function deleteObject<T, O, I>(arg: t.Type<T, O, I>, url: string, params?: Record<string, string>): (id: number | string, onSuccess?: () => void, onError?: (err: string) => void) => Promise<void>;
16
- declare function readObjectDetail<T, O, I>(arg: t.Type<T, O, I>, url: string, detail: string): (arg0: string, urlArgs?: {
17
+ declare function listObject<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, obj: string): (onSuccess?: () => void, onError?: (err: string) => void) => Promise<T[]>;
18
+ declare function updateObject<T, O, I, Q extends GenericObjectType>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, O, I> & t.HasProps, url: string, params?: Record<string, string>): (object: Q, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
19
+ declare function deleteObject<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, url: string, params?: Record<string, string>): (id: number | string, onSuccess?: () => void, onError?: (err: string) => void) => Promise<void>;
20
+ declare function readObjectDetail<T, O, I>(arg: t.Type<T, O, I> & t.HasProps, url: string, detail: string): (arg0: string, urlArgs?: {
17
21
  [arg: string]: string;
18
22
  }, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
19
- declare function updateObjectDetail<T, O, I, J, K, Q extends GenericObjectType>(output: t.Type<T, O, I>, input: t.Type<Q, K, J>, url: string, detail: string): (object: Q, urlArgs?: {
23
+ declare function updateObjectDetail<T, O, I, J, K, Q extends GenericObjectType>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, K, J> & t.HasProps, url: string, detail: string): (object: Q, urlArgs?: {
20
24
  [arg: string]: string;
21
25
  }, onSuccess?: () => void, onError?: (err: string) => void) => Promise<T>;
22
- declare function createObjectDetail<T, O, I, J, K, Q extends GenericObjectType>(output: t.Type<T, O, I>, input: t.Type<Q, K, J>, url: string, detail: string): (object: Q, onSuccess?: () => void, onError?: (err: string) => void, urlArgs?: {
26
+ declare function createObjectDetail<T, O, I, J, K, Q extends GenericObjectType>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, K, J> & t.HasProps, url: string, detail: string): (object: Q, onSuccess?: () => void, onError?: (err: string) => void, urlArgs?: {
23
27
  [arg: string]: string;
24
28
  }) => Promise<T>;
25
29
  declare function loadIDList(ids: number[], klass: any, method?: string, urlArgs?: {
26
30
  [arg: string]: string;
27
31
  }): Promise<any[]>;
28
- declare function read<T, O, I>(output: t.Type<T, O, I>, url: string): (params?: Record<string, string>, callbacks?: {
32
+ declare function read<T, O, I>(output: t.Type<T, O, I> & t.HasProps, url: string): (params?: Record<string, string>, callbacks?: {
29
33
  onSuccess?: () => void;
30
34
  onError?: (err: string) => void;
31
35
  }) => Promise<T>;
32
- declare function update<T, O, I, Q>(output: t.Type<T, O, I>, input: t.Type<Q, O, I>, url: string): (object: Q, params?: Record<string, string>, callbacks?: {
36
+ declare function update<T, O, I, Q>(output: t.Type<T, O, I> & t.HasProps, input: t.Type<Q, O, I> & t.HasProps, url: string): (object: Q, params?: Record<string, string>, callbacks?: {
33
37
  onSuccess?: () => void;
34
38
  onError?: (err: string) => void;
35
39
  }) => Promise<T>;
@@ -0,0 +1,66 @@
1
+ import * as t from 'io-ts';
2
+ export declare const HelpDocsIntegrationV: t.IntersectionC<[t.TypeC<{
3
+ id: t.NumberC;
4
+ organization: t.StringC;
5
+ type: t.StringC;
6
+ schedule: t.StringC;
7
+ meta: t.UnionC<[t.RecordC<t.StringC, t.AnyC>, t.NullC]>;
8
+ }>, t.PartialC<{}>]>;
9
+ export declare class HelpDocsIntegration {
10
+ static create: (object: {
11
+ id: number;
12
+ organization: string;
13
+ type: string;
14
+ schedule: string;
15
+ meta: {
16
+ [x: string]: any;
17
+ } | null;
18
+ } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
19
+ id: number;
20
+ organization: string;
21
+ type: string;
22
+ schedule: string;
23
+ meta: {
24
+ [x: string]: any;
25
+ } | null;
26
+ } & {}>;
27
+ static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
28
+ onSuccess?: (() => void) | undefined;
29
+ onError?: ((err: string) => void) | undefined;
30
+ } | undefined) => Promise<{
31
+ id: number;
32
+ organization: string;
33
+ type: string;
34
+ schedule: string;
35
+ meta: {
36
+ [x: string]: any;
37
+ } | null;
38
+ } & {}>;
39
+ static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
40
+ id: number;
41
+ organization: string;
42
+ type: string;
43
+ schedule: string;
44
+ meta: {
45
+ [x: string]: any;
46
+ } | null;
47
+ } & {})[]>;
48
+ static update: (object: {
49
+ id: number;
50
+ organization: string;
51
+ type: string;
52
+ schedule: string;
53
+ meta: {
54
+ [x: string]: any;
55
+ } | null;
56
+ } & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
57
+ id: number;
58
+ organization: string;
59
+ type: string;
60
+ schedule: string;
61
+ meta: {
62
+ [x: string]: any;
63
+ } | null;
64
+ } & {}>;
65
+ static delete: (id: string | number, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
66
+ }
@@ -0,0 +1,42 @@
1
+ import * as t from 'io-ts';
2
+ export declare const HelpDocsSyncV: t.IntersectionC<[t.TypeC<{
3
+ id: t.NumberC;
4
+ integration: t.NumberC;
5
+ scheduled: t.BooleanC;
6
+ }>, t.PartialC<{
7
+ commands: t.ArrayC<t.NumberC>;
8
+ started: t.StringC;
9
+ ended: t.StringC;
10
+ log: t.ArrayC<t.ArrayC<t.AnyC>>;
11
+ }>]>;
12
+ export declare class HelpDocsSync {
13
+ static create: (object: {
14
+ id: number;
15
+ integration: number;
16
+ scheduled: boolean;
17
+ } & {
18
+ commands?: number[] | undefined;
19
+ started?: string | undefined;
20
+ ended?: string | undefined;
21
+ log?: any[][] | undefined;
22
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
23
+ id: number;
24
+ integration: number;
25
+ scheduled: boolean;
26
+ } & {
27
+ commands?: number[] | undefined;
28
+ started?: string | undefined;
29
+ ended?: string | undefined;
30
+ log?: any[][] | undefined;
31
+ }>;
32
+ static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
33
+ id: number;
34
+ integration: number;
35
+ scheduled: boolean;
36
+ } & {
37
+ commands?: number[] | undefined;
38
+ started?: string | undefined;
39
+ ended?: string | undefined;
40
+ log?: any[][] | undefined;
41
+ })[]>;
42
+ }
@@ -32,6 +32,15 @@ export declare const OrganizationSettingsV: t.TypeC<{
32
32
  in_bar_feedback: t.BooleanC;
33
33
  summon_hotkey_override: t.UnionC<[t.StringC, t.NullC]>;
34
34
  end_user_shortcuts_enabled: t.BooleanC;
35
+ fallback_commands: t.ArrayC<t.NumberC>;
36
+ end_user_recents_enabled: t.BooleanC;
37
+ tab_direction: t.UnionC<[t.LiteralC<"horizontal">, t.LiteralC<"vertical">]>;
38
+ recommended_tab_enabled: t.BooleanC;
39
+ recents_tab_enabled: t.BooleanC;
40
+ recommended_tab_instruction: t.StringC;
41
+ recents_tab_instruction: t.StringC;
42
+ hotload_help_docs: t.BooleanC;
43
+ slash_filters_enabled: t.BooleanC;
35
44
  }>;
36
45
  export declare class Organization {
37
46
  static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
@@ -76,8 +85,11 @@ export declare class Organization {
76
85
  show_with_no_results?: boolean | undefined;
77
86
  search_tab_enabled?: boolean | undefined;
78
87
  search_tab_name?: string | null | undefined;
88
+ slash_filter_enabled?: boolean | undefined;
89
+ slash_filter_keyword?: string | null | undefined;
79
90
  search_tab_instruction?: string | null | undefined;
80
91
  setting_pin_to_bottom?: boolean | undefined;
92
+ track_recents?: boolean | undefined;
81
93
  };
82
94
  };
83
95
  should_show_onboarding: boolean;
@@ -92,8 +104,17 @@ export declare class Organization {
92
104
  summon_hotkey_override: string | null;
93
105
  end_user_hotkeys: boolean | undefined;
94
106
  end_user_shortcuts_enabled: boolean;
107
+ end_user_recents_enabled: boolean;
95
108
  releases_available: boolean;
96
109
  releases_enabled: boolean;
110
+ fallback_commands: number[];
111
+ tab_direction: "horizontal" | "vertical";
112
+ recommended_tab_enabled: boolean;
113
+ recents_tab_enabled: boolean;
114
+ recommended_tab_instruction: string;
115
+ recents_tab_instruction: string;
116
+ hotload_help_docs: boolean;
117
+ slash_filters_enabled: boolean;
97
118
  }>;
98
119
  static update: (object: {
99
120
  id: string | number;
@@ -134,8 +155,11 @@ export declare class Organization {
134
155
  show_with_no_results?: boolean | undefined;
135
156
  search_tab_enabled?: boolean | undefined;
136
157
  search_tab_name?: string | null | undefined;
158
+ slash_filter_enabled?: boolean | undefined;
159
+ slash_filter_keyword?: string | null | undefined;
137
160
  search_tab_instruction?: string | null | undefined;
138
161
  setting_pin_to_bottom?: boolean | undefined;
162
+ track_recents?: boolean | undefined;
139
163
  };
140
164
  };
141
165
  should_show_onboarding: boolean;
@@ -150,8 +174,17 @@ export declare class Organization {
150
174
  summon_hotkey_override: string | null;
151
175
  end_user_hotkeys: boolean | undefined;
152
176
  end_user_shortcuts_enabled: boolean;
177
+ end_user_recents_enabled: boolean;
153
178
  releases_available: boolean;
154
179
  releases_enabled: boolean;
180
+ fallback_commands: number[];
181
+ tab_direction: "horizontal" | "vertical";
182
+ recommended_tab_enabled: boolean;
183
+ recents_tab_enabled: boolean;
184
+ recommended_tab_instruction: string;
185
+ recents_tab_instruction: string;
186
+ hotload_help_docs: boolean;
187
+ slash_filters_enabled: boolean;
155
188
  }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
156
189
  id: string | number;
157
190
  name: string;
@@ -191,8 +224,11 @@ export declare class Organization {
191
224
  show_with_no_results?: boolean | undefined;
192
225
  search_tab_enabled?: boolean | undefined;
193
226
  search_tab_name?: string | null | undefined;
227
+ slash_filter_enabled?: boolean | undefined;
228
+ slash_filter_keyword?: string | null | undefined;
194
229
  search_tab_instruction?: string | null | undefined;
195
230
  setting_pin_to_bottom?: boolean | undefined;
231
+ track_recents?: boolean | undefined;
196
232
  };
197
233
  };
198
234
  should_show_onboarding: boolean;
@@ -207,8 +243,17 @@ export declare class Organization {
207
243
  summon_hotkey_override: string | null;
208
244
  end_user_hotkeys: boolean | undefined;
209
245
  end_user_shortcuts_enabled: boolean;
246
+ end_user_recents_enabled: boolean;
210
247
  releases_available: boolean;
211
248
  releases_enabled: boolean;
249
+ fallback_commands: number[];
250
+ tab_direction: "horizontal" | "vertical";
251
+ recommended_tab_enabled: boolean;
252
+ recents_tab_enabled: boolean;
253
+ recommended_tab_instruction: string;
254
+ recents_tab_instruction: string;
255
+ hotload_help_docs: boolean;
256
+ slash_filters_enabled: boolean;
212
257
  }>;
213
258
  static listCommands: (orgUID: string) => Promise<({
214
259
  id: number;
@@ -239,7 +284,7 @@ export declare class Organization {
239
284
  hoverTooltip?: boolean | undefined;
240
285
  operation?: "self" | "router" | "blank" | undefined;
241
286
  }) | ({
242
- type: "click" | "clickBySelector" | "clickByXpath";
287
+ type: "click" | "clickByXpath" | "clickBySelector";
243
288
  value: string[];
244
289
  } & {} & {
245
290
  commandType?: "object" | "independent" | "help" | undefined;
@@ -306,13 +351,6 @@ export declare class Organization {
306
351
  name?: string | undefined;
307
352
  last_available?: string | null | undefined;
308
353
  modified?: string | undefined;
309
- detail?: string | {
310
- type: "html" | "plaintext" | "markdown" | "reader" | "react";
311
- value: string;
312
- } | {
313
- type: "html" | "plaintext" | "markdown" | "reader" | "react";
314
- value: string;
315
- }[] | undefined;
316
354
  } & {
317
355
  arguments: {
318
356
  [x: string]: ({
@@ -444,6 +482,7 @@ export declare class Organization {
444
482
  confirm: string;
445
483
  shortcut: string[];
446
484
  explanation: string;
485
+ heading: string;
447
486
  is_live: boolean;
448
487
  category: number | null;
449
488
  sort_key: number | null;
@@ -467,6 +506,13 @@ export declare class Organization {
467
506
  shortcut_win: string[];
468
507
  hotkey_mac: string;
469
508
  hotkey_win: string;
509
+ detail: string | {
510
+ type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
511
+ value: string;
512
+ } | (string | {
513
+ type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
514
+ value: string;
515
+ })[] | null;
470
516
  })[]>;
471
517
  static listCommandCategories: (orgUID: string) => Promise<({
472
518
  id: number;
@@ -481,7 +527,10 @@ export declare class Organization {
481
527
  setting_pin_to_bottom: boolean;
482
528
  search_tab_enabled: boolean;
483
529
  search_tab_name: string;
530
+ slash_filter_enabled: boolean;
531
+ slash_filter_keyword: string | null;
484
532
  search_tab_instruction: string;
533
+ track_recents: boolean;
485
534
  })[]>;
486
535
  static listGuides: (orgUID: string) => Promise<({
487
536
  id: number;
@@ -583,6 +632,15 @@ export declare class Organization {
583
632
  in_bar_feedback: boolean;
584
633
  summon_hotkey_override: string | null;
585
634
  end_user_shortcuts_enabled: boolean;
635
+ fallback_commands: number[];
636
+ end_user_recents_enabled: boolean;
637
+ tab_direction: "horizontal" | "vertical";
638
+ recommended_tab_enabled: boolean;
639
+ recents_tab_enabled: boolean;
640
+ recommended_tab_instruction: string;
641
+ recents_tab_instruction: string;
642
+ hotload_help_docs: boolean;
643
+ slash_filters_enabled: boolean;
586
644
  }>;
587
645
  static updateSetting: (object: {
588
646
  end_user_limit?: number | undefined;
@@ -602,6 +660,15 @@ export declare class Organization {
602
660
  in_bar_feedback?: boolean | undefined;
603
661
  summon_hotkey_override?: string | null | undefined;
604
662
  end_user_shortcuts_enabled?: boolean | undefined;
663
+ fallback_commands?: number[] | undefined;
664
+ end_user_recents_enabled?: boolean | undefined;
665
+ tab_direction?: "horizontal" | "vertical" | undefined;
666
+ recommended_tab_enabled?: boolean | undefined;
667
+ recents_tab_enabled?: boolean | undefined;
668
+ recommended_tab_instruction?: string | undefined;
669
+ recents_tab_instruction?: string | undefined;
670
+ hotload_help_docs?: boolean | undefined;
671
+ slash_filters_enabled?: boolean | undefined;
605
672
  }, params?: Record<string, string> | undefined, callbacks?: {
606
673
  onSuccess?: (() => void) | undefined;
607
674
  onError?: ((err: string) => void) | undefined;
@@ -623,6 +690,15 @@ export declare class Organization {
623
690
  in_bar_feedback: boolean;
624
691
  summon_hotkey_override: string | null;
625
692
  end_user_shortcuts_enabled: boolean;
693
+ fallback_commands: number[];
694
+ end_user_recents_enabled: boolean;
695
+ tab_direction: "horizontal" | "vertical";
696
+ recommended_tab_enabled: boolean;
697
+ recents_tab_enabled: boolean;
698
+ recommended_tab_instruction: string;
699
+ recents_tab_instruction: string;
700
+ hotload_help_docs: boolean;
701
+ slash_filters_enabled: boolean;
626
702
  }>;
627
703
  static decode: (data: any) => {
628
704
  id: string | number;
@@ -663,8 +739,11 @@ export declare class Organization {
663
739
  show_with_no_results?: boolean | undefined;
664
740
  search_tab_enabled?: boolean | undefined;
665
741
  search_tab_name?: string | null | undefined;
742
+ slash_filter_enabled?: boolean | undefined;
743
+ slash_filter_keyword?: string | null | undefined;
666
744
  search_tab_instruction?: string | null | undefined;
667
745
  setting_pin_to_bottom?: boolean | undefined;
746
+ track_recents?: boolean | undefined;
668
747
  };
669
748
  };
670
749
  should_show_onboarding: boolean;
@@ -679,7 +758,16 @@ export declare class Organization {
679
758
  summon_hotkey_override: string | null;
680
759
  end_user_hotkeys: boolean | undefined;
681
760
  end_user_shortcuts_enabled: boolean;
761
+ end_user_recents_enabled: boolean;
682
762
  releases_available: boolean;
683
763
  releases_enabled: boolean;
764
+ fallback_commands: number[];
765
+ tab_direction: "horizontal" | "vertical";
766
+ recommended_tab_enabled: boolean;
767
+ recents_tab_enabled: boolean;
768
+ recommended_tab_instruction: string;
769
+ recents_tab_instruction: string;
770
+ hotload_help_docs: boolean;
771
+ slash_filters_enabled: boolean;
684
772
  };
685
773
  }
@@ -224,7 +224,7 @@ export declare class Releases {
224
224
  tags: string[];
225
225
  };
226
226
  }>;
227
- static readDiff: (fromId: string, toId: string) => Promise<any>;
227
+ static readDiff: (fromId: string, toId: string) => Promise<unknown>;
228
228
  static promoteReleaseStep: (releaseStepId: number) => Promise<any>;
229
229
  static promoteReleaseToFirstEnv: (releaseId: number) => Promise<{
230
230
  created_by: string;
@@ -1,7 +1,8 @@
1
1
  /*******************************************************************************/
2
2
  import * as t from 'io-ts';
3
- import { BatchEditorCommandRequestV, BatchEditorCommandResponseV, BatchOperationV, CommandV, EditorCommandV } from './command';
3
+ import { BatchEditorCommandResponseV, BatchOperationV, CommandV, HelpSyncCommandV, EditorCommandV } from './command';
4
4
  import { ArgumentMapV, ArgumentTypeV, ConditionV, ConditionOperatorV, StepArgumentTypeV, ContextArgumentV, SetArgumentV, DynamicArgumentV, DependentArgumentV, FunctionArgumentV } from './helpers/argument';
5
+ import { GenericBatchRequest } from './generics';
5
6
  import { OptionGroupRenderAsV } from './helpers/optionGroup';
6
7
  import { TemplateV, TemplateOptionsV, RequestTemplateV, RequestV } from './helpers/commandTemplate';
7
8
  import { CommandCategoryV } from './commandCategory';
@@ -10,6 +11,8 @@ import { UserV } from './user';
10
11
  import { ContextV } from './context';
11
12
  import { GuideV } from './guide';
12
13
  import { HistoryEventV } from './historyEvent';
14
+ import { HelpDocsSyncV } from './helpDocsSync';
15
+ import { HelpDocsIntegrationV } from './helpDocsIntegration';
13
16
  import { EndUserV } from './helpers/endUser';
14
17
  import { SkinV } from './skin';
15
18
  import { ProfileV } from './profile';
@@ -21,12 +24,15 @@ export declare type IContextType = t.TypeOf<typeof ContextV>;
21
24
  export declare type IUserType = t.TypeOf<typeof UserV>;
22
25
  export declare type ICommandType = t.TypeOf<typeof CommandV>;
23
26
  export declare type IEditorCommandType = t.TypeOf<typeof EditorCommandV>;
27
+ export declare type IHelpSyncCommandType = t.TypeOf<typeof HelpSyncCommandV>;
24
28
  export type { ICommandFromClientType } from './ICommandFromClientType';
25
29
  export declare type ICommandCategoryType = t.TypeOf<typeof CommandCategoryV>;
26
30
  export declare type IGuideType = t.TypeOf<typeof GuideV> & {
27
31
  preview?: boolean;
28
32
  };
29
33
  export declare type IHistoryEventType = t.TypeOf<typeof HistoryEventV>;
34
+ export declare type IHelpDocsSyncType = t.TypeOf<typeof HelpDocsSyncV>;
35
+ export declare type IHelpDocsIntegrationType = t.TypeOf<typeof HelpDocsIntegrationV>;
30
36
  export type { IOrganizationType } from './OrganizationV';
31
37
  export declare type IOrganizationStatusType = t.TypeOf<typeof OrganizationStatusV>;
32
38
  export declare type IInternalSettingsType = t.TypeOf<typeof InternalSettingsV>;
@@ -40,7 +46,7 @@ export declare type IRelease = t.TypeOf<typeof ReleaseV>;
40
46
  export declare type IEnvReleaseInfo = t.TypeOf<typeof EnvReleaseInfoV>;
41
47
  /*******************************************************************************/
42
48
  export declare type IBatchOperation = t.TypeOf<typeof BatchOperationV>;
43
- export declare type IBatchEditorCommandRequst = t.TypeOf<typeof BatchEditorCommandRequestV>;
49
+ export declare type IBatchEditorCommandRequst = t.TypeOf<typeof GenericBatchRequest>;
44
50
  export declare type IBatchEditorCommandResponse = t.TypeOf<typeof BatchEditorCommandResponseV>;
45
51
  /*******************************************************************************/
46
52
  export declare type IKeyEventCategory = t.TypeOf<typeof KeyEventV>;
@@ -124,7 +130,7 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
124
130
  hoverTooltip?: boolean | undefined;
125
131
  operation?: "self" | "router" | "blank" | undefined;
126
132
  }) | ({
127
- type: "click" | "clickBySelector" | "clickByXpath";
133
+ type: "click" | "clickByXpath" | "clickBySelector";
128
134
  value: string[];
129
135
  } & {} & {
130
136
  commandType?: "object" | "independent" | "help" | undefined;
@@ -191,13 +197,6 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
191
197
  name?: string | undefined;
192
198
  last_available?: string | null | undefined;
193
199
  modified?: string | undefined;
194
- detail?: string | {
195
- type: "html" | "plaintext" | "markdown" | "reader" | "react";
196
- value: string;
197
- } | {
198
- type: "html" | "plaintext" | "markdown" | "reader" | "react";
199
- value: string;
200
- }[] | undefined;
201
200
  } & {
202
201
  arguments: {
203
202
  [x: string]: ({
@@ -329,6 +328,7 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
329
328
  confirm: string;
330
329
  shortcut: string[];
331
330
  explanation: string;
331
+ heading: string;
332
332
  is_live: boolean;
333
333
  category: number | null;
334
334
  sort_key: number | null;
@@ -352,6 +352,13 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
352
352
  shortcut_win: string[];
353
353
  hotkey_mac: string;
354
354
  hotkey_win: string;
355
+ detail: string | {
356
+ type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
357
+ value: string;
358
+ } | (string | {
359
+ type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
360
+ value: string;
361
+ })[] | null;
355
362
  };
356
363
  export declare const isResource: (option: any) => option is IResourceType;
357
364
  export declare const isContextArgument: (argument: IArgumentType) => argument is {
@@ -9,4 +9,6 @@ export declare const UserV: t.IntersectionC<[t.TypeC<{
9
9
  profile: t.NumberC;
10
10
  has_updated_password: t.BooleanC;
11
11
  is_active: t.BooleanC;
12
- }>, t.PartialC<{}>]>;
12
+ }>, t.PartialC<{
13
+ intercom_hash: t.StringC;
14
+ }>]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandbar",
3
- "version": "1.6.9",
3
+ "version": "1.6.12",
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",
@@ -22,7 +22,5 @@
22
22
  "io-ts": "2.2.13"
23
23
  },
24
24
  "devDependencies": {},
25
- "peerDependencies": {
26
- "@sentry/react": "6.19.7"
27
- }
25
+ "peerDependencies": {}
28
26
  }
package/src/init.ts CHANGED
@@ -20,8 +20,6 @@ const getSrc = (org: string) => {
20
20
  if (lc && lc.includes('local')) {
21
21
  // for debugging purposes
22
22
  origin = 'http://localhost:8000';
23
- } else if (!lc && org === '10d7dc04') {
24
- origin = 'https://api-cu.commandbar.com';
25
23
  }
26
24
 
27
25
  let src = origin + '/latest/' + org;
@@ -72,6 +70,12 @@ const init = (org: string, opts: IInitOptions = DEFAULT_OPTS) => {
72
70
  return;
73
71
  }
74
72
 
73
+ // Do nothing if CommandBar SDK has already been initialized
74
+ if (!!getProxySDK()[_configuration]?.uuid) {
75
+ console.warn('CommandBar init was called more than once. Skipping the redundant initialization...');
76
+ return;
77
+ }
78
+
75
79
  config.debug && console.log('CommandBar init...', { environment: opts.environment, version: opts.version });
76
80
 
77
81
  getProxySDK()[_configuration] = {