Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Declared the email template events in the event catalog

Damian Legawieca063c42ad71e
diff --git a/packages/dashboard/src/locales/ar.json b/packages/dashboard/src/locales/ar.json
index f10ecd457e..05a53c5255 100644
--- a/packages/dashboard/src/locales/ar.json
+++ b/packages/dashboard/src/locales/ar.json
@@ -4000,6 +4000,7 @@
"digital": "Digital",
"digital_asset": "أصل رقمي",
"digital_link": "رابط رقمي",
+ "email_template": "قوالب البريد الإلكتروني",
"exchange": "استبدال",
"export": "تصدير",
"fulfillment": "التنفيذ",
diff --git a/packages/dashboard/src/locales/de.json b/packages/dashboard/src/locales/de.json
index a81adcd4a0..fae35e0690 100644
--- a/packages/dashboard/src/locales/de.json
+++ b/packages/dashboard/src/locales/de.json
@@ -3972,6 +3972,7 @@
"digital": "Digital",
"digital_asset": "Digitales Asset",
"digital_link": "Digitaler Link",
+ "email_template": "E-Mail-Vorlagen",
"exchange": "Umtausch",
"export": "Export",
"fulfillment": "Fulfillment",
diff --git a/packages/dashboard/src/locales/en.json b/packages/dashboard/src/locales/en.json
index 98debccf49..ea6fbb846f 100644
--- a/packages/dashboard/src/locales/en.json
+++ b/packages/dashboard/src/locales/en.json
@@ -3972,6 +3972,7 @@
"digital": "Digital",
"digital_asset": "Digital asset",
"digital_link": "Digital link",
+ "email_template": "Email templates",
"exchange": "Exchange",
"export": "Export",
"fulfillment": "Fulfillment",
diff --git a/packages/dashboard/src/locales/es.json b/packages/dashboard/src/locales/es.json
index 5b994a8219..772cfa6ba9 100644
--- a/packages/dashboard/src/locales/es.json
+++ b/packages/dashboard/src/locales/es.json
@@ -617,6 +617,7 @@
"digital": "Digital",
"digital_asset": "Recurso digital",
"digital_link": "Enlace digital",
+ "email_template": "Plantillas de correo",
"exchange": "Cambio",
"export": "Exportación",
"fulfillment": "Cumplimiento",
diff --git a/packages/dashboard/src/locales/fr.json b/packages/dashboard/src/locales/fr.json
index 1b46ed4fb9..2f217731a6 100644
--- a/packages/dashboard/src/locales/fr.json
+++ b/packages/dashboard/src/locales/fr.json
@@ -3972,6 +3972,7 @@
"digital": "Numérique",
"digital_asset": "Ressource numérique",
"digital_link": "Lien numérique",
+ "email_template": "Modèles d'e-mail",
"exchange": "Échange",
"export": "Export",
"fulfillment": "Traitement des commandes",
diff --git a/packages/dashboard/src/locales/pl.json b/packages/dashboard/src/locales/pl.json
index a600fe4d11..6f138a8961 100644
--- a/packages/dashboard/src/locales/pl.json
+++ b/packages/dashboard/src/locales/pl.json
@@ -4020,6 +4020,7 @@
"digital": "Cyfrowy",
"digital_asset": "Zasób cyfrowy",
"digital_link": "Link cyfrowy",
+ "email_template": "Szablony e-maili",
"exchange": "Wymiana",
"export": "Eksport",
"fulfillment": "Realizacja",
diff --git a/packages/dashboard/src/locales/zh-CN.json b/packages/dashboard/src/locales/zh-CN.json
index 4e8bd551d2..b238af5781 100644
--- a/packages/dashboard/src/locales/zh-CN.json
+++ b/packages/dashboard/src/locales/zh-CN.json
@@ -3962,6 +3962,7 @@
"digital": "数字内容",
"digital_asset": "数字资产",
"digital_link": "数字链接",
+ "email_template": "邮件模板",
"exchange": "换货",
"export": "导出",
"fulfillment": "履约",
diff --git a/packages/sdk/src/webhooks/generated/events.ts b/packages/sdk/src/webhooks/generated/events.ts
index 045023c34c..c12ccebfbe 100644
--- a/packages/sdk/src/webhooks/generated/events.ts
+++ b/packages/sdk/src/webhooks/generated/events.ts
@@ -110,6 +110,8 @@ export interface WebhookEventMap {
'digital_link.deleted': DigitalLink
'digital_link.downloaded': DigitalLink
'digital_link.updated': DigitalLink
+ 'email_template.published': WebhookRecordReference
+ 'email_template.reverted': WebhookRecordReference
'exchange.approved': Exchange
'exchange.canceled': Exchange
'exchange.created': Exchange
diff --git a/packages/sdk/src/webhooks/generated/schemas.ts b/packages/sdk/src/webhooks/generated/schemas.ts
index b155952849..a412b3479c 100644
--- a/packages/sdk/src/webhooks/generated/schemas.ts
+++ b/packages/sdk/src/webhooks/generated/schemas.ts
@@ -101,6 +101,8 @@ type WebhookEventName =
| 'digital_link.deleted'
| 'digital_link.downloaded'
| 'digital_link.updated'
+ | 'email_template.published'
+ | 'email_template.reverted'
| 'exchange.approved'
| 'exchange.canceled'
| 'exchange.created'
@@ -353,6 +355,8 @@ export const webhookEventSchemas: Readonly<Record<WebhookEventName, z.ZodType>>
'digital_link.deleted': DigitalLinkSchema,
'digital_link.downloaded': DigitalLinkSchema,
'digital_link.updated': DigitalLinkSchema,
+ 'email_template.published': WebhookRecordReferenceSchema,
+ 'email_template.reverted': WebhookRecordReferenceSchema,
'exchange.approved': ExchangeSchema,
'exchange.canceled': ExchangeSchema,
'exchange.created': ExchangeSchema,
diff --git a/spree/core/app/models/spree/email_template.rb b/spree/core/app/models/spree/email_template.rb
index e97be228ea..c48ad7c543 100644
--- a/spree/core/app/models/spree/email_template.rb
+++ b/spree/core/app/models/spree/email_template.rb
@@ -12,6 +12,8 @@ module Spree
has_status :published, :reverted, default: :published
+ publishes_events :published, :reverted
+
acted_by :published_by
acted_by :reverted_by