commandbar 1.7.0 → 1.7.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.
@@ -1,4 +1,5 @@
1
1
  import { DetailPreviewType } from '../middleware/detailPreview';
2
+ import { OptionGroupRenderAsType } from '../middleware/types';
2
3
  export declare type DataRow = {
3
4
  icon?: string;
4
5
  category?: string;
@@ -56,6 +57,8 @@ export interface AddContextOptions {
56
57
  descriptionKey?: string;
57
58
  /** The value key of `key` objects you want to use to display the object's label. */
58
59
  labelKey?: string;
60
+ renderAs?: OptionGroupRenderAsType;
61
+ searchTabEnabled?: boolean;
59
62
  };
60
63
  /** Options to customize the search behavior for `key`. */
61
64
  searchOptions?: {
@@ -95,6 +98,8 @@ export interface ArgumentOptions {
95
98
  */
96
99
  defaultIcon?: string;
97
100
  detail?: DetailPreviewType;
101
+ renderAs?: OptionGroupRenderAsType;
102
+ searchTabEnabled?: boolean;
98
103
  /**
99
104
  * A list of object fields to be searched. If a custom `searchFunction` is provided, matches will be highlighted in
100
105
  * these fields. Field names will be transformed from _camelCase_ or _snake_case_ into _Sentence case_.
@@ -55,8 +55,9 @@ export declare type CustomComponentInstance = {
55
55
  render: (data: DataRow, metadata: DataRowMetadata) => void;
56
56
  unmount: () => void;
57
57
  };
58
- export declare type NudgeHandler = ({ slug, content, onClick, timeout, }: {
58
+ export declare type NudgeHandler = ({ slug, title, content, onClick, timeout, }: {
59
59
  slug: string;
60
+ title: string;
60
61
  content: string;
61
62
  onClick: () => void;
62
63
  timeout: number | null;
@@ -1,5 +1,5 @@
1
1
  import * as t from 'io-ts';
2
2
  import { CommandFromClientV } from './CommandFromClientV';
3
3
  import { ContextArgumentV } from './helpers/argument';
4
- export declare type ICommandFromClientType = t.TypeOf<typeof CommandFromClientV>;
4
+ export declare type ICommandFromClientType = t.TypeOf<typeof CommandFromClientV> & unknown;
5
5
  export declare type IContextArgument = t.TypeOf<typeof ContextArgumentV>;
@@ -1,3 +1,3 @@
1
1
  import * as t from 'io-ts';
2
2
  import { ResourceSettingsV } from './ResourceSettingsV';
3
- export declare type IResourceSettings = t.TypeOf<typeof ResourceSettingsV>;
3
+ export declare type IResourceSettings = t.TypeOf<typeof ResourceSettingsV> & unknown;
@@ -74,6 +74,8 @@ declare const OrganizationAdditionalV: t.TypeC<{
74
74
  recents_tab_instruction: t.StringC;
75
75
  hotload_help_docs: t.BooleanC;
76
76
  slash_filters_enabled: t.BooleanC;
77
+ recents_sort_key: t.UnionC<[t.NumberC, t.NullC]>;
78
+ recommended_sort_key: t.UnionC<[t.NumberC, t.NullC]>;
77
79
  }>;
78
80
  export declare const defaults: t.TypeOf<typeof OrganizationAdditionalV>;
79
81
  export declare const OrganizationV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
@@ -155,6 +157,8 @@ export declare const OrganizationV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
155
157
  recents_tab_instruction: t.StringC;
156
158
  hotload_help_docs: t.BooleanC;
157
159
  slash_filters_enabled: t.BooleanC;
160
+ recents_sort_key: t.UnionC<[t.NumberC, t.NullC]>;
161
+ recommended_sort_key: t.UnionC<[t.NumberC, t.NullC]>;
158
162
  }>]>;
159
- export declare type IOrganizationType = t.TypeOf<typeof OrganizationV>;
163
+ export declare type IOrganizationType = t.TypeOf<typeof OrganizationV> & unknown;
160
164
  export {};
@@ -1620,11 +1620,6 @@ export declare class Command {
1620
1620
  field?: string | undefined;
1621
1621
  value?: string | undefined;
1622
1622
  reason?: string | undefined;
1623
- }) | ({
1624
- type: "named_rule";
1625
- rule_id: number;
1626
- } & {
1627
- reason?: string | undefined;
1628
1623
  }) | ({
1629
1624
  type: "always";
1630
1625
  } & {
@@ -1632,6 +1627,11 @@ export declare class Command {
1632
1627
  field?: null | undefined;
1633
1628
  value?: null | undefined;
1634
1629
  reason?: null | undefined;
1630
+ }) | ({
1631
+ type: "named_rule";
1632
+ rule_id: number;
1633
+ } & {
1634
+ reason?: string | undefined;
1635
1635
  }))[];
1636
1636
  availability_expression: import("./helpers/rules").RuleExpression;
1637
1637
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -1975,11 +1975,6 @@ export declare class Command {
1975
1975
  field?: string | undefined;
1976
1976
  value?: string | undefined;
1977
1977
  reason?: string | undefined;
1978
- }) | ({
1979
- type: "named_rule";
1980
- rule_id: number;
1981
- } & {
1982
- reason?: string | undefined;
1983
1978
  }) | ({
1984
1979
  type: "always";
1985
1980
  } & {
@@ -1987,6 +1982,11 @@ export declare class Command {
1987
1982
  field?: null | undefined;
1988
1983
  value?: null | undefined;
1989
1984
  reason?: null | undefined;
1985
+ }) | ({
1986
+ type: "named_rule";
1987
+ rule_id: number;
1988
+ } & {
1989
+ reason?: string | undefined;
1990
1990
  }))[];
1991
1991
  availability_expression: import("./helpers/rules").RuleExpression;
1992
1992
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -2331,11 +2331,6 @@ export declare class Command {
2331
2331
  field?: string | undefined;
2332
2332
  value?: string | undefined;
2333
2333
  reason?: string | undefined;
2334
- }) | ({
2335
- type: "named_rule";
2336
- rule_id: number;
2337
- } & {
2338
- reason?: string | undefined;
2339
2334
  }) | ({
2340
2335
  type: "always";
2341
2336
  } & {
@@ -2343,6 +2338,11 @@ export declare class Command {
2343
2338
  field?: null | undefined;
2344
2339
  value?: null | undefined;
2345
2340
  reason?: null | undefined;
2341
+ }) | ({
2342
+ type: "named_rule";
2343
+ rule_id: number;
2344
+ } & {
2345
+ reason?: string | undefined;
2346
2346
  }))[];
2347
2347
  availability_expression: import("./helpers/rules").RuleExpression;
2348
2348
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -2686,11 +2686,6 @@ export declare class Command {
2686
2686
  field?: string | undefined;
2687
2687
  value?: string | undefined;
2688
2688
  reason?: string | undefined;
2689
- }) | ({
2690
- type: "named_rule";
2691
- rule_id: number;
2692
- } & {
2693
- reason?: string | undefined;
2694
2689
  }) | ({
2695
2690
  type: "always";
2696
2691
  } & {
@@ -2698,6 +2693,11 @@ export declare class Command {
2698
2693
  field?: null | undefined;
2699
2694
  value?: null | undefined;
2700
2695
  reason?: null | undefined;
2696
+ }) | ({
2697
+ type: "named_rule";
2698
+ rule_id: number;
2699
+ } & {
2700
+ reason?: string | undefined;
2701
2701
  }))[];
2702
2702
  availability_expression: import("./helpers/rules").RuleExpression;
2703
2703
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -3044,11 +3044,6 @@ export declare class Command {
3044
3044
  field?: string | undefined;
3045
3045
  value?: string | undefined;
3046
3046
  reason?: string | undefined;
3047
- }) | ({
3048
- type: "named_rule";
3049
- rule_id: number;
3050
- } & {
3051
- reason?: string | undefined;
3052
3047
  }) | ({
3053
3048
  type: "always";
3054
3049
  } & {
@@ -3056,6 +3051,11 @@ export declare class Command {
3056
3051
  field?: null | undefined;
3057
3052
  value?: null | undefined;
3058
3053
  reason?: null | undefined;
3054
+ }) | ({
3055
+ type: "named_rule";
3056
+ rule_id: number;
3057
+ } & {
3058
+ reason?: string | undefined;
3059
3059
  }))[];
3060
3060
  availability_expression: import("./helpers/rules").RuleExpression;
3061
3061
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -4117,11 +4117,6 @@ export declare class Command {
4117
4117
  field?: string | undefined;
4118
4118
  value?: string | undefined;
4119
4119
  reason?: string | undefined;
4120
- }) | ({
4121
- type: "named_rule";
4122
- rule_id: number;
4123
- } & {
4124
- reason?: string | undefined;
4125
4120
  }) | ({
4126
4121
  type: "always";
4127
4122
  } & {
@@ -4129,6 +4124,11 @@ export declare class Command {
4129
4124
  field?: null | undefined;
4130
4125
  value?: null | undefined;
4131
4126
  reason?: null | undefined;
4127
+ }) | ({
4128
+ type: "named_rule";
4129
+ rule_id: number;
4130
+ } & {
4131
+ reason?: string | undefined;
4132
4132
  }))[];
4133
4133
  availability_expression: import("./helpers/rules").RuleExpression;
4134
4134
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -4473,11 +4473,6 @@ export declare class Command {
4473
4473
  field?: string | undefined;
4474
4474
  value?: string | undefined;
4475
4475
  reason?: string | undefined;
4476
- }) | ({
4477
- type: "named_rule";
4478
- rule_id: number;
4479
- } & {
4480
- reason?: string | undefined;
4481
4476
  }) | ({
4482
4477
  type: "always";
4483
4478
  } & {
@@ -4485,6 +4480,11 @@ export declare class Command {
4485
4480
  field?: null | undefined;
4486
4481
  value?: null | undefined;
4487
4482
  reason?: null | undefined;
4483
+ }) | ({
4484
+ type: "named_rule";
4485
+ rule_id: number;
4486
+ } & {
4487
+ reason?: string | undefined;
4488
4488
  }))[];
4489
4489
  availability_expression: import("./helpers/rules").RuleExpression;
4490
4490
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -4828,11 +4828,6 @@ export declare class Command {
4828
4828
  field?: string | undefined;
4829
4829
  value?: string | undefined;
4830
4830
  reason?: string | undefined;
4831
- }) | ({
4832
- type: "named_rule";
4833
- rule_id: number;
4834
- } & {
4835
- reason?: string | undefined;
4836
4831
  }) | ({
4837
4832
  type: "always";
4838
4833
  } & {
@@ -4840,6 +4835,11 @@ export declare class Command {
4840
4835
  field?: null | undefined;
4841
4836
  value?: null | undefined;
4842
4837
  reason?: null | undefined;
4838
+ }) | ({
4839
+ type: "named_rule";
4840
+ rule_id: number;
4841
+ } & {
4842
+ reason?: string | undefined;
4843
4843
  }))[];
4844
4844
  availability_expression: import("./helpers/rules").RuleExpression;
4845
4845
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -5184,11 +5184,6 @@ export declare class Command {
5184
5184
  field?: string | undefined;
5185
5185
  value?: string | undefined;
5186
5186
  reason?: string | undefined;
5187
- }) | ({
5188
- type: "named_rule";
5189
- rule_id: number;
5190
- } & {
5191
- reason?: string | undefined;
5192
5187
  }) | ({
5193
5188
  type: "always";
5194
5189
  } & {
@@ -5196,6 +5191,11 @@ export declare class Command {
5196
5191
  field?: null | undefined;
5197
5192
  value?: null | undefined;
5198
5193
  reason?: null | undefined;
5194
+ }) | ({
5195
+ type: "named_rule";
5196
+ rule_id: number;
5197
+ } & {
5198
+ reason?: string | undefined;
5199
5199
  }))[];
5200
5200
  availability_expression: import("./helpers/rules").RuleExpression;
5201
5201
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -5539,11 +5539,6 @@ export declare class Command {
5539
5539
  field?: string | undefined;
5540
5540
  value?: string | undefined;
5541
5541
  reason?: string | undefined;
5542
- }) | ({
5543
- type: "named_rule";
5544
- rule_id: number;
5545
- } & {
5546
- reason?: string | undefined;
5547
5542
  }) | ({
5548
5543
  type: "always";
5549
5544
  } & {
@@ -5551,6 +5546,11 @@ export declare class Command {
5551
5546
  field?: null | undefined;
5552
5547
  value?: null | undefined;
5553
5548
  reason?: null | undefined;
5549
+ }) | ({
5550
+ type: "named_rule";
5551
+ rule_id: number;
5552
+ } & {
5553
+ reason?: string | undefined;
5554
5554
  }))[];
5555
5555
  availability_expression: import("./helpers/rules").RuleExpression;
5556
5556
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -6,7 +6,7 @@ export declare const DetailPreviewObjectV: t.IntersectionC<[t.TypeC<{
6
6
  }>, t.PartialC<{
7
7
  position: t.UnionC<[t.LiteralC<"inline">, t.LiteralC<"popover">]>;
8
8
  }>]>;
9
- export declare type DetailPreviewObjectType = t.TypeOf<typeof DetailPreviewObjectV>;
9
+ export declare type DetailPreviewObjectType = t.TypeOf<typeof DetailPreviewObjectV> & unknown;
10
10
  export declare type DetailPreviewType = string | DetailPreviewObjectType | (string | DetailPreviewObjectType)[];
11
11
  export declare type DataRowMetadata = {
12
12
  type: 'command' | 'parameter';
@@ -22,6 +22,7 @@ export declare const NudgeV: t.IntersectionC<[t.TypeC<{
22
22
  timeout_ms: t.UnionC<[t.NumberC, t.NullC]>;
23
23
  frequency_limit: t.UnionC<[t.LiteralC<"no_limit">, t.LiteralC<"once_per_session">, t.LiteralC<"once_per_user">]>;
24
24
  }>, t.PartialC<{
25
+ title: t.StringC;
25
26
  is_live: t.BooleanC;
26
27
  }>]>;
27
28
  export declare class Nudge {
@@ -48,6 +49,7 @@ export declare class Nudge {
48
49
  timeout_ms: number | null;
49
50
  frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
50
51
  } & {
52
+ title?: string | undefined;
51
53
  is_live?: boolean | undefined;
52
54
  };
53
55
  static create: (object: {
@@ -73,6 +75,7 @@ export declare class Nudge {
73
75
  timeout_ms: number | null;
74
76
  frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
75
77
  } & {
78
+ title?: string | undefined;
76
79
  is_live?: boolean | undefined;
77
80
  }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
78
81
  id: number;
@@ -97,6 +100,7 @@ export declare class Nudge {
97
100
  timeout_ms: number | null;
98
101
  frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
99
102
  } & {
103
+ title?: string | undefined;
100
104
  is_live?: boolean | undefined;
101
105
  }>;
102
106
  static update: (object: {
@@ -122,6 +126,7 @@ export declare class Nudge {
122
126
  timeout_ms: number | null;
123
127
  frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
124
128
  } & {
129
+ title?: string | undefined;
125
130
  is_live?: boolean | undefined;
126
131
  }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
127
132
  id: number;
@@ -146,6 +151,7 @@ export declare class Nudge {
146
151
  timeout_ms: number | null;
147
152
  frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
148
153
  } & {
154
+ title?: string | undefined;
149
155
  is_live?: boolean | undefined;
150
156
  }>;
151
157
  static delete: (id: string | number, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
@@ -172,6 +178,7 @@ export declare class Nudge {
172
178
  timeout_ms: number | null;
173
179
  frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
174
180
  } & {
181
+ title?: string | undefined;
175
182
  is_live?: boolean | undefined;
176
183
  })[]>;
177
184
  static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
@@ -200,6 +207,7 @@ export declare class Nudge {
200
207
  timeout_ms: number | null;
201
208
  frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
202
209
  } & {
210
+ title?: string | undefined;
203
211
  is_live?: boolean | undefined;
204
212
  }>;
205
213
  }
@@ -41,6 +41,8 @@ export declare const OrganizationSettingsV: t.TypeC<{
41
41
  recents_tab_instruction: t.StringC;
42
42
  hotload_help_docs: t.BooleanC;
43
43
  slash_filters_enabled: t.BooleanC;
44
+ recents_sort_key: t.UnionC<[t.NumberC, t.NullC]>;
45
+ recommended_sort_key: t.UnionC<[t.NumberC, t.NullC]>;
44
46
  }>;
45
47
  export declare class Organization {
46
48
  static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
@@ -127,6 +129,8 @@ export declare class Organization {
127
129
  recents_tab_instruction: string;
128
130
  hotload_help_docs: boolean;
129
131
  slash_filters_enabled: boolean;
132
+ recents_sort_key: number | null;
133
+ recommended_sort_key: number | null;
130
134
  }>;
131
135
  static update: (object: {
132
136
  id: string | number;
@@ -209,6 +213,8 @@ export declare class Organization {
209
213
  recents_tab_instruction: string;
210
214
  hotload_help_docs: boolean;
211
215
  slash_filters_enabled: boolean;
216
+ recents_sort_key: number | null;
217
+ recommended_sort_key: number | null;
212
218
  }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
213
219
  id: string | number;
214
220
  name: string;
@@ -290,6 +296,8 @@ export declare class Organization {
290
296
  recents_tab_instruction: string;
291
297
  hotload_help_docs: boolean;
292
298
  slash_filters_enabled: boolean;
299
+ recents_sort_key: number | null;
300
+ recommended_sort_key: number | null;
293
301
  }>;
294
302
  static listCommands: (orgUID: string) => Promise<({
295
303
  id: number;
@@ -587,11 +595,6 @@ export declare class Organization {
587
595
  field?: string | undefined;
588
596
  value?: string | undefined;
589
597
  reason?: string | undefined;
590
- }) | ({
591
- type: "named_rule";
592
- rule_id: number;
593
- } & {
594
- reason?: string | undefined;
595
598
  }) | ({
596
599
  type: "always";
597
600
  } & {
@@ -599,6 +602,11 @@ export declare class Organization {
599
602
  field?: null | undefined;
600
603
  value?: null | undefined;
601
604
  reason?: null | undefined;
605
+ }) | ({
606
+ type: "named_rule";
607
+ rule_id: number;
608
+ } & {
609
+ reason?: string | undefined;
602
610
  }))[];
603
611
  availability_expression: import("./helpers/rules").RuleExpression;
604
612
  recommend_expression: import("./helpers/rules").RuleExpression;
@@ -768,6 +776,8 @@ export declare class Organization {
768
776
  recents_tab_instruction: string;
769
777
  hotload_help_docs: boolean;
770
778
  slash_filters_enabled: boolean;
779
+ recents_sort_key: number | null;
780
+ recommended_sort_key: number | null;
771
781
  }>;
772
782
  static updateSetting: (object: {
773
783
  end_user_limit?: number | undefined;
@@ -796,6 +806,8 @@ export declare class Organization {
796
806
  recents_tab_instruction?: string | undefined;
797
807
  hotload_help_docs?: boolean | undefined;
798
808
  slash_filters_enabled?: boolean | undefined;
809
+ recents_sort_key?: number | null | undefined;
810
+ recommended_sort_key?: number | null | undefined;
799
811
  }, params?: Record<string, string> | undefined, callbacks?: {
800
812
  onSuccess?: (() => void) | undefined;
801
813
  onError?: ((err: string) => void) | undefined;
@@ -826,6 +838,8 @@ export declare class Organization {
826
838
  recents_tab_instruction: string;
827
839
  hotload_help_docs: boolean;
828
840
  slash_filters_enabled: boolean;
841
+ recents_sort_key: number | null;
842
+ recommended_sort_key: number | null;
829
843
  }>;
830
844
  static decode: (data: any) => {
831
845
  id: string | number;
@@ -908,5 +922,7 @@ export declare class Organization {
908
922
  recents_tab_instruction: string;
909
923
  hotload_help_docs: boolean;
910
924
  slash_filters_enabled: boolean;
925
+ recents_sort_key: number | null;
926
+ recommended_sort_key: number | null;
911
927
  };
912
928
  }
@@ -23,57 +23,57 @@ import { NudgeV } from './nudge';
23
23
  import { TabV } from './tab';
24
24
  import { RuleExpressionAndV, RuleExpressionOrV, RuleExpressionV } from './helpers/rules';
25
25
  /*******************************************************************************/
26
- export declare type IContextType = t.TypeOf<typeof ContextV>;
27
- export declare type IUserType = t.TypeOf<typeof UserV>;
28
- export declare type ICommandType = t.TypeOf<typeof CommandV>;
29
- export declare type IEditorCommandType = t.TypeOf<typeof EditorCommandV>;
30
- export declare type IHelpSyncCommandType = t.TypeOf<typeof HelpSyncCommandV>;
26
+ export declare type IContextType = t.TypeOf<typeof ContextV> & unknown;
27
+ export declare type IUserType = t.TypeOf<typeof UserV> & unknown;
28
+ export declare type ICommandType = t.TypeOf<typeof CommandV> & unknown;
29
+ export declare type IEditorCommandType = t.TypeOf<typeof EditorCommandV> & unknown;
30
+ export declare type IHelpSyncCommandType = t.TypeOf<typeof HelpSyncCommandV> & unknown;
31
31
  export type { ICommandFromClientType } from './ICommandFromClientType';
32
- export declare type ICommandCategoryType = t.TypeOf<typeof CommandCategoryV>;
32
+ export declare type ICommandCategoryType = t.TypeOf<typeof CommandCategoryV> & unknown;
33
33
  export declare type IGuideType = t.TypeOf<typeof GuideV> & {
34
34
  preview?: boolean;
35
- };
36
- export declare type IHistoryEventType = t.TypeOf<typeof HistoryEventV>;
37
- export declare type IHelpDocsSyncType = t.TypeOf<typeof HelpDocsSyncV>;
38
- export declare type IHelpDocsIntegrationType = t.TypeOf<typeof HelpDocsIntegrationV>;
35
+ } & unknown;
36
+ export declare type IHistoryEventType = t.TypeOf<typeof HistoryEventV> & unknown;
37
+ export declare type IHelpDocsSyncType = t.TypeOf<typeof HelpDocsSyncV> & unknown;
38
+ export declare type IHelpDocsIntegrationType = t.TypeOf<typeof HelpDocsIntegrationV> & unknown;
39
39
  export type { IOrganizationType } from './OrganizationV';
40
- export declare type IOrganizationStatusType = t.TypeOf<typeof OrganizationStatusV>;
41
- export declare type IInternalSettingsType = t.TypeOf<typeof InternalSettingsV>;
42
- export declare type ISkinType = t.TypeOf<typeof SkinV>;
43
- export declare type IProfileType = t.TypeOf<typeof ProfileV>;
44
- export declare type IOrganizationSettingsType = t.TypeOf<typeof OrganizationSettingsV>;
45
- export declare type IPlaceholderType = t.TypeOf<typeof PlaceholderV>;
46
- export declare type ITabType = t.TypeOf<typeof TabV>;
47
- export declare type IEnvironmentType = t.TypeOf<typeof EnvironmentV>;
48
- export declare type IReleaseStep = t.TypeOf<typeof ReleaseStepV>;
49
- export declare type IRelease = t.TypeOf<typeof ReleaseV>;
50
- export declare type IEnvReleaseInfo = t.TypeOf<typeof EnvReleaseInfoV>;
40
+ export declare type IOrganizationStatusType = t.TypeOf<typeof OrganizationStatusV> & unknown;
41
+ export declare type IInternalSettingsType = t.TypeOf<typeof InternalSettingsV> & unknown;
42
+ export declare type ISkinType = t.TypeOf<typeof SkinV> & unknown;
43
+ export declare type IProfileType = t.TypeOf<typeof ProfileV> & unknown;
44
+ export declare type IOrganizationSettingsType = t.TypeOf<typeof OrganizationSettingsV> & unknown;
45
+ export declare type IPlaceholderType = t.TypeOf<typeof PlaceholderV> & unknown;
46
+ export declare type ITabType = t.TypeOf<typeof TabV> & unknown;
47
+ export declare type IEnvironmentType = t.TypeOf<typeof EnvironmentV> & unknown;
48
+ export declare type IReleaseStep = t.TypeOf<typeof ReleaseStepV> & unknown;
49
+ export declare type IRelease = t.TypeOf<typeof ReleaseV> & unknown;
50
+ export declare type IEnvReleaseInfo = t.TypeOf<typeof EnvReleaseInfoV> & unknown;
51
51
  /*******************************************************************************/
52
- export declare type IBatchOperation = t.TypeOf<typeof BatchOperationV>;
53
- export declare type IBatchEditorCommandRequst = t.TypeOf<typeof GenericBatchRequest>;
54
- export declare type IBatchEditorCommandResponse = t.TypeOf<typeof BatchEditorCommandResponseV>;
52
+ export declare type IBatchOperation = t.TypeOf<typeof BatchOperationV> & unknown;
53
+ export declare type IBatchEditorCommandRequst = t.TypeOf<typeof GenericBatchRequest> & unknown;
54
+ export declare type IBatchEditorCommandResponse = t.TypeOf<typeof BatchEditorCommandResponseV> & unknown;
55
55
  /*******************************************************************************/
56
- export declare type IKeyEventCategory = t.TypeOf<typeof KeyEventV>;
57
- export declare type IArgumentMap = t.TypeOf<typeof ArgumentMapV>;
58
- export declare type IArgumentType = t.TypeOf<typeof ArgumentTypeV>;
59
- export declare type IStepArgumentType = t.TypeOf<typeof StepArgumentTypeV>;
60
- export declare type ITemplate = t.TypeOf<typeof TemplateV>;
61
- export declare type RequestTemplateType = t.TypeOf<typeof RequestTemplateV>;
62
- export declare type RequestType = t.TypeOf<typeof RequestV>;
63
- export declare type ITemplateOptions = t.TypeOf<typeof TemplateOptionsV>;
64
- export declare type IEndUserType = t.TypeOf<typeof EndUserV>;
65
- export declare type IRuleExpression = t.TypeOf<typeof RuleExpressionV>;
66
- export declare type IRuleExpressionAnd = t.TypeOf<typeof RuleExpressionAndV>;
67
- export declare type IRuleExpressionOr = t.TypeOf<typeof RuleExpressionOrV>;
68
- export declare type IConditionType = t.TypeOf<typeof ConditionV>;
69
- export declare type IConditionOperatorType = t.TypeOf<typeof ConditionOperatorV>;
70
- export declare type IContextArgumentType = t.TypeOf<typeof ContextArgumentV>;
71
- export declare type ISetArgumentType = t.TypeOf<typeof SetArgumentV>;
72
- export declare type IDynamicArgumentType = t.TypeOf<typeof DynamicArgumentV>;
73
- export declare type IDependentArgumentType = t.TypeOf<typeof DependentArgumentV>;
74
- export declare type IFunctionArgumentType = t.TypeOf<typeof FunctionArgumentV>;
75
- export declare type OptionGroupRenderAsType = t.TypeOf<typeof OptionGroupRenderAsV>;
76
- export declare type INudgeType = t.TypeOf<typeof NudgeV>;
56
+ export declare type IKeyEventCategory = t.TypeOf<typeof KeyEventV> & unknown;
57
+ export declare type IArgumentMap = t.TypeOf<typeof ArgumentMapV> & unknown;
58
+ export declare type IArgumentType = t.TypeOf<typeof ArgumentTypeV> & unknown;
59
+ export declare type IStepArgumentType = t.TypeOf<typeof StepArgumentTypeV> & unknown;
60
+ export declare type ITemplate = t.TypeOf<typeof TemplateV> & unknown;
61
+ export declare type RequestTemplateType = t.TypeOf<typeof RequestTemplateV> & unknown;
62
+ export declare type RequestType = t.TypeOf<typeof RequestV> & unknown;
63
+ export declare type ITemplateOptions = t.TypeOf<typeof TemplateOptionsV> & unknown;
64
+ export declare type IEndUserType = t.TypeOf<typeof EndUserV> & unknown;
65
+ export declare type IRuleExpression = t.TypeOf<typeof RuleExpressionV> & unknown;
66
+ export declare type IRuleExpressionAnd = t.TypeOf<typeof RuleExpressionAndV> & unknown;
67
+ export declare type IRuleExpressionOr = t.TypeOf<typeof RuleExpressionOrV> & unknown;
68
+ export declare type IConditionType = t.TypeOf<typeof ConditionV> & unknown;
69
+ export declare type IConditionOperatorType = t.TypeOf<typeof ConditionOperatorV> & unknown;
70
+ export declare type IContextArgumentType = t.TypeOf<typeof ContextArgumentV> & unknown;
71
+ export declare type ISetArgumentType = t.TypeOf<typeof SetArgumentV> & unknown;
72
+ export declare type IDynamicArgumentType = t.TypeOf<typeof DynamicArgumentV> & unknown;
73
+ export declare type IDependentArgumentType = t.TypeOf<typeof DependentArgumentV> & unknown;
74
+ export declare type IFunctionArgumentType = t.TypeOf<typeof FunctionArgumentV> & unknown;
75
+ export declare type OptionGroupRenderAsType = t.TypeOf<typeof OptionGroupRenderAsV> & unknown;
76
+ export declare type INudgeType = t.TypeOf<typeof NudgeV> & unknown;
77
77
  export interface INudgeClientType {
78
78
  nudge: INudgeType;
79
79
  active: boolean;
@@ -113,401 +113,11 @@ export declare type IConfigEndpointResponse = {
113
113
  tabs?: ITabType[];
114
114
  };
115
115
  export type { IResourceSettings } from './IResourceSettings';
116
- export declare type IResourceSettingsByContextKey = t.TypeOf<typeof ResourceSettingsByContextKeyV>;
116
+ export declare type IResourceSettingsByContextKey = t.TypeOf<typeof ResourceSettingsByContextKeyV> & unknown;
117
117
  export type { DetailPreviewObjectType, DetailPreviewType, DataRowMetadata } from './detailPreview';
118
118
  /*******************************************************************************/
119
- export declare const isCommand: (command?: ICommandType | any) => command is {
120
- id: number;
121
- organization: string | number;
122
- text: string;
123
- template: ({
124
- type: "admin";
125
- value: string;
126
- } & {} & {
127
- commandType?: "object" | "help" | "independent" | undefined;
128
- object?: string | undefined;
129
- hoverTooltip?: boolean | undefined;
130
- operation?: "self" | "router" | "blank" | undefined;
131
- }) | ({
132
- type: "callback";
133
- value: string;
134
- } & {} & {
135
- commandType?: "object" | "help" | "independent" | undefined;
136
- object?: string | undefined;
137
- hoverTooltip?: boolean | undefined;
138
- operation?: "self" | "router" | "blank" | undefined;
139
- }) | ({
140
- type: "link";
141
- value: string;
142
- } & {} & {
143
- commandType?: "object" | "help" | "independent" | undefined;
144
- object?: string | undefined;
145
- hoverTooltip?: boolean | undefined;
146
- operation?: "self" | "router" | "blank" | undefined;
147
- }) | ({
148
- type: "click" | "clickByXpath" | "clickBySelector";
149
- value: string[];
150
- } & {} & {
151
- commandType?: "object" | "help" | "independent" | undefined;
152
- object?: string | undefined;
153
- hoverTooltip?: boolean | undefined;
154
- operation?: "self" | "router" | "blank" | undefined;
155
- }) | ({
156
- type: "builtin";
157
- value: string;
158
- } & {} & {
159
- commandType?: "object" | "help" | "independent" | undefined;
160
- object?: string | undefined;
161
- hoverTooltip?: boolean | undefined;
162
- operation?: "self" | "router" | "blank" | undefined;
163
- }) | ({
164
- type: "webhook";
165
- value: string;
166
- } & {} & {
167
- commandType?: "object" | "help" | "independent" | undefined;
168
- object?: string | undefined;
169
- hoverTooltip?: boolean | undefined;
170
- operation?: "self" | "router" | "blank" | undefined;
171
- }) | ({
172
- type: "script";
173
- value: string;
174
- } & {} & {
175
- commandType?: "object" | "help" | "independent" | undefined;
176
- object?: string | undefined;
177
- hoverTooltip?: boolean | undefined;
178
- operation?: "self" | "router" | "blank" | undefined;
179
- }) | ({
180
- type: "request";
181
- value: {
182
- method: "head" | "options" | "get" | "delete" | "post" | "put" | "patch";
183
- url: string;
184
- } & {
185
- headers?: {
186
- [key: string]: unknown;
187
- } | undefined;
188
- body?: {
189
- [key: string]: unknown;
190
- } | undefined;
191
- onSend?: string | undefined;
192
- onSuccess?: string | undefined;
193
- onError?: string | undefined;
194
- };
195
- } & {} & {
196
- commandType?: "object" | "help" | "independent" | undefined;
197
- object?: string | undefined;
198
- hoverTooltip?: boolean | undefined;
199
- operation?: "self" | "router" | "blank" | undefined;
200
- }) | ({
201
- type: "appcues";
202
- value: string;
203
- } & {} & {
204
- commandType?: "object" | "help" | "independent" | undefined;
205
- object?: string | undefined;
206
- hoverTooltip?: boolean | undefined;
207
- operation?: "self" | "router" | "blank" | undefined;
208
- }) | ({
209
- type: "video";
210
- value: string;
211
- } & {} & {
212
- commandType?: "object" | "help" | "independent" | undefined;
213
- object?: string | undefined;
214
- hoverTooltip?: boolean | undefined;
215
- operation?: "self" | "router" | "blank" | undefined;
216
- }) | ({
217
- type: "helpdoc";
218
- value: string;
219
- } & {} & {
220
- commandType?: "object" | "help" | "independent" | undefined;
221
- object?: string | undefined;
222
- hoverTooltip?: boolean | undefined;
223
- operation?: "self" | "router" | "blank" | undefined;
224
- });
225
- } & {
226
- disabledReason?: string | undefined;
227
- source?: string | undefined;
228
- name?: string | undefined;
229
- last_available?: string | null | undefined;
230
- modified?: string | undefined;
231
- isAsync?: boolean | undefined;
232
- } & {
233
- arguments: {
234
- [x: string]: ({
235
- type: "context";
236
- value: string;
237
- order_key: number;
238
- } & {
239
- label?: string | undefined;
240
- chosen?: string | number | undefined;
241
- selected?: any[] | undefined;
242
- input_type?: string | undefined;
243
- preselected_key?: string | undefined;
244
- label_field?: string | undefined;
245
- availability_condition?: {
246
- field: string;
247
- operator: "==" | "!=" | "isTruthy" | "isFalsy";
248
- value: string | undefined;
249
- }[] | undefined;
250
- loaded?: any[] | undefined;
251
- allow_create?: boolean | undefined;
252
- allow_create_label?: string | undefined;
253
- show_in_record_action_list?: boolean | undefined;
254
- show_in_default_list?: boolean | undefined;
255
- auto_choose?: boolean | undefined;
256
- is_private?: boolean | undefined;
257
- }) | ({
258
- type: "set";
259
- value: string[] | number[] | {
260
- [key: string]: unknown;
261
- }[];
262
- order_key: number;
263
- } & {
264
- label?: string | undefined;
265
- chosen?: string | number | undefined;
266
- selected?: any[] | undefined;
267
- input_type?: string | undefined;
268
- preselected_key?: string | undefined;
269
- label_field?: string | undefined;
270
- availability_condition?: {
271
- field: string;
272
- operator: "==" | "!=" | "isTruthy" | "isFalsy";
273
- value: string | undefined;
274
- }[] | undefined;
275
- loaded?: any[] | undefined;
276
- allow_create?: boolean | undefined;
277
- allow_create_label?: string | undefined;
278
- auto_choose?: boolean | undefined;
279
- is_private?: boolean | undefined;
280
- }) | ({
281
- type: "provided";
282
- value: "time" | "text";
283
- order_key: number;
284
- } & {
285
- label?: string | undefined;
286
- chosen?: string | number | undefined;
287
- selected?: any[] | undefined;
288
- input_type?: string | undefined;
289
- preselected_key?: string | undefined;
290
- label_field?: string | undefined;
291
- availability_condition?: {
292
- field: string;
293
- operator: "==" | "!=" | "isTruthy" | "isFalsy";
294
- value: string | undefined;
295
- }[] | undefined;
296
- loaded?: any[] | undefined;
297
- dateTimeArgumentTypeId?: number | undefined;
298
- allow_create?: boolean | undefined;
299
- allow_create_label?: string | undefined;
300
- auto_choose?: boolean | undefined;
301
- is_private?: boolean | undefined;
302
- }) | ({
303
- type: "dependent";
304
- value: string;
305
- order_key: number;
306
- } & {
307
- label?: string | undefined;
308
- chosen?: string | number | undefined;
309
- selected?: any[] | undefined;
310
- input_type?: string | undefined;
311
- preselected_key?: string | undefined;
312
- label_field?: string | undefined;
313
- availability_condition?: {
314
- field: string;
315
- operator: "==" | "!=" | "isTruthy" | "isFalsy";
316
- value: string | undefined;
317
- }[] | undefined;
318
- loaded?: any[] | undefined;
319
- allow_create?: boolean | undefined;
320
- allow_create_label?: string | undefined;
321
- auto_choose?: boolean | undefined;
322
- is_private?: boolean | undefined;
323
- }) | ({
324
- type: "function";
325
- value: string;
326
- order_key: number;
327
- } & {
328
- label?: string | undefined;
329
- chosen?: string | number | undefined;
330
- selected?: any[] | undefined;
331
- input_type?: string | undefined;
332
- preselected_key?: string | undefined;
333
- label_field?: string | undefined;
334
- availability_condition?: {
335
- field: string;
336
- operator: "==" | "!=" | "isTruthy" | "isFalsy";
337
- value: string | undefined;
338
- }[] | undefined;
339
- loaded?: any[] | undefined;
340
- allow_create?: boolean | undefined;
341
- allow_create_label?: string | undefined;
342
- auto_choose?: boolean | undefined;
343
- is_private?: boolean | undefined;
344
- }) | ({
345
- type: "html" | "video";
346
- value: {
347
- source: string;
348
- } & {
349
- title?: string | undefined;
350
- description?: string | undefined;
351
- url?: string | undefined;
352
- };
353
- order_key: number;
354
- } & {
355
- label?: string | undefined;
356
- chosen?: string | number | undefined;
357
- selected?: any[] | undefined;
358
- input_type?: string | undefined;
359
- preselected_key?: string | undefined;
360
- label_field?: string | undefined;
361
- availability_condition?: {
362
- field: string;
363
- operator: "==" | "!=" | "isTruthy" | "isFalsy";
364
- value: string | undefined;
365
- }[] | undefined;
366
- loaded?: any[] | undefined;
367
- allow_create?: boolean | undefined;
368
- allow_create_label?: string | undefined;
369
- is_private?: boolean | undefined;
370
- auto_choose?: boolean | undefined;
371
- });
372
- };
373
- tags: string[];
374
- availability_rules: ({
375
- type: "url" | "element" | "context";
376
- operator: "includes" | "endsWith" | "startsWith" | "is" | "isTruthy" | "isFalsy" | "isNot" | "isTrue" | "isFalse" | "doesNotInclude" | "matchesRegex" | "isGreaterThan" | "isLessThan" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage";
377
- } & {
378
- field?: string | undefined;
379
- value?: string | undefined;
380
- reason?: string | undefined;
381
- })[];
382
- recommend_rules: (({
383
- type: "url" | "element" | "context";
384
- operator: "includes" | "endsWith" | "startsWith" | "is" | "isTruthy" | "isFalsy" | "isNot" | "isTrue" | "isFalse" | "doesNotInclude" | "matchesRegex" | "isGreaterThan" | "isLessThan" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage";
385
- } & {
386
- field?: string | undefined;
387
- value?: string | undefined;
388
- reason?: string | undefined;
389
- }) | ({
390
- type: "always";
391
- } & {
392
- operator?: null | undefined;
393
- field?: null | undefined;
394
- value?: null | undefined;
395
- reason?: null | undefined;
396
- }))[];
397
- availability_expression: import("./helpers/rules").RuleExpression | null;
398
- recommend_expression: import("./helpers/rules").RuleExpression | null;
399
- always_recommend: boolean;
400
- confirm: string;
401
- shortcut: string[];
402
- explanation: string;
403
- heading: string;
404
- is_live: boolean;
405
- category: number | null;
406
- sort_key: number | null;
407
- icon: string | null;
408
- image: string | null;
409
- celebrate: boolean | {
410
- angle?: number | undefined;
411
- spread?: number | undefined;
412
- width?: string | undefined;
413
- height?: string | undefined;
414
- duration?: number | undefined;
415
- dragFriction?: number | undefined;
416
- stagger?: number | undefined;
417
- startVelocity?: number | undefined;
418
- elementCount?: number | undefined;
419
- decay?: number | undefined;
420
- colors?: string[] | undefined;
421
- random?: any;
422
- } | null;
423
- recommend_sort_key: number | null;
424
- shortcut_mac: string[];
425
- shortcut_win: string[];
426
- hotkey_mac: string;
427
- hotkey_win: string;
428
- detail: string | ({
429
- type: "html" | "video" | "plaintext" | "markdown" | "react" | "component";
430
- value: string;
431
- } & {
432
- position?: "inline" | "popover" | undefined;
433
- }) | (string | ({
434
- type: "html" | "video" | "plaintext" | "markdown" | "react" | "component";
435
- value: string;
436
- } & {
437
- position?: "inline" | "popover" | undefined;
438
- }))[] | null;
439
- next_steps: (string | number)[];
440
- } & {
441
- third_party_source?: string | null | undefined;
442
- third_party_id?: string | null | undefined;
443
- };
119
+ export declare const isCommand: (command?: ICommandType | any) => command is ICommandType;
444
120
  export declare const isResource: (option: any) => option is IResourceType;
445
- export declare const isContextArgument: (argument: IArgumentType) => argument is {
446
- type: "context";
447
- value: string;
448
- order_key: number;
449
- } & {
450
- label?: string | undefined;
451
- chosen?: string | number | undefined;
452
- selected?: any[] | undefined;
453
- input_type?: string | undefined;
454
- preselected_key?: string | undefined;
455
- label_field?: string | undefined;
456
- availability_condition?: {
457
- field: string;
458
- operator: "==" | "!=" | "isTruthy" | "isFalsy";
459
- value: string | undefined;
460
- }[] | undefined;
461
- loaded?: any[] | undefined;
462
- allow_create?: boolean | undefined;
463
- allow_create_label?: string | undefined;
464
- show_in_record_action_list?: boolean | undefined;
465
- show_in_default_list?: boolean | undefined;
466
- auto_choose?: boolean | undefined;
467
- is_private?: boolean | undefined;
468
- };
469
- export declare const isTimeArgument: (argument: IArgumentType) => argument is {
470
- type: "provided";
471
- value: "time" | "text";
472
- order_key: number;
473
- } & {
474
- label?: string | undefined;
475
- chosen?: string | number | undefined;
476
- selected?: any[] | undefined;
477
- input_type?: string | undefined;
478
- preselected_key?: string | undefined;
479
- label_field?: string | undefined;
480
- availability_condition?: {
481
- field: string;
482
- operator: "==" | "!=" | "isTruthy" | "isFalsy";
483
- value: string | undefined;
484
- }[] | undefined;
485
- loaded?: any[] | undefined;
486
- dateTimeArgumentTypeId?: number | undefined;
487
- allow_create?: boolean | undefined;
488
- allow_create_label?: string | undefined;
489
- auto_choose?: boolean | undefined;
490
- is_private?: boolean | undefined;
491
- };
492
- export declare const isFunctionArgument: (argument: IArgumentType) => argument is {
493
- type: "function";
494
- value: string;
495
- order_key: number;
496
- } & {
497
- label?: string | undefined;
498
- chosen?: string | number | undefined;
499
- selected?: any[] | undefined;
500
- input_type?: string | undefined;
501
- preselected_key?: string | undefined;
502
- label_field?: string | undefined;
503
- availability_condition?: {
504
- field: string;
505
- operator: "==" | "!=" | "isTruthy" | "isFalsy";
506
- value: string | undefined;
507
- }[] | undefined;
508
- loaded?: any[] | undefined;
509
- allow_create?: boolean | undefined;
510
- allow_create_label?: string | undefined;
511
- auto_choose?: boolean | undefined;
512
- is_private?: boolean | undefined;
513
- };
121
+ export declare const isContextArgument: (argument: IArgumentType) => argument is IContextArgumentType;
122
+ export declare const isTimeArgument: (argument: IArgumentType) => argument is IDynamicArgumentType;
123
+ export declare const isFunctionArgument: (argument: IArgumentType) => argument is IFunctionArgumentType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandbar",
3
- "version": "1.7.0",
3
+ "version": "1.7.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",
@@ -20,7 +20,8 @@
20
20
  "dependencies": {
21
21
  "commandbar-launcher": "^1.1.9",
22
22
  "fp-ts": "2.10.5",
23
- "io-ts": "2.2.13"
23
+ "io-ts": "2.2.13",
24
+ "react-hot-toast": "^2.3.0"
24
25
  },
25
26
  "devDependencies": {
26
27
  "rimraf": "3.0.2",