@antelopejs/dms-mailing 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/README.md +162 -0
- package/dist/antelope-modules.d.ts +32 -0
- package/dist/antelope-modules.js +36 -0
- package/dist/antelope-modules.js.map +1 -0
- package/dist/automation/email-event-trigger.d.ts +16 -0
- package/dist/automation/email-event-trigger.js +70 -0
- package/dist/automation/email-event-trigger.js.map +1 -0
- package/dist/automation/index.d.ts +4 -0
- package/dist/automation/index.js +39 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/automation/send-template-action.d.ts +13 -0
- package/dist/automation/send-template-action.js +71 -0
- package/dist/automation/send-template-action.js.map +1 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.js +13 -0
- package/dist/config.js.map +1 -0
- package/dist/constants.d.ts +28 -0
- package/dist/constants.js +32 -0
- package/dist/constants.js.map +1 -0
- package/dist/crons/index.d.ts +1 -0
- package/dist/crons/index.js +18 -0
- package/dist/crons/index.js.map +1 -0
- package/dist/crons/retention.d.ts +18 -0
- package/dist/crons/retention.js +107 -0
- package/dist/crons/retention.js.map +1 -0
- package/dist/data/body.d.ts +1 -0
- package/dist/data/body.js +18 -0
- package/dist/data/body.js.map +1 -0
- package/dist/data/index.d.ts +3 -0
- package/dist/data/index.js +20 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/sends-table.d.ts +28 -0
- package/dist/data/sends-table.js +161 -0
- package/dist/data/sends-table.js.map +1 -0
- package/dist/data/templates-table.d.ts +31 -0
- package/dist/data/templates-table.js +173 -0
- package/dist/data/templates-table.js.map +1 -0
- package/dist/data-types/categories-type.d.ts +35 -0
- package/dist/data-types/categories-type.js +37 -0
- package/dist/data-types/categories-type.js.map +1 -0
- package/dist/data-types/category-type.d.ts +8 -0
- package/dist/data-types/category-type.js +43 -0
- package/dist/data-types/category-type.js.map +1 -0
- package/dist/data-types/index.d.ts +2 -0
- package/dist/data-types/index.js +19 -0
- package/dist/data-types/index.js.map +1 -0
- package/dist/db/index.d.ts +2 -0
- package/dist/db/index.js +19 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/models/index.d.ts +4 -0
- package/dist/db/models/index.js +21 -0
- package/dist/db/models/index.js.map +1 -0
- package/dist/db/models/send-events.model.d.ts +27 -0
- package/dist/db/models/send-events.model.js +35 -0
- package/dist/db/models/send-events.model.js.map +1 -0
- package/dist/db/models/sends.model.d.ts +32 -0
- package/dist/db/models/sends.model.js +115 -0
- package/dist/db/models/sends.model.js.map +1 -0
- package/dist/db/models/settings.model.d.ts +23 -0
- package/dist/db/models/settings.model.js +13 -0
- package/dist/db/models/settings.model.js.map +1 -0
- package/dist/db/models/templates.model.d.ts +23 -0
- package/dist/db/models/templates.model.js +13 -0
- package/dist/db/models/templates.model.js.map +1 -0
- package/dist/db/tables/index.d.ts +4 -0
- package/dist/db/tables/index.js +21 -0
- package/dist/db/tables/index.js.map +1 -0
- package/dist/db/tables/send-events.table.d.ts +10 -0
- package/dist/db/tables/send-events.table.js +44 -0
- package/dist/db/tables/send-events.table.js.map +1 -0
- package/dist/db/tables/sends.table.d.ts +26 -0
- package/dist/db/tables/sends.table.js +113 -0
- package/dist/db/tables/sends.table.js.map +1 -0
- package/dist/db/tables/settings.table.d.ts +15 -0
- package/dist/db/tables/settings.table.js +68 -0
- package/dist/db/tables/settings.table.js.map +1 -0
- package/dist/db/tables/templates.table.d.ts +18 -0
- package/dist/db/tables/templates.table.js +81 -0
- package/dist/db/tables/templates.table.js.map +1 -0
- package/dist/engine/conditions.d.ts +2 -0
- package/dist/engine/conditions.js +20 -0
- package/dist/engine/conditions.js.map +1 -0
- package/dist/engine/coverage.d.ts +4 -0
- package/dist/engine/coverage.js +45 -0
- package/dist/engine/coverage.js.map +1 -0
- package/dist/engine/fallback-html.d.ts +4 -0
- package/dist/engine/fallback-html.js +84 -0
- package/dist/engine/fallback-html.js.map +1 -0
- package/dist/engine/index.d.ts +7 -0
- package/dist/engine/index.js +24 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/paths.d.ts +3 -0
- package/dist/engine/paths.js +32 -0
- package/dist/engine/paths.js.map +1 -0
- package/dist/engine/resolve.d.ts +4 -0
- package/dist/engine/resolve.js +139 -0
- package/dist/engine/resolve.js.map +1 -0
- package/dist/engine/tokens.d.ts +7 -0
- package/dist/engine/tokens.js +29 -0
- package/dist/engine/tokens.js.map +1 -0
- package/dist/engine/walk.d.ts +3 -0
- package/dist/engine/walk.js +14 -0
- package/dist/engine/walk.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +18 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/tenant-export.d.ts +14 -0
- package/dist/hooks/tenant-export.js +84 -0
- package/dist/hooks/tenant-export.js.map +1 -0
- package/dist/implementations/dms-mailing/index.d.ts +2 -0
- package/dist/implementations/dms-mailing/index.js +8 -0
- package/dist/implementations/dms-mailing/index.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +95 -0
- package/dist/index.js.map +1 -0
- package/dist/pages/editor.d.ts +9 -0
- package/dist/pages/editor.js +30 -0
- package/dist/pages/editor.js.map +1 -0
- package/dist/pages/index.d.ts +7 -0
- package/dist/pages/index.js +24 -0
- package/dist/pages/index.js.map +1 -0
- package/dist/pages/module.d.ts +1 -0
- package/dist/pages/module.js +12 -0
- package/dist/pages/module.js.map +1 -0
- package/dist/pages/overview.d.ts +14 -0
- package/dist/pages/overview.js +92 -0
- package/dist/pages/overview.js.map +1 -0
- package/dist/pages/sends.d.ts +13 -0
- package/dist/pages/sends.js +125 -0
- package/dist/pages/sends.js.map +1 -0
- package/dist/pages/settings/form.d.ts +1 -0
- package/dist/pages/settings/form.js +68 -0
- package/dist/pages/settings/form.js.map +1 -0
- package/dist/pages/settings/index.d.ts +2 -0
- package/dist/pages/settings/index.js +19 -0
- package/dist/pages/settings/index.js.map +1 -0
- package/dist/pages/settings/page.d.ts +10 -0
- package/dist/pages/settings/page.js +35 -0
- package/dist/pages/settings/page.js.map +1 -0
- package/dist/pages/templates.d.ts +10 -0
- package/dist/pages/templates.js +140 -0
- package/dist/pages/templates.js.map +1 -0
- package/dist/permissions.d.ts +1 -0
- package/dist/permissions.js +37 -0
- package/dist/permissions.js.map +1 -0
- package/dist/quick-actions.d.ts +2 -0
- package/dist/quick-actions.js +18 -0
- package/dist/quick-actions.js.map +1 -0
- package/dist/realtime.d.ts +4 -0
- package/dist/realtime.js +44 -0
- package/dist/realtime.js.map +1 -0
- package/dist/routes/events.d.ts +9 -0
- package/dist/routes/events.js +63 -0
- package/dist/routes/events.js.map +1 -0
- package/dist/routes/index.d.ts +7 -0
- package/dist/routes/index.js +24 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/metrics.d.ts +54 -0
- package/dist/routes/metrics.js +235 -0
- package/dist/routes/metrics.js.map +1 -0
- package/dist/routes/period.d.ts +5 -0
- package/dist/routes/period.js +36 -0
- package/dist/routes/period.js.map +1 -0
- package/dist/routes/provider.d.ts +13 -0
- package/dist/routes/provider.js +41 -0
- package/dist/routes/provider.js.map +1 -0
- package/dist/routes/sends.d.ts +31 -0
- package/dist/routes/sends.js +178 -0
- package/dist/routes/sends.js.map +1 -0
- package/dist/routes/settings.d.ts +14 -0
- package/dist/routes/settings.js +72 -0
- package/dist/routes/settings.js.map +1 -0
- package/dist/routes/templates.d.ts +61 -0
- package/dist/routes/templates.js +230 -0
- package/dist/routes/templates.js.map +1 -0
- package/dist/services/attention.d.ts +23 -0
- package/dist/services/attention.js +104 -0
- package/dist/services/attention.js.map +1 -0
- package/dist/services/categories.d.ts +34 -0
- package/dist/services/categories.js +34 -0
- package/dist/services/categories.js.map +1 -0
- package/dist/services/events.d.ts +10 -0
- package/dist/services/events.js +89 -0
- package/dist/services/events.js.map +1 -0
- package/dist/services/metrics.d.ts +34 -0
- package/dist/services/metrics.js +103 -0
- package/dist/services/metrics.js.map +1 -0
- package/dist/services/notify.d.ts +20 -0
- package/dist/services/notify.js +63 -0
- package/dist/services/notify.js.map +1 -0
- package/dist/services/permissions.d.ts +2 -0
- package/dist/services/permissions.js +15 -0
- package/dist/services/permissions.js.map +1 -0
- package/dist/services/provider.d.ts +6 -0
- package/dist/services/provider.js +25 -0
- package/dist/services/provider.js.map +1 -0
- package/dist/services/render.d.ts +6 -0
- package/dist/services/render.js +21 -0
- package/dist/services/render.js.map +1 -0
- package/dist/services/send.d.ts +49 -0
- package/dist/services/send.js +259 -0
- package/dist/services/send.js.map +1 -0
- package/dist/services/settings.d.ts +4 -0
- package/dist/services/settings.js +61 -0
- package/dist/services/settings.js.map +1 -0
- package/dist/services/status.d.ts +3 -0
- package/dist/services/status.js +16 -0
- package/dist/services/status.js.map +1 -0
- package/dist/services/templates.d.ts +17 -0
- package/dist/services/templates.js +92 -0
- package/dist/services/templates.js.map +1 -0
- package/dist/test/antelope.test.d.ts +2 -0
- package/dist/test/antelope.test.js +179 -0
- package/dist/test/antelope.test.js.map +1 -0
- package/dist/test/helpers/http.d.ts +4 -0
- package/dist/test/helpers/http.js +28 -0
- package/dist/test/helpers/http.js.map +1 -0
- package/dist/test/helpers/owner.d.ts +5 -0
- package/dist/test/helpers/owner.js +30 -0
- package/dist/test/helpers/owner.js.map +1 -0
- package/dist/test/integration/events.test.d.ts +1 -0
- package/dist/test/integration/events.test.js +132 -0
- package/dist/test/integration/events.test.js.map +1 -0
- package/dist/test/integration/retention.test.d.ts +1 -0
- package/dist/test/integration/retention.test.js +291 -0
- package/dist/test/integration/retention.test.js.map +1 -0
- package/dist/test/integration/sends.test.d.ts +1 -0
- package/dist/test/integration/sends.test.js +157 -0
- package/dist/test/integration/sends.test.js.map +1 -0
- package/dist/test/integration/settings.test.d.ts +1 -0
- package/dist/test/integration/settings.test.js +45 -0
- package/dist/test/integration/settings.test.js.map +1 -0
- package/dist/test/integration/setup.test.d.ts +1 -0
- package/dist/test/integration/setup.test.js +32 -0
- package/dist/test/integration/setup.test.js.map +1 -0
- package/dist/test/integration/templates.test.d.ts +1 -0
- package/dist/test/integration/templates.test.js +167 -0
- package/dist/test/integration/templates.test.js.map +1 -0
- package/dist/test/integration/tenant-export.test.d.ts +1 -0
- package/dist/test/integration/tenant-export.test.js +85 -0
- package/dist/test/integration/tenant-export.test.js.map +1 -0
- package/dist/test/unit/attention.test.d.ts +1 -0
- package/dist/test/unit/attention.test.js +109 -0
- package/dist/test/unit/attention.test.js.map +1 -0
- package/dist/test/unit/automation.test.d.ts +1 -0
- package/dist/test/unit/automation.test.js +104 -0
- package/dist/test/unit/automation.test.js.map +1 -0
- package/dist/test/unit/categories.test.d.ts +1 -0
- package/dist/test/unit/categories.test.js +38 -0
- package/dist/test/unit/categories.test.js.map +1 -0
- package/dist/test/unit/engine/conditions.test.d.ts +1 -0
- package/dist/test/unit/engine/conditions.test.js +23 -0
- package/dist/test/unit/engine/conditions.test.js.map +1 -0
- package/dist/test/unit/engine/coverage.test.d.ts +1 -0
- package/dist/test/unit/engine/coverage.test.js +106 -0
- package/dist/test/unit/engine/coverage.test.js.map +1 -0
- package/dist/test/unit/engine/fallback-html.test.d.ts +1 -0
- package/dist/test/unit/engine/fallback-html.test.js +78 -0
- package/dist/test/unit/engine/fallback-html.test.js.map +1 -0
- package/dist/test/unit/engine/paths.test.d.ts +1 -0
- package/dist/test/unit/engine/paths.test.js +33 -0
- package/dist/test/unit/engine/paths.test.js.map +1 -0
- package/dist/test/unit/engine/resolve.test.d.ts +1 -0
- package/dist/test/unit/engine/resolve.test.js +157 -0
- package/dist/test/unit/engine/resolve.test.js.map +1 -0
- package/dist/test/unit/engine/tokens.test.d.ts +1 -0
- package/dist/test/unit/engine/tokens.test.js +26 -0
- package/dist/test/unit/engine/tokens.test.js.map +1 -0
- package/dist/test/unit/events.test.d.ts +1 -0
- package/dist/test/unit/events.test.js +13 -0
- package/dist/test/unit/events.test.js.map +1 -0
- package/dist/test/unit/metrics.test.d.ts +1 -0
- package/dist/test/unit/metrics.test.js +108 -0
- package/dist/test/unit/metrics.test.js.map +1 -0
- package/dist/test/unit/notify.test.d.ts +1 -0
- package/dist/test/unit/notify.test.js +49 -0
- package/dist/test/unit/notify.test.js.map +1 -0
- package/dist/test/unit/period.test.d.ts +1 -0
- package/dist/test/unit/period.test.js +44 -0
- package/dist/test/unit/period.test.js.map +1 -0
- package/dist/test/unit/provider.test.d.ts +1 -0
- package/dist/test/unit/provider.test.js +47 -0
- package/dist/test/unit/provider.test.js.map +1 -0
- package/dist/test/unit/realtime.test.d.ts +1 -0
- package/dist/test/unit/realtime.test.js +13 -0
- package/dist/test/unit/realtime.test.js.map +1 -0
- package/dist/test/unit/render.test.d.ts +1 -0
- package/dist/test/unit/render.test.js +23 -0
- package/dist/test/unit/render.test.js.map +1 -0
- package/dist/test/unit/retention.test.d.ts +1 -0
- package/dist/test/unit/retention.test.js +66 -0
- package/dist/test/unit/retention.test.js.map +1 -0
- package/dist/test/unit/send-batch.test.d.ts +1 -0
- package/dist/test/unit/send-batch.test.js +46 -0
- package/dist/test/unit/send-batch.test.js.map +1 -0
- package/dist/test/unit/send.test.d.ts +1 -0
- package/dist/test/unit/send.test.js +120 -0
- package/dist/test/unit/send.test.js.map +1 -0
- package/dist/test/unit/smoke.test.d.ts +1 -0
- package/dist/test/unit/smoke.test.js +10 -0
- package/dist/test/unit/smoke.test.js.map +1 -0
- package/dist/test/unit/status.test.d.ts +1 -0
- package/dist/test/unit/status.test.js +16 -0
- package/dist/test/unit/status.test.js.map +1 -0
- package/dist/test/unit/templates.test.d.ts +1 -0
- package/dist/test/unit/templates.test.js +48 -0
- package/dist/test/unit/templates.test.js.map +1 -0
- package/dist/test/unit/tenant-export.test.d.ts +1 -0
- package/dist/test/unit/tenant-export.test.js +59 -0
- package/dist/test/unit/tenant-export.test.js.map +1 -0
- package/dist/test/unit/webhook-secret.test.d.ts +1 -0
- package/dist/test/unit/webhook-secret.test.js +42 -0
- package/dist/test/unit/webhook-secret.test.js.map +1 -0
- package/dist/types/blocks.d.ts +2 -0
- package/dist/types/blocks.js +3 -0
- package/dist/types/blocks.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +21 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/resolved.d.ts +68 -0
- package/dist/types/resolved.js +3 -0
- package/dist/types/resolved.js.map +1 -0
- package/dist/types/sends.d.ts +14 -0
- package/dist/types/sends.js +19 -0
- package/dist/types/sends.js.map +1 -0
- package/dist/types/settings.d.ts +16 -0
- package/dist/types/settings.js +11 -0
- package/dist/types/settings.js.map +1 -0
- package/dist/validation/settings.schema.d.ts +63 -0
- package/dist/validation/settings.schema.js +29 -0
- package/dist/validation/settings.schema.js.map +1 -0
- package/dist/validation/templates.schema.d.ts +248 -0
- package/dist/validation/templates.schema.js +126 -0
- package/dist/validation/templates.schema.js.map +1 -0
- package/frontend-vue/.editorconfig +12 -0
- package/frontend-vue/.prettierrc +11 -0
- package/frontend-vue/app/components/AttentionCard.vue +78 -0
- package/frontend-vue/app/components/CategoriesInput.vue +126 -0
- package/frontend-vue/app/components/CategoryInput.vue +67 -0
- package/frontend-vue/app/components/Editor.vue +63 -0
- package/frontend-vue/app/components/FunnelCard.vue +66 -0
- package/frontend-vue/app/components/HtmlPreviewModal.vue +20 -0
- package/frontend-vue/app/components/NewTemplateModal.vue +158 -0
- package/frontend-vue/app/components/ProviderChip.vue +39 -0
- package/frontend-vue/app/components/SendDrawer.vue +298 -0
- package/frontend-vue/app/components/TemplateCard.vue +127 -0
- package/frontend-vue/app/components/TemplateDrawer.vue +394 -0
- package/frontend-vue/app/components/TemplateGallery.vue +112 -0
- package/frontend-vue/app/components/TemplatePreviewFrame.vue +103 -0
- package/frontend-vue/app/components/TestSendModal.vue +162 -0
- package/frontend-vue/app/components/TokenText.vue +26 -0
- package/frontend-vue/app/components/blocks/Button.vue +19 -0
- package/frontend-vue/app/components/blocks/Code.vue +17 -0
- package/frontend-vue/app/components/blocks/Divider.vue +3 -0
- package/frontend-vue/app/components/blocks/Footer.vue +22 -0
- package/frontend-vue/app/components/blocks/Heading.vue +18 -0
- package/frontend-vue/app/components/blocks/Hero.vue +32 -0
- package/frontend-vue/app/components/blocks/List.vue +33 -0
- package/frontend-vue/app/components/blocks/Paragraph.vue +18 -0
- package/frontend-vue/app/components/blocks/Total.vue +18 -0
- package/frontend-vue/app/components/editor/EditorBlock.vue +121 -0
- package/frontend-vue/app/components/editor/EditorBlockList.vue +44 -0
- package/frontend-vue/app/components/editor/EditorBlockSettings.vue +186 -0
- package/frontend-vue/app/components/editor/EditorCanvas.vue +91 -0
- package/frontend-vue/app/components/editor/EditorConditionFields.vue +88 -0
- package/frontend-vue/app/components/editor/EditorDataPanel.vue +128 -0
- package/frontend-vue/app/components/editor/EditorDraftBar.vue +35 -0
- package/frontend-vue/app/components/editor/EditorIfBlock.vue +120 -0
- package/frontend-vue/app/components/editor/EditorMissingLocale.vue +62 -0
- package/frontend-vue/app/components/editor/EditorPalette.vue +62 -0
- package/frontend-vue/app/components/editor/EditorRail.vue +58 -0
- package/frontend-vue/app/components/editor/EditorSubjectSettings.vue +37 -0
- package/frontend-vue/app/components/editor/EditorTemplateSettings.vue +87 -0
- package/frontend-vue/app/components/editor/EditorTestSendModal.vue +66 -0
- package/frontend-vue/app/components/editor/EditorToolbar.vue +155 -0
- package/frontend-vue/app/components/editor/EditorVariables.vue +163 -0
- package/frontend-vue/app/components/editor/EditorWorkspace.vue +189 -0
- package/frontend-vue/app/composables/useEditorContext.ts +44 -0
- package/frontend-vue/app/composables/useMailingApi.ts +197 -0
- package/frontend-vue/app/composables/useMailingPeriodData.ts +39 -0
- package/frontend-vue/app/composables/useTemplateDrawer.ts +90 -0
- package/frontend-vue/app/composables/useTemplateEditor.ts +228 -0
- package/frontend-vue/app/emails/EmailMailingTemplate.vue +24 -0
- package/frontend-vue/app/emails/components/MailingBlocks.vue +117 -0
- package/frontend-vue/app/plugins/template-gallery-display.client.ts +14 -0
- package/frontend-vue/app/types/component.ts +29 -0
- package/frontend-vue/app/types/mailing.ts +365 -0
- package/frontend-vue/app/utils/blocks/components.ts +14 -0
- package/frontend-vue/app/utils/blocks/dnd.ts +15 -0
- package/frontend-vue/app/utils/blocks/factory.ts +100 -0
- package/frontend-vue/app/utils/blocks/fields.ts +58 -0
- package/frontend-vue/app/utils/blocks/index.ts +5 -0
- package/frontend-vue/app/utils/blocks/tree.ts +74 -0
- package/frontend-vue/app/utils/categories.ts +54 -0
- package/frontend-vue/app/utils/clone.ts +3 -0
- package/frontend-vue/app/utils/conditions.ts +50 -0
- package/frontend-vue/app/utils/editor-route.ts +18 -0
- package/frontend-vue/app/utils/gallery.ts +41 -0
- package/frontend-vue/app/utils/locales.ts +41 -0
- package/frontend-vue/app/utils/paths.ts +84 -0
- package/frontend-vue/app/utils/period.ts +23 -0
- package/frontend-vue/app/utils/testData.ts +10 -0
- package/frontend-vue/app/utils/timeline.ts +68 -0
- package/frontend-vue/app/utils/tokens.ts +24 -0
- package/frontend-vue/app/utils/variables.ts +48 -0
- package/frontend-vue/dms.email.ts +9 -0
- package/frontend-vue/dms.frontend.ts +29 -0
- package/frontend-vue/eslint.config.mjs +13 -0
- package/frontend-vue/i18n/locales/mailing-en-GB.json +397 -0
- package/frontend-vue/i18n/locales/mailing-fr-FR.json +397 -0
- package/frontend-vue/package.json +32 -0
- package/frontend-vue/pnpm-lock.yaml +6446 -0
- package/frontend-vue/pnpm-workspace.yaml +2 -0
- package/frontend-vue/tests/block-components.test.ts +14 -0
- package/frontend-vue/tests/block-fields.test.ts +23 -0
- package/frontend-vue/tests/blocks-factory.test.ts +28 -0
- package/frontend-vue/tests/blocks-tree.test.ts +49 -0
- package/frontend-vue/tests/categories.test.ts +64 -0
- package/frontend-vue/tests/conditions.test.ts +36 -0
- package/frontend-vue/tests/dnd.test.ts +11 -0
- package/frontend-vue/tests/editor-block-list.test.ts +54 -0
- package/frontend-vue/tests/editor-route.test.ts +23 -0
- package/frontend-vue/tests/email-render-cases.json +77 -0
- package/frontend-vue/tests/gallery.test.ts +39 -0
- package/frontend-vue/tests/i18n-editor.test.ts +21 -0
- package/frontend-vue/tests/i18n.test.ts +83 -0
- package/frontend-vue/tests/locales.test.ts +38 -0
- package/frontend-vue/tests/mailing-api.test.ts +10 -0
- package/frontend-vue/tests/paths.test.ts +128 -0
- package/frontend-vue/tests/period.test.ts +13 -0
- package/frontend-vue/tests/smoke.test.ts +8 -0
- package/frontend-vue/tests/template-editor.test.ts +65 -0
- package/frontend-vue/tests/test-data.test.ts +15 -0
- package/frontend-vue/tests/timeline.test.ts +29 -0
- package/frontend-vue/tests/tokens.test.ts +12 -0
- package/frontend-vue/tests/variables.test.ts +46 -0
- package/frontend-vue/vitest.config.ts +10 -0
- package/package.json +94 -0
- package/src/antelope-modules.ts +48 -0
- package/src/automation/email-event-trigger.ts +112 -0
- package/src/automation/index.ts +33 -0
- package/src/automation/send-template-action.ts +100 -0
- package/src/config.ts +15 -0
- package/src/constants.ts +42 -0
- package/src/crons/index.ts +1 -0
- package/src/crons/retention.ts +126 -0
- package/src/data/body.ts +14 -0
- package/src/data/index.ts +3 -0
- package/src/data/sends-table.ts +154 -0
- package/src/data/templates-table.ts +202 -0
- package/src/data-types/categories-type.ts +29 -0
- package/src/data-types/category-type.ts +44 -0
- package/src/data-types/index.ts +2 -0
- package/src/db/index.ts +2 -0
- package/src/db/models/index.ts +4 -0
- package/src/db/models/send-events.model.ts +46 -0
- package/src/db/models/sends.model.ts +147 -0
- package/src/db/models/settings.model.ts +12 -0
- package/src/db/models/templates.model.ts +12 -0
- package/src/db/tables/index.ts +4 -0
- package/src/db/tables/send-events.table.ts +31 -0
- package/src/db/tables/sends.table.ts +85 -0
- package/src/db/tables/settings.table.ts +49 -0
- package/src/db/tables/templates.table.ts +70 -0
- package/src/engine/conditions.ts +30 -0
- package/src/engine/coverage.ts +67 -0
- package/src/engine/fallback-html.ts +116 -0
- package/src/engine/index.ts +7 -0
- package/src/engine/paths.ts +33 -0
- package/src/engine/resolve.ts +178 -0
- package/src/engine/tokens.ts +35 -0
- package/src/engine/walk.ts +18 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/tenant-export.ts +127 -0
- package/src/implementations/dms-mailing/index.ts +2 -0
- package/src/index.ts +62 -0
- package/src/pages/editor.ts +23 -0
- package/src/pages/index.ts +11 -0
- package/src/pages/module.ts +9 -0
- package/src/pages/overview.ts +175 -0
- package/src/pages/sends.ts +174 -0
- package/src/pages/settings/form.ts +67 -0
- package/src/pages/settings/index.ts +2 -0
- package/src/pages/settings/page.ts +34 -0
- package/src/pages/templates.ts +141 -0
- package/src/permissions.ts +44 -0
- package/src/quick-actions.ts +20 -0
- package/src/realtime.ts +53 -0
- package/src/routes/events.ts +57 -0
- package/src/routes/index.ts +7 -0
- package/src/routes/metrics.ts +243 -0
- package/src/routes/period.ts +46 -0
- package/src/routes/provider.ts +31 -0
- package/src/routes/sends.ts +215 -0
- package/src/routes/settings.ts +66 -0
- package/src/routes/templates.ts +256 -0
- package/src/services/attention.ts +151 -0
- package/src/services/categories.ts +43 -0
- package/src/services/events.ts +121 -0
- package/src/services/metrics.ts +175 -0
- package/src/services/notify.ts +90 -0
- package/src/services/permissions.ts +42 -0
- package/src/services/provider.ts +46 -0
- package/src/services/render.ts +33 -0
- package/src/services/send.ts +409 -0
- package/src/services/settings.ts +74 -0
- package/src/services/status.ts +16 -0
- package/src/services/templates.ts +157 -0
- package/src/test/antelope.test.ts +188 -0
- package/src/test/helpers/http.ts +23 -0
- package/src/test/helpers/owner.ts +37 -0
- package/src/test/integration/events.test.ts +136 -0
- package/src/test/integration/retention.test.ts +363 -0
- package/src/test/integration/sends.test.ts +200 -0
- package/src/test/integration/settings.test.ts +50 -0
- package/src/test/integration/setup.test.ts +35 -0
- package/src/test/integration/templates.test.ts +229 -0
- package/src/test/integration/tenant-export.test.ts +125 -0
- package/src/test/unit/attention.test.ts +129 -0
- package/src/test/unit/automation.test.ts +130 -0
- package/src/test/unit/categories.test.ts +51 -0
- package/src/test/unit/engine/conditions.test.ts +35 -0
- package/src/test/unit/engine/coverage.test.ts +118 -0
- package/src/test/unit/engine/fallback-html.test.ts +86 -0
- package/src/test/unit/engine/paths.test.ts +39 -0
- package/src/test/unit/engine/resolve.test.ts +176 -0
- package/src/test/unit/engine/tokens.test.ts +26 -0
- package/src/test/unit/events.test.ts +19 -0
- package/src/test/unit/metrics.test.ts +170 -0
- package/src/test/unit/notify.test.ts +71 -0
- package/src/test/unit/period.test.ts +64 -0
- package/src/test/unit/provider.test.ts +57 -0
- package/src/test/unit/realtime.test.ts +11 -0
- package/src/test/unit/render.test.ts +23 -0
- package/src/test/unit/retention.test.ts +91 -0
- package/src/test/unit/send-batch.test.ts +72 -0
- package/src/test/unit/send.test.ts +161 -0
- package/src/test/unit/smoke.test.ts +8 -0
- package/src/test/unit/status.test.ts +14 -0
- package/src/test/unit/templates.test.ts +52 -0
- package/src/test/unit/tenant-export.test.ts +88 -0
- package/src/test/unit/webhook-secret.test.ts +50 -0
- package/src/types/blocks.ts +31 -0
- package/src/types/index.ts +4 -0
- package/src/types/resolved.ts +89 -0
- package/src/types/sends.ts +44 -0
- package/src/types/settings.ts +24 -0
- package/src/validation/settings.schema.ts +33 -0
- package/src/validation/templates.schema.ts +145 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const hooks_1 = require("@antelopejs/interface-dms/hooks");
|
|
4
|
+
const chai_1 = require("chai");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const hooks_2 = require("../../hooks");
|
|
7
|
+
const tenant_export_1 = require("../../hooks/tenant-export");
|
|
8
|
+
const PAGE_SIZE = 3;
|
|
9
|
+
const EXTRA_ROW = 1;
|
|
10
|
+
const ROW_COUNT = PAGE_SIZE * 2 + EXTRA_ROW;
|
|
11
|
+
const ROWS = Array.from({ length: ROW_COUNT }, (_row, index) => ({ index }));
|
|
12
|
+
function pagedLoader(offsets) {
|
|
13
|
+
return (offset, size) => {
|
|
14
|
+
offsets.push(offset);
|
|
15
|
+
return Promise.resolve(ROWS.slice(offset, offset + size));
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
async function collect(chunks) {
|
|
19
|
+
let text = "";
|
|
20
|
+
for await (const chunk of chunks)
|
|
21
|
+
text += chunk;
|
|
22
|
+
return text;
|
|
23
|
+
}
|
|
24
|
+
describe("[unit] hooks/tenant-export", () => {
|
|
25
|
+
it("contributes to the tenant data export under the module id", () => {
|
|
26
|
+
(0, hooks_2.registerTenantExport)();
|
|
27
|
+
const moduleIds = (0, hooks_1.GetRegisteredHooks)(hooks_1.Hook.TENANT_DATA_EXPORT).map((hook) => hook.moduleId);
|
|
28
|
+
(0, chai_1.expect)(moduleIds).to.include(constants_1.MODULE_ID);
|
|
29
|
+
});
|
|
30
|
+
it("streams a collection as one JSON array read page by page", async () => {
|
|
31
|
+
const offsets = [];
|
|
32
|
+
const signal = new AbortController().signal;
|
|
33
|
+
const text = await collect((0, tenant_export_1.jsonArrayChunks)(pagedLoader(offsets), signal, PAGE_SIZE));
|
|
34
|
+
(0, chai_1.expect)(JSON.parse(text)).to.deep.equal(ROWS);
|
|
35
|
+
(0, chai_1.expect)(offsets).to.deep.equal([0, PAGE_SIZE, PAGE_SIZE * 2]);
|
|
36
|
+
});
|
|
37
|
+
it("streams an empty array when the collection has no row", async () => {
|
|
38
|
+
const signal = new AbortController().signal;
|
|
39
|
+
const text = await collect((0, tenant_export_1.jsonArrayChunks)(() => Promise.resolve([]), signal, PAGE_SIZE));
|
|
40
|
+
(0, chai_1.expect)(JSON.parse(text)).to.deep.equal([]);
|
|
41
|
+
});
|
|
42
|
+
it("stops streaming as soon as the export is aborted", async () => {
|
|
43
|
+
const controller = new AbortController();
|
|
44
|
+
const offsets = [];
|
|
45
|
+
const chunks = (0, tenant_export_1.jsonArrayChunks)(pagedLoader(offsets), controller.signal, PAGE_SIZE);
|
|
46
|
+
await chunks.next();
|
|
47
|
+
controller.abort();
|
|
48
|
+
let aborted = false;
|
|
49
|
+
try {
|
|
50
|
+
await collect(chunks);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
aborted = true;
|
|
54
|
+
}
|
|
55
|
+
(0, chai_1.expect)(aborted).to.equal(true);
|
|
56
|
+
(0, chai_1.expect)(offsets).to.deep.equal([]);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=tenant-export.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant-export.test.js","sourceRoot":"","sources":["../../../src/test/unit/tenant-export.test.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const chai_1 = require("chai");
|
|
4
|
+
const events_1 = require("../../services/events");
|
|
5
|
+
const settings_schema_1 = require("../../validation/settings.schema");
|
|
6
|
+
const VALID_SECRET = "a".repeat(48);
|
|
7
|
+
const settings = (webhookSecret) => ({
|
|
8
|
+
fallbackLocale: "en",
|
|
9
|
+
logRetentionDays: 30,
|
|
10
|
+
blockOnMissingVariables: false,
|
|
11
|
+
senderName: "",
|
|
12
|
+
senderEmail: "",
|
|
13
|
+
replyTo: "",
|
|
14
|
+
webhookSecret,
|
|
15
|
+
categories: [],
|
|
16
|
+
});
|
|
17
|
+
describe("[unit] webhook secret", () => {
|
|
18
|
+
it("refuses every request when no secret is stored", () => {
|
|
19
|
+
(0, chai_1.expect)((0, events_1.webhookSecretMatches)("", "")).to.equal(false);
|
|
20
|
+
(0, chai_1.expect)((0, events_1.webhookSecretMatches)(undefined, "")).to.equal(false);
|
|
21
|
+
(0, chai_1.expect)((0, events_1.webhookSecretMatches)(VALID_SECRET, "")).to.equal(false);
|
|
22
|
+
});
|
|
23
|
+
it("refuses a missing or wrong header against a real secret", () => {
|
|
24
|
+
(0, chai_1.expect)((0, events_1.webhookSecretMatches)(undefined, VALID_SECRET)).to.equal(false);
|
|
25
|
+
(0, chai_1.expect)((0, events_1.webhookSecretMatches)("", VALID_SECRET)).to.equal(false);
|
|
26
|
+
(0, chai_1.expect)((0, events_1.webhookSecretMatches)("b".repeat(48), VALID_SECRET)).to.equal(false);
|
|
27
|
+
(0, chai_1.expect)((0, events_1.webhookSecretMatches)("a".repeat(47), VALID_SECRET)).to.equal(false);
|
|
28
|
+
});
|
|
29
|
+
it("accepts the exact secret", () => {
|
|
30
|
+
(0, chai_1.expect)((0, events_1.webhookSecretMatches)(VALID_SECRET, VALID_SECRET)).to.equal(true);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
describe("[unit] settings validation", () => {
|
|
34
|
+
it("refuses to store a blank webhook secret", () => {
|
|
35
|
+
(0, chai_1.expect)(() => settings_schema_1.settingsSchema.parse(settings(""))).to.throw();
|
|
36
|
+
(0, chai_1.expect)(() => settings_schema_1.settingsSchema.parse(settings("short"))).to.throw();
|
|
37
|
+
});
|
|
38
|
+
it("accepts a secret long enough to be worth guessing", () => {
|
|
39
|
+
(0, chai_1.expect)(settings_schema_1.settingsSchema.parse(settings(VALID_SECRET)).webhookSecret).to.equal(VALID_SECRET);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=webhook-secret.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-secret.test.js","sourceRoot":"","sources":["../../../src/test/unit/webhook-secret.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,kDAA6D;AAC7D,sEAAkE;AAElE,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEpC,MAAM,QAAQ,GAAG,CAAC,aAAqB,EAAE,EAAE,CAAC,CAAC;IAC3C,cAAc,EAAE,IAAI;IACpB,gBAAgB,EAAE,EAAE;IACpB,uBAAuB,EAAE,KAAK;IAC9B,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,EAAE;IACX,aAAa;IACb,UAAU,EAAE,EAAE;CACf,CAAC,CAAC;AAEH,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IAGrC,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACxD,IAAA,aAAM,EAAC,IAAA,6BAAoB,EAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrD,IAAA,aAAM,EAAC,IAAA,6BAAoB,EAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5D,IAAA,aAAM,EAAC,IAAA,6BAAoB,EAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,IAAA,aAAM,EAAC,IAAA,6BAAoB,EAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtE,IAAA,aAAM,EAAC,IAAA,6BAAoB,EAAC,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC/D,IAAA,aAAM,EAAC,IAAA,6BAAoB,EAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC3E,IAAA,aAAM,EAAC,IAAA,6BAAoB,EAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,IAAA,aAAM,EAAC,IAAA,6BAAoB,EAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,gCAAc,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;QAC5D,IAAA,aAAM,EAAC,GAAG,EAAE,CAAC,gCAAc,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,IAAA,aAAM,EAAC,gCAAc,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,KAAK,CACzE,YAAY,CACb,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { Block, BlockBase, BlockType, ButtonBlock, CodeBlock, Condition, ConditionOperator, DividerBlock, FooterBlock, HeadingBlock, HeroBlock, IfBlock, ListBlock, LocaleContent, ParagraphBlock, TemplateContent, TextAlign, TotalBlock, VariableDefinition, VariableType, } from "@antelopejs/interface-dms-mailing";
|
|
2
|
+
export type TemplateStatus = "draft" | "live" | "archived";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"","sources":["../../src/types/blocks.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./blocks"), exports);
|
|
18
|
+
__exportStar(require("./resolved"), exports);
|
|
19
|
+
__exportStar(require("./sends"), exports);
|
|
20
|
+
__exportStar(require("./settings"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { TextAlign } from "./blocks";
|
|
2
|
+
export interface ResolvedListRow {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ResolvedHero {
|
|
7
|
+
id: string;
|
|
8
|
+
type: "hero";
|
|
9
|
+
imageUrl: string;
|
|
10
|
+
alt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ResolvedHeading {
|
|
13
|
+
id: string;
|
|
14
|
+
type: "heading";
|
|
15
|
+
text: string;
|
|
16
|
+
align: TextAlign;
|
|
17
|
+
size: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ResolvedParagraph {
|
|
20
|
+
id: string;
|
|
21
|
+
type: "paragraph";
|
|
22
|
+
text: string;
|
|
23
|
+
align: TextAlign;
|
|
24
|
+
}
|
|
25
|
+
export interface ResolvedCode {
|
|
26
|
+
id: string;
|
|
27
|
+
type: "code";
|
|
28
|
+
text: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ResolvedList {
|
|
31
|
+
id: string;
|
|
32
|
+
type: "list";
|
|
33
|
+
rows: ResolvedListRow[];
|
|
34
|
+
}
|
|
35
|
+
export interface ResolvedTotal {
|
|
36
|
+
id: string;
|
|
37
|
+
type: "total";
|
|
38
|
+
label: string;
|
|
39
|
+
value: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ResolvedButton {
|
|
42
|
+
id: string;
|
|
43
|
+
type: "button";
|
|
44
|
+
text: string;
|
|
45
|
+
href: string;
|
|
46
|
+
align: TextAlign;
|
|
47
|
+
}
|
|
48
|
+
export interface ResolvedDivider {
|
|
49
|
+
id: string;
|
|
50
|
+
type: "divider";
|
|
51
|
+
}
|
|
52
|
+
export interface ResolvedFooter {
|
|
53
|
+
id: string;
|
|
54
|
+
type: "footer";
|
|
55
|
+
text: string;
|
|
56
|
+
unsubscribeLabel: string;
|
|
57
|
+
preferencesLabel: string;
|
|
58
|
+
unsubscribeUrl: string;
|
|
59
|
+
preferencesUrl: string;
|
|
60
|
+
}
|
|
61
|
+
export type ResolvedBlock = ResolvedHero | ResolvedHeading | ResolvedParagraph | ResolvedCode | ResolvedList | ResolvedTotal | ResolvedButton | ResolvedDivider | ResolvedFooter;
|
|
62
|
+
export interface ResolvedEmail {
|
|
63
|
+
subject: string;
|
|
64
|
+
preheader: string;
|
|
65
|
+
blocks: ResolvedBlock[];
|
|
66
|
+
missing: string[];
|
|
67
|
+
hiddenBlockIds: string[];
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolved.js","sourceRoot":"","sources":["../../src/types/resolved.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SendStatus } from "@antelopejs/interface-dms-mailing";
|
|
2
|
+
export type { SendEventType, SendStatus, } from "@antelopejs/interface-dms-mailing";
|
|
3
|
+
export declare const SEND_STATUSES: SendStatus[];
|
|
4
|
+
export declare const PROBLEM_STATUSES: SendStatus[];
|
|
5
|
+
export type SendAudience = "business" | "operational";
|
|
6
|
+
export declare const SEND_AUDIENCE_QUERY_KEY = "audience";
|
|
7
|
+
export declare const BUSINESS_AUDIENCE = "business";
|
|
8
|
+
export declare const OPERATIONAL_AUDIENCE = "operational";
|
|
9
|
+
export interface SendEventDetails {
|
|
10
|
+
url?: string;
|
|
11
|
+
userAgent?: string;
|
|
12
|
+
reason?: string;
|
|
13
|
+
code?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OPERATIONAL_AUDIENCE = exports.BUSINESS_AUDIENCE = exports.SEND_AUDIENCE_QUERY_KEY = exports.PROBLEM_STATUSES = exports.SEND_STATUSES = void 0;
|
|
4
|
+
exports.SEND_STATUSES = [
|
|
5
|
+
"queued",
|
|
6
|
+
"sent",
|
|
7
|
+
"delivered",
|
|
8
|
+
"opened",
|
|
9
|
+
"clicked",
|
|
10
|
+
"bounced",
|
|
11
|
+
"spam",
|
|
12
|
+
"failed",
|
|
13
|
+
"unsubscribed",
|
|
14
|
+
];
|
|
15
|
+
exports.PROBLEM_STATUSES = ["bounced", "failed", "spam"];
|
|
16
|
+
exports.SEND_AUDIENCE_QUERY_KEY = "audience";
|
|
17
|
+
exports.BUSINESS_AUDIENCE = "business";
|
|
18
|
+
exports.OPERATIONAL_AUDIENCE = "operational";
|
|
19
|
+
//# sourceMappingURL=sends.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sends.js","sourceRoot":"","sources":["../../src/types/sends.ts"],"names":[],"mappings":";;;AAYa,QAAA,aAAa,GAAiB;IACzC,QAAQ;IACR,MAAM;IACN,WAAW;IACX,QAAQ;IACR,SAAS;IACT,SAAS;IACT,MAAM;IACN,QAAQ;IACR,cAAc;CACf,CAAC;AAEW,QAAA,gBAAgB,GAAiB,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAS/D,QAAA,uBAAuB,GAAG,UAAU,CAAC;AAErC,QAAA,iBAAiB,GAAG,UAAU,CAAC;AAC/B,QAAA,oBAAoB,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface TemplateCategory {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
}
|
|
6
|
+
export interface MailingSettingsValues {
|
|
7
|
+
fallbackLocale: string;
|
|
8
|
+
logRetentionDays: number;
|
|
9
|
+
blockOnMissingVariables: boolean;
|
|
10
|
+
senderName: string;
|
|
11
|
+
senderEmail: string;
|
|
12
|
+
replyTo: string;
|
|
13
|
+
webhookSecret: string;
|
|
14
|
+
categories: TemplateCategory[];
|
|
15
|
+
}
|
|
16
|
+
export declare const DEFAULT_CATEGORIES: TemplateCategory[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_CATEGORIES = void 0;
|
|
4
|
+
exports.DEFAULT_CATEGORIES = [
|
|
5
|
+
{ id: "orders", label: "Orders", icon: "i-ph-package" },
|
|
6
|
+
{ id: "account", label: "Account & access", icon: "i-ph-lock" },
|
|
7
|
+
{ id: "billing", label: "Billing", icon: "i-ph-file-text" },
|
|
8
|
+
{ id: "marketing", label: "Marketing", icon: "i-ph-sparkle" },
|
|
9
|
+
{ id: "forms", label: "Forms", icon: "i-ph-textbox" },
|
|
10
|
+
];
|
|
11
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/types/settings.ts"],"names":[],"mappings":";;;AAiBa,QAAA,kBAAkB,GAAuB;IACpD,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE;IACvD,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,WAAW,EAAE;IAC/D,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,gBAAgB,EAAE;IAC3D,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE;IAC7D,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE;CACtD,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const categorySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
label: z.ZodString;
|
|
5
|
+
icon: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
}, {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const settingsSchema: z.ZodObject<{
|
|
16
|
+
fallbackLocale: z.ZodString;
|
|
17
|
+
logRetentionDays: z.ZodNumber;
|
|
18
|
+
blockOnMissingVariables: z.ZodBoolean;
|
|
19
|
+
senderName: z.ZodDefault<z.ZodString>;
|
|
20
|
+
senderEmail: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
21
|
+
replyTo: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
22
|
+
webhookSecret: z.ZodString;
|
|
23
|
+
categories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
label: z.ZodString;
|
|
26
|
+
icon: z.ZodString;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
id: string;
|
|
29
|
+
label: string;
|
|
30
|
+
icon: string;
|
|
31
|
+
}, {
|
|
32
|
+
id: string;
|
|
33
|
+
label: string;
|
|
34
|
+
icon: string;
|
|
35
|
+
}>, "many">>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
fallbackLocale: string;
|
|
38
|
+
logRetentionDays: number;
|
|
39
|
+
blockOnMissingVariables: boolean;
|
|
40
|
+
senderName: string;
|
|
41
|
+
senderEmail: string;
|
|
42
|
+
replyTo: string;
|
|
43
|
+
webhookSecret: string;
|
|
44
|
+
categories: {
|
|
45
|
+
id: string;
|
|
46
|
+
label: string;
|
|
47
|
+
icon: string;
|
|
48
|
+
}[];
|
|
49
|
+
}, {
|
|
50
|
+
fallbackLocale: string;
|
|
51
|
+
logRetentionDays: number;
|
|
52
|
+
blockOnMissingVariables: boolean;
|
|
53
|
+
webhookSecret: string;
|
|
54
|
+
senderName?: string | undefined;
|
|
55
|
+
senderEmail?: string | undefined;
|
|
56
|
+
replyTo?: string | undefined;
|
|
57
|
+
categories?: {
|
|
58
|
+
id: string;
|
|
59
|
+
label: string;
|
|
60
|
+
icon: string;
|
|
61
|
+
}[] | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
export type SettingsInput = z.input<typeof settingsSchema>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.settingsSchema = exports.categorySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const MIN_RETENTION_DAYS = 1;
|
|
7
|
+
const MAX_RETENTION_DAYS = 3650;
|
|
8
|
+
const LOCALE_PATTERN = /^[a-z]{2}(-[A-Z]{2})?$/;
|
|
9
|
+
const MIN_WEBHOOK_SECRET_LENGTH = 32;
|
|
10
|
+
exports.categorySchema = zod_1.z.object({
|
|
11
|
+
id: zod_1.z.string().min(1).max(constants_1.MAX_NAME_LENGTH),
|
|
12
|
+
label: zod_1.z.string().min(1).max(constants_1.MAX_NAME_LENGTH),
|
|
13
|
+
icon: zod_1.z.string().min(1),
|
|
14
|
+
});
|
|
15
|
+
exports.settingsSchema = zod_1.z.object({
|
|
16
|
+
fallbackLocale: zod_1.z.string().regex(LOCALE_PATTERN),
|
|
17
|
+
logRetentionDays: zod_1.z
|
|
18
|
+
.number()
|
|
19
|
+
.int()
|
|
20
|
+
.min(MIN_RETENTION_DAYS)
|
|
21
|
+
.max(MAX_RETENTION_DAYS),
|
|
22
|
+
blockOnMissingVariables: zod_1.z.boolean(),
|
|
23
|
+
senderName: zod_1.z.string().max(constants_1.MAX_NAME_LENGTH).default(""),
|
|
24
|
+
senderEmail: zod_1.z.union([zod_1.z.string().email(), zod_1.z.literal("")]).default(""),
|
|
25
|
+
replyTo: zod_1.z.union([zod_1.z.string().email(), zod_1.z.literal("")]).default(""),
|
|
26
|
+
webhookSecret: zod_1.z.string().min(MIN_WEBHOOK_SECRET_LENGTH).max(constants_1.MAX_NAME_LENGTH),
|
|
27
|
+
categories: zod_1.z.array(exports.categorySchema).default([]),
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=settings.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.schema.js","sourceRoot":"","sources":["../../src/validation/settings.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA+C;AAE/C,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAIhD,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAExB,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,2BAAe,CAAC;IAC1C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,2BAAe,CAAC;IAC7C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC;IAChD,gBAAgB,EAAE,OAAC;SAChB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,kBAAkB,CAAC;SACvB,GAAG,CAAC,kBAAkB,CAAC;IAC1B,uBAAuB,EAAE,OAAC,CAAC,OAAO,EAAE;IACpC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,2BAAe,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACvD,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,OAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACrE,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,OAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACjE,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,GAAG,CAAC,2BAAe,CAAC;IAC7E,UAAU,EAAE,OAAC,CAAC,KAAK,CAAC,sBAAc,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAChD,CAAC,CAAC"}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const slugSchema: z.ZodString;
|
|
3
|
+
export declare const createTemplateSchema: z.ZodObject<{
|
|
4
|
+
slug: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
category: z.ZodOptional<z.ZodString>;
|
|
7
|
+
sourceTemplateId: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
slug: string;
|
|
11
|
+
category?: string | undefined;
|
|
12
|
+
sourceTemplateId?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
name: string;
|
|
15
|
+
slug: string;
|
|
16
|
+
category?: string | undefined;
|
|
17
|
+
sourceTemplateId?: string | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const conditionSchema: z.ZodObject<{
|
|
20
|
+
path: z.ZodString;
|
|
21
|
+
operator: z.ZodEnum<["truthy", "falsy", "eq", "ne", "gt", "lt"]>;
|
|
22
|
+
value: z.ZodString;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
value: string;
|
|
25
|
+
path: string;
|
|
26
|
+
operator: "eq" | "ne" | "gt" | "lt" | "truthy" | "falsy";
|
|
27
|
+
}, {
|
|
28
|
+
value: string;
|
|
29
|
+
path: string;
|
|
30
|
+
operator: "eq" | "ne" | "gt" | "lt" | "truthy" | "falsy";
|
|
31
|
+
}>;
|
|
32
|
+
export declare const blockSchema: z.ZodType<unknown>;
|
|
33
|
+
export declare const localeContentSchema: z.ZodObject<{
|
|
34
|
+
subject: z.ZodString;
|
|
35
|
+
preheader: z.ZodString;
|
|
36
|
+
blocks: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
subject: string;
|
|
39
|
+
preheader: string;
|
|
40
|
+
blocks: unknown[];
|
|
41
|
+
}, {
|
|
42
|
+
subject: string;
|
|
43
|
+
preheader: string;
|
|
44
|
+
blocks: unknown[];
|
|
45
|
+
}>;
|
|
46
|
+
export declare const templateContentSchema: z.ZodObject<{
|
|
47
|
+
locales: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
48
|
+
subject: z.ZodString;
|
|
49
|
+
preheader: z.ZodString;
|
|
50
|
+
blocks: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
subject: string;
|
|
53
|
+
preheader: string;
|
|
54
|
+
blocks: unknown[];
|
|
55
|
+
}, {
|
|
56
|
+
subject: string;
|
|
57
|
+
preheader: string;
|
|
58
|
+
blocks: unknown[];
|
|
59
|
+
}>>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
locales: Record<string, {
|
|
62
|
+
subject: string;
|
|
63
|
+
preheader: string;
|
|
64
|
+
blocks: unknown[];
|
|
65
|
+
}>;
|
|
66
|
+
}, {
|
|
67
|
+
locales: Record<string, {
|
|
68
|
+
subject: string;
|
|
69
|
+
preheader: string;
|
|
70
|
+
blocks: unknown[];
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const variableSchema: z.ZodObject<{
|
|
74
|
+
path: z.ZodString;
|
|
75
|
+
type: z.ZodEnum<["string", "text", "number", "money", "date", "url", "boolean", "array"]>;
|
|
76
|
+
required: z.ZodBoolean;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
required: boolean;
|
|
79
|
+
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
80
|
+
path: string;
|
|
81
|
+
}, {
|
|
82
|
+
required: boolean;
|
|
83
|
+
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
84
|
+
path: string;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const variablesSchema: z.ZodObject<{
|
|
87
|
+
variables: z.ZodArray<z.ZodObject<{
|
|
88
|
+
path: z.ZodString;
|
|
89
|
+
type: z.ZodEnum<["string", "text", "number", "money", "date", "url", "boolean", "array"]>;
|
|
90
|
+
required: z.ZodBoolean;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
required: boolean;
|
|
93
|
+
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
94
|
+
path: string;
|
|
95
|
+
}, {
|
|
96
|
+
required: boolean;
|
|
97
|
+
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
98
|
+
path: string;
|
|
99
|
+
}>, "many">;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
variables: {
|
|
102
|
+
required: boolean;
|
|
103
|
+
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
104
|
+
path: string;
|
|
105
|
+
}[];
|
|
106
|
+
}, {
|
|
107
|
+
variables: {
|
|
108
|
+
required: boolean;
|
|
109
|
+
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
110
|
+
path: string;
|
|
111
|
+
}[];
|
|
112
|
+
}>;
|
|
113
|
+
export declare const testDataSchema: z.ZodObject<{
|
|
114
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
data: Record<string, unknown>;
|
|
117
|
+
}, {
|
|
118
|
+
data: Record<string, unknown>;
|
|
119
|
+
}>;
|
|
120
|
+
export declare const previewSchema: z.ZodObject<{
|
|
121
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
122
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
locales: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
124
|
+
subject: z.ZodString;
|
|
125
|
+
preheader: z.ZodString;
|
|
126
|
+
blocks: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
subject: string;
|
|
129
|
+
preheader: string;
|
|
130
|
+
blocks: unknown[];
|
|
131
|
+
}, {
|
|
132
|
+
subject: string;
|
|
133
|
+
preheader: string;
|
|
134
|
+
blocks: unknown[];
|
|
135
|
+
}>>;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
locales: Record<string, {
|
|
138
|
+
subject: string;
|
|
139
|
+
preheader: string;
|
|
140
|
+
blocks: unknown[];
|
|
141
|
+
}>;
|
|
142
|
+
}, {
|
|
143
|
+
locales: Record<string, {
|
|
144
|
+
subject: string;
|
|
145
|
+
preheader: string;
|
|
146
|
+
blocks: unknown[];
|
|
147
|
+
}>;
|
|
148
|
+
}>>;
|
|
149
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
data?: Record<string, unknown> | undefined;
|
|
152
|
+
content?: {
|
|
153
|
+
locales: Record<string, {
|
|
154
|
+
subject: string;
|
|
155
|
+
preheader: string;
|
|
156
|
+
blocks: unknown[];
|
|
157
|
+
}>;
|
|
158
|
+
} | undefined;
|
|
159
|
+
locale?: string | undefined;
|
|
160
|
+
}, {
|
|
161
|
+
data?: Record<string, unknown> | undefined;
|
|
162
|
+
content?: {
|
|
163
|
+
locales: Record<string, {
|
|
164
|
+
subject: string;
|
|
165
|
+
preheader: string;
|
|
166
|
+
blocks: unknown[];
|
|
167
|
+
}>;
|
|
168
|
+
} | undefined;
|
|
169
|
+
locale?: string | undefined;
|
|
170
|
+
}>;
|
|
171
|
+
export declare const realSendSchema: z.ZodObject<{
|
|
172
|
+
to: z.ZodArray<z.ZodString, "many">;
|
|
173
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
174
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
to: string[];
|
|
177
|
+
data?: Record<string, unknown> | undefined;
|
|
178
|
+
locale?: string | undefined;
|
|
179
|
+
}, {
|
|
180
|
+
to: string[];
|
|
181
|
+
data?: Record<string, unknown> | undefined;
|
|
182
|
+
locale?: string | undefined;
|
|
183
|
+
}>;
|
|
184
|
+
export declare const testSendSchema: z.ZodObject<{
|
|
185
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
186
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
187
|
+
locales: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
188
|
+
subject: z.ZodString;
|
|
189
|
+
preheader: z.ZodString;
|
|
190
|
+
blocks: z.ZodArray<z.ZodType<unknown, z.ZodTypeDef, unknown>, "many">;
|
|
191
|
+
}, "strip", z.ZodTypeAny, {
|
|
192
|
+
subject: string;
|
|
193
|
+
preheader: string;
|
|
194
|
+
blocks: unknown[];
|
|
195
|
+
}, {
|
|
196
|
+
subject: string;
|
|
197
|
+
preheader: string;
|
|
198
|
+
blocks: unknown[];
|
|
199
|
+
}>>;
|
|
200
|
+
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
locales: Record<string, {
|
|
202
|
+
subject: string;
|
|
203
|
+
preheader: string;
|
|
204
|
+
blocks: unknown[];
|
|
205
|
+
}>;
|
|
206
|
+
}, {
|
|
207
|
+
locales: Record<string, {
|
|
208
|
+
subject: string;
|
|
209
|
+
preheader: string;
|
|
210
|
+
blocks: unknown[];
|
|
211
|
+
}>;
|
|
212
|
+
}>>;
|
|
213
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
214
|
+
} & {
|
|
215
|
+
to: z.ZodArray<z.ZodString, "many">;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
to: string[];
|
|
218
|
+
data?: Record<string, unknown> | undefined;
|
|
219
|
+
content?: {
|
|
220
|
+
locales: Record<string, {
|
|
221
|
+
subject: string;
|
|
222
|
+
preheader: string;
|
|
223
|
+
blocks: unknown[];
|
|
224
|
+
}>;
|
|
225
|
+
} | undefined;
|
|
226
|
+
locale?: string | undefined;
|
|
227
|
+
}, {
|
|
228
|
+
to: string[];
|
|
229
|
+
data?: Record<string, unknown> | undefined;
|
|
230
|
+
content?: {
|
|
231
|
+
locales: Record<string, {
|
|
232
|
+
subject: string;
|
|
233
|
+
preheader: string;
|
|
234
|
+
blocks: unknown[];
|
|
235
|
+
}>;
|
|
236
|
+
} | undefined;
|
|
237
|
+
locale?: string | undefined;
|
|
238
|
+
}>;
|
|
239
|
+
export declare const duplicateSchema: z.ZodObject<{
|
|
240
|
+
slug: z.ZodString;
|
|
241
|
+
name: z.ZodString;
|
|
242
|
+
}, "strip", z.ZodTypeAny, {
|
|
243
|
+
name: string;
|
|
244
|
+
slug: string;
|
|
245
|
+
}, {
|
|
246
|
+
name: string;
|
|
247
|
+
slug: string;
|
|
248
|
+
}>;
|