commandbar 1.6.12 → 1.6.15
Sign up to get free protection for your applications and to get access to all the features.
- package/build/commandbar-js/src/index.js +1 -1
- package/build/internal/src/client/AddContextOptions.d.ts +7 -0
- package/build/internal/src/client/CommandBarClientSDK.d.ts +27 -1
- package/build/internal/src/client/CommandBarSDK.d.ts +2 -1
- package/build/internal/src/client/EventHandler.d.ts +4 -2
- package/build/internal/src/client/SentryReporter.d.ts +24 -3
- package/build/internal/src/client/symbols.d.ts +1 -0
- package/build/internal/src/middleware/CommandFromClientV.d.ts +46 -3
- package/build/internal/src/middleware/command.d.ts +1589 -205
- package/build/internal/src/middleware/detailPreview.d.ts +4 -2
- package/build/internal/src/middleware/helpers/argument.d.ts +156 -0
- package/build/internal/src/middleware/helpers/commandTemplate.d.ts +34 -0
- package/build/internal/src/middleware/helpers/rules.d.ts +29 -26
- package/build/internal/src/middleware/nudge.d.ts +189 -0
- package/build/internal/src/middleware/organization.d.ts +102 -13
- package/build/internal/src/middleware/skin.d.ts +18 -1
- package/build/internal/src/middleware/types.d.ts +90 -10
- package/package.json +1 -1
@@ -1,9 +1,11 @@
|
|
1
1
|
/*******************************************************************************/
|
2
2
|
import * as t from 'io-ts';
|
3
|
-
export declare const DetailPreviewObjectV: t.TypeC<{
|
3
|
+
export declare const DetailPreviewObjectV: t.IntersectionC<[t.TypeC<{
|
4
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
|
+
}>, t.PartialC<{
|
7
|
+
position: t.UnionC<[t.LiteralC<"inline">, t.LiteralC<"popover">]>;
|
8
|
+
}>]>;
|
7
9
|
export declare type DetailPreviewObjectType = t.TypeOf<typeof DetailPreviewObjectV>;
|
8
10
|
export declare type DetailPreviewType = string | DetailPreviewObjectType | (string | DetailPreviewObjectType)[];
|
9
11
|
export declare type DataRowMedata = {
|
@@ -28,6 +28,8 @@ export declare const ContextArgumentV: t.IntersectionC<[t.TypeC<{
|
|
28
28
|
allow_create_label: t.StringC;
|
29
29
|
show_in_record_action_list: t.BooleanC;
|
30
30
|
show_in_default_list: t.BooleanC;
|
31
|
+
auto_choose: t.BooleanC;
|
32
|
+
is_private: t.BooleanC;
|
31
33
|
}>]>;
|
32
34
|
export declare const SetArgumentV: t.IntersectionC<[t.TypeC<{
|
33
35
|
type: t.LiteralC<"set">;
|
@@ -48,6 +50,43 @@ export declare const SetArgumentV: t.IntersectionC<[t.TypeC<{
|
|
48
50
|
loaded: t.ArrayC<t.AnyC>;
|
49
51
|
allow_create: t.BooleanC;
|
50
52
|
allow_create_label: t.StringC;
|
53
|
+
auto_choose: t.BooleanC;
|
54
|
+
is_private: t.BooleanC;
|
55
|
+
}>]>;
|
56
|
+
export declare const DashboardV: t.IntersectionC<[t.TypeC<{
|
57
|
+
source: t.StringC;
|
58
|
+
}>, t.PartialC<{
|
59
|
+
title: t.StringC;
|
60
|
+
description: t.StringC;
|
61
|
+
url: t.StringC;
|
62
|
+
}>]>;
|
63
|
+
export declare const DashboardArgumentV: t.IntersectionC<[t.TypeC<{
|
64
|
+
type: t.UnionC<[t.LiteralC<"video">, t.LiteralC<"html">]>;
|
65
|
+
value: t.IntersectionC<[t.TypeC<{
|
66
|
+
source: t.StringC;
|
67
|
+
}>, t.PartialC<{
|
68
|
+
title: t.StringC;
|
69
|
+
description: t.StringC;
|
70
|
+
url: t.StringC;
|
71
|
+
}>]>;
|
72
|
+
order_key: t.NumberC;
|
73
|
+
}>, t.PartialC<{
|
74
|
+
label: t.StringC;
|
75
|
+
chosen: t.UnionC<[t.StringC, t.NumberC]>;
|
76
|
+
selected: t.ArrayC<t.AnyC>;
|
77
|
+
input_type: t.StringC;
|
78
|
+
preselected_key: t.StringC;
|
79
|
+
label_field: t.StringC;
|
80
|
+
availability_condition: t.ArrayC<t.TypeC<{
|
81
|
+
field: t.StringC;
|
82
|
+
operator: t.UnionC<[t.LiteralC<"==">, t.LiteralC<"!=">, t.LiteralC<"isTruthy">, t.LiteralC<"isFalsy">]>;
|
83
|
+
value: t.UnionC<[t.StringC, t.UndefinedC]>;
|
84
|
+
}>>;
|
85
|
+
loaded: t.ArrayC<t.AnyC>;
|
86
|
+
allow_create: t.BooleanC;
|
87
|
+
allow_create_label: t.StringC;
|
88
|
+
is_private: t.BooleanC;
|
89
|
+
auto_choose: t.BooleanC;
|
51
90
|
}>]>;
|
52
91
|
export declare const DynamicArgumentV: t.IntersectionC<[t.TypeC<{
|
53
92
|
type: t.LiteralC<"provided">;
|
@@ -69,6 +108,8 @@ export declare const DynamicArgumentV: t.IntersectionC<[t.TypeC<{
|
|
69
108
|
dateTimeArgumentTypeId: t.NumberC;
|
70
109
|
allow_create: t.BooleanC;
|
71
110
|
allow_create_label: t.StringC;
|
111
|
+
auto_choose: t.BooleanC;
|
112
|
+
is_private: t.BooleanC;
|
72
113
|
}>]>;
|
73
114
|
export declare const DependentArgumentV: t.IntersectionC<[t.TypeC<{
|
74
115
|
type: t.LiteralC<"dependent">;
|
@@ -89,6 +130,8 @@ export declare const DependentArgumentV: t.IntersectionC<[t.TypeC<{
|
|
89
130
|
loaded: t.ArrayC<t.AnyC>;
|
90
131
|
allow_create: t.BooleanC;
|
91
132
|
allow_create_label: t.StringC;
|
133
|
+
auto_choose: t.BooleanC;
|
134
|
+
is_private: t.BooleanC;
|
92
135
|
}>]>;
|
93
136
|
export declare const FunctionArgumentV: t.IntersectionC<[t.TypeC<{
|
94
137
|
type: t.LiteralC<"function">;
|
@@ -109,6 +152,8 @@ export declare const FunctionArgumentV: t.IntersectionC<[t.TypeC<{
|
|
109
152
|
loaded: t.ArrayC<t.AnyC>;
|
110
153
|
allow_create: t.BooleanC;
|
111
154
|
allow_create_label: t.StringC;
|
155
|
+
auto_choose: t.BooleanC;
|
156
|
+
is_private: t.BooleanC;
|
112
157
|
}>]>;
|
113
158
|
export declare const ArgumentTypeV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
114
159
|
type: t.LiteralC<"context">;
|
@@ -131,6 +176,8 @@ export declare const ArgumentTypeV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
|
131
176
|
allow_create_label: t.StringC;
|
132
177
|
show_in_record_action_list: t.BooleanC;
|
133
178
|
show_in_default_list: t.BooleanC;
|
179
|
+
auto_choose: t.BooleanC;
|
180
|
+
is_private: t.BooleanC;
|
134
181
|
}>]>, t.IntersectionC<[t.TypeC<{
|
135
182
|
type: t.LiteralC<"set">;
|
136
183
|
value: t.UnionC<[t.ArrayC<t.StringC>, t.ArrayC<t.NumberC>, t.ArrayC<t.UnknownRecordC>]>;
|
@@ -150,6 +197,8 @@ export declare const ArgumentTypeV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
|
150
197
|
loaded: t.ArrayC<t.AnyC>;
|
151
198
|
allow_create: t.BooleanC;
|
152
199
|
allow_create_label: t.StringC;
|
200
|
+
auto_choose: t.BooleanC;
|
201
|
+
is_private: t.BooleanC;
|
153
202
|
}>]>, t.IntersectionC<[t.TypeC<{
|
154
203
|
type: t.LiteralC<"provided">;
|
155
204
|
value: t.UnionC<[t.LiteralC<"text">, t.LiteralC<"time">]>;
|
@@ -170,6 +219,8 @@ export declare const ArgumentTypeV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
|
170
219
|
dateTimeArgumentTypeId: t.NumberC;
|
171
220
|
allow_create: t.BooleanC;
|
172
221
|
allow_create_label: t.StringC;
|
222
|
+
auto_choose: t.BooleanC;
|
223
|
+
is_private: t.BooleanC;
|
173
224
|
}>]>, t.IntersectionC<[t.TypeC<{
|
174
225
|
type: t.LiteralC<"dependent">;
|
175
226
|
value: t.StringC;
|
@@ -189,6 +240,8 @@ export declare const ArgumentTypeV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
|
189
240
|
loaded: t.ArrayC<t.AnyC>;
|
190
241
|
allow_create: t.BooleanC;
|
191
242
|
allow_create_label: t.StringC;
|
243
|
+
auto_choose: t.BooleanC;
|
244
|
+
is_private: t.BooleanC;
|
192
245
|
}>]>, t.IntersectionC<[t.TypeC<{
|
193
246
|
type: t.LiteralC<"function">;
|
194
247
|
value: t.StringC;
|
@@ -208,6 +261,35 @@ export declare const ArgumentTypeV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
|
208
261
|
loaded: t.ArrayC<t.AnyC>;
|
209
262
|
allow_create: t.BooleanC;
|
210
263
|
allow_create_label: t.StringC;
|
264
|
+
auto_choose: t.BooleanC;
|
265
|
+
is_private: t.BooleanC;
|
266
|
+
}>]>, t.IntersectionC<[t.TypeC<{
|
267
|
+
type: t.UnionC<[t.LiteralC<"video">, t.LiteralC<"html">]>;
|
268
|
+
value: t.IntersectionC<[t.TypeC<{
|
269
|
+
source: t.StringC;
|
270
|
+
}>, t.PartialC<{
|
271
|
+
title: t.StringC;
|
272
|
+
description: t.StringC;
|
273
|
+
url: t.StringC;
|
274
|
+
}>]>;
|
275
|
+
order_key: t.NumberC;
|
276
|
+
}>, t.PartialC<{
|
277
|
+
label: t.StringC;
|
278
|
+
chosen: t.UnionC<[t.StringC, t.NumberC]>;
|
279
|
+
selected: t.ArrayC<t.AnyC>;
|
280
|
+
input_type: t.StringC;
|
281
|
+
preselected_key: t.StringC;
|
282
|
+
label_field: t.StringC;
|
283
|
+
availability_condition: t.ArrayC<t.TypeC<{
|
284
|
+
field: t.StringC;
|
285
|
+
operator: t.UnionC<[t.LiteralC<"==">, t.LiteralC<"!=">, t.LiteralC<"isTruthy">, t.LiteralC<"isFalsy">]>;
|
286
|
+
value: t.UnionC<[t.StringC, t.UndefinedC]>;
|
287
|
+
}>>;
|
288
|
+
loaded: t.ArrayC<t.AnyC>;
|
289
|
+
allow_create: t.BooleanC;
|
290
|
+
allow_create_label: t.StringC;
|
291
|
+
is_private: t.BooleanC;
|
292
|
+
auto_choose: t.BooleanC;
|
211
293
|
}>]>]>;
|
212
294
|
export declare const ArgumentMapV: t.RecordC<t.StringC, t.UnionC<[t.IntersectionC<[t.TypeC<{
|
213
295
|
type: t.LiteralC<"context">;
|
@@ -230,6 +312,8 @@ export declare const ArgumentMapV: t.RecordC<t.StringC, t.UnionC<[t.Intersection
|
|
230
312
|
allow_create_label: t.StringC;
|
231
313
|
show_in_record_action_list: t.BooleanC;
|
232
314
|
show_in_default_list: t.BooleanC;
|
315
|
+
auto_choose: t.BooleanC;
|
316
|
+
is_private: t.BooleanC;
|
233
317
|
}>]>, t.IntersectionC<[t.TypeC<{
|
234
318
|
type: t.LiteralC<"set">;
|
235
319
|
value: t.UnionC<[t.ArrayC<t.StringC>, t.ArrayC<t.NumberC>, t.ArrayC<t.UnknownRecordC>]>;
|
@@ -249,6 +333,8 @@ export declare const ArgumentMapV: t.RecordC<t.StringC, t.UnionC<[t.Intersection
|
|
249
333
|
loaded: t.ArrayC<t.AnyC>;
|
250
334
|
allow_create: t.BooleanC;
|
251
335
|
allow_create_label: t.StringC;
|
336
|
+
auto_choose: t.BooleanC;
|
337
|
+
is_private: t.BooleanC;
|
252
338
|
}>]>, t.IntersectionC<[t.TypeC<{
|
253
339
|
type: t.LiteralC<"provided">;
|
254
340
|
value: t.UnionC<[t.LiteralC<"text">, t.LiteralC<"time">]>;
|
@@ -269,6 +355,8 @@ export declare const ArgumentMapV: t.RecordC<t.StringC, t.UnionC<[t.Intersection
|
|
269
355
|
dateTimeArgumentTypeId: t.NumberC;
|
270
356
|
allow_create: t.BooleanC;
|
271
357
|
allow_create_label: t.StringC;
|
358
|
+
auto_choose: t.BooleanC;
|
359
|
+
is_private: t.BooleanC;
|
272
360
|
}>]>, t.IntersectionC<[t.TypeC<{
|
273
361
|
type: t.LiteralC<"dependent">;
|
274
362
|
value: t.StringC;
|
@@ -288,6 +376,8 @@ export declare const ArgumentMapV: t.RecordC<t.StringC, t.UnionC<[t.Intersection
|
|
288
376
|
loaded: t.ArrayC<t.AnyC>;
|
289
377
|
allow_create: t.BooleanC;
|
290
378
|
allow_create_label: t.StringC;
|
379
|
+
auto_choose: t.BooleanC;
|
380
|
+
is_private: t.BooleanC;
|
291
381
|
}>]>, t.IntersectionC<[t.TypeC<{
|
292
382
|
type: t.LiteralC<"function">;
|
293
383
|
value: t.StringC;
|
@@ -307,6 +397,35 @@ export declare const ArgumentMapV: t.RecordC<t.StringC, t.UnionC<[t.Intersection
|
|
307
397
|
loaded: t.ArrayC<t.AnyC>;
|
308
398
|
allow_create: t.BooleanC;
|
309
399
|
allow_create_label: t.StringC;
|
400
|
+
auto_choose: t.BooleanC;
|
401
|
+
is_private: t.BooleanC;
|
402
|
+
}>]>, t.IntersectionC<[t.TypeC<{
|
403
|
+
type: t.UnionC<[t.LiteralC<"video">, t.LiteralC<"html">]>;
|
404
|
+
value: t.IntersectionC<[t.TypeC<{
|
405
|
+
source: t.StringC;
|
406
|
+
}>, t.PartialC<{
|
407
|
+
title: t.StringC;
|
408
|
+
description: t.StringC;
|
409
|
+
url: t.StringC;
|
410
|
+
}>]>;
|
411
|
+
order_key: t.NumberC;
|
412
|
+
}>, t.PartialC<{
|
413
|
+
label: t.StringC;
|
414
|
+
chosen: t.UnionC<[t.StringC, t.NumberC]>;
|
415
|
+
selected: t.ArrayC<t.AnyC>;
|
416
|
+
input_type: t.StringC;
|
417
|
+
preselected_key: t.StringC;
|
418
|
+
label_field: t.StringC;
|
419
|
+
availability_condition: t.ArrayC<t.TypeC<{
|
420
|
+
field: t.StringC;
|
421
|
+
operator: t.UnionC<[t.LiteralC<"==">, t.LiteralC<"!=">, t.LiteralC<"isTruthy">, t.LiteralC<"isFalsy">]>;
|
422
|
+
value: t.UnionC<[t.StringC, t.UndefinedC]>;
|
423
|
+
}>>;
|
424
|
+
loaded: t.ArrayC<t.AnyC>;
|
425
|
+
allow_create: t.BooleanC;
|
426
|
+
allow_create_label: t.StringC;
|
427
|
+
is_private: t.BooleanC;
|
428
|
+
auto_choose: t.BooleanC;
|
310
429
|
}>]>]>>;
|
311
430
|
export declare const StepArgumentTypeV: t.IntersectionC<[t.TypeC<{
|
312
431
|
userDefinedName: t.StringC;
|
@@ -332,6 +451,8 @@ export declare const StepArgumentTypeV: t.IntersectionC<[t.TypeC<{
|
|
332
451
|
allow_create_label: t.StringC;
|
333
452
|
show_in_record_action_list: t.BooleanC;
|
334
453
|
show_in_default_list: t.BooleanC;
|
454
|
+
auto_choose: t.BooleanC;
|
455
|
+
is_private: t.BooleanC;
|
335
456
|
}>]>, t.IntersectionC<[t.TypeC<{
|
336
457
|
type: t.LiteralC<"set">;
|
337
458
|
value: t.UnionC<[t.ArrayC<t.StringC>, t.ArrayC<t.NumberC>, t.ArrayC<t.UnknownRecordC>]>;
|
@@ -351,6 +472,8 @@ export declare const StepArgumentTypeV: t.IntersectionC<[t.TypeC<{
|
|
351
472
|
loaded: t.ArrayC<t.AnyC>;
|
352
473
|
allow_create: t.BooleanC;
|
353
474
|
allow_create_label: t.StringC;
|
475
|
+
auto_choose: t.BooleanC;
|
476
|
+
is_private: t.BooleanC;
|
354
477
|
}>]>, t.IntersectionC<[t.TypeC<{
|
355
478
|
type: t.LiteralC<"provided">;
|
356
479
|
value: t.UnionC<[t.LiteralC<"text">, t.LiteralC<"time">]>;
|
@@ -371,6 +494,8 @@ export declare const StepArgumentTypeV: t.IntersectionC<[t.TypeC<{
|
|
371
494
|
dateTimeArgumentTypeId: t.NumberC;
|
372
495
|
allow_create: t.BooleanC;
|
373
496
|
allow_create_label: t.StringC;
|
497
|
+
auto_choose: t.BooleanC;
|
498
|
+
is_private: t.BooleanC;
|
374
499
|
}>]>, t.IntersectionC<[t.TypeC<{
|
375
500
|
type: t.LiteralC<"dependent">;
|
376
501
|
value: t.StringC;
|
@@ -390,6 +515,8 @@ export declare const StepArgumentTypeV: t.IntersectionC<[t.TypeC<{
|
|
390
515
|
loaded: t.ArrayC<t.AnyC>;
|
391
516
|
allow_create: t.BooleanC;
|
392
517
|
allow_create_label: t.StringC;
|
518
|
+
auto_choose: t.BooleanC;
|
519
|
+
is_private: t.BooleanC;
|
393
520
|
}>]>, t.IntersectionC<[t.TypeC<{
|
394
521
|
type: t.LiteralC<"function">;
|
395
522
|
value: t.StringC;
|
@@ -409,4 +536,33 @@ export declare const StepArgumentTypeV: t.IntersectionC<[t.TypeC<{
|
|
409
536
|
loaded: t.ArrayC<t.AnyC>;
|
410
537
|
allow_create: t.BooleanC;
|
411
538
|
allow_create_label: t.StringC;
|
539
|
+
auto_choose: t.BooleanC;
|
540
|
+
is_private: t.BooleanC;
|
541
|
+
}>]>, t.IntersectionC<[t.TypeC<{
|
542
|
+
type: t.UnionC<[t.LiteralC<"video">, t.LiteralC<"html">]>;
|
543
|
+
value: t.IntersectionC<[t.TypeC<{
|
544
|
+
source: t.StringC;
|
545
|
+
}>, t.PartialC<{
|
546
|
+
title: t.StringC;
|
547
|
+
description: t.StringC;
|
548
|
+
url: t.StringC;
|
549
|
+
}>]>;
|
550
|
+
order_key: t.NumberC;
|
551
|
+
}>, t.PartialC<{
|
552
|
+
label: t.StringC;
|
553
|
+
chosen: t.UnionC<[t.StringC, t.NumberC]>;
|
554
|
+
selected: t.ArrayC<t.AnyC>;
|
555
|
+
input_type: t.StringC;
|
556
|
+
preselected_key: t.StringC;
|
557
|
+
label_field: t.StringC;
|
558
|
+
availability_condition: t.ArrayC<t.TypeC<{
|
559
|
+
field: t.StringC;
|
560
|
+
operator: t.UnionC<[t.LiteralC<"==">, t.LiteralC<"!=">, t.LiteralC<"isTruthy">, t.LiteralC<"isFalsy">]>;
|
561
|
+
value: t.UnionC<[t.StringC, t.UndefinedC]>;
|
562
|
+
}>>;
|
563
|
+
loaded: t.ArrayC<t.AnyC>;
|
564
|
+
allow_create: t.BooleanC;
|
565
|
+
allow_create_label: t.StringC;
|
566
|
+
is_private: t.BooleanC;
|
567
|
+
auto_choose: t.BooleanC;
|
412
568
|
}>]>]>]>;
|
@@ -79,6 +79,24 @@ export declare const ScriptTemplateV: t.IntersectionC<[t.TypeC<{
|
|
79
79
|
hoverTooltip: t.BooleanC;
|
80
80
|
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
81
81
|
}>]>]>;
|
82
|
+
export declare const VideoTemplateV: t.IntersectionC<[t.TypeC<{
|
83
|
+
type: t.LiteralC<"video">;
|
84
|
+
value: t.StringC;
|
85
|
+
}>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
|
86
|
+
commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
|
87
|
+
object: t.StringC;
|
88
|
+
hoverTooltip: t.BooleanC;
|
89
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
90
|
+
}>]>]>;
|
91
|
+
export declare const HelpDocTemplateV: t.IntersectionC<[t.TypeC<{
|
92
|
+
type: t.LiteralC<"helpdoc">;
|
93
|
+
value: t.StringC;
|
94
|
+
}>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
|
95
|
+
commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
|
96
|
+
object: t.StringC;
|
97
|
+
hoverTooltip: t.BooleanC;
|
98
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
99
|
+
}>]>]>;
|
82
100
|
export declare const RequestV: t.IntersectionC<[t.TypeC<{
|
83
101
|
method: t.UnionC<[t.LiteralC<"get">, t.LiteralC<"delete">, t.LiteralC<"head">, t.LiteralC<"options">, t.LiteralC<"post">, t.LiteralC<"put">, t.LiteralC<"patch">]>;
|
84
102
|
url: t.StringC;
|
@@ -188,4 +206,20 @@ export declare const TemplateV: t.UnionC<[t.IntersectionC<[t.TypeC<{
|
|
188
206
|
object: t.StringC;
|
189
207
|
hoverTooltip: t.BooleanC;
|
190
208
|
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
209
|
+
}>]>]>, t.IntersectionC<[t.TypeC<{
|
210
|
+
type: t.LiteralC<"video">;
|
211
|
+
value: t.StringC;
|
212
|
+
}>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
|
213
|
+
commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
|
214
|
+
object: t.StringC;
|
215
|
+
hoverTooltip: t.BooleanC;
|
216
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
217
|
+
}>]>]>, t.IntersectionC<[t.TypeC<{
|
218
|
+
type: t.LiteralC<"helpdoc">;
|
219
|
+
value: t.StringC;
|
220
|
+
}>, t.IntersectionC<[t.TypeC<{}>, t.PartialC<{
|
221
|
+
commandType: t.UnionC<[t.LiteralC<"independent">, t.LiteralC<"object">, t.LiteralC<"help">]>;
|
222
|
+
object: t.StringC;
|
223
|
+
hoverTooltip: t.BooleanC;
|
224
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
191
225
|
}>]>]>]>;
|
@@ -45,6 +45,34 @@ export declare const ConditionV: t.IntersectionC<[t.TypeC<{
|
|
45
45
|
value: t.StringC;
|
46
46
|
reason: t.StringC;
|
47
47
|
}>]>;
|
48
|
+
export declare const getConditions: (expr: RuleExpression) => ExpressionCondition[];
|
49
|
+
export declare const canonicalize: (expr: RuleExpression) => RuleExpression;
|
50
|
+
export declare function isCompoundExpression(expr: RuleExpression): expr is RuleExpressionAnd | RuleExpressionOr;
|
51
|
+
export declare type ExpressionCondition = t.TypeOf<typeof ConditionV> | t.TypeOf<typeof NamedRuleReferenceV>;
|
52
|
+
export declare type RuleExpression = RuleExpressionAnd | RuleExpressionOr | RuleExpressionLiteral | RuleExpressionCondition;
|
53
|
+
export declare type RuleExpressionAnd = {
|
54
|
+
type: 'AND';
|
55
|
+
exprs: RuleExpression[];
|
56
|
+
};
|
57
|
+
export declare type RuleExpressionOr = {
|
58
|
+
type: 'OR';
|
59
|
+
exprs: RuleExpression[];
|
60
|
+
};
|
61
|
+
export declare type RuleExpressionLiteral = {
|
62
|
+
type: 'LITERAL';
|
63
|
+
value: boolean;
|
64
|
+
};
|
65
|
+
export declare type RuleExpressionCondition = {
|
66
|
+
type: 'CONDITION';
|
67
|
+
condition: ExpressionCondition;
|
68
|
+
};
|
69
|
+
export declare const RuleExpressionAndV: t.Type<RuleExpressionAnd>;
|
70
|
+
export declare const RuleExpressionOrV: t.Type<RuleExpressionOr>;
|
71
|
+
export declare const RuleExpressionLiteralV: t.Type<RuleExpressionLiteral>;
|
72
|
+
export declare const RuleExpressionConditionV: t.Type<RuleExpressionCondition>;
|
73
|
+
export declare const RuleExpressionV: t.Type<RuleExpression>;
|
74
|
+
export declare const RuleExpressionTrue: t.TypeOf<typeof RuleExpressionLiteralV>;
|
75
|
+
export declare const RuleExpressionFalse: t.TypeOf<typeof RuleExpressionLiteralV>;
|
48
76
|
export declare const NamedRuleReferenceV: t.IntersectionC<[t.TypeC<{
|
49
77
|
type: t.LiteralC<"named_rule">;
|
50
78
|
rule_id: t.NumberC;
|
@@ -190,32 +218,7 @@ export declare const EditorRecommendationRuleV: t.UnionC<[t.UnionC<[t.Intersecti
|
|
190
218
|
export declare const NamedRuleV: t.TypeC<{
|
191
219
|
id: t.NumberC;
|
192
220
|
name: t.StringC;
|
193
|
-
|
194
|
-
type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">]>;
|
195
|
-
operator: t.KeyofC<{
|
196
|
-
includes: null;
|
197
|
-
endsWith: null;
|
198
|
-
startsWith: null;
|
199
|
-
is: null;
|
200
|
-
isTruthy: null;
|
201
|
-
isFalsy: null;
|
202
|
-
isNot: null;
|
203
|
-
isTrue: null;
|
204
|
-
isFalse: null;
|
205
|
-
doesNotInclude: null;
|
206
|
-
matchesRegex: null;
|
207
|
-
isGreaterThan: null;
|
208
|
-
isLessThan: null;
|
209
|
-
isDefined: null;
|
210
|
-
isNotDefined: null;
|
211
|
-
classnameOnPage: null;
|
212
|
-
idOnPage: null;
|
213
|
-
}>;
|
214
|
-
}>, t.PartialC<{
|
215
|
-
field: t.StringC;
|
216
|
-
value: t.StringC;
|
217
|
-
reason: t.StringC;
|
218
|
-
}>]>>;
|
221
|
+
expression: t.Type<RuleExpression, RuleExpression, unknown>;
|
219
222
|
}>;
|
220
223
|
export declare type IRuleOperator = t.TypeOf<typeof OperatorV>;
|
221
224
|
export declare type IAvailabilityRule = t.TypeOf<typeof AvailabilityRuleV>;
|
@@ -0,0 +1,189 @@
|
|
1
|
+
import * as t from 'io-ts';
|
2
|
+
export declare const NudgeV: t.IntersectionC<[t.TypeC<{
|
3
|
+
id: t.NumberC;
|
4
|
+
organization: t.StringC;
|
5
|
+
slug: t.StringC;
|
6
|
+
content: t.StringC;
|
7
|
+
show_expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
|
8
|
+
trigger: t.UnionC<[t.TypeC<{
|
9
|
+
type: t.LiteralC<"when_conditions_pass">;
|
10
|
+
}>, t.TypeC<{
|
11
|
+
type: t.LiteralC<"on_command_execution">;
|
12
|
+
meta: t.TypeC<{
|
13
|
+
command: t.StringC;
|
14
|
+
}>;
|
15
|
+
}>]>;
|
16
|
+
on_select: t.TypeC<{
|
17
|
+
type: t.LiteralC<"execute_command">;
|
18
|
+
meta: t.TypeC<{
|
19
|
+
command: t.StringC;
|
20
|
+
}>;
|
21
|
+
}>;
|
22
|
+
timeout_ms: t.UnionC<[t.NumberC, t.NullC]>;
|
23
|
+
frequency_limit: t.UnionC<[t.LiteralC<"no_limit">, t.LiteralC<"once_per_session">, t.LiteralC<"once_per_user">]>;
|
24
|
+
}>, t.PartialC<{}>]>;
|
25
|
+
export declare class Nudge {
|
26
|
+
static decode: (data: any) => {
|
27
|
+
id: number;
|
28
|
+
organization: string;
|
29
|
+
slug: string;
|
30
|
+
content: string;
|
31
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
32
|
+
trigger: {
|
33
|
+
type: "when_conditions_pass";
|
34
|
+
} | {
|
35
|
+
type: "on_command_execution";
|
36
|
+
meta: {
|
37
|
+
command: string;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
on_select: {
|
41
|
+
type: "execute_command";
|
42
|
+
meta: {
|
43
|
+
command: string;
|
44
|
+
};
|
45
|
+
};
|
46
|
+
timeout_ms: number | null;
|
47
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
|
48
|
+
} & {};
|
49
|
+
static create: (object: {
|
50
|
+
id: number;
|
51
|
+
organization: string;
|
52
|
+
slug: string;
|
53
|
+
content: string;
|
54
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
55
|
+
trigger: {
|
56
|
+
type: "when_conditions_pass";
|
57
|
+
} | {
|
58
|
+
type: "on_command_execution";
|
59
|
+
meta: {
|
60
|
+
command: string;
|
61
|
+
};
|
62
|
+
};
|
63
|
+
on_select: {
|
64
|
+
type: "execute_command";
|
65
|
+
meta: {
|
66
|
+
command: string;
|
67
|
+
};
|
68
|
+
};
|
69
|
+
timeout_ms: number | null;
|
70
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
|
71
|
+
} & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
72
|
+
id: number;
|
73
|
+
organization: string;
|
74
|
+
slug: string;
|
75
|
+
content: string;
|
76
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
77
|
+
trigger: {
|
78
|
+
type: "when_conditions_pass";
|
79
|
+
} | {
|
80
|
+
type: "on_command_execution";
|
81
|
+
meta: {
|
82
|
+
command: string;
|
83
|
+
};
|
84
|
+
};
|
85
|
+
on_select: {
|
86
|
+
type: "execute_command";
|
87
|
+
meta: {
|
88
|
+
command: string;
|
89
|
+
};
|
90
|
+
};
|
91
|
+
timeout_ms: number | null;
|
92
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
|
93
|
+
} & {}>;
|
94
|
+
static update: (object: {
|
95
|
+
id: number;
|
96
|
+
organization: string;
|
97
|
+
slug: string;
|
98
|
+
content: string;
|
99
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
100
|
+
trigger: {
|
101
|
+
type: "when_conditions_pass";
|
102
|
+
} | {
|
103
|
+
type: "on_command_execution";
|
104
|
+
meta: {
|
105
|
+
command: string;
|
106
|
+
};
|
107
|
+
};
|
108
|
+
on_select: {
|
109
|
+
type: "execute_command";
|
110
|
+
meta: {
|
111
|
+
command: string;
|
112
|
+
};
|
113
|
+
};
|
114
|
+
timeout_ms: number | null;
|
115
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
|
116
|
+
} & {}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
117
|
+
id: number;
|
118
|
+
organization: string;
|
119
|
+
slug: string;
|
120
|
+
content: string;
|
121
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
122
|
+
trigger: {
|
123
|
+
type: "when_conditions_pass";
|
124
|
+
} | {
|
125
|
+
type: "on_command_execution";
|
126
|
+
meta: {
|
127
|
+
command: string;
|
128
|
+
};
|
129
|
+
};
|
130
|
+
on_select: {
|
131
|
+
type: "execute_command";
|
132
|
+
meta: {
|
133
|
+
command: string;
|
134
|
+
};
|
135
|
+
};
|
136
|
+
timeout_ms: number | null;
|
137
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
|
138
|
+
} & {}>;
|
139
|
+
static delete: (id: string | number, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
|
140
|
+
static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
|
141
|
+
id: number;
|
142
|
+
organization: string;
|
143
|
+
slug: string;
|
144
|
+
content: string;
|
145
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
146
|
+
trigger: {
|
147
|
+
type: "when_conditions_pass";
|
148
|
+
} | {
|
149
|
+
type: "on_command_execution";
|
150
|
+
meta: {
|
151
|
+
command: string;
|
152
|
+
};
|
153
|
+
};
|
154
|
+
on_select: {
|
155
|
+
type: "execute_command";
|
156
|
+
meta: {
|
157
|
+
command: string;
|
158
|
+
};
|
159
|
+
};
|
160
|
+
timeout_ms: number | null;
|
161
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
|
162
|
+
} & {})[]>;
|
163
|
+
static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
|
164
|
+
onSuccess?: (() => void) | undefined;
|
165
|
+
onError?: ((err: string) => void) | undefined;
|
166
|
+
} | undefined) => Promise<{
|
167
|
+
id: number;
|
168
|
+
organization: string;
|
169
|
+
slug: string;
|
170
|
+
content: string;
|
171
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
172
|
+
trigger: {
|
173
|
+
type: "when_conditions_pass";
|
174
|
+
} | {
|
175
|
+
type: "on_command_execution";
|
176
|
+
meta: {
|
177
|
+
command: string;
|
178
|
+
};
|
179
|
+
};
|
180
|
+
on_select: {
|
181
|
+
type: "execute_command";
|
182
|
+
meta: {
|
183
|
+
command: string;
|
184
|
+
};
|
185
|
+
};
|
186
|
+
timeout_ms: number | null;
|
187
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user";
|
188
|
+
} & {}>;
|
189
|
+
}
|