commandbar 1.10.2 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. package/build/commandbar/src/shared/services/analytics/EventHandler.d.ts +9 -4
  2. package/build/commandbar/src/shared/services/analytics/event-queue.d.ts +13 -0
  3. package/build/commandbar/src/shared/services/analytics/types.d.ts +3 -3
  4. package/build/commandbar/src/shared/services/analytics/v2/client.d.ts +54 -0
  5. package/build/commandbar/src/shared/services/analytics/v2/helpers.d.ts +6 -0
  6. package/build/commandbar/src/shared/services/analytics/v2/schema.d.ts +152 -0
  7. package/build/commandbar/src/shared/services/analytics/v2/types.d.ts +4 -0
  8. package/build/commandbar-js/src/index.d.ts +2 -3
  9. package/build/commandbar-js/src/index.js +1 -1
  10. package/build/commandbar-js/src/snippet.d.ts +7 -1
  11. package/build/internal/src/client/CommandBarClientSDK.d.ts +13 -1
  12. package/build/internal/src/client/CommandBarProxySDK.d.ts +1 -4
  13. package/build/internal/src/client/CommandBarSDK.d.ts +7 -5
  14. package/build/internal/src/client/SDKConfig.d.ts +3 -1
  15. package/build/internal/src/client/globals.d.ts +1 -0
  16. package/build/internal/src/client/symbols.d.ts +3 -1
  17. package/build/internal/src/middleware/CommandFromClientV.d.ts +16 -2
  18. package/build/internal/src/middleware/OrganizationV.d.ts +44 -8
  19. package/build/internal/src/middleware/additionalResource.d.ts +9 -9
  20. package/build/internal/src/middleware/api.d.ts +181 -0
  21. package/build/internal/src/middleware/billing.d.ts +10 -0
  22. package/build/internal/src/middleware/chat.d.ts +3662 -172
  23. package/build/internal/src/middleware/checklist.d.ts +26 -10
  24. package/build/internal/src/middleware/command.d.ts +540 -140
  25. package/build/internal/src/middleware/endUser.d.ts +2 -0
  26. package/build/internal/src/middleware/experienceTemplate.d.ts +2882 -8
  27. package/build/internal/src/middleware/experiencesSearch.d.ts +233 -28
  28. package/build/internal/src/middleware/flags.d.ts +15 -1
  29. package/build/internal/src/middleware/generics.d.ts +1 -0
  30. package/build/internal/src/middleware/helpDocsIntegration.d.ts +98 -0
  31. package/build/internal/src/middleware/helpDocsSearch.d.ts +165 -20
  32. package/build/internal/src/middleware/helpDocsSync.d.ts +4 -0
  33. package/build/internal/src/middleware/helpHub.d.ts +1 -0
  34. package/build/internal/src/middleware/helpers/actions.d.ts +6 -6
  35. package/build/internal/src/middleware/helpers/commandTemplate.d.ts +2 -2
  36. package/build/internal/src/middleware/helpers/rules.d.ts +9 -7
  37. package/build/internal/src/middleware/localizedMessage.d.ts +50 -0
  38. package/build/internal/src/middleware/network.d.ts +1 -0
  39. package/build/internal/src/middleware/nudge.d.ts +104 -24
  40. package/build/internal/src/middleware/organization.d.ts +201 -62
  41. package/build/internal/src/middleware/organizationSettings.d.ts +12 -8
  42. package/build/internal/src/middleware/profile.d.ts +8 -0
  43. package/build/internal/src/middleware/recommendationSet.d.ts +18 -9
  44. package/build/internal/src/middleware/theme.d.ts +81 -0
  45. package/build/internal/src/middleware/types.d.ts +27 -6
  46. package/build/internal/src/middleware/user.d.ts +9 -1
  47. package/build/internal/src/middleware/workflow.d.ts +85 -0
  48. package/build/internal/src/util/sentry.d.ts +2 -2
  49. package/package.json +8 -3
  50. package/src/index.ts +2 -3
  51. package/src/init.ts +32 -14
  52. package/src/snippet.ts +84 -74
  53. package/build/internal/src/client/OrgConfig.d.ts +0 -5
  54. package/build/internal/src/middleware/guide.d.ts +0 -37
@@ -2,40 +2,2196 @@ import * as t from 'io-ts';
2
2
  export declare const ExperienceTemplateV: t.TypeC<{
3
3
  id: t.NumberC;
4
4
  type: t.UnionC<[t.LiteralC<"announcement">, t.LiteralC<"product_tour">, t.LiteralC<"survey">]>;
5
- data: t.RecordC<t.StringC, t.AnyC>;
5
+ data: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
6
+ slug: t.StringC;
7
+ id: t.UnionC<[t.NumberC, t.StringC]>;
8
+ organization: t.StringC;
9
+ show_expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
10
+ trigger: t.UnionC<[t.TypeC<{
11
+ type: t.LiteralC<"when_conditions_pass">;
12
+ }>, t.TypeC<{
13
+ type: t.LiteralC<"when_page_reached">;
14
+ meta: t.TypeC<{
15
+ url: t.StringC;
16
+ }>;
17
+ }>, t.TypeC<{
18
+ type: t.LiteralC<"on_command_execution">;
19
+ meta: t.TypeC<{
20
+ command: t.StringC;
21
+ }>;
22
+ }>, t.TypeC<{
23
+ type: t.LiteralC<"on_event">;
24
+ meta: t.TypeC<{
25
+ event: t.StringC;
26
+ condition_group: t.UnionC<[t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>, t.NullC, t.UndefinedC]>;
27
+ }>;
28
+ }>, t.TypeC<{
29
+ type: t.LiteralC<"when_element_appears">;
30
+ meta: t.TypeC<{
31
+ selector: t.StringC;
32
+ }>;
33
+ }>, t.TypeC<{
34
+ type: t.LiteralC<"on_user_confusion">;
35
+ }>, t.TypeC<{
36
+ type: t.LiteralC<"on_rage_click">;
37
+ }>, t.TypeC<{
38
+ type: t.LiteralC<"smart_delay">;
39
+ }>, t.TypeC<{
40
+ type: t.LiteralC<"after_time">;
41
+ meta: t.TypeC<{
42
+ unit: t.UnionC<[t.LiteralC<"minute">, t.LiteralC<"second">]>;
43
+ value: t.NumberC;
44
+ }>;
45
+ }>, t.TypeC<{
46
+ type: t.LiteralC<"when_share_link_viewed">;
47
+ }>, t.TypeC<{
48
+ type: t.LiteralC<"scheduled">;
49
+ meta: t.TypeC<{
50
+ interval: t.UnionC<[t.LiteralC<"day">, t.LiteralC<"week">, t.LiteralC<"month">]>;
51
+ value: t.NumberC;
52
+ }>;
53
+ }>]>;
54
+ frequency_limit: t.UnionC<[t.LiteralC<"no_limit">, t.LiteralC<"once_per_session">, t.LiteralC<"once_per_user">, t.LiteralC<"until_interaction">]>;
55
+ steps: t.ArrayC<t.IntersectionC<[t.TypeC<{
56
+ id: t.NumberC;
57
+ title: t.StringC;
58
+ content: t.ArrayC<t.UnionC<[t.TypeC<{
59
+ type: t.LiteralC<"markdown">;
60
+ sort_key: t.UnionC<[t.NumberC, t.UndefinedC]>;
61
+ meta: t.TypeC<{
62
+ value: t.StringC;
63
+ }>;
64
+ }>, t.TypeC<{
65
+ type: t.LiteralC<"image">;
66
+ sort_key: t.UnionC<[t.NumberC, t.UndefinedC]>;
67
+ meta: t.TypeC<{
68
+ src: t.StringC;
69
+ file_name: t.StringC;
70
+ size: t.StringC;
71
+ }>;
72
+ }>, t.TypeC<{
73
+ type: t.LiteralC<"video">;
74
+ sort_key: t.UnionC<[t.NumberC, t.UndefinedC]>;
75
+ meta: t.UnionC<[t.TypeC<{
76
+ type: t.LiteralC<"url">;
77
+ src: t.StringC;
78
+ }>, t.TypeC<{
79
+ type: t.LiteralC<"command">;
80
+ command: t.StringC;
81
+ }>]>;
82
+ }>, t.TypeC<{
83
+ type: t.LiteralC<"help_doc_command">;
84
+ sort_key: t.UnionC<[t.NumberC, t.UndefinedC]>;
85
+ meta: t.TypeC<{
86
+ command: t.StringC;
87
+ }>;
88
+ }>, t.TypeC<{
89
+ type: t.LiteralC<"button">;
90
+ sort_key: t.UnionC<[t.NumberC, t.UndefinedC]>;
91
+ meta: t.UnionC<[t.PartialC<{
92
+ label: t.StringC;
93
+ action: t.UnionC<[t.TypeC<{
94
+ type: t.LiteralC<"execute_command">;
95
+ meta: t.IntersectionC<[t.TypeC<{
96
+ command: t.StringC;
97
+ }>, t.PartialC<{
98
+ type: t.UnionC<[t.LiteralC<"action">, t.LiteralC<"link">, t.LiteralC<"helpdoc">, t.LiteralC<"video">]>;
99
+ }>]>;
100
+ }>, t.TypeC<{
101
+ type: t.LiteralC<"no_action">;
102
+ }>, t.TypeC<{
103
+ type: t.LiteralC<"click">;
104
+ value: t.StringC;
105
+ }>, t.TypeC<{
106
+ type: t.UnionC<[t.LiteralC<"click">, t.LiteralC<"clickBySelector">, t.LiteralC<"clickByXpath">]>;
107
+ value: t.ArrayC<t.StringC>;
108
+ }>, t.IntersectionC<[t.TypeC<{
109
+ type: t.LiteralC<"link">;
110
+ value: t.StringC;
111
+ }>, t.PartialC<{
112
+ operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
113
+ }>]>, t.TypeC<{
114
+ type: t.LiteralC<"open_chat">;
115
+ meta: t.TypeC<{
116
+ type: t.UnionC<[t.LiteralC<"intercom">, t.LiteralC<"helpscout">, t.LiteralC<"freshdesk">, t.LiteralC<"freshchat">, t.LiteralC<"crisp">, t.LiteralC<"zendesk">, t.LiteralC<"liveChat">, t.LiteralC<"gist">, t.LiteralC<"olark">, t.LiteralC<"hubspot">, t.LiteralC<"drift">, t.LiteralC<"zendesk_handoff">, t.LiteralC<"">]>;
117
+ }>;
118
+ }>, t.TypeC<{
119
+ type: t.LiteralC<"dismiss">;
120
+ }>, t.TypeC<{
121
+ type: t.LiteralC<"snooze">;
122
+ }>, t.TypeC<{
123
+ type: t.LiteralC<"questlist">;
124
+ value: t.NumberC;
125
+ }>, t.TypeC<{
126
+ type: t.LiteralC<"step_back">;
127
+ }>, t.TypeC<{
128
+ type: t.LiteralC<"nudge">;
129
+ value: t.NumberC;
130
+ }>, t.TypeC<{
131
+ type: t.LiteralC<"go_to_step">;
132
+ value: t.NumberC;
133
+ }>, t.IntersectionC<[t.TypeC<{
134
+ type: t.LiteralC<"open_bar">;
135
+ }>, t.PartialC<{
136
+ value: t.StringC;
137
+ categoryFilter: t.NumberC;
138
+ }>]>, t.TypeC<{
139
+ type: t.LiteralC<"open_helphub">;
140
+ }>, t.TypeC<{
141
+ type: t.LiteralC<"open_copilot">;
142
+ }>]>;
143
+ button_type: t.UnionC<[t.LiteralC<"primary">, t.LiteralC<"secondary">, t.LiteralC<"snooze">]>;
144
+ conditional_actions: t.ArrayC<t.TypeC<{
145
+ operator: t.UnionC<[t.LiteralC<"eq">, t.LiteralC<"neq">, t.LiteralC<"gt">, t.LiteralC<"lt">]>;
146
+ operand: t.UnionC<[t.StringC, t.NumberC]>;
147
+ action: t.UnionC<[t.TypeC<{
148
+ type: t.LiteralC<"execute_command">;
149
+ meta: t.IntersectionC<[t.TypeC<{
150
+ command: t.StringC;
151
+ }>, t.PartialC<{
152
+ type: t.UnionC<[t.LiteralC<"action">, t.LiteralC<"link">, t.LiteralC<"helpdoc">, t.LiteralC<"video">]>;
153
+ }>]>;
154
+ }>, t.TypeC<{
155
+ type: t.LiteralC<"no_action">;
156
+ }>, t.TypeC<{
157
+ type: t.LiteralC<"click">;
158
+ value: t.StringC;
159
+ }>, t.TypeC<{
160
+ type: t.UnionC<[t.LiteralC<"click">, t.LiteralC<"clickBySelector">, t.LiteralC<"clickByXpath">]>;
161
+ value: t.ArrayC<t.StringC>;
162
+ }>, t.IntersectionC<[t.TypeC<{
163
+ type: t.LiteralC<"link">;
164
+ value: t.StringC;
165
+ }>, t.PartialC<{
166
+ operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
167
+ }>]>, t.TypeC<{
168
+ type: t.LiteralC<"open_chat">;
169
+ meta: t.TypeC<{
170
+ type: t.UnionC<[t.LiteralC<"intercom">, t.LiteralC<"helpscout">, t.LiteralC<"freshdesk">, t.LiteralC<"freshchat">, t.LiteralC<"crisp">, t.LiteralC<"zendesk">, t.LiteralC<"liveChat">, t.LiteralC<"gist">, t.LiteralC<"olark">, t.LiteralC<"hubspot">, t.LiteralC<"drift">, t.LiteralC<"zendesk_handoff">, t.LiteralC<"">]>;
171
+ }>;
172
+ }>, t.TypeC<{
173
+ type: t.LiteralC<"dismiss">;
174
+ }>, t.TypeC<{
175
+ type: t.LiteralC<"snooze">;
176
+ }>, t.TypeC<{
177
+ type: t.LiteralC<"questlist">;
178
+ value: t.NumberC;
179
+ }>, t.TypeC<{
180
+ type: t.LiteralC<"step_back">;
181
+ }>, t.TypeC<{
182
+ type: t.LiteralC<"nudge">;
183
+ value: t.NumberC;
184
+ }>, t.TypeC<{
185
+ type: t.LiteralC<"go_to_step">;
186
+ value: t.NumberC;
187
+ }>, t.IntersectionC<[t.TypeC<{
188
+ type: t.LiteralC<"open_bar">;
189
+ }>, t.PartialC<{
190
+ value: t.StringC;
191
+ categoryFilter: t.NumberC;
192
+ }>]>, t.TypeC<{
193
+ type: t.LiteralC<"open_helphub">;
194
+ }>, t.TypeC<{
195
+ type: t.LiteralC<"open_copilot">;
196
+ }>]>;
197
+ }>>;
198
+ }>, t.NullC]>;
199
+ }>, t.TypeC<{
200
+ type: t.LiteralC<"survey_text">;
201
+ meta: t.IntersectionC<[t.TypeC<{
202
+ prompt: t.StringC;
203
+ }>, t.PartialC<{
204
+ validation: t.PartialC<{
205
+ required: t.UnionC<[t.TypeC<{
206
+ value: t.LiteralC<true>;
207
+ message: t.StringC;
208
+ }>, t.TypeC<{
209
+ value: t.LiteralC<false>;
210
+ message: t.NullC;
211
+ }>]>;
212
+ }>;
213
+ }>]>;
214
+ sort_key: t.UnionC<[t.NumberC, t.UndefinedC]>;
215
+ }>, t.TypeC<{
216
+ type: t.LiteralC<"survey_text_short">;
217
+ meta: t.IntersectionC<[t.TypeC<{
218
+ prompt: t.StringC;
219
+ }>, t.PartialC<{
220
+ validation: t.PartialC<{
221
+ required: t.UnionC<[t.TypeC<{
222
+ value: t.LiteralC<true>;
223
+ message: t.StringC;
224
+ }>, t.TypeC<{
225
+ value: t.LiteralC<false>;
226
+ message: t.NullC;
227
+ }>]>;
228
+ }>;
229
+ }>]>;
230
+ sort_key: t.UnionC<[t.NumberC, t.UndefinedC]>;
231
+ }>, t.TypeC<{
232
+ type: t.LiteralC<"survey_rating">;
233
+ sort_key: t.UnionC<[t.NumberC, t.UndefinedC]>;
234
+ meta: t.IntersectionC<[t.UnionC<[t.TypeC<{
235
+ type: t.LiteralC<"emojis">;
236
+ lower_label: t.StringC;
237
+ upper_label: t.StringC;
238
+ options: t.NumberC;
239
+ emojis: t.ArrayC<t.StringC>;
240
+ }>, t.TypeC<{
241
+ type: t.LiteralC<"numbers">;
242
+ lower_label: t.StringC;
243
+ upper_label: t.StringC;
244
+ options: t.NumberC;
245
+ }>, t.TypeC<{
246
+ type: t.LiteralC<"stars">;
247
+ lower_label: t.StringC;
248
+ upper_label: t.StringC;
249
+ options: t.NumberC;
250
+ }>, t.TypeC<{
251
+ type: t.LiteralC<"nps">;
252
+ lower_label: t.StringC;
253
+ upper_label: t.StringC;
254
+ options: t.NumberC;
255
+ }>]>, t.PartialC<{
256
+ validation: t.PartialC<{
257
+ required: t.UnionC<[t.TypeC<{
258
+ value: t.LiteralC<true>;
259
+ message: t.StringC;
260
+ }>, t.TypeC<{
261
+ value: t.LiteralC<false>;
262
+ message: t.NullC;
263
+ }>]>;
264
+ }>;
265
+ }>]>;
266
+ }>, t.TypeC<{
267
+ type: t.LiteralC<"survey_list">;
268
+ sort_key: t.UnionC<[t.NumberC, t.UndefinedC]>;
269
+ meta: t.IntersectionC<[t.TypeC<{
270
+ options: t.ArrayC<t.StringC>;
271
+ list_type: t.UnionC<[t.LiteralC<"single">, t.LiteralC<"multiple">]>;
272
+ display_type: t.UnionC<[t.LiteralC<"dropdown">, t.LiteralC<"list">, t.LiteralC<"grid">]>;
273
+ }>, t.PartialC<{
274
+ validation: t.PartialC<{
275
+ required: t.UnionC<[t.TypeC<{
276
+ value: t.LiteralC<true>;
277
+ message: t.StringC;
278
+ }>, t.TypeC<{
279
+ value: t.LiteralC<false>;
280
+ message: t.NullC;
281
+ }>]>;
282
+ }>;
283
+ }>]>;
284
+ }>]>>;
285
+ is_live: t.BooleanC;
286
+ preview_url: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
287
+ }>, t.IntersectionC<[t.TypeC<{
288
+ form_factor: t.UnionC<[t.TypeC<{
289
+ type: t.LiteralC<"modal">;
290
+ }>, t.TypeC<{
291
+ type: t.LiteralC<"popover">;
292
+ position: t.UnionC<[t.LiteralC<"top-left">, t.LiteralC<"top-right">, t.LiteralC<"bottom-right">, t.LiteralC<"bottom-left">, t.LiteralC<"center">]>;
293
+ }>, t.IntersectionC<[t.TypeC<{
294
+ type: t.LiteralC<"pin">;
295
+ anchor: t.StringC;
296
+ }>, t.PartialC<{
297
+ is_open_by_default: t.BooleanC;
298
+ is_showing_mask: t.BooleanC;
299
+ advance_trigger: t.StringC;
300
+ offset: t.TypeC<{
301
+ x: t.StringC;
302
+ y: t.StringC;
303
+ }>;
304
+ }>]>, t.TypeC<{
305
+ type: t.LiteralC<"tooltip">;
306
+ anchor: t.StringC;
307
+ show_on: t.UnionC<[t.LiteralC<"hover">, t.LiteralC<"click">]>;
308
+ marker: t.IntersectionC<[t.UnionC<[t.TypeC<{
309
+ type: t.LiteralC<"beacon">;
310
+ }>, t.TypeC<{
311
+ type: t.LiteralC<"icon">;
312
+ icon: t.UnionC<[t.LiteralC<"helpCircle">, t.LiteralC<"helpSquare">, t.LiteralC<"infoCircle">, t.LiteralC<"bookClosed">, t.LiteralC<"lightBulb">, t.LiteralC<"lightning">]>;
313
+ }>, t.TypeC<{
314
+ type: t.LiteralC<"image">;
315
+ source: t.StringC;
316
+ }>]>, t.TypeC<{
317
+ positioning: t.TypeC<{
318
+ position: t.UnionC<[t.LiteralC<"left">, t.LiteralC<"right">, t.LiteralC<"inline_left">, t.LiteralC<"inline_right">]>;
319
+ offset: t.TypeC<{
320
+ x: t.StringC;
321
+ y: t.StringC;
322
+ }>;
323
+ }>;
324
+ }>]>;
325
+ }>]>;
326
+ }>, t.PartialC<{
327
+ has_survey_response: t.BooleanC;
328
+ }>]>]>>;
329
+ is_live: t.BooleanC;
330
+ }>, t.PartialC<{
331
+ old_nudge_id: t.UnionC<[t.NumberC, t.NullC]>;
332
+ archived: t.BooleanC;
333
+ audience: t.UnionC<[t.UnionC<[t.TypeC<{
334
+ type: t.LiteralC<"all_users">;
335
+ }>, t.TypeC<{
336
+ type: t.LiteralC<"rule_expression">;
337
+ expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
338
+ }>, t.TypeC<{
339
+ type: t.LiteralC<"named_rule_reference">;
340
+ rule_reference: t.IntersectionC<[t.TypeC<{
341
+ type: t.LiteralC<"named_rule">;
342
+ rule_id: t.UnionC<[t.NumberC, t.StringC]>;
343
+ }>, t.PartialC<{
344
+ reason: t.StringC;
345
+ }>]>;
346
+ }>]>, t.NullC]>;
347
+ }>]>, t.TypeC<{
348
+ template_source: t.StringC;
349
+ show_step_counter: t.BooleanC;
350
+ dismissible: t.BooleanC;
351
+ snoozable: t.BooleanC;
352
+ share_page_url_or_path: t.StringC;
353
+ copilot_suggest: t.BooleanC;
354
+ show_in_spotlight_search: t.BooleanC;
355
+ show_in_helphub_search: t.BooleanC;
356
+ copilot_cta_label: t.StringC;
357
+ copilot_description: t.StringC;
358
+ is_scheduled: t.BooleanC;
359
+ scheduled_start_time: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
360
+ scheduled_end_time: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
361
+ snooze_label: t.StringC;
362
+ type: t.UnionC<[t.LiteralC<"announcement">, t.LiteralC<"product_tour">, t.LiteralC<"survey">, t.NullC]>;
363
+ editor_tags: t.ArrayC<t.StringC>;
364
+ preview_url: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
365
+ custom_theme: t.UnionC<[t.StringC, t.NullC, t.UndefinedC]>;
366
+ }>]>;
6
367
  }>;
7
368
  export declare class ExperienceTemplate {
8
369
  static decode: (data: any) => {
9
370
  id: number;
10
371
  type: "announcement" | "product_tour" | "survey";
11
372
  data: {
12
- [x: string]: any;
373
+ slug: string;
374
+ id: string | number;
375
+ organization: string;
376
+ show_expression: import("./helpers/rules").RuleExpression;
377
+ trigger: {
378
+ type: "when_conditions_pass";
379
+ } | {
380
+ type: "when_page_reached";
381
+ meta: {
382
+ url: string;
383
+ };
384
+ } | {
385
+ type: "on_command_execution";
386
+ meta: {
387
+ command: string;
388
+ };
389
+ } | {
390
+ type: "on_event";
391
+ meta: {
392
+ event: string;
393
+ condition_group: import("./helpers/rules").RuleExpression | null | undefined;
394
+ };
395
+ } | {
396
+ type: "when_element_appears";
397
+ meta: {
398
+ selector: string;
399
+ };
400
+ } | {
401
+ type: "on_user_confusion";
402
+ } | {
403
+ type: "on_rage_click";
404
+ } | {
405
+ type: "smart_delay";
406
+ } | {
407
+ type: "after_time";
408
+ meta: {
409
+ unit: "minute" | "second";
410
+ value: number;
411
+ };
412
+ } | {
413
+ type: "when_share_link_viewed";
414
+ } | {
415
+ type: "scheduled";
416
+ meta: {
417
+ interval: "day" | "month" | "week";
418
+ value: number;
419
+ };
420
+ };
421
+ frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
422
+ steps: ({
423
+ id: number;
424
+ title: string;
425
+ content: ({
426
+ type: "markdown";
427
+ sort_key: number | undefined;
428
+ meta: {
429
+ value: string;
430
+ };
431
+ } | {
432
+ type: "image";
433
+ sort_key: number | undefined;
434
+ meta: {
435
+ src: string;
436
+ file_name: string;
437
+ size: string;
438
+ };
439
+ } | {
440
+ type: "video";
441
+ sort_key: number | undefined;
442
+ meta: {
443
+ type: "url";
444
+ src: string;
445
+ } | {
446
+ type: "command";
447
+ command: string;
448
+ };
449
+ } | {
450
+ type: "help_doc_command";
451
+ sort_key: number | undefined;
452
+ meta: {
453
+ command: string;
454
+ };
455
+ } | {
456
+ type: "button";
457
+ sort_key: number | undefined;
458
+ meta: {
459
+ label?: string | undefined;
460
+ action?: {
461
+ type: "execute_command";
462
+ meta: {
463
+ command: string;
464
+ } & {
465
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
466
+ };
467
+ } | {
468
+ type: "no_action";
469
+ } | {
470
+ type: "click";
471
+ value: string;
472
+ } | {
473
+ type: "click" | "clickBySelector" | "clickByXpath";
474
+ value: string[];
475
+ } | ({
476
+ type: "link";
477
+ value: string;
478
+ } & {
479
+ operation?: "self" | "router" | "blank" | undefined;
480
+ }) | {
481
+ type: "open_chat";
482
+ meta: {
483
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
484
+ };
485
+ } | {
486
+ type: "dismiss";
487
+ } | {
488
+ type: "snooze";
489
+ } | {
490
+ type: "questlist";
491
+ value: number;
492
+ } | {
493
+ type: "step_back";
494
+ } | {
495
+ type: "nudge";
496
+ value: number;
497
+ } | {
498
+ type: "go_to_step";
499
+ value: number;
500
+ } | ({
501
+ type: "open_bar";
502
+ } & {
503
+ value?: string | undefined;
504
+ categoryFilter?: number | undefined;
505
+ }) | {
506
+ type: "open_helphub";
507
+ } | {
508
+ type: "open_copilot";
509
+ } | undefined;
510
+ button_type?: "snooze" | "primary" | "secondary" | undefined;
511
+ conditional_actions?: {
512
+ operator: "eq" | "neq" | "gt" | "lt";
513
+ operand: string | number;
514
+ action: {
515
+ type: "execute_command";
516
+ meta: {
517
+ command: string;
518
+ } & {
519
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
520
+ };
521
+ } | {
522
+ type: "no_action";
523
+ } | {
524
+ type: "click";
525
+ value: string;
526
+ } | {
527
+ type: "click" | "clickBySelector" | "clickByXpath";
528
+ value: string[];
529
+ } | ({
530
+ type: "link";
531
+ value: string;
532
+ } & {
533
+ operation?: "self" | "router" | "blank" | undefined;
534
+ }) | {
535
+ type: "open_chat";
536
+ meta: {
537
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
538
+ };
539
+ } | {
540
+ type: "dismiss";
541
+ } | {
542
+ type: "snooze";
543
+ } | {
544
+ type: "questlist";
545
+ value: number;
546
+ } | {
547
+ type: "step_back";
548
+ } | {
549
+ type: "nudge";
550
+ value: number;
551
+ } | {
552
+ type: "go_to_step";
553
+ value: number;
554
+ } | ({
555
+ type: "open_bar";
556
+ } & {
557
+ value?: string | undefined;
558
+ categoryFilter?: number | undefined;
559
+ }) | {
560
+ type: "open_helphub";
561
+ } | {
562
+ type: "open_copilot";
563
+ };
564
+ }[] | undefined;
565
+ } | null;
566
+ } | {
567
+ type: "survey_text";
568
+ meta: {
569
+ prompt: string;
570
+ } & {
571
+ validation?: {
572
+ required?: {
573
+ value: true;
574
+ message: string;
575
+ } | {
576
+ value: false;
577
+ message: null;
578
+ } | undefined;
579
+ } | undefined;
580
+ };
581
+ sort_key: number | undefined;
582
+ } | {
583
+ type: "survey_text_short";
584
+ meta: {
585
+ prompt: string;
586
+ } & {
587
+ validation?: {
588
+ required?: {
589
+ value: true;
590
+ message: string;
591
+ } | {
592
+ value: false;
593
+ message: null;
594
+ } | undefined;
595
+ } | undefined;
596
+ };
597
+ sort_key: number | undefined;
598
+ } | {
599
+ type: "survey_rating";
600
+ sort_key: number | undefined;
601
+ meta: ({
602
+ type: "emojis";
603
+ lower_label: string;
604
+ upper_label: string;
605
+ options: number;
606
+ emojis: string[];
607
+ } | {
608
+ type: "numbers";
609
+ lower_label: string;
610
+ upper_label: string;
611
+ options: number;
612
+ } | {
613
+ type: "stars";
614
+ lower_label: string;
615
+ upper_label: string;
616
+ options: number;
617
+ } | {
618
+ type: "nps";
619
+ lower_label: string;
620
+ upper_label: string;
621
+ options: number;
622
+ }) & {
623
+ validation?: {
624
+ required?: {
625
+ value: true;
626
+ message: string;
627
+ } | {
628
+ value: false;
629
+ message: null;
630
+ } | undefined;
631
+ } | undefined;
632
+ };
633
+ } | {
634
+ type: "survey_list";
635
+ sort_key: number | undefined;
636
+ meta: {
637
+ options: string[];
638
+ list_type: "multiple" | "single";
639
+ display_type: "grid" | "list" | "dropdown";
640
+ } & {
641
+ validation?: {
642
+ required?: {
643
+ value: true;
644
+ message: string;
645
+ } | {
646
+ value: false;
647
+ message: null;
648
+ } | undefined;
649
+ } | undefined;
650
+ };
651
+ })[];
652
+ is_live: boolean;
653
+ preview_url: string | null | undefined;
654
+ } & {
655
+ form_factor: {
656
+ type: "modal";
657
+ } | {
658
+ type: "popover";
659
+ position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
660
+ } | ({
661
+ type: "pin";
662
+ anchor: string;
663
+ } & {
664
+ is_open_by_default?: boolean | undefined;
665
+ is_showing_mask?: boolean | undefined;
666
+ advance_trigger?: string | undefined;
667
+ offset?: {
668
+ x: string;
669
+ y: string;
670
+ } | undefined;
671
+ }) | {
672
+ type: "tooltip";
673
+ anchor: string;
674
+ show_on: "click" | "hover";
675
+ marker: ({
676
+ type: "beacon";
677
+ } | {
678
+ type: "icon";
679
+ icon: "helpCircle" | "helpSquare" | "infoCircle" | "bookClosed" | "lightBulb" | "lightning";
680
+ } | {
681
+ type: "image";
682
+ source: string;
683
+ }) & {
684
+ positioning: {
685
+ position: "left" | "right" | "inline_left" | "inline_right";
686
+ offset: {
687
+ x: string;
688
+ y: string;
689
+ };
690
+ };
691
+ };
692
+ };
693
+ } & {
694
+ has_survey_response?: boolean | undefined;
695
+ })[];
696
+ is_live: boolean;
697
+ } & {
698
+ old_nudge_id?: number | null | undefined;
699
+ archived?: boolean | undefined;
700
+ audience?: {
701
+ type: "all_users";
702
+ } | {
703
+ type: "rule_expression";
704
+ expression: import("./helpers/rules").RuleExpression;
705
+ } | {
706
+ type: "named_rule_reference";
707
+ rule_reference: {
708
+ type: "named_rule";
709
+ rule_id: string | number;
710
+ } & {
711
+ reason?: string | undefined;
712
+ };
713
+ } | null | undefined;
714
+ } & {
715
+ template_source: string;
716
+ show_step_counter: boolean;
717
+ dismissible: boolean;
718
+ snoozable: boolean;
719
+ share_page_url_or_path: string;
720
+ copilot_suggest: boolean;
721
+ show_in_spotlight_search: boolean;
722
+ show_in_helphub_search: boolean;
723
+ copilot_cta_label: string;
724
+ copilot_description: string;
725
+ is_scheduled: boolean;
726
+ scheduled_start_time: string | null | undefined;
727
+ scheduled_end_time: string | null | undefined;
728
+ snooze_label: string;
729
+ type: "announcement" | "product_tour" | "survey" | null;
730
+ editor_tags: string[];
731
+ preview_url: string | null | undefined;
732
+ custom_theme: string | null | undefined;
13
733
  };
14
734
  };
15
735
  static create: (object: {
16
736
  id: number;
17
737
  type: "announcement" | "product_tour" | "survey";
18
738
  data: {
19
- [x: string]: any;
739
+ slug: string;
740
+ id: string | number;
741
+ organization: string;
742
+ show_expression: import("./helpers/rules").RuleExpression;
743
+ trigger: {
744
+ type: "when_conditions_pass";
745
+ } | {
746
+ type: "when_page_reached";
747
+ meta: {
748
+ url: string;
749
+ };
750
+ } | {
751
+ type: "on_command_execution";
752
+ meta: {
753
+ command: string;
754
+ };
755
+ } | {
756
+ type: "on_event";
757
+ meta: {
758
+ event: string;
759
+ condition_group: import("./helpers/rules").RuleExpression | null | undefined;
760
+ };
761
+ } | {
762
+ type: "when_element_appears";
763
+ meta: {
764
+ selector: string;
765
+ };
766
+ } | {
767
+ type: "on_user_confusion";
768
+ } | {
769
+ type: "on_rage_click";
770
+ } | {
771
+ type: "smart_delay";
772
+ } | {
773
+ type: "after_time";
774
+ meta: {
775
+ unit: "minute" | "second";
776
+ value: number;
777
+ };
778
+ } | {
779
+ type: "when_share_link_viewed";
780
+ } | {
781
+ type: "scheduled";
782
+ meta: {
783
+ interval: "day" | "month" | "week";
784
+ value: number;
785
+ };
786
+ };
787
+ frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
788
+ steps: ({
789
+ id: number;
790
+ title: string;
791
+ content: ({
792
+ type: "markdown";
793
+ sort_key: number | undefined;
794
+ meta: {
795
+ value: string;
796
+ };
797
+ } | {
798
+ type: "image";
799
+ sort_key: number | undefined;
800
+ meta: {
801
+ src: string;
802
+ file_name: string;
803
+ size: string;
804
+ };
805
+ } | {
806
+ type: "video";
807
+ sort_key: number | undefined;
808
+ meta: {
809
+ type: "url";
810
+ src: string;
811
+ } | {
812
+ type: "command";
813
+ command: string;
814
+ };
815
+ } | {
816
+ type: "help_doc_command";
817
+ sort_key: number | undefined;
818
+ meta: {
819
+ command: string;
820
+ };
821
+ } | {
822
+ type: "button";
823
+ sort_key: number | undefined;
824
+ meta: {
825
+ label?: string | undefined;
826
+ action?: {
827
+ type: "execute_command";
828
+ meta: {
829
+ command: string;
830
+ } & {
831
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
832
+ };
833
+ } | {
834
+ type: "no_action";
835
+ } | {
836
+ type: "click";
837
+ value: string;
838
+ } | {
839
+ type: "click" | "clickBySelector" | "clickByXpath";
840
+ value: string[];
841
+ } | ({
842
+ type: "link";
843
+ value: string;
844
+ } & {
845
+ operation?: "self" | "router" | "blank" | undefined;
846
+ }) | {
847
+ type: "open_chat";
848
+ meta: {
849
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
850
+ };
851
+ } | {
852
+ type: "dismiss";
853
+ } | {
854
+ type: "snooze";
855
+ } | {
856
+ type: "questlist";
857
+ value: number;
858
+ } | {
859
+ type: "step_back";
860
+ } | {
861
+ type: "nudge";
862
+ value: number;
863
+ } | {
864
+ type: "go_to_step";
865
+ value: number;
866
+ } | ({
867
+ type: "open_bar";
868
+ } & {
869
+ value?: string | undefined;
870
+ categoryFilter?: number | undefined;
871
+ }) | {
872
+ type: "open_helphub";
873
+ } | {
874
+ type: "open_copilot";
875
+ } | undefined;
876
+ button_type?: "snooze" | "primary" | "secondary" | undefined;
877
+ conditional_actions?: {
878
+ operator: "eq" | "neq" | "gt" | "lt";
879
+ operand: string | number;
880
+ action: {
881
+ type: "execute_command";
882
+ meta: {
883
+ command: string;
884
+ } & {
885
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
886
+ };
887
+ } | {
888
+ type: "no_action";
889
+ } | {
890
+ type: "click";
891
+ value: string;
892
+ } | {
893
+ type: "click" | "clickBySelector" | "clickByXpath";
894
+ value: string[];
895
+ } | ({
896
+ type: "link";
897
+ value: string;
898
+ } & {
899
+ operation?: "self" | "router" | "blank" | undefined;
900
+ }) | {
901
+ type: "open_chat";
902
+ meta: {
903
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
904
+ };
905
+ } | {
906
+ type: "dismiss";
907
+ } | {
908
+ type: "snooze";
909
+ } | {
910
+ type: "questlist";
911
+ value: number;
912
+ } | {
913
+ type: "step_back";
914
+ } | {
915
+ type: "nudge";
916
+ value: number;
917
+ } | {
918
+ type: "go_to_step";
919
+ value: number;
920
+ } | ({
921
+ type: "open_bar";
922
+ } & {
923
+ value?: string | undefined;
924
+ categoryFilter?: number | undefined;
925
+ }) | {
926
+ type: "open_helphub";
927
+ } | {
928
+ type: "open_copilot";
929
+ };
930
+ }[] | undefined;
931
+ } | null;
932
+ } | {
933
+ type: "survey_text";
934
+ meta: {
935
+ prompt: string;
936
+ } & {
937
+ validation?: {
938
+ required?: {
939
+ value: true;
940
+ message: string;
941
+ } | {
942
+ value: false;
943
+ message: null;
944
+ } | undefined;
945
+ } | undefined;
946
+ };
947
+ sort_key: number | undefined;
948
+ } | {
949
+ type: "survey_text_short";
950
+ meta: {
951
+ prompt: string;
952
+ } & {
953
+ validation?: {
954
+ required?: {
955
+ value: true;
956
+ message: string;
957
+ } | {
958
+ value: false;
959
+ message: null;
960
+ } | undefined;
961
+ } | undefined;
962
+ };
963
+ sort_key: number | undefined;
964
+ } | {
965
+ type: "survey_rating";
966
+ sort_key: number | undefined;
967
+ meta: ({
968
+ type: "emojis";
969
+ lower_label: string;
970
+ upper_label: string;
971
+ options: number;
972
+ emojis: string[];
973
+ } | {
974
+ type: "numbers";
975
+ lower_label: string;
976
+ upper_label: string;
977
+ options: number;
978
+ } | {
979
+ type: "stars";
980
+ lower_label: string;
981
+ upper_label: string;
982
+ options: number;
983
+ } | {
984
+ type: "nps";
985
+ lower_label: string;
986
+ upper_label: string;
987
+ options: number;
988
+ }) & {
989
+ validation?: {
990
+ required?: {
991
+ value: true;
992
+ message: string;
993
+ } | {
994
+ value: false;
995
+ message: null;
996
+ } | undefined;
997
+ } | undefined;
998
+ };
999
+ } | {
1000
+ type: "survey_list";
1001
+ sort_key: number | undefined;
1002
+ meta: {
1003
+ options: string[];
1004
+ list_type: "multiple" | "single";
1005
+ display_type: "grid" | "list" | "dropdown";
1006
+ } & {
1007
+ validation?: {
1008
+ required?: {
1009
+ value: true;
1010
+ message: string;
1011
+ } | {
1012
+ value: false;
1013
+ message: null;
1014
+ } | undefined;
1015
+ } | undefined;
1016
+ };
1017
+ })[];
1018
+ is_live: boolean;
1019
+ preview_url: string | null | undefined;
1020
+ } & {
1021
+ form_factor: {
1022
+ type: "modal";
1023
+ } | {
1024
+ type: "popover";
1025
+ position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
1026
+ } | ({
1027
+ type: "pin";
1028
+ anchor: string;
1029
+ } & {
1030
+ is_open_by_default?: boolean | undefined;
1031
+ is_showing_mask?: boolean | undefined;
1032
+ advance_trigger?: string | undefined;
1033
+ offset?: {
1034
+ x: string;
1035
+ y: string;
1036
+ } | undefined;
1037
+ }) | {
1038
+ type: "tooltip";
1039
+ anchor: string;
1040
+ show_on: "click" | "hover";
1041
+ marker: ({
1042
+ type: "beacon";
1043
+ } | {
1044
+ type: "icon";
1045
+ icon: "helpCircle" | "helpSquare" | "infoCircle" | "bookClosed" | "lightBulb" | "lightning";
1046
+ } | {
1047
+ type: "image";
1048
+ source: string;
1049
+ }) & {
1050
+ positioning: {
1051
+ position: "left" | "right" | "inline_left" | "inline_right";
1052
+ offset: {
1053
+ x: string;
1054
+ y: string;
1055
+ };
1056
+ };
1057
+ };
1058
+ };
1059
+ } & {
1060
+ has_survey_response?: boolean | undefined;
1061
+ })[];
1062
+ is_live: boolean;
1063
+ } & {
1064
+ old_nudge_id?: number | null | undefined;
1065
+ archived?: boolean | undefined;
1066
+ audience?: {
1067
+ type: "all_users";
1068
+ } | {
1069
+ type: "rule_expression";
1070
+ expression: import("./helpers/rules").RuleExpression;
1071
+ } | {
1072
+ type: "named_rule_reference";
1073
+ rule_reference: {
1074
+ type: "named_rule";
1075
+ rule_id: string | number;
1076
+ } & {
1077
+ reason?: string | undefined;
1078
+ };
1079
+ } | null | undefined;
1080
+ } & {
1081
+ template_source: string;
1082
+ show_step_counter: boolean;
1083
+ dismissible: boolean;
1084
+ snoozable: boolean;
1085
+ share_page_url_or_path: string;
1086
+ copilot_suggest: boolean;
1087
+ show_in_spotlight_search: boolean;
1088
+ show_in_helphub_search: boolean;
1089
+ copilot_cta_label: string;
1090
+ copilot_description: string;
1091
+ is_scheduled: boolean;
1092
+ scheduled_start_time: string | null | undefined;
1093
+ scheduled_end_time: string | null | undefined;
1094
+ snooze_label: string;
1095
+ type: "announcement" | "product_tour" | "survey" | null;
1096
+ editor_tags: string[];
1097
+ preview_url: string | null | undefined;
1098
+ custom_theme: string | null | undefined;
20
1099
  };
21
1100
  }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
22
1101
  id: number;
23
1102
  type: "announcement" | "product_tour" | "survey";
24
1103
  data: {
25
- [x: string]: any;
1104
+ slug: string;
1105
+ id: string | number;
1106
+ organization: string;
1107
+ show_expression: import("./helpers/rules").RuleExpression;
1108
+ trigger: {
1109
+ type: "when_conditions_pass";
1110
+ } | {
1111
+ type: "when_page_reached";
1112
+ meta: {
1113
+ url: string;
1114
+ };
1115
+ } | {
1116
+ type: "on_command_execution";
1117
+ meta: {
1118
+ command: string;
1119
+ };
1120
+ } | {
1121
+ type: "on_event";
1122
+ meta: {
1123
+ event: string;
1124
+ condition_group: import("./helpers/rules").RuleExpression | null | undefined;
1125
+ };
1126
+ } | {
1127
+ type: "when_element_appears";
1128
+ meta: {
1129
+ selector: string;
1130
+ };
1131
+ } | {
1132
+ type: "on_user_confusion";
1133
+ } | {
1134
+ type: "on_rage_click";
1135
+ } | {
1136
+ type: "smart_delay";
1137
+ } | {
1138
+ type: "after_time";
1139
+ meta: {
1140
+ unit: "minute" | "second";
1141
+ value: number;
1142
+ };
1143
+ } | {
1144
+ type: "when_share_link_viewed";
1145
+ } | {
1146
+ type: "scheduled";
1147
+ meta: {
1148
+ interval: "day" | "month" | "week";
1149
+ value: number;
1150
+ };
1151
+ };
1152
+ frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
1153
+ steps: ({
1154
+ id: number;
1155
+ title: string;
1156
+ content: ({
1157
+ type: "markdown";
1158
+ sort_key: number | undefined;
1159
+ meta: {
1160
+ value: string;
1161
+ };
1162
+ } | {
1163
+ type: "image";
1164
+ sort_key: number | undefined;
1165
+ meta: {
1166
+ src: string;
1167
+ file_name: string;
1168
+ size: string;
1169
+ };
1170
+ } | {
1171
+ type: "video";
1172
+ sort_key: number | undefined;
1173
+ meta: {
1174
+ type: "url";
1175
+ src: string;
1176
+ } | {
1177
+ type: "command";
1178
+ command: string;
1179
+ };
1180
+ } | {
1181
+ type: "help_doc_command";
1182
+ sort_key: number | undefined;
1183
+ meta: {
1184
+ command: string;
1185
+ };
1186
+ } | {
1187
+ type: "button";
1188
+ sort_key: number | undefined;
1189
+ meta: {
1190
+ label?: string | undefined;
1191
+ action?: {
1192
+ type: "execute_command";
1193
+ meta: {
1194
+ command: string;
1195
+ } & {
1196
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
1197
+ };
1198
+ } | {
1199
+ type: "no_action";
1200
+ } | {
1201
+ type: "click";
1202
+ value: string;
1203
+ } | {
1204
+ type: "click" | "clickBySelector" | "clickByXpath";
1205
+ value: string[];
1206
+ } | ({
1207
+ type: "link";
1208
+ value: string;
1209
+ } & {
1210
+ operation?: "self" | "router" | "blank" | undefined;
1211
+ }) | {
1212
+ type: "open_chat";
1213
+ meta: {
1214
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
1215
+ };
1216
+ } | {
1217
+ type: "dismiss";
1218
+ } | {
1219
+ type: "snooze";
1220
+ } | {
1221
+ type: "questlist";
1222
+ value: number;
1223
+ } | {
1224
+ type: "step_back";
1225
+ } | {
1226
+ type: "nudge";
1227
+ value: number;
1228
+ } | {
1229
+ type: "go_to_step";
1230
+ value: number;
1231
+ } | ({
1232
+ type: "open_bar";
1233
+ } & {
1234
+ value?: string | undefined;
1235
+ categoryFilter?: number | undefined;
1236
+ }) | {
1237
+ type: "open_helphub";
1238
+ } | {
1239
+ type: "open_copilot";
1240
+ } | undefined;
1241
+ button_type?: "snooze" | "primary" | "secondary" | undefined;
1242
+ conditional_actions?: {
1243
+ operator: "eq" | "neq" | "gt" | "lt";
1244
+ operand: string | number;
1245
+ action: {
1246
+ type: "execute_command";
1247
+ meta: {
1248
+ command: string;
1249
+ } & {
1250
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
1251
+ };
1252
+ } | {
1253
+ type: "no_action";
1254
+ } | {
1255
+ type: "click";
1256
+ value: string;
1257
+ } | {
1258
+ type: "click" | "clickBySelector" | "clickByXpath";
1259
+ value: string[];
1260
+ } | ({
1261
+ type: "link";
1262
+ value: string;
1263
+ } & {
1264
+ operation?: "self" | "router" | "blank" | undefined;
1265
+ }) | {
1266
+ type: "open_chat";
1267
+ meta: {
1268
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
1269
+ };
1270
+ } | {
1271
+ type: "dismiss";
1272
+ } | {
1273
+ type: "snooze";
1274
+ } | {
1275
+ type: "questlist";
1276
+ value: number;
1277
+ } | {
1278
+ type: "step_back";
1279
+ } | {
1280
+ type: "nudge";
1281
+ value: number;
1282
+ } | {
1283
+ type: "go_to_step";
1284
+ value: number;
1285
+ } | ({
1286
+ type: "open_bar";
1287
+ } & {
1288
+ value?: string | undefined;
1289
+ categoryFilter?: number | undefined;
1290
+ }) | {
1291
+ type: "open_helphub";
1292
+ } | {
1293
+ type: "open_copilot";
1294
+ };
1295
+ }[] | undefined;
1296
+ } | null;
1297
+ } | {
1298
+ type: "survey_text";
1299
+ meta: {
1300
+ prompt: string;
1301
+ } & {
1302
+ validation?: {
1303
+ required?: {
1304
+ value: true;
1305
+ message: string;
1306
+ } | {
1307
+ value: false;
1308
+ message: null;
1309
+ } | undefined;
1310
+ } | undefined;
1311
+ };
1312
+ sort_key: number | undefined;
1313
+ } | {
1314
+ type: "survey_text_short";
1315
+ meta: {
1316
+ prompt: string;
1317
+ } & {
1318
+ validation?: {
1319
+ required?: {
1320
+ value: true;
1321
+ message: string;
1322
+ } | {
1323
+ value: false;
1324
+ message: null;
1325
+ } | undefined;
1326
+ } | undefined;
1327
+ };
1328
+ sort_key: number | undefined;
1329
+ } | {
1330
+ type: "survey_rating";
1331
+ sort_key: number | undefined;
1332
+ meta: ({
1333
+ type: "emojis";
1334
+ lower_label: string;
1335
+ upper_label: string;
1336
+ options: number;
1337
+ emojis: string[];
1338
+ } | {
1339
+ type: "numbers";
1340
+ lower_label: string;
1341
+ upper_label: string;
1342
+ options: number;
1343
+ } | {
1344
+ type: "stars";
1345
+ lower_label: string;
1346
+ upper_label: string;
1347
+ options: number;
1348
+ } | {
1349
+ type: "nps";
1350
+ lower_label: string;
1351
+ upper_label: string;
1352
+ options: number;
1353
+ }) & {
1354
+ validation?: {
1355
+ required?: {
1356
+ value: true;
1357
+ message: string;
1358
+ } | {
1359
+ value: false;
1360
+ message: null;
1361
+ } | undefined;
1362
+ } | undefined;
1363
+ };
1364
+ } | {
1365
+ type: "survey_list";
1366
+ sort_key: number | undefined;
1367
+ meta: {
1368
+ options: string[];
1369
+ list_type: "multiple" | "single";
1370
+ display_type: "grid" | "list" | "dropdown";
1371
+ } & {
1372
+ validation?: {
1373
+ required?: {
1374
+ value: true;
1375
+ message: string;
1376
+ } | {
1377
+ value: false;
1378
+ message: null;
1379
+ } | undefined;
1380
+ } | undefined;
1381
+ };
1382
+ })[];
1383
+ is_live: boolean;
1384
+ preview_url: string | null | undefined;
1385
+ } & {
1386
+ form_factor: {
1387
+ type: "modal";
1388
+ } | {
1389
+ type: "popover";
1390
+ position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
1391
+ } | ({
1392
+ type: "pin";
1393
+ anchor: string;
1394
+ } & {
1395
+ is_open_by_default?: boolean | undefined;
1396
+ is_showing_mask?: boolean | undefined;
1397
+ advance_trigger?: string | undefined;
1398
+ offset?: {
1399
+ x: string;
1400
+ y: string;
1401
+ } | undefined;
1402
+ }) | {
1403
+ type: "tooltip";
1404
+ anchor: string;
1405
+ show_on: "click" | "hover";
1406
+ marker: ({
1407
+ type: "beacon";
1408
+ } | {
1409
+ type: "icon";
1410
+ icon: "helpCircle" | "helpSquare" | "infoCircle" | "bookClosed" | "lightBulb" | "lightning";
1411
+ } | {
1412
+ type: "image";
1413
+ source: string;
1414
+ }) & {
1415
+ positioning: {
1416
+ position: "left" | "right" | "inline_left" | "inline_right";
1417
+ offset: {
1418
+ x: string;
1419
+ y: string;
1420
+ };
1421
+ };
1422
+ };
1423
+ };
1424
+ } & {
1425
+ has_survey_response?: boolean | undefined;
1426
+ })[];
1427
+ is_live: boolean;
1428
+ } & {
1429
+ old_nudge_id?: number | null | undefined;
1430
+ archived?: boolean | undefined;
1431
+ audience?: {
1432
+ type: "all_users";
1433
+ } | {
1434
+ type: "rule_expression";
1435
+ expression: import("./helpers/rules").RuleExpression;
1436
+ } | {
1437
+ type: "named_rule_reference";
1438
+ rule_reference: {
1439
+ type: "named_rule";
1440
+ rule_id: string | number;
1441
+ } & {
1442
+ reason?: string | undefined;
1443
+ };
1444
+ } | null | undefined;
1445
+ } & {
1446
+ template_source: string;
1447
+ show_step_counter: boolean;
1448
+ dismissible: boolean;
1449
+ snoozable: boolean;
1450
+ share_page_url_or_path: string;
1451
+ copilot_suggest: boolean;
1452
+ show_in_spotlight_search: boolean;
1453
+ show_in_helphub_search: boolean;
1454
+ copilot_cta_label: string;
1455
+ copilot_description: string;
1456
+ is_scheduled: boolean;
1457
+ scheduled_start_time: string | null | undefined;
1458
+ scheduled_end_time: string | null | undefined;
1459
+ snooze_label: string;
1460
+ type: "announcement" | "product_tour" | "survey" | null;
1461
+ editor_tags: string[];
1462
+ preview_url: string | null | undefined;
1463
+ custom_theme: string | null | undefined;
26
1464
  };
27
1465
  }>;
28
1466
  static update: (object: {
29
1467
  id: number;
30
1468
  type: "announcement" | "product_tour" | "survey";
31
1469
  data: {
32
- [x: string]: any;
1470
+ slug: string;
1471
+ id: string | number;
1472
+ organization: string;
1473
+ show_expression: import("./helpers/rules").RuleExpression;
1474
+ trigger: {
1475
+ type: "when_conditions_pass";
1476
+ } | {
1477
+ type: "when_page_reached";
1478
+ meta: {
1479
+ url: string;
1480
+ };
1481
+ } | {
1482
+ type: "on_command_execution";
1483
+ meta: {
1484
+ command: string;
1485
+ };
1486
+ } | {
1487
+ type: "on_event";
1488
+ meta: {
1489
+ event: string;
1490
+ condition_group: import("./helpers/rules").RuleExpression | null | undefined;
1491
+ };
1492
+ } | {
1493
+ type: "when_element_appears";
1494
+ meta: {
1495
+ selector: string;
1496
+ };
1497
+ } | {
1498
+ type: "on_user_confusion";
1499
+ } | {
1500
+ type: "on_rage_click";
1501
+ } | {
1502
+ type: "smart_delay";
1503
+ } | {
1504
+ type: "after_time";
1505
+ meta: {
1506
+ unit: "minute" | "second";
1507
+ value: number;
1508
+ };
1509
+ } | {
1510
+ type: "when_share_link_viewed";
1511
+ } | {
1512
+ type: "scheduled";
1513
+ meta: {
1514
+ interval: "day" | "month" | "week";
1515
+ value: number;
1516
+ };
1517
+ };
1518
+ frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
1519
+ steps: ({
1520
+ id: number;
1521
+ title: string;
1522
+ content: ({
1523
+ type: "markdown";
1524
+ sort_key: number | undefined;
1525
+ meta: {
1526
+ value: string;
1527
+ };
1528
+ } | {
1529
+ type: "image";
1530
+ sort_key: number | undefined;
1531
+ meta: {
1532
+ src: string;
1533
+ file_name: string;
1534
+ size: string;
1535
+ };
1536
+ } | {
1537
+ type: "video";
1538
+ sort_key: number | undefined;
1539
+ meta: {
1540
+ type: "url";
1541
+ src: string;
1542
+ } | {
1543
+ type: "command";
1544
+ command: string;
1545
+ };
1546
+ } | {
1547
+ type: "help_doc_command";
1548
+ sort_key: number | undefined;
1549
+ meta: {
1550
+ command: string;
1551
+ };
1552
+ } | {
1553
+ type: "button";
1554
+ sort_key: number | undefined;
1555
+ meta: {
1556
+ label?: string | undefined;
1557
+ action?: {
1558
+ type: "execute_command";
1559
+ meta: {
1560
+ command: string;
1561
+ } & {
1562
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
1563
+ };
1564
+ } | {
1565
+ type: "no_action";
1566
+ } | {
1567
+ type: "click";
1568
+ value: string;
1569
+ } | {
1570
+ type: "click" | "clickBySelector" | "clickByXpath";
1571
+ value: string[];
1572
+ } | ({
1573
+ type: "link";
1574
+ value: string;
1575
+ } & {
1576
+ operation?: "self" | "router" | "blank" | undefined;
1577
+ }) | {
1578
+ type: "open_chat";
1579
+ meta: {
1580
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
1581
+ };
1582
+ } | {
1583
+ type: "dismiss";
1584
+ } | {
1585
+ type: "snooze";
1586
+ } | {
1587
+ type: "questlist";
1588
+ value: number;
1589
+ } | {
1590
+ type: "step_back";
1591
+ } | {
1592
+ type: "nudge";
1593
+ value: number;
1594
+ } | {
1595
+ type: "go_to_step";
1596
+ value: number;
1597
+ } | ({
1598
+ type: "open_bar";
1599
+ } & {
1600
+ value?: string | undefined;
1601
+ categoryFilter?: number | undefined;
1602
+ }) | {
1603
+ type: "open_helphub";
1604
+ } | {
1605
+ type: "open_copilot";
1606
+ } | undefined;
1607
+ button_type?: "snooze" | "primary" | "secondary" | undefined;
1608
+ conditional_actions?: {
1609
+ operator: "eq" | "neq" | "gt" | "lt";
1610
+ operand: string | number;
1611
+ action: {
1612
+ type: "execute_command";
1613
+ meta: {
1614
+ command: string;
1615
+ } & {
1616
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
1617
+ };
1618
+ } | {
1619
+ type: "no_action";
1620
+ } | {
1621
+ type: "click";
1622
+ value: string;
1623
+ } | {
1624
+ type: "click" | "clickBySelector" | "clickByXpath";
1625
+ value: string[];
1626
+ } | ({
1627
+ type: "link";
1628
+ value: string;
1629
+ } & {
1630
+ operation?: "self" | "router" | "blank" | undefined;
1631
+ }) | {
1632
+ type: "open_chat";
1633
+ meta: {
1634
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
1635
+ };
1636
+ } | {
1637
+ type: "dismiss";
1638
+ } | {
1639
+ type: "snooze";
1640
+ } | {
1641
+ type: "questlist";
1642
+ value: number;
1643
+ } | {
1644
+ type: "step_back";
1645
+ } | {
1646
+ type: "nudge";
1647
+ value: number;
1648
+ } | {
1649
+ type: "go_to_step";
1650
+ value: number;
1651
+ } | ({
1652
+ type: "open_bar";
1653
+ } & {
1654
+ value?: string | undefined;
1655
+ categoryFilter?: number | undefined;
1656
+ }) | {
1657
+ type: "open_helphub";
1658
+ } | {
1659
+ type: "open_copilot";
1660
+ };
1661
+ }[] | undefined;
1662
+ } | null;
1663
+ } | {
1664
+ type: "survey_text";
1665
+ meta: {
1666
+ prompt: string;
1667
+ } & {
1668
+ validation?: {
1669
+ required?: {
1670
+ value: true;
1671
+ message: string;
1672
+ } | {
1673
+ value: false;
1674
+ message: null;
1675
+ } | undefined;
1676
+ } | undefined;
1677
+ };
1678
+ sort_key: number | undefined;
1679
+ } | {
1680
+ type: "survey_text_short";
1681
+ meta: {
1682
+ prompt: string;
1683
+ } & {
1684
+ validation?: {
1685
+ required?: {
1686
+ value: true;
1687
+ message: string;
1688
+ } | {
1689
+ value: false;
1690
+ message: null;
1691
+ } | undefined;
1692
+ } | undefined;
1693
+ };
1694
+ sort_key: number | undefined;
1695
+ } | {
1696
+ type: "survey_rating";
1697
+ sort_key: number | undefined;
1698
+ meta: ({
1699
+ type: "emojis";
1700
+ lower_label: string;
1701
+ upper_label: string;
1702
+ options: number;
1703
+ emojis: string[];
1704
+ } | {
1705
+ type: "numbers";
1706
+ lower_label: string;
1707
+ upper_label: string;
1708
+ options: number;
1709
+ } | {
1710
+ type: "stars";
1711
+ lower_label: string;
1712
+ upper_label: string;
1713
+ options: number;
1714
+ } | {
1715
+ type: "nps";
1716
+ lower_label: string;
1717
+ upper_label: string;
1718
+ options: number;
1719
+ }) & {
1720
+ validation?: {
1721
+ required?: {
1722
+ value: true;
1723
+ message: string;
1724
+ } | {
1725
+ value: false;
1726
+ message: null;
1727
+ } | undefined;
1728
+ } | undefined;
1729
+ };
1730
+ } | {
1731
+ type: "survey_list";
1732
+ sort_key: number | undefined;
1733
+ meta: {
1734
+ options: string[];
1735
+ list_type: "multiple" | "single";
1736
+ display_type: "grid" | "list" | "dropdown";
1737
+ } & {
1738
+ validation?: {
1739
+ required?: {
1740
+ value: true;
1741
+ message: string;
1742
+ } | {
1743
+ value: false;
1744
+ message: null;
1745
+ } | undefined;
1746
+ } | undefined;
1747
+ };
1748
+ })[];
1749
+ is_live: boolean;
1750
+ preview_url: string | null | undefined;
1751
+ } & {
1752
+ form_factor: {
1753
+ type: "modal";
1754
+ } | {
1755
+ type: "popover";
1756
+ position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
1757
+ } | ({
1758
+ type: "pin";
1759
+ anchor: string;
1760
+ } & {
1761
+ is_open_by_default?: boolean | undefined;
1762
+ is_showing_mask?: boolean | undefined;
1763
+ advance_trigger?: string | undefined;
1764
+ offset?: {
1765
+ x: string;
1766
+ y: string;
1767
+ } | undefined;
1768
+ }) | {
1769
+ type: "tooltip";
1770
+ anchor: string;
1771
+ show_on: "click" | "hover";
1772
+ marker: ({
1773
+ type: "beacon";
1774
+ } | {
1775
+ type: "icon";
1776
+ icon: "helpCircle" | "helpSquare" | "infoCircle" | "bookClosed" | "lightBulb" | "lightning";
1777
+ } | {
1778
+ type: "image";
1779
+ source: string;
1780
+ }) & {
1781
+ positioning: {
1782
+ position: "left" | "right" | "inline_left" | "inline_right";
1783
+ offset: {
1784
+ x: string;
1785
+ y: string;
1786
+ };
1787
+ };
1788
+ };
1789
+ };
1790
+ } & {
1791
+ has_survey_response?: boolean | undefined;
1792
+ })[];
1793
+ is_live: boolean;
1794
+ } & {
1795
+ old_nudge_id?: number | null | undefined;
1796
+ archived?: boolean | undefined;
1797
+ audience?: {
1798
+ type: "all_users";
1799
+ } | {
1800
+ type: "rule_expression";
1801
+ expression: import("./helpers/rules").RuleExpression;
1802
+ } | {
1803
+ type: "named_rule_reference";
1804
+ rule_reference: {
1805
+ type: "named_rule";
1806
+ rule_id: string | number;
1807
+ } & {
1808
+ reason?: string | undefined;
1809
+ };
1810
+ } | null | undefined;
1811
+ } & {
1812
+ template_source: string;
1813
+ show_step_counter: boolean;
1814
+ dismissible: boolean;
1815
+ snoozable: boolean;
1816
+ share_page_url_or_path: string;
1817
+ copilot_suggest: boolean;
1818
+ show_in_spotlight_search: boolean;
1819
+ show_in_helphub_search: boolean;
1820
+ copilot_cta_label: string;
1821
+ copilot_description: string;
1822
+ is_scheduled: boolean;
1823
+ scheduled_start_time: string | null | undefined;
1824
+ scheduled_end_time: string | null | undefined;
1825
+ snooze_label: string;
1826
+ type: "announcement" | "product_tour" | "survey" | null;
1827
+ editor_tags: string[];
1828
+ preview_url: string | null | undefined;
1829
+ custom_theme: string | null | undefined;
33
1830
  };
34
1831
  }, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
35
1832
  id: number;
36
1833
  type: "announcement" | "product_tour" | "survey";
37
1834
  data: {
38
- [x: string]: any;
1835
+ slug: string;
1836
+ id: string | number;
1837
+ organization: string;
1838
+ show_expression: import("./helpers/rules").RuleExpression;
1839
+ trigger: {
1840
+ type: "when_conditions_pass";
1841
+ } | {
1842
+ type: "when_page_reached";
1843
+ meta: {
1844
+ url: string;
1845
+ };
1846
+ } | {
1847
+ type: "on_command_execution";
1848
+ meta: {
1849
+ command: string;
1850
+ };
1851
+ } | {
1852
+ type: "on_event";
1853
+ meta: {
1854
+ event: string;
1855
+ condition_group: import("./helpers/rules").RuleExpression | null | undefined;
1856
+ };
1857
+ } | {
1858
+ type: "when_element_appears";
1859
+ meta: {
1860
+ selector: string;
1861
+ };
1862
+ } | {
1863
+ type: "on_user_confusion";
1864
+ } | {
1865
+ type: "on_rage_click";
1866
+ } | {
1867
+ type: "smart_delay";
1868
+ } | {
1869
+ type: "after_time";
1870
+ meta: {
1871
+ unit: "minute" | "second";
1872
+ value: number;
1873
+ };
1874
+ } | {
1875
+ type: "when_share_link_viewed";
1876
+ } | {
1877
+ type: "scheduled";
1878
+ meta: {
1879
+ interval: "day" | "month" | "week";
1880
+ value: number;
1881
+ };
1882
+ };
1883
+ frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
1884
+ steps: ({
1885
+ id: number;
1886
+ title: string;
1887
+ content: ({
1888
+ type: "markdown";
1889
+ sort_key: number | undefined;
1890
+ meta: {
1891
+ value: string;
1892
+ };
1893
+ } | {
1894
+ type: "image";
1895
+ sort_key: number | undefined;
1896
+ meta: {
1897
+ src: string;
1898
+ file_name: string;
1899
+ size: string;
1900
+ };
1901
+ } | {
1902
+ type: "video";
1903
+ sort_key: number | undefined;
1904
+ meta: {
1905
+ type: "url";
1906
+ src: string;
1907
+ } | {
1908
+ type: "command";
1909
+ command: string;
1910
+ };
1911
+ } | {
1912
+ type: "help_doc_command";
1913
+ sort_key: number | undefined;
1914
+ meta: {
1915
+ command: string;
1916
+ };
1917
+ } | {
1918
+ type: "button";
1919
+ sort_key: number | undefined;
1920
+ meta: {
1921
+ label?: string | undefined;
1922
+ action?: {
1923
+ type: "execute_command";
1924
+ meta: {
1925
+ command: string;
1926
+ } & {
1927
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
1928
+ };
1929
+ } | {
1930
+ type: "no_action";
1931
+ } | {
1932
+ type: "click";
1933
+ value: string;
1934
+ } | {
1935
+ type: "click" | "clickBySelector" | "clickByXpath";
1936
+ value: string[];
1937
+ } | ({
1938
+ type: "link";
1939
+ value: string;
1940
+ } & {
1941
+ operation?: "self" | "router" | "blank" | undefined;
1942
+ }) | {
1943
+ type: "open_chat";
1944
+ meta: {
1945
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
1946
+ };
1947
+ } | {
1948
+ type: "dismiss";
1949
+ } | {
1950
+ type: "snooze";
1951
+ } | {
1952
+ type: "questlist";
1953
+ value: number;
1954
+ } | {
1955
+ type: "step_back";
1956
+ } | {
1957
+ type: "nudge";
1958
+ value: number;
1959
+ } | {
1960
+ type: "go_to_step";
1961
+ value: number;
1962
+ } | ({
1963
+ type: "open_bar";
1964
+ } & {
1965
+ value?: string | undefined;
1966
+ categoryFilter?: number | undefined;
1967
+ }) | {
1968
+ type: "open_helphub";
1969
+ } | {
1970
+ type: "open_copilot";
1971
+ } | undefined;
1972
+ button_type?: "snooze" | "primary" | "secondary" | undefined;
1973
+ conditional_actions?: {
1974
+ operator: "eq" | "neq" | "gt" | "lt";
1975
+ operand: string | number;
1976
+ action: {
1977
+ type: "execute_command";
1978
+ meta: {
1979
+ command: string;
1980
+ } & {
1981
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
1982
+ };
1983
+ } | {
1984
+ type: "no_action";
1985
+ } | {
1986
+ type: "click";
1987
+ value: string;
1988
+ } | {
1989
+ type: "click" | "clickBySelector" | "clickByXpath";
1990
+ value: string[];
1991
+ } | ({
1992
+ type: "link";
1993
+ value: string;
1994
+ } & {
1995
+ operation?: "self" | "router" | "blank" | undefined;
1996
+ }) | {
1997
+ type: "open_chat";
1998
+ meta: {
1999
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
2000
+ };
2001
+ } | {
2002
+ type: "dismiss";
2003
+ } | {
2004
+ type: "snooze";
2005
+ } | {
2006
+ type: "questlist";
2007
+ value: number;
2008
+ } | {
2009
+ type: "step_back";
2010
+ } | {
2011
+ type: "nudge";
2012
+ value: number;
2013
+ } | {
2014
+ type: "go_to_step";
2015
+ value: number;
2016
+ } | ({
2017
+ type: "open_bar";
2018
+ } & {
2019
+ value?: string | undefined;
2020
+ categoryFilter?: number | undefined;
2021
+ }) | {
2022
+ type: "open_helphub";
2023
+ } | {
2024
+ type: "open_copilot";
2025
+ };
2026
+ }[] | undefined;
2027
+ } | null;
2028
+ } | {
2029
+ type: "survey_text";
2030
+ meta: {
2031
+ prompt: string;
2032
+ } & {
2033
+ validation?: {
2034
+ required?: {
2035
+ value: true;
2036
+ message: string;
2037
+ } | {
2038
+ value: false;
2039
+ message: null;
2040
+ } | undefined;
2041
+ } | undefined;
2042
+ };
2043
+ sort_key: number | undefined;
2044
+ } | {
2045
+ type: "survey_text_short";
2046
+ meta: {
2047
+ prompt: string;
2048
+ } & {
2049
+ validation?: {
2050
+ required?: {
2051
+ value: true;
2052
+ message: string;
2053
+ } | {
2054
+ value: false;
2055
+ message: null;
2056
+ } | undefined;
2057
+ } | undefined;
2058
+ };
2059
+ sort_key: number | undefined;
2060
+ } | {
2061
+ type: "survey_rating";
2062
+ sort_key: number | undefined;
2063
+ meta: ({
2064
+ type: "emojis";
2065
+ lower_label: string;
2066
+ upper_label: string;
2067
+ options: number;
2068
+ emojis: string[];
2069
+ } | {
2070
+ type: "numbers";
2071
+ lower_label: string;
2072
+ upper_label: string;
2073
+ options: number;
2074
+ } | {
2075
+ type: "stars";
2076
+ lower_label: string;
2077
+ upper_label: string;
2078
+ options: number;
2079
+ } | {
2080
+ type: "nps";
2081
+ lower_label: string;
2082
+ upper_label: string;
2083
+ options: number;
2084
+ }) & {
2085
+ validation?: {
2086
+ required?: {
2087
+ value: true;
2088
+ message: string;
2089
+ } | {
2090
+ value: false;
2091
+ message: null;
2092
+ } | undefined;
2093
+ } | undefined;
2094
+ };
2095
+ } | {
2096
+ type: "survey_list";
2097
+ sort_key: number | undefined;
2098
+ meta: {
2099
+ options: string[];
2100
+ list_type: "multiple" | "single";
2101
+ display_type: "grid" | "list" | "dropdown";
2102
+ } & {
2103
+ validation?: {
2104
+ required?: {
2105
+ value: true;
2106
+ message: string;
2107
+ } | {
2108
+ value: false;
2109
+ message: null;
2110
+ } | undefined;
2111
+ } | undefined;
2112
+ };
2113
+ })[];
2114
+ is_live: boolean;
2115
+ preview_url: string | null | undefined;
2116
+ } & {
2117
+ form_factor: {
2118
+ type: "modal";
2119
+ } | {
2120
+ type: "popover";
2121
+ position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
2122
+ } | ({
2123
+ type: "pin";
2124
+ anchor: string;
2125
+ } & {
2126
+ is_open_by_default?: boolean | undefined;
2127
+ is_showing_mask?: boolean | undefined;
2128
+ advance_trigger?: string | undefined;
2129
+ offset?: {
2130
+ x: string;
2131
+ y: string;
2132
+ } | undefined;
2133
+ }) | {
2134
+ type: "tooltip";
2135
+ anchor: string;
2136
+ show_on: "click" | "hover";
2137
+ marker: ({
2138
+ type: "beacon";
2139
+ } | {
2140
+ type: "icon";
2141
+ icon: "helpCircle" | "helpSquare" | "infoCircle" | "bookClosed" | "lightBulb" | "lightning";
2142
+ } | {
2143
+ type: "image";
2144
+ source: string;
2145
+ }) & {
2146
+ positioning: {
2147
+ position: "left" | "right" | "inline_left" | "inline_right";
2148
+ offset: {
2149
+ x: string;
2150
+ y: string;
2151
+ };
2152
+ };
2153
+ };
2154
+ };
2155
+ } & {
2156
+ has_survey_response?: boolean | undefined;
2157
+ })[];
2158
+ is_live: boolean;
2159
+ } & {
2160
+ old_nudge_id?: number | null | undefined;
2161
+ archived?: boolean | undefined;
2162
+ audience?: {
2163
+ type: "all_users";
2164
+ } | {
2165
+ type: "rule_expression";
2166
+ expression: import("./helpers/rules").RuleExpression;
2167
+ } | {
2168
+ type: "named_rule_reference";
2169
+ rule_reference: {
2170
+ type: "named_rule";
2171
+ rule_id: string | number;
2172
+ } & {
2173
+ reason?: string | undefined;
2174
+ };
2175
+ } | null | undefined;
2176
+ } & {
2177
+ template_source: string;
2178
+ show_step_counter: boolean;
2179
+ dismissible: boolean;
2180
+ snoozable: boolean;
2181
+ share_page_url_or_path: string;
2182
+ copilot_suggest: boolean;
2183
+ show_in_spotlight_search: boolean;
2184
+ show_in_helphub_search: boolean;
2185
+ copilot_cta_label: string;
2186
+ copilot_description: string;
2187
+ is_scheduled: boolean;
2188
+ scheduled_start_time: string | null | undefined;
2189
+ scheduled_end_time: string | null | undefined;
2190
+ snooze_label: string;
2191
+ type: "announcement" | "product_tour" | "survey" | null;
2192
+ editor_tags: string[];
2193
+ preview_url: string | null | undefined;
2194
+ custom_theme: string | null | undefined;
39
2195
  };
40
2196
  }>;
41
2197
  static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
@@ -43,7 +2199,366 @@ export declare class ExperienceTemplate {
43
2199
  id: number;
44
2200
  type: "announcement" | "product_tour" | "survey";
45
2201
  data: {
46
- [x: string]: any;
2202
+ slug: string;
2203
+ id: string | number;
2204
+ organization: string;
2205
+ show_expression: import("./helpers/rules").RuleExpression;
2206
+ trigger: {
2207
+ type: "when_conditions_pass";
2208
+ } | {
2209
+ type: "when_page_reached";
2210
+ meta: {
2211
+ url: string;
2212
+ };
2213
+ } | {
2214
+ type: "on_command_execution";
2215
+ meta: {
2216
+ command: string;
2217
+ };
2218
+ } | {
2219
+ type: "on_event";
2220
+ meta: {
2221
+ event: string;
2222
+ condition_group: import("./helpers/rules").RuleExpression | null | undefined;
2223
+ };
2224
+ } | {
2225
+ type: "when_element_appears";
2226
+ meta: {
2227
+ selector: string;
2228
+ };
2229
+ } | {
2230
+ type: "on_user_confusion";
2231
+ } | {
2232
+ type: "on_rage_click";
2233
+ } | {
2234
+ type: "smart_delay";
2235
+ } | {
2236
+ type: "after_time";
2237
+ meta: {
2238
+ unit: "minute" | "second";
2239
+ value: number;
2240
+ };
2241
+ } | {
2242
+ type: "when_share_link_viewed";
2243
+ } | {
2244
+ type: "scheduled";
2245
+ meta: {
2246
+ interval: "day" | "month" | "week";
2247
+ value: number;
2248
+ };
2249
+ };
2250
+ frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
2251
+ steps: ({
2252
+ id: number;
2253
+ title: string;
2254
+ content: ({
2255
+ type: "markdown";
2256
+ sort_key: number | undefined;
2257
+ meta: {
2258
+ value: string;
2259
+ };
2260
+ } | {
2261
+ type: "image";
2262
+ sort_key: number | undefined;
2263
+ meta: {
2264
+ src: string;
2265
+ file_name: string;
2266
+ size: string;
2267
+ };
2268
+ } | {
2269
+ type: "video";
2270
+ sort_key: number | undefined;
2271
+ meta: {
2272
+ type: "url";
2273
+ src: string;
2274
+ } | {
2275
+ type: "command";
2276
+ command: string;
2277
+ };
2278
+ } | {
2279
+ type: "help_doc_command";
2280
+ sort_key: number | undefined;
2281
+ meta: {
2282
+ command: string;
2283
+ };
2284
+ } | {
2285
+ type: "button";
2286
+ sort_key: number | undefined;
2287
+ meta: {
2288
+ label?: string | undefined;
2289
+ action?: {
2290
+ type: "execute_command";
2291
+ meta: {
2292
+ command: string;
2293
+ } & {
2294
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
2295
+ };
2296
+ } | {
2297
+ type: "no_action";
2298
+ } | {
2299
+ type: "click";
2300
+ value: string;
2301
+ } | {
2302
+ type: "click" | "clickBySelector" | "clickByXpath";
2303
+ value: string[];
2304
+ } | ({
2305
+ type: "link";
2306
+ value: string;
2307
+ } & {
2308
+ operation?: "self" | "router" | "blank" | undefined;
2309
+ }) | {
2310
+ type: "open_chat";
2311
+ meta: {
2312
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
2313
+ };
2314
+ } | {
2315
+ type: "dismiss";
2316
+ } | {
2317
+ type: "snooze";
2318
+ } | {
2319
+ type: "questlist";
2320
+ value: number;
2321
+ } | {
2322
+ type: "step_back";
2323
+ } | {
2324
+ type: "nudge";
2325
+ value: number;
2326
+ } | {
2327
+ type: "go_to_step";
2328
+ value: number;
2329
+ } | ({
2330
+ type: "open_bar";
2331
+ } & {
2332
+ value?: string | undefined;
2333
+ categoryFilter?: number | undefined;
2334
+ }) | {
2335
+ type: "open_helphub";
2336
+ } | {
2337
+ type: "open_copilot";
2338
+ } | undefined;
2339
+ button_type?: "snooze" | "primary" | "secondary" | undefined;
2340
+ conditional_actions?: {
2341
+ operator: "eq" | "neq" | "gt" | "lt";
2342
+ operand: string | number;
2343
+ action: {
2344
+ type: "execute_command";
2345
+ meta: {
2346
+ command: string;
2347
+ } & {
2348
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
2349
+ };
2350
+ } | {
2351
+ type: "no_action";
2352
+ } | {
2353
+ type: "click";
2354
+ value: string;
2355
+ } | {
2356
+ type: "click" | "clickBySelector" | "clickByXpath";
2357
+ value: string[];
2358
+ } | ({
2359
+ type: "link";
2360
+ value: string;
2361
+ } & {
2362
+ operation?: "self" | "router" | "blank" | undefined;
2363
+ }) | {
2364
+ type: "open_chat";
2365
+ meta: {
2366
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
2367
+ };
2368
+ } | {
2369
+ type: "dismiss";
2370
+ } | {
2371
+ type: "snooze";
2372
+ } | {
2373
+ type: "questlist";
2374
+ value: number;
2375
+ } | {
2376
+ type: "step_back";
2377
+ } | {
2378
+ type: "nudge";
2379
+ value: number;
2380
+ } | {
2381
+ type: "go_to_step";
2382
+ value: number;
2383
+ } | ({
2384
+ type: "open_bar";
2385
+ } & {
2386
+ value?: string | undefined;
2387
+ categoryFilter?: number | undefined;
2388
+ }) | {
2389
+ type: "open_helphub";
2390
+ } | {
2391
+ type: "open_copilot";
2392
+ };
2393
+ }[] | undefined;
2394
+ } | null;
2395
+ } | {
2396
+ type: "survey_text";
2397
+ meta: {
2398
+ prompt: string;
2399
+ } & {
2400
+ validation?: {
2401
+ required?: {
2402
+ value: true;
2403
+ message: string;
2404
+ } | {
2405
+ value: false;
2406
+ message: null;
2407
+ } | undefined;
2408
+ } | undefined;
2409
+ };
2410
+ sort_key: number | undefined;
2411
+ } | {
2412
+ type: "survey_text_short";
2413
+ meta: {
2414
+ prompt: string;
2415
+ } & {
2416
+ validation?: {
2417
+ required?: {
2418
+ value: true;
2419
+ message: string;
2420
+ } | {
2421
+ value: false;
2422
+ message: null;
2423
+ } | undefined;
2424
+ } | undefined;
2425
+ };
2426
+ sort_key: number | undefined;
2427
+ } | {
2428
+ type: "survey_rating";
2429
+ sort_key: number | undefined;
2430
+ meta: ({
2431
+ type: "emojis";
2432
+ lower_label: string;
2433
+ upper_label: string;
2434
+ options: number;
2435
+ emojis: string[];
2436
+ } | {
2437
+ type: "numbers";
2438
+ lower_label: string;
2439
+ upper_label: string;
2440
+ options: number;
2441
+ } | {
2442
+ type: "stars";
2443
+ lower_label: string;
2444
+ upper_label: string;
2445
+ options: number;
2446
+ } | {
2447
+ type: "nps";
2448
+ lower_label: string;
2449
+ upper_label: string;
2450
+ options: number;
2451
+ }) & {
2452
+ validation?: {
2453
+ required?: {
2454
+ value: true;
2455
+ message: string;
2456
+ } | {
2457
+ value: false;
2458
+ message: null;
2459
+ } | undefined;
2460
+ } | undefined;
2461
+ };
2462
+ } | {
2463
+ type: "survey_list";
2464
+ sort_key: number | undefined;
2465
+ meta: {
2466
+ options: string[];
2467
+ list_type: "multiple" | "single";
2468
+ display_type: "grid" | "list" | "dropdown";
2469
+ } & {
2470
+ validation?: {
2471
+ required?: {
2472
+ value: true;
2473
+ message: string;
2474
+ } | {
2475
+ value: false;
2476
+ message: null;
2477
+ } | undefined;
2478
+ } | undefined;
2479
+ };
2480
+ })[];
2481
+ is_live: boolean;
2482
+ preview_url: string | null | undefined;
2483
+ } & {
2484
+ form_factor: {
2485
+ type: "modal";
2486
+ } | {
2487
+ type: "popover";
2488
+ position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
2489
+ } | ({
2490
+ type: "pin";
2491
+ anchor: string;
2492
+ } & {
2493
+ is_open_by_default?: boolean | undefined;
2494
+ is_showing_mask?: boolean | undefined;
2495
+ advance_trigger?: string | undefined;
2496
+ offset?: {
2497
+ x: string;
2498
+ y: string;
2499
+ } | undefined;
2500
+ }) | {
2501
+ type: "tooltip";
2502
+ anchor: string;
2503
+ show_on: "click" | "hover";
2504
+ marker: ({
2505
+ type: "beacon";
2506
+ } | {
2507
+ type: "icon";
2508
+ icon: "helpCircle" | "helpSquare" | "infoCircle" | "bookClosed" | "lightBulb" | "lightning";
2509
+ } | {
2510
+ type: "image";
2511
+ source: string;
2512
+ }) & {
2513
+ positioning: {
2514
+ position: "left" | "right" | "inline_left" | "inline_right";
2515
+ offset: {
2516
+ x: string;
2517
+ y: string;
2518
+ };
2519
+ };
2520
+ };
2521
+ };
2522
+ } & {
2523
+ has_survey_response?: boolean | undefined;
2524
+ })[];
2525
+ is_live: boolean;
2526
+ } & {
2527
+ old_nudge_id?: number | null | undefined;
2528
+ archived?: boolean | undefined;
2529
+ audience?: {
2530
+ type: "all_users";
2531
+ } | {
2532
+ type: "rule_expression";
2533
+ expression: import("./helpers/rules").RuleExpression;
2534
+ } | {
2535
+ type: "named_rule_reference";
2536
+ rule_reference: {
2537
+ type: "named_rule";
2538
+ rule_id: string | number;
2539
+ } & {
2540
+ reason?: string | undefined;
2541
+ };
2542
+ } | null | undefined;
2543
+ } & {
2544
+ template_source: string;
2545
+ show_step_counter: boolean;
2546
+ dismissible: boolean;
2547
+ snoozable: boolean;
2548
+ share_page_url_or_path: string;
2549
+ copilot_suggest: boolean;
2550
+ show_in_spotlight_search: boolean;
2551
+ show_in_helphub_search: boolean;
2552
+ copilot_cta_label: string;
2553
+ copilot_description: string;
2554
+ is_scheduled: boolean;
2555
+ scheduled_start_time: string | null | undefined;
2556
+ scheduled_end_time: string | null | undefined;
2557
+ snooze_label: string;
2558
+ type: "announcement" | "product_tour" | "survey" | null;
2559
+ editor_tags: string[];
2560
+ preview_url: string | null | undefined;
2561
+ custom_theme: string | null | undefined;
47
2562
  };
48
2563
  }[]>;
49
2564
  static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
@@ -53,7 +2568,366 @@ export declare class ExperienceTemplate {
53
2568
  id: number;
54
2569
  type: "announcement" | "product_tour" | "survey";
55
2570
  data: {
56
- [x: string]: any;
2571
+ slug: string;
2572
+ id: string | number;
2573
+ organization: string;
2574
+ show_expression: import("./helpers/rules").RuleExpression;
2575
+ trigger: {
2576
+ type: "when_conditions_pass";
2577
+ } | {
2578
+ type: "when_page_reached";
2579
+ meta: {
2580
+ url: string;
2581
+ };
2582
+ } | {
2583
+ type: "on_command_execution";
2584
+ meta: {
2585
+ command: string;
2586
+ };
2587
+ } | {
2588
+ type: "on_event";
2589
+ meta: {
2590
+ event: string;
2591
+ condition_group: import("./helpers/rules").RuleExpression | null | undefined;
2592
+ };
2593
+ } | {
2594
+ type: "when_element_appears";
2595
+ meta: {
2596
+ selector: string;
2597
+ };
2598
+ } | {
2599
+ type: "on_user_confusion";
2600
+ } | {
2601
+ type: "on_rage_click";
2602
+ } | {
2603
+ type: "smart_delay";
2604
+ } | {
2605
+ type: "after_time";
2606
+ meta: {
2607
+ unit: "minute" | "second";
2608
+ value: number;
2609
+ };
2610
+ } | {
2611
+ type: "when_share_link_viewed";
2612
+ } | {
2613
+ type: "scheduled";
2614
+ meta: {
2615
+ interval: "day" | "month" | "week";
2616
+ value: number;
2617
+ };
2618
+ };
2619
+ frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
2620
+ steps: ({
2621
+ id: number;
2622
+ title: string;
2623
+ content: ({
2624
+ type: "markdown";
2625
+ sort_key: number | undefined;
2626
+ meta: {
2627
+ value: string;
2628
+ };
2629
+ } | {
2630
+ type: "image";
2631
+ sort_key: number | undefined;
2632
+ meta: {
2633
+ src: string;
2634
+ file_name: string;
2635
+ size: string;
2636
+ };
2637
+ } | {
2638
+ type: "video";
2639
+ sort_key: number | undefined;
2640
+ meta: {
2641
+ type: "url";
2642
+ src: string;
2643
+ } | {
2644
+ type: "command";
2645
+ command: string;
2646
+ };
2647
+ } | {
2648
+ type: "help_doc_command";
2649
+ sort_key: number | undefined;
2650
+ meta: {
2651
+ command: string;
2652
+ };
2653
+ } | {
2654
+ type: "button";
2655
+ sort_key: number | undefined;
2656
+ meta: {
2657
+ label?: string | undefined;
2658
+ action?: {
2659
+ type: "execute_command";
2660
+ meta: {
2661
+ command: string;
2662
+ } & {
2663
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
2664
+ };
2665
+ } | {
2666
+ type: "no_action";
2667
+ } | {
2668
+ type: "click";
2669
+ value: string;
2670
+ } | {
2671
+ type: "click" | "clickBySelector" | "clickByXpath";
2672
+ value: string[];
2673
+ } | ({
2674
+ type: "link";
2675
+ value: string;
2676
+ } & {
2677
+ operation?: "self" | "router" | "blank" | undefined;
2678
+ }) | {
2679
+ type: "open_chat";
2680
+ meta: {
2681
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
2682
+ };
2683
+ } | {
2684
+ type: "dismiss";
2685
+ } | {
2686
+ type: "snooze";
2687
+ } | {
2688
+ type: "questlist";
2689
+ value: number;
2690
+ } | {
2691
+ type: "step_back";
2692
+ } | {
2693
+ type: "nudge";
2694
+ value: number;
2695
+ } | {
2696
+ type: "go_to_step";
2697
+ value: number;
2698
+ } | ({
2699
+ type: "open_bar";
2700
+ } & {
2701
+ value?: string | undefined;
2702
+ categoryFilter?: number | undefined;
2703
+ }) | {
2704
+ type: "open_helphub";
2705
+ } | {
2706
+ type: "open_copilot";
2707
+ } | undefined;
2708
+ button_type?: "snooze" | "primary" | "secondary" | undefined;
2709
+ conditional_actions?: {
2710
+ operator: "eq" | "neq" | "gt" | "lt";
2711
+ operand: string | number;
2712
+ action: {
2713
+ type: "execute_command";
2714
+ meta: {
2715
+ command: string;
2716
+ } & {
2717
+ type?: "link" | "video" | "action" | "helpdoc" | undefined;
2718
+ };
2719
+ } | {
2720
+ type: "no_action";
2721
+ } | {
2722
+ type: "click";
2723
+ value: string;
2724
+ } | {
2725
+ type: "click" | "clickBySelector" | "clickByXpath";
2726
+ value: string[];
2727
+ } | ({
2728
+ type: "link";
2729
+ value: string;
2730
+ } & {
2731
+ operation?: "self" | "router" | "blank" | undefined;
2732
+ }) | {
2733
+ type: "open_chat";
2734
+ meta: {
2735
+ type: "" | "intercom" | "helpscout" | "freshdesk" | "freshchat" | "crisp" | "zendesk" | "liveChat" | "gist" | "olark" | "hubspot" | "drift" | "zendesk_handoff";
2736
+ };
2737
+ } | {
2738
+ type: "dismiss";
2739
+ } | {
2740
+ type: "snooze";
2741
+ } | {
2742
+ type: "questlist";
2743
+ value: number;
2744
+ } | {
2745
+ type: "step_back";
2746
+ } | {
2747
+ type: "nudge";
2748
+ value: number;
2749
+ } | {
2750
+ type: "go_to_step";
2751
+ value: number;
2752
+ } | ({
2753
+ type: "open_bar";
2754
+ } & {
2755
+ value?: string | undefined;
2756
+ categoryFilter?: number | undefined;
2757
+ }) | {
2758
+ type: "open_helphub";
2759
+ } | {
2760
+ type: "open_copilot";
2761
+ };
2762
+ }[] | undefined;
2763
+ } | null;
2764
+ } | {
2765
+ type: "survey_text";
2766
+ meta: {
2767
+ prompt: string;
2768
+ } & {
2769
+ validation?: {
2770
+ required?: {
2771
+ value: true;
2772
+ message: string;
2773
+ } | {
2774
+ value: false;
2775
+ message: null;
2776
+ } | undefined;
2777
+ } | undefined;
2778
+ };
2779
+ sort_key: number | undefined;
2780
+ } | {
2781
+ type: "survey_text_short";
2782
+ meta: {
2783
+ prompt: string;
2784
+ } & {
2785
+ validation?: {
2786
+ required?: {
2787
+ value: true;
2788
+ message: string;
2789
+ } | {
2790
+ value: false;
2791
+ message: null;
2792
+ } | undefined;
2793
+ } | undefined;
2794
+ };
2795
+ sort_key: number | undefined;
2796
+ } | {
2797
+ type: "survey_rating";
2798
+ sort_key: number | undefined;
2799
+ meta: ({
2800
+ type: "emojis";
2801
+ lower_label: string;
2802
+ upper_label: string;
2803
+ options: number;
2804
+ emojis: string[];
2805
+ } | {
2806
+ type: "numbers";
2807
+ lower_label: string;
2808
+ upper_label: string;
2809
+ options: number;
2810
+ } | {
2811
+ type: "stars";
2812
+ lower_label: string;
2813
+ upper_label: string;
2814
+ options: number;
2815
+ } | {
2816
+ type: "nps";
2817
+ lower_label: string;
2818
+ upper_label: string;
2819
+ options: number;
2820
+ }) & {
2821
+ validation?: {
2822
+ required?: {
2823
+ value: true;
2824
+ message: string;
2825
+ } | {
2826
+ value: false;
2827
+ message: null;
2828
+ } | undefined;
2829
+ } | undefined;
2830
+ };
2831
+ } | {
2832
+ type: "survey_list";
2833
+ sort_key: number | undefined;
2834
+ meta: {
2835
+ options: string[];
2836
+ list_type: "multiple" | "single";
2837
+ display_type: "grid" | "list" | "dropdown";
2838
+ } & {
2839
+ validation?: {
2840
+ required?: {
2841
+ value: true;
2842
+ message: string;
2843
+ } | {
2844
+ value: false;
2845
+ message: null;
2846
+ } | undefined;
2847
+ } | undefined;
2848
+ };
2849
+ })[];
2850
+ is_live: boolean;
2851
+ preview_url: string | null | undefined;
2852
+ } & {
2853
+ form_factor: {
2854
+ type: "modal";
2855
+ } | {
2856
+ type: "popover";
2857
+ position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
2858
+ } | ({
2859
+ type: "pin";
2860
+ anchor: string;
2861
+ } & {
2862
+ is_open_by_default?: boolean | undefined;
2863
+ is_showing_mask?: boolean | undefined;
2864
+ advance_trigger?: string | undefined;
2865
+ offset?: {
2866
+ x: string;
2867
+ y: string;
2868
+ } | undefined;
2869
+ }) | {
2870
+ type: "tooltip";
2871
+ anchor: string;
2872
+ show_on: "click" | "hover";
2873
+ marker: ({
2874
+ type: "beacon";
2875
+ } | {
2876
+ type: "icon";
2877
+ icon: "helpCircle" | "helpSquare" | "infoCircle" | "bookClosed" | "lightBulb" | "lightning";
2878
+ } | {
2879
+ type: "image";
2880
+ source: string;
2881
+ }) & {
2882
+ positioning: {
2883
+ position: "left" | "right" | "inline_left" | "inline_right";
2884
+ offset: {
2885
+ x: string;
2886
+ y: string;
2887
+ };
2888
+ };
2889
+ };
2890
+ };
2891
+ } & {
2892
+ has_survey_response?: boolean | undefined;
2893
+ })[];
2894
+ is_live: boolean;
2895
+ } & {
2896
+ old_nudge_id?: number | null | undefined;
2897
+ archived?: boolean | undefined;
2898
+ audience?: {
2899
+ type: "all_users";
2900
+ } | {
2901
+ type: "rule_expression";
2902
+ expression: import("./helpers/rules").RuleExpression;
2903
+ } | {
2904
+ type: "named_rule_reference";
2905
+ rule_reference: {
2906
+ type: "named_rule";
2907
+ rule_id: string | number;
2908
+ } & {
2909
+ reason?: string | undefined;
2910
+ };
2911
+ } | null | undefined;
2912
+ } & {
2913
+ template_source: string;
2914
+ show_step_counter: boolean;
2915
+ dismissible: boolean;
2916
+ snoozable: boolean;
2917
+ share_page_url_or_path: string;
2918
+ copilot_suggest: boolean;
2919
+ show_in_spotlight_search: boolean;
2920
+ show_in_helphub_search: boolean;
2921
+ copilot_cta_label: string;
2922
+ copilot_description: string;
2923
+ is_scheduled: boolean;
2924
+ scheduled_start_time: string | null | undefined;
2925
+ scheduled_end_time: string | null | undefined;
2926
+ snooze_label: string;
2927
+ type: "announcement" | "product_tour" | "survey" | null;
2928
+ editor_tags: string[];
2929
+ preview_url: string | null | undefined;
2930
+ custom_theme: string | null | undefined;
57
2931
  };
58
2932
  }>;
59
2933
  }