@open-mercato/webhooks 0.6.8-develop.7065.1.b7b351a126 → 0.6.8-develop.7066.1.6bfa9ff69f

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.
@@ -2,6 +2,7 @@ const notificationTypes = [
2
2
  {
3
3
  type: "webhooks.delivery.failed",
4
4
  module: "webhooks",
5
+ labelKey: "webhooks.notifications.delivery.failed.label",
5
6
  titleKey: "webhooks.notifications.delivery.failed.title",
6
7
  bodyKey: "webhooks.notifications.delivery.failed.body",
7
8
  icon: "webhook",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/modules/webhooks/notifications.ts"],
4
- "sourcesContent": ["import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/notifications/types'\n\nexport const notificationTypes: NotificationTypeDefinition[] = [\n {\n type: 'webhooks.delivery.failed',\n module: 'webhooks',\n titleKey: 'webhooks.notifications.delivery.failed.title',\n bodyKey: 'webhooks.notifications.delivery.failed.body',\n icon: 'webhook',\n severity: 'error',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/webhooks/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/webhooks/{sourceEntityId}',\n expiresAfterHours: 168,\n },\n]\n\nexport default notificationTypes\n"],
5
- "mappings": "AAEO,MAAM,oBAAkD;AAAA,EAC7D;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,mBAAmB;AAAA,EACrB;AACF;AAEA,IAAO,wBAAQ;",
4
+ "sourcesContent": ["import type { NotificationTypeDefinition } from '@open-mercato/shared/modules/notifications/types'\n\nexport const notificationTypes: NotificationTypeDefinition[] = [\n {\n type: 'webhooks.delivery.failed',\n module: 'webhooks',\n labelKey: 'webhooks.notifications.delivery.failed.label',\n titleKey: 'webhooks.notifications.delivery.failed.title',\n bodyKey: 'webhooks.notifications.delivery.failed.body',\n icon: 'webhook',\n severity: 'error',\n actions: [\n {\n id: 'view',\n labelKey: 'common.view',\n variant: 'outline',\n href: '/backend/webhooks/{sourceEntityId}',\n icon: 'external-link',\n },\n ],\n linkHref: '/backend/webhooks/{sourceEntityId}',\n expiresAfterHours: 168,\n },\n]\n\nexport default notificationTypes\n"],
5
+ "mappings": "AAEO,MAAM,oBAAkD;AAAA,EAC7D;AAAA,IACE,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,IAAI;AAAA,QACJ,UAAU;AAAA,QACV,SAAS;AAAA,QACT,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,mBAAmB;AAAA,EACrB;AACF;AAEA,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/webhooks",
3
- "version": "0.6.8-develop.7065.1.b7b351a126",
3
+ "version": "0.6.8-develop.7066.1.6bfa9ff69f",
4
4
  "license": "MIT",
5
5
  "description": "Webhooks module for Open Mercato — Standard Webhooks compliant outbound/inbound delivery",
6
6
  "type": "module",
@@ -70,19 +70,19 @@
70
70
  }
71
71
  },
72
72
  "dependencies": {
73
- "@open-mercato/core": "0.6.8-develop.7065.1.b7b351a126",
74
- "@open-mercato/queue": "0.6.8-develop.7065.1.b7b351a126",
75
- "@open-mercato/ui": "0.6.8-develop.7065.1.b7b351a126",
73
+ "@open-mercato/core": "0.6.8-develop.7066.1.6bfa9ff69f",
74
+ "@open-mercato/queue": "0.6.8-develop.7066.1.6bfa9ff69f",
75
+ "@open-mercato/ui": "0.6.8-develop.7066.1.6bfa9ff69f",
76
76
  "svix": "^1.99.1"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "@mikro-orm/postgresql": "^7.0.14",
80
- "@open-mercato/shared": "0.6.8-develop.7065.1.b7b351a126",
80
+ "@open-mercato/shared": "0.6.8-develop.7066.1.6bfa9ff69f",
81
81
  "react": "^19.0.0",
82
82
  "react-dom": "^19.0.0"
83
83
  },
84
84
  "devDependencies": {
85
- "@open-mercato/shared": "0.6.8-develop.7065.1.b7b351a126",
85
+ "@open-mercato/shared": "0.6.8-develop.7066.1.6bfa9ff69f",
86
86
  "@types/jest": "^30.0.0",
87
87
  "@types/react": "^19.2.17",
88
88
  "@types/react-dom": "^19.2.3",
@@ -0,0 +1,27 @@
1
+ import de from '../i18n/de.json'
2
+ import en from '../i18n/en.json'
3
+ import es from '../i18n/es.json'
4
+ import ko from '../i18n/ko.json'
5
+ import pl from '../i18n/pl.json'
6
+ import { notificationTypes } from '../notifications'
7
+
8
+ const dictionaries: Record<string, Record<string, string>> = { de, en, es, ko, pl }
9
+
10
+ describe('webhook notification catalogue', () => {
11
+ it('uses a static delivery-failure label in every locale', () => {
12
+ const deliveryFailed = notificationTypes.find((definition) => definition.type === 'webhooks.delivery.failed')
13
+
14
+ expect(deliveryFailed).toMatchObject({
15
+ labelKey: 'webhooks.notifications.delivery.failed.label',
16
+ titleKey: 'webhooks.notifications.delivery.failed.title',
17
+ })
18
+ expect(deliveryFailed?.labelKey).not.toBe(deliveryFailed?.titleKey)
19
+
20
+ for (const dictionary of Object.values(dictionaries)) {
21
+ const label = dictionary[deliveryFailed?.labelKey ?? '']
22
+ expect(label).toBeDefined()
23
+ expect(label).not.toMatch(/\{[^}]+\}/)
24
+ expect(label).not.toBe(deliveryFailed?.labelKey)
25
+ }
26
+ })
27
+ })
@@ -158,5 +158,6 @@
158
158
  "webhooks.nav.group": "Integrations",
159
159
  "webhooks.nav.title": "Webhooks",
160
160
  "webhooks.notifications.delivery.failed.body": "Webhook {webhookName} konnte das Ereignis {eventType} nicht zustellen. {errorMessage}",
161
+ "webhooks.notifications.delivery.failed.label": "Webhook-Zustellung fehlgeschlagen",
161
162
  "webhooks.notifications.delivery.failed.title": "Webhook-Zustellung für {webhookName} fehlgeschlagen"
162
163
  }
@@ -158,5 +158,6 @@
158
158
  "webhooks.nav.group": "Integrations",
159
159
  "webhooks.nav.title": "Webhooks",
160
160
  "webhooks.notifications.delivery.failed.body": "Webhook {webhookName} could not deliver event {eventType}. {errorMessage}",
161
+ "webhooks.notifications.delivery.failed.label": "Webhook delivery failed",
161
162
  "webhooks.notifications.delivery.failed.title": "Webhook delivery failed for {webhookName}"
162
163
  }
@@ -158,5 +158,6 @@
158
158
  "webhooks.nav.group": "Integrations",
159
159
  "webhooks.nav.title": "Webhooks",
160
160
  "webhooks.notifications.delivery.failed.body": "El webhook {webhookName} no pudo entregar el evento {eventType}. {errorMessage}",
161
+ "webhooks.notifications.delivery.failed.label": "La entrega del webhook falló",
161
162
  "webhooks.notifications.delivery.failed.title": "La entrega del webhook falló para {webhookName}"
162
163
  }
@@ -158,5 +158,6 @@
158
158
  "webhooks.nav.group": "통합",
159
159
  "webhooks.nav.title": "웹훅",
160
160
  "webhooks.notifications.delivery.failed.body": "웹훅 {webhookName}이(가) 이벤트 {eventType}을(를) 전달하지 못했습니다. {errorMessage}",
161
+ "webhooks.notifications.delivery.failed.label": "웹훅 전달 실패",
161
162
  "webhooks.notifications.delivery.failed.title": "{webhookName}의 웹훅 전달 실패"
162
163
  }
@@ -158,5 +158,6 @@
158
158
  "webhooks.nav.group": "Integracje",
159
159
  "webhooks.nav.title": "Webhooki",
160
160
  "webhooks.notifications.delivery.failed.body": "Webhook {webhookName} nie mógł dostarczyć zdarzenia {eventType}. {errorMessage}",
161
+ "webhooks.notifications.delivery.failed.label": "Dostawa webhooka nie powiodła się",
161
162
  "webhooks.notifications.delivery.failed.title": "Dostawa webhooka nie powiodła się dla {webhookName}"
162
163
  }
@@ -4,6 +4,7 @@ export const notificationTypes: NotificationTypeDefinition[] = [
4
4
  {
5
5
  type: 'webhooks.delivery.failed',
6
6
  module: 'webhooks',
7
+ labelKey: 'webhooks.notifications.delivery.failed.label',
7
8
  titleKey: 'webhooks.notifications.delivery.failed.title',
8
9
  bodyKey: 'webhooks.notifications.delivery.failed.body',
9
10
  icon: 'webhook',