@antelopejs/dms-mailing 0.8.0 → 0.9.1

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 (205) hide show
  1. package/README.md +41 -43
  2. package/dist/automation/email-event-trigger.d.ts +2 -2
  3. package/dist/automation/send-template-action.d.ts +11 -3
  4. package/dist/automation/send-template-action.js +1 -1
  5. package/dist/automation/send-template-action.js.map +1 -1
  6. package/dist/data/body.d.ts +2 -1
  7. package/dist/data/body.js +2 -1
  8. package/dist/data/body.js.map +1 -1
  9. package/dist/data/read-only-routes.d.ts +4 -4
  10. package/dist/data/sends-table.d.ts +4 -4
  11. package/dist/data/suppressions-table.d.ts +4 -4
  12. package/dist/data/templates-table.d.ts +35 -12
  13. package/dist/data/templates-table.js +29 -24
  14. package/dist/data/templates-table.js.map +1 -1
  15. package/dist/data-types/categories-type.d.ts +1 -2
  16. package/dist/data-types/categories-type.js +3 -5
  17. package/dist/data-types/categories-type.js.map +1 -1
  18. package/dist/data-types/category-type.d.ts +1 -2
  19. package/dist/data-types/category-type.js +3 -5
  20. package/dist/data-types/category-type.js.map +1 -1
  21. package/dist/db/models/send-events.model.d.ts +7 -5
  22. package/dist/db/models/sends.model.d.ts +7 -5
  23. package/dist/db/models/sends.model.js.map +1 -1
  24. package/dist/db/models/settings.model.d.ts +7 -5
  25. package/dist/db/models/suppressions.model.d.ts +7 -5
  26. package/dist/db/models/template-versions.model.d.ts +7 -5
  27. package/dist/db/models/template-versions.model.js +4 -3
  28. package/dist/db/models/template-versions.model.js.map +1 -1
  29. package/dist/db/models/templates.model.d.ts +7 -5
  30. package/dist/db/models/webhook-status.model.d.ts +7 -5
  31. package/dist/db/tables/settings.table.d.ts +1 -0
  32. package/dist/db/tables/settings.table.js +4 -0
  33. package/dist/db/tables/settings.table.js.map +1 -1
  34. package/dist/db/tables/templates.table.js.map +1 -1
  35. package/dist/engine/changes.js +8 -19
  36. package/dist/engine/changes.js.map +1 -1
  37. package/dist/engine/conditions.d.ts +2 -1
  38. package/dist/engine/conditions.js +3 -2
  39. package/dist/engine/conditions.js.map +1 -1
  40. package/dist/engine/coverage.d.ts +2 -1
  41. package/dist/engine/coverage.js.map +1 -1
  42. package/dist/engine/formats.d.ts +4 -6
  43. package/dist/engine/formats.js +17 -3
  44. package/dist/engine/formats.js.map +1 -1
  45. package/dist/engine/paths.d.ts +4 -2
  46. package/dist/engine/paths.js +15 -3
  47. package/dist/engine/paths.js.map +1 -1
  48. package/dist/engine/plain-text.js +2 -4
  49. package/dist/engine/plain-text.js.map +1 -1
  50. package/dist/engine/resolve.d.ts +2 -1
  51. package/dist/engine/resolve.js +1 -1
  52. package/dist/engine/resolve.js.map +1 -1
  53. package/dist/engine/system-variables.d.ts +2 -1
  54. package/dist/engine/system-variables.js.map +1 -1
  55. package/dist/engine/tokens.d.ts +2 -1
  56. package/dist/engine/tokens.js.map +1 -1
  57. package/dist/hooks/tenant-export.d.ts +1 -1
  58. package/dist/hooks/tenant-export.js +10 -9
  59. package/dist/hooks/tenant-export.js.map +1 -1
  60. package/dist/implementations/dms-mailing/index.d.ts +1 -0
  61. package/dist/implementations/dms-mailing/index.js +3 -1
  62. package/dist/implementations/dms-mailing/index.js.map +1 -1
  63. package/dist/pages/sends.js.map +1 -1
  64. package/dist/pages/templates.js +3 -1
  65. package/dist/pages/templates.js.map +1 -1
  66. package/dist/routes/events.js +4 -2
  67. package/dist/routes/events.js.map +1 -1
  68. package/dist/routes/index.d.ts +1 -0
  69. package/dist/routes/index.js +1 -0
  70. package/dist/routes/index.js.map +1 -1
  71. package/dist/routes/metrics.js +27 -28
  72. package/dist/routes/metrics.js.map +1 -1
  73. package/dist/routes/period.js +5 -5
  74. package/dist/routes/period.js.map +1 -1
  75. package/dist/routes/sends.js +3 -4
  76. package/dist/routes/sends.js.map +1 -1
  77. package/dist/routes/settings.d.ts +4 -3
  78. package/dist/routes/settings.js +20 -14
  79. package/dist/routes/settings.js.map +1 -1
  80. package/dist/routes/suppressions.js +9 -6
  81. package/dist/routes/suppressions.js.map +1 -1
  82. package/dist/routes/template-content.d.ts +27 -0
  83. package/dist/routes/template-content.js +3 -0
  84. package/dist/routes/template-content.js.map +1 -0
  85. package/dist/routes/templates.d.ts +7 -30
  86. package/dist/routes/templates.js +3 -2
  87. package/dist/routes/templates.js.map +1 -1
  88. package/dist/routes/zod-json.d.ts +3 -0
  89. package/dist/routes/zod-json.js +21 -0
  90. package/dist/routes/zod-json.js.map +1 -0
  91. package/dist/services/attention.js +14 -7
  92. package/dist/services/attention.js.map +1 -1
  93. package/dist/services/catalog.js +4 -2
  94. package/dist/services/catalog.js.map +1 -1
  95. package/dist/services/declaration-error.d.ts +1 -1
  96. package/dist/services/declaration-error.js.map +1 -1
  97. package/dist/services/declarations.js +4 -1
  98. package/dist/services/declarations.js.map +1 -1
  99. package/dist/services/events.js +3 -1
  100. package/dist/services/events.js.map +1 -1
  101. package/dist/services/metrics.js +2 -5
  102. package/dist/services/metrics.js.map +1 -1
  103. package/dist/services/send-import.js +4 -4
  104. package/dist/services/send-import.js.map +1 -1
  105. package/dist/services/send.js +3 -4
  106. package/dist/services/send.js.map +1 -1
  107. package/dist/services/settings.d.ts +6 -3
  108. package/dist/services/settings.js +24 -5
  109. package/dist/services/settings.js.map +1 -1
  110. package/dist/services/starters.d.ts +3 -2
  111. package/dist/services/starters.js +1 -1
  112. package/dist/services/starters.js.map +1 -1
  113. package/dist/services/templates.d.ts +2 -1
  114. package/dist/services/templates.js +5 -5
  115. package/dist/services/templates.js.map +1 -1
  116. package/dist/services/webhook-secret-declaration.d.ts +4 -0
  117. package/dist/services/webhook-secret-declaration.js +25 -0
  118. package/dist/services/webhook-secret-declaration.js.map +1 -0
  119. package/dist/services/webhook-status.d.ts +2 -2
  120. package/dist/services/webhook-status.js +13 -6
  121. package/dist/services/webhook-status.js.map +1 -1
  122. package/dist/types/json.d.ts +1 -0
  123. package/dist/types/json.js +3 -0
  124. package/dist/types/json.js.map +1 -0
  125. package/dist/types/settings.d.ts +5 -2
  126. package/dist/types/settings.js +6 -1
  127. package/dist/types/settings.js.map +1 -1
  128. package/dist/validation/declarations.schema.d.ts +41 -28
  129. package/dist/validation/declarations.schema.js +10 -4
  130. package/dist/validation/declarations.schema.js.map +1 -1
  131. package/dist/validation/guards.d.ts +0 -1
  132. package/dist/validation/guards.js +0 -4
  133. package/dist/validation/guards.js.map +1 -1
  134. package/dist/validation/json.d.ts +5 -0
  135. package/dist/validation/json.js +54 -0
  136. package/dist/validation/json.js.map +1 -0
  137. package/dist/validation/json.schema.d.ts +2 -0
  138. package/dist/validation/json.schema.js +9 -0
  139. package/dist/validation/json.schema.js.map +1 -0
  140. package/dist/validation/templates.schema.d.ts +25 -24
  141. package/dist/validation/templates.schema.js +4 -3
  142. package/dist/validation/templates.schema.js.map +1 -1
  143. package/frontend-vue/app/components/editor/EditorCanvas.vue +8 -4
  144. package/frontend-vue/app/composables/useSortableList.ts +2 -2
  145. package/frontend-vue/package.json +37 -36
  146. package/frontend-vue/pnpm-lock.yaml +65 -5
  147. package/frontend-vue/tests/editor-canvas.test.ts +142 -0
  148. package/frontend-vue/tests/sortable-list.test-d.ts +19 -0
  149. package/frontend-vue/tsconfig.typecheck.json +12 -0
  150. package/frontend-vue/vitest.config.ts +16 -0
  151. package/package.json +16 -15
  152. package/skills/dms-mailing/SKILL.md +5 -3
  153. package/src/automation/email-event-trigger.ts +2 -2
  154. package/src/automation/send-template-action.ts +33 -14
  155. package/src/data/body.ts +5 -2
  156. package/src/data/templates-table.ts +46 -52
  157. package/src/data-types/categories-type.ts +2 -2
  158. package/src/data-types/category-type.ts +2 -2
  159. package/src/db/models/sends.model.ts +2 -2
  160. package/src/db/models/template-versions.model.ts +5 -3
  161. package/src/db/tables/settings.table.ts +4 -0
  162. package/src/db/tables/templates.table.ts +1 -1
  163. package/src/engine/changes.ts +11 -29
  164. package/src/engine/conditions.ts +12 -4
  165. package/src/engine/coverage.ts +2 -1
  166. package/src/engine/formats.ts +31 -17
  167. package/src/engine/paths.ts +39 -6
  168. package/src/engine/plain-text.ts +2 -4
  169. package/src/engine/resolve.ts +12 -4
  170. package/src/engine/system-variables.ts +2 -1
  171. package/src/engine/tokens.ts +2 -1
  172. package/src/hooks/tenant-export.ts +15 -14
  173. package/src/implementations/dms-mailing/index.ts +1 -0
  174. package/src/pages/sends.ts +3 -2
  175. package/src/pages/templates.ts +3 -1
  176. package/src/routes/events.ts +7 -4
  177. package/src/routes/index.ts +1 -0
  178. package/src/routes/metrics.ts +30 -30
  179. package/src/routes/period.ts +5 -5
  180. package/src/routes/sends.ts +13 -8
  181. package/src/routes/settings.ts +34 -17
  182. package/src/routes/suppressions.ts +12 -8
  183. package/src/routes/template-content.ts +45 -0
  184. package/src/routes/templates.ts +11 -44
  185. package/src/routes/zod-json.ts +28 -0
  186. package/src/services/attention.ts +16 -15
  187. package/src/services/catalog.ts +4 -8
  188. package/src/services/declaration-error.ts +1 -1
  189. package/src/services/declarations.ts +4 -1
  190. package/src/services/events.ts +4 -2
  191. package/src/services/metrics.ts +3 -5
  192. package/src/services/send-import.ts +10 -8
  193. package/src/services/send.ts +3 -6
  194. package/src/services/settings.ts +55 -16
  195. package/src/services/starters.ts +8 -4
  196. package/src/services/templates.ts +16 -9
  197. package/src/services/webhook-secret-declaration.ts +47 -0
  198. package/src/services/webhook-status.ts +18 -9
  199. package/src/types/json.ts +1 -0
  200. package/src/types/settings.ts +16 -2
  201. package/src/validation/declarations.schema.ts +11 -3
  202. package/src/validation/guards.ts +0 -8
  203. package/src/validation/json.schema.ts +7 -0
  204. package/src/validation/json.ts +66 -0
  205. package/src/validation/templates.schema.ts +7 -3
@@ -22,11 +22,14 @@ importers:
22
22
  version: 3.5.42(typescript@5.9.3)
23
23
  devDependencies:
24
24
  '@antelopejs/tooling-configs':
25
- specifier: ^0.2.12
26
- version: 0.2.12
25
+ specifier: ^0.3.3
26
+ version: 0.3.3
27
27
  '@nuxt/ui':
28
28
  specifier: 4.10.0
29
29
  version: 4.10.0(9bdbb06d8a0b4accef61070adc217622)
30
+ '@types/sortablejs':
31
+ specifier: ^1.15.9
32
+ version: 1.15.9
30
33
  '@vitejs/plugin-vue':
31
34
  specifier: ^6.0.0
32
35
  version: 6.0.9(vite@8.2.2(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(yaml@2.9.1))(vue@3.5.42(typescript@5.9.3))
@@ -67,16 +70,20 @@ packages:
67
70
  resolution: {integrity: sha512-U4+70Pc5ZS9osnCBCE5Jha/ciHM+Yp+CNMNC/7HvYbNRk1Ldd+f7qO65W5qfhu/TCv+/ozljlXXe9Nj8419DMA==}
68
71
  engines: {node: '>=10'}
69
72
 
70
- '@antelopejs/tooling-configs@0.2.12':
71
- resolution: {integrity: sha512-giwZ5U5kSd1EsmYio8+X36TcFZ2QhVWGjGddrF+A2zNqsWP9w15vVBaHOkUqkR8oH3An2wm/5hYLLGrLhGB/FQ==}
73
+ '@antelopejs/tooling-configs@0.3.3':
74
+ resolution: {integrity: sha512-jQ09zavCF5MMQtfyd8YOqpoxV6l6bp3m9tA5iN0z0XhQpVHM5VWr53yEuQ6Mc+1tseBW85N94ruP4TEfiGg8iQ==}
72
75
  engines: {node: '>=22.18.0'}
73
76
  hasBin: true
74
77
  peerDependencies:
75
78
  '@nuxt/eslint-config': '>=1.2.0'
76
79
  eslint-plugin-perfectionist: '>=5.0.0'
77
80
  knip: '>=6.0.0'
81
+ mongodb-memory-server: '>=10.0.0'
78
82
  oxfmt: ^0.66.0
79
83
  oxlint: 1.81.0
84
+ pixelmatch: '>=7.0.0'
85
+ playwright-core: '>=1.56.0'
86
+ sharp: '>=0.34.0'
80
87
  peerDependenciesMeta:
81
88
  '@nuxt/eslint-config':
82
89
  optional: true
@@ -84,10 +91,18 @@ packages:
84
91
  optional: true
85
92
  knip:
86
93
  optional: true
94
+ mongodb-memory-server:
95
+ optional: true
87
96
  oxfmt:
88
97
  optional: true
89
98
  oxlint:
90
99
  optional: true
100
+ pixelmatch:
101
+ optional: true
102
+ playwright-core:
103
+ optional: true
104
+ sharp:
105
+ optional: true
91
106
 
92
107
  '@antfu/install-pkg@2.0.1':
93
108
  resolution: {integrity: sha512-iCKVQcIC0e3oDxEfs3SHQGW+ovhBMZmS1TE+bTk50rVyMCBmCfClv7Qi3HQKlumYwvjb/iIMeWCW2i67q6kFfQ==}
@@ -582,6 +597,7 @@ packages:
582
597
  engines: {node: ^22.20 || ^24.12 || >=25}
583
598
  cpu: [x64]
584
599
  os: [linux]
600
+ libc: [glibc]
585
601
 
586
602
  '@napi-rs/wasm-runtime@1.2.3':
587
603
  resolution: {integrity: sha512-UMduMbqO5s5zF2NkNacMT/yK5Y5QiKvWr2+50bzIIxFDwVJ2h49b+oyjaCGPhJxd2/gC2x39EHv/gHVuu36x2Q==}
@@ -718,48 +734,56 @@ packages:
718
734
  engines: {node: ^20.19.0 || >=22.12.0}
719
735
  cpu: [arm64]
720
736
  os: [linux]
737
+ libc: [glibc]
721
738
 
722
739
  '@oxc-parser/binding-linux-arm64-musl@0.141.0':
723
740
  resolution: {integrity: sha512-jMkS/EztNW34HKsXIaT/SoHcmtocq/vWhwFOVduF9kduuuRIVwfwQ6uxzIO+qPKSXdd2TXt54of0BJ2zFMXnmw==}
724
741
  engines: {node: ^20.19.0 || >=22.12.0}
725
742
  cpu: [arm64]
726
743
  os: [linux]
744
+ libc: [musl]
727
745
 
728
746
  '@oxc-parser/binding-linux-ppc64-gnu@0.141.0':
729
747
  resolution: {integrity: sha512-vo+MR+n3zQJ6Mq92hiP084NZcgDv5iJlVR02gMf28neMvVT1tKVm7VeiW/DxhdqOi3QLeaXIk9cUcLL1qrkngw==}
730
748
  engines: {node: ^20.19.0 || >=22.12.0}
731
749
  cpu: [ppc64]
732
750
  os: [linux]
751
+ libc: [glibc]
733
752
 
734
753
  '@oxc-parser/binding-linux-riscv64-gnu@0.141.0':
735
754
  resolution: {integrity: sha512-oh80w+7RuiO5gBp9Jnoa/H8Qlt3JsHL2MkW+0dwEdlDMdslVZX/YsekSK6EeyEenY66/mhCfypsNATQ7Ph3qlQ==}
736
755
  engines: {node: ^20.19.0 || >=22.12.0}
737
756
  cpu: [riscv64]
738
757
  os: [linux]
758
+ libc: [glibc]
739
759
 
740
760
  '@oxc-parser/binding-linux-riscv64-musl@0.141.0':
741
761
  resolution: {integrity: sha512-LOyEmFA8sCnYbEXP1+iQvCC/P1YXHMA/t6x1Ksp0Y9VwhLFsiBJFzV1zIxrOIE2LKaGGhDjQ29xq9cbq6omDXA==}
742
762
  engines: {node: ^20.19.0 || >=22.12.0}
743
763
  cpu: [riscv64]
744
764
  os: [linux]
765
+ libc: [musl]
745
766
 
746
767
  '@oxc-parser/binding-linux-s390x-gnu@0.141.0':
747
768
  resolution: {integrity: sha512-3wnwk/l1CvszVE5TJR1wSl/zSEfydRqrNhn6s7Vr9IzSJpUQIroqVsIoPARHRFA+FQwkxAFDAHDAasa7v8OobQ==}
748
769
  engines: {node: ^20.19.0 || >=22.12.0}
749
770
  cpu: [s390x]
750
771
  os: [linux]
772
+ libc: [glibc]
751
773
 
752
774
  '@oxc-parser/binding-linux-x64-gnu@0.141.0':
753
775
  resolution: {integrity: sha512-qtyQVAAebFq57B2tifTlel3TgGqUtsYNI/e+p6aya9rN9lOZVTDvr215fGYSA9XWooxzMxDiVxkBLk2jQHbsOQ==}
754
776
  engines: {node: ^20.19.0 || >=22.12.0}
755
777
  cpu: [x64]
756
778
  os: [linux]
779
+ libc: [glibc]
757
780
 
758
781
  '@oxc-parser/binding-linux-x64-musl@0.141.0':
759
782
  resolution: {integrity: sha512-SkGV1nKw40roEc94pv5EaaeH2ay14G6+roe8Q0wIUC1LcEKxzKW921h7+ZuZX0D3q2Mb/7aSFmxEVqnko3lPRw==}
760
783
  engines: {node: ^20.19.0 || >=22.12.0}
761
784
  cpu: [x64]
762
785
  os: [linux]
786
+ libc: [musl]
763
787
 
764
788
  '@oxc-parser/binding-openharmony-arm64@0.141.0':
765
789
  resolution: {integrity: sha512-cVgDM7n8QziQqOaP5hNgUYfMG7S/ZeuPxFWXnnHRv7rh025COk0rfQ6eEdKG3j/GaUuyvNZN4ifF1J8KmuXLLA==}
@@ -844,36 +868,42 @@ packages:
844
868
  engines: {node: ^20.19.0 || >=22.12.0}
845
869
  cpu: [arm64]
846
870
  os: [linux]
871
+ libc: [glibc]
847
872
 
848
873
  '@rolldown/binding-linux-arm64-musl@1.2.7':
849
874
  resolution: {integrity: sha512-lAIXTH/aiLRLxsTgQvfhjo4K1ydWIp00+V0voOr9beb/9ZmkUFrSIb03dXNFRgMNvkE6oGsF10ioQ6UsI+vS5Q==}
850
875
  engines: {node: ^20.19.0 || >=22.12.0}
851
876
  cpu: [arm64]
852
877
  os: [linux]
878
+ libc: [musl]
853
879
 
854
880
  '@rolldown/binding-linux-ppc64-gnu@1.2.7':
855
881
  resolution: {integrity: sha512-kdnwS28Pkenp/mZMRwjXXXwxQ7pIsm+bF919LUK93BOyhcLsrVKdP2p9fxpiPNPAbNuch8ypQt0pm2P2LYCAGg==}
856
882
  engines: {node: ^20.19.0 || >=22.12.0}
857
883
  cpu: [ppc64]
858
884
  os: [linux]
885
+ libc: [glibc]
859
886
 
860
887
  '@rolldown/binding-linux-s390x-gnu@1.2.7':
861
888
  resolution: {integrity: sha512-516OdsyLdr5E65paF3yBF55t8mfm9+gmtCsK3xI7XKXIT7EfRlHhxL8K/NR6Hu8BWSgF5+1w74lTL0+nxcc8Qw==}
862
889
  engines: {node: ^20.19.0 || >=22.12.0}
863
890
  cpu: [s390x]
864
891
  os: [linux]
892
+ libc: [glibc]
865
893
 
866
894
  '@rolldown/binding-linux-x64-gnu@1.2.7':
867
895
  resolution: {integrity: sha512-r8/z8n7GFaYRln3xmP1Cxy0HH/HLM0uBUPkEuSVEfKGDA89M0FsZRZJRSwe/tJjRx+fpH/gjorfhB8tmEbSFLA==}
868
896
  engines: {node: ^20.19.0 || >=22.12.0}
869
897
  cpu: [x64]
870
898
  os: [linux]
899
+ libc: [glibc]
871
900
 
872
901
  '@rolldown/binding-linux-x64-musl@1.2.7':
873
902
  resolution: {integrity: sha512-pAsE8iiDxUg1xBqdhrTfg45AVDVpirjz00sblEYClGNNcMnDb+e8beQgqIAw6LvauX/APvgxUnwrgun/YYGBhw==}
874
903
  engines: {node: ^20.19.0 || >=22.12.0}
875
904
  cpu: [x64]
876
905
  os: [linux]
906
+ libc: [musl]
877
907
 
878
908
  '@rolldown/binding-openharmony-arm64@1.2.7':
879
909
  resolution: {integrity: sha512-lTcIYmmnQQA8Or/2DatS6oSqcdLHvendjS+zLu+FwgToynWMRSmQdpM65fTANJgIS4mjbMOo5KT2lnT9SAb96w==}
@@ -930,66 +960,79 @@ packages:
930
960
  resolution: {integrity: sha512-YDUNvVM85TI3g/1OpnqKP1h4NeW/j64DfWMf+G3M809xNk1bJSnpFp4sh83NpmVE5DXnkh8ULor4LTVZKoYLHw==}
931
961
  cpu: [arm]
932
962
  os: [linux]
963
+ libc: [glibc]
933
964
 
934
965
  '@rollup/rollup-linux-arm-musleabihf@4.63.1':
935
966
  resolution: {integrity: sha512-7Mcn71p9ZuQFAj+h+dhQXy/yeLePRS2yKRnmW1DijA9thKO5qap0GNOIQK4yQ6iP3SU0Mrb/yWo8h8vgRba8lw==}
936
967
  cpu: [arm]
937
968
  os: [linux]
969
+ libc: [musl]
938
970
 
939
971
  '@rollup/rollup-linux-arm64-gnu@4.63.1':
940
972
  resolution: {integrity: sha512-4YiLQTX6U4CSl0L9cluep9A9W6UmTfqBDc2/CH6wlu54pl4E7Jn3cOD8oxzvBDEGk/JMKgJ47C8g+radF7mwvg==}
941
973
  cpu: [arm64]
942
974
  os: [linux]
975
+ libc: [glibc]
943
976
 
944
977
  '@rollup/rollup-linux-arm64-musl@4.63.1':
945
978
  resolution: {integrity: sha512-2ra8F7w8OquwZN9z2/fKFnli69wa8PLwaVzRMIPGb13ByMJwC28Fbp8YcVGoUhlYMTt7j5j9bNgpysrN2UM+vw==}
946
979
  cpu: [arm64]
947
980
  os: [linux]
981
+ libc: [musl]
948
982
 
949
983
  '@rollup/rollup-linux-loong64-gnu@4.63.1':
950
984
  resolution: {integrity: sha512-Sy20ncyhjmBP0Ml+UvQbimjlk6VFgjW5uNP+qqwHB00mTE8Bl2C1TuHTlRwK2YoXeZbee5lP2XevBWVkAQAtSQ==}
951
985
  cpu: [loong64]
952
986
  os: [linux]
987
+ libc: [glibc]
953
988
 
954
989
  '@rollup/rollup-linux-loong64-musl@4.63.1':
955
990
  resolution: {integrity: sha512-noITLp8oNjYliPnGWmLyelIHwULGqbHloQHGw1rtxbWhTuWooRpnZarZQJ1y9EUC4szuCusCc+HEpUtxpIwYvA==}
956
991
  cpu: [loong64]
957
992
  os: [linux]
993
+ libc: [musl]
958
994
 
959
995
  '@rollup/rollup-linux-ppc64-gnu@4.63.1':
960
996
  resolution: {integrity: sha512-hlxxXd+F1mWiAcaFR7Sv9ZQT6m6UfI8+Vy/kFJzztq2pDMU/0wZ9sish0iszNZvsQDo8Gc0i5yuFEOz5dDf6fA==}
961
997
  cpu: [ppc64]
962
998
  os: [linux]
999
+ libc: [glibc]
963
1000
 
964
1001
  '@rollup/rollup-linux-ppc64-musl@4.63.1':
965
1002
  resolution: {integrity: sha512-EF7OpqQTQ/BvGqLzUi4rEHuagCV9MugAUXSHemwPW5vxZ75RR+jxO/2j95Ph2dalMpFHSVECjRoioHZgA9zOYA==}
966
1003
  cpu: [ppc64]
967
1004
  os: [linux]
1005
+ libc: [musl]
968
1006
 
969
1007
  '@rollup/rollup-linux-riscv64-gnu@4.63.1':
970
1008
  resolution: {integrity: sha512-wQO3JesW9PRkwlabQ27y7sPfVOOTLRG73I4F2UYHG5PXun3J9U3y+b7ezVKSYbsvSKGQ1k1cq8Qlun4C9kLt3w==}
971
1009
  cpu: [riscv64]
972
1010
  os: [linux]
1011
+ libc: [glibc]
973
1012
 
974
1013
  '@rollup/rollup-linux-riscv64-musl@4.63.1':
975
1014
  resolution: {integrity: sha512-ouAGwhO6wHRXdnOVCOsB0tRFkA7nhNB2Nwax6oECXN0YiN8EYUTBAOudADOB1PI+yDL61TeNx/u7MVCzksNbkQ==}
976
1015
  cpu: [riscv64]
977
1016
  os: [linux]
1017
+ libc: [musl]
978
1018
 
979
1019
  '@rollup/rollup-linux-s390x-gnu@4.63.1':
980
1020
  resolution: {integrity: sha512-q2R38Sn+1J8RxhfJ+T54wSWmyKXWec+9jgDfqO2AtArEqHO5R2aeayp5H5OYLr5UYDVGsVaZPEFUooMhYCdz5A==}
981
1021
  cpu: [s390x]
982
1022
  os: [linux]
1023
+ libc: [glibc]
983
1024
 
984
1025
  '@rollup/rollup-linux-x64-gnu@4.63.1':
985
1026
  resolution: {integrity: sha512-gfI5T24WLLuFfSKw7Go/zDXjAAV0fny0swTaDv+WjK7vqcw4cRhFfdsyKL1n+ukI+ooBxn3bVQnyrn06WpI50w==}
986
1027
  cpu: [x64]
987
1028
  os: [linux]
1029
+ libc: [glibc]
988
1030
 
989
1031
  '@rollup/rollup-linux-x64-musl@4.63.1':
990
1032
  resolution: {integrity: sha512-4h6XqthmB4Hspji84wvgk+ElodTsGj+dbZqHJHHtKxj4mYq0ANSEEPX9ys3moJueqsRjwpaJYH7874Itwnj2ow==}
991
1033
  cpu: [x64]
992
1034
  os: [linux]
1035
+ libc: [musl]
993
1036
 
994
1037
  '@rollup/rollup-openbsd-x64@4.63.1':
995
1038
  resolution: {integrity: sha512-dlfCOa87o1VAYegLQ9EKilx2JCeRofiyPGhTCmqnuXZ6bMPiycO1rq1+sKoulAp7pGLIsTIw+1x5R+zgh5LhhA==}
@@ -1071,24 +1114,28 @@ packages:
1071
1114
  engines: {node: '>= 20'}
1072
1115
  cpu: [arm64]
1073
1116
  os: [linux]
1117
+ libc: [glibc]
1074
1118
 
1075
1119
  '@tailwindcss/oxide-linux-arm64-musl@4.3.3':
1076
1120
  resolution: {integrity: sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==}
1077
1121
  engines: {node: '>= 20'}
1078
1122
  cpu: [arm64]
1079
1123
  os: [linux]
1124
+ libc: [musl]
1080
1125
 
1081
1126
  '@tailwindcss/oxide-linux-x64-gnu@4.3.3':
1082
1127
  resolution: {integrity: sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==}
1083
1128
  engines: {node: '>= 20'}
1084
1129
  cpu: [x64]
1085
1130
  os: [linux]
1131
+ libc: [glibc]
1086
1132
 
1087
1133
  '@tailwindcss/oxide-linux-x64-musl@4.3.3':
1088
1134
  resolution: {integrity: sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==}
1089
1135
  engines: {node: '>= 20'}
1090
1136
  cpu: [x64]
1091
1137
  os: [linux]
1138
+ libc: [musl]
1092
1139
 
1093
1140
  '@tailwindcss/oxide-wasm32-wasi@4.3.3':
1094
1141
  resolution: {integrity: sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==}
@@ -1381,6 +1428,9 @@ packages:
1381
1428
  '@types/json-schema@7.0.15':
1382
1429
  resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
1383
1430
 
1431
+ '@types/sortablejs@1.15.9':
1432
+ resolution: {integrity: sha512-7HP+rZGE2p886PKV9c9OJzLBI6BBJu1O7lJGYnPyG3fS4/duUCcngkNCjsLwIMV+WMqANe3tt4irrXHSIe68OQ==}
1433
+
1384
1434
  '@types/web-bluetooth@0.0.20':
1385
1435
  resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==}
1386
1436
 
@@ -2291,48 +2341,56 @@ packages:
2291
2341
  engines: {node: '>= 12.0.0'}
2292
2342
  cpu: [arm64]
2293
2343
  os: [linux]
2344
+ libc: [glibc]
2294
2345
 
2295
2346
  lightningcss-linux-arm64-gnu@1.33.0:
2296
2347
  resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==}
2297
2348
  engines: {node: '>= 12.0.0'}
2298
2349
  cpu: [arm64]
2299
2350
  os: [linux]
2351
+ libc: [glibc]
2300
2352
 
2301
2353
  lightningcss-linux-arm64-musl@1.32.0:
2302
2354
  resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==}
2303
2355
  engines: {node: '>= 12.0.0'}
2304
2356
  cpu: [arm64]
2305
2357
  os: [linux]
2358
+ libc: [musl]
2306
2359
 
2307
2360
  lightningcss-linux-arm64-musl@1.33.0:
2308
2361
  resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==}
2309
2362
  engines: {node: '>= 12.0.0'}
2310
2363
  cpu: [arm64]
2311
2364
  os: [linux]
2365
+ libc: [musl]
2312
2366
 
2313
2367
  lightningcss-linux-x64-gnu@1.32.0:
2314
2368
  resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==}
2315
2369
  engines: {node: '>= 12.0.0'}
2316
2370
  cpu: [x64]
2317
2371
  os: [linux]
2372
+ libc: [glibc]
2318
2373
 
2319
2374
  lightningcss-linux-x64-gnu@1.33.0:
2320
2375
  resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==}
2321
2376
  engines: {node: '>= 12.0.0'}
2322
2377
  cpu: [x64]
2323
2378
  os: [linux]
2379
+ libc: [glibc]
2324
2380
 
2325
2381
  lightningcss-linux-x64-musl@1.32.0:
2326
2382
  resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==}
2327
2383
  engines: {node: '>= 12.0.0'}
2328
2384
  cpu: [x64]
2329
2385
  os: [linux]
2386
+ libc: [musl]
2330
2387
 
2331
2388
  lightningcss-linux-x64-musl@1.33.0:
2332
2389
  resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==}
2333
2390
  engines: {node: '>= 12.0.0'}
2334
2391
  cpu: [x64]
2335
2392
  os: [linux]
2393
+ libc: [musl]
2336
2394
 
2337
2395
  lightningcss-win32-arm64-msvc@1.32.0:
2338
2396
  resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==}
@@ -3332,7 +3390,7 @@ snapshots:
3332
3390
 
3333
3391
  '@alloc/quick-lru@5.3.0': {}
3334
3392
 
3335
- '@antelopejs/tooling-configs@0.2.12':
3393
+ '@antelopejs/tooling-configs@0.3.3':
3336
3394
  dependencies:
3337
3395
  '@oxlint/plugins': 1.81.0
3338
3396
  dts-bundle-generator: 9.5.1
@@ -4512,6 +4570,8 @@ snapshots:
4512
4570
 
4513
4571
  '@types/json-schema@7.0.15': {}
4514
4572
 
4573
+ '@types/sortablejs@1.15.9': {}
4574
+
4515
4575
  '@types/web-bluetooth@0.0.20': {}
4516
4576
 
4517
4577
  '@types/web-bluetooth@0.0.21': {}
@@ -0,0 +1,142 @@
1
+ // @vitest-environment jsdom
2
+ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
3
+ import { defineComponent, h } from 'vue'
4
+ import EditorCanvas from '../app/components/editor/EditorCanvas.vue'
5
+ import { useEditorActions } from '../app/composables/useEditorActions'
6
+ import { provideEditorContext } from '../app/composables/useEditorContext'
7
+ import { useEditorSession } from '../app/composables/useEditorSession'
8
+ import { useMailingApi } from '../app/composables/useMailingApi'
9
+ import { useEditorReads } from '../app/composables/useMailingReads'
10
+ import { createEditorState } from '../app/composables/useTemplateEditor'
11
+ import type {
12
+ TemplateContent,
13
+ TemplateContentResponse,
14
+ } from '../app/types/mailing'
15
+ import { stubApiData } from './helpers/api-data'
16
+ import { stubAuthFetch } from './helpers/auth-fetch'
17
+ import { mount, slotStub, stubNuxtGlobals } from './helpers/nuxt-globals'
18
+ import type { Mounted } from './helpers/nuxt-globals'
19
+
20
+ const CLIENT_BASE_URL = 'https://dms.acme.com'
21
+ const DEFAULT_SVG = '/logo.svg'
22
+ const DEFAULT_PNG = 'https://cdn.acme.com/logo.png'
23
+ const EMAIL_PNG = 'https://cdn.acme.com/email-logo.png'
24
+ const DARK_PNG = 'https://cdn.acme.com/email-logo-dark.png'
25
+
26
+ const CONTENT: TemplateContent = {
27
+ locales: { en: { subject: 'Hi', preheader: '', blocks: [] } },
28
+ }
29
+
30
+ const LOADED: TemplateContentResponse = {
31
+ template: {
32
+ _id: 't1',
33
+ slug: 'welcome',
34
+ name: 'Welcome',
35
+ status: 'draft',
36
+ updatedAt: '2026-10-01T10:00:00Z',
37
+ updatedBy: 'camille',
38
+ attention: '',
39
+ },
40
+ content: CONTENT,
41
+ publishedContent: null,
42
+ hasDraft: true,
43
+ version: 0,
44
+ revision: 1,
45
+ changes: [],
46
+ variables: [],
47
+ detectedVariables: [],
48
+ testData: {},
49
+ fallbackLocale: 'en',
50
+ blockOnMissingVariables: false,
51
+ categories: [],
52
+ sender: { name: '', email: '', replyTo: '' },
53
+ }
54
+
55
+ interface LogoBranding {
56
+ default?: { light?: string }
57
+ email?: { light?: string; dark?: string }
58
+ }
59
+
60
+ /** The canvas inside an editor built as the workspace builds it. */
61
+ const CanvasInEditor = defineComponent({
62
+ setup() {
63
+ const editor = createEditorState(CONTENT, 'en', ['en'])
64
+ const api = useMailingApi()
65
+ const reads = useEditorReads('t1')
66
+ const deps = { editor, api, reads, templateId: 't1', onError: () => {} }
67
+ const session = useEditorSession({ ...deps, loaded: LOADED })
68
+ const actions = useEditorActions({
69
+ ...deps,
70
+ session,
71
+ reload: async () => {},
72
+ })
73
+ provideEditorContext({ editor, session, actions, api, templateId: 't1' })
74
+ return () => h(EditorCanvas)
75
+ },
76
+ })
77
+
78
+ let mounted: Mounted | null = null
79
+
80
+ /** The logo the canvas header shows under `logo`, or null when it shows none. */
81
+ function canvasLogo(logo: LogoBranding): string | null {
82
+ vi.stubGlobal('useDmsAppConfig', () => ({ branding: { logo } }))
83
+ mounted = mount(
84
+ CanvasInEditor,
85
+ {},
86
+ {
87
+ UAlert: slotStub('UAlert'),
88
+ MailingEditorEnvelope: slotStub('MailingEditorEnvelope'),
89
+ MailingEditorMissingLocale: slotStub('MailingEditorMissingLocale'),
90
+ MailingEditorBlockList: slotStub('MailingEditorBlockList'),
91
+ },
92
+ )
93
+ return mounted.host.querySelector('img')?.getAttribute('src') ?? null
94
+ }
95
+
96
+ beforeEach(() => {
97
+ stubNuxtGlobals()
98
+ stubApiData()
99
+ stubAuthFetch()
100
+ vi.stubGlobal('useDmsRuntimeConfig', () => ({
101
+ public: { dms: { clientBaseUrl: CLIENT_BASE_URL } },
102
+ }))
103
+ })
104
+
105
+ afterEach(() => {
106
+ mounted?.unmount()
107
+ mounted = null
108
+ vi.unstubAllGlobals()
109
+ })
110
+
111
+ describe('editor canvas logo header', () => {
112
+ it('shows the e-mail logo over an SVG default logo, as the sent e-mail does', () => {
113
+ expect(
114
+ canvasLogo({
115
+ default: { light: DEFAULT_SVG },
116
+ email: { light: EMAIL_PNG },
117
+ }),
118
+ ).toBe(EMAIL_PNG)
119
+ })
120
+ it('prefers the light e-mail logo over a public default logo and the dark one', () => {
121
+ expect(
122
+ canvasLogo({
123
+ default: { light: DEFAULT_PNG },
124
+ email: { light: EMAIL_PNG, dark: DARK_PNG },
125
+ }),
126
+ ).toBe(EMAIL_PNG)
127
+ })
128
+ it('falls back to the default logo when no e-mail logo is set', () => {
129
+ expect(canvasLogo({ default: { light: DEFAULT_PNG } })).toBe(DEFAULT_PNG)
130
+ })
131
+ it('shows no logo when the chosen one is an SVG a mail client refuses', () => {
132
+ expect(canvasLogo({ default: { light: DEFAULT_SVG } })).toBeNull()
133
+ })
134
+ it('does not fall back to the default logo when the e-mail logo is refused', () => {
135
+ expect(
136
+ canvasLogo({
137
+ default: { light: DEFAULT_PNG },
138
+ email: { light: DEFAULT_SVG },
139
+ }),
140
+ ).toBeNull()
141
+ })
142
+ })
@@ -0,0 +1,19 @@
1
+ /**
2
+ * `ajs dms verify-source` type-checks the layer against the installed
3
+ * `@vueuse/integrations`: the composable has to compile against its
4
+ * `useSortable` overloads, which take the list as a `MaybeRef`, not a getter.
5
+ */
6
+ import type { Ref } from 'vue'
7
+ import { describe, expectTypeOf, it } from 'vitest'
8
+ import { useSortableList } from '../app/composables/useSortableList'
9
+
10
+ describe('useSortableList', () => {
11
+ it('takes the list as a getter and compiles against useSortable', () => {
12
+ expectTypeOf(useSortableList<{ id: string }>)
13
+ .parameter(1)
14
+ .toEqualTypeOf<() => { id: string }[]>()
15
+ expectTypeOf(useSortableList<{ id: string }>)
16
+ .parameter(0)
17
+ .toEqualTypeOf<Ref<HTMLElement | null>>()
18
+ })
19
+ })
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "module": "esnext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["esnext", "dom"],
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "skipLibCheck": true
10
+ },
11
+ "include": ["tests/**/*.test-d.ts"]
12
+ }
@@ -1,13 +1,29 @@
1
+ import { fileURLToPath } from 'node:url'
1
2
  import vue from '@vitejs/plugin-vue'
2
3
  import { defineConfig } from 'vitest/config'
3
4
 
4
5
  export default defineConfig({
5
6
  plugins: [vue()],
7
+ resolve: {
8
+ alias: {
9
+ '#dms-layout': fileURLToPath(
10
+ new URL(
11
+ '../node_modules/@antelopejs/dms/frontend-vue/layers/dms-layout',
12
+ import.meta.url,
13
+ ),
14
+ ),
15
+ },
16
+ },
6
17
  test: {
7
18
  // Most suites need no DOM, and setting jsdom up per file is the bulk of
8
19
  // the run; the files that mount components opt in with a
9
20
  // `// @vitest-environment jsdom` header.
10
21
  environment: 'node',
11
22
  include: ['tests/**/*.test.ts'],
23
+ typecheck: {
24
+ enabled: true,
25
+ include: ['tests/**/*.test-d.ts'],
26
+ tsconfig: 'tsconfig.typecheck.json',
27
+ },
12
28
  },
13
29
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms-mailing",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "description": "E-mail templates for the AntelopeJS DMS: a block editor with drafts and versions, a send log, delivery metrics and a suppression list.",
5
5
  "keywords": [
6
6
  "antelopejs",
@@ -46,22 +46,23 @@
46
46
  "registry": "https://registry.npmjs.org/"
47
47
  },
48
48
  "dependencies": {
49
- "@antelopejs/interface-api": ">=0.0.15 <1.0.0",
50
- "@antelopejs/interface-api-util": ">=0.1.3 <1.0.0",
51
- "@antelopejs/interface-core": ">=0.2.4 <1.0.0",
52
- "@antelopejs/interface-data-api": ">=0.4.0 <1.0.0",
53
- "@antelopejs/interface-database": ">=0.1.11 <1.0.0",
54
- "@antelopejs/interface-database-decorators": ">=0.1.10 <1.0.0",
55
- "@antelopejs/interface-dms": ">=0.9.0 <1.0.0",
56
- "@antelopejs/interface-dms-mailing": ">=0.9.0 <0.10.0",
49
+ "@antelopejs/interface-api": ">=0.3.0 <1.0.0",
50
+ "@antelopejs/interface-api-util": ">=0.3.0 <1.0.0",
51
+ "@antelopejs/interface-core": ">=0.4.0 <1.0.0",
52
+ "@antelopejs/interface-data-api": ">=0.6.1 <1.0.0",
53
+ "@antelopejs/interface-database": ">=0.3.0 <1.0.0",
54
+ "@antelopejs/interface-database-decorators": ">=0.2.0 <1.0.0",
55
+ "@antelopejs/interface-dms": ">=0.12.0 <1.0.0",
56
+ "@antelopejs/interface-dms-mailing": ">=0.10.0 <0.11.0",
57
57
  "@antelopejs/interface-email": ">=0.0.6 <1.0.0",
58
58
  "node-cron": "^4.2.1",
59
59
  "zod": "~3.24.2"
60
60
  },
61
61
  "devDependencies": {
62
- "@antelopejs/core": ">=1.17.1 <2",
63
- "@antelopejs/dms": ">=0.13.1 <1.0.0",
64
- "@antelopejs/tooling-configs": "^0.2.12",
62
+ "@antelopejs/core": "^1.21.0",
63
+ "@antelopejs/dms": ">=0.19.0 <1.0.0",
64
+ "@antelopejs/mongodb": "^1.6.2",
65
+ "@antelopejs/tooling-configs": "^0.3.3",
65
66
  "@types/chai": "^4.3.20",
66
67
  "@types/mocha": "^10",
67
68
  "@types/node": "^24.0.0",
@@ -76,7 +77,7 @@
76
77
  "typescript": "^6.0.3"
77
78
  },
78
79
  "optionalDependencies": {
79
- "@antelopejs/interface-dms-automation": ">=0.2.1 <1.0.0"
80
+ "@antelopejs/interface-dms-automation": ">=0.6.0 <1.0.0"
80
81
  },
81
82
  "antelopeJs": {
82
83
  "baseUrl": "dist",
@@ -90,14 +91,14 @@
90
91
  },
91
92
  "dmsFrontend": "dist/frontend-module.js",
92
93
  "scripts": {
93
- "build": "rimraf dist && tsc",
94
+ "build": "pnpm --filter @antelopejs/interface-dms-mailing build && rimraf dist && tsc",
94
95
  "dev": "ajs project dev -w -p playground",
95
96
  "dev:frontend": "cd playground && pnpm frontend:dev",
96
97
  "frontend:dev": "cd playground && pnpm frontend:dev",
97
98
  "typecheck": "tsc --noEmit",
98
99
  "knip": "knip --dependencies",
99
100
  "knip:all": "knip",
100
- "release": "pnpm --filter @antelopejs/interface-dms-mailing build && pnpm --dir frontend-vue install --frozen-lockfile && release-it",
101
+ "release": "pnpm --filter @antelopejs/interface-dms-mailing build && pnpm --dir ../.. install --frozen-lockfile && release-it",
101
102
  "test": "pnpm run test:backend && pnpm run test:layer",
102
103
  "test:backend": "([ -n \"$DMS_PREBUILT\" ] || pnpm run build) && ajs module test .",
103
104
  "test:layer": "cd frontend-vue && pnpm test",
@@ -23,9 +23,9 @@ https://dms.antelopejs.com/docs/modules/mailing (sending from code and the webho
23
23
 
24
24
  - `ajs project modules add @antelopejs/dms-mailing`, plus a module implementing `@antelopejs/interface-email`
25
25
  (`@antelopejs/nodemailer`, `config: { ethereal: true }` in dev).
26
- - Mailing 0.7.1 requires `@antelopejs/dms` `>=0.11.0 <1.0.0`, so DMS 0.11 or later (interface-dms 0.9, renderer `@antelopejs/dms-frontend` `>=0.9.1 <0.10.0`);
27
- 0.7.0 is the DMS 0.10 line. It implements `@antelopejs/interface-dms-mailing` `>=0.9.0 <0.10.0`: declaration and import calls,
28
- and `DeclareSender` since interface 0.9; `SendTemplate` / `RecordEmailEvent` callers do not change.
26
+ - The DMS backend and renderer releases the module runs on are in the README compatibility block and in `engines["@antelopejs/dms-frontend"]` of `frontend-vue/package.json`;
27
+ 0.4 is the DMS 0.8 line. Mailing 0.6 implements `@antelopejs/interface-dms-mailing` `>=0.8.0 <0.9.0`, adding declaration and import calls;
28
+ interface 0.9 adds `DeclareSender`; `SendTemplate` / `RecordEmailEvent` callers do not change.
29
29
  - Module option: `useHtmlRender` (default `true`, DMS html-render chain; `false` = built-in standalone HTML).
30
30
  - Set the DMS `clientBaseUrl`: the webhook URL and the e-mail logo are built on it.
31
31
  - Per-workspace settings (sender, missing-variable guard, fallback locale, webhook secret, retention,
@@ -83,6 +83,8 @@ export async function declareMailingContent(tenantId: string) {
83
83
  i18n keys; each user reads, searches and sorts them in their language (`x-content-language`).
84
84
  - `DeclareSender({ tenantId, email, name?, replyTo? })` writes the settings' sender (resolves `void`); call it once
85
85
  from `Hook.TENANT_BEING_PROVISIONED`, not on every boot, since it replaces what a user set. Refusals use `invalid_sender`.
86
+ - `DeclareWebhookSecret({ tenantId, secret, replaceRotated? })` resolves `{ outcome: "set" | "unchanged" | "kept" }`, never
87
+ the secret; idempotent, and keeps a secret the owner set or rotated unless `replaceRotated`. Refusals use `invalid_webhook_secret`.
86
88
  - Refusals reject with `error.code`: `invalid_template`, `unknown_category`, `empty_subject`,
87
89
  `nothing_to_publish`, `invalid_category`; invalid tenant input rejects before writes. Storage errors can occur after publication.
88
90
  - `ImportSends({ tenantId, sends: [{ importId, templateSlug, to, sentAt, events }] })` writes past sends with their own
@@ -5,13 +5,13 @@ import type {
5
5
  } from "@antelopejs/interface-dms-automation";
6
6
  import { SEND_EVENT_TYPES, type SendEventType } from "../types";
7
7
 
8
- export interface EmailEventPayload {
8
+ export type EmailEventPayload = {
9
9
  tenantId: string;
10
10
  sendId: string;
11
11
  templateSlug: string;
12
12
  type: SendEventType;
13
13
  recipientEmail: string;
14
- }
14
+ };
15
15
 
16
16
  export interface EmailEventTriggerConfig {
17
17
  types?: SendEventType[];