commandbar 1.6.12 → 1.6.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -344,6 +344,22 @@ export declare class Organization {
344
344
  object?: string | undefined;
345
345
  hoverTooltip?: boolean | undefined;
346
346
  operation?: "self" | "router" | "blank" | undefined;
347
+ }) | ({
348
+ type: "video";
349
+ value: string;
350
+ } & {} & {
351
+ commandType?: "object" | "independent" | "help" | undefined;
352
+ object?: string | undefined;
353
+ hoverTooltip?: boolean | undefined;
354
+ operation?: "self" | "router" | "blank" | undefined;
355
+ }) | ({
356
+ type: "helpdoc";
357
+ value: string;
358
+ } & {} & {
359
+ commandType?: "object" | "independent" | "help" | undefined;
360
+ object?: string | undefined;
361
+ hoverTooltip?: boolean | undefined;
362
+ operation?: "self" | "router" | "blank" | undefined;
347
363
  });
348
364
  } & {
349
365
  disabledReason?: string | undefined;
@@ -351,6 +367,7 @@ export declare class Organization {
351
367
  name?: string | undefined;
352
368
  last_available?: string | null | undefined;
353
369
  modified?: string | undefined;
370
+ isAsync?: boolean | undefined;
354
371
  } & {
355
372
  arguments: {
356
373
  [x: string]: ({
@@ -374,6 +391,8 @@ export declare class Organization {
374
391
  allow_create_label?: string | undefined;
375
392
  show_in_record_action_list?: boolean | undefined;
376
393
  show_in_default_list?: boolean | undefined;
394
+ auto_choose?: boolean | undefined;
395
+ is_private?: boolean | undefined;
377
396
  }) | ({
378
397
  type: "set";
379
398
  value: string[] | number[] | {
@@ -395,6 +414,8 @@ export declare class Organization {
395
414
  loaded?: any[] | undefined;
396
415
  allow_create?: boolean | undefined;
397
416
  allow_create_label?: string | undefined;
417
+ auto_choose?: boolean | undefined;
418
+ is_private?: boolean | undefined;
398
419
  }) | ({
399
420
  type: "provided";
400
421
  value: "time" | "text";
@@ -415,6 +436,8 @@ export declare class Organization {
415
436
  dateTimeArgumentTypeId?: number | undefined;
416
437
  allow_create?: boolean | undefined;
417
438
  allow_create_label?: string | undefined;
439
+ auto_choose?: boolean | undefined;
440
+ is_private?: boolean | undefined;
418
441
  }) | ({
419
442
  type: "dependent";
420
443
  value: string;
@@ -434,6 +457,8 @@ export declare class Organization {
434
457
  loaded?: any[] | undefined;
435
458
  allow_create?: boolean | undefined;
436
459
  allow_create_label?: string | undefined;
460
+ auto_choose?: boolean | undefined;
461
+ is_private?: boolean | undefined;
437
462
  }) | ({
438
463
  type: "function";
439
464
  value: string;
@@ -453,6 +478,35 @@ export declare class Organization {
453
478
  loaded?: any[] | undefined;
454
479
  allow_create?: boolean | undefined;
455
480
  allow_create_label?: string | undefined;
481
+ auto_choose?: boolean | undefined;
482
+ is_private?: boolean | undefined;
483
+ }) | ({
484
+ type: "html" | "video";
485
+ value: {
486
+ source: string;
487
+ } & {
488
+ title?: string | undefined;
489
+ description?: string | undefined;
490
+ url?: string | undefined;
491
+ };
492
+ order_key: number;
493
+ } & {
494
+ label?: string | undefined;
495
+ chosen?: string | number | undefined;
496
+ selected?: any[] | undefined;
497
+ input_type?: string | undefined;
498
+ preselected_key?: string | undefined;
499
+ label_field?: string | undefined;
500
+ availability_condition?: {
501
+ field: string;
502
+ operator: "==" | "!=" | "isTruthy" | "isFalsy";
503
+ value: string | undefined;
504
+ }[] | undefined;
505
+ loaded?: any[] | undefined;
506
+ allow_create?: boolean | undefined;
507
+ allow_create_label?: string | undefined;
508
+ is_private?: boolean | undefined;
509
+ auto_choose?: boolean | undefined;
456
510
  });
457
511
  };
458
512
  tags: string[];
@@ -463,22 +517,56 @@ export declare class Organization {
463
517
  field?: string | undefined;
464
518
  value?: string | undefined;
465
519
  reason?: string | undefined;
466
- })[];
520
+ })[] | (({
521
+ type: "url" | "context" | "element";
522
+ operator: "includes" | "endsWith" | "startsWith" | "is" | "isTruthy" | "isFalsy" | "isNot" | "isTrue" | "isFalse" | "doesNotInclude" | "matchesRegex" | "isGreaterThan" | "isLessThan" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage";
523
+ } & {
524
+ field?: string | undefined;
525
+ value?: string | undefined;
526
+ reason?: string | undefined;
527
+ }) | ({
528
+ type: "named_rule";
529
+ rule_id: number;
530
+ } & {
531
+ reason?: string | undefined;
532
+ }))[];
467
533
  recommend_rules: (({
534
+ type: "url" | "context" | "element";
535
+ operator: "includes" | "endsWith" | "startsWith" | "is" | "isTruthy" | "isFalsy" | "isNot" | "isTrue" | "isFalse" | "doesNotInclude" | "matchesRegex" | "isGreaterThan" | "isLessThan" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage";
536
+ } & {
537
+ field?: string | undefined;
538
+ value?: string | undefined;
539
+ reason?: string | undefined;
540
+ }) | ({
468
541
  type: "always";
469
542
  } & {
470
543
  operator?: null | undefined;
471
544
  field?: null | undefined;
472
545
  value?: null | undefined;
473
546
  reason?: null | undefined;
474
- }) | ({
547
+ }))[] | (({
475
548
  type: "url" | "context" | "element";
476
549
  operator: "includes" | "endsWith" | "startsWith" | "is" | "isTruthy" | "isFalsy" | "isNot" | "isTrue" | "isFalse" | "doesNotInclude" | "matchesRegex" | "isGreaterThan" | "isLessThan" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage";
477
550
  } & {
478
551
  field?: string | undefined;
479
552
  value?: string | undefined;
480
553
  reason?: string | undefined;
554
+ }) | ({
555
+ type: "named_rule";
556
+ rule_id: number;
557
+ } & {
558
+ reason?: string | undefined;
559
+ }) | ({
560
+ type: "always";
561
+ } & {
562
+ operator?: null | undefined;
563
+ field?: null | undefined;
564
+ value?: null | undefined;
565
+ reason?: null | undefined;
481
566
  }))[];
567
+ availability_expression: import("./helpers/rules").RuleExpression;
568
+ recommend_expression: import("./helpers/rules").RuleExpression;
569
+ always_recommend: boolean;
482
570
  confirm: string;
483
571
  shortcut: string[];
484
572
  explanation: string;
@@ -506,13 +594,21 @@ export declare class Organization {
506
594
  shortcut_win: string[];
507
595
  hotkey_mac: string;
508
596
  hotkey_win: string;
509
- detail: string | {
597
+ detail: string | ({
510
598
  type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
511
599
  value: string;
512
- } | (string | {
600
+ } & {
601
+ position?: "inline" | "popover" | undefined;
602
+ }) | (string | ({
513
603
  type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
514
604
  value: string;
515
- })[] | null;
605
+ } & {
606
+ position?: "inline" | "popover" | undefined;
607
+ }))[] | null;
608
+ next_steps: (string | number)[];
609
+ } & {
610
+ third_party_source?: string | null | undefined;
611
+ third_party_id?: string | null | undefined;
516
612
  })[]>;
517
613
  static listCommandCategories: (orgUID: string) => Promise<({
518
614
  id: number;
@@ -556,14 +652,7 @@ export declare class Organization {
556
652
  static listRules: (orgUID: string) => Promise<{
557
653
  id: number;
558
654
  name: string;
559
- conditions: ({
560
- type: "url" | "context" | "element";
561
- operator: "includes" | "endsWith" | "startsWith" | "is" | "isTruthy" | "isFalsy" | "isNot" | "isTrue" | "isFalse" | "doesNotInclude" | "matchesRegex" | "isGreaterThan" | "isLessThan" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage";
562
- } & {
563
- field?: string | undefined;
564
- value?: string | undefined;
565
- reason?: string | undefined;
566
- })[];
655
+ expression: import("./helpers/rules").RuleExpression;
567
656
  }[]>;
568
657
  static userHasAccess: (uuid: string, user: string) => Promise<{
569
658
  username: string;
@@ -9,6 +9,15 @@ export declare const SkinV: t.IntersectionC<[t.TypeC<{
9
9
  }>, t.PartialC<{
10
10
  logo: t.UnionC<[t.StringC, t.NullC]>;
11
11
  }>]>;
12
+ export declare const SkinPatchV: t.PartialC<{
13
+ id: t.StringC;
14
+ slug: t.StringC;
15
+ name: t.StringC;
16
+ default: t.BooleanC;
17
+ skin: t.AnyC;
18
+ organization: t.StringC;
19
+ logo: t.UnionC<[t.StringC, t.NullC]>;
20
+ }>;
12
21
  export declare class Skin {
13
22
  static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
14
23
  id: string;
@@ -52,7 +61,15 @@ export declare class Skin {
52
61
  } & {
53
62
  logo?: string | null | undefined;
54
63
  }>;
55
- static create: (object: {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
64
+ static create: (object: {
65
+ id?: string | undefined;
66
+ slug?: string | undefined;
67
+ name?: string | undefined;
68
+ default?: boolean | undefined;
69
+ skin?: any;
70
+ organization?: string | undefined;
71
+ logo?: string | null | undefined;
72
+ }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
56
73
  id: string;
57
74
  slug: string;
58
75
  name: string;
@@ -19,6 +19,8 @@ import { ProfileV } from './profile';
19
19
  import { PlaceholderV } from './placeholder';
20
20
  import { EnvReleaseInfoV, ReleaseStepV, ReleaseV } from './releases';
21
21
  import { EnvironmentV } from './environment';
22
+ import { NudgeV } from './nudge';
23
+ import { RuleExpressionAndV, RuleExpressionOrV, RuleExpressionV } from './helpers/rules';
22
24
  /*******************************************************************************/
23
25
  export declare type IContextType = t.TypeOf<typeof ContextV>;
24
26
  export declare type IUserType = t.TypeOf<typeof UserV>;
@@ -58,6 +60,9 @@ export declare type RequestTemplateType = t.TypeOf<typeof RequestTemplateV>;
58
60
  export declare type RequestType = t.TypeOf<typeof RequestV>;
59
61
  export declare type ITemplateOptions = t.TypeOf<typeof TemplateOptionsV>;
60
62
  export declare type IEndUserType = t.TypeOf<typeof EndUserV>;
63
+ export declare type IRuleExpression = t.TypeOf<typeof RuleExpressionV>;
64
+ export declare type IRuleExpressionAnd = t.TypeOf<typeof RuleExpressionAndV>;
65
+ export declare type IRuleExpressionOr = t.TypeOf<typeof RuleExpressionOrV>;
61
66
  export declare type IConditionType = t.TypeOf<typeof ConditionV>;
62
67
  export declare type IConditionOperatorType = t.TypeOf<typeof ConditionOperatorV>;
63
68
  export declare type IContextArgumentType = t.TypeOf<typeof ContextArgumentV>;
@@ -66,6 +71,12 @@ export declare type IDynamicArgumentType = t.TypeOf<typeof DynamicArgumentV>;
66
71
  export declare type IDependentArgumentType = t.TypeOf<typeof DependentArgumentV>;
67
72
  export declare type IFunctionArgumentType = t.TypeOf<typeof FunctionArgumentV>;
68
73
  export declare type OptionGroupRenderAsType = t.TypeOf<typeof OptionGroupRenderAsV>;
74
+ export declare type INudgeType = t.TypeOf<typeof NudgeV>;
75
+ export interface INudgeClientType {
76
+ nudge: INudgeType;
77
+ active: boolean;
78
+ lastTriggeredTs?: number;
79
+ }
69
80
  export interface ICommandInput {
70
81
  text: string;
71
82
  command: ICommandType;
@@ -96,6 +107,7 @@ export declare type IConfigEndpointResponse = {
96
107
  organization: any;
97
108
  environments_with_versions?: any[];
98
109
  placeholders?: any[];
110
+ nudges?: INudgeType[];
99
111
  };
100
112
  export type { IResourceSettings } from './IResourceSettings';
101
113
  export declare type IResourceSettingsByContextKey = t.TypeOf<typeof ResourceSettingsByContextKeyV>;
@@ -190,6 +202,22 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
190
202
  object?: string | undefined;
191
203
  hoverTooltip?: boolean | undefined;
192
204
  operation?: "self" | "router" | "blank" | undefined;
205
+ }) | ({
206
+ type: "video";
207
+ value: string;
208
+ } & {} & {
209
+ commandType?: "object" | "independent" | "help" | undefined;
210
+ object?: string | undefined;
211
+ hoverTooltip?: boolean | undefined;
212
+ operation?: "self" | "router" | "blank" | undefined;
213
+ }) | ({
214
+ type: "helpdoc";
215
+ value: string;
216
+ } & {} & {
217
+ commandType?: "object" | "independent" | "help" | undefined;
218
+ object?: string | undefined;
219
+ hoverTooltip?: boolean | undefined;
220
+ operation?: "self" | "router" | "blank" | undefined;
193
221
  });
194
222
  } & {
195
223
  disabledReason?: string | undefined;
@@ -197,6 +225,7 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
197
225
  name?: string | undefined;
198
226
  last_available?: string | null | undefined;
199
227
  modified?: string | undefined;
228
+ isAsync?: boolean | undefined;
200
229
  } & {
201
230
  arguments: {
202
231
  [x: string]: ({
@@ -220,6 +249,8 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
220
249
  allow_create_label?: string | undefined;
221
250
  show_in_record_action_list?: boolean | undefined;
222
251
  show_in_default_list?: boolean | undefined;
252
+ auto_choose?: boolean | undefined;
253
+ is_private?: boolean | undefined;
223
254
  }) | ({
224
255
  type: "set";
225
256
  value: string[] | number[] | {
@@ -241,6 +272,8 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
241
272
  loaded?: any[] | undefined;
242
273
  allow_create?: boolean | undefined;
243
274
  allow_create_label?: string | undefined;
275
+ auto_choose?: boolean | undefined;
276
+ is_private?: boolean | undefined;
244
277
  }) | ({
245
278
  type: "provided";
246
279
  value: "time" | "text";
@@ -261,6 +294,8 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
261
294
  dateTimeArgumentTypeId?: number | undefined;
262
295
  allow_create?: boolean | undefined;
263
296
  allow_create_label?: string | undefined;
297
+ auto_choose?: boolean | undefined;
298
+ is_private?: boolean | undefined;
264
299
  }) | ({
265
300
  type: "dependent";
266
301
  value: string;
@@ -280,6 +315,8 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
280
315
  loaded?: any[] | undefined;
281
316
  allow_create?: boolean | undefined;
282
317
  allow_create_label?: string | undefined;
318
+ auto_choose?: boolean | undefined;
319
+ is_private?: boolean | undefined;
283
320
  }) | ({
284
321
  type: "function";
285
322
  value: string;
@@ -299,6 +336,35 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
299
336
  loaded?: any[] | undefined;
300
337
  allow_create?: boolean | undefined;
301
338
  allow_create_label?: string | undefined;
339
+ auto_choose?: boolean | undefined;
340
+ is_private?: boolean | undefined;
341
+ }) | ({
342
+ type: "html" | "video";
343
+ value: {
344
+ source: string;
345
+ } & {
346
+ title?: string | undefined;
347
+ description?: string | undefined;
348
+ url?: string | undefined;
349
+ };
350
+ order_key: number;
351
+ } & {
352
+ label?: string | undefined;
353
+ chosen?: string | number | undefined;
354
+ selected?: any[] | undefined;
355
+ input_type?: string | undefined;
356
+ preselected_key?: string | undefined;
357
+ label_field?: string | undefined;
358
+ availability_condition?: {
359
+ field: string;
360
+ operator: "==" | "!=" | "isTruthy" | "isFalsy";
361
+ value: string | undefined;
362
+ }[] | undefined;
363
+ loaded?: any[] | undefined;
364
+ allow_create?: boolean | undefined;
365
+ allow_create_label?: string | undefined;
366
+ is_private?: boolean | undefined;
367
+ auto_choose?: boolean | undefined;
302
368
  });
303
369
  };
304
370
  tags: string[];
@@ -311,20 +377,23 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
311
377
  reason?: string | undefined;
312
378
  })[];
313
379
  recommend_rules: (({
314
- type: "always";
315
- } & {
316
- operator?: null | undefined;
317
- field?: null | undefined;
318
- value?: null | undefined;
319
- reason?: null | undefined;
320
- }) | ({
321
380
  type: "url" | "context" | "element";
322
381
  operator: "includes" | "endsWith" | "startsWith" | "is" | "isTruthy" | "isFalsy" | "isNot" | "isTrue" | "isFalse" | "doesNotInclude" | "matchesRegex" | "isGreaterThan" | "isLessThan" | "isDefined" | "isNotDefined" | "classnameOnPage" | "idOnPage";
323
382
  } & {
324
383
  field?: string | undefined;
325
384
  value?: string | undefined;
326
385
  reason?: string | undefined;
386
+ }) | ({
387
+ type: "always";
388
+ } & {
389
+ operator?: null | undefined;
390
+ field?: null | undefined;
391
+ value?: null | undefined;
392
+ reason?: null | undefined;
327
393
  }))[];
394
+ availability_expression: import("./helpers/rules").RuleExpression | null;
395
+ recommend_expression: import("./helpers/rules").RuleExpression | null;
396
+ always_recommend: boolean;
328
397
  confirm: string;
329
398
  shortcut: string[];
330
399
  explanation: string;
@@ -352,13 +421,18 @@ export declare const isCommand: (command?: ICommandType | any) => command is {
352
421
  shortcut_win: string[];
353
422
  hotkey_mac: string;
354
423
  hotkey_win: string;
355
- detail: string | {
424
+ detail: string | ({
356
425
  type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
357
426
  value: string;
358
- } | (string | {
427
+ } & {
428
+ position?: "inline" | "popover" | undefined;
429
+ }) | (string | ({
359
430
  type: "html" | "video" | "plaintext" | "markdown" | "react" | null;
360
431
  value: string;
361
- })[] | null;
432
+ } & {
433
+ position?: "inline" | "popover" | undefined;
434
+ }))[] | null;
435
+ next_steps: (string | number)[];
362
436
  };
363
437
  export declare const isResource: (option: any) => option is IResourceType;
364
438
  export declare const isContextArgument: (argument: IArgumentType) => argument is {
@@ -382,6 +456,8 @@ export declare const isContextArgument: (argument: IArgumentType) => argument is
382
456
  allow_create_label?: string | undefined;
383
457
  show_in_record_action_list?: boolean | undefined;
384
458
  show_in_default_list?: boolean | undefined;
459
+ auto_choose?: boolean | undefined;
460
+ is_private?: boolean | undefined;
385
461
  };
386
462
  export declare const isTimeArgument: (argument: IArgumentType) => argument is {
387
463
  type: "provided";
@@ -403,6 +479,8 @@ export declare const isTimeArgument: (argument: IArgumentType) => argument is {
403
479
  dateTimeArgumentTypeId?: number | undefined;
404
480
  allow_create?: boolean | undefined;
405
481
  allow_create_label?: string | undefined;
482
+ auto_choose?: boolean | undefined;
483
+ is_private?: boolean | undefined;
406
484
  };
407
485
  export declare const isFunctionArgument: (argument: IArgumentType) => argument is {
408
486
  type: "function";
@@ -423,4 +501,6 @@ export declare const isFunctionArgument: (argument: IArgumentType) => argument i
423
501
  loaded?: any[] | undefined;
424
502
  allow_create?: boolean | undefined;
425
503
  allow_create_label?: string | undefined;
504
+ auto_choose?: boolean | undefined;
505
+ is_private?: boolean | undefined;
426
506
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commandbar",
3
- "version": "1.6.12",
3
+ "version": "1.6.15",
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",