commandbar 1.8.5 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- package/build/commandbar-js/src/index.js +1 -1
- package/build/internal/src/client/AddContextOptions.d.ts +141 -0
- package/build/internal/src/client/AnalyticsEventTypes.d.ts +1 -0
- package/build/internal/src/client/CommandBarClientSDK.d.ts +403 -0
- package/build/internal/src/client/CommandBarProxySDK.d.ts +49 -0
- package/build/internal/src/client/CommandBarSDK.d.ts +79 -0
- package/build/internal/src/client/EventHandler.d.ts +282 -0
- package/build/internal/src/client/OrgConfig.d.ts +5 -0
- package/build/internal/src/client/SDKConfig.d.ts +13 -0
- package/build/internal/src/client/SentryReporter.d.ts +63 -0
- package/build/internal/src/client/globals.d.ts +20 -0
- package/build/internal/src/client/proxy.d.ts +15 -0
- package/build/internal/src/client/symbols.d.ts +50 -0
- package/build/internal/src/middleware/CommandFromClientV.d.ts +283 -0
- package/build/internal/src/middleware/ICommandFromClientType.d.ts +5 -0
- package/build/internal/src/middleware/IResourceSettings.d.ts +3 -0
- package/build/internal/src/middleware/OrganizationV.d.ts +329 -0
- package/build/internal/src/middleware/ResourceSettingsV.d.ts +119 -0
- package/build/internal/src/middleware/additionalResource.d.ts +302 -0
- package/build/internal/src/middleware/billing.d.ts +41 -0
- package/build/internal/src/middleware/chatAnalytics.d.ts +2601 -0
- package/build/internal/src/middleware/checklist.d.ts +1014 -0
- package/build/internal/src/middleware/command.d.ts +8908 -0
- package/build/internal/src/middleware/commandCategory.d.ts +192 -0
- package/build/internal/src/middleware/confetti.d.ts +16 -0
- package/build/internal/src/middleware/context.d.ts +40 -0
- package/build/internal/src/middleware/dashboardFlags.d.ts +9 -0
- package/build/internal/src/middleware/detailPreview.d.ts +24 -0
- package/build/internal/src/middleware/environment.d.ts +11 -0
- package/build/internal/src/middleware/generics.d.ts +42 -0
- package/build/internal/src/middleware/guide.d.ts +37 -0
- package/build/internal/src/middleware/helpDocsIntegration.d.ts +72 -0
- package/build/internal/src/middleware/helpDocsSync.d.ts +63 -0
- package/build/internal/src/middleware/helpers/actions.d.ts +184 -0
- package/build/internal/src/middleware/helpers/argument.d.ts +318 -0
- package/build/internal/src/middleware/helpers/audience.d.ts +15 -0
- package/build/internal/src/middleware/helpers/commandTemplate.d.ts +252 -0
- package/build/internal/src/middleware/helpers/endUser.d.ts +11 -0
- package/build/internal/src/middleware/helpers/frequencyLimit.d.ts +2 -0
- package/build/internal/src/middleware/helpers/goals.d.ts +26 -0
- package/build/internal/src/middleware/helpers/optionGroup.d.ts +2 -0
- package/build/internal/src/middleware/helpers/pushTrigger.d.ts +26 -0
- package/build/internal/src/middleware/helpers/rules.d.ts +289 -0
- package/build/internal/src/middleware/helpers/tags.d.ts +7 -0
- package/build/internal/src/middleware/historyEvent.d.ts +21 -0
- package/build/internal/src/middleware/network.d.ts +3 -0
- package/build/internal/src/middleware/nudge.d.ts +1669 -0
- package/build/internal/src/middleware/organization.d.ts +1540 -0
- package/build/internal/src/middleware/organizationSettings.d.ts +330 -0
- package/build/internal/src/middleware/placeholder.d.ts +47 -0
- package/build/internal/src/middleware/profile.d.ts +11 -0
- package/build/internal/src/middleware/qaPair.d.ts +676 -0
- package/build/internal/src/middleware/recommendationSet.d.ts +1199 -0
- package/build/internal/src/middleware/releases.d.ts +261 -0
- package/build/internal/src/middleware/skin.d.ts +102 -0
- package/build/internal/src/middleware/tab.d.ts +27 -0
- package/build/internal/src/middleware/types.d.ts +218 -0
- package/build/internal/src/middleware/user.d.ts +15 -0
- package/build/internal/src/middleware/utils.d.ts +11 -0
- package/build/internal/src/util/Disposable.d.ts +17 -0
- package/build/internal/src/util/LocalStorage.d.ts +6 -0
- package/build/internal/src/util/Logger.d.ts +18 -0
- package/build/internal/src/util/dispatchCustomEvent.d.ts +12 -0
- package/build/internal/src/util/integrations.d.ts +1 -0
- package/package.json +3 -3
- package/jest.config.js +0 -4
- package/scripts/minify-snippet.ts +0 -36
- package/scripts/watch.ts +0 -5
- package/src/commandbar-launcher.d.ts +0 -7
- package/test/init.test.ts +0 -3
- package/tsconfig.json +0 -24
- package/webpack.config.js +0 -35
@@ -0,0 +1,1669 @@
|
|
1
|
+
import * as t from 'io-ts';
|
2
|
+
export declare const NudgeContentMarkdownBlockV: t.TypeC<{
|
3
|
+
type: t.LiteralC<"markdown">;
|
4
|
+
meta: t.TypeC<{
|
5
|
+
value: t.StringC;
|
6
|
+
}>;
|
7
|
+
}>;
|
8
|
+
export declare const NudgeContentImageBlockV: t.TypeC<{
|
9
|
+
type: t.LiteralC<"image">;
|
10
|
+
meta: t.TypeC<{
|
11
|
+
src: t.StringC;
|
12
|
+
file_name: t.StringC;
|
13
|
+
size: t.StringC;
|
14
|
+
}>;
|
15
|
+
}>;
|
16
|
+
export declare const NudgeContentVideoBlockV: t.TypeC<{
|
17
|
+
type: t.LiteralC<"video">;
|
18
|
+
meta: t.UnionC<[t.TypeC<{
|
19
|
+
type: t.LiteralC<"url">;
|
20
|
+
src: t.StringC;
|
21
|
+
}>, t.TypeC<{
|
22
|
+
type: t.LiteralC<"command">;
|
23
|
+
command: t.StringC;
|
24
|
+
}>]>;
|
25
|
+
}>;
|
26
|
+
export declare const NudgeContentHelpDocBlockV: t.TypeC<{
|
27
|
+
type: t.LiteralC<"help_doc_command">;
|
28
|
+
meta: t.TypeC<{
|
29
|
+
command: t.StringC;
|
30
|
+
}>;
|
31
|
+
}>;
|
32
|
+
export declare const NudgeContentButtonBlockV: t.TypeC<{
|
33
|
+
type: t.LiteralC<"button">;
|
34
|
+
meta: t.UnionC<[t.PartialC<{
|
35
|
+
label: t.StringC;
|
36
|
+
action: t.UnionC<[t.TypeC<{
|
37
|
+
type: t.LiteralC<"execute_command">;
|
38
|
+
meta: t.TypeC<{
|
39
|
+
command: t.StringC;
|
40
|
+
}>;
|
41
|
+
}>, t.TypeC<{
|
42
|
+
type: t.LiteralC<"no_action">;
|
43
|
+
}>, t.TypeC<{
|
44
|
+
type: t.LiteralC<"click">;
|
45
|
+
value: t.StringC;
|
46
|
+
}>, t.IntersectionC<[t.TypeC<{
|
47
|
+
type: t.LiteralC<"link">;
|
48
|
+
value: t.StringC;
|
49
|
+
}>, t.PartialC<{
|
50
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
51
|
+
}>]>, t.TypeC<{
|
52
|
+
type: t.LiteralC<"open_chat">;
|
53
|
+
meta: t.TypeC<{
|
54
|
+
type: t.StringC;
|
55
|
+
}>;
|
56
|
+
}>, t.TypeC<{
|
57
|
+
type: t.LiteralC<"dismiss">;
|
58
|
+
}>]>;
|
59
|
+
button_type: t.UnionC<[t.LiteralC<"primary">, t.LiteralC<"secondary">]>;
|
60
|
+
}>, t.NullC]>;
|
61
|
+
}>;
|
62
|
+
export declare const NudgeContentSurveyTextBlockV: t.TypeC<{
|
63
|
+
type: t.LiteralC<"survey_text">;
|
64
|
+
meta: t.TypeC<{
|
65
|
+
prompt: t.StringC;
|
66
|
+
}>;
|
67
|
+
}>;
|
68
|
+
export declare const NudgeContentSurveyRatingBlockV: t.TypeC<{
|
69
|
+
type: t.LiteralC<"survey_rating">;
|
70
|
+
meta: t.UnionC<[t.TypeC<{
|
71
|
+
type: t.LiteralC<"emojis">;
|
72
|
+
lower_label: t.StringC;
|
73
|
+
upper_label: t.StringC;
|
74
|
+
options: t.NumberC;
|
75
|
+
emojis: t.ArrayC<t.StringC>;
|
76
|
+
}>, t.TypeC<{
|
77
|
+
type: t.LiteralC<"numbers">;
|
78
|
+
lower_label: t.StringC;
|
79
|
+
upper_label: t.StringC;
|
80
|
+
options: t.NumberC;
|
81
|
+
}>, t.TypeC<{
|
82
|
+
type: t.LiteralC<"stars">;
|
83
|
+
lower_label: t.StringC;
|
84
|
+
upper_label: t.StringC;
|
85
|
+
options: t.NumberC;
|
86
|
+
}>]>;
|
87
|
+
}>;
|
88
|
+
export declare const NudgeContentBlockV: t.UnionC<[t.TypeC<{
|
89
|
+
type: t.LiteralC<"markdown">;
|
90
|
+
meta: t.TypeC<{
|
91
|
+
value: t.StringC;
|
92
|
+
}>;
|
93
|
+
}>, t.TypeC<{
|
94
|
+
type: t.LiteralC<"image">;
|
95
|
+
meta: t.TypeC<{
|
96
|
+
src: t.StringC;
|
97
|
+
file_name: t.StringC;
|
98
|
+
size: t.StringC;
|
99
|
+
}>;
|
100
|
+
}>, t.TypeC<{
|
101
|
+
type: t.LiteralC<"video">;
|
102
|
+
meta: t.UnionC<[t.TypeC<{
|
103
|
+
type: t.LiteralC<"url">;
|
104
|
+
src: t.StringC;
|
105
|
+
}>, t.TypeC<{
|
106
|
+
type: t.LiteralC<"command">;
|
107
|
+
command: t.StringC;
|
108
|
+
}>]>;
|
109
|
+
}>, t.TypeC<{
|
110
|
+
type: t.LiteralC<"help_doc_command">;
|
111
|
+
meta: t.TypeC<{
|
112
|
+
command: t.StringC;
|
113
|
+
}>;
|
114
|
+
}>, t.TypeC<{
|
115
|
+
type: t.LiteralC<"button">;
|
116
|
+
meta: t.UnionC<[t.PartialC<{
|
117
|
+
label: t.StringC;
|
118
|
+
action: t.UnionC<[t.TypeC<{
|
119
|
+
type: t.LiteralC<"execute_command">;
|
120
|
+
meta: t.TypeC<{
|
121
|
+
command: t.StringC;
|
122
|
+
}>;
|
123
|
+
}>, t.TypeC<{
|
124
|
+
type: t.LiteralC<"no_action">;
|
125
|
+
}>, t.TypeC<{
|
126
|
+
type: t.LiteralC<"click">;
|
127
|
+
value: t.StringC;
|
128
|
+
}>, t.IntersectionC<[t.TypeC<{
|
129
|
+
type: t.LiteralC<"link">;
|
130
|
+
value: t.StringC;
|
131
|
+
}>, t.PartialC<{
|
132
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
133
|
+
}>]>, t.TypeC<{
|
134
|
+
type: t.LiteralC<"open_chat">;
|
135
|
+
meta: t.TypeC<{
|
136
|
+
type: t.StringC;
|
137
|
+
}>;
|
138
|
+
}>, t.TypeC<{
|
139
|
+
type: t.LiteralC<"dismiss">;
|
140
|
+
}>]>;
|
141
|
+
button_type: t.UnionC<[t.LiteralC<"primary">, t.LiteralC<"secondary">]>;
|
142
|
+
}>, t.NullC]>;
|
143
|
+
}>, t.TypeC<{
|
144
|
+
type: t.LiteralC<"survey_text">;
|
145
|
+
meta: t.TypeC<{
|
146
|
+
prompt: t.StringC;
|
147
|
+
}>;
|
148
|
+
}>, t.TypeC<{
|
149
|
+
type: t.LiteralC<"survey_rating">;
|
150
|
+
meta: t.UnionC<[t.TypeC<{
|
151
|
+
type: t.LiteralC<"emojis">;
|
152
|
+
lower_label: t.StringC;
|
153
|
+
upper_label: t.StringC;
|
154
|
+
options: t.NumberC;
|
155
|
+
emojis: t.ArrayC<t.StringC>;
|
156
|
+
}>, t.TypeC<{
|
157
|
+
type: t.LiteralC<"numbers">;
|
158
|
+
lower_label: t.StringC;
|
159
|
+
upper_label: t.StringC;
|
160
|
+
options: t.NumberC;
|
161
|
+
}>, t.TypeC<{
|
162
|
+
type: t.LiteralC<"stars">;
|
163
|
+
lower_label: t.StringC;
|
164
|
+
upper_label: t.StringC;
|
165
|
+
options: t.NumberC;
|
166
|
+
}>]>;
|
167
|
+
}>]>;
|
168
|
+
export declare const NudgeStepV: t.IntersectionC<[t.TypeC<{
|
169
|
+
id: t.NumberC;
|
170
|
+
title: t.StringC;
|
171
|
+
content: t.ArrayC<t.UnionC<[t.TypeC<{
|
172
|
+
type: t.LiteralC<"markdown">;
|
173
|
+
meta: t.TypeC<{
|
174
|
+
value: t.StringC;
|
175
|
+
}>;
|
176
|
+
}>, t.TypeC<{
|
177
|
+
type: t.LiteralC<"image">;
|
178
|
+
meta: t.TypeC<{
|
179
|
+
src: t.StringC;
|
180
|
+
file_name: t.StringC;
|
181
|
+
size: t.StringC;
|
182
|
+
}>;
|
183
|
+
}>, t.TypeC<{
|
184
|
+
type: t.LiteralC<"video">;
|
185
|
+
meta: t.UnionC<[t.TypeC<{
|
186
|
+
type: t.LiteralC<"url">;
|
187
|
+
src: t.StringC;
|
188
|
+
}>, t.TypeC<{
|
189
|
+
type: t.LiteralC<"command">;
|
190
|
+
command: t.StringC;
|
191
|
+
}>]>;
|
192
|
+
}>, t.TypeC<{
|
193
|
+
type: t.LiteralC<"help_doc_command">;
|
194
|
+
meta: t.TypeC<{
|
195
|
+
command: t.StringC;
|
196
|
+
}>;
|
197
|
+
}>, t.TypeC<{
|
198
|
+
type: t.LiteralC<"button">;
|
199
|
+
meta: t.UnionC<[t.PartialC<{
|
200
|
+
label: t.StringC;
|
201
|
+
action: t.UnionC<[t.TypeC<{
|
202
|
+
type: t.LiteralC<"execute_command">;
|
203
|
+
meta: t.TypeC<{
|
204
|
+
command: t.StringC;
|
205
|
+
}>;
|
206
|
+
}>, t.TypeC<{
|
207
|
+
type: t.LiteralC<"no_action">;
|
208
|
+
}>, t.TypeC<{
|
209
|
+
type: t.LiteralC<"click">;
|
210
|
+
value: t.StringC;
|
211
|
+
}>, t.IntersectionC<[t.TypeC<{
|
212
|
+
type: t.LiteralC<"link">;
|
213
|
+
value: t.StringC;
|
214
|
+
}>, t.PartialC<{
|
215
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
216
|
+
}>]>, t.TypeC<{
|
217
|
+
type: t.LiteralC<"open_chat">;
|
218
|
+
meta: t.TypeC<{
|
219
|
+
type: t.StringC;
|
220
|
+
}>;
|
221
|
+
}>, t.TypeC<{
|
222
|
+
type: t.LiteralC<"dismiss">;
|
223
|
+
}>]>;
|
224
|
+
button_type: t.UnionC<[t.LiteralC<"primary">, t.LiteralC<"secondary">]>;
|
225
|
+
}>, t.NullC]>;
|
226
|
+
}>, t.TypeC<{
|
227
|
+
type: t.LiteralC<"survey_text">;
|
228
|
+
meta: t.TypeC<{
|
229
|
+
prompt: t.StringC;
|
230
|
+
}>;
|
231
|
+
}>, t.TypeC<{
|
232
|
+
type: t.LiteralC<"survey_rating">;
|
233
|
+
meta: t.UnionC<[t.TypeC<{
|
234
|
+
type: t.LiteralC<"emojis">;
|
235
|
+
lower_label: t.StringC;
|
236
|
+
upper_label: t.StringC;
|
237
|
+
options: t.NumberC;
|
238
|
+
emojis: t.ArrayC<t.StringC>;
|
239
|
+
}>, t.TypeC<{
|
240
|
+
type: t.LiteralC<"numbers">;
|
241
|
+
lower_label: t.StringC;
|
242
|
+
upper_label: t.StringC;
|
243
|
+
options: t.NumberC;
|
244
|
+
}>, t.TypeC<{
|
245
|
+
type: t.LiteralC<"stars">;
|
246
|
+
lower_label: t.StringC;
|
247
|
+
upper_label: t.StringC;
|
248
|
+
options: t.NumberC;
|
249
|
+
}>]>;
|
250
|
+
}>]>>;
|
251
|
+
is_live: t.BooleanC;
|
252
|
+
}>, t.IntersectionC<[t.TypeC<{
|
253
|
+
form_factor: t.UnionC<[t.TypeC<{
|
254
|
+
type: t.LiteralC<"modal">;
|
255
|
+
}>, t.TypeC<{
|
256
|
+
type: t.LiteralC<"popover">;
|
257
|
+
position: t.UnionC<[t.LiteralC<"top-left">, t.LiteralC<"top-right">, t.LiteralC<"bottom-right">, t.LiteralC<"bottom-left">, t.LiteralC<"center">]>;
|
258
|
+
}>, t.IntersectionC<[t.TypeC<{
|
259
|
+
type: t.LiteralC<"pin">;
|
260
|
+
anchor: t.StringC;
|
261
|
+
}>, t.PartialC<{
|
262
|
+
is_open_by_default: t.BooleanC;
|
263
|
+
offset: t.TypeC<{
|
264
|
+
x: t.StringC;
|
265
|
+
y: t.StringC;
|
266
|
+
}>;
|
267
|
+
}>]>]>;
|
268
|
+
}>, t.PartialC<{
|
269
|
+
has_survey_response: t.BooleanC;
|
270
|
+
}>]>]>;
|
271
|
+
export declare const NudgeV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
272
|
+
slug: t.StringC;
|
273
|
+
id: t.UnionC<[t.NumberC, t.StringC]>;
|
274
|
+
organization: t.StringC;
|
275
|
+
show_expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
|
276
|
+
trigger: t.UnionC<[t.TypeC<{
|
277
|
+
type: t.LiteralC<"when_conditions_pass">;
|
278
|
+
}>, t.TypeC<{
|
279
|
+
type: t.LiteralC<"when_page_reached">;
|
280
|
+
meta: t.TypeC<{
|
281
|
+
url: t.StringC;
|
282
|
+
}>;
|
283
|
+
}>, t.TypeC<{
|
284
|
+
type: t.LiteralC<"on_command_execution">;
|
285
|
+
meta: t.TypeC<{
|
286
|
+
command: t.StringC;
|
287
|
+
}>;
|
288
|
+
}>, t.TypeC<{
|
289
|
+
type: t.LiteralC<"on_event">;
|
290
|
+
meta: t.TypeC<{
|
291
|
+
event: t.StringC;
|
292
|
+
}>;
|
293
|
+
}>, t.TypeC<{
|
294
|
+
type: t.LiteralC<"when_element_appears">;
|
295
|
+
meta: t.TypeC<{
|
296
|
+
selector: t.StringC;
|
297
|
+
}>;
|
298
|
+
}>, t.TypeC<{
|
299
|
+
type: t.LiteralC<"when_share_link_viewed">;
|
300
|
+
}>]>;
|
301
|
+
frequency_limit: t.UnionC<[t.LiteralC<"no_limit">, t.LiteralC<"once_per_session">, t.LiteralC<"once_per_user">, t.LiteralC<"until_interaction">]>;
|
302
|
+
steps: t.ArrayC<t.IntersectionC<[t.TypeC<{
|
303
|
+
id: t.NumberC;
|
304
|
+
title: t.StringC;
|
305
|
+
content: t.ArrayC<t.UnionC<[t.TypeC<{
|
306
|
+
type: t.LiteralC<"markdown">;
|
307
|
+
meta: t.TypeC<{
|
308
|
+
value: t.StringC;
|
309
|
+
}>;
|
310
|
+
}>, t.TypeC<{
|
311
|
+
type: t.LiteralC<"image">;
|
312
|
+
meta: t.TypeC<{
|
313
|
+
src: t.StringC;
|
314
|
+
file_name: t.StringC;
|
315
|
+
size: t.StringC;
|
316
|
+
}>;
|
317
|
+
}>, t.TypeC<{
|
318
|
+
type: t.LiteralC<"video">;
|
319
|
+
meta: t.UnionC<[t.TypeC<{
|
320
|
+
type: t.LiteralC<"url">;
|
321
|
+
src: t.StringC;
|
322
|
+
}>, t.TypeC<{
|
323
|
+
type: t.LiteralC<"command">;
|
324
|
+
command: t.StringC;
|
325
|
+
}>]>;
|
326
|
+
}>, t.TypeC<{
|
327
|
+
type: t.LiteralC<"help_doc_command">;
|
328
|
+
meta: t.TypeC<{
|
329
|
+
command: t.StringC;
|
330
|
+
}>;
|
331
|
+
}>, t.TypeC<{
|
332
|
+
type: t.LiteralC<"button">;
|
333
|
+
meta: t.UnionC<[t.PartialC<{
|
334
|
+
label: t.StringC;
|
335
|
+
action: t.UnionC<[t.TypeC<{
|
336
|
+
type: t.LiteralC<"execute_command">;
|
337
|
+
meta: t.TypeC<{
|
338
|
+
command: t.StringC;
|
339
|
+
}>;
|
340
|
+
}>, t.TypeC<{
|
341
|
+
type: t.LiteralC<"no_action">;
|
342
|
+
}>, t.TypeC<{
|
343
|
+
type: t.LiteralC<"click">;
|
344
|
+
value: t.StringC;
|
345
|
+
}>, t.IntersectionC<[t.TypeC<{
|
346
|
+
type: t.LiteralC<"link">;
|
347
|
+
value: t.StringC;
|
348
|
+
}>, t.PartialC<{
|
349
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
350
|
+
}>]>, t.TypeC<{
|
351
|
+
type: t.LiteralC<"open_chat">;
|
352
|
+
meta: t.TypeC<{
|
353
|
+
type: t.StringC;
|
354
|
+
}>;
|
355
|
+
}>, t.TypeC<{
|
356
|
+
type: t.LiteralC<"dismiss">;
|
357
|
+
}>]>;
|
358
|
+
button_type: t.UnionC<[t.LiteralC<"primary">, t.LiteralC<"secondary">]>;
|
359
|
+
}>, t.NullC]>;
|
360
|
+
}>, t.TypeC<{
|
361
|
+
type: t.LiteralC<"survey_text">;
|
362
|
+
meta: t.TypeC<{
|
363
|
+
prompt: t.StringC;
|
364
|
+
}>;
|
365
|
+
}>, t.TypeC<{
|
366
|
+
type: t.LiteralC<"survey_rating">;
|
367
|
+
meta: t.UnionC<[t.TypeC<{
|
368
|
+
type: t.LiteralC<"emojis">;
|
369
|
+
lower_label: t.StringC;
|
370
|
+
upper_label: t.StringC;
|
371
|
+
options: t.NumberC;
|
372
|
+
emojis: t.ArrayC<t.StringC>;
|
373
|
+
}>, t.TypeC<{
|
374
|
+
type: t.LiteralC<"numbers">;
|
375
|
+
lower_label: t.StringC;
|
376
|
+
upper_label: t.StringC;
|
377
|
+
options: t.NumberC;
|
378
|
+
}>, t.TypeC<{
|
379
|
+
type: t.LiteralC<"stars">;
|
380
|
+
lower_label: t.StringC;
|
381
|
+
upper_label: t.StringC;
|
382
|
+
options: t.NumberC;
|
383
|
+
}>]>;
|
384
|
+
}>]>>;
|
385
|
+
is_live: t.BooleanC;
|
386
|
+
}>, t.IntersectionC<[t.TypeC<{
|
387
|
+
form_factor: t.UnionC<[t.TypeC<{
|
388
|
+
type: t.LiteralC<"modal">;
|
389
|
+
}>, t.TypeC<{
|
390
|
+
type: t.LiteralC<"popover">;
|
391
|
+
position: t.UnionC<[t.LiteralC<"top-left">, t.LiteralC<"top-right">, t.LiteralC<"bottom-right">, t.LiteralC<"bottom-left">, t.LiteralC<"center">]>;
|
392
|
+
}>, t.IntersectionC<[t.TypeC<{
|
393
|
+
type: t.LiteralC<"pin">;
|
394
|
+
anchor: t.StringC;
|
395
|
+
}>, t.PartialC<{
|
396
|
+
is_open_by_default: t.BooleanC;
|
397
|
+
offset: t.TypeC<{
|
398
|
+
x: t.StringC;
|
399
|
+
y: t.StringC;
|
400
|
+
}>;
|
401
|
+
}>]>]>;
|
402
|
+
}>, t.PartialC<{
|
403
|
+
has_survey_response: t.BooleanC;
|
404
|
+
}>]>]>>;
|
405
|
+
is_live: t.BooleanC;
|
406
|
+
}>, t.PartialC<{
|
407
|
+
old_nudge_id: t.UnionC<[t.NumberC, t.NullC]>;
|
408
|
+
archived: t.BooleanC;
|
409
|
+
audience: t.UnionC<[t.UnionC<[t.TypeC<{
|
410
|
+
type: t.LiteralC<"all_users">;
|
411
|
+
}>, t.TypeC<{
|
412
|
+
type: t.LiteralC<"rule_expression">;
|
413
|
+
expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
|
414
|
+
}>, t.TypeC<{
|
415
|
+
type: t.LiteralC<"named_rule_reference">;
|
416
|
+
rule_reference: t.IntersectionC<[t.TypeC<{
|
417
|
+
type: t.LiteralC<"named_rule">;
|
418
|
+
rule_id: t.UnionC<[t.NumberC, t.StringC]>;
|
419
|
+
}>, t.PartialC<{
|
420
|
+
reason: t.StringC;
|
421
|
+
}>]>;
|
422
|
+
}>]>, t.NullC]>;
|
423
|
+
}>]>, t.TypeC<{
|
424
|
+
template_source: t.StringC;
|
425
|
+
show_step_counter: t.BooleanC;
|
426
|
+
dismissible: t.BooleanC;
|
427
|
+
share_page_url: t.StringC;
|
428
|
+
}>]>;
|
429
|
+
export declare const OldNudgeBaseV: t.IntersectionC<[t.TypeC<{
|
430
|
+
id: t.NumberC;
|
431
|
+
organization: t.StringC;
|
432
|
+
slug: t.StringC;
|
433
|
+
content: t.StringC;
|
434
|
+
show_expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
|
435
|
+
trigger: t.UnionC<[t.TypeC<{
|
436
|
+
type: t.LiteralC<"when_conditions_pass">;
|
437
|
+
}>, t.TypeC<{
|
438
|
+
type: t.LiteralC<"on_command_execution">;
|
439
|
+
meta: t.TypeC<{
|
440
|
+
command: t.StringC;
|
441
|
+
}>;
|
442
|
+
}>, t.TypeC<{
|
443
|
+
type: t.LiteralC<"on_event">;
|
444
|
+
meta: t.TypeC<{
|
445
|
+
event: t.StringC;
|
446
|
+
}>;
|
447
|
+
}>, t.TypeC<{
|
448
|
+
type: t.LiteralC<"when_share_link_viewed">;
|
449
|
+
}>]>;
|
450
|
+
on_select: t.UnionC<[t.TypeC<{
|
451
|
+
type: t.LiteralC<"no_action">;
|
452
|
+
}>, t.TypeC<{
|
453
|
+
type: t.LiteralC<"execute_command">;
|
454
|
+
meta: t.TypeC<{
|
455
|
+
command: t.StringC;
|
456
|
+
}>;
|
457
|
+
}>]>;
|
458
|
+
timeout_ms: t.UnionC<[t.NumberC, t.NullC]>;
|
459
|
+
frequency_limit: t.UnionC<[t.LiteralC<"no_limit">, t.LiteralC<"once_per_session">, t.LiteralC<"once_per_user">, t.LiteralC<"until_interaction">]>;
|
460
|
+
}>, t.PartialC<{
|
461
|
+
title: t.StringC;
|
462
|
+
html: t.StringC;
|
463
|
+
cta: t.StringC;
|
464
|
+
is_live: t.BooleanC;
|
465
|
+
media: t.UnionC<[t.TypeC<{
|
466
|
+
type: t.LiteralC<"image">;
|
467
|
+
meta: t.TypeC<{
|
468
|
+
src: t.StringC;
|
469
|
+
file_name: t.StringC;
|
470
|
+
size: t.StringC;
|
471
|
+
}>;
|
472
|
+
}>, t.TypeC<{
|
473
|
+
type: t.LiteralC<"help_doc_command">;
|
474
|
+
meta: t.TypeC<{
|
475
|
+
command: t.StringC;
|
476
|
+
}>;
|
477
|
+
}>, t.NullC]>;
|
478
|
+
is_html_override: t.BooleanC;
|
479
|
+
call_custom_handler: t.BooleanC;
|
480
|
+
}>]>;
|
481
|
+
export declare const OldNudgeAdditionalV: t.TypeC<{
|
482
|
+
form_factor: t.UnionC<[t.TypeC<{
|
483
|
+
type: t.LiteralC<"modal">;
|
484
|
+
}>, t.TypeC<{
|
485
|
+
type: t.LiteralC<"popover">;
|
486
|
+
position: t.UnionC<[t.LiteralC<"top-left">, t.LiteralC<"top-right">, t.LiteralC<"bottom-right">, t.LiteralC<"bottom-left">, t.LiteralC<"center">]>;
|
487
|
+
}>, t.TypeC<{
|
488
|
+
type: t.LiteralC<"pin">;
|
489
|
+
anchor: t.StringC;
|
490
|
+
}>]>;
|
491
|
+
template_source: t.StringC;
|
492
|
+
}>;
|
493
|
+
export declare const OldNudgeV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
494
|
+
id: t.NumberC;
|
495
|
+
organization: t.StringC;
|
496
|
+
slug: t.StringC;
|
497
|
+
content: t.StringC;
|
498
|
+
show_expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
|
499
|
+
trigger: t.UnionC<[t.TypeC<{
|
500
|
+
type: t.LiteralC<"when_conditions_pass">;
|
501
|
+
}>, t.TypeC<{
|
502
|
+
type: t.LiteralC<"on_command_execution">;
|
503
|
+
meta: t.TypeC<{
|
504
|
+
command: t.StringC;
|
505
|
+
}>;
|
506
|
+
}>, t.TypeC<{
|
507
|
+
type: t.LiteralC<"on_event">;
|
508
|
+
meta: t.TypeC<{
|
509
|
+
event: t.StringC;
|
510
|
+
}>;
|
511
|
+
}>, t.TypeC<{
|
512
|
+
type: t.LiteralC<"when_share_link_viewed">;
|
513
|
+
}>]>;
|
514
|
+
on_select: t.UnionC<[t.TypeC<{
|
515
|
+
type: t.LiteralC<"no_action">;
|
516
|
+
}>, t.TypeC<{
|
517
|
+
type: t.LiteralC<"execute_command">;
|
518
|
+
meta: t.TypeC<{
|
519
|
+
command: t.StringC;
|
520
|
+
}>;
|
521
|
+
}>]>;
|
522
|
+
timeout_ms: t.UnionC<[t.NumberC, t.NullC]>;
|
523
|
+
frequency_limit: t.UnionC<[t.LiteralC<"no_limit">, t.LiteralC<"once_per_session">, t.LiteralC<"once_per_user">, t.LiteralC<"until_interaction">]>;
|
524
|
+
}>, t.PartialC<{
|
525
|
+
title: t.StringC;
|
526
|
+
html: t.StringC;
|
527
|
+
cta: t.StringC;
|
528
|
+
is_live: t.BooleanC;
|
529
|
+
media: t.UnionC<[t.TypeC<{
|
530
|
+
type: t.LiteralC<"image">;
|
531
|
+
meta: t.TypeC<{
|
532
|
+
src: t.StringC;
|
533
|
+
file_name: t.StringC;
|
534
|
+
size: t.StringC;
|
535
|
+
}>;
|
536
|
+
}>, t.TypeC<{
|
537
|
+
type: t.LiteralC<"help_doc_command">;
|
538
|
+
meta: t.TypeC<{
|
539
|
+
command: t.StringC;
|
540
|
+
}>;
|
541
|
+
}>, t.NullC]>;
|
542
|
+
is_html_override: t.BooleanC;
|
543
|
+
call_custom_handler: t.BooleanC;
|
544
|
+
}>]>, t.TypeC<{
|
545
|
+
form_factor: t.UnionC<[t.TypeC<{
|
546
|
+
type: t.LiteralC<"modal">;
|
547
|
+
}>, t.TypeC<{
|
548
|
+
type: t.LiteralC<"popover">;
|
549
|
+
position: t.UnionC<[t.LiteralC<"top-left">, t.LiteralC<"top-right">, t.LiteralC<"bottom-right">, t.LiteralC<"bottom-left">, t.LiteralC<"center">]>;
|
550
|
+
}>, t.TypeC<{
|
551
|
+
type: t.LiteralC<"pin">;
|
552
|
+
anchor: t.StringC;
|
553
|
+
}>]>;
|
554
|
+
template_source: t.StringC;
|
555
|
+
}>]>;
|
556
|
+
export declare class Nudge {
|
557
|
+
static decode: (data: any) => {
|
558
|
+
slug: string;
|
559
|
+
id: string | number;
|
560
|
+
organization: string;
|
561
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
562
|
+
trigger: {
|
563
|
+
type: "when_conditions_pass";
|
564
|
+
} | {
|
565
|
+
type: "when_page_reached";
|
566
|
+
meta: {
|
567
|
+
url: string;
|
568
|
+
};
|
569
|
+
} | {
|
570
|
+
type: "on_command_execution";
|
571
|
+
meta: {
|
572
|
+
command: string;
|
573
|
+
};
|
574
|
+
} | {
|
575
|
+
type: "on_event";
|
576
|
+
meta: {
|
577
|
+
event: string;
|
578
|
+
};
|
579
|
+
} | {
|
580
|
+
type: "when_element_appears";
|
581
|
+
meta: {
|
582
|
+
selector: string;
|
583
|
+
};
|
584
|
+
} | {
|
585
|
+
type: "when_share_link_viewed";
|
586
|
+
};
|
587
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
588
|
+
steps: ({
|
589
|
+
id: number;
|
590
|
+
title: string;
|
591
|
+
content: ({
|
592
|
+
type: "markdown";
|
593
|
+
meta: {
|
594
|
+
value: string;
|
595
|
+
};
|
596
|
+
} | {
|
597
|
+
type: "image";
|
598
|
+
meta: {
|
599
|
+
src: string;
|
600
|
+
file_name: string;
|
601
|
+
size: string;
|
602
|
+
};
|
603
|
+
} | {
|
604
|
+
type: "video";
|
605
|
+
meta: {
|
606
|
+
type: "url";
|
607
|
+
src: string;
|
608
|
+
} | {
|
609
|
+
type: "command";
|
610
|
+
command: string;
|
611
|
+
};
|
612
|
+
} | {
|
613
|
+
type: "help_doc_command";
|
614
|
+
meta: {
|
615
|
+
command: string;
|
616
|
+
};
|
617
|
+
} | {
|
618
|
+
type: "button";
|
619
|
+
meta: {
|
620
|
+
label?: string | undefined;
|
621
|
+
action?: {
|
622
|
+
type: "execute_command";
|
623
|
+
meta: {
|
624
|
+
command: string;
|
625
|
+
};
|
626
|
+
} | ({
|
627
|
+
type: "link";
|
628
|
+
value: string;
|
629
|
+
} & {
|
630
|
+
operation?: "self" | "router" | "blank" | undefined;
|
631
|
+
}) | {
|
632
|
+
type: "open_chat";
|
633
|
+
meta: {
|
634
|
+
type: string;
|
635
|
+
};
|
636
|
+
} | {
|
637
|
+
type: "dismiss";
|
638
|
+
} | {
|
639
|
+
type: "no_action";
|
640
|
+
} | {
|
641
|
+
type: "click";
|
642
|
+
value: string;
|
643
|
+
} | undefined;
|
644
|
+
button_type?: "primary" | "secondary" | undefined;
|
645
|
+
} | null;
|
646
|
+
} | {
|
647
|
+
type: "survey_text";
|
648
|
+
meta: {
|
649
|
+
prompt: string;
|
650
|
+
};
|
651
|
+
} | {
|
652
|
+
type: "survey_rating";
|
653
|
+
meta: {
|
654
|
+
type: "emojis";
|
655
|
+
lower_label: string;
|
656
|
+
upper_label: string;
|
657
|
+
options: number;
|
658
|
+
emojis: string[];
|
659
|
+
} | {
|
660
|
+
type: "numbers";
|
661
|
+
lower_label: string;
|
662
|
+
upper_label: string;
|
663
|
+
options: number;
|
664
|
+
} | {
|
665
|
+
type: "stars";
|
666
|
+
lower_label: string;
|
667
|
+
upper_label: string;
|
668
|
+
options: number;
|
669
|
+
};
|
670
|
+
})[];
|
671
|
+
is_live: boolean;
|
672
|
+
} & {
|
673
|
+
form_factor: {
|
674
|
+
type: "modal";
|
675
|
+
} | {
|
676
|
+
type: "popover";
|
677
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
678
|
+
} | ({
|
679
|
+
type: "pin";
|
680
|
+
anchor: string;
|
681
|
+
} & {
|
682
|
+
is_open_by_default?: boolean | undefined;
|
683
|
+
offset?: {
|
684
|
+
x: string;
|
685
|
+
y: string;
|
686
|
+
} | undefined;
|
687
|
+
});
|
688
|
+
} & {
|
689
|
+
has_survey_response?: boolean | undefined;
|
690
|
+
})[];
|
691
|
+
is_live: boolean;
|
692
|
+
} & {
|
693
|
+
old_nudge_id?: number | null | undefined;
|
694
|
+
archived?: boolean | undefined;
|
695
|
+
audience?: {
|
696
|
+
type: "all_users";
|
697
|
+
} | {
|
698
|
+
type: "rule_expression";
|
699
|
+
expression: import("./helpers/rules").RuleExpression;
|
700
|
+
} | {
|
701
|
+
type: "named_rule_reference";
|
702
|
+
rule_reference: {
|
703
|
+
type: "named_rule";
|
704
|
+
rule_id: string | number;
|
705
|
+
} & {
|
706
|
+
reason?: string | undefined;
|
707
|
+
};
|
708
|
+
} | null | undefined;
|
709
|
+
} & {
|
710
|
+
template_source: string;
|
711
|
+
show_step_counter: boolean;
|
712
|
+
dismissible: boolean;
|
713
|
+
share_page_url: string;
|
714
|
+
};
|
715
|
+
static create: (object: {
|
716
|
+
slug: string;
|
717
|
+
id: string | number;
|
718
|
+
organization: string;
|
719
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
720
|
+
trigger: {
|
721
|
+
type: "when_conditions_pass";
|
722
|
+
} | {
|
723
|
+
type: "when_page_reached";
|
724
|
+
meta: {
|
725
|
+
url: string;
|
726
|
+
};
|
727
|
+
} | {
|
728
|
+
type: "on_command_execution";
|
729
|
+
meta: {
|
730
|
+
command: string;
|
731
|
+
};
|
732
|
+
} | {
|
733
|
+
type: "on_event";
|
734
|
+
meta: {
|
735
|
+
event: string;
|
736
|
+
};
|
737
|
+
} | {
|
738
|
+
type: "when_element_appears";
|
739
|
+
meta: {
|
740
|
+
selector: string;
|
741
|
+
};
|
742
|
+
} | {
|
743
|
+
type: "when_share_link_viewed";
|
744
|
+
};
|
745
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
746
|
+
steps: ({
|
747
|
+
id: number;
|
748
|
+
title: string;
|
749
|
+
content: ({
|
750
|
+
type: "markdown";
|
751
|
+
meta: {
|
752
|
+
value: string;
|
753
|
+
};
|
754
|
+
} | {
|
755
|
+
type: "image";
|
756
|
+
meta: {
|
757
|
+
src: string;
|
758
|
+
file_name: string;
|
759
|
+
size: string;
|
760
|
+
};
|
761
|
+
} | {
|
762
|
+
type: "video";
|
763
|
+
meta: {
|
764
|
+
type: "url";
|
765
|
+
src: string;
|
766
|
+
} | {
|
767
|
+
type: "command";
|
768
|
+
command: string;
|
769
|
+
};
|
770
|
+
} | {
|
771
|
+
type: "help_doc_command";
|
772
|
+
meta: {
|
773
|
+
command: string;
|
774
|
+
};
|
775
|
+
} | {
|
776
|
+
type: "button";
|
777
|
+
meta: {
|
778
|
+
label?: string | undefined;
|
779
|
+
action?: {
|
780
|
+
type: "execute_command";
|
781
|
+
meta: {
|
782
|
+
command: string;
|
783
|
+
};
|
784
|
+
} | ({
|
785
|
+
type: "link";
|
786
|
+
value: string;
|
787
|
+
} & {
|
788
|
+
operation?: "self" | "router" | "blank" | undefined;
|
789
|
+
}) | {
|
790
|
+
type: "open_chat";
|
791
|
+
meta: {
|
792
|
+
type: string;
|
793
|
+
};
|
794
|
+
} | {
|
795
|
+
type: "dismiss";
|
796
|
+
} | {
|
797
|
+
type: "no_action";
|
798
|
+
} | {
|
799
|
+
type: "click";
|
800
|
+
value: string;
|
801
|
+
} | undefined;
|
802
|
+
button_type?: "primary" | "secondary" | undefined;
|
803
|
+
} | null;
|
804
|
+
} | {
|
805
|
+
type: "survey_text";
|
806
|
+
meta: {
|
807
|
+
prompt: string;
|
808
|
+
};
|
809
|
+
} | {
|
810
|
+
type: "survey_rating";
|
811
|
+
meta: {
|
812
|
+
type: "emojis";
|
813
|
+
lower_label: string;
|
814
|
+
upper_label: string;
|
815
|
+
options: number;
|
816
|
+
emojis: string[];
|
817
|
+
} | {
|
818
|
+
type: "numbers";
|
819
|
+
lower_label: string;
|
820
|
+
upper_label: string;
|
821
|
+
options: number;
|
822
|
+
} | {
|
823
|
+
type: "stars";
|
824
|
+
lower_label: string;
|
825
|
+
upper_label: string;
|
826
|
+
options: number;
|
827
|
+
};
|
828
|
+
})[];
|
829
|
+
is_live: boolean;
|
830
|
+
} & {
|
831
|
+
form_factor: {
|
832
|
+
type: "modal";
|
833
|
+
} | {
|
834
|
+
type: "popover";
|
835
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
836
|
+
} | ({
|
837
|
+
type: "pin";
|
838
|
+
anchor: string;
|
839
|
+
} & {
|
840
|
+
is_open_by_default?: boolean | undefined;
|
841
|
+
offset?: {
|
842
|
+
x: string;
|
843
|
+
y: string;
|
844
|
+
} | undefined;
|
845
|
+
});
|
846
|
+
} & {
|
847
|
+
has_survey_response?: boolean | undefined;
|
848
|
+
})[];
|
849
|
+
is_live: boolean;
|
850
|
+
} & {
|
851
|
+
old_nudge_id?: number | null | undefined;
|
852
|
+
archived?: boolean | undefined;
|
853
|
+
audience?: {
|
854
|
+
type: "all_users";
|
855
|
+
} | {
|
856
|
+
type: "rule_expression";
|
857
|
+
expression: import("./helpers/rules").RuleExpression;
|
858
|
+
} | {
|
859
|
+
type: "named_rule_reference";
|
860
|
+
rule_reference: {
|
861
|
+
type: "named_rule";
|
862
|
+
rule_id: string | number;
|
863
|
+
} & {
|
864
|
+
reason?: string | undefined;
|
865
|
+
};
|
866
|
+
} | null | undefined;
|
867
|
+
} & {
|
868
|
+
template_source: string;
|
869
|
+
show_step_counter: boolean;
|
870
|
+
dismissible: boolean;
|
871
|
+
share_page_url: string;
|
872
|
+
}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
873
|
+
slug: string;
|
874
|
+
id: string | number;
|
875
|
+
organization: string;
|
876
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
877
|
+
trigger: {
|
878
|
+
type: "when_conditions_pass";
|
879
|
+
} | {
|
880
|
+
type: "when_page_reached";
|
881
|
+
meta: {
|
882
|
+
url: string;
|
883
|
+
};
|
884
|
+
} | {
|
885
|
+
type: "on_command_execution";
|
886
|
+
meta: {
|
887
|
+
command: string;
|
888
|
+
};
|
889
|
+
} | {
|
890
|
+
type: "on_event";
|
891
|
+
meta: {
|
892
|
+
event: string;
|
893
|
+
};
|
894
|
+
} | {
|
895
|
+
type: "when_element_appears";
|
896
|
+
meta: {
|
897
|
+
selector: string;
|
898
|
+
};
|
899
|
+
} | {
|
900
|
+
type: "when_share_link_viewed";
|
901
|
+
};
|
902
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
903
|
+
steps: ({
|
904
|
+
id: number;
|
905
|
+
title: string;
|
906
|
+
content: ({
|
907
|
+
type: "markdown";
|
908
|
+
meta: {
|
909
|
+
value: string;
|
910
|
+
};
|
911
|
+
} | {
|
912
|
+
type: "image";
|
913
|
+
meta: {
|
914
|
+
src: string;
|
915
|
+
file_name: string;
|
916
|
+
size: string;
|
917
|
+
};
|
918
|
+
} | {
|
919
|
+
type: "video";
|
920
|
+
meta: {
|
921
|
+
type: "url";
|
922
|
+
src: string;
|
923
|
+
} | {
|
924
|
+
type: "command";
|
925
|
+
command: string;
|
926
|
+
};
|
927
|
+
} | {
|
928
|
+
type: "help_doc_command";
|
929
|
+
meta: {
|
930
|
+
command: string;
|
931
|
+
};
|
932
|
+
} | {
|
933
|
+
type: "button";
|
934
|
+
meta: {
|
935
|
+
label?: string | undefined;
|
936
|
+
action?: {
|
937
|
+
type: "execute_command";
|
938
|
+
meta: {
|
939
|
+
command: string;
|
940
|
+
};
|
941
|
+
} | ({
|
942
|
+
type: "link";
|
943
|
+
value: string;
|
944
|
+
} & {
|
945
|
+
operation?: "self" | "router" | "blank" | undefined;
|
946
|
+
}) | {
|
947
|
+
type: "open_chat";
|
948
|
+
meta: {
|
949
|
+
type: string;
|
950
|
+
};
|
951
|
+
} | {
|
952
|
+
type: "dismiss";
|
953
|
+
} | {
|
954
|
+
type: "no_action";
|
955
|
+
} | {
|
956
|
+
type: "click";
|
957
|
+
value: string;
|
958
|
+
} | undefined;
|
959
|
+
button_type?: "primary" | "secondary" | undefined;
|
960
|
+
} | null;
|
961
|
+
} | {
|
962
|
+
type: "survey_text";
|
963
|
+
meta: {
|
964
|
+
prompt: string;
|
965
|
+
};
|
966
|
+
} | {
|
967
|
+
type: "survey_rating";
|
968
|
+
meta: {
|
969
|
+
type: "emojis";
|
970
|
+
lower_label: string;
|
971
|
+
upper_label: string;
|
972
|
+
options: number;
|
973
|
+
emojis: string[];
|
974
|
+
} | {
|
975
|
+
type: "numbers";
|
976
|
+
lower_label: string;
|
977
|
+
upper_label: string;
|
978
|
+
options: number;
|
979
|
+
} | {
|
980
|
+
type: "stars";
|
981
|
+
lower_label: string;
|
982
|
+
upper_label: string;
|
983
|
+
options: number;
|
984
|
+
};
|
985
|
+
})[];
|
986
|
+
is_live: boolean;
|
987
|
+
} & {
|
988
|
+
form_factor: {
|
989
|
+
type: "modal";
|
990
|
+
} | {
|
991
|
+
type: "popover";
|
992
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
993
|
+
} | ({
|
994
|
+
type: "pin";
|
995
|
+
anchor: string;
|
996
|
+
} & {
|
997
|
+
is_open_by_default?: boolean | undefined;
|
998
|
+
offset?: {
|
999
|
+
x: string;
|
1000
|
+
y: string;
|
1001
|
+
} | undefined;
|
1002
|
+
});
|
1003
|
+
} & {
|
1004
|
+
has_survey_response?: boolean | undefined;
|
1005
|
+
})[];
|
1006
|
+
is_live: boolean;
|
1007
|
+
} & {
|
1008
|
+
old_nudge_id?: number | null | undefined;
|
1009
|
+
archived?: boolean | undefined;
|
1010
|
+
audience?: {
|
1011
|
+
type: "all_users";
|
1012
|
+
} | {
|
1013
|
+
type: "rule_expression";
|
1014
|
+
expression: import("./helpers/rules").RuleExpression;
|
1015
|
+
} | {
|
1016
|
+
type: "named_rule_reference";
|
1017
|
+
rule_reference: {
|
1018
|
+
type: "named_rule";
|
1019
|
+
rule_id: string | number;
|
1020
|
+
} & {
|
1021
|
+
reason?: string | undefined;
|
1022
|
+
};
|
1023
|
+
} | null | undefined;
|
1024
|
+
} & {
|
1025
|
+
template_source: string;
|
1026
|
+
show_step_counter: boolean;
|
1027
|
+
dismissible: boolean;
|
1028
|
+
share_page_url: string;
|
1029
|
+
}>;
|
1030
|
+
static update: (object: {
|
1031
|
+
slug: string;
|
1032
|
+
id: string | number;
|
1033
|
+
organization: string;
|
1034
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
1035
|
+
trigger: {
|
1036
|
+
type: "when_conditions_pass";
|
1037
|
+
} | {
|
1038
|
+
type: "when_page_reached";
|
1039
|
+
meta: {
|
1040
|
+
url: string;
|
1041
|
+
};
|
1042
|
+
} | {
|
1043
|
+
type: "on_command_execution";
|
1044
|
+
meta: {
|
1045
|
+
command: string;
|
1046
|
+
};
|
1047
|
+
} | {
|
1048
|
+
type: "on_event";
|
1049
|
+
meta: {
|
1050
|
+
event: string;
|
1051
|
+
};
|
1052
|
+
} | {
|
1053
|
+
type: "when_element_appears";
|
1054
|
+
meta: {
|
1055
|
+
selector: string;
|
1056
|
+
};
|
1057
|
+
} | {
|
1058
|
+
type: "when_share_link_viewed";
|
1059
|
+
};
|
1060
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
1061
|
+
steps: ({
|
1062
|
+
id: number;
|
1063
|
+
title: string;
|
1064
|
+
content: ({
|
1065
|
+
type: "markdown";
|
1066
|
+
meta: {
|
1067
|
+
value: string;
|
1068
|
+
};
|
1069
|
+
} | {
|
1070
|
+
type: "image";
|
1071
|
+
meta: {
|
1072
|
+
src: string;
|
1073
|
+
file_name: string;
|
1074
|
+
size: string;
|
1075
|
+
};
|
1076
|
+
} | {
|
1077
|
+
type: "video";
|
1078
|
+
meta: {
|
1079
|
+
type: "url";
|
1080
|
+
src: string;
|
1081
|
+
} | {
|
1082
|
+
type: "command";
|
1083
|
+
command: string;
|
1084
|
+
};
|
1085
|
+
} | {
|
1086
|
+
type: "help_doc_command";
|
1087
|
+
meta: {
|
1088
|
+
command: string;
|
1089
|
+
};
|
1090
|
+
} | {
|
1091
|
+
type: "button";
|
1092
|
+
meta: {
|
1093
|
+
label?: string | undefined;
|
1094
|
+
action?: {
|
1095
|
+
type: "execute_command";
|
1096
|
+
meta: {
|
1097
|
+
command: string;
|
1098
|
+
};
|
1099
|
+
} | ({
|
1100
|
+
type: "link";
|
1101
|
+
value: string;
|
1102
|
+
} & {
|
1103
|
+
operation?: "self" | "router" | "blank" | undefined;
|
1104
|
+
}) | {
|
1105
|
+
type: "open_chat";
|
1106
|
+
meta: {
|
1107
|
+
type: string;
|
1108
|
+
};
|
1109
|
+
} | {
|
1110
|
+
type: "dismiss";
|
1111
|
+
} | {
|
1112
|
+
type: "no_action";
|
1113
|
+
} | {
|
1114
|
+
type: "click";
|
1115
|
+
value: string;
|
1116
|
+
} | undefined;
|
1117
|
+
button_type?: "primary" | "secondary" | undefined;
|
1118
|
+
} | null;
|
1119
|
+
} | {
|
1120
|
+
type: "survey_text";
|
1121
|
+
meta: {
|
1122
|
+
prompt: string;
|
1123
|
+
};
|
1124
|
+
} | {
|
1125
|
+
type: "survey_rating";
|
1126
|
+
meta: {
|
1127
|
+
type: "emojis";
|
1128
|
+
lower_label: string;
|
1129
|
+
upper_label: string;
|
1130
|
+
options: number;
|
1131
|
+
emojis: string[];
|
1132
|
+
} | {
|
1133
|
+
type: "numbers";
|
1134
|
+
lower_label: string;
|
1135
|
+
upper_label: string;
|
1136
|
+
options: number;
|
1137
|
+
} | {
|
1138
|
+
type: "stars";
|
1139
|
+
lower_label: string;
|
1140
|
+
upper_label: string;
|
1141
|
+
options: number;
|
1142
|
+
};
|
1143
|
+
})[];
|
1144
|
+
is_live: boolean;
|
1145
|
+
} & {
|
1146
|
+
form_factor: {
|
1147
|
+
type: "modal";
|
1148
|
+
} | {
|
1149
|
+
type: "popover";
|
1150
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
1151
|
+
} | ({
|
1152
|
+
type: "pin";
|
1153
|
+
anchor: string;
|
1154
|
+
} & {
|
1155
|
+
is_open_by_default?: boolean | undefined;
|
1156
|
+
offset?: {
|
1157
|
+
x: string;
|
1158
|
+
y: string;
|
1159
|
+
} | undefined;
|
1160
|
+
});
|
1161
|
+
} & {
|
1162
|
+
has_survey_response?: boolean | undefined;
|
1163
|
+
})[];
|
1164
|
+
is_live: boolean;
|
1165
|
+
} & {
|
1166
|
+
old_nudge_id?: number | null | undefined;
|
1167
|
+
archived?: boolean | undefined;
|
1168
|
+
audience?: {
|
1169
|
+
type: "all_users";
|
1170
|
+
} | {
|
1171
|
+
type: "rule_expression";
|
1172
|
+
expression: import("./helpers/rules").RuleExpression;
|
1173
|
+
} | {
|
1174
|
+
type: "named_rule_reference";
|
1175
|
+
rule_reference: {
|
1176
|
+
type: "named_rule";
|
1177
|
+
rule_id: string | number;
|
1178
|
+
} & {
|
1179
|
+
reason?: string | undefined;
|
1180
|
+
};
|
1181
|
+
} | null | undefined;
|
1182
|
+
} & {
|
1183
|
+
template_source: string;
|
1184
|
+
show_step_counter: boolean;
|
1185
|
+
dismissible: boolean;
|
1186
|
+
share_page_url: string;
|
1187
|
+
}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
1188
|
+
slug: string;
|
1189
|
+
id: string | number;
|
1190
|
+
organization: string;
|
1191
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
1192
|
+
trigger: {
|
1193
|
+
type: "when_conditions_pass";
|
1194
|
+
} | {
|
1195
|
+
type: "when_page_reached";
|
1196
|
+
meta: {
|
1197
|
+
url: string;
|
1198
|
+
};
|
1199
|
+
} | {
|
1200
|
+
type: "on_command_execution";
|
1201
|
+
meta: {
|
1202
|
+
command: string;
|
1203
|
+
};
|
1204
|
+
} | {
|
1205
|
+
type: "on_event";
|
1206
|
+
meta: {
|
1207
|
+
event: string;
|
1208
|
+
};
|
1209
|
+
} | {
|
1210
|
+
type: "when_element_appears";
|
1211
|
+
meta: {
|
1212
|
+
selector: string;
|
1213
|
+
};
|
1214
|
+
} | {
|
1215
|
+
type: "when_share_link_viewed";
|
1216
|
+
};
|
1217
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
1218
|
+
steps: ({
|
1219
|
+
id: number;
|
1220
|
+
title: string;
|
1221
|
+
content: ({
|
1222
|
+
type: "markdown";
|
1223
|
+
meta: {
|
1224
|
+
value: string;
|
1225
|
+
};
|
1226
|
+
} | {
|
1227
|
+
type: "image";
|
1228
|
+
meta: {
|
1229
|
+
src: string;
|
1230
|
+
file_name: string;
|
1231
|
+
size: string;
|
1232
|
+
};
|
1233
|
+
} | {
|
1234
|
+
type: "video";
|
1235
|
+
meta: {
|
1236
|
+
type: "url";
|
1237
|
+
src: string;
|
1238
|
+
} | {
|
1239
|
+
type: "command";
|
1240
|
+
command: string;
|
1241
|
+
};
|
1242
|
+
} | {
|
1243
|
+
type: "help_doc_command";
|
1244
|
+
meta: {
|
1245
|
+
command: string;
|
1246
|
+
};
|
1247
|
+
} | {
|
1248
|
+
type: "button";
|
1249
|
+
meta: {
|
1250
|
+
label?: string | undefined;
|
1251
|
+
action?: {
|
1252
|
+
type: "execute_command";
|
1253
|
+
meta: {
|
1254
|
+
command: string;
|
1255
|
+
};
|
1256
|
+
} | ({
|
1257
|
+
type: "link";
|
1258
|
+
value: string;
|
1259
|
+
} & {
|
1260
|
+
operation?: "self" | "router" | "blank" | undefined;
|
1261
|
+
}) | {
|
1262
|
+
type: "open_chat";
|
1263
|
+
meta: {
|
1264
|
+
type: string;
|
1265
|
+
};
|
1266
|
+
} | {
|
1267
|
+
type: "dismiss";
|
1268
|
+
} | {
|
1269
|
+
type: "no_action";
|
1270
|
+
} | {
|
1271
|
+
type: "click";
|
1272
|
+
value: string;
|
1273
|
+
} | undefined;
|
1274
|
+
button_type?: "primary" | "secondary" | undefined;
|
1275
|
+
} | null;
|
1276
|
+
} | {
|
1277
|
+
type: "survey_text";
|
1278
|
+
meta: {
|
1279
|
+
prompt: string;
|
1280
|
+
};
|
1281
|
+
} | {
|
1282
|
+
type: "survey_rating";
|
1283
|
+
meta: {
|
1284
|
+
type: "emojis";
|
1285
|
+
lower_label: string;
|
1286
|
+
upper_label: string;
|
1287
|
+
options: number;
|
1288
|
+
emojis: string[];
|
1289
|
+
} | {
|
1290
|
+
type: "numbers";
|
1291
|
+
lower_label: string;
|
1292
|
+
upper_label: string;
|
1293
|
+
options: number;
|
1294
|
+
} | {
|
1295
|
+
type: "stars";
|
1296
|
+
lower_label: string;
|
1297
|
+
upper_label: string;
|
1298
|
+
options: number;
|
1299
|
+
};
|
1300
|
+
})[];
|
1301
|
+
is_live: boolean;
|
1302
|
+
} & {
|
1303
|
+
form_factor: {
|
1304
|
+
type: "modal";
|
1305
|
+
} | {
|
1306
|
+
type: "popover";
|
1307
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
1308
|
+
} | ({
|
1309
|
+
type: "pin";
|
1310
|
+
anchor: string;
|
1311
|
+
} & {
|
1312
|
+
is_open_by_default?: boolean | undefined;
|
1313
|
+
offset?: {
|
1314
|
+
x: string;
|
1315
|
+
y: string;
|
1316
|
+
} | undefined;
|
1317
|
+
});
|
1318
|
+
} & {
|
1319
|
+
has_survey_response?: boolean | undefined;
|
1320
|
+
})[];
|
1321
|
+
is_live: boolean;
|
1322
|
+
} & {
|
1323
|
+
old_nudge_id?: number | null | undefined;
|
1324
|
+
archived?: boolean | undefined;
|
1325
|
+
audience?: {
|
1326
|
+
type: "all_users";
|
1327
|
+
} | {
|
1328
|
+
type: "rule_expression";
|
1329
|
+
expression: import("./helpers/rules").RuleExpression;
|
1330
|
+
} | {
|
1331
|
+
type: "named_rule_reference";
|
1332
|
+
rule_reference: {
|
1333
|
+
type: "named_rule";
|
1334
|
+
rule_id: string | number;
|
1335
|
+
} & {
|
1336
|
+
reason?: string | undefined;
|
1337
|
+
};
|
1338
|
+
} | null | undefined;
|
1339
|
+
} & {
|
1340
|
+
template_source: string;
|
1341
|
+
show_step_counter: boolean;
|
1342
|
+
dismissible: boolean;
|
1343
|
+
share_page_url: string;
|
1344
|
+
}>;
|
1345
|
+
static delete: (id: string | number, params?: Record<string, string> | undefined, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
|
1346
|
+
static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
|
1347
|
+
slug: string;
|
1348
|
+
id: string | number;
|
1349
|
+
organization: string;
|
1350
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
1351
|
+
trigger: {
|
1352
|
+
type: "when_conditions_pass";
|
1353
|
+
} | {
|
1354
|
+
type: "when_page_reached";
|
1355
|
+
meta: {
|
1356
|
+
url: string;
|
1357
|
+
};
|
1358
|
+
} | {
|
1359
|
+
type: "on_command_execution";
|
1360
|
+
meta: {
|
1361
|
+
command: string;
|
1362
|
+
};
|
1363
|
+
} | {
|
1364
|
+
type: "on_event";
|
1365
|
+
meta: {
|
1366
|
+
event: string;
|
1367
|
+
};
|
1368
|
+
} | {
|
1369
|
+
type: "when_element_appears";
|
1370
|
+
meta: {
|
1371
|
+
selector: string;
|
1372
|
+
};
|
1373
|
+
} | {
|
1374
|
+
type: "when_share_link_viewed";
|
1375
|
+
};
|
1376
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
1377
|
+
steps: ({
|
1378
|
+
id: number;
|
1379
|
+
title: string;
|
1380
|
+
content: ({
|
1381
|
+
type: "markdown";
|
1382
|
+
meta: {
|
1383
|
+
value: string;
|
1384
|
+
};
|
1385
|
+
} | {
|
1386
|
+
type: "image";
|
1387
|
+
meta: {
|
1388
|
+
src: string;
|
1389
|
+
file_name: string;
|
1390
|
+
size: string;
|
1391
|
+
};
|
1392
|
+
} | {
|
1393
|
+
type: "video";
|
1394
|
+
meta: {
|
1395
|
+
type: "url";
|
1396
|
+
src: string;
|
1397
|
+
} | {
|
1398
|
+
type: "command";
|
1399
|
+
command: string;
|
1400
|
+
};
|
1401
|
+
} | {
|
1402
|
+
type: "help_doc_command";
|
1403
|
+
meta: {
|
1404
|
+
command: string;
|
1405
|
+
};
|
1406
|
+
} | {
|
1407
|
+
type: "button";
|
1408
|
+
meta: {
|
1409
|
+
label?: string | undefined;
|
1410
|
+
action?: {
|
1411
|
+
type: "execute_command";
|
1412
|
+
meta: {
|
1413
|
+
command: string;
|
1414
|
+
};
|
1415
|
+
} | ({
|
1416
|
+
type: "link";
|
1417
|
+
value: string;
|
1418
|
+
} & {
|
1419
|
+
operation?: "self" | "router" | "blank" | undefined;
|
1420
|
+
}) | {
|
1421
|
+
type: "open_chat";
|
1422
|
+
meta: {
|
1423
|
+
type: string;
|
1424
|
+
};
|
1425
|
+
} | {
|
1426
|
+
type: "dismiss";
|
1427
|
+
} | {
|
1428
|
+
type: "no_action";
|
1429
|
+
} | {
|
1430
|
+
type: "click";
|
1431
|
+
value: string;
|
1432
|
+
} | undefined;
|
1433
|
+
button_type?: "primary" | "secondary" | undefined;
|
1434
|
+
} | null;
|
1435
|
+
} | {
|
1436
|
+
type: "survey_text";
|
1437
|
+
meta: {
|
1438
|
+
prompt: string;
|
1439
|
+
};
|
1440
|
+
} | {
|
1441
|
+
type: "survey_rating";
|
1442
|
+
meta: {
|
1443
|
+
type: "emojis";
|
1444
|
+
lower_label: string;
|
1445
|
+
upper_label: string;
|
1446
|
+
options: number;
|
1447
|
+
emojis: string[];
|
1448
|
+
} | {
|
1449
|
+
type: "numbers";
|
1450
|
+
lower_label: string;
|
1451
|
+
upper_label: string;
|
1452
|
+
options: number;
|
1453
|
+
} | {
|
1454
|
+
type: "stars";
|
1455
|
+
lower_label: string;
|
1456
|
+
upper_label: string;
|
1457
|
+
options: number;
|
1458
|
+
};
|
1459
|
+
})[];
|
1460
|
+
is_live: boolean;
|
1461
|
+
} & {
|
1462
|
+
form_factor: {
|
1463
|
+
type: "modal";
|
1464
|
+
} | {
|
1465
|
+
type: "popover";
|
1466
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
1467
|
+
} | ({
|
1468
|
+
type: "pin";
|
1469
|
+
anchor: string;
|
1470
|
+
} & {
|
1471
|
+
is_open_by_default?: boolean | undefined;
|
1472
|
+
offset?: {
|
1473
|
+
x: string;
|
1474
|
+
y: string;
|
1475
|
+
} | undefined;
|
1476
|
+
});
|
1477
|
+
} & {
|
1478
|
+
has_survey_response?: boolean | undefined;
|
1479
|
+
})[];
|
1480
|
+
is_live: boolean;
|
1481
|
+
} & {
|
1482
|
+
old_nudge_id?: number | null | undefined;
|
1483
|
+
archived?: boolean | undefined;
|
1484
|
+
audience?: {
|
1485
|
+
type: "all_users";
|
1486
|
+
} | {
|
1487
|
+
type: "rule_expression";
|
1488
|
+
expression: import("./helpers/rules").RuleExpression;
|
1489
|
+
} | {
|
1490
|
+
type: "named_rule_reference";
|
1491
|
+
rule_reference: {
|
1492
|
+
type: "named_rule";
|
1493
|
+
rule_id: string | number;
|
1494
|
+
} & {
|
1495
|
+
reason?: string | undefined;
|
1496
|
+
};
|
1497
|
+
} | null | undefined;
|
1498
|
+
} & {
|
1499
|
+
template_source: string;
|
1500
|
+
show_step_counter: boolean;
|
1501
|
+
dismissible: boolean;
|
1502
|
+
share_page_url: string;
|
1503
|
+
})[]>;
|
1504
|
+
static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
|
1505
|
+
onSuccess?: (() => void) | undefined;
|
1506
|
+
onError?: ((err: string) => void) | undefined;
|
1507
|
+
} | undefined) => Promise<{
|
1508
|
+
slug: string;
|
1509
|
+
id: string | number;
|
1510
|
+
organization: string;
|
1511
|
+
show_expression: import("./helpers/rules").RuleExpression;
|
1512
|
+
trigger: {
|
1513
|
+
type: "when_conditions_pass";
|
1514
|
+
} | {
|
1515
|
+
type: "when_page_reached";
|
1516
|
+
meta: {
|
1517
|
+
url: string;
|
1518
|
+
};
|
1519
|
+
} | {
|
1520
|
+
type: "on_command_execution";
|
1521
|
+
meta: {
|
1522
|
+
command: string;
|
1523
|
+
};
|
1524
|
+
} | {
|
1525
|
+
type: "on_event";
|
1526
|
+
meta: {
|
1527
|
+
event: string;
|
1528
|
+
};
|
1529
|
+
} | {
|
1530
|
+
type: "when_element_appears";
|
1531
|
+
meta: {
|
1532
|
+
selector: string;
|
1533
|
+
};
|
1534
|
+
} | {
|
1535
|
+
type: "when_share_link_viewed";
|
1536
|
+
};
|
1537
|
+
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
1538
|
+
steps: ({
|
1539
|
+
id: number;
|
1540
|
+
title: string;
|
1541
|
+
content: ({
|
1542
|
+
type: "markdown";
|
1543
|
+
meta: {
|
1544
|
+
value: string;
|
1545
|
+
};
|
1546
|
+
} | {
|
1547
|
+
type: "image";
|
1548
|
+
meta: {
|
1549
|
+
src: string;
|
1550
|
+
file_name: string;
|
1551
|
+
size: string;
|
1552
|
+
};
|
1553
|
+
} | {
|
1554
|
+
type: "video";
|
1555
|
+
meta: {
|
1556
|
+
type: "url";
|
1557
|
+
src: string;
|
1558
|
+
} | {
|
1559
|
+
type: "command";
|
1560
|
+
command: string;
|
1561
|
+
};
|
1562
|
+
} | {
|
1563
|
+
type: "help_doc_command";
|
1564
|
+
meta: {
|
1565
|
+
command: string;
|
1566
|
+
};
|
1567
|
+
} | {
|
1568
|
+
type: "button";
|
1569
|
+
meta: {
|
1570
|
+
label?: string | undefined;
|
1571
|
+
action?: {
|
1572
|
+
type: "execute_command";
|
1573
|
+
meta: {
|
1574
|
+
command: string;
|
1575
|
+
};
|
1576
|
+
} | ({
|
1577
|
+
type: "link";
|
1578
|
+
value: string;
|
1579
|
+
} & {
|
1580
|
+
operation?: "self" | "router" | "blank" | undefined;
|
1581
|
+
}) | {
|
1582
|
+
type: "open_chat";
|
1583
|
+
meta: {
|
1584
|
+
type: string;
|
1585
|
+
};
|
1586
|
+
} | {
|
1587
|
+
type: "dismiss";
|
1588
|
+
} | {
|
1589
|
+
type: "no_action";
|
1590
|
+
} | {
|
1591
|
+
type: "click";
|
1592
|
+
value: string;
|
1593
|
+
} | undefined;
|
1594
|
+
button_type?: "primary" | "secondary" | undefined;
|
1595
|
+
} | null;
|
1596
|
+
} | {
|
1597
|
+
type: "survey_text";
|
1598
|
+
meta: {
|
1599
|
+
prompt: string;
|
1600
|
+
};
|
1601
|
+
} | {
|
1602
|
+
type: "survey_rating";
|
1603
|
+
meta: {
|
1604
|
+
type: "emojis";
|
1605
|
+
lower_label: string;
|
1606
|
+
upper_label: string;
|
1607
|
+
options: number;
|
1608
|
+
emojis: string[];
|
1609
|
+
} | {
|
1610
|
+
type: "numbers";
|
1611
|
+
lower_label: string;
|
1612
|
+
upper_label: string;
|
1613
|
+
options: number;
|
1614
|
+
} | {
|
1615
|
+
type: "stars";
|
1616
|
+
lower_label: string;
|
1617
|
+
upper_label: string;
|
1618
|
+
options: number;
|
1619
|
+
};
|
1620
|
+
})[];
|
1621
|
+
is_live: boolean;
|
1622
|
+
} & {
|
1623
|
+
form_factor: {
|
1624
|
+
type: "modal";
|
1625
|
+
} | {
|
1626
|
+
type: "popover";
|
1627
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
1628
|
+
} | ({
|
1629
|
+
type: "pin";
|
1630
|
+
anchor: string;
|
1631
|
+
} & {
|
1632
|
+
is_open_by_default?: boolean | undefined;
|
1633
|
+
offset?: {
|
1634
|
+
x: string;
|
1635
|
+
y: string;
|
1636
|
+
} | undefined;
|
1637
|
+
});
|
1638
|
+
} & {
|
1639
|
+
has_survey_response?: boolean | undefined;
|
1640
|
+
})[];
|
1641
|
+
is_live: boolean;
|
1642
|
+
} & {
|
1643
|
+
old_nudge_id?: number | null | undefined;
|
1644
|
+
archived?: boolean | undefined;
|
1645
|
+
audience?: {
|
1646
|
+
type: "all_users";
|
1647
|
+
} | {
|
1648
|
+
type: "rule_expression";
|
1649
|
+
expression: import("./helpers/rules").RuleExpression;
|
1650
|
+
} | {
|
1651
|
+
type: "named_rule_reference";
|
1652
|
+
rule_reference: {
|
1653
|
+
type: "named_rule";
|
1654
|
+
rule_id: string | number;
|
1655
|
+
} & {
|
1656
|
+
reason?: string | undefined;
|
1657
|
+
};
|
1658
|
+
} | null | undefined;
|
1659
|
+
} & {
|
1660
|
+
template_source: string;
|
1661
|
+
show_step_counter: boolean;
|
1662
|
+
dismissible: boolean;
|
1663
|
+
share_page_url: string;
|
1664
|
+
}>;
|
1665
|
+
/**
|
1666
|
+
* Returns true if the nudge is new (not yet saved to the backend)
|
1667
|
+
*/
|
1668
|
+
static isNew: (nudge: t.TypeOf<typeof NudgeV>) => boolean;
|
1669
|
+
}
|