commandbar 1.7.2 → 1.7.3
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/commandbar-js/src/init.d.ts +1 -1
- package/build/internal/src/client/AddContextOptions.d.ts +6 -7
- package/build/internal/src/client/AnalyticsEventTypes.d.ts +1 -1
- package/build/internal/src/client/CommandBarClientSDK.d.ts +18 -29
- package/build/internal/src/client/CommandBarSDK.d.ts +16 -2
- package/build/internal/src/client/EventHandler.d.ts +81 -16
- package/build/internal/src/client/globals.d.ts +1 -0
- package/build/internal/src/client/symbols.d.ts +6 -0
- package/build/internal/src/middleware/CommandFromClientV.d.ts +30 -47
- package/build/internal/src/middleware/OrganizationV.d.ts +7 -0
- package/build/internal/src/middleware/ResourceSettingsV.d.ts +2 -0
- package/build/internal/src/middleware/checklist.d.ts +740 -0
- package/build/internal/src/middleware/command.d.ts +680 -977
- package/build/internal/src/middleware/dashboardFlags.d.ts +9 -0
- package/build/internal/src/middleware/detailPreview.d.ts +3 -0
- package/build/internal/src/middleware/helpers/actions.d.ts +84 -0
- package/build/internal/src/middleware/helpers/argument.d.ts +0 -120
- package/build/internal/src/middleware/helpers/commandTemplate.d.ts +60 -60
- package/build/internal/src/middleware/helpers/endUser.d.ts +1 -0
- package/build/internal/src/middleware/helpers/goals.d.ts +26 -0
- package/build/internal/src/middleware/helpers/rules.d.ts +48 -22
- package/build/internal/src/middleware/helpers/tags.d.ts +7 -0
- package/build/internal/src/middleware/historyEvent.d.ts +0 -19
- package/build/internal/src/middleware/nudge.d.ts +890 -94
- package/build/internal/src/middleware/organization.d.ts +88 -56
- package/build/internal/src/middleware/skin.d.ts +13 -2
- package/build/internal/src/middleware/types.d.ts +29 -11
- package/build/internal/src/middleware/user.d.ts +2 -1
- package/build/internal/src/util/LocalStorage.d.ts +1 -1
- package/package.json +2 -3
- package/src/init.ts +1 -1
@@ -1,5 +1,269 @@
|
|
1
1
|
import * as t from 'io-ts';
|
2
|
-
export declare const
|
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
|
+
}>]>]>;
|
52
|
+
}>, t.NullC]>;
|
53
|
+
}>;
|
54
|
+
export declare const NudgeContentBlockV: t.UnionC<[t.TypeC<{
|
55
|
+
type: t.LiteralC<"markdown">;
|
56
|
+
meta: t.TypeC<{
|
57
|
+
value: t.StringC;
|
58
|
+
}>;
|
59
|
+
}>, t.TypeC<{
|
60
|
+
type: t.LiteralC<"image">;
|
61
|
+
meta: t.TypeC<{
|
62
|
+
src: t.StringC;
|
63
|
+
file_name: t.StringC;
|
64
|
+
size: t.StringC;
|
65
|
+
}>;
|
66
|
+
}>, t.TypeC<{
|
67
|
+
type: t.LiteralC<"video">;
|
68
|
+
meta: t.UnionC<[t.TypeC<{
|
69
|
+
type: t.LiteralC<"url">;
|
70
|
+
src: t.StringC;
|
71
|
+
}>, t.TypeC<{
|
72
|
+
type: t.LiteralC<"command">;
|
73
|
+
command: t.StringC;
|
74
|
+
}>]>;
|
75
|
+
}>, t.TypeC<{
|
76
|
+
type: t.LiteralC<"help_doc_command">;
|
77
|
+
meta: t.TypeC<{
|
78
|
+
command: t.StringC;
|
79
|
+
}>;
|
80
|
+
}>, t.TypeC<{
|
81
|
+
type: t.LiteralC<"button">;
|
82
|
+
meta: t.UnionC<[t.PartialC<{
|
83
|
+
label: t.StringC;
|
84
|
+
action: t.UnionC<[t.TypeC<{
|
85
|
+
type: t.LiteralC<"execute_command">;
|
86
|
+
meta: t.TypeC<{
|
87
|
+
command: t.StringC;
|
88
|
+
}>;
|
89
|
+
}>, t.TypeC<{
|
90
|
+
type: t.LiteralC<"no_action">;
|
91
|
+
}>, t.TypeC<{
|
92
|
+
type: t.LiteralC<"click">;
|
93
|
+
value: t.StringC;
|
94
|
+
}>, t.IntersectionC<[t.TypeC<{
|
95
|
+
type: t.LiteralC<"link">;
|
96
|
+
value: t.StringC;
|
97
|
+
}>, t.PartialC<{
|
98
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
99
|
+
}>]>]>;
|
100
|
+
}>, t.NullC]>;
|
101
|
+
}>]>;
|
102
|
+
export declare const NudgeStepV: t.IntersectionC<[t.TypeC<{
|
103
|
+
id: t.NumberC;
|
104
|
+
title: t.StringC;
|
105
|
+
content: t.ArrayC<t.UnionC<[t.TypeC<{
|
106
|
+
type: t.LiteralC<"markdown">;
|
107
|
+
meta: t.TypeC<{
|
108
|
+
value: t.StringC;
|
109
|
+
}>;
|
110
|
+
}>, t.TypeC<{
|
111
|
+
type: t.LiteralC<"image">;
|
112
|
+
meta: t.TypeC<{
|
113
|
+
src: t.StringC;
|
114
|
+
file_name: t.StringC;
|
115
|
+
size: t.StringC;
|
116
|
+
}>;
|
117
|
+
}>, t.TypeC<{
|
118
|
+
type: t.LiteralC<"video">;
|
119
|
+
meta: t.UnionC<[t.TypeC<{
|
120
|
+
type: t.LiteralC<"url">;
|
121
|
+
src: t.StringC;
|
122
|
+
}>, t.TypeC<{
|
123
|
+
type: t.LiteralC<"command">;
|
124
|
+
command: t.StringC;
|
125
|
+
}>]>;
|
126
|
+
}>, t.TypeC<{
|
127
|
+
type: t.LiteralC<"help_doc_command">;
|
128
|
+
meta: t.TypeC<{
|
129
|
+
command: t.StringC;
|
130
|
+
}>;
|
131
|
+
}>, t.TypeC<{
|
132
|
+
type: t.LiteralC<"button">;
|
133
|
+
meta: t.UnionC<[t.PartialC<{
|
134
|
+
label: t.StringC;
|
135
|
+
action: t.UnionC<[t.TypeC<{
|
136
|
+
type: t.LiteralC<"execute_command">;
|
137
|
+
meta: t.TypeC<{
|
138
|
+
command: t.StringC;
|
139
|
+
}>;
|
140
|
+
}>, t.TypeC<{
|
141
|
+
type: t.LiteralC<"no_action">;
|
142
|
+
}>, t.TypeC<{
|
143
|
+
type: t.LiteralC<"click">;
|
144
|
+
value: t.StringC;
|
145
|
+
}>, t.IntersectionC<[t.TypeC<{
|
146
|
+
type: t.LiteralC<"link">;
|
147
|
+
value: t.StringC;
|
148
|
+
}>, t.PartialC<{
|
149
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
150
|
+
}>]>]>;
|
151
|
+
}>, t.NullC]>;
|
152
|
+
}>]>>;
|
153
|
+
is_live: t.BooleanC;
|
154
|
+
}>, t.TypeC<{
|
155
|
+
form_factor: t.UnionC<[t.TypeC<{
|
156
|
+
type: t.LiteralC<"modal">;
|
157
|
+
}>, t.TypeC<{
|
158
|
+
type: t.LiteralC<"popover">;
|
159
|
+
position: t.UnionC<[t.LiteralC<"top-left">, t.LiteralC<"top-right">, t.LiteralC<"bottom-right">, t.LiteralC<"bottom-left">, t.LiteralC<"center">]>;
|
160
|
+
}>, t.IntersectionC<[t.TypeC<{
|
161
|
+
type: t.LiteralC<"pin">;
|
162
|
+
anchor: t.StringC;
|
163
|
+
}>, t.PartialC<{
|
164
|
+
is_open_by_default: t.BooleanC;
|
165
|
+
offset: t.TypeC<{
|
166
|
+
x: t.StringC;
|
167
|
+
y: t.StringC;
|
168
|
+
}>;
|
169
|
+
}>]>]>;
|
170
|
+
}>]>;
|
171
|
+
export declare const NudgeV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
172
|
+
slug: t.StringC;
|
173
|
+
id: t.UnionC<[t.NumberC, t.StringC]>;
|
174
|
+
organization: t.StringC;
|
175
|
+
show_expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
|
176
|
+
trigger: t.UnionC<[t.TypeC<{
|
177
|
+
type: t.LiteralC<"when_conditions_pass">;
|
178
|
+
}>, t.TypeC<{
|
179
|
+
type: t.LiteralC<"on_command_execution">;
|
180
|
+
meta: t.TypeC<{
|
181
|
+
command: t.StringC;
|
182
|
+
}>;
|
183
|
+
}>, t.TypeC<{
|
184
|
+
type: t.LiteralC<"on_event">;
|
185
|
+
meta: t.TypeC<{
|
186
|
+
event: t.StringC;
|
187
|
+
}>;
|
188
|
+
}>]>;
|
189
|
+
frequency_limit: t.UnionC<[t.LiteralC<"no_limit">, t.LiteralC<"once_per_session">, t.LiteralC<"once_per_user">, t.LiteralC<"until_interaction">]>;
|
190
|
+
steps: t.ArrayC<t.IntersectionC<[t.TypeC<{
|
191
|
+
id: t.NumberC;
|
192
|
+
title: t.StringC;
|
193
|
+
content: t.ArrayC<t.UnionC<[t.TypeC<{
|
194
|
+
type: t.LiteralC<"markdown">;
|
195
|
+
meta: t.TypeC<{
|
196
|
+
value: t.StringC;
|
197
|
+
}>;
|
198
|
+
}>, t.TypeC<{
|
199
|
+
type: t.LiteralC<"image">;
|
200
|
+
meta: t.TypeC<{
|
201
|
+
src: t.StringC;
|
202
|
+
file_name: t.StringC;
|
203
|
+
size: t.StringC;
|
204
|
+
}>;
|
205
|
+
}>, t.TypeC<{
|
206
|
+
type: t.LiteralC<"video">;
|
207
|
+
meta: t.UnionC<[t.TypeC<{
|
208
|
+
type: t.LiteralC<"url">;
|
209
|
+
src: t.StringC;
|
210
|
+
}>, t.TypeC<{
|
211
|
+
type: t.LiteralC<"command">;
|
212
|
+
command: t.StringC;
|
213
|
+
}>]>;
|
214
|
+
}>, t.TypeC<{
|
215
|
+
type: t.LiteralC<"help_doc_command">;
|
216
|
+
meta: t.TypeC<{
|
217
|
+
command: t.StringC;
|
218
|
+
}>;
|
219
|
+
}>, t.TypeC<{
|
220
|
+
type: t.LiteralC<"button">;
|
221
|
+
meta: t.UnionC<[t.PartialC<{
|
222
|
+
label: t.StringC;
|
223
|
+
action: t.UnionC<[t.TypeC<{
|
224
|
+
type: t.LiteralC<"execute_command">;
|
225
|
+
meta: t.TypeC<{
|
226
|
+
command: t.StringC;
|
227
|
+
}>;
|
228
|
+
}>, t.TypeC<{
|
229
|
+
type: t.LiteralC<"no_action">;
|
230
|
+
}>, t.TypeC<{
|
231
|
+
type: t.LiteralC<"click">;
|
232
|
+
value: t.StringC;
|
233
|
+
}>, t.IntersectionC<[t.TypeC<{
|
234
|
+
type: t.LiteralC<"link">;
|
235
|
+
value: t.StringC;
|
236
|
+
}>, t.PartialC<{
|
237
|
+
operation: t.UnionC<[t.LiteralC<"router">, t.LiteralC<"self">, t.LiteralC<"blank">, t.UndefinedC]>;
|
238
|
+
}>]>]>;
|
239
|
+
}>, t.NullC]>;
|
240
|
+
}>]>>;
|
241
|
+
is_live: t.BooleanC;
|
242
|
+
}>, t.TypeC<{
|
243
|
+
form_factor: t.UnionC<[t.TypeC<{
|
244
|
+
type: t.LiteralC<"modal">;
|
245
|
+
}>, t.TypeC<{
|
246
|
+
type: t.LiteralC<"popover">;
|
247
|
+
position: t.UnionC<[t.LiteralC<"top-left">, t.LiteralC<"top-right">, t.LiteralC<"bottom-right">, t.LiteralC<"bottom-left">, t.LiteralC<"center">]>;
|
248
|
+
}>, t.IntersectionC<[t.TypeC<{
|
249
|
+
type: t.LiteralC<"pin">;
|
250
|
+
anchor: t.StringC;
|
251
|
+
}>, t.PartialC<{
|
252
|
+
is_open_by_default: t.BooleanC;
|
253
|
+
offset: t.TypeC<{
|
254
|
+
x: t.StringC;
|
255
|
+
y: t.StringC;
|
256
|
+
}>;
|
257
|
+
}>]>]>;
|
258
|
+
}>]>>;
|
259
|
+
is_live: t.BooleanC;
|
260
|
+
}>, t.PartialC<{
|
261
|
+
old_nudge_id: t.UnionC<[t.NumberC, t.NullC]>;
|
262
|
+
archived: t.BooleanC;
|
263
|
+
}>]>, t.TypeC<{
|
264
|
+
template_source: t.StringC;
|
265
|
+
}>]>;
|
266
|
+
export declare const OldNudgeBaseV: t.IntersectionC<[t.TypeC<{
|
3
267
|
id: t.NumberC;
|
4
268
|
organization: t.StringC;
|
5
269
|
slug: t.StringC;
|
@@ -18,25 +282,115 @@ export declare const NudgeV: t.IntersectionC<[t.TypeC<{
|
|
18
282
|
event: t.StringC;
|
19
283
|
}>;
|
20
284
|
}>]>;
|
21
|
-
on_select: t.TypeC<{
|
285
|
+
on_select: t.UnionC<[t.TypeC<{
|
286
|
+
type: t.LiteralC<"no_action">;
|
287
|
+
}>, t.TypeC<{
|
22
288
|
type: t.LiteralC<"execute_command">;
|
23
289
|
meta: t.TypeC<{
|
24
290
|
command: t.StringC;
|
25
291
|
}>;
|
26
|
-
}>;
|
292
|
+
}>]>;
|
27
293
|
timeout_ms: t.UnionC<[t.NumberC, t.NullC]>;
|
28
294
|
frequency_limit: t.UnionC<[t.LiteralC<"no_limit">, t.LiteralC<"once_per_session">, t.LiteralC<"once_per_user">, t.LiteralC<"until_interaction">]>;
|
29
295
|
}>, t.PartialC<{
|
30
296
|
title: t.StringC;
|
297
|
+
html: t.StringC;
|
31
298
|
cta: t.StringC;
|
32
299
|
is_live: t.BooleanC;
|
300
|
+
media: t.UnionC<[t.TypeC<{
|
301
|
+
type: t.LiteralC<"image">;
|
302
|
+
meta: t.TypeC<{
|
303
|
+
src: t.StringC;
|
304
|
+
file_name: t.StringC;
|
305
|
+
size: t.StringC;
|
306
|
+
}>;
|
307
|
+
}>, t.TypeC<{
|
308
|
+
type: t.LiteralC<"help_doc_command">;
|
309
|
+
meta: t.TypeC<{
|
310
|
+
command: t.StringC;
|
311
|
+
}>;
|
312
|
+
}>, t.NullC]>;
|
313
|
+
is_html_override: t.BooleanC;
|
314
|
+
call_custom_handler: t.BooleanC;
|
315
|
+
}>]>;
|
316
|
+
export declare const OldNudgeAdditionalV: t.TypeC<{
|
317
|
+
form_factor: t.UnionC<[t.TypeC<{
|
318
|
+
type: t.LiteralC<"modal">;
|
319
|
+
}>, t.TypeC<{
|
320
|
+
type: t.LiteralC<"popover">;
|
321
|
+
position: t.UnionC<[t.LiteralC<"top-left">, t.LiteralC<"top-right">, t.LiteralC<"bottom-right">, t.LiteralC<"bottom-left">, t.LiteralC<"center">]>;
|
322
|
+
}>, t.TypeC<{
|
323
|
+
type: t.LiteralC<"pin">;
|
324
|
+
anchor: t.StringC;
|
325
|
+
}>]>;
|
326
|
+
template_source: t.StringC;
|
327
|
+
}>;
|
328
|
+
export declare const OldNudgeV: t.IntersectionC<[t.IntersectionC<[t.TypeC<{
|
329
|
+
id: t.NumberC;
|
330
|
+
organization: t.StringC;
|
331
|
+
slug: t.StringC;
|
332
|
+
content: t.StringC;
|
333
|
+
show_expression: t.Type<import("./helpers/rules").RuleExpression, import("./helpers/rules").RuleExpression, unknown>;
|
334
|
+
trigger: t.UnionC<[t.TypeC<{
|
335
|
+
type: t.LiteralC<"when_conditions_pass">;
|
336
|
+
}>, t.TypeC<{
|
337
|
+
type: t.LiteralC<"on_command_execution">;
|
338
|
+
meta: t.TypeC<{
|
339
|
+
command: t.StringC;
|
340
|
+
}>;
|
341
|
+
}>, t.TypeC<{
|
342
|
+
type: t.LiteralC<"on_event">;
|
343
|
+
meta: t.TypeC<{
|
344
|
+
event: t.StringC;
|
345
|
+
}>;
|
346
|
+
}>]>;
|
347
|
+
on_select: t.UnionC<[t.TypeC<{
|
348
|
+
type: t.LiteralC<"no_action">;
|
349
|
+
}>, t.TypeC<{
|
350
|
+
type: t.LiteralC<"execute_command">;
|
351
|
+
meta: t.TypeC<{
|
352
|
+
command: t.StringC;
|
353
|
+
}>;
|
354
|
+
}>]>;
|
355
|
+
timeout_ms: t.UnionC<[t.NumberC, t.NullC]>;
|
356
|
+
frequency_limit: t.UnionC<[t.LiteralC<"no_limit">, t.LiteralC<"once_per_session">, t.LiteralC<"once_per_user">, t.LiteralC<"until_interaction">]>;
|
357
|
+
}>, t.PartialC<{
|
358
|
+
title: t.StringC;
|
359
|
+
html: t.StringC;
|
360
|
+
cta: t.StringC;
|
361
|
+
is_live: t.BooleanC;
|
362
|
+
media: t.UnionC<[t.TypeC<{
|
363
|
+
type: t.LiteralC<"image">;
|
364
|
+
meta: t.TypeC<{
|
365
|
+
src: t.StringC;
|
366
|
+
file_name: t.StringC;
|
367
|
+
size: t.StringC;
|
368
|
+
}>;
|
369
|
+
}>, t.TypeC<{
|
370
|
+
type: t.LiteralC<"help_doc_command">;
|
371
|
+
meta: t.TypeC<{
|
372
|
+
command: t.StringC;
|
373
|
+
}>;
|
374
|
+
}>, t.NullC]>;
|
375
|
+
is_html_override: t.BooleanC;
|
376
|
+
call_custom_handler: t.BooleanC;
|
377
|
+
}>]>, t.TypeC<{
|
378
|
+
form_factor: t.UnionC<[t.TypeC<{
|
379
|
+
type: t.LiteralC<"modal">;
|
380
|
+
}>, t.TypeC<{
|
381
|
+
type: t.LiteralC<"popover">;
|
382
|
+
position: t.UnionC<[t.LiteralC<"top-left">, t.LiteralC<"top-right">, t.LiteralC<"bottom-right">, t.LiteralC<"bottom-left">, t.LiteralC<"center">]>;
|
383
|
+
}>, t.TypeC<{
|
384
|
+
type: t.LiteralC<"pin">;
|
385
|
+
anchor: t.StringC;
|
386
|
+
}>]>;
|
387
|
+
template_source: t.StringC;
|
33
388
|
}>]>;
|
34
389
|
export declare class Nudge {
|
35
390
|
static decode: (data: any) => {
|
36
|
-
id: number;
|
37
|
-
organization: string;
|
38
391
|
slug: string;
|
39
|
-
|
392
|
+
id: string | number;
|
393
|
+
organization: string;
|
40
394
|
show_expression: import("./helpers/rules").RuleExpression;
|
41
395
|
trigger: {
|
42
396
|
type: "when_conditions_pass";
|
@@ -51,24 +405,87 @@ export declare class Nudge {
|
|
51
405
|
event: string;
|
52
406
|
};
|
53
407
|
};
|
54
|
-
on_select: {
|
55
|
-
type: "execute_command";
|
56
|
-
meta: {
|
57
|
-
command: string;
|
58
|
-
};
|
59
|
-
};
|
60
|
-
timeout_ms: number | null;
|
61
408
|
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
409
|
+
steps: ({
|
410
|
+
id: number;
|
411
|
+
title: string;
|
412
|
+
content: ({
|
413
|
+
type: "markdown";
|
414
|
+
meta: {
|
415
|
+
value: string;
|
416
|
+
};
|
417
|
+
} | {
|
418
|
+
type: "image";
|
419
|
+
meta: {
|
420
|
+
src: string;
|
421
|
+
file_name: string;
|
422
|
+
size: string;
|
423
|
+
};
|
424
|
+
} | {
|
425
|
+
type: "video";
|
426
|
+
meta: {
|
427
|
+
type: "url";
|
428
|
+
src: string;
|
429
|
+
} | {
|
430
|
+
type: "command";
|
431
|
+
command: string;
|
432
|
+
};
|
433
|
+
} | {
|
434
|
+
type: "help_doc_command";
|
435
|
+
meta: {
|
436
|
+
command: string;
|
437
|
+
};
|
438
|
+
} | {
|
439
|
+
type: "button";
|
440
|
+
meta: {
|
441
|
+
label?: string | undefined;
|
442
|
+
action?: {
|
443
|
+
type: "execute_command";
|
444
|
+
meta: {
|
445
|
+
command: string;
|
446
|
+
};
|
447
|
+
} | {
|
448
|
+
type: "no_action";
|
449
|
+
} | {
|
450
|
+
type: "click";
|
451
|
+
value: string;
|
452
|
+
} | ({
|
453
|
+
type: "link";
|
454
|
+
value: string;
|
455
|
+
} & {
|
456
|
+
operation?: "self" | "router" | "blank" | undefined;
|
457
|
+
}) | undefined;
|
458
|
+
} | null;
|
459
|
+
})[];
|
460
|
+
is_live: boolean;
|
461
|
+
} & {
|
462
|
+
form_factor: {
|
463
|
+
type: "modal";
|
464
|
+
} | {
|
465
|
+
type: "popover";
|
466
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
467
|
+
} | ({
|
468
|
+
type: "pin";
|
469
|
+
anchor: string;
|
470
|
+
} & {
|
471
|
+
is_open_by_default?: boolean | undefined;
|
472
|
+
offset?: {
|
473
|
+
x: string;
|
474
|
+
y: string;
|
475
|
+
} | undefined;
|
476
|
+
});
|
477
|
+
})[];
|
478
|
+
is_live: boolean;
|
62
479
|
} & {
|
63
|
-
|
64
|
-
|
65
|
-
|
480
|
+
old_nudge_id?: number | null | undefined;
|
481
|
+
archived?: boolean | undefined;
|
482
|
+
} & {
|
483
|
+
template_source: string;
|
66
484
|
};
|
67
485
|
static create: (object: {
|
68
|
-
id: number;
|
69
|
-
organization: string;
|
70
486
|
slug: string;
|
71
|
-
|
487
|
+
id: string | number;
|
488
|
+
organization: string;
|
72
489
|
show_expression: import("./helpers/rules").RuleExpression;
|
73
490
|
trigger: {
|
74
491
|
type: "when_conditions_pass";
|
@@ -83,23 +500,86 @@ export declare class Nudge {
|
|
83
500
|
event: string;
|
84
501
|
};
|
85
502
|
};
|
86
|
-
on_select: {
|
87
|
-
type: "execute_command";
|
88
|
-
meta: {
|
89
|
-
command: string;
|
90
|
-
};
|
91
|
-
};
|
92
|
-
timeout_ms: number | null;
|
93
503
|
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
504
|
+
steps: ({
|
505
|
+
id: number;
|
506
|
+
title: string;
|
507
|
+
content: ({
|
508
|
+
type: "markdown";
|
509
|
+
meta: {
|
510
|
+
value: string;
|
511
|
+
};
|
512
|
+
} | {
|
513
|
+
type: "image";
|
514
|
+
meta: {
|
515
|
+
src: string;
|
516
|
+
file_name: string;
|
517
|
+
size: string;
|
518
|
+
};
|
519
|
+
} | {
|
520
|
+
type: "video";
|
521
|
+
meta: {
|
522
|
+
type: "url";
|
523
|
+
src: string;
|
524
|
+
} | {
|
525
|
+
type: "command";
|
526
|
+
command: string;
|
527
|
+
};
|
528
|
+
} | {
|
529
|
+
type: "help_doc_command";
|
530
|
+
meta: {
|
531
|
+
command: string;
|
532
|
+
};
|
533
|
+
} | {
|
534
|
+
type: "button";
|
535
|
+
meta: {
|
536
|
+
label?: string | undefined;
|
537
|
+
action?: {
|
538
|
+
type: "execute_command";
|
539
|
+
meta: {
|
540
|
+
command: string;
|
541
|
+
};
|
542
|
+
} | {
|
543
|
+
type: "no_action";
|
544
|
+
} | {
|
545
|
+
type: "click";
|
546
|
+
value: string;
|
547
|
+
} | ({
|
548
|
+
type: "link";
|
549
|
+
value: string;
|
550
|
+
} & {
|
551
|
+
operation?: "self" | "router" | "blank" | undefined;
|
552
|
+
}) | undefined;
|
553
|
+
} | null;
|
554
|
+
})[];
|
555
|
+
is_live: boolean;
|
556
|
+
} & {
|
557
|
+
form_factor: {
|
558
|
+
type: "modal";
|
559
|
+
} | {
|
560
|
+
type: "popover";
|
561
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
562
|
+
} | ({
|
563
|
+
type: "pin";
|
564
|
+
anchor: string;
|
565
|
+
} & {
|
566
|
+
is_open_by_default?: boolean | undefined;
|
567
|
+
offset?: {
|
568
|
+
x: string;
|
569
|
+
y: string;
|
570
|
+
} | undefined;
|
571
|
+
});
|
572
|
+
})[];
|
573
|
+
is_live: boolean;
|
574
|
+
} & {
|
575
|
+
old_nudge_id?: number | null | undefined;
|
576
|
+
archived?: boolean | undefined;
|
94
577
|
} & {
|
95
|
-
|
96
|
-
cta?: string | undefined;
|
97
|
-
is_live?: boolean | undefined;
|
578
|
+
template_source: string;
|
98
579
|
}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
99
|
-
id: number;
|
100
|
-
organization: string;
|
101
580
|
slug: string;
|
102
|
-
|
581
|
+
id: string | number;
|
582
|
+
organization: string;
|
103
583
|
show_expression: import("./helpers/rules").RuleExpression;
|
104
584
|
trigger: {
|
105
585
|
type: "when_conditions_pass";
|
@@ -114,24 +594,87 @@ export declare class Nudge {
|
|
114
594
|
event: string;
|
115
595
|
};
|
116
596
|
};
|
117
|
-
on_select: {
|
118
|
-
type: "execute_command";
|
119
|
-
meta: {
|
120
|
-
command: string;
|
121
|
-
};
|
122
|
-
};
|
123
|
-
timeout_ms: number | null;
|
124
597
|
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
598
|
+
steps: ({
|
599
|
+
id: number;
|
600
|
+
title: string;
|
601
|
+
content: ({
|
602
|
+
type: "markdown";
|
603
|
+
meta: {
|
604
|
+
value: string;
|
605
|
+
};
|
606
|
+
} | {
|
607
|
+
type: "image";
|
608
|
+
meta: {
|
609
|
+
src: string;
|
610
|
+
file_name: string;
|
611
|
+
size: string;
|
612
|
+
};
|
613
|
+
} | {
|
614
|
+
type: "video";
|
615
|
+
meta: {
|
616
|
+
type: "url";
|
617
|
+
src: string;
|
618
|
+
} | {
|
619
|
+
type: "command";
|
620
|
+
command: string;
|
621
|
+
};
|
622
|
+
} | {
|
623
|
+
type: "help_doc_command";
|
624
|
+
meta: {
|
625
|
+
command: string;
|
626
|
+
};
|
627
|
+
} | {
|
628
|
+
type: "button";
|
629
|
+
meta: {
|
630
|
+
label?: string | undefined;
|
631
|
+
action?: {
|
632
|
+
type: "execute_command";
|
633
|
+
meta: {
|
634
|
+
command: string;
|
635
|
+
};
|
636
|
+
} | {
|
637
|
+
type: "no_action";
|
638
|
+
} | {
|
639
|
+
type: "click";
|
640
|
+
value: string;
|
641
|
+
} | ({
|
642
|
+
type: "link";
|
643
|
+
value: string;
|
644
|
+
} & {
|
645
|
+
operation?: "self" | "router" | "blank" | undefined;
|
646
|
+
}) | undefined;
|
647
|
+
} | null;
|
648
|
+
})[];
|
649
|
+
is_live: boolean;
|
650
|
+
} & {
|
651
|
+
form_factor: {
|
652
|
+
type: "modal";
|
653
|
+
} | {
|
654
|
+
type: "popover";
|
655
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
656
|
+
} | ({
|
657
|
+
type: "pin";
|
658
|
+
anchor: string;
|
659
|
+
} & {
|
660
|
+
is_open_by_default?: boolean | undefined;
|
661
|
+
offset?: {
|
662
|
+
x: string;
|
663
|
+
y: string;
|
664
|
+
} | undefined;
|
665
|
+
});
|
666
|
+
})[];
|
667
|
+
is_live: boolean;
|
125
668
|
} & {
|
126
|
-
|
127
|
-
|
128
|
-
|
669
|
+
old_nudge_id?: number | null | undefined;
|
670
|
+
archived?: boolean | undefined;
|
671
|
+
} & {
|
672
|
+
template_source: string;
|
129
673
|
}>;
|
130
674
|
static update: (object: {
|
131
|
-
id: number;
|
132
|
-
organization: string;
|
133
675
|
slug: string;
|
134
|
-
|
676
|
+
id: string | number;
|
677
|
+
organization: string;
|
135
678
|
show_expression: import("./helpers/rules").RuleExpression;
|
136
679
|
trigger: {
|
137
680
|
type: "when_conditions_pass";
|
@@ -146,23 +689,86 @@ export declare class Nudge {
|
|
146
689
|
event: string;
|
147
690
|
};
|
148
691
|
};
|
149
|
-
on_select: {
|
150
|
-
type: "execute_command";
|
151
|
-
meta: {
|
152
|
-
command: string;
|
153
|
-
};
|
154
|
-
};
|
155
|
-
timeout_ms: number | null;
|
156
692
|
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
693
|
+
steps: ({
|
694
|
+
id: number;
|
695
|
+
title: string;
|
696
|
+
content: ({
|
697
|
+
type: "markdown";
|
698
|
+
meta: {
|
699
|
+
value: string;
|
700
|
+
};
|
701
|
+
} | {
|
702
|
+
type: "image";
|
703
|
+
meta: {
|
704
|
+
src: string;
|
705
|
+
file_name: string;
|
706
|
+
size: string;
|
707
|
+
};
|
708
|
+
} | {
|
709
|
+
type: "video";
|
710
|
+
meta: {
|
711
|
+
type: "url";
|
712
|
+
src: string;
|
713
|
+
} | {
|
714
|
+
type: "command";
|
715
|
+
command: string;
|
716
|
+
};
|
717
|
+
} | {
|
718
|
+
type: "help_doc_command";
|
719
|
+
meta: {
|
720
|
+
command: string;
|
721
|
+
};
|
722
|
+
} | {
|
723
|
+
type: "button";
|
724
|
+
meta: {
|
725
|
+
label?: string | undefined;
|
726
|
+
action?: {
|
727
|
+
type: "execute_command";
|
728
|
+
meta: {
|
729
|
+
command: string;
|
730
|
+
};
|
731
|
+
} | {
|
732
|
+
type: "no_action";
|
733
|
+
} | {
|
734
|
+
type: "click";
|
735
|
+
value: string;
|
736
|
+
} | ({
|
737
|
+
type: "link";
|
738
|
+
value: string;
|
739
|
+
} & {
|
740
|
+
operation?: "self" | "router" | "blank" | undefined;
|
741
|
+
}) | undefined;
|
742
|
+
} | null;
|
743
|
+
})[];
|
744
|
+
is_live: boolean;
|
745
|
+
} & {
|
746
|
+
form_factor: {
|
747
|
+
type: "modal";
|
748
|
+
} | {
|
749
|
+
type: "popover";
|
750
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
751
|
+
} | ({
|
752
|
+
type: "pin";
|
753
|
+
anchor: string;
|
754
|
+
} & {
|
755
|
+
is_open_by_default?: boolean | undefined;
|
756
|
+
offset?: {
|
757
|
+
x: string;
|
758
|
+
y: string;
|
759
|
+
} | undefined;
|
760
|
+
});
|
761
|
+
})[];
|
762
|
+
is_live: boolean;
|
157
763
|
} & {
|
158
|
-
|
159
|
-
|
160
|
-
|
764
|
+
old_nudge_id?: number | null | undefined;
|
765
|
+
archived?: boolean | undefined;
|
766
|
+
} & {
|
767
|
+
template_source: string;
|
161
768
|
}, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<{
|
162
|
-
id: number;
|
163
|
-
organization: string;
|
164
769
|
slug: string;
|
165
|
-
|
770
|
+
id: string | number;
|
771
|
+
organization: string;
|
166
772
|
show_expression: import("./helpers/rules").RuleExpression;
|
167
773
|
trigger: {
|
168
774
|
type: "when_conditions_pass";
|
@@ -177,25 +783,88 @@ export declare class Nudge {
|
|
177
783
|
event: string;
|
178
784
|
};
|
179
785
|
};
|
180
|
-
on_select: {
|
181
|
-
type: "execute_command";
|
182
|
-
meta: {
|
183
|
-
command: string;
|
184
|
-
};
|
185
|
-
};
|
186
|
-
timeout_ms: number | null;
|
187
786
|
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
787
|
+
steps: ({
|
788
|
+
id: number;
|
789
|
+
title: string;
|
790
|
+
content: ({
|
791
|
+
type: "markdown";
|
792
|
+
meta: {
|
793
|
+
value: string;
|
794
|
+
};
|
795
|
+
} | {
|
796
|
+
type: "image";
|
797
|
+
meta: {
|
798
|
+
src: string;
|
799
|
+
file_name: string;
|
800
|
+
size: string;
|
801
|
+
};
|
802
|
+
} | {
|
803
|
+
type: "video";
|
804
|
+
meta: {
|
805
|
+
type: "url";
|
806
|
+
src: string;
|
807
|
+
} | {
|
808
|
+
type: "command";
|
809
|
+
command: string;
|
810
|
+
};
|
811
|
+
} | {
|
812
|
+
type: "help_doc_command";
|
813
|
+
meta: {
|
814
|
+
command: string;
|
815
|
+
};
|
816
|
+
} | {
|
817
|
+
type: "button";
|
818
|
+
meta: {
|
819
|
+
label?: string | undefined;
|
820
|
+
action?: {
|
821
|
+
type: "execute_command";
|
822
|
+
meta: {
|
823
|
+
command: string;
|
824
|
+
};
|
825
|
+
} | {
|
826
|
+
type: "no_action";
|
827
|
+
} | {
|
828
|
+
type: "click";
|
829
|
+
value: string;
|
830
|
+
} | ({
|
831
|
+
type: "link";
|
832
|
+
value: string;
|
833
|
+
} & {
|
834
|
+
operation?: "self" | "router" | "blank" | undefined;
|
835
|
+
}) | undefined;
|
836
|
+
} | null;
|
837
|
+
})[];
|
838
|
+
is_live: boolean;
|
839
|
+
} & {
|
840
|
+
form_factor: {
|
841
|
+
type: "modal";
|
842
|
+
} | {
|
843
|
+
type: "popover";
|
844
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
845
|
+
} | ({
|
846
|
+
type: "pin";
|
847
|
+
anchor: string;
|
848
|
+
} & {
|
849
|
+
is_open_by_default?: boolean | undefined;
|
850
|
+
offset?: {
|
851
|
+
x: string;
|
852
|
+
y: string;
|
853
|
+
} | undefined;
|
854
|
+
});
|
855
|
+
})[];
|
856
|
+
is_live: boolean;
|
188
857
|
} & {
|
189
|
-
|
190
|
-
|
191
|
-
|
858
|
+
old_nudge_id?: number | null | undefined;
|
859
|
+
archived?: boolean | undefined;
|
860
|
+
} & {
|
861
|
+
template_source: string;
|
192
862
|
}>;
|
193
863
|
static delete: (id: string | number, onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<void>;
|
194
864
|
static list: (onSuccess?: (() => void) | undefined, onError?: ((err: string) => void) | undefined) => Promise<({
|
195
|
-
id: number;
|
196
|
-
organization: string;
|
197
865
|
slug: string;
|
198
|
-
|
866
|
+
id: string | number;
|
867
|
+
organization: string;
|
199
868
|
show_expression: import("./helpers/rules").RuleExpression;
|
200
869
|
trigger: {
|
201
870
|
type: "when_conditions_pass";
|
@@ -210,27 +879,90 @@ export declare class Nudge {
|
|
210
879
|
event: string;
|
211
880
|
};
|
212
881
|
};
|
213
|
-
on_select: {
|
214
|
-
type: "execute_command";
|
215
|
-
meta: {
|
216
|
-
command: string;
|
217
|
-
};
|
218
|
-
};
|
219
|
-
timeout_ms: number | null;
|
220
882
|
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
883
|
+
steps: ({
|
884
|
+
id: number;
|
885
|
+
title: string;
|
886
|
+
content: ({
|
887
|
+
type: "markdown";
|
888
|
+
meta: {
|
889
|
+
value: string;
|
890
|
+
};
|
891
|
+
} | {
|
892
|
+
type: "image";
|
893
|
+
meta: {
|
894
|
+
src: string;
|
895
|
+
file_name: string;
|
896
|
+
size: string;
|
897
|
+
};
|
898
|
+
} | {
|
899
|
+
type: "video";
|
900
|
+
meta: {
|
901
|
+
type: "url";
|
902
|
+
src: string;
|
903
|
+
} | {
|
904
|
+
type: "command";
|
905
|
+
command: string;
|
906
|
+
};
|
907
|
+
} | {
|
908
|
+
type: "help_doc_command";
|
909
|
+
meta: {
|
910
|
+
command: string;
|
911
|
+
};
|
912
|
+
} | {
|
913
|
+
type: "button";
|
914
|
+
meta: {
|
915
|
+
label?: string | undefined;
|
916
|
+
action?: {
|
917
|
+
type: "execute_command";
|
918
|
+
meta: {
|
919
|
+
command: string;
|
920
|
+
};
|
921
|
+
} | {
|
922
|
+
type: "no_action";
|
923
|
+
} | {
|
924
|
+
type: "click";
|
925
|
+
value: string;
|
926
|
+
} | ({
|
927
|
+
type: "link";
|
928
|
+
value: string;
|
929
|
+
} & {
|
930
|
+
operation?: "self" | "router" | "blank" | undefined;
|
931
|
+
}) | undefined;
|
932
|
+
} | null;
|
933
|
+
})[];
|
934
|
+
is_live: boolean;
|
935
|
+
} & {
|
936
|
+
form_factor: {
|
937
|
+
type: "modal";
|
938
|
+
} | {
|
939
|
+
type: "popover";
|
940
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
941
|
+
} | ({
|
942
|
+
type: "pin";
|
943
|
+
anchor: string;
|
944
|
+
} & {
|
945
|
+
is_open_by_default?: boolean | undefined;
|
946
|
+
offset?: {
|
947
|
+
x: string;
|
948
|
+
y: string;
|
949
|
+
} | undefined;
|
950
|
+
});
|
951
|
+
})[];
|
952
|
+
is_live: boolean;
|
953
|
+
} & {
|
954
|
+
old_nudge_id?: number | null | undefined;
|
955
|
+
archived?: boolean | undefined;
|
221
956
|
} & {
|
222
|
-
|
223
|
-
cta?: string | undefined;
|
224
|
-
is_live?: boolean | undefined;
|
957
|
+
template_source: string;
|
225
958
|
})[]>;
|
226
959
|
static read: (arg0: string, params?: Record<string, string> | undefined, callbacks?: {
|
227
960
|
onSuccess?: (() => void) | undefined;
|
228
961
|
onError?: ((err: string) => void) | undefined;
|
229
962
|
} | undefined) => Promise<{
|
230
|
-
id: number;
|
231
|
-
organization: string;
|
232
963
|
slug: string;
|
233
|
-
|
964
|
+
id: string | number;
|
965
|
+
organization: string;
|
234
966
|
show_expression: import("./helpers/rules").RuleExpression;
|
235
967
|
trigger: {
|
236
968
|
type: "when_conditions_pass";
|
@@ -245,17 +977,81 @@ export declare class Nudge {
|
|
245
977
|
event: string;
|
246
978
|
};
|
247
979
|
};
|
248
|
-
on_select: {
|
249
|
-
type: "execute_command";
|
250
|
-
meta: {
|
251
|
-
command: string;
|
252
|
-
};
|
253
|
-
};
|
254
|
-
timeout_ms: number | null;
|
255
980
|
frequency_limit: "no_limit" | "once_per_session" | "once_per_user" | "until_interaction";
|
981
|
+
steps: ({
|
982
|
+
id: number;
|
983
|
+
title: string;
|
984
|
+
content: ({
|
985
|
+
type: "markdown";
|
986
|
+
meta: {
|
987
|
+
value: string;
|
988
|
+
};
|
989
|
+
} | {
|
990
|
+
type: "image";
|
991
|
+
meta: {
|
992
|
+
src: string;
|
993
|
+
file_name: string;
|
994
|
+
size: string;
|
995
|
+
};
|
996
|
+
} | {
|
997
|
+
type: "video";
|
998
|
+
meta: {
|
999
|
+
type: "url";
|
1000
|
+
src: string;
|
1001
|
+
} | {
|
1002
|
+
type: "command";
|
1003
|
+
command: string;
|
1004
|
+
};
|
1005
|
+
} | {
|
1006
|
+
type: "help_doc_command";
|
1007
|
+
meta: {
|
1008
|
+
command: string;
|
1009
|
+
};
|
1010
|
+
} | {
|
1011
|
+
type: "button";
|
1012
|
+
meta: {
|
1013
|
+
label?: string | undefined;
|
1014
|
+
action?: {
|
1015
|
+
type: "execute_command";
|
1016
|
+
meta: {
|
1017
|
+
command: string;
|
1018
|
+
};
|
1019
|
+
} | {
|
1020
|
+
type: "no_action";
|
1021
|
+
} | {
|
1022
|
+
type: "click";
|
1023
|
+
value: string;
|
1024
|
+
} | ({
|
1025
|
+
type: "link";
|
1026
|
+
value: string;
|
1027
|
+
} & {
|
1028
|
+
operation?: "self" | "router" | "blank" | undefined;
|
1029
|
+
}) | undefined;
|
1030
|
+
} | null;
|
1031
|
+
})[];
|
1032
|
+
is_live: boolean;
|
1033
|
+
} & {
|
1034
|
+
form_factor: {
|
1035
|
+
type: "modal";
|
1036
|
+
} | {
|
1037
|
+
type: "popover";
|
1038
|
+
position: "center" | "top-left" | "top-right" | "bottom-right" | "bottom-left";
|
1039
|
+
} | ({
|
1040
|
+
type: "pin";
|
1041
|
+
anchor: string;
|
1042
|
+
} & {
|
1043
|
+
is_open_by_default?: boolean | undefined;
|
1044
|
+
offset?: {
|
1045
|
+
x: string;
|
1046
|
+
y: string;
|
1047
|
+
} | undefined;
|
1048
|
+
});
|
1049
|
+
})[];
|
1050
|
+
is_live: boolean;
|
1051
|
+
} & {
|
1052
|
+
old_nudge_id?: number | null | undefined;
|
1053
|
+
archived?: boolean | undefined;
|
256
1054
|
} & {
|
257
|
-
|
258
|
-
cta?: string | undefined;
|
259
|
-
is_live?: boolean | undefined;
|
1055
|
+
template_source: string;
|
260
1056
|
}>;
|
261
1057
|
}
|