commandbar 1.8.6 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/build/commandbar-js/src/index.js +1 -1
  2. package/build/internal/src/client/AddContextOptions.d.ts +4 -0
  3. package/build/internal/src/client/AnalyticsEventTypes.d.ts +1 -1
  4. package/build/internal/src/client/CommandBarClientSDK.d.ts +25 -7
  5. package/build/internal/src/client/CommandBarProxySDK.d.ts +3 -3
  6. package/build/internal/src/client/CommandBarSDK.d.ts +23 -12
  7. package/build/internal/src/client/EventHandler.d.ts +19 -5
  8. package/build/internal/src/client/globals.d.ts +6 -0
  9. package/build/internal/src/client/symbols.d.ts +11 -6
  10. package/build/internal/src/middleware/CommandFromClientV.d.ts +68 -10
  11. package/build/internal/src/middleware/OrganizationV.d.ts +124 -20
  12. package/build/internal/src/middleware/additionalResource.d.ts +178 -16
  13. package/build/internal/src/middleware/billing.d.ts +33 -0
  14. package/build/internal/src/middleware/chat.d.ts +10913 -0
  15. package/build/internal/src/middleware/checklist.d.ts +106 -28
  16. package/build/internal/src/middleware/command.d.ts +3778 -446
  17. package/build/internal/src/middleware/detailPreview.d.ts +12 -1
  18. package/build/internal/src/middleware/endUser.d.ts +104 -0
  19. package/build/internal/src/middleware/generics.d.ts +12 -11
  20. package/build/internal/src/middleware/helpDocsIntegration.d.ts +54 -8
  21. package/build/internal/src/middleware/helpDocsSearch.d.ts +2204 -0
  22. package/build/internal/src/middleware/helpHub.d.ts +26 -0
  23. package/build/internal/src/middleware/helpers/actions.d.ts +116 -8
  24. package/build/internal/src/middleware/helpers/commandTemplate.d.ts +82 -2
  25. package/build/internal/src/middleware/helpers/pushTrigger.d.ts +6 -0
  26. package/build/internal/src/middleware/helpers/rules.d.ts +285 -26
  27. package/build/internal/src/middleware/network.d.ts +18 -3
  28. package/build/internal/src/middleware/nudge.d.ts +1193 -43
  29. package/build/internal/src/middleware/organization.d.ts +1051 -141
  30. package/build/internal/src/middleware/organizationSettings.d.ts +129 -22
  31. package/build/internal/src/middleware/recommendationSet.d.ts +408 -1007
  32. package/build/internal/src/middleware/types.d.ts +43 -25
  33. package/build/internal/src/util/dispatchCustomEvent.d.ts +3 -1
  34. package/build/internal/src/util/operatingSystem.d.ts +13 -0
  35. package/build/internal/src/util/sentry.d.ts +23 -0
  36. package/package.json +4 -4
  37. package/build/internal/src/client/SentryReporter.d.ts +0 -63
  38. package/build/internal/src/middleware/chatAnalytics.d.ts +0 -2601
  39. package/build/internal/src/middleware/helpers/endUser.d.ts +0 -11
  40. package/build/internal/src/middleware/qaPair.d.ts +0 -676
  41. package/build/internal/src/util/integrations.d.ts +0 -1
  42. package/src/commandbar-launcher.d.ts +0 -7
@@ -1,16 +1,15 @@
1
1
  import * as t from 'io-ts';
2
- export declare const operators: readonly ["is", "isNot", "isTrue", "isFalse", "isTruthy", "isFalsy", "startsWith", "endsWith", "includes", "doesNotInclude", "matchesRegex", "isGreaterThan", "isLessThan", "isBefore", "isAfter", "isDefined", "isNotDefined", "classnameOnPage", "idOnPage", "selectorOnPage", "classnameNotOnPage", "idNotOnPage", "selectorNotOnPage"];
2
+ export declare const listOperators: readonly ["includes", "doesNotInclude"];
3
+ export declare const operators: readonly ["isTrue", "isFalse", "isTruthy", "isFalsy", "startsWith", "endsWith", "matchesRegex", "isGreaterThan", "isLessThan", "isBefore", "isAfter", "isDefined", "isNotDefined", "classnameOnPage", "idOnPage", "selectorOnPage", "classnameNotOnPage", "idNotOnPage", "selectorNotOnPage", "includes", "doesNotInclude", "is", "isNot"];
3
4
  declare const OperatorV: t.KeyofC<{
4
5
  includes: null;
5
6
  endsWith: null;
6
7
  startsWith: null;
7
8
  is: null;
8
- isNot: null;
9
9
  isTrue: null;
10
10
  isFalse: null;
11
11
  isTruthy: null;
12
12
  isFalsy: null;
13
- doesNotInclude: null;
14
13
  matchesRegex: null;
15
14
  isGreaterThan: null;
16
15
  isLessThan: null;
@@ -24,20 +23,126 @@ declare const OperatorV: t.KeyofC<{
24
23
  classnameNotOnPage: null;
25
24
  idNotOnPage: null;
26
25
  selectorNotOnPage: null;
26
+ doesNotInclude: null;
27
+ isNot: null;
27
28
  }>;
28
- export declare const ConditionV: t.IntersectionC<[t.TypeC<{
29
- type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">]>;
29
+ export declare const NudgeInteractionConditionV: t.IntersectionC<[t.TypeC<{
30
+ type: t.LiteralC<"nudge_interaction">;
31
+ operator: t.KeyofC<{
32
+ is: null;
33
+ isNot: null;
34
+ }>;
35
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
36
+ nudge_id: t.NumberC;
37
+ }>, t.PartialC<{
38
+ reason: t.StringC;
39
+ }>]>;
40
+ export declare const QuestlistInteractionConditionV: t.IntersectionC<[t.TypeC<{
41
+ type: t.LiteralC<"questlist_interaction">;
42
+ operator: t.KeyofC<{
43
+ is: null;
44
+ isNot: null;
45
+ }>;
46
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
47
+ questlist_id: t.NumberC;
48
+ }>, t.PartialC<{
49
+ reason: t.StringC;
50
+ }>]>;
51
+ export declare const InteractionConditionV: t.UnionC<[t.IntersectionC<[t.TypeC<{
52
+ type: t.LiteralC<"nudge_interaction">;
53
+ operator: t.KeyofC<{
54
+ is: null;
55
+ isNot: null;
56
+ }>;
57
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
58
+ nudge_id: t.NumberC;
59
+ }>, t.PartialC<{
60
+ reason: t.StringC;
61
+ }>]>, t.IntersectionC<[t.TypeC<{
62
+ type: t.LiteralC<"questlist_interaction">;
63
+ operator: t.KeyofC<{
64
+ is: null;
65
+ isNot: null;
66
+ }>;
67
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
68
+ questlist_id: t.NumberC;
69
+ }>, t.PartialC<{
70
+ reason: t.StringC;
71
+ }>]>]>;
72
+ declare const MultiValueConditionV: t.IntersectionC<[t.TypeC<{
73
+ type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
74
+ operator: t.KeyofC<{
75
+ includes: null;
76
+ doesNotInclude: null;
77
+ }>;
78
+ values: t.ArrayC<t.StringC>;
79
+ }>, t.PartialC<{
80
+ reason: t.StringC;
81
+ }>]>;
82
+ export declare const SingleValueConditionV: t.UnionC<[t.IntersectionC<[t.TypeC<{
83
+ type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">]>;
30
84
  operator: t.KeyofC<{
31
85
  includes: null;
32
86
  endsWith: null;
33
87
  startsWith: null;
34
88
  is: null;
35
- isNot: null;
36
89
  isTrue: null;
37
90
  isFalse: null;
38
91
  isTruthy: null;
39
92
  isFalsy: null;
93
+ matchesRegex: null;
94
+ isGreaterThan: null;
95
+ isLessThan: null;
96
+ isBefore: null;
97
+ isAfter: null;
98
+ isDefined: null;
99
+ isNotDefined: null;
100
+ classnameOnPage: null;
101
+ idOnPage: null;
102
+ selectorOnPage: null;
103
+ classnameNotOnPage: null;
104
+ idNotOnPage: null;
105
+ selectorNotOnPage: null;
40
106
  doesNotInclude: null;
107
+ isNot: null;
108
+ }>;
109
+ }>, t.PartialC<{
110
+ field: t.StringC;
111
+ value: t.StringC;
112
+ reason: t.StringC;
113
+ rule_id: t.UnionC<[t.NumberC, t.StringC]>;
114
+ }>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
115
+ type: t.LiteralC<"nudge_interaction">;
116
+ operator: t.KeyofC<{
117
+ is: null;
118
+ isNot: null;
119
+ }>;
120
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
121
+ nudge_id: t.NumberC;
122
+ }>, t.PartialC<{
123
+ reason: t.StringC;
124
+ }>]>, t.IntersectionC<[t.TypeC<{
125
+ type: t.LiteralC<"questlist_interaction">;
126
+ operator: t.KeyofC<{
127
+ is: null;
128
+ isNot: null;
129
+ }>;
130
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
131
+ questlist_id: t.NumberC;
132
+ }>, t.PartialC<{
133
+ reason: t.StringC;
134
+ }>]>]>]>;
135
+ export declare const ConditionV: t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
136
+ type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">]>;
137
+ operator: t.KeyofC<{
138
+ includes: null;
139
+ endsWith: null;
140
+ startsWith: null;
141
+ is: null;
142
+ isTrue: null;
143
+ isFalse: null;
144
+ isTruthy: null;
145
+ isFalsy: null;
41
146
  matchesRegex: null;
42
147
  isGreaterThan: null;
43
148
  isLessThan: null;
@@ -51,13 +156,44 @@ export declare const ConditionV: t.IntersectionC<[t.TypeC<{
51
156
  classnameNotOnPage: null;
52
157
  idNotOnPage: null;
53
158
  selectorNotOnPage: null;
159
+ doesNotInclude: null;
160
+ isNot: null;
54
161
  }>;
55
162
  }>, t.PartialC<{
56
163
  field: t.StringC;
57
164
  value: t.StringC;
58
165
  reason: t.StringC;
59
166
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
60
- }>]>;
167
+ }>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
168
+ type: t.LiteralC<"nudge_interaction">;
169
+ operator: t.KeyofC<{
170
+ is: null;
171
+ isNot: null;
172
+ }>;
173
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
174
+ nudge_id: t.NumberC;
175
+ }>, t.PartialC<{
176
+ reason: t.StringC;
177
+ }>]>, t.IntersectionC<[t.TypeC<{
178
+ type: t.LiteralC<"questlist_interaction">;
179
+ operator: t.KeyofC<{
180
+ is: null;
181
+ isNot: null;
182
+ }>;
183
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
184
+ questlist_id: t.NumberC;
185
+ }>, t.PartialC<{
186
+ reason: t.StringC;
187
+ }>]>]>]>, t.IntersectionC<[t.TypeC<{
188
+ type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
189
+ operator: t.KeyofC<{
190
+ includes: null;
191
+ doesNotInclude: null;
192
+ }>;
193
+ values: t.ArrayC<t.StringC>;
194
+ }>, t.PartialC<{
195
+ reason: t.StringC;
196
+ }>]>]>;
61
197
  export declare const getConditions: (expr: RuleExpression) => ExpressionCondition[];
62
198
  export declare const canonicalize: (expr: RuleExpression) => RuleExpression;
63
199
  export declare function isCompoundExpression(expr: RuleExpression): expr is RuleExpressionAnd | RuleExpressionOr;
@@ -101,19 +237,17 @@ export declare const RecommendationRuleAlwaysV: t.IntersectionC<[t.TypeC<{
101
237
  reason: t.UnionC<[t.UndefinedC, t.NullC]>;
102
238
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
103
239
  }>]>;
104
- export declare const AvailabilityRuleV: t.IntersectionC<[t.TypeC<{
105
- type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">]>;
240
+ export declare const AvailabilityRuleV: t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
241
+ type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">]>;
106
242
  operator: t.KeyofC<{
107
243
  includes: null;
108
244
  endsWith: null;
109
245
  startsWith: null;
110
246
  is: null;
111
- isNot: null;
112
247
  isTrue: null;
113
248
  isFalse: null;
114
249
  isTruthy: null;
115
250
  isFalsy: null;
116
- doesNotInclude: null;
117
251
  matchesRegex: null;
118
252
  isGreaterThan: null;
119
253
  isLessThan: null;
@@ -127,13 +261,44 @@ export declare const AvailabilityRuleV: t.IntersectionC<[t.TypeC<{
127
261
  classnameNotOnPage: null;
128
262
  idNotOnPage: null;
129
263
  selectorNotOnPage: null;
264
+ doesNotInclude: null;
265
+ isNot: null;
130
266
  }>;
131
267
  }>, t.PartialC<{
132
268
  field: t.StringC;
133
269
  value: t.StringC;
134
270
  reason: t.StringC;
135
271
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
136
- }>]>;
272
+ }>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
273
+ type: t.LiteralC<"nudge_interaction">;
274
+ operator: t.KeyofC<{
275
+ is: null;
276
+ isNot: null;
277
+ }>;
278
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
279
+ nudge_id: t.NumberC;
280
+ }>, t.PartialC<{
281
+ reason: t.StringC;
282
+ }>]>, t.IntersectionC<[t.TypeC<{
283
+ type: t.LiteralC<"questlist_interaction">;
284
+ operator: t.KeyofC<{
285
+ is: null;
286
+ isNot: null;
287
+ }>;
288
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
289
+ questlist_id: t.NumberC;
290
+ }>, t.PartialC<{
291
+ reason: t.StringC;
292
+ }>]>]>]>, t.IntersectionC<[t.TypeC<{
293
+ type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
294
+ operator: t.KeyofC<{
295
+ includes: null;
296
+ doesNotInclude: null;
297
+ }>;
298
+ values: t.ArrayC<t.StringC>;
299
+ }>, t.PartialC<{
300
+ reason: t.StringC;
301
+ }>]>]>;
137
302
  export declare const RecommendationRuleV: t.UnionC<[t.IntersectionC<[t.TypeC<{
138
303
  type: t.LiteralC<"always">;
139
304
  }>, t.PartialC<{
@@ -142,19 +307,17 @@ export declare const RecommendationRuleV: t.UnionC<[t.IntersectionC<[t.TypeC<{
142
307
  value: t.UnionC<[t.UndefinedC, t.NullC]>;
143
308
  reason: t.UnionC<[t.UndefinedC, t.NullC]>;
144
309
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
145
- }>]>, t.IntersectionC<[t.TypeC<{
146
- type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">]>;
310
+ }>]>, t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
311
+ type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">]>;
147
312
  operator: t.KeyofC<{
148
313
  includes: null;
149
314
  endsWith: null;
150
315
  startsWith: null;
151
316
  is: null;
152
- isNot: null;
153
317
  isTrue: null;
154
318
  isFalse: null;
155
319
  isTruthy: null;
156
320
  isFalsy: null;
157
- doesNotInclude: null;
158
321
  matchesRegex: null;
159
322
  isGreaterThan: null;
160
323
  isLessThan: null;
@@ -168,26 +331,55 @@ export declare const RecommendationRuleV: t.UnionC<[t.IntersectionC<[t.TypeC<{
168
331
  classnameNotOnPage: null;
169
332
  idNotOnPage: null;
170
333
  selectorNotOnPage: null;
334
+ doesNotInclude: null;
335
+ isNot: null;
171
336
  }>;
172
337
  }>, t.PartialC<{
173
338
  field: t.StringC;
174
339
  value: t.StringC;
175
340
  reason: t.StringC;
176
341
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
177
- }>]>]>;
178
- export declare const EditorAvailabilityRuleV: t.UnionC<[t.IntersectionC<[t.TypeC<{
179
- type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">]>;
342
+ }>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
343
+ type: t.LiteralC<"nudge_interaction">;
344
+ operator: t.KeyofC<{
345
+ is: null;
346
+ isNot: null;
347
+ }>;
348
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
349
+ nudge_id: t.NumberC;
350
+ }>, t.PartialC<{
351
+ reason: t.StringC;
352
+ }>]>, t.IntersectionC<[t.TypeC<{
353
+ type: t.LiteralC<"questlist_interaction">;
354
+ operator: t.KeyofC<{
355
+ is: null;
356
+ isNot: null;
357
+ }>;
358
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
359
+ questlist_id: t.NumberC;
360
+ }>, t.PartialC<{
361
+ reason: t.StringC;
362
+ }>]>]>]>, t.IntersectionC<[t.TypeC<{
363
+ type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
364
+ operator: t.KeyofC<{
365
+ includes: null;
366
+ doesNotInclude: null;
367
+ }>;
368
+ values: t.ArrayC<t.StringC>;
369
+ }>, t.PartialC<{
370
+ reason: t.StringC;
371
+ }>]>]>]>;
372
+ export declare const EditorAvailabilityRuleV: t.UnionC<[t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
373
+ type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">]>;
180
374
  operator: t.KeyofC<{
181
375
  includes: null;
182
376
  endsWith: null;
183
377
  startsWith: null;
184
378
  is: null;
185
- isNot: null;
186
379
  isTrue: null;
187
380
  isFalse: null;
188
381
  isTruthy: null;
189
382
  isFalsy: null;
190
- doesNotInclude: null;
191
383
  matchesRegex: null;
192
384
  isGreaterThan: null;
193
385
  isLessThan: null;
@@ -201,13 +393,44 @@ export declare const EditorAvailabilityRuleV: t.UnionC<[t.IntersectionC<[t.TypeC
201
393
  classnameNotOnPage: null;
202
394
  idNotOnPage: null;
203
395
  selectorNotOnPage: null;
396
+ doesNotInclude: null;
397
+ isNot: null;
204
398
  }>;
205
399
  }>, t.PartialC<{
206
400
  field: t.StringC;
207
401
  value: t.StringC;
208
402
  reason: t.StringC;
209
403
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
404
+ }>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
405
+ type: t.LiteralC<"nudge_interaction">;
406
+ operator: t.KeyofC<{
407
+ is: null;
408
+ isNot: null;
409
+ }>;
410
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
411
+ nudge_id: t.NumberC;
412
+ }>, t.PartialC<{
413
+ reason: t.StringC;
210
414
  }>]>, t.IntersectionC<[t.TypeC<{
415
+ type: t.LiteralC<"questlist_interaction">;
416
+ operator: t.KeyofC<{
417
+ is: null;
418
+ isNot: null;
419
+ }>;
420
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
421
+ questlist_id: t.NumberC;
422
+ }>, t.PartialC<{
423
+ reason: t.StringC;
424
+ }>]>]>]>, t.IntersectionC<[t.TypeC<{
425
+ type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
426
+ operator: t.KeyofC<{
427
+ includes: null;
428
+ doesNotInclude: null;
429
+ }>;
430
+ values: t.ArrayC<t.StringC>;
431
+ }>, t.PartialC<{
432
+ reason: t.StringC;
433
+ }>]>]>, t.IntersectionC<[t.TypeC<{
211
434
  type: t.LiteralC<"named_rule">;
212
435
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
213
436
  }>, t.PartialC<{
@@ -221,19 +444,17 @@ export declare const EditorRecommendationRuleV: t.UnionC<[t.UnionC<[t.Intersecti
221
444
  value: t.UnionC<[t.UndefinedC, t.NullC]>;
222
445
  reason: t.UnionC<[t.UndefinedC, t.NullC]>;
223
446
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
224
- }>]>, t.IntersectionC<[t.TypeC<{
225
- type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">]>;
447
+ }>]>, t.UnionC<[t.UnionC<[t.IntersectionC<[t.TypeC<{
448
+ type: t.UnionC<[t.LiteralC<"context">, t.LiteralC<"url">, t.LiteralC<"hostname">, t.LiteralC<"element">, t.LiteralC<"executions">, t.LiteralC<"shortcuts">, t.LiteralC<"last_seen">, t.LiteralC<"first_seen">, t.LiteralC<"sessions">, t.LiteralC<"opens">, t.LiteralC<"deadends">, t.LiteralC<"heap">, t.LiteralC<"hubspot">, t.LiteralC<"device_type">]>;
226
449
  operator: t.KeyofC<{
227
450
  includes: null;
228
451
  endsWith: null;
229
452
  startsWith: null;
230
453
  is: null;
231
- isNot: null;
232
454
  isTrue: null;
233
455
  isFalse: null;
234
456
  isTruthy: null;
235
457
  isFalsy: null;
236
- doesNotInclude: null;
237
458
  matchesRegex: null;
238
459
  isGreaterThan: null;
239
460
  isLessThan: null;
@@ -247,13 +468,44 @@ export declare const EditorRecommendationRuleV: t.UnionC<[t.UnionC<[t.Intersecti
247
468
  classnameNotOnPage: null;
248
469
  idNotOnPage: null;
249
470
  selectorNotOnPage: null;
471
+ doesNotInclude: null;
472
+ isNot: null;
250
473
  }>;
251
474
  }>, t.PartialC<{
252
475
  field: t.StringC;
253
476
  value: t.StringC;
254
477
  reason: t.StringC;
255
478
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
256
- }>]>]>, t.IntersectionC<[t.TypeC<{
479
+ }>]>, t.UnionC<[t.IntersectionC<[t.TypeC<{
480
+ type: t.LiteralC<"nudge_interaction">;
481
+ operator: t.KeyofC<{
482
+ is: null;
483
+ isNot: null;
484
+ }>;
485
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
486
+ nudge_id: t.NumberC;
487
+ }>, t.PartialC<{
488
+ reason: t.StringC;
489
+ }>]>, t.IntersectionC<[t.TypeC<{
490
+ type: t.LiteralC<"questlist_interaction">;
491
+ operator: t.KeyofC<{
492
+ is: null;
493
+ isNot: null;
494
+ }>;
495
+ value: t.UnionC<[t.LiteralC<"viewed">, t.LiteralC<"completed">, t.LiteralC<"dismissed">]>;
496
+ questlist_id: t.NumberC;
497
+ }>, t.PartialC<{
498
+ reason: t.StringC;
499
+ }>]>]>]>, t.IntersectionC<[t.TypeC<{
500
+ type: t.UnionC<[t.LiteralC<"browser">, t.LiteralC<"os">, t.LiteralC<"language">]>;
501
+ operator: t.KeyofC<{
502
+ includes: null;
503
+ doesNotInclude: null;
504
+ }>;
505
+ values: t.ArrayC<t.StringC>;
506
+ }>, t.PartialC<{
507
+ reason: t.StringC;
508
+ }>]>]>]>, t.IntersectionC<[t.TypeC<{
257
509
  type: t.LiteralC<"named_rule">;
258
510
  rule_id: t.UnionC<[t.NumberC, t.StringC]>;
259
511
  }>, t.PartialC<{
@@ -280,10 +532,17 @@ export type IAvailabilityRule = t.TypeOf<typeof AvailabilityRuleV>;
280
532
  export type IEditorAvailabilityRule = t.TypeOf<typeof EditorAvailabilityRuleV>;
281
533
  export type IRecommendationRule = t.TypeOf<typeof RecommendationRuleV>;
282
534
  export type IEditorRecommendationRule = t.TypeOf<typeof EditorRecommendationRuleV>;
535
+ export type ISingleValueCondition = t.TypeOf<typeof SingleValueConditionV>;
536
+ export type IMultiValueCondition = t.TypeOf<typeof MultiValueConditionV>;
283
537
  export type ICondition = t.TypeOf<typeof ConditionV>;
538
+ export type IInteractionCondition = t.TypeOf<typeof InteractionConditionV>;
284
539
  export type IAvailabilityRuleType = IAvailabilityRule['type'];
285
540
  export type IRecommendationRuleType = IRecommendationRule['type'];
286
541
  export type IRule = IAvailabilityRule | IRecommendationRule;
287
542
  export type IEditorRule = IEditorAvailabilityRule | IEditorRecommendationRule;
288
543
  export type INamedRule = t.TypeOf<typeof NamedRuleV>;
544
+ export declare function isMultiValueRule(rule: IEditorRule | IRule): rule is IMultiValueCondition;
545
+ export declare function isMultiValueRuleType(type: IRule['type']): type is IMultiValueCondition['type'];
546
+ export declare function isInteractionCondition(condition: IEditorRule): condition is IInteractionCondition;
547
+ export declare function isInteractionConditionType(type: IEditorRule['type']): type is IInteractionCondition['type'];
289
548
  export {};
@@ -1,3 +1,18 @@
1
- export declare const baseURL: string;
2
- declare const axiosInstance: import("axios").AxiosInstance;
3
- export default axiosInstance;
1
+ export declare const setBaseURL: (url: string | undefined) => void;
2
+ export declare const getBaseURL: () => string;
3
+ export type FetchOptions = {
4
+ signal?: AbortSignal;
5
+ headers?: Record<string, string>;
6
+ credentials?: RequestCredentials;
7
+ };
8
+ export type Response<T> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: Record<string, string>;
13
+ };
14
+ export declare const put: <T = any>(url: string, data?: string | object | undefined, options?: FetchOptions) => Promise<Response<T>>;
15
+ export declare const post: <T = any>(url: string, data?: string | object | undefined, options?: FetchOptions) => Promise<Response<T>>;
16
+ export declare const get: <T = any>(url: string, options?: FetchOptions) => Promise<Response<T>>;
17
+ export declare const patch: <T = any>(url: string, data?: string | object | undefined, options?: FetchOptions) => Promise<Response<T>>;
18
+ export declare const del: <T = any>(url: string, data?: string | object | undefined, options?: FetchOptions) => Promise<Response<T>>;