@emailmaker/emailmaker 1.0.96 → 1.0.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/README.md +1 -1
  2. package/iframe/429.js +1 -1
  3. package/iframe/766.js +1 -1
  4. package/iframe/iframe-eblock.441a4dbc4384f20fcf1e.html +1 -0
  5. package/iframe/iframe.441a4dbc4384f20fcf1e.html +1 -0
  6. package/iframe/js/330.378aec42.js +1 -0
  7. package/iframe/js/{826.0e4820c1.js.LICENSE.txt → 330.378aec42.js.LICENSE.txt} +1 -1
  8. package/iframe/sandbox-eblock.js +1 -1
  9. package/iframe/sandbox.js +1 -1
  10. package/package.json +1 -1
  11. package/react/index.js +1 -1
  12. package/react/index.mjs +1 -1
  13. package/translations.pot +322 -305
  14. package/asset-manifest.json +0 -165
  15. package/css.worker.js +0 -2
  16. package/css.worker.js.LICENSE.txt +0 -6
  17. package/editor.worker.js +0 -1
  18. package/emailmaker-esm.js +0 -1
  19. package/emailmaker.d.ts +0 -1826
  20. package/emailmaker.js +0 -1
  21. package/html.worker.js +0 -2
  22. package/html.worker.js.LICENSE.txt +0 -14
  23. package/iframe/iframe-eblock.e8d51b90ab45966000c9.html +0 -1
  24. package/iframe/iframe.e8d51b90ab45966000c9.html +0 -1
  25. package/iframe/js/826.0e4820c1.js +0 -1
  26. package/plugin.html +0 -294
  27. package/plugin_blocks_test.html +0 -144
  28. package/plugin_default.html +0 -56
  29. package/plugin_idigital.html +0 -254
  30. package/plugin_nota.html +0 -861
  31. package/plugin_s.html +0 -31
  32. package/static/css/57.3f9e7de8.chunk.css +0 -1
  33. package/static/css/578.fe5765dd.chunk.css +0 -1
  34. package/static/css/6501.e131603e.chunk.css +0 -1
  35. package/static/css/6798.94b6a519.chunk.css +0 -1
  36. package/static/css/8084.15f07f40.chunk.css +0 -1
  37. package/static/js/1303.f6ad7f62.js +0 -2
  38. package/static/js/1303.f6ad7f62.js.LICENSE.txt +0 -11
  39. package/static/js/1538.97b965ba.chunk.js +0 -2
  40. package/static/js/1538.97b965ba.chunk.js.LICENSE.txt +0 -23
  41. package/static/js/1654.d922b07e.js +0 -2
  42. package/static/js/1654.d922b07e.js.LICENSE.txt +0 -38
  43. package/static/js/1729.a0be903e.chunk.js +0 -1
  44. package/static/js/1880.a21db601.chunk.js +0 -1
  45. package/static/js/2642.b60a63f6.chunk.js +0 -1
  46. package/static/js/2715.c21845e3.js +0 -2
  47. package/static/js/2715.c21845e3.js.LICENSE.txt +0 -59
  48. package/static/js/3017.6335b77e.chunk.js +0 -1
  49. package/static/js/3019.aaa6d087.chunk.js +0 -2
  50. package/static/js/3019.aaa6d087.chunk.js.LICENSE.txt +0 -6
  51. package/static/js/3085.b9d27236.chunk.js +0 -2
  52. package/static/js/3085.b9d27236.chunk.js.LICENSE.txt +0 -54
  53. package/static/js/3220.db24c24f.js +0 -2
  54. package/static/js/3220.db24c24f.js.LICENSE.txt +0 -39
  55. package/static/js/4309.ae8e4ad0.chunk.js +0 -1
  56. package/static/js/4972.264e4569.js +0 -1
  57. package/static/js/5346.4aaf9222.chunk.js +0 -2
  58. package/static/js/5346.4aaf9222.chunk.js.LICENSE.txt +0 -6
  59. package/static/js/542.c5e7e839.js +0 -2
  60. package/static/js/542.c5e7e839.js.LICENSE.txt +0 -21
  61. package/static/js/57.4cd2b40e.chunk.js +0 -1
  62. package/static/js/578.068dd4e8.chunk.js +0 -2
  63. package/static/js/578.068dd4e8.chunk.js.LICENSE.txt +0 -6
  64. package/static/js/6144.a3bf0881.chunk.js +0 -2
  65. package/static/js/6144.a3bf0881.chunk.js.LICENSE.txt +0 -6
  66. package/static/js/6419.e52a6158.js +0 -2
  67. package/static/js/6419.e52a6158.js.LICENSE.txt +0 -1
  68. package/static/js/6501.7570e270.chunk.js +0 -1
  69. package/static/js/6798.ae85cbf9.chunk.js +0 -2
  70. package/static/js/6798.ae85cbf9.chunk.js.LICENSE.txt +0 -39
  71. package/static/js/6819.85c72c79.chunk.js +0 -2
  72. package/static/js/6819.85c72c79.chunk.js.LICENSE.txt +0 -6
  73. package/static/js/6957.5082b810.chunk.js +0 -1
  74. package/static/js/7463.69864ff5.chunk.js +0 -2
  75. package/static/js/7463.69864ff5.chunk.js.LICENSE.txt +0 -6
  76. package/static/js/8084.5458cfaf.chunk.js +0 -1
  77. package/static/js/8473.54e12d36.chunk.js +0 -2
  78. package/static/js/8473.54e12d36.chunk.js.LICENSE.txt +0 -101
  79. package/static/js/8521.a1623fc2.chunk.js +0 -2
  80. package/static/js/8521.a1623fc2.chunk.js.LICENSE.txt +0 -6
  81. package/static/js/9644.1ae95bb7.chunk.js +0 -2
  82. package/static/js/9644.1ae95bb7.chunk.js.LICENSE.txt +0 -6
  83. package/static/js/9960.218c70ae.chunk.js +0 -2
  84. package/static/js/9960.218c70ae.chunk.js.LICENSE.txt +0 -30
  85. package/static/js/9981.6c41ee44.js +0 -1
  86. package/static/js/ant-locale/locale-ar_EG-js.a1f4a2ee.chunk.js +0 -1
  87. package/static/js/ant-locale/locale-az_AZ-js.1b3f2ec6.chunk.js +0 -1
  88. package/static/js/ant-locale/locale-bg_BG-js.2f68d816.chunk.js +0 -1
  89. package/static/js/ant-locale/locale-bn_BD-js.38ca14cb.chunk.js +0 -1
  90. package/static/js/ant-locale/locale-by_BY-js.927570db.chunk.js +0 -1
  91. package/static/js/ant-locale/locale-ca_ES-js.e4bdfa2b.chunk.js +0 -1
  92. package/static/js/ant-locale/locale-cs_CZ-js.f1151015.chunk.js +0 -1
  93. package/static/js/ant-locale/locale-da_DK-js.33e12cfb.chunk.js +0 -1
  94. package/static/js/ant-locale/locale-de_DE-js.42497042.chunk.js +0 -1
  95. package/static/js/ant-locale/locale-el_GR-js.007d40b4.chunk.js +0 -1
  96. package/static/js/ant-locale/locale-en_GB-js.6756ba01.chunk.js +0 -1
  97. package/static/js/ant-locale/locale-es_ES-js.43424efe.chunk.js +0 -1
  98. package/static/js/ant-locale/locale-et_EE-js.3694348e.chunk.js +0 -1
  99. package/static/js/ant-locale/locale-eu_ES-js.e2678a29.chunk.js +0 -1
  100. package/static/js/ant-locale/locale-fa_IR-js.3b6bfddc.chunk.js +0 -1
  101. package/static/js/ant-locale/locale-fi_FI-js.8e749864.chunk.js +0 -1
  102. package/static/js/ant-locale/locale-fr_BE-js.2aec36ca.chunk.js +0 -1
  103. package/static/js/ant-locale/locale-fr_CA-js.ba00ca3a.chunk.js +0 -1
  104. package/static/js/ant-locale/locale-fr_FR-js.1e6d0a10.chunk.js +0 -1
  105. package/static/js/ant-locale/locale-ga_IE-js.cc1f0f56.chunk.js +0 -1
  106. package/static/js/ant-locale/locale-gl_ES-js.c1588dec.chunk.js +0 -1
  107. package/static/js/ant-locale/locale-he_IL-js.1be3257a.chunk.js +0 -1
  108. package/static/js/ant-locale/locale-hi_IN-js.8e3ea1dc.chunk.js +0 -1
  109. package/static/js/ant-locale/locale-hr_HR-js.94001d08.chunk.js +0 -1
  110. package/static/js/ant-locale/locale-hu_HU-js.50a3ffc6.chunk.js +0 -1
  111. package/static/js/ant-locale/locale-hy_AM-js.6b20bceb.chunk.js +0 -1
  112. package/static/js/ant-locale/locale-id_ID-js.b380cc8b.chunk.js +0 -1
  113. package/static/js/ant-locale/locale-is_IS-js.995979c0.chunk.js +0 -1
  114. package/static/js/ant-locale/locale-it_IT-js.46a8ce6d.chunk.js +0 -1
  115. package/static/js/ant-locale/locale-ja_JP-js.69f9da33.chunk.js +0 -1
  116. package/static/js/ant-locale/locale-ka_GE-js.8b08646c.chunk.js +0 -1
  117. package/static/js/ant-locale/locale-kk_KZ-js.a1cc2ddc.chunk.js +0 -1
  118. package/static/js/ant-locale/locale-km_KH-js.09c630f9.chunk.js +0 -1
  119. package/static/js/ant-locale/locale-kmr_IQ-js.c25f3afa.chunk.js +0 -1
  120. package/static/js/ant-locale/locale-kn_IN-js.40066823.chunk.js +0 -1
  121. package/static/js/ant-locale/locale-ko_KR-js.68047848.chunk.js +0 -1
  122. package/static/js/ant-locale/locale-ku_IQ-js.594553b1.chunk.js +0 -1
  123. package/static/js/ant-locale/locale-lt_LT-js.08ac662b.chunk.js +0 -1
  124. package/static/js/ant-locale/locale-lv_LV-js.2a33af61.chunk.js +0 -1
  125. package/static/js/ant-locale/locale-mk_MK-js.caa088c9.chunk.js +0 -1
  126. package/static/js/ant-locale/locale-ml_IN-js.3aa233eb.chunk.js +0 -1
  127. package/static/js/ant-locale/locale-mn_MN-js.2550caa5.chunk.js +0 -1
  128. package/static/js/ant-locale/locale-ms_MY-js.924bfbf0.chunk.js +0 -1
  129. package/static/js/ant-locale/locale-my_MM-js.bc3805ae.chunk.js +0 -1
  130. package/static/js/ant-locale/locale-nb_NO-js.471cc88a.chunk.js +0 -1
  131. package/static/js/ant-locale/locale-ne_NP-js.52b65a1a.chunk.js +0 -1
  132. package/static/js/ant-locale/locale-nl_BE-js.2af0a7fe.chunk.js +0 -1
  133. package/static/js/ant-locale/locale-nl_NL-js.453457a0.chunk.js +0 -1
  134. package/static/js/ant-locale/locale-pl_PL-js.1e4b27da.chunk.js +0 -1
  135. package/static/js/ant-locale/locale-pt_BR-js.75dc6403.chunk.js +0 -1
  136. package/static/js/ant-locale/locale-pt_PT-js.b07438c3.chunk.js +0 -1
  137. package/static/js/ant-locale/locale-ro_RO-js.4a05dc9d.chunk.js +0 -1
  138. package/static/js/ant-locale/locale-si_LK-js.3b54f4c4.chunk.js +0 -1
  139. package/static/js/ant-locale/locale-sk_SK-js.cd76b6b1.chunk.js +0 -1
  140. package/static/js/ant-locale/locale-sl_SI-js.8afbce30.chunk.js +0 -1
  141. package/static/js/ant-locale/locale-sr_RS-js.0708405f.chunk.js +0 -1
  142. package/static/js/ant-locale/locale-sv_SE-js.9f47a065.chunk.js +0 -1
  143. package/static/js/ant-locale/locale-ta_IN-js.3b46361c.chunk.js +0 -1
  144. package/static/js/ant-locale/locale-th_TH-js.83e732d3.chunk.js +0 -1
  145. package/static/js/ant-locale/locale-tk_TK-js.63d0b187.chunk.js +0 -1
  146. package/static/js/ant-locale/locale-tr_TR-js.b5e42917.chunk.js +0 -1
  147. package/static/js/ant-locale/locale-uk_UA-js.ef0d8c8e.chunk.js +0 -1
  148. package/static/js/ant-locale/locale-ur_PK-js.904c3e1c.chunk.js +0 -1
  149. package/static/js/ant-locale/locale-vi_VN-js.f0324229.chunk.js +0 -1
  150. package/static/js/ant-locale/locale-zh_CN-js.428a6bc7.chunk.js +0 -1
  151. package/static/js/ant-locale/locale-zh_HK-js.0feb368f.chunk.js +0 -1
  152. package/static/js/ant-locale/locale-zh_TW-js.163140fa.chunk.js +0 -1
  153. package/static/js/emailmaker_core.f495f35b.js +0 -2
  154. package/static/js/emailmaker_core.f495f35b.js.LICENSE.txt +0 -23
  155. package/static/js/mergeTags/locale0.594765fd.chunk.js +0 -1
  156. package/static/js/mergeTags/locale1.7a79e21e.chunk.js +0 -1
  157. package/static/media/ai-image.7c42c2e12001ebf31881.png +0 -0
  158. package/static/media/codicon.f13d28f3e470ec5c0896.ttf +0 -0
  159. package/static/media/empty-image.1827d6561f3c4042dfb3.png +0 -0
  160. package/static/media/fb.ff10384394f8044ec889.png +0 -0
  161. package/static/media/frame_dark.318d7ed53535d80662dc.png +0 -0
  162. package/static/media/frame_light.22a9b4ec728365d8193f.png +0 -0
  163. package/static/media/frame_template_gallery.85693b3950e7689fb3a5.png +0 -0
  164. package/static/media/icon-border-radius.2a56b93a7711558098a622296b7ae2e1.svg +0 -1
  165. package/static/media/icon-create-block.0b077f4000bf7907b9ea871d28c7fb1e.svg +0 -1
  166. package/static/media/icon-menu-block-welcome.1c534a003522feadd2e7.png +0 -0
  167. package/static/media/ig.47a89992b4bec92d4364.png +0 -0
  168. package/static/media/project-email-back-dark.9916625a9a714830b770.svg +0 -29
  169. package/static/media/project-email-back.0ce470def19ce7c063e0.svg +0 -29
  170. package/static/media/sign_up_01.333271584216122b89ba.png +0 -0
  171. package/static/media/sign_up_01_blocks.5538cfdb90d4869794dc.png +0 -0
  172. package/static/media/sign_up_02.d99d2aa6bf1ea74f01fa.png +0 -0
  173. package/static/media/sign_up_02_blocks.837fc2c9a9461fda13be.png +0 -0
  174. package/static/media/sign_up_03.5545ffad60a2cb5e0336.png +0 -0
  175. package/static/media/sign_up_03_blocks.126601f7a6fbea4b6c54.png +0 -0
  176. package/static/media/sign_up_04.398a4ca50d5f5b3cd837.png +0 -0
  177. package/static/media/sign_up_04_blocks.255c5c07b23cbcc256fd.png +0 -0
  178. package/static/media/sign_up_05.4c58df1be2edaa79d52b.png +0 -0
  179. package/static/media/sign_up_05_blocks.431b6844fdf3e14642c2.png +0 -0
  180. package/static/media/tg.10f004529a98df9732b9.png +0 -0
  181. package/static/media/tw.823a7736ac2d82815c71.png +0 -0
  182. package/static/media/video.854adea50295d0a3f7ae.png +0 -0
  183. package/static/media/vk.fe41df919f4e8718e0b3.png +0 -0
  184. package/static/media/yd.c40d05dde64ef695fdf2.png +0 -0
  185. package/static/media/yt.4ac57e55d158b40c7fc1.png +0 -0
package/emailmaker.d.ts DELETED
@@ -1,1826 +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 = { type?: 'group'; label: string; value: string; children?: MergeTag[] };
43
-
44
- type MergeTagItem = { label: string; value: string };
45
- type MergeTag = MergeTagGroup | MergeTagItem;
46
-
47
- type SaveListener<T> = AppListener<SaveEventPayload<T>, T | undefined | void>;
48
- type SaveEvent<T> = AppEvent<SaveListener<T>>;
49
- type RemoveListener<T> = AppListener<RemoveEventPayload<T>>;
50
- type RemoveEvent<T> = AppEvent<RemoveListener<T>>;
51
- type CreateListener<T> = AppListener<CreateEventPayload<T>, T | undefined | void>;
52
- type CreateEvent<T> = AppEvent<CreateListener<T>>;
53
-
54
- interface ParsedAMP {
55
- code: string;
56
- html: string;
57
- ampHtml: string;
58
- }
59
- type Notify = {
60
- type?: 'success' | 'info' | 'error' | 'warning';
61
- message: string | HTMLElement;
62
- description?: string | HTMLElement;
63
- btn?: string | HTMLElement;
64
- onClose?: () => void;
65
- duration?: number | null;
66
- icon?: string | HTMLElement;
67
- placement?: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
68
- style?: any;
69
- className?: string;
70
- onClick?: () => void;
71
- closeIcon?: boolean | string | HTMLElement;
72
- props?: any;
73
- role?: 'alert' | 'status';
74
- };
75
-
76
- type EmailDesc = { id?: string; title?: string; code?: string; subject?: string; preheader?: string };
77
-
78
- type BlockDesc = { id?: string; title?: string; code?: string };
79
-
80
- interface ISelection {
81
- selectionStartLineNumber: number;
82
- selectionStartColumn: number;
83
- positionLineNumber: number;
84
- positionColumn: number;
85
- }
86
- interface ISingleModelEditStackData {
87
- afterCursorState: ISelection[];
88
- afterVersionId: number;
89
- beforeCursorState: ISelection[];
90
- beforeVersionId: number;
91
- changes: { oldPosition: number; oldText: string; newPosition: number; newText: string }[];
92
- }
93
-
94
- interface IFrameErrorInfo {
95
- future: ISingleModelEditStackData[];
96
- past: ISingleModelEditStackData[];
97
- errorResolved: boolean;
98
- message: string;
99
- text: string;
100
- stack: string;
101
- userId: string;
102
- entityId: string;
103
- entityType: 'email' | 'block';
104
- sentryEventId: string;
105
- }
106
-
107
- declare namespace Notify {
108
- type Error = { innerException?: any } & (
109
- | { id?: ''; data?: any }
110
- | { id: 'EMAIL_CREATING_ERROR'; data: EmailDesc }
111
- | { id: 'EMAIL_EDITING_ERROR'; data: EmailDesc }
112
- | { id: 'FOLDER_CREATE_ERROR'; data: string }
113
- | { id: 'EMAIL_CLONING_ERROR'; data: EmailDesc }
114
- | { id: 'TAG_CREATING_ERROR'; data: string }
115
- | { id: 'EMAIL_ACCESS_TO_LOCKED_ERROR'; data: EmailDesc }
116
- | { id: 'EMAIL_TOO_MANY_TAGS_ERROR'; data: EmailDesc }
117
- | { id: 'BLOCK_GET_ERROR'; data: {} }
118
- | { id: 'BLOCK_ACCESS_TO_LOCKED_ERROR'; data: BlockDesc }
119
- | { id: 'BLOCK_TOO_MANY_TAGS_ERROR'; data: BlockDesc }
120
- | { id: 'BLOCK_CLONING_ERROR'; data: BlockDesc }
121
- | { id: 'AI_IMAGE_SEND_ERROR'; data: any }
122
- | { id: 'AI_IMAGE_GET_ERROR'; data: any }
123
- | { id: 'IMAGE_UPLOAD_WRONG_FORMAT'; data: File }
124
- | { id: 'IMAGE_UPLOAD_ERROR'; data: File }
125
- | { id: 'BLOCK_CREATING_ERROR'; data: BlockDesc }
126
- | { id: 'BLOCK_EDITING_ERROR'; data: BlockDesc }
127
- | { id: 'EMAIL_AUTOSAVE_ERROR'; data: ExportedApi.EmailRevision }
128
- | { id: 'EMAIL_INIT_EVENT_ERROR'; data: EmailDesc }
129
- | { id: 'SAVE_BUTTON_CLICK_EVENT_ERROR'; data: EmailDesc }
130
- | { id: 'NEXT_BUTTON_CLICK_EVENT_ERROR'; data: EmailDesc }
131
- | { id: 'BLOCK_REMOVING_ERROR'; data: BlockDesc }
132
- | { id: 'IFRAME_ERROR'; data: IFrameErrorInfo }
133
- | { id: 'GET_LOCALE_ERROR'; data: any }
134
- | { id: 'GET_LOCALES_ERROR'; data: any }
135
- );
136
- type ErrorEvent = { type: 'error' } & Error;
137
-
138
- type Success =
139
- | { id?: ''; data?: any }
140
- | { id: 'EMAIL_TITLE_UPDATED_FROM_AI'; data: string }
141
- | { id: 'EMAIL_PREHEADER_UPDATED_FROM_AI'; data: string }
142
- | { id: 'TEXT_COPIED_TO_CLIPBOARD'; data: string }
143
- | { id: 'EMAIL_SAVING_SUCCESS'; data: EmailDesc }
144
- | { id: 'AI_IMAGE_SEND_SUCCESS'; data: any }
145
- | { id: 'IMAGE_UPLOAD_SUCCESS'; data: File }
146
- | { id: 'BLOCK_CREATING_SUCCESS'; data: BlockDesc }
147
- | { id: 'BLOCK_EDITING_SUCCESS'; data: BlockDesc }
148
- | { id: 'EMAIL_AUTOSAVE_SUCCESS'; data: ExportedApi.EmailRevision }
149
- | { id: 'BLOCK_CLONING_SUCCESS'; data: BlockDesc }
150
- | { id: 'BLOCK_REMOVING_SUCCESS'; data: BlockDesc };
151
-
152
- type SuccessEvent = { type: 'success' } & Success;
153
-
154
- type Warning =
155
- | { id?: ''; data?: any }
156
- | { id: 'COPY_NOT_SAVED_BLOCK'; data: ExportedApi.Block }
157
- | { id: 'EMAIL_TITLE_UPDATED'; data: string };
158
-
159
- type WarningEvent = { type: 'warning' } & Warning;
160
-
161
- type Info = { id?: ''; data?: any };
162
-
163
- type InfoEvent = { type: 'info' } & Info;
164
- }
165
-
166
- type NotifyEvent = Notify.SuccessEvent | Notify.ErrorEvent | Notify.WarningEvent | Notify.InfoEvent;
167
-
168
- declare namespace ExportedApi {
169
- interface Block {
170
- /**
171
- * Date of publication of the record (according to the time zone of the site).
172
- * @format date-time
173
- */
174
- date?: string | null;
175
- /**
176
- * Date of publication of the record, GMT.
177
- * @format date-time
178
- */
179
- date_gmt?: string | null;
180
-
181
- /** The unique identifier of the record. */
182
- id?: string;
183
- /**
184
- * The URL of the record.
185
- * @format uri
186
- */
187
-
188
- modified?: string;
189
- /**
190
- * The date the record was last modified (in GMT format).
191
- * @format date-time
192
- */
193
- modified_gmt?: string;
194
- /** The name of the entry. */
195
- title?: string;
196
- /** ID of the author of the entry. */
197
- author?: string;
198
- /** An excerpt of the recording. */
199
- excerpt?: string;
200
-
201
- subject?: string;
202
- description?: string;
203
- code?: string;
204
- project?: string | number;
205
- related_email?: string;
206
- type?: string;
207
- }
208
- }
209
- declare namespace ExportedApi {
210
- interface BlockRevision {
211
- /** ID of the editorial board author. */
212
- author?: string | number;
213
- /**
214
- * The date of publication of the record, according to the time zone of the site.
215
- * @format date-time
216
- */
217
- date?: string;
218
- /**
219
- * The time of publication of the editorial office, GMT.
220
- * @format date-time
221
- */
222
- date_gmt?: string;
223
- /** The global unique identifier of the record. */
224
- guid?: {
225
- /** GUID to write in the form in which it exists in the database. */
226
- raw?: string;
227
- /** The GUID for the record, converted for display. */
228
- rendered?: string;
229
- };
230
- /** Unique identifier of the editorial office. */
231
- id?: string;
232
- /**
233
- * The date of the last revision, according to the time zone of the site.
234
- * @format date-time
235
- */
236
- modified?: string;
237
- /**
238
- * Date of the last revision, GMT.
239
- * @format date-time
240
- */
241
- modified_gmt?: string;
242
- /** ID of the editorial parent. */
243
- parent?: string;
244
- /** The alphanumeric identifier of the record is unique for its type. */
245
- slug?: string;
246
- /** The name of the entry. */
247
- title?: string;
248
- /** An excerpt of the recording. */
249
- excerpt?: string;
250
- /**
251
- * Link to preview the recording.
252
- * @format uri
253
- */
254
- preview_link?: string;
255
-
256
- code?: string;
257
- }
258
- }
259
- declare namespace ExportedApi {
260
- enum CodeErrorSeverity {
261
- Hint = 1,
262
- Info = 2,
263
- Warning = 4,
264
- Error = 8,
265
- }
266
-
267
- enum CodeErrorTag {
268
- Unnecessary = 1,
269
- Deprecated = 2,
270
- }
271
-
272
- interface CodeError {
273
- severity: CodeErrorSeverity;
274
- message: string;
275
- source?: string;
276
- startLineNumber: number;
277
- startColumn: number;
278
- endLineNumber: number;
279
- endColumn: number;
280
- startOffset: number;
281
- endOffset: number;
282
- tags?: CodeErrorTag[];
283
- }
284
- }
285
-
286
- declare namespace ExportedApi {
287
- interface Comment {
288
- /** Unique identifier for the comment. */
289
- id?: string;
290
- /** User object ID, if the author is a user. */
291
- author?: string;
292
- /**
293
- * The email address of the author of the comment.
294
- * @format email
295
- */
296
- author_email?: string;
297
- /**
298
- * The IP address of the comment author.
299
- * @format ip
300
- */
301
- author_ip?: string;
302
- /** The display name of the comment author. */
303
- author_name?: string;
304
- /**
305
- * URL for the author of the comment.
306
- * @format uri
307
- */
308
- author_url?: string;
309
- /** Value of the User-Agent of the comment author. */
310
- author_user_agent?: string;
311
- /** The content of the comment. */
312
- content?: string;
313
- /**
314
- * Date of publication of the comment (according to the time zone of the site).
315
- * @format date-time
316
- */
317
- date?: string;
318
- /**
319
- * The time of publication of the comment, GMT.
320
- * @format date-time
321
- */
322
- date_gmt?: string;
323
- /**
324
- * ID of the associated record object.
325
- * @default 0
326
- */
327
- post?: string;
328
- /** Comment status. */
329
- status?: string;
330
- /** Comment type. */
331
- type?: string;
332
- /** URL of the comment author's avatar image. */
333
- author_avatar_urls?: {
334
- /**
335
- * URL avatars with an image size of 24 pixels.
336
- * @format uri
337
- */
338
- '24'?: string;
339
- /**
340
- * URL avatars with an image size of 48 pixels.
341
- * @format uri
342
- */
343
- '48'?: string;
344
- /**
345
- * URL avatars with an image size of 96 pixels.
346
- * @format uri
347
- */
348
- '96'?: string;
349
- };
350
- /** Meta fields. */
351
- meta?: object;
352
- target_id?: string;
353
-
354
- parent?: string;
355
- }
356
- }
357
- declare namespace ExportedApi {
358
- type EditorOptions = {
359
- fontSize?: number;
360
- fontFamily?: string;
361
- tabSize?: number;
362
- wordWrap?: boolean;
363
- minimap?: boolean;
364
- insertSpaces?: boolean;
365
- };
366
- }
367
- declare namespace ExportedApi {
368
- interface Email {
369
- /**
370
- * Date of publication of the record, GMT.
371
- * @format date-time
372
- */
373
- date_gmt?: string | null;
374
- /** Unique identifier of the record. */
375
- id?: string;
376
- /** The name of the letter. */
377
- title?: string;
378
- /** Preheader of the letter. */
379
- preheader?: string;
380
- /** ID of the author of the entry. */
381
- author?: string;
382
- lock?: boolean;
383
- subject?: string;
384
- description?: string;
385
- code?: string;
386
- project?: string | number;
387
- // email tag names
388
- tags?: string[];
389
- utm_parameters?: {
390
- utm_source?: string;
391
- utm_medium?: string;
392
- utm_campaign?: string;
393
- utm_term?: string;
394
- utm_content?: string;
395
- };
396
- parent_email?: string;
397
- common_styles?: string;
398
- }
399
-
400
- interface CompiledEmail extends Email {
401
- readonly compiled: { html: string; ampHtml: string; text: string };
402
- }
403
- }
404
- declare namespace ExportedApi {
405
- interface EmailRevision {
406
- /** ID of the editorial board author. */
407
- author?: string;
408
- /**
409
- * The date of publication of the record, according to the time zone of the site.
410
- * @format date-time
411
- */
412
- date?: string;
413
- /**
414
- * The time of publication of the editorial office, GMT.
415
- * @format date-time
416
- */
417
- date_gmt?: string;
418
- /** Unique identifier of the editorial office. */
419
- id?: string;
420
- /**
421
- * The date of the last revision, according to the time zone of the site.
422
- * @format date-time
423
- */
424
- modified?: string;
425
- /**
426
- * Date of the last revision, GMT.
427
- * @format date-time
428
- */
429
- modified_gmt?: string;
430
- /** ID of the editorial parent. */
431
- parent?: string;
432
- /** The name of the entry. */
433
- title?: string;
434
- /** An excerpt of the recording. */
435
- excerpt?: string;
436
-
437
- code?: string;
438
-
439
- preheader?: string;
440
-
441
- subject?: string;
442
-
443
- common_styles?: string;
444
- }
445
-
446
- interface CompiledEmailRevision extends EmailRevision {
447
- readonly compiled: { html: string; ampHtml: string };
448
- }
449
- }
450
- declare namespace ExportedApi {
451
- export type ThemeConfig = any;
452
- }
453
- declare namespace ExportedApi {
454
- export type CodeModeDirection = 'none' | 'left' | 'right' | 'bottom';
455
- export type Locale = 'en_US' | 'ru_RU';
456
- export type ConfigMods = 'pro' | 'editor' | 'simple' | 'freeUserBlocks';
457
-
458
- export interface MergeTagsInfo {
459
- syntax: string[];
460
- items: MergeTag[];
461
- }
462
-
463
- type LimitName = 'AiImgCount' | 'AiChatCount' | 'AiGeneratorCount' | 'OptimizationCount';
464
-
465
- type LocaleListener = AppListener<string, string>;
466
- type LimitListener = AppListener<{ name: LimitName; count: number }>;
467
-
468
- interface AdvancedConfigs {
469
- [key: string]: Config;
470
- }
471
-
472
- interface Counters {
473
- optimization_counter: number;
474
- ai_counter: number;
475
- ai_img_counter: number;
476
- ai_generator_limit: number;
477
- }
478
-
479
- interface Limits {
480
- optimization_limit: number;
481
- ai_limit: number;
482
- ai_img_limit: number;
483
- ai_generator_limit: number;
484
- }
485
-
486
- interface Config {
487
- /** Application mode */
488
- mode?: ConfigMods;
489
-
490
- /** Counters and limits */
491
- counters?: Counters;
492
- limits?: Limits;
493
- /** billing page url */
494
- billingPageUrl?: string;
495
-
496
- imageInfoToolUrl?: string;
497
- /** Application Styles */
498
- styles: string;
499
- /** Application theme */
500
- theme: string;
501
- /** Application theme settings */
502
- themes: { [P in string]: ThemeConfig };
503
- /** showing the back arrow */
504
- headerArrowBackVisible: boolean;
505
- /** display of the Subject field */
506
- headerTitleVisible: boolean;
507
- /** showing the Preheader field */
508
- headerPreheaderVisible: boolean;
509
- /** showing the Header field */
510
- /** showing breadcrumbs in an iframe */
511
- pathEnabled: boolean;
512
- /** showing copy-paste of a block in an iframe */
513
- copyPasteEnabled: boolean;
514
- /** showing the Version History button */
515
- historyEnabled: boolean;
516
- /** showing the Code-mode button */
517
- codeEnabled: boolean;
518
- /** showing the Code-mode button in the mode when there is a desktop/mobile switch */
519
- codeSideEnabled: boolean;
520
- /** showing the Preview button */
521
- previewIconEnabled: boolean;
522
- /** Preview link */
523
- previewModeEnabled: boolean;
524
- /** showing the Test button in the mailers */
525
- livePreviewEnabled: boolean;
526
- /** showing the Send Test button */
527
- sendTestEnabled: boolean;
528
- /** showing the Share button */
529
- sharePreviewEnabled: boolean;
530
- /** displaying the message menu */
531
- emailDropdownMenuEnabled: boolean;
532
- /** showing the Clone item in the message menu */
533
- emailDropdownMenuClone: boolean;
534
- /** showing the Import item in the emails menu */
535
- emailDropdownMenuImport: boolean;
536
- /** showing the Import item in the emails menu like button */
537
- emailDropdownMenuImportButton: boolean;
538
- /** showing the Block item in the message menu */
539
- emailDropdownMenuLock: boolean;
540
- /** showing the Delete item in the message menu */
541
- emailDropdownMenuRemove: boolean;
542
- /** showing the Export button */
543
- emailExportEnabled: boolean;
544
- /** showing a secondary button */
545
- nextButtonEnabled: boolean;
546
- /** text of the secondary button */
547
- nextButtonText: string;
548
- /** showing the main button */
549
- saveButtonEnabled: boolean;
550
- /** text of the main button */
551
- saveButtonText: string;
552
- commandButtonsEnabled?: boolean;
553
- /** displaying the email ID */
554
- emailIdShow: boolean;
555
- /** side panel view */
556
- sidePanelFloating: boolean;
557
- /** mode switching bar */
558
- desktopMobileSwitchRule: boolean;
559
- /** mode switching panel */
560
- desktopMobileSwitchPanel: boolean;
561
- /** showing the block save button */
562
- saveBlockEnabled: boolean;
563
- /** showing the image change button */
564
- editImageControlEnabled: boolean;
565
- /** ability to collapse the sidebar */
566
- toggleSidePanel: boolean;
567
-
568
- /** Sidebar location */
569
- menuDirection: string;
570
-
571
- /** default setting of the opening tab (""/"common"/"empty") */
572
- defaultBuildPanel: string;
573
-
574
- /** Sidebar */
575
- commentsEnabled: boolean;
576
- optimizeEnabled: boolean;
577
- settingsEnabled: boolean;
578
- UTMEnabled: boolean;
579
- subjectEnabled: boolean;
580
- preheaderEnabled: boolean;
581
- descriptionEnabled: boolean;
582
- tagsEnabled: boolean;
583
- /** showing the mobile properties switch */
584
- switchDesktopMobilePropsEnabled: boolean;
585
- /** showing transition buttons to other elements */
586
- stepToOtherElementEnabled: boolean;
587
- /** showing the delete element button */
588
- deleteButtonEnabled: boolean;
589
- /** showing the Title field in the form of an image */
590
- formFieldImageTitleEnabled: boolean;
591
- /** showing border change fields */
592
- formFieldBorderEnabled: boolean;
593
- /** showing the rounding change fields */
594
- formFieldBorderRadiusEnabled: boolean;
595
- /** showing shadow change fields */
596
- formFieldBoxShadowEnabled: boolean;
597
- /** showing buttons to change the visibility of an element */
598
- formFieldVisibilityEnabled: boolean;
599
- /** showing the export to picture switch */
600
- formFieldExportAsPictureEnabled: boolean;
601
-
602
- /** showing the button to insert an image into the button text */
603
- formButtonFieldInsertImageEnabled: boolean;
604
- /** showing vertical alignment buttons */
605
- formButtonFieldVerticalAlignEnabled: boolean;
606
- /** showing text alignment buttons */
607
- formButtonFieldTextAlignEnabled: boolean;
608
- /** showing background image fields */
609
- formButtonFieldBackgroundImageEnabled: boolean;
610
- /** showing internal margins */
611
- formButtonFieldPaddingsEnabled: boolean;
612
- /** showing replacer button */
613
- formButtonFieldReplacerEnabled: boolean;
614
-
615
- /** showing vertical alignment buttons */
616
- formCellFieldVerticalAlignEnabled: boolean;
617
- /** showing background image fields */
618
- formCellFieldBackgroundImageEnabled: boolean;
619
- /** showing internal margins */
620
- formCellFieldPaddingsEnabled: boolean;
621
- /** showing sizes */
622
- formCellFieldSizeEnabled: boolean;
623
- /** showing the button to insert an image into the button text */
624
- formLinkFieldInsertImageEnabled: boolean;
625
- /** showing background image fields */
626
- formTableFieldBackgroundImageEnabled: boolean;
627
- /** showing background image fields */
628
- formDivFieldBackgroundImageEnabled: boolean;
629
- /** showing background image fields */
630
- formEmailFieldBackgroundImageEnabled: boolean;
631
- /** showing vertical alignment buttons */
632
- formImageFieldVerticalAlignEnabled: boolean;
633
- /** showing replacer button */
634
- formImageFieldReplacerEnabled: boolean;
635
- /** showing height field */
636
- formImageFieldHeightEnabled: boolean;
637
- /** showing typograf button */
638
- formTextFieldTypografEnabled: boolean;
639
- /** showing replacer button */
640
- formTextFieldReplacerEnabled: boolean;
641
-
642
- revisionService: boolean;
643
-
644
- /** Elements */
645
- elementImageEnabled: boolean;
646
- elementTextEnabled: boolean;
647
- elementHeaderEnabled: boolean;
648
- elementButtonEnabled: boolean;
649
- elementListULEnabled: boolean;
650
- elementListOLEnabled: boolean;
651
- elementDividerEnabled: boolean;
652
- elementSpacerEnabled: boolean;
653
- elementSocialEnabled: boolean;
654
- elementTableEnabled: boolean;
655
- elementCountdownEnabled: boolean;
656
- elementVideoEnabled: boolean;
657
- elementAIimageEnabled: boolean;
658
- elementAItextEnabled: boolean;
659
- elementCarouselEnabled: boolean;
660
- elementFormEnabled: boolean;
661
- elementAccordionEnabled: boolean;
662
-
663
- /** type of image editor display */
664
- imageCenterFileManagerView: boolean;
665
-
666
- imageCenterStockEnabled: boolean;
667
- imageCenterGifEnabled: boolean;
668
- imageCenterEditorEnabled: boolean;
669
- compressMaxSize: number;
670
- compressMaxWidthOrHeight: number;
671
-
672
- editor: EditorOptions;
673
-
674
- locale: Locale;
675
-
676
- codeModeDirection: CodeModeDirection;
677
-
678
- preventSendDataToEM?: boolean;
679
-
680
- mergeTags?: MergeTagsInfo;
681
-
682
- /** showing the merge tags button */
683
- mergeTagsShow?: boolean;
684
-
685
- testEmails?: string[];
686
-
687
- /** showing the config switch */
688
- configSwither?: boolean;
689
- /** Auto-save timeout */
690
- autosaveTimeout?: number;
691
- /** Configs that are passed to plugins */
692
- advancedConfigs?: AdvancedConfigs;
693
- onlyCodeModeInMobile?: boolean;
694
-
695
- pushToGTM?: boolean;
696
- /** header show */
697
- headerShow?: boolean;
698
- /** webversion show */
699
- webversionEnabled?: boolean;
700
- /** common styles show */
701
- commonStylesEnabled?: boolean;
702
- /** adaptive control show */
703
- emailResponsiveControlEnabled?: boolean;
704
- /** show export to text */
705
- exportTextEnabled?: boolean;
706
- /** show export to HTML */
707
- exportHtmlEnabled?: boolean;
708
- /** show export to ZIP */
709
- exportZipEnabled?: boolean;
710
- /** show export to buffer */
711
- exportClipboardEnabled?: boolean;
712
- /** show export to webhook */
713
- exportWebHookEnabled?: boolean;
714
- /** show export to Outlook */
715
- exportOutlookEnabled?: boolean;
716
- /** show export to PDF */
717
- exportPdfEnabled?: boolean;
718
- /** show export to PNG */
719
- exportPngEnabled?: boolean;
720
- /** AI assistant show */
721
- aiAssistentEnabled?: boolean;
722
- /** link check display */
723
- optimizeLinksEnabled?: boolean;
724
- /** picture check display */
725
- optimizeImagesEnabled?: boolean;
726
- /** SpamAssassin check display */
727
- optimizeSpamAssassinEnabled?: boolean;
728
- /** code check display */
729
- optimizeCheckCodeEnabled?: boolean;
730
- /** Displaying a field Template */
731
- isTemplateEnabled?: boolean;
732
- /** block menu display */
733
- blocksSectionsShow?: boolean;
734
- /** empty blocks display */
735
- blocksEmptyEnabled?: boolean;
736
- /** display of saved blocks */
737
- blocksSavedEnabled?: boolean;
738
- /** common blocks display */
739
- blocksCommonEnabled?: boolean;
740
- /** template blocks display */
741
- blocksTemplateEnabled?: boolean;
742
- /** block search display */
743
- blocksSearchEnabled?: boolean;
744
- /** showing the panel for adding a block in the visual editor */
745
- blocksAddPanelEnabled?: boolean;
746
- /** turns off template editing */
747
- lockEditor?: boolean;
748
- /** turns off preheader and title editing */
749
- lockPreheaderAndTitle?: boolean;
750
- /** turns off preheader and title editing */
751
- disableSideMenu?: boolean;
752
- /** Showing a drop-down card with a path to the picture */
753
- imagePathDropdownEnabled?: boolean;
754
-
755
- /** Showing change visibility buttons in amp emails */
756
- formFieldAmpVisibilityEnabled?: boolean;
757
- /** Disable double click on next button */
758
- disableDoubleClickNextButton?: boolean;
759
- /** manually change state of next button */
760
- activeNextButton?: boolean;
761
- /** icons stroke width */
762
- iconStrokeWidth: number
763
- }
764
-
765
- export interface User {
766
- id?: string | number;
767
- /** The login name for the user. */
768
- username?: string;
769
- /** User's display name */
770
- user?: string;
771
- /** The user's email address. @format email */
772
- email?: string;
773
- /** URL of the user's avatar. */
774
- avatar_urls?: {
775
- /** URL avatars with an image size of 24 pixels. @format uri */
776
- '24'?: string;
777
- '48'?: string;
778
- '96'?: string;
779
- };
780
- }
781
-
782
- namespace AppConfigMixin {
783
- interface Options {
784
- config?: Partial<Config>;
785
- advancedConfigs?: AdvancedConfigs;
786
- project?: string | number;
787
- user?: User;
788
- handleReadLocale?: LocaleListener;
789
- handleLimitUsage?: LimitListener;
790
- }
791
-
792
- interface Instance {
793
- setConfig(config: Partial<Config>): Promise<void>;
794
- getConfig(): Partial<Config>;
795
- updateConfig(config: Partial<Config>): Promise<void>;
796
- handleReadLocale: AppEvent<LocaleListener>;
797
- handleLimitUsage?: AppEvent<LimitListener>;
798
- }
799
- }
800
- interface Options extends AppConfigMixin.Options {}
801
-
802
- interface Instance extends AppConfigMixin.Instance {}
803
- }
804
- declare namespace ExportedApi {
805
- namespace AppInitMixin {
806
- interface Options {
807
- /** base url of the app server */
808
- baseUrl?: string;
809
- }
810
-
811
- interface Instance {}
812
- }
813
- interface Options extends AppInitMixin.Options {}
814
-
815
- interface Instance extends AppInitMixin.Instance {}
816
- }
817
-
818
- declare namespace ExportedApi {
819
- export type JWTAuthOptions = { email: string; password: string; remember?: boolean };
820
-
821
- type JWTOptions = {
822
- /** JWT authorization credentials */
823
- jwtAuth?: JWTAuthOptions;
824
- };
825
- namespace JWTMixin {
826
- interface Options extends JWTOptions {}
827
-
828
- interface Instance {}
829
- }
830
- interface Options extends JWTMixin.Options {}
831
-
832
- interface Instance extends JWTMixin.Instance {}
833
- }
834
- declare namespace ExportedApi {
835
- type OAuthCallback = (prevToken?: string) => MayBePromise<string>;
836
-
837
- type OAuthOptions = {
838
- /**
839
- * Get token callback
840
- */
841
- getAuthToken?: OAuthCallback;
842
- };
843
- namespace OAuthMixin {
844
- interface Options extends OAuthOptions {}
845
-
846
- interface Instance {}
847
- }
848
- interface Options extends OAuthMixin.Options {}
849
-
850
- interface Instance extends OAuthMixin.Instance {}
851
- }
852
-
853
- declare namespace ExportedApi {
854
- interface CoreOptions {
855
- element?: string | Element | DocumentFragment;
856
- handleChunkLoaded?: () => void;
857
- }
858
- namespace CoreMixin {
859
- interface Options extends CoreOptions {}
860
-
861
- interface Instance {
862
- getElement(): Element | DocumentFragment | undefined;
863
- }
864
- }
865
- interface Options extends CoreMixin.Options {}
866
-
867
- interface Instance extends CoreMixin.Instance {}
868
- }
869
- declare namespace ExportedApi {
870
- namespace DataMixin {
871
- type BlockShowOptions = {
872
- /** block content */
873
- block: Block | string;
874
- /** autosaves */
875
- revisions?: BlockRevision[];
876
- /** comments */
877
- comments?: Comment[];
878
- /** blocks */
879
- blocks?: Block[];
880
- /** template identifier for email */
881
- templateId?: string | number;
882
- };
883
-
884
- type EmailShowOptions = {
885
- /** email content */
886
- email: Email | string;
887
- /** autosaves */
888
- autosaves?: EmailRevision[];
889
- /** comments */
890
- comments?: Comment[];
891
- /** blocks */
892
- blocks?: Block[];
893
- /** template identifier for block */
894
- templateId?: number;
895
- };
896
-
897
- type Content = string | Email | EmailShowOptions;
898
-
899
- type ReadEmailHandler = (id: string) => MayBePromise<Email>;
900
- type ReadEmailAutosavesHandler = (emailId: string) => MayBePromise<EmailRevision[]>;
901
- type ReadBlocksHandler = (project: string) => MayBePromise<Block[]>;
902
- type ReadTemplateBlocksHandler = (block: { emailId: string; project: string }) => MayBePromise<Block[]>;
903
- type ReadCommentsHandler = (emailId: string) => MayBePromise<Comment[]>;
904
-
905
- type EmailHandler = AppListener<Email>;
906
- type HtmlHandler = AppListener<string>;
907
-
908
- type TestEmailSendEventPayload = {
909
- project?: string;
910
- email_id?: string;
911
- subject?: string;
912
- email?: string;
913
- code?: string;
914
- from_name?: string;
915
- };
916
-
917
- type TestEmailSendHandler = AppListener<TestEmailSendEventPayload, false | void>;
918
-
919
- type TestEmailModalSendHandler = AppListener<Email, false | void>;
920
-
921
- type LivePreviewHandler = AppListener<{ project?: string; id: string; subject?: string; html: string }>;
922
-
923
- type ShareHandler = AppListener<{ project?: string; id: string }>;
924
-
925
- type PreviewHandler = AppListener<{ project?: string; id: string }>;
926
-
927
- type ValidateEvent = AppListener<CodeError[]>;
928
-
929
- interface Events {
930
- /** read email handler */
931
- handleReadEmail: AppEvent<ReadEmailHandler>;
932
- /** fires when email saved */
933
- handleSaveEmail: SaveEvent<Email>;
934
- /** fires when email delete */
935
- handleRemoveEmail: RemoveEvent<Email>;
936
-
937
- /** read autosaves handler */
938
- handleReadEmailRevisions: AppEvent<ReadEmailAutosavesHandler>;
939
- /** fires when email autosave */
940
- handleEmailAutosave: CreateEvent<EmailRevision>;
941
- /** fires when email autosave delete */
942
- handleRemoveEmailAutoSave: RemoveEvent<EmailRevision>;
943
- /** read common blocks handler */
944
- handleReadCommonBlocks: AppEvent<ReadBlocksHandler>;
945
- /** read template blocks handler */
946
- handleReadTemplateBlocks: AppEvent<ReadTemplateBlocksHandler>;
947
- /** read blocks handler */
948
- handleReadBlocks: AppEvent<ReadBlocksHandler>;
949
- /** fires when block save */
950
- handleSaveBlock: SaveEvent<Block>;
951
- /** fires when block delete */
952
- handleRemoveBlock: RemoveEvent<Block>;
953
-
954
- /** read comments handler */
955
- handleReadComments: AppEvent<ReadCommentsHandler>;
956
- /** fires when comment save */
957
- handleSaveComment: SaveEvent<Comment>;
958
- /** fires when comment delete */
959
- handleRemoveComment: RemoveEvent<Comment>;
960
-
961
- /** fires when user clicked on 'save' button */
962
- handleSaveButtonClick: AppEvent<EmailHandler>;
963
- /** fires when user clicked on 'next' button */
964
- handleNextButtonClick: AppEvent<EmailHandler>;
965
- /** fires when user clicked on 'previous' button */
966
- handlePreviousButtonClick: AppEvent<EmailHandler>;
967
- /** fires when email iframe inited */
968
- handleEmailInit: AppEvent<EmailHandler>;
969
- /** fires when email changed */
970
- handleEmailChanged: AppEvent<EmailHandler>;
971
- /** fires when email subject inited */
972
- handleSubjectChanged: (
973
- listener: (subject: string) => MayBePromise<void>,
974
- priority?: number,
975
- thisArg?: any,
976
- ) => () => void;
977
- /** fires when email subject inited */
978
- handlePreheaderChanged: (
979
- listener: (preheader: string) => MayBePromise<void>,
980
- priority?: number,
981
- thisArg?: any,
982
- ) => () => void;
983
- /** fires when email Html changed */
984
- handleHtmlChanged: AppEvent<HtmlHandler>;
985
- /** fires when test email send*/
986
- handleTestEmailSend: AppEvent<TestEmailSendHandler>;
987
- /** fires when open test email modal */
988
- handleTestEmailModal: AppEvent<TestEmailModalSendHandler>;
989
- /** fires when email clone */
990
- handleCloneEmail: AppEvent<EmailHandler>;
991
- /** fires when email share */
992
- handleShareEmail: AppEvent<ShareHandler>;
993
- /** fires when open live preview */
994
- handleLivePreviewEmail: AppEvent<LivePreviewHandler>;
995
- /** fires when open preview */
996
- handlePreviewEmail: AppEvent<PreviewHandler>;
997
- /** fires when email validate */
998
- handleValidate: AppEvent<ValidateEvent>;
999
- }
1000
-
1001
- type Listeners = { [K in keyof Events]?: Events[K] extends AppEvent<infer Listener> ? Listener : never };
1002
- interface Options extends Listeners {
1003
- /** entity content */
1004
- content: Content;
1005
- }
1006
-
1007
- interface Instance extends Events {
1008
- /**
1009
- * show block or email
1010
- * @param content entity content
1011
- */
1012
- show(content: Content): Promise<void>;
1013
- /** save current email */
1014
- save(): Promise<Email>;
1015
- /**
1016
- * get email from inner storage
1017
- */
1018
- getEmail(): Promise<CompiledEmail>;
1019
- /**
1020
- * get compiled email
1021
- */
1022
- compileEmail(email?: Email, all?: boolean | { text?: boolean; amp?: boolean }): Promise<CompiledEmail>;
1023
- /**
1024
- * get blocks from inner storage
1025
- */
1026
- getBlocks(): Promise<Block[]>;
1027
- /**
1028
- * get email satosaves
1029
- * @param emailId email identifier
1030
- */
1031
- getEmailRevisions(): Promise<EmailRevision[]>;
1032
- /**
1033
- * get email comments
1034
- */
1035
- getComments(): Promise<Comment[]>;
1036
- /**
1037
- * get current code errors
1038
- */
1039
- getCodeErrors(): CodeError[] | undefined;
1040
- }
1041
- }
1042
- interface Options extends DataMixin.Options {
1043
- standaloneKey?: string;
1044
- }
1045
-
1046
- interface Instance extends DataMixin.Instance {}
1047
- }
1048
- declare namespace ExportedApi {
1049
- namespace DestroyableMixin {
1050
- type DestroyListener = AppListener<ExportedApi.Instance>;
1051
- interface Options {
1052
- handleDestroy?: DestroyListener;
1053
- }
1054
-
1055
- interface Instance {
1056
- /** fires when app destroyed */
1057
- handleDestroy: AppEvent<DestroyListener>;
1058
- destroy(): void;
1059
- }
1060
- }
1061
- interface Options extends DestroyableMixin.Options {}
1062
-
1063
- interface Instance extends DestroyableMixin.Instance {}
1064
- }
1065
- declare namespace ExportedApi {
1066
- namespace SpinMixin {
1067
- interface Options {
1068
- element?: string | Element | DocumentFragment;
1069
- initialSpinner?: false;
1070
- }
1071
-
1072
- interface Instance {}
1073
- }
1074
- interface Options extends SpinMixin.Options {}
1075
-
1076
- interface Instance extends SpinMixin.Instance {}
1077
- }
1078
- declare namespace ExportedApi {
1079
- namespace ImageHandlerMixin {
1080
- type LoadEventPayload = { file: File; project: string };
1081
- type FileProxyEventPayload = { url: string; project: string };
1082
- type LoadImageListener = AppListener<LoadEventPayload, string | void>;
1083
- type FileProxyListener = AppListener<FileProxyEventPayload, Blob | void>;
1084
- interface Options {
1085
- handleLoadImage?: LoadImageListener;
1086
- handleFileProxy?: FileProxyListener;
1087
- }
1088
-
1089
- interface Instance {
1090
- /** fires when image loading */
1091
- handleLoadImage: AppEvent<LoadImageListener>;
1092
- handleFileProxy: AppEvent<FileProxyListener>;
1093
- }
1094
- }
1095
- interface Options extends ImageHandlerMixin.Options {}
1096
-
1097
- interface Instance extends ImageHandlerMixin.Instance {}
1098
- }
1099
- declare namespace ExportedApi {
1100
- namespace LoadHandlerMixin {
1101
- type LoadListener = AppListener<ExportedApi.Instance>;
1102
- interface Options {
1103
- handleLoad?: LoadListener;
1104
- }
1105
-
1106
- interface Instance {
1107
- /** fires when app loaded */
1108
- handleLoad: AppEvent<LoadListener>;
1109
- reset(options: ExportedApi.Options): Promise<ExportedApi.Instance>;
1110
- }
1111
- }
1112
- interface Options extends LoadHandlerMixin.Options {}
1113
-
1114
- interface Instance extends LoadHandlerMixin.Instance {}
1115
- }
1116
- declare namespace ExportedApi {
1117
- type ConfigNotify = Notify & Partial<NotifyEvent> & { message: string | HTMLElement };
1118
- namespace NotificationMixin {
1119
- type NotifyListener = AppListener<NotifyEvent, ConfigNotify | string | false | void>;
1120
- type ErrorListener = AppListener<Notify.ErrorEvent, ConfigNotify | string | false | void>;
1121
- type SuccessListener = AppListener<Notify.SuccessEvent, ConfigNotify | string | false | void>;
1122
- interface Options {
1123
- handleNotify?: NotifyListener;
1124
- handleError?: ErrorListener;
1125
- handleSuccess?: SuccessListener;
1126
- }
1127
-
1128
- interface Instance {
1129
- handleNotify: AppEvent<NotifyListener>;
1130
- handleError: AppEvent<ErrorListener>;
1131
- handleSuccess: AppEvent<SuccessListener>;
1132
- notify(config: ConfigNotify | string): void;
1133
- }
1134
- }
1135
- interface Options extends NotificationMixin.Options {}
1136
-
1137
- interface Instance extends NotificationMixin.Instance {}
1138
- }
1139
-
1140
- interface EditStackData {
1141
- serialize(): ArrayBuffer;
1142
- }
1143
-
1144
- interface EditStackSnapshot {
1145
- resource: string;
1146
- elements: unknown[];
1147
- }
1148
-
1149
- interface IUndoRedoService {
1150
- /**
1151
- * Undoes the last performed action, reverting the state to the previous step in history.
1152
- * If the history is empty, this method does nothing.
1153
- */
1154
- undo: () => void;
1155
-
1156
- /**
1157
- * Redoes an undone action, moving the state forward in history.
1158
- * If there are no undone actions, this method does nothing.
1159
- */
1160
- redo: () => void;
1161
-
1162
- /**
1163
- * Clears the entire history of changes, including both undone and redone operations.
1164
- * After calling this method, both the `undo` and `redo` histories will be empty.
1165
- */
1166
- clear: () => void;
1167
-
1168
- /**
1169
- * Returns an array of all previously performed changes that can be undone.
1170
- * This represents the stack of actions available for `undo()`.
1171
- * @returns An array of `EditStackData` objects representing past changes.
1172
- */
1173
- getPast: () => EditStackData[];
1174
-
1175
- /**
1176
- * Returns an array of changes that have been undone and can be redone.
1177
- * This represents the stack of actions available for `redo()`.
1178
- * @returns An array of `EditStackData` objects representing future changes.
1179
- */
1180
- getFuture: () => EditStackData[];
1181
-
1182
- /**
1183
- * Checks whether there is at least one action in history that can be undone.
1184
- * @returns `true` if `undo()` can be performed, otherwise `false`.
1185
- */
1186
- canUndo: () => boolean;
1187
-
1188
- /**
1189
- * Checks whether there is at least one undone action that can be redone.
1190
- * @returns `true` if `redo()` can be performed, otherwise `false`.
1191
- */
1192
- canRedo: () => boolean;
1193
-
1194
- /**
1195
- * Creates a snapshot of the current state, which can be saved and restored later.
1196
- * Useful for serializing the change history.
1197
- * @returns An `EditStackSnapshot` object containing the state of the change history.
1198
- */
1199
- createSnapshot: () => EditStackSnapshot;
1200
-
1201
- /**
1202
- * Restores the change history state from the provided snapshot.
1203
- * Allows loading a previously saved history.
1204
- * @param snapshot An `EditStackSnapshot` object containing the saved history state.
1205
- */
1206
- restoreSnapshot: (snapshot: EditStackSnapshot) => void;
1207
- }
1208
-
1209
- /**
1210
- * Represents the result of a single operation within a batch request.
1211
- *
1212
- * @template T - The type of data returned by successful operations. Use `void` for operations
1213
- * that don't return data (e.g., delete operations).
1214
- *
1215
- * @example
1216
- * // For a successful file copy operation
1217
- * const result: OperationResult<FileInfo> = {
1218
- * id: 'file123',
1219
- * success: true,
1220
- * data: { id: 'file123-copy', name: 'file.txt', ... }
1221
- * };
1222
- *
1223
- * @example
1224
- * // For a failed operation
1225
- * const result: OperationResult<void> = {
1226
- * id: 'file456',
1227
- * success: false,
1228
- * error: 'Permission denied'
1229
- * };
1230
- */
1231
- export interface OperationResult<T = void> {
1232
- /**
1233
- * Unique identifier of the item that was processed.
1234
- * This should match the ID of the original item from the request.
1235
- */
1236
- id?: string;
1237
-
1238
- /**
1239
- * Indicates whether the operation completed successfully.
1240
- */
1241
- success?: boolean;
1242
-
1243
- /**
1244
- * The result data returned by successful operations.
1245
- * Present only when `success` is `true` and the operation returns data.
1246
- */
1247
- data?: T;
1248
-
1249
- /**
1250
- * Error message describing why the operation failed.
1251
- * Present only when `success` is `false`.
1252
- */
1253
- error?: string;
1254
- }
1255
-
1256
- export type BatchResult<T> = { success: boolean; error?: string; detailed?: OperationResult<T>[] };
1257
-
1258
- /**
1259
- * File information.
1260
- */
1261
- export interface FileSystemItem {
1262
- /** Unique file identifier */
1263
- id: string;
1264
- /** File name */
1265
- name: string;
1266
- /** Identifier of the folder the file belongs to */
1267
- folderId: string;
1268
- /** Item type - file or folder */
1269
- isFolder?: boolean;
1270
- /** File size */
1271
- size?: number;
1272
- /** File creation or upload date */
1273
- date?: string;
1274
- /** File MIME type */
1275
- type?: string;
1276
- /** File download URL (used if `getFile` method is not implemented) */
1277
- url?: string;
1278
- /** File thumbnail */
1279
- thumbnail?: string;
1280
- /** Alternative thumbnail URL */
1281
- thumbnailUrl?: string;
1282
- /** Image dimensions (width x height) */
1283
- dimensions?: string;
1284
- /** Aspect ratio */
1285
- aspectRatio?: string;
1286
- /** File extension */
1287
- extension?: string;
1288
- /** Whether the file is selected in the UI */
1289
- selected?: boolean;
1290
- /** Date when the file was last edited */
1291
- lastEdited?: string;
1292
- /** Number of children items (for folders) */
1293
- childrenCount?: number;
1294
- }
1295
-
1296
- /**
1297
- * Represents partial updates to a file system item after an operation.
1298
- * Contains only the fields that were changed during the operation.
1299
- */
1300
- export type FileSystemItemUpdate = Partial<FileSystemItem> & { id: string };
1301
-
1302
- /**
1303
- * API response with pagination details.
1304
- */
1305
- export interface ApiPaginationResponse {
1306
- /** Current page number */
1307
- page: number;
1308
- /** Number of items per page */
1309
- limit: number;
1310
- /** Total number of items */
1311
- total: number;
1312
- /** Total number of pages */
1313
- totalPages: number;
1314
- /** Whether there is a next page */
1315
- hasNext: boolean;
1316
- /** Whether there is a previous page */
1317
- hasPrev: boolean;
1318
- }
1319
-
1320
- /**
1321
- * Sorting state.
1322
- */
1323
- export interface SortState {
1324
- /** Field to sort by */
1325
- sortBy: 'name' | 'size' | 'date' | 'type';
1326
- /** Sort order */
1327
- sortOrder: 'asc' | 'desc';
1328
- }
1329
-
1330
- export interface StorageProviderController {
1331
- /**
1332
- * Invalidates the cache for a specific file system item.
1333
- *
1334
- * This method should be called when an item's data has changed externally
1335
- * and the cached version is no longer valid. After invalidation, the next
1336
- * access to this item will trigger a fresh fetch from the storage backend.
1337
- *
1338
- * @param itemId - The unique identifier of the file or folder to invalidate
1339
- * @example
1340
- * // After renaming a file, invalidate its cache
1341
- * controller.invalidateItemCache(fileId);
1342
- */
1343
- invalidateItemCache(itemId: string): void;
1344
-
1345
- /**
1346
- * Retrieves a cached file system item.
1347
- *
1348
- * @param itemId - The unique identifier of the file or folder
1349
- * @returns The cached item or undefined if not found in cache
1350
- */
1351
- getCachedItem(itemId: string): FileSystemItem | undefined;
1352
- }
1353
-
1354
- /**
1355
- * Interface for storage providers.
1356
- * Defines the contract for different storage backends (e.g., cloud APIs).
1357
- */
1358
- export interface StorageProvider {
1359
- /**
1360
- * Use the path as an identifier for folders
1361
- */
1362
- pathMode?: boolean;
1363
-
1364
- /**
1365
- * Custom identifier for the root folder.
1366
- * - This ID will be used internally for the root of the file tree.
1367
- * - Defaults to an empty string `''` if not provided.
1368
- */
1369
- rootId?: string;
1370
-
1371
- /**
1372
- * Path to the trash/recycle bin folder.
1373
- * - Used when `useSoftDelete` is enabled or for trash operations.
1374
- * - The provider will resolve this path to an actual folder ID.
1375
- */
1376
- trashPath?: string;
1377
-
1378
- /**
1379
- * Path to the temporary folder for uploads and transient files.
1380
- * - Used for operations where temporary storage is needed.
1381
- * - The provider will resolve this path to an actual folder ID.
1382
- */
1383
- tempPath?: string;
1384
- /**
1385
- * @default true
1386
- */
1387
- ensureFolderTrailingSlash?: boolean;
1388
-
1389
- /**
1390
- * Utility method for finding system files/folders by path.
1391
- * By default, searches for folders through getFiles method.
1392
- *
1393
- * @param path - Path to the file or folder
1394
- * @returns The found item or undefined if not found
1395
- */
1396
- findItemByPath?(path: string): MayBePromise<FileSystemItem | undefined>;
1397
-
1398
- /**
1399
- * Sets the controller for cache management.
1400
- *
1401
- * This method provides the storage provider with a controller interface
1402
- * that allows it to communicate cache invalidation requests back to the file manager.
1403
- *
1404
- * @param controller - The controller instance for cache management
1405
- * @example
1406
- * // Store the controller for later use
1407
- * setController(controller) {
1408
- * this.controller = controller;
1409
- * }
1410
- */
1411
- setController?(controller: StorageProviderController): MayBePromise<void>;
1412
-
1413
- /**
1414
- * Enables client-side soft delete implementation.
1415
- * When enabled, delete operations will move items to trashPath instead of permanent deletion.
1416
- *
1417
- * @note If your backend already implements soft delete, keep this disabled
1418
- * to avoid double soft-delete logic.
1419
- *
1420
- * @default false
1421
- */
1422
- useSoftDelete?: boolean;
1423
- /**
1424
- * Retrieve the file content as a binary blob.
1425
- *
1426
- * ⚠️ If this method is not implemented, the file will be downloaded
1427
- * using the `url` property from the `FileInfo` object.
1428
- *
1429
- * @param file - File object
1430
- * @returns File contents as a Blob
1431
- */
1432
- getFileData?: (file: FileSystemItem) => MayBePromise<Blob>;
1433
-
1434
- /**
1435
- * Get URL for file access
1436
- * @param file - File object
1437
- * @returns File URL
1438
- */
1439
- getUrl?: (file: FileSystemItem) => MayBePromise<string>;
1440
-
1441
- /**
1442
- * Get thumbnail URL for file
1443
- * @param file - File object
1444
- * @returns Thumbnail URL
1445
- */
1446
- getThumbnailUrl?: (file: FileSystemItem) => MayBePromise<string>;
1447
-
1448
- /**
1449
- * Retrieve a list of files and folders.
1450
- * Supports filtering, sorting, and pagination.
1451
- *
1452
- * @param options.folderId - Parent folder (or undefined for root)
1453
- * @param options.search - Search query
1454
- * @param options.sortBy - Field to sort by
1455
- * @param options.sortOrder - Sort direction
1456
- * @param options.page - Page number
1457
- * @param options.limit - Number of items per page
1458
- * @param options.itemType - Filter by item type
1459
- * @returns List of files/folders and optional pagination details
1460
- */
1461
- getItems: (options: {
1462
- folderId?: string;
1463
- search?: string;
1464
- sortBy?: SortState['sortBy'];
1465
- sortOrder?: SortState['sortOrder'];
1466
- page?: number;
1467
- limit?: number;
1468
- itemType: 'all' | 'file' | 'folder';
1469
- }) => MayBePromise<{ items: FileSystemItem[]; pagination?: Partial<ApiPaginationResponse> }>;
1470
-
1471
- /**
1472
- * Create a new folder.
1473
- *
1474
- * @param name - Folder name
1475
- * @param parent - Parent folder (or undefined for root)
1476
- * @returns The created folder object
1477
- */
1478
- createFolder: (name: string, parentid?: string) => MayBePromise<FileSystemItem>;
1479
-
1480
- /**
1481
- * Rename an item (file or folder).
1482
- *
1483
- * @param options.item - Item to rename (file or folder)
1484
- * @param options.newName - New item name
1485
- * @returns Updated item with changed fields
1486
- */
1487
- renameItem?: (item: FileSystemItem, newName: string) => MayBePromise<FileSystemItemUpdate>;
1488
-
1489
- /**
1490
- * Delete an item (file or folder).
1491
- * When useSoftDelete is enabled, moves item to trashPath instead of permanent deletion.
1492
- *
1493
- * @param item - Item to delete (file or folder)
1494
- * @throws {Error} If deletion fails
1495
- */
1496
- deleteItem?: (item: FileSystemItem, options: { permanent: boolean }) => MayBePromise<void>;
1497
-
1498
- /**
1499
- * Upload a file.
1500
- *
1501
- * @param file.name - File name
1502
- * @param file.size - File size
1503
- * @param file.type - MIME type
1504
- * @param file.folderId - Target folder (or undefined for root)
1505
- * @param file.data - File data (Blob or base64 string)
1506
- * @param file.thumbnail - Thumbnail image
1507
- * @param file.dimensions - Image dimensions
1508
- * @param file.aspectRatio - Aspect ratio
1509
- * @param file.extension - File extension
1510
- * @returns The uploaded file with changed fields
1511
- */
1512
- uploadFile: (file: {
1513
- name: string;
1514
- size: number;
1515
- type: string;
1516
- folderId?: string;
1517
- data: Blob | string;
1518
- thumbnail?: string;
1519
- dimensions?: string;
1520
- aspectRatio?: string;
1521
- extension?: string;
1522
- }) => MayBePromise<FileSystemItemUpdate>;
1523
-
1524
- /**
1525
- * Upload a file by URL.
1526
- *
1527
- * ⚠️ Implementation should check if the file already belongs
1528
- * to the current server. If it does, return the existing file object
1529
- * instead of uploading it again.
1530
- *
1531
- * @param url - File URL
1532
- * @param folderId - Target folder (or undefined for root). If not specified,
1533
- * uses the root folder.
1534
- * @returns The uploaded or existing complete file object
1535
- */
1536
- uploadFileByUrl: (url: string, folderId?: string) => MayBePromise<FileSystemItem>;
1537
-
1538
- /**
1539
- * Delete multiple items (files or folders).
1540
- *
1541
- * @param items - Array of items to delete (files or folders)
1542
- * @param options - Delete options
1543
- * @returns Batch operation result with success/failure details
1544
- */
1545
- deleteItems?: (items: FileSystemItem[], options: { permanent: boolean }) => MayBePromise<BatchResult<never>>;
1546
-
1547
- /**
1548
- * Move a single item to the target folder
1549
- * @param item - Item to move (file or folder)
1550
- * @param targetFolderId - Destination folder. If undefined, uses root folder
1551
- * @returns The moved item with changed fields
1552
- */
1553
- moveItem?: (item: FileSystemItem, targetFolderId?: string) => MayBePromise<FileSystemItemUpdate>;
1554
-
1555
- /**
1556
- * Move multiple items to the target folder
1557
- * @param items - Array of items to move (files or folders)
1558
- * @param targetFolderId - Destination folder. If undefined, uses root folder
1559
- * @returns Batch operation result with success/failure details
1560
- */
1561
- moveItems?: (
1562
- items: FileSystemItem[],
1563
- targetFolderId?: string
1564
- ) => MayBePromise<BatchResult<FileSystemItemUpdate>>;
1565
-
1566
- /**
1567
- * Copy a single item to the target folder
1568
- * @param item - Item to copy (file or folder)
1569
- * @param targetFolderId - Destination folder. If undefined, uses root folder
1570
- * @returns The copied item with changed fields
1571
- */
1572
- copyItem?: (item: FileSystemItem, targetFolderId?: string) => MayBePromise<FileSystemItemUpdate>;
1573
-
1574
- /**
1575
- * Copy multiple items to the target folder
1576
- * @param items - Array of items to copy (files or folders)
1577
- * @param targetFolderId - Destination folder. If undefined, uses root folder
1578
- * @returns Batch operation result with success/failure details
1579
- */
1580
- copyItems?: (
1581
- items: FileSystemItem[],
1582
- targetFolderId?: string
1583
- ) => MayBePromise<BatchResult<FileSystemItemUpdate>>;
1584
-
1585
- /**
1586
- * Update file metadata or content.
1587
- *
1588
- * @param file - File to update
1589
- * @param updates - Object with fields to update (name, type, data, thumbnail, etc.)
1590
- * @returns Updated file with changed fields
1591
- */
1592
- updateFile?: (
1593
- file: FileSystemItem,
1594
- updates: {
1595
- name?: string;
1596
- type?: string;
1597
- data?: Blob | string;
1598
- thumbnail?: string;
1599
- dimensions?: string;
1600
- aspectRatio?: string;
1601
- extension?: string;
1602
- },
1603
- ) => MayBePromise<FileSystemItemUpdate>;
1604
- }
1605
-
1606
- declare namespace ExportedApi {
1607
- export interface Options {
1608
- storageProvider?: StorageProvider;
1609
- }
1610
-
1611
- export interface FileManagerOptions {
1612
- /**
1613
- * Enables trash functionality for deleted files.
1614
- * When enabled, deleted files are moved to trash instead of permanent deletion.
1615
- * @default true
1616
- */
1617
- enableTrash?: boolean;
1618
-
1619
- /**
1620
- * Enables paging in the file manager view.
1621
- * If false or undefined, paging is disabled and all items are loaded at once.
1622
- * @default true
1623
- */
1624
- enablePagination?: boolean;
1625
-
1626
- /**
1627
- * Enables the ability to rename folders within the file manager.
1628
- * If false or undefined, renaming folders is disabled.
1629
- * @default true
1630
- */
1631
- enableRenameFolder?: boolean;
1632
-
1633
- /**
1634
- * Enables the ability to rename files within the file manager.
1635
- * If false or undefined, renaming files is disabled.
1636
- * @default true
1637
- */
1638
- enableRenameFile?: boolean;
1639
-
1640
- /**
1641
- * Enables the ability to update file metadata or content.
1642
- * If false or undefined, updating files is disabled.
1643
- * @default true
1644
- */
1645
- enableUpdateFile?: boolean;
1646
-
1647
- /**
1648
- * Enables file editing capabilities.
1649
- * Includes functions for modifying file content or properties.
1650
- * @default true
1651
- */
1652
- enableEdit?: boolean;
1653
- /**
1654
- * Enables copying files.
1655
- * Allows creating copies of files.
1656
- * @default true
1657
- */
1658
- enableMoveFile?: boolean;
1659
- /**
1660
- * Enables copying folders.
1661
- * Allows creating copies of folders.
1662
- * @default true
1663
- */
1664
- enableMoveFolder?: boolean;
1665
- /**
1666
- * Enables copying files.
1667
- * Allows creating copies of files.
1668
- * @default true
1669
- */
1670
- enableCopyFile?: boolean;
1671
- /**
1672
- * Enables copying folders.
1673
- * Allows creating copies of folders.
1674
- * @default true
1675
- */
1676
- enableCopyFolder?: boolean;
1677
- /**
1678
- * Enables deleting files and folders.
1679
- * When trash is enabled, files are moved to trash, otherwise permanently deleted.
1680
- * @default true
1681
- */
1682
- enableDelete?: boolean;
1683
- /**
1684
- * Default folder name
1685
- */
1686
- defaultFolderName?: string;
1687
-
1688
- /**
1689
- * Enables multiple selection of files and folders.
1690
- * Allows selecting multiple items for batch operations.
1691
- * @default true
1692
- */
1693
- multiSelect?: boolean;
1694
-
1695
- /**
1696
- * Enables client-side sorting of files.
1697
- * - If `true`, default sorting is applied (by name ascending).
1698
- * - If a function is provided, it receives the current items, optional `sortBy` field,
1699
- * and optional `sortOrder`, and should return a new sorted array of files.
1700
- * @default false
1701
- */
1702
- clientSideSorting?:
1703
- | boolean
1704
- | ((
1705
- items: FileSystemItem[],
1706
- sortBy?: SortState['sortBy'],
1707
- sortOrder?: SortState['sortOrder'],
1708
- ) => FileSystemItem[]);
1709
-
1710
- /**
1711
- * Enables client-side pagination of files.
1712
- * - If `true`, default slicing based on `page` and `limit` is applied.
1713
- * - If a function is provided, it receives the current items, `page`, and `limit`,
1714
- * and should return a paginated array of files.
1715
- * @default false
1716
- */
1717
- clientSidePaging?: boolean | ((items: FileSystemItem[], page?: number, limit?: number) => FileSystemItem[]);
1718
-
1719
- /**
1720
- * Enables client-side filtering of files.
1721
- * - If `true`, default filtering by `search` text is applied.
1722
- * - If a function is provided, it receives the current items and optional `search` string,
1723
- * and should return a filtered array of files.
1724
- * @default false
1725
- */
1726
- clientSideFilter?: boolean | ((items: FileSystemItem[], search?: string) => FileSystemItem[]);
1727
-
1728
- /**
1729
- * Configuration for cache behavior in the file manager.
1730
- * Defines caching strategy for performance optimization.
1731
- */
1732
- cacheStrategy?: {
1733
- /**
1734
- * Time-to-live (TTL) in milliseconds for cached items.
1735
- * After this period, cached items will be considered stale.
1736
- * @default 300000 (5 minutes)
1737
- */
1738
- ttl?: number;
1739
-
1740
- /**
1741
- * TTL in milliseconds for cached items when an error occurs during loading.
1742
- * Determines how long to keep cache on network or server errors.
1743
- * @default 60000 (1 minute)
1744
- */
1745
- errorTtl?: number;
1746
-
1747
- /**
1748
- * Allows inserting new items into sorted lists without marking the view as stale.
1749
- * Useful for dynamically adding items without full cache refresh.
1750
- * @default false
1751
- */
1752
- allowSortedInsert?: boolean;
1753
-
1754
- /**
1755
- * Allows inserting new items that may not match current filters without marking the view as stale.
1756
- * @default false
1757
- */
1758
- allowSearchInsert?: boolean;
1759
-
1760
- /**
1761
- * Marks the view as stale when a paginated page is full and cannot accommodate new items.
1762
- * @default true
1763
- */
1764
- invalidateOnPaginationFull?: boolean;
1765
-
1766
- /**
1767
- * Custom comparator function for sorting entities.
1768
- * Receives two entities and optional query parameters, should return -1, 0, or 1.
1769
- * @default File/folder name comparison
1770
- */
1771
- comparator?: (a: FileSystemItem, b: FileSystemItem, params?: any) => number;
1772
-
1773
- /**
1774
- * Function to determine if a given entity matches the current filters.
1775
- * Returns `true` if the entity should be included.
1776
- * @default File/folder name search
1777
- */
1778
- filterMatch?: (entity: FileSystemItem, params?: any) => boolean;
1779
- };
1780
- }
1781
-
1782
- export interface Config {
1783
- fileManager?: FileManagerOptions;
1784
- }
1785
- }
1786
-
1787
- declare namespace ExportedApi {
1788
- namespace UndoRedoMixin {
1789
- interface Instance {
1790
- /**
1791
- * An instance of `IUndoRedoService` that manages undo and redo operations.
1792
- */
1793
- undoRedoService: IUndoRedoService;
1794
- }
1795
- }
1796
-
1797
- interface Instance extends UndoRedoMixin.Instance {}
1798
- }
1799
-
1800
- declare namespace ExportedApi {
1801
- interface Instance {
1802
- /** reset app config */
1803
- reset(options: Options): Promise<Instance>;
1804
- }
1805
- }
1806
-
1807
- export type Instance = ExportedApi.Instance;
1808
-
1809
- export type Options = ExportedApi.Options;
1810
-
1811
- /**
1812
- * initialize app instance
1813
- * @param {options} app options
1814
- * @returns app instance
1815
- */
1816
- export function init(options: Options): Promise<Instance>;
1817
- /**
1818
- * parse AMP email
1819
- * @param {code} email or code
1820
- * @returns object, contains pure html and AMP code
1821
- */
1822
- export function parseAMP(code: string | { code: string }): Promise<ParsedAMP>;
1823
- /**
1824
- * app version
1825
- */
1826
- export const version: string;