@contractspec/module.notifications 3.7.5 → 3.7.7

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.
@@ -63,96 +63,96 @@ var init_en = __esm(() => {
63
63
  });
64
64
  });
65
65
 
66
- // src/i18n/catalogs/fr.ts
66
+ // src/i18n/catalogs/es.ts
67
67
  import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
68
- var frMessages;
69
- var init_fr = __esm(() => {
70
- frMessages = defineTranslation2({
68
+ var esMessages;
69
+ var init_es = __esm(() => {
70
+ esMessages = defineTranslation2({
71
71
  meta: {
72
72
  key: "notifications.messages",
73
73
  version: "1.0.0",
74
74
  domain: "notifications",
75
- description: "Template and channel strings (French)",
75
+ description: "Template and channel strings (Spanish)",
76
76
  owners: ["platform"],
77
77
  stability: "experimental"
78
78
  },
79
- locale: "fr",
79
+ locale: "es",
80
80
  fallback: "en",
81
81
  messages: {
82
82
  "template.welcome.name": {
83
- value: "Bienvenue",
83
+ value: "Bienvenida",
84
84
  description: "Welcome template display name"
85
85
  },
86
86
  "template.welcome.description": {
87
- value: "Envoy\xE9 lorsqu'un utilisateur s'inscrit.",
87
+ value: "Enviado cuando un usuario se registra.",
88
88
  description: "Welcome template description"
89
89
  },
90
90
  "template.orgInvite.name": {
91
- value: "Invitation \xE0 l'organisation",
91
+ value: "Invitaci\xF3n a la organizaci\xF3n",
92
92
  description: "Org invite template display name"
93
93
  },
94
94
  "template.orgInvite.description": {
95
- value: "Envoy\xE9 lorsqu'un utilisateur est invit\xE9 \xE0 une organisation.",
95
+ value: "Enviado cuando un usuario es invitado a una organizaci\xF3n.",
96
96
  description: "Org invite template description"
97
97
  },
98
98
  "template.mention.name": {
99
- value: "Mention",
99
+ value: "Menci\xF3n",
100
100
  description: "Mention template display name"
101
101
  },
102
102
  "template.mention.description": {
103
- value: "Envoy\xE9 lorsqu'un utilisateur est mentionn\xE9.",
103
+ value: "Enviado cuando un usuario es mencionado.",
104
104
  description: "Mention template description"
105
105
  },
106
106
  "channel.webhook.noUrl": {
107
- value: "Aucune URL de webhook configur\xE9e",
107
+ value: "No se ha configurado una URL de webhook",
108
108
  description: "Error when webhook channel has no URL"
109
109
  }
110
110
  }
111
111
  });
112
112
  });
113
113
 
114
- // src/i18n/catalogs/es.ts
114
+ // src/i18n/catalogs/fr.ts
115
115
  import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
116
- var esMessages;
117
- var init_es = __esm(() => {
118
- esMessages = defineTranslation3({
116
+ var frMessages;
117
+ var init_fr = __esm(() => {
118
+ frMessages = defineTranslation3({
119
119
  meta: {
120
120
  key: "notifications.messages",
121
121
  version: "1.0.0",
122
122
  domain: "notifications",
123
- description: "Template and channel strings (Spanish)",
123
+ description: "Template and channel strings (French)",
124
124
  owners: ["platform"],
125
125
  stability: "experimental"
126
126
  },
127
- locale: "es",
127
+ locale: "fr",
128
128
  fallback: "en",
129
129
  messages: {
130
130
  "template.welcome.name": {
131
- value: "Bienvenida",
131
+ value: "Bienvenue",
132
132
  description: "Welcome template display name"
133
133
  },
134
134
  "template.welcome.description": {
135
- value: "Enviado cuando un usuario se registra.",
135
+ value: "Envoy\xE9 lorsqu'un utilisateur s'inscrit.",
136
136
  description: "Welcome template description"
137
137
  },
138
138
  "template.orgInvite.name": {
139
- value: "Invitaci\xF3n a la organizaci\xF3n",
139
+ value: "Invitation \xE0 l'organisation",
140
140
  description: "Org invite template display name"
141
141
  },
142
142
  "template.orgInvite.description": {
143
- value: "Enviado cuando un usuario es invitado a una organizaci\xF3n.",
143
+ value: "Envoy\xE9 lorsqu'un utilisateur est invit\xE9 \xE0 une organisation.",
144
144
  description: "Org invite template description"
145
145
  },
146
146
  "template.mention.name": {
147
- value: "Menci\xF3n",
147
+ value: "Mention",
148
148
  description: "Mention template display name"
149
149
  },
150
150
  "template.mention.description": {
151
- value: "Enviado cuando un usuario es mencionado.",
151
+ value: "Envoy\xE9 lorsqu'un utilisateur est mentionn\xE9.",
152
152
  description: "Mention template description"
153
153
  },
154
154
  "channel.webhook.noUrl": {
155
- value: "No se ha configurado una URL de webhook",
155
+ value: "Aucune URL de webhook configur\xE9e",
156
156
  description: "Error when webhook channel has no URL"
157
157
  }
158
158
  }
@@ -172,8 +172,8 @@ import {
172
172
  var factory, createNotificationsI18n, getDefaultI18n, resetI18nRegistry;
173
173
  var init_messages = __esm(() => {
174
174
  init_en();
175
- init_fr();
176
175
  init_es();
176
+ init_fr();
177
177
  factory = createI18nFactory({
178
178
  specKey: "notifications.messages",
179
179
  catalogs: [enMessages, frMessages, esMessages]
@@ -183,14 +183,6 @@ var init_messages = __esm(() => {
183
183
  resetI18nRegistry = factory.resetRegistry;
184
184
  });
185
185
 
186
- // src/i18n/locale.ts
187
- import {
188
- DEFAULT_LOCALE,
189
- SUPPORTED_LOCALES,
190
- resolveLocale,
191
- isSupportedLocale
192
- } from "@contractspec/lib.contracts-spec/translations";
193
-
194
186
  // src/i18n/keys.ts
195
187
  var TEMPLATE_KEYS = {
196
188
  "template.welcome.name": "template.welcome.name",
@@ -208,11 +200,19 @@ var I18N_KEYS = {
208
200
  ...CHANNEL_KEYS
209
201
  };
210
202
 
203
+ // src/i18n/locale.ts
204
+ import {
205
+ DEFAULT_LOCALE,
206
+ isSupportedLocale,
207
+ resolveLocale,
208
+ SUPPORTED_LOCALES
209
+ } from "@contractspec/lib.contracts-spec/translations";
210
+
211
211
  // src/i18n/index.ts
212
- init_messages();
213
212
  init_en();
214
- init_fr();
215
213
  init_es();
214
+ init_fr();
215
+ init_messages();
216
216
  export {
217
217
  resolveLocale,
218
218
  resetI18nRegistry,
@@ -5,4 +5,4 @@
5
5
  *
6
6
  * @module i18n/locale
7
7
  */
8
- export { DEFAULT_LOCALE, SUPPORTED_LOCALES, resolveLocale, isSupportedLocale, type SupportedLocale, } from '@contractspec/lib.contracts-spec/translations';
8
+ export { DEFAULT_LOCALE, isSupportedLocale, resolveLocale, SUPPORTED_LOCALES, type SupportedLocale, } from '@contractspec/lib.contracts-spec/translations';
@@ -18,9 +18,9 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
18
18
  // src/i18n/locale.ts
19
19
  import {
20
20
  DEFAULT_LOCALE,
21
- SUPPORTED_LOCALES,
21
+ isSupportedLocale,
22
22
  resolveLocale,
23
- isSupportedLocale
23
+ SUPPORTED_LOCALES
24
24
  } from "@contractspec/lib.contracts-spec/translations";
25
25
  export {
26
26
  resolveLocale,
@@ -63,96 +63,96 @@ var init_en = __esm(() => {
63
63
  });
64
64
  });
65
65
 
66
- // src/i18n/catalogs/fr.ts
66
+ // src/i18n/catalogs/es.ts
67
67
  import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
68
- var frMessages;
69
- var init_fr = __esm(() => {
70
- frMessages = defineTranslation2({
68
+ var esMessages;
69
+ var init_es = __esm(() => {
70
+ esMessages = defineTranslation2({
71
71
  meta: {
72
72
  key: "notifications.messages",
73
73
  version: "1.0.0",
74
74
  domain: "notifications",
75
- description: "Template and channel strings (French)",
75
+ description: "Template and channel strings (Spanish)",
76
76
  owners: ["platform"],
77
77
  stability: "experimental"
78
78
  },
79
- locale: "fr",
79
+ locale: "es",
80
80
  fallback: "en",
81
81
  messages: {
82
82
  "template.welcome.name": {
83
- value: "Bienvenue",
83
+ value: "Bienvenida",
84
84
  description: "Welcome template display name"
85
85
  },
86
86
  "template.welcome.description": {
87
- value: "Envoy\xE9 lorsqu'un utilisateur s'inscrit.",
87
+ value: "Enviado cuando un usuario se registra.",
88
88
  description: "Welcome template description"
89
89
  },
90
90
  "template.orgInvite.name": {
91
- value: "Invitation \xE0 l'organisation",
91
+ value: "Invitaci\xF3n a la organizaci\xF3n",
92
92
  description: "Org invite template display name"
93
93
  },
94
94
  "template.orgInvite.description": {
95
- value: "Envoy\xE9 lorsqu'un utilisateur est invit\xE9 \xE0 une organisation.",
95
+ value: "Enviado cuando un usuario es invitado a una organizaci\xF3n.",
96
96
  description: "Org invite template description"
97
97
  },
98
98
  "template.mention.name": {
99
- value: "Mention",
99
+ value: "Menci\xF3n",
100
100
  description: "Mention template display name"
101
101
  },
102
102
  "template.mention.description": {
103
- value: "Envoy\xE9 lorsqu'un utilisateur est mentionn\xE9.",
103
+ value: "Enviado cuando un usuario es mencionado.",
104
104
  description: "Mention template description"
105
105
  },
106
106
  "channel.webhook.noUrl": {
107
- value: "Aucune URL de webhook configur\xE9e",
107
+ value: "No se ha configurado una URL de webhook",
108
108
  description: "Error when webhook channel has no URL"
109
109
  }
110
110
  }
111
111
  });
112
112
  });
113
113
 
114
- // src/i18n/catalogs/es.ts
114
+ // src/i18n/catalogs/fr.ts
115
115
  import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
116
- var esMessages;
117
- var init_es = __esm(() => {
118
- esMessages = defineTranslation3({
116
+ var frMessages;
117
+ var init_fr = __esm(() => {
118
+ frMessages = defineTranslation3({
119
119
  meta: {
120
120
  key: "notifications.messages",
121
121
  version: "1.0.0",
122
122
  domain: "notifications",
123
- description: "Template and channel strings (Spanish)",
123
+ description: "Template and channel strings (French)",
124
124
  owners: ["platform"],
125
125
  stability: "experimental"
126
126
  },
127
- locale: "es",
127
+ locale: "fr",
128
128
  fallback: "en",
129
129
  messages: {
130
130
  "template.welcome.name": {
131
- value: "Bienvenida",
131
+ value: "Bienvenue",
132
132
  description: "Welcome template display name"
133
133
  },
134
134
  "template.welcome.description": {
135
- value: "Enviado cuando un usuario se registra.",
135
+ value: "Envoy\xE9 lorsqu'un utilisateur s'inscrit.",
136
136
  description: "Welcome template description"
137
137
  },
138
138
  "template.orgInvite.name": {
139
- value: "Invitaci\xF3n a la organizaci\xF3n",
139
+ value: "Invitation \xE0 l'organisation",
140
140
  description: "Org invite template display name"
141
141
  },
142
142
  "template.orgInvite.description": {
143
- value: "Enviado cuando un usuario es invitado a una organizaci\xF3n.",
143
+ value: "Envoy\xE9 lorsqu'un utilisateur est invit\xE9 \xE0 une organisation.",
144
144
  description: "Org invite template description"
145
145
  },
146
146
  "template.mention.name": {
147
- value: "Menci\xF3n",
147
+ value: "Mention",
148
148
  description: "Mention template display name"
149
149
  },
150
150
  "template.mention.description": {
151
- value: "Enviado cuando un usuario es mencionado.",
151
+ value: "Envoy\xE9 lorsqu'un utilisateur est mentionn\xE9.",
152
152
  description: "Mention template description"
153
153
  },
154
154
  "channel.webhook.noUrl": {
155
- value: "No se ha configurado una URL de webhook",
155
+ value: "Aucune URL de webhook configur\xE9e",
156
156
  description: "Error when webhook channel has no URL"
157
157
  }
158
158
  }
@@ -172,8 +172,8 @@ import {
172
172
  var factory, createNotificationsI18n, getDefaultI18n, resetI18nRegistry;
173
173
  var init_messages = __esm(() => {
174
174
  init_en();
175
- init_fr();
176
175
  init_es();
176
+ init_fr();
177
177
  factory = createI18nFactory({
178
178
  specKey: "notifications.messages",
179
179
  catalogs: [enMessages, frMessages, esMessages]
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './entities';
2
- export * from './contracts';
3
1
  export * from './channels';
4
- export * from './templates';
2
+ export * from './contracts';
3
+ export * from './entities';
5
4
  export * from './notifications.feature';
5
+ export * from './templates';
package/dist/index.js CHANGED
@@ -63,96 +63,96 @@ var init_en = __esm(() => {
63
63
  });
64
64
  });
65
65
 
66
- // src/i18n/catalogs/fr.ts
66
+ // src/i18n/catalogs/es.ts
67
67
  import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
68
- var frMessages;
69
- var init_fr = __esm(() => {
70
- frMessages = defineTranslation2({
68
+ var esMessages;
69
+ var init_es = __esm(() => {
70
+ esMessages = defineTranslation2({
71
71
  meta: {
72
72
  key: "notifications.messages",
73
73
  version: "1.0.0",
74
74
  domain: "notifications",
75
- description: "Template and channel strings (French)",
75
+ description: "Template and channel strings (Spanish)",
76
76
  owners: ["platform"],
77
77
  stability: "experimental"
78
78
  },
79
- locale: "fr",
79
+ locale: "es",
80
80
  fallback: "en",
81
81
  messages: {
82
82
  "template.welcome.name": {
83
- value: "Bienvenue",
83
+ value: "Bienvenida",
84
84
  description: "Welcome template display name"
85
85
  },
86
86
  "template.welcome.description": {
87
- value: "Envoy\xE9 lorsqu'un utilisateur s'inscrit.",
87
+ value: "Enviado cuando un usuario se registra.",
88
88
  description: "Welcome template description"
89
89
  },
90
90
  "template.orgInvite.name": {
91
- value: "Invitation \xE0 l'organisation",
91
+ value: "Invitaci\xF3n a la organizaci\xF3n",
92
92
  description: "Org invite template display name"
93
93
  },
94
94
  "template.orgInvite.description": {
95
- value: "Envoy\xE9 lorsqu'un utilisateur est invit\xE9 \xE0 une organisation.",
95
+ value: "Enviado cuando un usuario es invitado a una organizaci\xF3n.",
96
96
  description: "Org invite template description"
97
97
  },
98
98
  "template.mention.name": {
99
- value: "Mention",
99
+ value: "Menci\xF3n",
100
100
  description: "Mention template display name"
101
101
  },
102
102
  "template.mention.description": {
103
- value: "Envoy\xE9 lorsqu'un utilisateur est mentionn\xE9.",
103
+ value: "Enviado cuando un usuario es mencionado.",
104
104
  description: "Mention template description"
105
105
  },
106
106
  "channel.webhook.noUrl": {
107
- value: "Aucune URL de webhook configur\xE9e",
107
+ value: "No se ha configurado una URL de webhook",
108
108
  description: "Error when webhook channel has no URL"
109
109
  }
110
110
  }
111
111
  });
112
112
  });
113
113
 
114
- // src/i18n/catalogs/es.ts
114
+ // src/i18n/catalogs/fr.ts
115
115
  import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
116
- var esMessages;
117
- var init_es = __esm(() => {
118
- esMessages = defineTranslation3({
116
+ var frMessages;
117
+ var init_fr = __esm(() => {
118
+ frMessages = defineTranslation3({
119
119
  meta: {
120
120
  key: "notifications.messages",
121
121
  version: "1.0.0",
122
122
  domain: "notifications",
123
- description: "Template and channel strings (Spanish)",
123
+ description: "Template and channel strings (French)",
124
124
  owners: ["platform"],
125
125
  stability: "experimental"
126
126
  },
127
- locale: "es",
127
+ locale: "fr",
128
128
  fallback: "en",
129
129
  messages: {
130
130
  "template.welcome.name": {
131
- value: "Bienvenida",
131
+ value: "Bienvenue",
132
132
  description: "Welcome template display name"
133
133
  },
134
134
  "template.welcome.description": {
135
- value: "Enviado cuando un usuario se registra.",
135
+ value: "Envoy\xE9 lorsqu'un utilisateur s'inscrit.",
136
136
  description: "Welcome template description"
137
137
  },
138
138
  "template.orgInvite.name": {
139
- value: "Invitaci\xF3n a la organizaci\xF3n",
139
+ value: "Invitation \xE0 l'organisation",
140
140
  description: "Org invite template display name"
141
141
  },
142
142
  "template.orgInvite.description": {
143
- value: "Enviado cuando un usuario es invitado a una organizaci\xF3n.",
143
+ value: "Envoy\xE9 lorsqu'un utilisateur est invit\xE9 \xE0 une organisation.",
144
144
  description: "Org invite template description"
145
145
  },
146
146
  "template.mention.name": {
147
- value: "Menci\xF3n",
147
+ value: "Mention",
148
148
  description: "Mention template display name"
149
149
  },
150
150
  "template.mention.description": {
151
- value: "Enviado cuando un usuario es mencionado.",
151
+ value: "Envoy\xE9 lorsqu'un utilisateur est mentionn\xE9.",
152
152
  description: "Mention template description"
153
153
  },
154
154
  "channel.webhook.noUrl": {
155
- value: "No se ha configurado una URL de webhook",
155
+ value: "Aucune URL de webhook configur\xE9e",
156
156
  description: "Error when webhook channel has no URL"
157
157
  }
158
158
  }
@@ -172,8 +172,8 @@ import {
172
172
  var factory, createNotificationsI18n, getDefaultI18n, resetI18nRegistry;
173
173
  var init_messages = __esm(() => {
174
174
  init_en();
175
- init_fr();
176
175
  init_es();
176
+ init_fr();
177
177
  factory = createI18nFactory({
178
178
  specKey: "notifications.messages",
179
179
  catalogs: [enMessages, frMessages, esMessages]
@@ -308,9 +308,9 @@ function createChannelRegistry() {
308
308
  // src/contracts/index.ts
309
309
  import { defineCommand, defineQuery } from "@contractspec/lib.contracts-spec";
310
310
  import {
311
- ScalarTypeEnum,
312
311
  defineEnum,
313
- defineSchemaModel
312
+ defineSchemaModel,
313
+ ScalarTypeEnum
314
314
  } from "@contractspec/lib.schema";
315
315
  var OWNERS = ["platform.notifications"];
316
316
  var NotificationStatusSchemaEnum = defineEnum("NotificationStatus", [
@@ -843,6 +843,38 @@ var notificationsSchemaContribution = {
843
843
  ]
844
844
  };
845
845
 
846
+ // src/notifications.feature.ts
847
+ import { defineFeature } from "@contractspec/lib.contracts-spec";
848
+ var NotificationsFeature = defineFeature({
849
+ meta: {
850
+ key: "notifications",
851
+ title: "Notifications",
852
+ description: "Multi-channel notification delivery with preference management",
853
+ domain: "platform",
854
+ version: "1.0.0",
855
+ owners: ["@platform.notifications"],
856
+ tags: ["notifications", "email", "push", "in-app"],
857
+ stability: "stable"
858
+ },
859
+ operations: [
860
+ { key: "notifications.send", version: "1.0.0" },
861
+ { key: "notifications.markRead", version: "1.0.0" },
862
+ { key: "notifications.markAllRead", version: "1.0.0" },
863
+ { key: "notifications.delete", version: "1.0.0" },
864
+ { key: "notifications.list", version: "1.0.0" },
865
+ { key: "notifications.preferences.update", version: "1.0.0" },
866
+ { key: "notifications.preferences.get", version: "1.0.0" }
867
+ ],
868
+ events: [],
869
+ presentations: [],
870
+ opToPresentation: [],
871
+ presentationsTargets: [],
872
+ capabilities: {
873
+ provides: [{ key: "notifications", version: "1.0.0" }],
874
+ requires: [{ key: "identity", version: "1.0.0" }]
875
+ }
876
+ });
877
+
846
878
  // src/templates/index.ts
847
879
  function defineTemplate(def) {
848
880
  return def;
@@ -1070,38 +1102,6 @@ var MentionTemplate = defineTemplate({
1070
1102
  }
1071
1103
  }
1072
1104
  });
1073
-
1074
- // src/notifications.feature.ts
1075
- import { defineFeature } from "@contractspec/lib.contracts-spec";
1076
- var NotificationsFeature = defineFeature({
1077
- meta: {
1078
- key: "notifications",
1079
- title: "Notifications",
1080
- description: "Multi-channel notification delivery with preference management",
1081
- domain: "platform",
1082
- version: "1.0.0",
1083
- owners: ["@platform.notifications"],
1084
- tags: ["notifications", "email", "push", "in-app"],
1085
- stability: "stable"
1086
- },
1087
- operations: [
1088
- { key: "notifications.send", version: "1.0.0" },
1089
- { key: "notifications.markRead", version: "1.0.0" },
1090
- { key: "notifications.markAllRead", version: "1.0.0" },
1091
- { key: "notifications.delete", version: "1.0.0" },
1092
- { key: "notifications.list", version: "1.0.0" },
1093
- { key: "notifications.preferences.update", version: "1.0.0" },
1094
- { key: "notifications.preferences.get", version: "1.0.0" }
1095
- ],
1096
- events: [],
1097
- presentations: [],
1098
- opToPresentation: [],
1099
- presentationsTargets: [],
1100
- capabilities: {
1101
- provides: [{ key: "notifications", version: "1.0.0" }],
1102
- requires: [{ key: "identity", version: "1.0.0" }]
1103
- }
1104
- });
1105
1105
  export {
1106
1106
  renderTemplate,
1107
1107
  renderNotificationTemplate,