@emailmaker/emailmaker 1.0.91 → 1.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -2
- package/asset-manifest.json +31 -26
- package/emailmaker-esm.js +1 -1
- package/emailmaker.js +1 -1
- package/iframe/429.js +1 -1
- package/iframe/766.js +1 -1
- package/iframe/iframe-eblock.bd2a2a73469f802abf17.html +1 -0
- package/iframe/iframe.bd2a2a73469f802abf17.html +1 -0
- package/iframe/js/826.c1a995fb.js +1 -0
- package/iframe/sandbox-eblock.js +1 -1
- package/iframe/sandbox.js +1 -1
- package/package.json +1 -1
- package/plugin.html +1 -1
- package/plugin_blocks_test.html +1 -1
- package/plugin_default.html +1 -1
- package/plugin_idigital.html +1 -1
- package/plugin_nota.html +1 -1
- package/plugin_s.html +1 -1
- package/static/css/2458.05166c0a.chunk.css +1 -0
- package/static/css/6501.e131603e.chunk.css +1 -0
- package/static/css/9272.a4e58dd0.chunk.css +1 -0
- package/static/js/1390.87d39fe1.js +2 -0
- package/static/js/{1538.c37b25fc.chunk.js → 1538.06811304.chunk.js} +2 -2
- package/static/js/241.9aaa5790.js +2 -0
- package/static/js/{6498.bfe18798.js.LICENSE.txt → 241.9aaa5790.js.LICENSE.txt} +1 -1
- package/static/js/2458.504bef1c.chunk.js +2 -0
- package/static/js/3017.2e1f6413.chunk.js +1 -0
- package/static/js/3085.b9d27236.chunk.js +2 -0
- package/static/js/4560.b03bbb3f.chunk.js +2 -0
- package/static/js/4560.b03bbb3f.chunk.js.LICENSE.txt +101 -0
- package/static/js/6501.616f4dec.chunk.js +1 -0
- package/static/js/7091.d1a56e4b.js +1 -0
- package/static/js/7729.13361a78.js +1 -0
- package/static/js/8285.c8bdf11b.js +2 -0
- package/static/js/{1302.39ea1b43.js.LICENSE.txt → 8285.c8bdf11b.js.LICENSE.txt} +1 -14
- package/static/js/8408.459779d0.js +2 -0
- package/static/js/8408.459779d0.js.LICENSE.txt +9 -0
- package/static/js/898.2dcef4f3.js +2 -0
- package/static/js/9272.d5a35d82.chunk.js +1 -0
- package/static/js/9960.6dcf66f0.chunk.js +2 -0
- package/static/js/9960.6dcf66f0.chunk.js.LICENSE.txt +30 -0
- package/static/js/emailmaker_core.1c694217.js +2 -0
- package/static/media/project-email-back.0ce470def19ce7c063e0.svg +29 -0
- package/translations.pot +39 -15
- package/emailmaker.d.ts +0 -1292
- package/iframe/iframe-eblock.71b56f41e572450c6715.html +0 -1
- package/iframe/iframe.71b56f41e572450c6715.html +0 -1
- package/iframe/js/826.f9cbc257.js +0 -1
- package/static/css/3397.f2d44d65.chunk.css +0 -1
- package/static/js/1302.39ea1b43.js +0 -2
- package/static/js/3017.1bbeda89.chunk.js +0 -1
- package/static/js/3085.59662838.chunk.js +0 -2
- package/static/js/3273.6cedb8e0.js +0 -2
- package/static/js/3397.19e55db9.chunk.js +0 -2
- package/static/js/3758.c4bda075.js +0 -2
- package/static/js/3927.eb1dc39e.js +0 -1
- package/static/js/4138.7f4f36d7.js +0 -1
- package/static/js/6498.bfe18798.js +0 -2
- package/static/js/985.162f7f7b.js +0 -1
- package/static/js/9880.74dc5e4f.chunk.js +0 -2
- package/static/js/9880.74dc5e4f.chunk.js.LICENSE.txt +0 -9
- package/static/js/emailmaker_core.4a93d2c5.js +0 -2
- /package/iframe/js/{826.f9cbc257.js.LICENSE.txt → 826.c1a995fb.js.LICENSE.txt} +0 -0
- /package/static/js/{3273.6cedb8e0.js.LICENSE.txt → 1390.87d39fe1.js.LICENSE.txt} +0 -0
- /package/static/js/{1538.c37b25fc.chunk.js.LICENSE.txt → 1538.06811304.chunk.js.LICENSE.txt} +0 -0
- /package/static/js/{3397.19e55db9.chunk.js.LICENSE.txt → 2458.504bef1c.chunk.js.LICENSE.txt} +0 -0
- /package/static/js/{3085.59662838.chunk.js.LICENSE.txt → 3085.b9d27236.chunk.js.LICENSE.txt} +0 -0
- /package/static/js/{3758.c4bda075.js.LICENSE.txt → 898.2dcef4f3.js.LICENSE.txt} +0 -0
- /package/static/js/{emailmaker_core.4a93d2c5.js.LICENSE.txt → emailmaker_core.1c694217.js.LICENSE.txt} +0 -0
package/emailmaker.d.ts
DELETED
|
@@ -1,1292 +0,0 @@
|
|
|
1
|
-
type MayBePromise<T> = T | Promise<T>;
|
|
2
|
-
type PromiseWrap<T> = Promise<Awaited<T>>;
|
|
3
|
-
type RecursivePartial<T> = {
|
|
4
|
-
[K in keyof T]?: T[K] extends number | string | boolean | bigint ? T[K] : RecursivePartial<T[K]>;
|
|
5
|
-
};
|
|
6
|
-
type AppListener<Value, Result = void> = (value: Value) => MayBePromise<Result>;
|
|
7
|
-
type AppEvent<Listener extends AppListener<any, any>> = (
|
|
8
|
-
listener: Listener,
|
|
9
|
-
priority?: number,
|
|
10
|
-
thisArg?: any,
|
|
11
|
-
) => () => void;
|
|
12
|
-
|
|
13
|
-
// type UploadEventPayload = { file: File; file_url: string };
|
|
14
|
-
// type UploadListener<Cancelable = true> = Listener<UploadEventPayload, Cancelable>;
|
|
15
|
-
// type UploadEvent<Cancelable = true> = AppEvent<UploadEventPayload, Cancelable>;
|
|
16
|
-
|
|
17
|
-
type SaveEventPayload<T> = {
|
|
18
|
-
/** source of the event */
|
|
19
|
-
source?: string;
|
|
20
|
-
/** previous value */
|
|
21
|
-
prev?: T;
|
|
22
|
-
/** changed fields */
|
|
23
|
-
patch: Partial<T>;
|
|
24
|
-
/** next value */
|
|
25
|
-
value: T;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
type CreateEventPayload<T> = {
|
|
29
|
-
/** source of the event */
|
|
30
|
-
source?: string;
|
|
31
|
-
/** next value */
|
|
32
|
-
value: T;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
type RemoveEventPayload<T> = {
|
|
36
|
-
/** source of the event */
|
|
37
|
-
source?: string;
|
|
38
|
-
/** removed value */
|
|
39
|
-
value: T;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
type MergeTagGroup = {
|
|
43
|
-
type?: 'group';
|
|
44
|
-
label: string;
|
|
45
|
-
value: string;
|
|
46
|
-
children?: MergeTag[];
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
type MergeTagItem = {
|
|
50
|
-
label: string;
|
|
51
|
-
value: string;
|
|
52
|
-
};
|
|
53
|
-
type MergeTag = MergeTagGroup | MergeTagItem;
|
|
54
|
-
|
|
55
|
-
type SaveListener<T> = AppListener<SaveEventPayload<T>, T | undefined | void>;
|
|
56
|
-
type SaveEvent<T> = AppEvent<SaveListener<T>>;
|
|
57
|
-
type RemoveListener<T> = AppListener<RemoveEventPayload<T>>;
|
|
58
|
-
type RemoveEvent<T> = AppEvent<RemoveListener<T>>;
|
|
59
|
-
type CreateListener<T> = AppListener<CreateEventPayload<T>, T | undefined | void>;
|
|
60
|
-
type CreateEvent<T> = AppEvent<CreateListener<T>>;
|
|
61
|
-
|
|
62
|
-
interface ParsedAMP {
|
|
63
|
-
code: string;
|
|
64
|
-
html: string;
|
|
65
|
-
ampHtml: string;
|
|
66
|
-
}
|
|
67
|
-
type Notify = {
|
|
68
|
-
type?: 'success' | 'info' | 'error' | 'warning';
|
|
69
|
-
message: string | HTMLElement;
|
|
70
|
-
description?: string | HTMLElement;
|
|
71
|
-
btn?: string | HTMLElement;
|
|
72
|
-
onClose?: () => void;
|
|
73
|
-
duration?: number | null;
|
|
74
|
-
icon?: string | HTMLElement;
|
|
75
|
-
placement?: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
|
76
|
-
style?: any;
|
|
77
|
-
className?: string;
|
|
78
|
-
onClick?: () => void;
|
|
79
|
-
closeIcon?: boolean | string | HTMLElement;
|
|
80
|
-
props?: any;
|
|
81
|
-
role?: 'alert' | 'status';
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
type EmailDesc = {
|
|
85
|
-
id?: string;
|
|
86
|
-
title?: string;
|
|
87
|
-
code?: string;
|
|
88
|
-
subject?: string;
|
|
89
|
-
preheader?: string;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
type BlockDesc = {
|
|
93
|
-
id?: string;
|
|
94
|
-
title?: string;
|
|
95
|
-
code?: string;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
interface ISelection {
|
|
99
|
-
selectionStartLineNumber: number;
|
|
100
|
-
selectionStartColumn: number;
|
|
101
|
-
positionLineNumber: number;
|
|
102
|
-
positionColumn: number;
|
|
103
|
-
}
|
|
104
|
-
interface ISingleModelEditStackData {
|
|
105
|
-
afterCursorState: ISelection[];
|
|
106
|
-
afterVersionId: number;
|
|
107
|
-
beforeCursorState: ISelection[];
|
|
108
|
-
beforeVersionId: number;
|
|
109
|
-
changes: {
|
|
110
|
-
oldPosition: number;
|
|
111
|
-
oldText: string;
|
|
112
|
-
newPosition: number;
|
|
113
|
-
newText: string;
|
|
114
|
-
}[];
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
interface IFrameErrorInfo {
|
|
118
|
-
future: ISingleModelEditStackData[];
|
|
119
|
-
past: ISingleModelEditStackData[];
|
|
120
|
-
errorResolved: boolean;
|
|
121
|
-
message: string;
|
|
122
|
-
text: string;
|
|
123
|
-
stack: string;
|
|
124
|
-
userId: string;
|
|
125
|
-
entityId: string;
|
|
126
|
-
entityType: 'email' | 'block';
|
|
127
|
-
sentryEventId: string;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
declare namespace Notify {
|
|
131
|
-
type Error = { innerException?: any } & (
|
|
132
|
-
| { id?: ''; data?: any }
|
|
133
|
-
| { id: 'EMAIL_CREATING_ERROR'; data: EmailDesc }
|
|
134
|
-
| { id: 'EMAIL_EDITING_ERROR'; data: EmailDesc }
|
|
135
|
-
| { id: 'FOLDER_CREATE_ERROR'; data: string }
|
|
136
|
-
| { id: 'EMAIL_CLONING_ERROR'; data: EmailDesc }
|
|
137
|
-
| { id: 'TAG_CREATING_ERROR'; data: string }
|
|
138
|
-
| { id: 'EMAIL_ACCESS_TO_LOCKED_ERROR'; data: EmailDesc }
|
|
139
|
-
| { id: 'EMAIL_TOO_MANY_TAGS_ERROR'; data: EmailDesc }
|
|
140
|
-
| { id: 'BLOCK_GET_ERROR'; data: {} }
|
|
141
|
-
| { id: 'BLOCK_ACCESS_TO_LOCKED_ERROR'; data: BlockDesc }
|
|
142
|
-
| { id: 'BLOCK_TOO_MANY_TAGS_ERROR'; data: BlockDesc }
|
|
143
|
-
| { id: 'BLOCK_CLONING_ERROR'; data: BlockDesc }
|
|
144
|
-
| { id: 'AI_IMAGE_SEND_ERROR'; data: any }
|
|
145
|
-
| { id: 'AI_IMAGE_GET_ERROR'; data: any }
|
|
146
|
-
| { id: 'IMAGE_UPLOAD_WRONG_FORMAT'; data: File }
|
|
147
|
-
| { id: 'IMAGE_UPLOAD_ERROR'; data: File }
|
|
148
|
-
| { id: 'BLOCK_CREATING_ERROR'; data: BlockDesc }
|
|
149
|
-
| { id: 'BLOCK_EDITING_ERROR'; data: BlockDesc }
|
|
150
|
-
| { id: 'EMAIL_AUTOSAVE_ERROR'; data: ExportedApi.EmailRevision }
|
|
151
|
-
| { id: 'EMAIL_INIT_EVENT_ERROR'; data: EmailDesc }
|
|
152
|
-
| { id: 'SAVE_BUTTON_CLICK_EVENT_ERROR'; data: EmailDesc }
|
|
153
|
-
| { id: 'NEXT_BUTTON_CLICK_EVENT_ERROR'; data: EmailDesc }
|
|
154
|
-
| { id: 'BLOCK_REMOVING_ERROR'; data: BlockDesc }
|
|
155
|
-
| { id: 'IFRAME_ERROR'; data: IFrameErrorInfo }
|
|
156
|
-
| { id: 'GET_LOCALE_ERROR'; data: any }
|
|
157
|
-
| { id: 'GET_LOCALES_ERROR'; data: any }
|
|
158
|
-
);
|
|
159
|
-
type ErrorEvent = {
|
|
160
|
-
type: 'error';
|
|
161
|
-
} & Error;
|
|
162
|
-
|
|
163
|
-
type Success =
|
|
164
|
-
| { id?: ''; data?: any }
|
|
165
|
-
| { id: 'EMAIL_TITLE_UPDATED_FROM_AI'; data: string }
|
|
166
|
-
| { id: 'EMAIL_PREHEADER_UPDATED_FROM_AI'; data: string }
|
|
167
|
-
| { id: 'TEXT_COPIED_TO_CLIPBOARD'; data: string }
|
|
168
|
-
| { id: 'EMAIL_SAVING_SUCCESS'; data: EmailDesc }
|
|
169
|
-
| { id: 'AI_IMAGE_SEND_SUCCESS'; data: any }
|
|
170
|
-
| { id: 'IMAGE_UPLOAD_SUCCESS'; data: File }
|
|
171
|
-
| { id: 'BLOCK_CREATING_SUCCESS'; data: BlockDesc }
|
|
172
|
-
| { id: 'BLOCK_EDITING_SUCCESS'; data: BlockDesc }
|
|
173
|
-
| { id: 'EMAIL_AUTOSAVE_SUCCESS'; data: ExportedApi.EmailRevision }
|
|
174
|
-
| { id: 'BLOCK_CLONING_SUCCESS'; data: BlockDesc }
|
|
175
|
-
| { id: 'BLOCK_REMOVING_SUCCESS'; data: BlockDesc };
|
|
176
|
-
|
|
177
|
-
type SuccessEvent = {
|
|
178
|
-
type: 'success';
|
|
179
|
-
} & Success;
|
|
180
|
-
|
|
181
|
-
type Warning =
|
|
182
|
-
| { id?: ''; data?: any }
|
|
183
|
-
| { id: 'COPY_NOT_SAVED_BLOCK'; data: ExportedApi.Block }
|
|
184
|
-
| { id: 'EMAIL_TITLE_UPDATED'; data: string };
|
|
185
|
-
|
|
186
|
-
type WarningEvent = { type: 'warning' } & Warning;
|
|
187
|
-
|
|
188
|
-
type Info = { id?: ''; data?: any };
|
|
189
|
-
|
|
190
|
-
type InfoEvent = { type: 'info' } & Info;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
type NotifyEvent = Notify.SuccessEvent | Notify.ErrorEvent | Notify.WarningEvent | Notify.InfoEvent;
|
|
194
|
-
|
|
195
|
-
declare namespace ExportedApi {
|
|
196
|
-
interface Block {
|
|
197
|
-
/**
|
|
198
|
-
* Date of publication of the record (according to the time zone of the site).
|
|
199
|
-
* @format date-time
|
|
200
|
-
*/
|
|
201
|
-
date?: string | null;
|
|
202
|
-
/**
|
|
203
|
-
* Date of publication of the record, GMT.
|
|
204
|
-
* @format date-time
|
|
205
|
-
*/
|
|
206
|
-
date_gmt?: string | null;
|
|
207
|
-
|
|
208
|
-
/** The unique identifier of the record. */
|
|
209
|
-
id?: string;
|
|
210
|
-
/**
|
|
211
|
-
* The URL of the record.
|
|
212
|
-
* @format uri
|
|
213
|
-
*/
|
|
214
|
-
|
|
215
|
-
modified?: string;
|
|
216
|
-
/**
|
|
217
|
-
* The date the record was last modified (in GMT format).
|
|
218
|
-
* @format date-time
|
|
219
|
-
*/
|
|
220
|
-
modified_gmt?: string;
|
|
221
|
-
/** The name of the entry. */
|
|
222
|
-
title?: string;
|
|
223
|
-
/** ID of the author of the entry. */
|
|
224
|
-
author?: string;
|
|
225
|
-
/** An excerpt of the recording. */
|
|
226
|
-
excerpt?: string;
|
|
227
|
-
|
|
228
|
-
subject?: string;
|
|
229
|
-
description?: string;
|
|
230
|
-
code?: string;
|
|
231
|
-
project?: string | number;
|
|
232
|
-
related_email?: string;
|
|
233
|
-
type?: string;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
declare namespace ExportedApi {
|
|
237
|
-
interface BlockRevision {
|
|
238
|
-
/** ID of the editorial board author. */
|
|
239
|
-
author?: string | number;
|
|
240
|
-
/**
|
|
241
|
-
* The date of publication of the record, according to the time zone of the site.
|
|
242
|
-
* @format date-time
|
|
243
|
-
*/
|
|
244
|
-
date?: string;
|
|
245
|
-
/**
|
|
246
|
-
* The time of publication of the editorial office, GMT.
|
|
247
|
-
* @format date-time
|
|
248
|
-
*/
|
|
249
|
-
date_gmt?: string;
|
|
250
|
-
/** The global unique identifier of the record. */
|
|
251
|
-
guid?: {
|
|
252
|
-
/** GUID to write in the form in which it exists in the database. */
|
|
253
|
-
raw?: string;
|
|
254
|
-
/** The GUID for the record, converted for display. */
|
|
255
|
-
rendered?: string;
|
|
256
|
-
};
|
|
257
|
-
/** Unique identifier of the editorial office. */
|
|
258
|
-
id?: string;
|
|
259
|
-
/**
|
|
260
|
-
* The date of the last revision, according to the time zone of the site.
|
|
261
|
-
* @format date-time
|
|
262
|
-
*/
|
|
263
|
-
modified?: string;
|
|
264
|
-
/**
|
|
265
|
-
* Date of the last revision, GMT.
|
|
266
|
-
* @format date-time
|
|
267
|
-
*/
|
|
268
|
-
modified_gmt?: string;
|
|
269
|
-
/** ID of the editorial parent. */
|
|
270
|
-
parent?: string;
|
|
271
|
-
/** The alphanumeric identifier of the record is unique for its type. */
|
|
272
|
-
slug?: string;
|
|
273
|
-
/** The name of the entry. */
|
|
274
|
-
title?: string;
|
|
275
|
-
/** An excerpt of the recording. */
|
|
276
|
-
excerpt?: string;
|
|
277
|
-
/**
|
|
278
|
-
* Link to preview the recording.
|
|
279
|
-
* @format uri
|
|
280
|
-
*/
|
|
281
|
-
preview_link?: string;
|
|
282
|
-
|
|
283
|
-
code?: string;
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
declare namespace ExportedApi {
|
|
287
|
-
enum CodeErrorSeverity {
|
|
288
|
-
Hint = 1,
|
|
289
|
-
Info = 2,
|
|
290
|
-
Warning = 4,
|
|
291
|
-
Error = 8,
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
enum CodeErrorTag {
|
|
295
|
-
Unnecessary = 1,
|
|
296
|
-
Deprecated = 2,
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
interface CodeError {
|
|
300
|
-
severity: CodeErrorSeverity;
|
|
301
|
-
message: string;
|
|
302
|
-
source?: string;
|
|
303
|
-
startLineNumber: number;
|
|
304
|
-
startColumn: number;
|
|
305
|
-
endLineNumber: number;
|
|
306
|
-
endColumn: number;
|
|
307
|
-
startOffset: number;
|
|
308
|
-
endOffset: number;
|
|
309
|
-
tags?: CodeErrorTag[];
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
declare namespace ExportedApi {
|
|
314
|
-
interface Comment {
|
|
315
|
-
/** Unique identifier for the comment. */
|
|
316
|
-
id?: string;
|
|
317
|
-
/** User object ID, if the author is a user. */
|
|
318
|
-
author?: string;
|
|
319
|
-
/**
|
|
320
|
-
* The email address of the author of the comment.
|
|
321
|
-
* @format email
|
|
322
|
-
*/
|
|
323
|
-
author_email?: string;
|
|
324
|
-
/**
|
|
325
|
-
* The IP address of the comment author.
|
|
326
|
-
* @format ip
|
|
327
|
-
*/
|
|
328
|
-
author_ip?: string;
|
|
329
|
-
/** The display name of the comment author. */
|
|
330
|
-
author_name?: string;
|
|
331
|
-
/**
|
|
332
|
-
* URL for the author of the comment.
|
|
333
|
-
* @format uri
|
|
334
|
-
*/
|
|
335
|
-
author_url?: string;
|
|
336
|
-
/** Value of the User-Agent of the comment author. */
|
|
337
|
-
author_user_agent?: string;
|
|
338
|
-
/** The content of the comment. */
|
|
339
|
-
content?: string;
|
|
340
|
-
/**
|
|
341
|
-
* Date of publication of the comment (according to the time zone of the site).
|
|
342
|
-
* @format date-time
|
|
343
|
-
*/
|
|
344
|
-
date?: string;
|
|
345
|
-
/**
|
|
346
|
-
* The time of publication of the comment, GMT.
|
|
347
|
-
* @format date-time
|
|
348
|
-
*/
|
|
349
|
-
date_gmt?: string;
|
|
350
|
-
/**
|
|
351
|
-
* ID of the associated record object.
|
|
352
|
-
* @default 0
|
|
353
|
-
*/
|
|
354
|
-
post?: string;
|
|
355
|
-
/** Comment status. */
|
|
356
|
-
status?: string;
|
|
357
|
-
/** Comment type. */
|
|
358
|
-
type?: string;
|
|
359
|
-
/** URL of the comment author's avatar image. */
|
|
360
|
-
author_avatar_urls?: {
|
|
361
|
-
/**
|
|
362
|
-
* URL avatars with an image size of 24 pixels.
|
|
363
|
-
* @format uri
|
|
364
|
-
*/
|
|
365
|
-
'24'?: string;
|
|
366
|
-
/**
|
|
367
|
-
* URL avatars with an image size of 48 pixels.
|
|
368
|
-
* @format uri
|
|
369
|
-
*/
|
|
370
|
-
'48'?: string;
|
|
371
|
-
/**
|
|
372
|
-
* URL avatars with an image size of 96 pixels.
|
|
373
|
-
* @format uri
|
|
374
|
-
*/
|
|
375
|
-
'96'?: string;
|
|
376
|
-
};
|
|
377
|
-
/** Meta fields. */
|
|
378
|
-
meta?: object;
|
|
379
|
-
target_id?: string;
|
|
380
|
-
|
|
381
|
-
parent?: string;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
declare namespace ExportedApi {
|
|
385
|
-
type EditorOptions = {
|
|
386
|
-
fontSize?: number;
|
|
387
|
-
fontFamily?: string;
|
|
388
|
-
tabSize?: number;
|
|
389
|
-
wordWrap?: boolean;
|
|
390
|
-
minimap?: boolean;
|
|
391
|
-
insertSpaces?: boolean;
|
|
392
|
-
};
|
|
393
|
-
}
|
|
394
|
-
declare namespace ExportedApi {
|
|
395
|
-
interface Email {
|
|
396
|
-
/**
|
|
397
|
-
* Date of publication of the record, GMT.
|
|
398
|
-
* @format date-time
|
|
399
|
-
*/
|
|
400
|
-
date_gmt?: string | null;
|
|
401
|
-
/** Unique identifier of the record. */
|
|
402
|
-
id?: string;
|
|
403
|
-
/** The name of the letter. */
|
|
404
|
-
title?: string;
|
|
405
|
-
/** Preheader of the letter. */
|
|
406
|
-
preheader?: string;
|
|
407
|
-
/** ID of the author of the entry. */
|
|
408
|
-
author?: string;
|
|
409
|
-
lock?: boolean;
|
|
410
|
-
subject?: string;
|
|
411
|
-
description?: string;
|
|
412
|
-
code?: string;
|
|
413
|
-
project?: string | number;
|
|
414
|
-
// email tag names
|
|
415
|
-
tags?: string[];
|
|
416
|
-
utm_parameters?: {
|
|
417
|
-
utm_source?: string;
|
|
418
|
-
utm_medium?: string;
|
|
419
|
-
utm_campaign?: string;
|
|
420
|
-
utm_term?: string;
|
|
421
|
-
utm_content?: string;
|
|
422
|
-
};
|
|
423
|
-
parent_email?: string;
|
|
424
|
-
common_styles?: string;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
interface CompiledEmail extends Email {
|
|
428
|
-
readonly compiled: {
|
|
429
|
-
html: string;
|
|
430
|
-
ampHtml: string;
|
|
431
|
-
text: string;
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
declare namespace ExportedApi {
|
|
436
|
-
interface EmailRevision {
|
|
437
|
-
/** ID of the editorial board author. */
|
|
438
|
-
author?: string;
|
|
439
|
-
/**
|
|
440
|
-
* The date of publication of the record, according to the time zone of the site.
|
|
441
|
-
* @format date-time
|
|
442
|
-
*/
|
|
443
|
-
date?: string;
|
|
444
|
-
/**
|
|
445
|
-
* The time of publication of the editorial office, GMT.
|
|
446
|
-
* @format date-time
|
|
447
|
-
*/
|
|
448
|
-
date_gmt?: string;
|
|
449
|
-
/** Unique identifier of the editorial office. */
|
|
450
|
-
id?: string;
|
|
451
|
-
/**
|
|
452
|
-
* The date of the last revision, according to the time zone of the site.
|
|
453
|
-
* @format date-time
|
|
454
|
-
*/
|
|
455
|
-
modified?: string;
|
|
456
|
-
/**
|
|
457
|
-
* Date of the last revision, GMT.
|
|
458
|
-
* @format date-time
|
|
459
|
-
*/
|
|
460
|
-
modified_gmt?: string;
|
|
461
|
-
/** ID of the editorial parent. */
|
|
462
|
-
parent?: string;
|
|
463
|
-
/** The name of the entry. */
|
|
464
|
-
title?: string;
|
|
465
|
-
/** An excerpt of the recording. */
|
|
466
|
-
excerpt?: string;
|
|
467
|
-
|
|
468
|
-
code?: string;
|
|
469
|
-
|
|
470
|
-
preheader?: string;
|
|
471
|
-
|
|
472
|
-
subject?: string;
|
|
473
|
-
|
|
474
|
-
common_styles?: string;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
interface CompiledEmailRevision extends EmailRevision {
|
|
478
|
-
readonly compiled: {
|
|
479
|
-
html: string;
|
|
480
|
-
ampHtml: string;
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
declare namespace ExportedApi {
|
|
485
|
-
export type ThemeConfig = any;
|
|
486
|
-
}
|
|
487
|
-
declare namespace ExportedApi {
|
|
488
|
-
export type CodeModeDirection = 'none' | 'left' | 'right' | 'bottom';
|
|
489
|
-
export type Locale = 'en_US' | 'ru_RU';
|
|
490
|
-
export type ConfigMods = 'pro' | 'editor' | 'simple' | 'freeUserBlocks';
|
|
491
|
-
|
|
492
|
-
export interface MergeTagsInfo {
|
|
493
|
-
syntax: string[];
|
|
494
|
-
items: MergeTag[];
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
type LimitName = 'AiImgCount' | 'AiChatCount' | 'AiGeneratorCount' | 'OptimizationCount';
|
|
498
|
-
|
|
499
|
-
type LocaleListener = AppListener<string, string>;
|
|
500
|
-
type LimitListener = AppListener<{ name: LimitName; count: number }>;
|
|
501
|
-
|
|
502
|
-
interface AdvancedConfigs {
|
|
503
|
-
[key: string]: Config;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
interface Counters {
|
|
507
|
-
optimization_counter: number;
|
|
508
|
-
ai_counter: number;
|
|
509
|
-
ai_img_counter: number;
|
|
510
|
-
ai_generator_limit: number;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
interface Limits {
|
|
514
|
-
optimization_limit: number;
|
|
515
|
-
ai_limit: number;
|
|
516
|
-
ai_img_limit: number;
|
|
517
|
-
ai_generator_limit: number;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
interface Config {
|
|
521
|
-
/** Application mode */
|
|
522
|
-
mode?: ConfigMods;
|
|
523
|
-
|
|
524
|
-
/** Counters and limits */
|
|
525
|
-
counters?: Counters;
|
|
526
|
-
limits?: Limits;
|
|
527
|
-
/** billing page url */
|
|
528
|
-
billingPageUrl?: string;
|
|
529
|
-
|
|
530
|
-
imageInfoToolUrl?: string;
|
|
531
|
-
/** Application Styles */
|
|
532
|
-
styles: string;
|
|
533
|
-
/** Application theme */
|
|
534
|
-
theme: string;
|
|
535
|
-
/** Application theme settings */
|
|
536
|
-
themes: { [P in string]: ThemeConfig };
|
|
537
|
-
/** showing the back arrow */
|
|
538
|
-
headerArrowBackVisible: boolean;
|
|
539
|
-
/** display of the Subject field */
|
|
540
|
-
headerTitleVisible: boolean;
|
|
541
|
-
/** showing the Preheader field */
|
|
542
|
-
headerPreheaderVisible: boolean;
|
|
543
|
-
/** showing the Header field */
|
|
544
|
-
/** showing breadcrumbs in an iframe */
|
|
545
|
-
pathEnabled: boolean;
|
|
546
|
-
/** showing copy-paste of a block in an iframe */
|
|
547
|
-
copyPasteEnabled: boolean;
|
|
548
|
-
/** showing the Version History button */
|
|
549
|
-
historyEnabled: boolean;
|
|
550
|
-
/** showing the Code-mode button */
|
|
551
|
-
codeEnabled: boolean;
|
|
552
|
-
/** showing the Code-mode button in the mode when there is a desktop/mobile switch */
|
|
553
|
-
codeSideEnabled: boolean;
|
|
554
|
-
/** showing the Preview button */
|
|
555
|
-
previewIconEnabled: boolean;
|
|
556
|
-
/** Preview link */
|
|
557
|
-
previewModeEnabled: boolean;
|
|
558
|
-
/** showing the Test button in the mailers */
|
|
559
|
-
livePreviewEnabled: boolean;
|
|
560
|
-
/** showing the Send Test button */
|
|
561
|
-
sendTestEnabled: boolean;
|
|
562
|
-
/** showing the Share button */
|
|
563
|
-
sharePreviewEnabled: boolean;
|
|
564
|
-
/** displaying the message menu */
|
|
565
|
-
emailDropdownMenuEnabled: boolean;
|
|
566
|
-
/** showing the Clone item in the message menu */
|
|
567
|
-
emailDropdownMenuClone: boolean;
|
|
568
|
-
/** showing the Import item in the emails menu */
|
|
569
|
-
emailDropdownMenuImport: boolean;
|
|
570
|
-
/** showing the Import item in the emails menu like button */
|
|
571
|
-
emailDropdownMenuImportButton: boolean;
|
|
572
|
-
/** showing the Block item in the message menu */
|
|
573
|
-
emailDropdownMenuLock: boolean;
|
|
574
|
-
/** showing the Delete item in the message menu */
|
|
575
|
-
emailDropdownMenuRemove: boolean;
|
|
576
|
-
/** showing the Export button */
|
|
577
|
-
emailExportEnabled: boolean;
|
|
578
|
-
/** showing a secondary button */
|
|
579
|
-
nextButtonEnabled: boolean;
|
|
580
|
-
/** text of the secondary button */
|
|
581
|
-
nextButtonText: string;
|
|
582
|
-
/** showing the main button */
|
|
583
|
-
saveButtonEnabled: boolean;
|
|
584
|
-
/** text of the main button */
|
|
585
|
-
saveButtonText: string;
|
|
586
|
-
commandButtonsEnabled?: boolean;
|
|
587
|
-
/** displaying the email ID */
|
|
588
|
-
emailIdShow: boolean;
|
|
589
|
-
/** side panel view */
|
|
590
|
-
sidePanelFloating: boolean;
|
|
591
|
-
/** mode switching bar */
|
|
592
|
-
desktopMobileSwitchRule: boolean;
|
|
593
|
-
/** mode switching panel */
|
|
594
|
-
desktopMobileSwitchPanel: boolean;
|
|
595
|
-
/** showing the block save button */
|
|
596
|
-
saveBlockEnabled: boolean;
|
|
597
|
-
/** showing the image change button */
|
|
598
|
-
editImageControlEnabled: boolean;
|
|
599
|
-
/** ability to collapse the sidebar */
|
|
600
|
-
toggleSidePanel: boolean;
|
|
601
|
-
|
|
602
|
-
/** Sidebar location */
|
|
603
|
-
menuDirection: string;
|
|
604
|
-
|
|
605
|
-
/** default setting of the opening tab (""/"common"/"empty") */
|
|
606
|
-
defaultBuildPanel: string;
|
|
607
|
-
|
|
608
|
-
/** Sidebar */
|
|
609
|
-
commentsEnabled: boolean;
|
|
610
|
-
optimizeEnabled: boolean;
|
|
611
|
-
settingsEnabled: boolean;
|
|
612
|
-
UTMEnabled: boolean;
|
|
613
|
-
subjectEnabled: boolean;
|
|
614
|
-
preheaderEnabled: boolean;
|
|
615
|
-
descriptionEnabled: boolean;
|
|
616
|
-
tagsEnabled: boolean;
|
|
617
|
-
/** showing the mobile properties switch */
|
|
618
|
-
switchDesktopMobilePropsEnabled: boolean;
|
|
619
|
-
/** showing transition buttons to other elements */
|
|
620
|
-
stepToOtherElementEnabled: boolean;
|
|
621
|
-
/** showing the delete element button */
|
|
622
|
-
deleteButtonEnabled: boolean;
|
|
623
|
-
/** showing the Title field in the form of an image */
|
|
624
|
-
formFieldImageTitleEnabled: boolean;
|
|
625
|
-
/** showing border change fields */
|
|
626
|
-
formFieldBorderEnabled: boolean;
|
|
627
|
-
/** showing the rounding change fields */
|
|
628
|
-
formFieldBorderRadiusEnabled: boolean;
|
|
629
|
-
/** showing shadow change fields */
|
|
630
|
-
formFieldBoxShadowEnabled: boolean;
|
|
631
|
-
/** showing buttons to change the visibility of an element */
|
|
632
|
-
formFieldVisibilityEnabled: boolean;
|
|
633
|
-
/** showing the export to picture switch */
|
|
634
|
-
formFieldExportAsPictureEnabled: boolean;
|
|
635
|
-
|
|
636
|
-
/** showing the button to insert an image into the button text */
|
|
637
|
-
formButtonFieldInsertImageEnabled: boolean;
|
|
638
|
-
/** showing vertical alignment buttons */
|
|
639
|
-
formButtonFieldVerticalAlignEnabled: boolean;
|
|
640
|
-
/** showing text alignment buttons */
|
|
641
|
-
formButtonFieldTextAlignEnabled: boolean;
|
|
642
|
-
/** showing background image fields */
|
|
643
|
-
formButtonFieldBackgroundImageEnabled: boolean;
|
|
644
|
-
/** showing internal margins */
|
|
645
|
-
formButtonFieldPaddingsEnabled: boolean;
|
|
646
|
-
/** showing replacer button */
|
|
647
|
-
formButtonFieldReplacerEnabled: boolean;
|
|
648
|
-
|
|
649
|
-
/** showing vertical alignment buttons */
|
|
650
|
-
formCellFieldVerticalAlignEnabled: boolean;
|
|
651
|
-
/** showing background image fields */
|
|
652
|
-
formCellFieldBackgroundImageEnabled: boolean;
|
|
653
|
-
/** showing internal margins */
|
|
654
|
-
formCellFieldPaddingsEnabled: boolean;
|
|
655
|
-
/** showing sizes */
|
|
656
|
-
formCellFieldSizeEnabled: boolean;
|
|
657
|
-
/** showing the button to insert an image into the button text */
|
|
658
|
-
formLinkFieldInsertImageEnabled: boolean;
|
|
659
|
-
/** showing background image fields */
|
|
660
|
-
formTableFieldBackgroundImageEnabled: boolean;
|
|
661
|
-
/** showing background image fields */
|
|
662
|
-
formDivFieldBackgroundImageEnabled: boolean;
|
|
663
|
-
/** showing background image fields */
|
|
664
|
-
formEmailFieldBackgroundImageEnabled: boolean;
|
|
665
|
-
/** showing vertical alignment buttons */
|
|
666
|
-
formImageFieldVerticalAlignEnabled: boolean;
|
|
667
|
-
/** showing replacer button */
|
|
668
|
-
formImageFieldReplacerEnabled: boolean;
|
|
669
|
-
/** showing height field */
|
|
670
|
-
formImageFieldHeightEnabled: boolean;
|
|
671
|
-
/** showing typograf button */
|
|
672
|
-
formTextFieldTypografEnabled: boolean;
|
|
673
|
-
/** showing replacer button */
|
|
674
|
-
formTextFieldReplacerEnabled: boolean;
|
|
675
|
-
|
|
676
|
-
revisionService: boolean;
|
|
677
|
-
|
|
678
|
-
/** Elements */
|
|
679
|
-
elementImageEnabled: boolean;
|
|
680
|
-
elementTextEnabled: boolean;
|
|
681
|
-
elementHeaderEnabled: boolean;
|
|
682
|
-
elementButtonEnabled: boolean;
|
|
683
|
-
elementListULEnabled: boolean;
|
|
684
|
-
elementListOLEnabled: boolean;
|
|
685
|
-
elementDividerEnabled: boolean;
|
|
686
|
-
elementSpacerEnabled: boolean;
|
|
687
|
-
elementSocialEnabled: boolean;
|
|
688
|
-
elementTableEnabled: boolean;
|
|
689
|
-
elementCountdownEnabled: boolean;
|
|
690
|
-
elementVideoEnabled: boolean;
|
|
691
|
-
elementAIimageEnabled: boolean;
|
|
692
|
-
elementAItextEnabled: boolean;
|
|
693
|
-
elementCarouselEnabled: boolean;
|
|
694
|
-
elementFormEnabled: boolean;
|
|
695
|
-
elementAccordionEnabled: boolean;
|
|
696
|
-
|
|
697
|
-
imageCenterStockEnabled: boolean;
|
|
698
|
-
imageCenterGifEnabled: boolean;
|
|
699
|
-
imageCenterEditorEnabled: boolean;
|
|
700
|
-
compressMaxSize: number;
|
|
701
|
-
compressMaxWidthOrHeight: number;
|
|
702
|
-
|
|
703
|
-
editor: EditorOptions;
|
|
704
|
-
|
|
705
|
-
locale: Locale;
|
|
706
|
-
|
|
707
|
-
codeModeDirection: CodeModeDirection;
|
|
708
|
-
|
|
709
|
-
preventSendDataToEM?: boolean;
|
|
710
|
-
|
|
711
|
-
mergeTags?: MergeTagsInfo;
|
|
712
|
-
|
|
713
|
-
/** showing the merge tags button */
|
|
714
|
-
mergeTagsShow?: boolean;
|
|
715
|
-
|
|
716
|
-
testEmails?: string[];
|
|
717
|
-
|
|
718
|
-
/** showing the config switch */
|
|
719
|
-
configSwither?: boolean;
|
|
720
|
-
/** Auto-save timeout */
|
|
721
|
-
autosaveTimeout?: number;
|
|
722
|
-
/** Configs that are passed to plugins */
|
|
723
|
-
advancedConfigs?: AdvancedConfigs;
|
|
724
|
-
onlyCodeModeInMobile?: boolean;
|
|
725
|
-
|
|
726
|
-
pushToGTM?: boolean;
|
|
727
|
-
/** header show */
|
|
728
|
-
headerShow?: boolean;
|
|
729
|
-
/** webversion show */
|
|
730
|
-
webversionEnabled?: boolean;
|
|
731
|
-
/** common styles show */
|
|
732
|
-
commonStylesEnabled?: boolean;
|
|
733
|
-
/** adaptive control show */
|
|
734
|
-
emailResponsiveControlEnabled?: boolean;
|
|
735
|
-
/** show export to text */
|
|
736
|
-
exportTextEnabled?: boolean;
|
|
737
|
-
/** show export to HTML */
|
|
738
|
-
exportHtmlEnabled?: boolean;
|
|
739
|
-
/** show export to ZIP */
|
|
740
|
-
exportZipEnabled?: boolean;
|
|
741
|
-
/** show export to buffer */
|
|
742
|
-
exportClipboardEnabled?: boolean;
|
|
743
|
-
/** show export to webhook */
|
|
744
|
-
exportWebHookEnabled?: boolean;
|
|
745
|
-
/** show export to Outlook */
|
|
746
|
-
exportOutlookEnabled?: boolean;
|
|
747
|
-
/** show export to PDF */
|
|
748
|
-
exportPdfEnabled?: boolean;
|
|
749
|
-
/** show export to PNG */
|
|
750
|
-
exportPngEnabled?: boolean;
|
|
751
|
-
/** AI assistant show */
|
|
752
|
-
aiAssistentEnabled?: boolean;
|
|
753
|
-
/** link check display */
|
|
754
|
-
optimizeLinksEnabled?: boolean;
|
|
755
|
-
/** picture check display */
|
|
756
|
-
optimizeImagesEnabled?: boolean;
|
|
757
|
-
/** SpamAssassin check display */
|
|
758
|
-
optimizeSpamAssassinEnabled?: boolean;
|
|
759
|
-
/** code check display */
|
|
760
|
-
optimizeCheckCodeEnabled?: boolean;
|
|
761
|
-
/** Displaying a field Template */
|
|
762
|
-
isTemplateEnabled?: boolean;
|
|
763
|
-
/** block menu display */
|
|
764
|
-
blocksSectionsShow?: boolean;
|
|
765
|
-
/** empty blocks display */
|
|
766
|
-
blocksEmptyEnabled?: boolean;
|
|
767
|
-
/** display of saved blocks */
|
|
768
|
-
blocksSavedEnabled?: boolean;
|
|
769
|
-
/** common blocks display */
|
|
770
|
-
blocksCommonEnabled?: boolean;
|
|
771
|
-
/** template blocks display */
|
|
772
|
-
blocksTemplateEnabled?: boolean;
|
|
773
|
-
/** block search display */
|
|
774
|
-
blocksSearchEnabled?: boolean;
|
|
775
|
-
/** showing the panel for adding a block in the visual editor */
|
|
776
|
-
blocksAddPanelEnabled?: boolean;
|
|
777
|
-
/** turns off template editing */
|
|
778
|
-
lockEditor?: boolean;
|
|
779
|
-
/** turns off preheader and title editing */
|
|
780
|
-
lockPreheaderAndTitle?: boolean;
|
|
781
|
-
/** turns off preheader and title editing */
|
|
782
|
-
disableSideMenu?: boolean;
|
|
783
|
-
/** Showing a drop-down card with a path to the picture */
|
|
784
|
-
imagePathDropdownEnabled?: boolean;
|
|
785
|
-
|
|
786
|
-
/** Showing change visibility buttons in amp emails */
|
|
787
|
-
formFieldAmpVisibilityEnabled?: boolean;
|
|
788
|
-
/** Disable double click on next button */
|
|
789
|
-
disableDoubleClickNextButton?: boolean;
|
|
790
|
-
/** manually change state of next button */
|
|
791
|
-
activeNextButton?: boolean;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
export interface User {
|
|
795
|
-
id?: string | number;
|
|
796
|
-
/** The login name for the user. */
|
|
797
|
-
username?: string;
|
|
798
|
-
/** User's display name */
|
|
799
|
-
user?: string;
|
|
800
|
-
/** The user's email address. @format email */
|
|
801
|
-
email?: string;
|
|
802
|
-
/** URL of the user's avatar. */
|
|
803
|
-
avatar_urls?: {
|
|
804
|
-
/** URL avatars with an image size of 24 pixels. @format uri */
|
|
805
|
-
'24'?: string;
|
|
806
|
-
'48'?: string;
|
|
807
|
-
'96'?: string;
|
|
808
|
-
};
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
namespace AppConfigMixin {
|
|
812
|
-
interface Options {
|
|
813
|
-
config?: Partial<Config>;
|
|
814
|
-
advancedConfigs?: AdvancedConfigs;
|
|
815
|
-
project?: string | number;
|
|
816
|
-
user?: User;
|
|
817
|
-
handleReadLocale?: LocaleListener;
|
|
818
|
-
handleLimitUsage?: LimitListener;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
interface Instance {
|
|
822
|
-
setConfig(config: Partial<Config>): Promise<void>;
|
|
823
|
-
getConfig(): Partial<Config>;
|
|
824
|
-
updateConfig(config: Partial<Config>): Promise<void>;
|
|
825
|
-
handleReadLocale: AppEvent<LocaleListener>;
|
|
826
|
-
handleLimitUsage?: AppEvent<LimitListener>;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
interface Options extends AppConfigMixin.Options {}
|
|
830
|
-
|
|
831
|
-
interface Instance extends AppConfigMixin.Instance {}
|
|
832
|
-
}
|
|
833
|
-
declare namespace ExportedApi {
|
|
834
|
-
namespace AppInitMixin {
|
|
835
|
-
interface Options {
|
|
836
|
-
/** base url of the app server */
|
|
837
|
-
baseUrl?: string;
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
interface Instance {}
|
|
841
|
-
}
|
|
842
|
-
interface Options extends AppInitMixin.Options {}
|
|
843
|
-
|
|
844
|
-
interface Instance extends AppInitMixin.Instance {}
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
declare namespace ExportedApi {
|
|
848
|
-
export type JWTAuthOptions = {
|
|
849
|
-
email: string;
|
|
850
|
-
password: string;
|
|
851
|
-
remember?: boolean;
|
|
852
|
-
};
|
|
853
|
-
|
|
854
|
-
type JWTOptions = {
|
|
855
|
-
/** JWT authorization credentials */
|
|
856
|
-
jwtAuth?: JWTAuthOptions;
|
|
857
|
-
};
|
|
858
|
-
namespace JWTMixin {
|
|
859
|
-
interface Options extends JWTOptions {}
|
|
860
|
-
|
|
861
|
-
interface Instance {}
|
|
862
|
-
}
|
|
863
|
-
interface Options extends JWTMixin.Options {}
|
|
864
|
-
|
|
865
|
-
interface Instance extends JWTMixin.Instance {}
|
|
866
|
-
}
|
|
867
|
-
declare namespace ExportedApi {
|
|
868
|
-
type OAuthCallback = (prevToken?: string) => MayBePromise<string>;
|
|
869
|
-
|
|
870
|
-
type OAuthOptions = {
|
|
871
|
-
/**
|
|
872
|
-
* Get token callback
|
|
873
|
-
*/
|
|
874
|
-
getAuthToken?: OAuthCallback;
|
|
875
|
-
};
|
|
876
|
-
namespace OAuthMixin {
|
|
877
|
-
interface Options extends OAuthOptions {}
|
|
878
|
-
|
|
879
|
-
interface Instance {}
|
|
880
|
-
}
|
|
881
|
-
interface Options extends OAuthMixin.Options {}
|
|
882
|
-
|
|
883
|
-
interface Instance extends OAuthMixin.Instance {}
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
declare namespace ExportedApi {
|
|
887
|
-
interface CoreOptions {
|
|
888
|
-
element?: string | Element | DocumentFragment;
|
|
889
|
-
handleChunkLoaded?: () => void;
|
|
890
|
-
}
|
|
891
|
-
namespace CoreMixin {
|
|
892
|
-
interface Options extends CoreOptions {}
|
|
893
|
-
|
|
894
|
-
interface Instance {
|
|
895
|
-
getElement(): Element | DocumentFragment | undefined;
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
interface Options extends CoreMixin.Options {}
|
|
899
|
-
|
|
900
|
-
interface Instance extends CoreMixin.Instance {}
|
|
901
|
-
}
|
|
902
|
-
declare namespace ExportedApi {
|
|
903
|
-
namespace DataMixin {
|
|
904
|
-
type BlockShowOptions = {
|
|
905
|
-
/** block content */
|
|
906
|
-
block: Block | string;
|
|
907
|
-
/** autosaves */
|
|
908
|
-
revisions?: BlockRevision[];
|
|
909
|
-
/** comments */
|
|
910
|
-
comments?: Comment[];
|
|
911
|
-
/** blocks */
|
|
912
|
-
blocks?: Block[];
|
|
913
|
-
/** template identifier for email */
|
|
914
|
-
templateId?: string | number;
|
|
915
|
-
};
|
|
916
|
-
|
|
917
|
-
type EmailShowOptions = {
|
|
918
|
-
/** email content */
|
|
919
|
-
email: Email | string;
|
|
920
|
-
/** autosaves */
|
|
921
|
-
autosaves?: EmailRevision[];
|
|
922
|
-
/** comments */
|
|
923
|
-
comments?: Comment[];
|
|
924
|
-
/** blocks */
|
|
925
|
-
blocks?: Block[];
|
|
926
|
-
/** template identifier for block */
|
|
927
|
-
templateId?: number;
|
|
928
|
-
};
|
|
929
|
-
|
|
930
|
-
type Content = string | Email | EmailShowOptions;
|
|
931
|
-
|
|
932
|
-
type ReadEmailHandler = (id: string) => MayBePromise<Email>;
|
|
933
|
-
type ReadEmailAutosavesHandler = (emailId: string) => MayBePromise<EmailRevision[]>;
|
|
934
|
-
type ReadBlocksHandler = (project: string) => MayBePromise<Block[]>;
|
|
935
|
-
type ReadTemplateBlocksHandler = ({ emailId: string, project: string }) => MayBePromise<Block[]>;
|
|
936
|
-
type ReadCommentsHandler = (emailId: string) => MayBePromise<Comment[]>;
|
|
937
|
-
|
|
938
|
-
type EmailHandler = AppListener<Email>;
|
|
939
|
-
type HtmlHandler = AppListener<string>;
|
|
940
|
-
|
|
941
|
-
type TestEmailSendEventPayload = {
|
|
942
|
-
project?: string;
|
|
943
|
-
email_id?: string;
|
|
944
|
-
subject?: string;
|
|
945
|
-
email?: string;
|
|
946
|
-
code?: string;
|
|
947
|
-
from_name?: string;
|
|
948
|
-
};
|
|
949
|
-
|
|
950
|
-
type TestEmailSendHandler = AppListener<TestEmailSendEventPayload, false | void>;
|
|
951
|
-
|
|
952
|
-
type TestEmailModalSendHandler = AppListener<Email, false | void>;
|
|
953
|
-
|
|
954
|
-
type LivePreviewHandler = AppListener<{
|
|
955
|
-
project?: string;
|
|
956
|
-
id: string;
|
|
957
|
-
subject?: string;
|
|
958
|
-
html: string;
|
|
959
|
-
}>;
|
|
960
|
-
|
|
961
|
-
type ShareHandler = AppListener<{
|
|
962
|
-
project?: string;
|
|
963
|
-
id: string;
|
|
964
|
-
}>;
|
|
965
|
-
|
|
966
|
-
type PreviewHandler = AppListener<{
|
|
967
|
-
project?: string;
|
|
968
|
-
id: string;
|
|
969
|
-
}>;
|
|
970
|
-
|
|
971
|
-
type ValidateEvent = AppListener<CodeError[]>;
|
|
972
|
-
|
|
973
|
-
interface Events {
|
|
974
|
-
/** read email handler */
|
|
975
|
-
handleReadEmail: AppEvent<ReadEmailHandler>;
|
|
976
|
-
/** fires when email saved */
|
|
977
|
-
handleSaveEmail: SaveEvent<Email>;
|
|
978
|
-
/** fires when email delete */
|
|
979
|
-
handleRemoveEmail: RemoveEvent<Email>;
|
|
980
|
-
|
|
981
|
-
/** read autosaves handler */
|
|
982
|
-
handleReadEmailRevisions: AppEvent<ReadEmailAutosavesHandler>;
|
|
983
|
-
/** fires when email autosave */
|
|
984
|
-
handleEmailAutosave: CreateEvent<EmailRevision>;
|
|
985
|
-
/** fires when email autosave delete */
|
|
986
|
-
handleRemoveEmailAutoSave: RemoveEvent<EmailRevision>;
|
|
987
|
-
/** read common blocks handler */
|
|
988
|
-
handleReadCommonBlocks: AppEvent<ReadBlocksHandler>;
|
|
989
|
-
/** read template blocks handler */
|
|
990
|
-
handleReadTemplateBlocks: AppEvent<ReadTemplateBlocksHandler>;
|
|
991
|
-
/** read blocks handler */
|
|
992
|
-
handleReadBlocks: AppEvent<ReadBlocksHandler>;
|
|
993
|
-
/** fires when block save */
|
|
994
|
-
handleSaveBlock: SaveEvent<Block>;
|
|
995
|
-
/** fires when block delete */
|
|
996
|
-
handleRemoveBlock: RemoveEvent<Block>;
|
|
997
|
-
|
|
998
|
-
/** read comments handler */
|
|
999
|
-
handleReadComments: AppEvent<ReadCommentsHandler>;
|
|
1000
|
-
/** fires when comment save */
|
|
1001
|
-
handleSaveComment: SaveEvent<Comment>;
|
|
1002
|
-
/** fires when comment delete */
|
|
1003
|
-
handleRemoveComment: RemoveEvent<Comment>;
|
|
1004
|
-
|
|
1005
|
-
/** fires when user clicked on 'save' button */
|
|
1006
|
-
handleSaveButtonClick: AppEvent<EmailHandler>;
|
|
1007
|
-
/** fires when user clicked on 'next' button */
|
|
1008
|
-
handleNextButtonClick: AppEvent<EmailHandler>;
|
|
1009
|
-
/** fires when user clicked on 'previous' button */
|
|
1010
|
-
handlePreviousButtonClick: AppEvent<EmailHandler>;
|
|
1011
|
-
/** fires when email iframe inited */
|
|
1012
|
-
handleEmailInit: AppEvent<EmailHandler>;
|
|
1013
|
-
/** fires when email changed */
|
|
1014
|
-
handleEmailChanged: AppEvent<EmailHandler>;
|
|
1015
|
-
/** fires when email subject inited */
|
|
1016
|
-
handleSubjectChanged: (
|
|
1017
|
-
listener: (subject: string) => MayBePromise<void>,
|
|
1018
|
-
priority?: number,
|
|
1019
|
-
thisArg?: any,
|
|
1020
|
-
) => () => void;
|
|
1021
|
-
/** fires when email subject inited */
|
|
1022
|
-
handlePreheaderChanged: (
|
|
1023
|
-
listener: (preheader: string) => MayBePromise<void>,
|
|
1024
|
-
priority?: number,
|
|
1025
|
-
thisArg?: any,
|
|
1026
|
-
) => () => void;
|
|
1027
|
-
/** fires when email Html changed */
|
|
1028
|
-
handleHtmlChanged: AppEvent<HtmlHandler>;
|
|
1029
|
-
/** fires when test email send*/
|
|
1030
|
-
handleTestEmailSend: AppEvent<TestEmailSendHandler>;
|
|
1031
|
-
/** fires when open test email modal */
|
|
1032
|
-
handleTestEmailModal: AppEvent<TestEmailModalSendHandler>;
|
|
1033
|
-
/** fires when email clone */
|
|
1034
|
-
handleCloneEmail: AppEvent<EmailHandler>;
|
|
1035
|
-
/** fires when email share */
|
|
1036
|
-
handleShareEmail: AppEvent<ShareHandler>;
|
|
1037
|
-
/** fires when open live preview */
|
|
1038
|
-
handleLivePreviewEmail: AppEvent<LivePreviewHandler>;
|
|
1039
|
-
/** fires when open preview */
|
|
1040
|
-
handlePreviewEmail: AppEvent<PreviewHandler>;
|
|
1041
|
-
/** fires when email validate */
|
|
1042
|
-
handleValidate: AppEvent<ValidateEvent>;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
type Listeners = { [K in keyof Events]?: Events[K] extends AppEvent<infer Listener> ? Listener : never };
|
|
1046
|
-
interface Options extends Listeners {
|
|
1047
|
-
/** entity content */
|
|
1048
|
-
content: Content;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
interface Instance extends Events {
|
|
1052
|
-
/**
|
|
1053
|
-
* show block or email
|
|
1054
|
-
* @param content entity content
|
|
1055
|
-
*/
|
|
1056
|
-
show(content: Content): Promise<void>;
|
|
1057
|
-
/** save current email */
|
|
1058
|
-
save(): Promise<Email>;
|
|
1059
|
-
/**
|
|
1060
|
-
* get email from inner storage
|
|
1061
|
-
*/
|
|
1062
|
-
getEmail(): Promise<CompiledEmail>;
|
|
1063
|
-
/**
|
|
1064
|
-
* get compiled email
|
|
1065
|
-
*/
|
|
1066
|
-
compileEmail(email?: Email, all?: boolean | { text?: boolean; amp?: boolean }): Promise<CompiledEmail>;
|
|
1067
|
-
/**
|
|
1068
|
-
* get blocks from inner storage
|
|
1069
|
-
*/
|
|
1070
|
-
getBlocks(): Promise<Block[]>;
|
|
1071
|
-
/**
|
|
1072
|
-
* get email satosaves
|
|
1073
|
-
* @param emailId email identifier
|
|
1074
|
-
*/
|
|
1075
|
-
getEmailRevisions(): Promise<EmailRevision[]>;
|
|
1076
|
-
/**
|
|
1077
|
-
* get email comments
|
|
1078
|
-
*/
|
|
1079
|
-
getComments(): Promise<Comment[]>;
|
|
1080
|
-
/**
|
|
1081
|
-
* get current code errors
|
|
1082
|
-
*/
|
|
1083
|
-
getCodeErrors(): CodeError[] | undefined;
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
interface Options extends DataMixin.Options {
|
|
1087
|
-
standaloneKey?: string;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
interface Instance extends DataMixin.Instance {}
|
|
1091
|
-
}
|
|
1092
|
-
declare namespace ExportedApi {
|
|
1093
|
-
namespace DestroyableMixin {
|
|
1094
|
-
type DestroyListener = AppListener<ExportedApi.Instance>;
|
|
1095
|
-
interface Options {
|
|
1096
|
-
handleDestroy?: DestroyListener;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
interface Instance {
|
|
1100
|
-
/** fires when app destroyed */
|
|
1101
|
-
handleDestroy: AppEvent<DestroyListener>;
|
|
1102
|
-
destroy(): void;
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
interface Options extends DestroyableMixin.Options {}
|
|
1106
|
-
|
|
1107
|
-
interface Instance extends DestroyableMixin.Instance {}
|
|
1108
|
-
}
|
|
1109
|
-
declare namespace ExportedApi {
|
|
1110
|
-
namespace SpinMixin {
|
|
1111
|
-
interface Options {
|
|
1112
|
-
element?: string | Element | DocumentFragment;
|
|
1113
|
-
initialSpinner?: false;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
interface Instance {}
|
|
1117
|
-
}
|
|
1118
|
-
interface Options extends SpinMixin.Options {}
|
|
1119
|
-
|
|
1120
|
-
interface Instance extends SpinMixin.Instance {}
|
|
1121
|
-
}
|
|
1122
|
-
declare namespace ExportedApi {
|
|
1123
|
-
namespace ImageHandlerMixin {
|
|
1124
|
-
type LoadEventPayload = { file: File; project: string };
|
|
1125
|
-
type FileProxyEventPayload = { url: string; project: string };
|
|
1126
|
-
type LoadImageListener = AppListener<LoadEventPayload, string | void>;
|
|
1127
|
-
type FileProxyListener = AppListener<FileProxyEventPayload, Blob | void>;
|
|
1128
|
-
interface Options {
|
|
1129
|
-
handleLoadImage?: LoadImageListener;
|
|
1130
|
-
handleFileProxy?: FileProxyListener;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
interface Instance {
|
|
1134
|
-
/** fires when image loading */
|
|
1135
|
-
handleLoadImage: AppEvent<LoadImageListener>;
|
|
1136
|
-
handleFileProxy: AppEvent<FileProxyListener>;
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
interface Options extends ImageHandlerMixin.Options {}
|
|
1140
|
-
|
|
1141
|
-
interface Instance extends ImageHandlerMixin.Instance {}
|
|
1142
|
-
}
|
|
1143
|
-
declare namespace ExportedApi {
|
|
1144
|
-
namespace LoadHandlerMixin {
|
|
1145
|
-
type LoadListener = AppListener<ExportedApi.Instance>;
|
|
1146
|
-
interface Options {
|
|
1147
|
-
handleLoad?: LoadListener;
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
interface Instance {
|
|
1151
|
-
/** fires when app loaded */
|
|
1152
|
-
handleLoad: AppEvent<LoadListener>;
|
|
1153
|
-
reset(options: ExportedApi.Options): Promise<ExportedApi.Instance>;
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
interface Options extends LoadHandlerMixin.Options {}
|
|
1157
|
-
|
|
1158
|
-
interface Instance extends LoadHandlerMixin.Instance {}
|
|
1159
|
-
}
|
|
1160
|
-
declare namespace ExportedApi {
|
|
1161
|
-
type ConfigNotify = Notify & Partial<NotifyEvent> & { message: string | HTMLElement };
|
|
1162
|
-
namespace NotificationMixin {
|
|
1163
|
-
type NotifyListener = AppListener<NotifyEvent, ConfigNotify | string | false | void>;
|
|
1164
|
-
type ErrorListener = AppListener<Notify.ErrorEvent, ConfigNotify | string | false | void>;
|
|
1165
|
-
type SuccessListener = AppListener<Notify.SuccessEvent, ConfigNotify | string | false | void>;
|
|
1166
|
-
interface Options {
|
|
1167
|
-
handleNotify?: NotifyListener;
|
|
1168
|
-
handleError?: ErrorListener;
|
|
1169
|
-
handleSuccess?: SuccessListener;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
interface Instance {
|
|
1173
|
-
handleNotify: AppEvent<NotifyListener>;
|
|
1174
|
-
handleError: AppEvent<ErrorListener>;
|
|
1175
|
-
handleSuccess: AppEvent<SuccessListener>;
|
|
1176
|
-
notify(config: ConfigNotify | string): void;
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
interface Options extends NotificationMixin.Options {}
|
|
1180
|
-
|
|
1181
|
-
interface Instance extends NotificationMixin.Instance {}
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
interface EditStackData {
|
|
1185
|
-
serialize(): ArrayBuffer;
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
interface EditStackSnapshot {
|
|
1189
|
-
resource: string;
|
|
1190
|
-
elements: unknown[];
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
interface IUndoRedoService {
|
|
1194
|
-
/**
|
|
1195
|
-
* Undoes the last performed action, reverting the state to the previous step in history.
|
|
1196
|
-
* If the history is empty, this method does nothing.
|
|
1197
|
-
*/
|
|
1198
|
-
undo: () => void;
|
|
1199
|
-
|
|
1200
|
-
/**
|
|
1201
|
-
* Redoes an undone action, moving the state forward in history.
|
|
1202
|
-
* If there are no undone actions, this method does nothing.
|
|
1203
|
-
*/
|
|
1204
|
-
redo: () => void;
|
|
1205
|
-
|
|
1206
|
-
/**
|
|
1207
|
-
* Clears the entire history of changes, including both undone and redone operations.
|
|
1208
|
-
* After calling this method, both the `undo` and `redo` histories will be empty.
|
|
1209
|
-
*/
|
|
1210
|
-
clear: () => void;
|
|
1211
|
-
|
|
1212
|
-
/**
|
|
1213
|
-
* Returns an array of all previously performed changes that can be undone.
|
|
1214
|
-
* This represents the stack of actions available for `undo()`.
|
|
1215
|
-
* @returns An array of `EditStackData` objects representing past changes.
|
|
1216
|
-
*/
|
|
1217
|
-
getPast: () => EditStackData[];
|
|
1218
|
-
|
|
1219
|
-
/**
|
|
1220
|
-
* Returns an array of changes that have been undone and can be redone.
|
|
1221
|
-
* This represents the stack of actions available for `redo()`.
|
|
1222
|
-
* @returns An array of `EditStackData` objects representing future changes.
|
|
1223
|
-
*/
|
|
1224
|
-
getFuture: () => EditStackData[];
|
|
1225
|
-
|
|
1226
|
-
/**
|
|
1227
|
-
* Checks whether there is at least one action in history that can be undone.
|
|
1228
|
-
* @returns `true` if `undo()` can be performed, otherwise `false`.
|
|
1229
|
-
*/
|
|
1230
|
-
canUndo: () => boolean;
|
|
1231
|
-
|
|
1232
|
-
/**
|
|
1233
|
-
* Checks whether there is at least one undone action that can be redone.
|
|
1234
|
-
* @returns `true` if `redo()` can be performed, otherwise `false`.
|
|
1235
|
-
*/
|
|
1236
|
-
canRedo: () => boolean;
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* Creates a snapshot of the current state, which can be saved and restored later.
|
|
1240
|
-
* Useful for serializing the change history.
|
|
1241
|
-
* @returns An `EditStackSnapshot` object containing the state of the change history.
|
|
1242
|
-
*/
|
|
1243
|
-
createSnapshot: () => EditStackSnapshot;
|
|
1244
|
-
|
|
1245
|
-
/**
|
|
1246
|
-
* Restores the change history state from the provided snapshot.
|
|
1247
|
-
* Allows loading a previously saved history.
|
|
1248
|
-
* @param snapshot An `EditStackSnapshot` object containing the saved history state.
|
|
1249
|
-
*/
|
|
1250
|
-
restoreSnapshot: (snapshot: EditStackSnapshot) => void;
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
declare namespace ExportedApi {
|
|
1254
|
-
namespace UndoRedoMixin {
|
|
1255
|
-
interface Instance {
|
|
1256
|
-
/**
|
|
1257
|
-
* An instance of `IUndoRedoService` that manages undo and redo operations.
|
|
1258
|
-
*/
|
|
1259
|
-
undoRedoService: IUndoRedoService;
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
interface Instance extends UndoRedoMixin.Instance {}
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
declare namespace ExportedApi {
|
|
1267
|
-
interface Instance {
|
|
1268
|
-
/** reset app config */
|
|
1269
|
-
reset(options: Options): Promise<Instance>;
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
export type Instance = ExportedApi.Instance;
|
|
1274
|
-
|
|
1275
|
-
export type Options = ExportedApi.Options;
|
|
1276
|
-
|
|
1277
|
-
/**
|
|
1278
|
-
* initialize app instance
|
|
1279
|
-
* @param {options} app options
|
|
1280
|
-
* @returns app instance
|
|
1281
|
-
*/
|
|
1282
|
-
export function init(options: Options): Promise<Instance>;
|
|
1283
|
-
/**
|
|
1284
|
-
* parse AMP email
|
|
1285
|
-
* @param {code} email or code
|
|
1286
|
-
* @returns object, contains pure html and AMP code
|
|
1287
|
-
*/
|
|
1288
|
-
export function parseAMP(code: string | { code: string }): Promise<ParsedAMP>;
|
|
1289
|
-
/**
|
|
1290
|
-
* app version
|
|
1291
|
-
*/
|
|
1292
|
-
export const version: string;
|