@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.
- package/README.md +65 -109
- package/dist/browser/channels/index.js +27 -27
- package/dist/browser/contracts/index.js +2 -2
- package/dist/browser/i18n/catalogs/index.js +27 -27
- package/dist/browser/i18n/index.js +37 -37
- package/dist/browser/i18n/locale.js +2 -2
- package/dist/browser/i18n/messages.js +27 -27
- package/dist/browser/index.js +61 -61
- package/dist/channels/index.js +27 -27
- package/dist/contracts/index.js +2 -2
- package/dist/i18n/catalogs/index.d.ts +1 -1
- package/dist/i18n/catalogs/index.js +27 -27
- package/dist/i18n/index.d.ts +7 -7
- package/dist/i18n/index.js +37 -37
- package/dist/i18n/locale.d.ts +1 -1
- package/dist/i18n/locale.js +2 -2
- package/dist/i18n/messages.js +27 -27
- package/dist/index.d.ts +3 -3
- package/dist/index.js +61 -61
- package/dist/node/channels/index.js +27 -27
- package/dist/node/contracts/index.js +2 -2
- package/dist/node/i18n/catalogs/index.js +27 -27
- package/dist/node/i18n/index.js +37 -37
- package/dist/node/i18n/locale.js +2 -2
- package/dist/node/i18n/messages.js +27 -27
- package/dist/node/index.js +61 -61
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,121 +1,77 @@
|
|
|
1
1
|
# @contractspec/module.notifications
|
|
2
2
|
|
|
3
|
-
Website: https://contractspec.io
|
|
3
|
+
Website: https://contractspec.io
|
|
4
4
|
|
|
5
|
+
**Notification center module for ContractSpec applications.**
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
## What It Provides
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
- **Layer**: module.
|
|
10
|
+
- **Consumers**: bundles (library, contractspec-studio), apps (web-landing).
|
|
11
|
+
- `src/contracts/` contains contract specs, operations, entities, and registry exports.
|
|
12
|
+
- Related ContractSpec packages include `@contractspec/lib.bus`, `@contractspec/lib.contracts-spec`, `@contractspec/lib.schema`, `@contractspec/tool.bun`, `@contractspec/tool.typescript`.
|
|
13
|
+
- `src/contracts/` contains contract specs, operations, entities, and registry exports.
|
|
9
14
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Features
|
|
15
|
+
## Installation
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
- **User Preferences**: Per-user notification preferences by type and channel
|
|
16
|
-
- **Templates**: Template-based notifications with variable substitution
|
|
17
|
-
- **Delivery Tracking**: Track delivery status and read receipts
|
|
18
|
-
- **Batching**: Digest and batch notifications to reduce noise
|
|
17
|
+
`npm install @contractspec/module.notifications`
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
or
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
bun add @contractspec/module.notifications
|
|
24
|
-
```
|
|
21
|
+
`bun add @contractspec/module.notifications`
|
|
25
22
|
|
|
26
23
|
## Usage
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
inApp: {
|
|
83
|
-
title: 'Welcome to {{appName}}!',
|
|
84
|
-
body: 'Click here to complete your profile.',
|
|
85
|
-
actionUrl: '{{actionUrl}}',
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### User Preferences
|
|
92
|
-
|
|
93
|
-
```typescript
|
|
94
|
-
// Get user preferences
|
|
95
|
-
const prefs = await service.getPreferences('user-123');
|
|
96
|
-
|
|
97
|
-
// Update preferences
|
|
98
|
-
await service.updatePreferences('user-123', {
|
|
99
|
-
email: { marketing: false, transactional: true },
|
|
100
|
-
push: { mentions: true, updates: false },
|
|
101
|
-
});
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
## Entity Overview
|
|
105
|
-
|
|
106
|
-
| Entity | Description |
|
|
107
|
-
|--------|-------------|
|
|
108
|
-
| Notification | Individual notification instance |
|
|
109
|
-
| NotificationTemplate | Notification templates |
|
|
110
|
-
| NotificationPreference | User notification preferences |
|
|
111
|
-
| DeliveryLog | Delivery attempt tracking |
|
|
112
|
-
|
|
113
|
-
## Channels
|
|
114
|
-
|
|
115
|
-
| Channel | Description |
|
|
116
|
-
|---------|-------------|
|
|
117
|
-
| email | Email delivery (SMTP, SendGrid, etc.) |
|
|
118
|
-
| inApp | In-application notifications |
|
|
119
|
-
| push | Push notifications (FCM, APNs) |
|
|
120
|
-
| webhook | Webhook delivery for integrations |
|
|
121
|
-
|
|
25
|
+
Import the root entrypoint from `@contractspec/module.notifications`, or choose a documented subpath when you only need one part of the package surface.
|
|
26
|
+
|
|
27
|
+
## Architecture
|
|
28
|
+
|
|
29
|
+
- `src/channels` is part of the package's public or composition surface.
|
|
30
|
+
- `src/contracts/` contains contract specs, operations, entities, and registry exports.
|
|
31
|
+
- `src/entities/` contains domain entities and value objects.
|
|
32
|
+
- `src/i18n` is part of the package's public or composition surface.
|
|
33
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
34
|
+
- `src/notifications.capability.ts` defines a capability surface.
|
|
35
|
+
- `src/notifications.feature.ts` defines a feature entrypoint.
|
|
36
|
+
|
|
37
|
+
## Public Entry Points
|
|
38
|
+
|
|
39
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
40
|
+
- Export `./channels` resolves through `./src/channels/index.ts`.
|
|
41
|
+
- Export `./contracts` resolves through `./src/contracts/index.ts`.
|
|
42
|
+
- Export `./entities` resolves through `./src/entities/index.ts`.
|
|
43
|
+
- Export `./i18n` resolves through `./src/i18n/index.ts`.
|
|
44
|
+
- Export `./i18n/catalogs` resolves through `./src/i18n/catalogs/index.ts`.
|
|
45
|
+
- Export `./i18n/catalogs/en` resolves through `./src/i18n/catalogs/en.ts`.
|
|
46
|
+
- Export `./i18n/catalogs/es` resolves through `./src/i18n/catalogs/es.ts`.
|
|
47
|
+
- Export `./i18n/catalogs/fr` resolves through `./src/i18n/catalogs/fr.ts`.
|
|
48
|
+
- Export `./i18n/keys` resolves through `./src/i18n/keys.ts`.
|
|
49
|
+
- The package publishes 15 total export subpaths; keep docs aligned with `package.json`.
|
|
50
|
+
|
|
51
|
+
## Local Commands
|
|
52
|
+
|
|
53
|
+
- `bun run dev` — contractspec-bun-build dev
|
|
54
|
+
- `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
|
|
55
|
+
- `bun run test` — bun test
|
|
56
|
+
- `bun run lint` — bun lint:fix
|
|
57
|
+
- `bun run lint:check` — biome check .
|
|
58
|
+
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
|
|
59
|
+
- `bun run typecheck` — tsc --noEmit
|
|
60
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
61
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
62
|
+
- `bun run clean` — rimraf dist .turbo
|
|
63
|
+
- `bun run build:bundle` — contractspec-bun-build transpile
|
|
64
|
+
- `bun run build:types` — contractspec-bun-build types
|
|
65
|
+
- `bun run prebuild` — contractspec-bun-build prebuild
|
|
66
|
+
|
|
67
|
+
## Recent Updates
|
|
68
|
+
|
|
69
|
+
- Replace eslint+prettier by biomejs to optimize speed.
|
|
70
|
+
- Fix small issues.
|
|
71
|
+
- Add full i18n support across all 10 packages (en/fr/es, 460 keys).
|
|
72
|
+
|
|
73
|
+
## Notes
|
|
74
|
+
|
|
75
|
+
- Depends on `lib.bus` for event dispatch -- channel adapters must not send directly.
|
|
76
|
+
- i18n catalogs must stay in sync across all supported locales (en, es, fr).
|
|
77
|
+
- Templates are the single source for notification content; do not inline message strings.
|
|
@@ -62,96 +62,96 @@ var init_en = __esm(() => {
|
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
// src/i18n/catalogs/
|
|
65
|
+
// src/i18n/catalogs/es.ts
|
|
66
66
|
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
|
|
67
|
+
var esMessages;
|
|
68
|
+
var init_es = __esm(() => {
|
|
69
|
+
esMessages = defineTranslation2({
|
|
70
70
|
meta: {
|
|
71
71
|
key: "notifications.messages",
|
|
72
72
|
version: "1.0.0",
|
|
73
73
|
domain: "notifications",
|
|
74
|
-
description: "Template and channel strings (
|
|
74
|
+
description: "Template and channel strings (Spanish)",
|
|
75
75
|
owners: ["platform"],
|
|
76
76
|
stability: "experimental"
|
|
77
77
|
},
|
|
78
|
-
locale: "
|
|
78
|
+
locale: "es",
|
|
79
79
|
fallback: "en",
|
|
80
80
|
messages: {
|
|
81
81
|
"template.welcome.name": {
|
|
82
|
-
value: "
|
|
82
|
+
value: "Bienvenida",
|
|
83
83
|
description: "Welcome template display name"
|
|
84
84
|
},
|
|
85
85
|
"template.welcome.description": {
|
|
86
|
-
value: "
|
|
86
|
+
value: "Enviado cuando un usuario se registra.",
|
|
87
87
|
description: "Welcome template description"
|
|
88
88
|
},
|
|
89
89
|
"template.orgInvite.name": {
|
|
90
|
-
value: "
|
|
90
|
+
value: "Invitación a la organización",
|
|
91
91
|
description: "Org invite template display name"
|
|
92
92
|
},
|
|
93
93
|
"template.orgInvite.description": {
|
|
94
|
-
value: "
|
|
94
|
+
value: "Enviado cuando un usuario es invitado a una organización.",
|
|
95
95
|
description: "Org invite template description"
|
|
96
96
|
},
|
|
97
97
|
"template.mention.name": {
|
|
98
|
-
value: "
|
|
98
|
+
value: "Mención",
|
|
99
99
|
description: "Mention template display name"
|
|
100
100
|
},
|
|
101
101
|
"template.mention.description": {
|
|
102
|
-
value: "
|
|
102
|
+
value: "Enviado cuando un usuario es mencionado.",
|
|
103
103
|
description: "Mention template description"
|
|
104
104
|
},
|
|
105
105
|
"channel.webhook.noUrl": {
|
|
106
|
-
value: "
|
|
106
|
+
value: "No se ha configurado una URL de webhook",
|
|
107
107
|
description: "Error when webhook channel has no URL"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
// src/i18n/catalogs/
|
|
113
|
+
// src/i18n/catalogs/fr.ts
|
|
114
114
|
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
|
|
115
|
+
var frMessages;
|
|
116
|
+
var init_fr = __esm(() => {
|
|
117
|
+
frMessages = defineTranslation3({
|
|
118
118
|
meta: {
|
|
119
119
|
key: "notifications.messages",
|
|
120
120
|
version: "1.0.0",
|
|
121
121
|
domain: "notifications",
|
|
122
|
-
description: "Template and channel strings (
|
|
122
|
+
description: "Template and channel strings (French)",
|
|
123
123
|
owners: ["platform"],
|
|
124
124
|
stability: "experimental"
|
|
125
125
|
},
|
|
126
|
-
locale: "
|
|
126
|
+
locale: "fr",
|
|
127
127
|
fallback: "en",
|
|
128
128
|
messages: {
|
|
129
129
|
"template.welcome.name": {
|
|
130
|
-
value: "
|
|
130
|
+
value: "Bienvenue",
|
|
131
131
|
description: "Welcome template display name"
|
|
132
132
|
},
|
|
133
133
|
"template.welcome.description": {
|
|
134
|
-
value: "
|
|
134
|
+
value: "Envoyé lorsqu'un utilisateur s'inscrit.",
|
|
135
135
|
description: "Welcome template description"
|
|
136
136
|
},
|
|
137
137
|
"template.orgInvite.name": {
|
|
138
|
-
value: "
|
|
138
|
+
value: "Invitation à l'organisation",
|
|
139
139
|
description: "Org invite template display name"
|
|
140
140
|
},
|
|
141
141
|
"template.orgInvite.description": {
|
|
142
|
-
value: "
|
|
142
|
+
value: "Envoyé lorsqu'un utilisateur est invité à une organisation.",
|
|
143
143
|
description: "Org invite template description"
|
|
144
144
|
},
|
|
145
145
|
"template.mention.name": {
|
|
146
|
-
value: "
|
|
146
|
+
value: "Mention",
|
|
147
147
|
description: "Mention template display name"
|
|
148
148
|
},
|
|
149
149
|
"template.mention.description": {
|
|
150
|
-
value: "
|
|
150
|
+
value: "Envoyé lorsqu'un utilisateur est mentionné.",
|
|
151
151
|
description: "Mention template description"
|
|
152
152
|
},
|
|
153
153
|
"channel.webhook.noUrl": {
|
|
154
|
-
value: "
|
|
154
|
+
value: "Aucune URL de webhook configurée",
|
|
155
155
|
description: "Error when webhook channel has no URL"
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -171,8 +171,8 @@ import {
|
|
|
171
171
|
var factory, createNotificationsI18n, getDefaultI18n, resetI18nRegistry;
|
|
172
172
|
var init_messages = __esm(() => {
|
|
173
173
|
init_en();
|
|
174
|
-
init_fr();
|
|
175
174
|
init_es();
|
|
175
|
+
init_fr();
|
|
176
176
|
factory = createI18nFactory({
|
|
177
177
|
specKey: "notifications.messages",
|
|
178
178
|
catalogs: [enMessages, frMessages, esMessages]
|
|
@@ -17,9 +17,9 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
17
17
|
// src/contracts/index.ts
|
|
18
18
|
import { defineCommand, defineQuery } from "@contractspec/lib.contracts-spec";
|
|
19
19
|
import {
|
|
20
|
-
ScalarTypeEnum,
|
|
21
20
|
defineEnum,
|
|
22
|
-
defineSchemaModel
|
|
21
|
+
defineSchemaModel,
|
|
22
|
+
ScalarTypeEnum
|
|
23
23
|
} from "@contractspec/lib.schema";
|
|
24
24
|
var OWNERS = ["platform.notifications"];
|
|
25
25
|
var NotificationStatusSchemaEnum = defineEnum("NotificationStatus", [
|
|
@@ -62,96 +62,96 @@ var init_en = __esm(() => {
|
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
// src/i18n/catalogs/
|
|
65
|
+
// src/i18n/catalogs/es.ts
|
|
66
66
|
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
|
|
67
|
+
var esMessages;
|
|
68
|
+
var init_es = __esm(() => {
|
|
69
|
+
esMessages = defineTranslation2({
|
|
70
70
|
meta: {
|
|
71
71
|
key: "notifications.messages",
|
|
72
72
|
version: "1.0.0",
|
|
73
73
|
domain: "notifications",
|
|
74
|
-
description: "Template and channel strings (
|
|
74
|
+
description: "Template and channel strings (Spanish)",
|
|
75
75
|
owners: ["platform"],
|
|
76
76
|
stability: "experimental"
|
|
77
77
|
},
|
|
78
|
-
locale: "
|
|
78
|
+
locale: "es",
|
|
79
79
|
fallback: "en",
|
|
80
80
|
messages: {
|
|
81
81
|
"template.welcome.name": {
|
|
82
|
-
value: "
|
|
82
|
+
value: "Bienvenida",
|
|
83
83
|
description: "Welcome template display name"
|
|
84
84
|
},
|
|
85
85
|
"template.welcome.description": {
|
|
86
|
-
value: "
|
|
86
|
+
value: "Enviado cuando un usuario se registra.",
|
|
87
87
|
description: "Welcome template description"
|
|
88
88
|
},
|
|
89
89
|
"template.orgInvite.name": {
|
|
90
|
-
value: "
|
|
90
|
+
value: "Invitación a la organización",
|
|
91
91
|
description: "Org invite template display name"
|
|
92
92
|
},
|
|
93
93
|
"template.orgInvite.description": {
|
|
94
|
-
value: "
|
|
94
|
+
value: "Enviado cuando un usuario es invitado a una organización.",
|
|
95
95
|
description: "Org invite template description"
|
|
96
96
|
},
|
|
97
97
|
"template.mention.name": {
|
|
98
|
-
value: "
|
|
98
|
+
value: "Mención",
|
|
99
99
|
description: "Mention template display name"
|
|
100
100
|
},
|
|
101
101
|
"template.mention.description": {
|
|
102
|
-
value: "
|
|
102
|
+
value: "Enviado cuando un usuario es mencionado.",
|
|
103
103
|
description: "Mention template description"
|
|
104
104
|
},
|
|
105
105
|
"channel.webhook.noUrl": {
|
|
106
|
-
value: "
|
|
106
|
+
value: "No se ha configurado una URL de webhook",
|
|
107
107
|
description: "Error when webhook channel has no URL"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
// src/i18n/catalogs/
|
|
113
|
+
// src/i18n/catalogs/fr.ts
|
|
114
114
|
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
|
|
115
|
+
var frMessages;
|
|
116
|
+
var init_fr = __esm(() => {
|
|
117
|
+
frMessages = defineTranslation3({
|
|
118
118
|
meta: {
|
|
119
119
|
key: "notifications.messages",
|
|
120
120
|
version: "1.0.0",
|
|
121
121
|
domain: "notifications",
|
|
122
|
-
description: "Template and channel strings (
|
|
122
|
+
description: "Template and channel strings (French)",
|
|
123
123
|
owners: ["platform"],
|
|
124
124
|
stability: "experimental"
|
|
125
125
|
},
|
|
126
|
-
locale: "
|
|
126
|
+
locale: "fr",
|
|
127
127
|
fallback: "en",
|
|
128
128
|
messages: {
|
|
129
129
|
"template.welcome.name": {
|
|
130
|
-
value: "
|
|
130
|
+
value: "Bienvenue",
|
|
131
131
|
description: "Welcome template display name"
|
|
132
132
|
},
|
|
133
133
|
"template.welcome.description": {
|
|
134
|
-
value: "
|
|
134
|
+
value: "Envoyé lorsqu'un utilisateur s'inscrit.",
|
|
135
135
|
description: "Welcome template description"
|
|
136
136
|
},
|
|
137
137
|
"template.orgInvite.name": {
|
|
138
|
-
value: "
|
|
138
|
+
value: "Invitation à l'organisation",
|
|
139
139
|
description: "Org invite template display name"
|
|
140
140
|
},
|
|
141
141
|
"template.orgInvite.description": {
|
|
142
|
-
value: "
|
|
142
|
+
value: "Envoyé lorsqu'un utilisateur est invité à une organisation.",
|
|
143
143
|
description: "Org invite template description"
|
|
144
144
|
},
|
|
145
145
|
"template.mention.name": {
|
|
146
|
-
value: "
|
|
146
|
+
value: "Mention",
|
|
147
147
|
description: "Mention template display name"
|
|
148
148
|
},
|
|
149
149
|
"template.mention.description": {
|
|
150
|
-
value: "
|
|
150
|
+
value: "Envoyé lorsqu'un utilisateur est mentionné.",
|
|
151
151
|
description: "Mention template description"
|
|
152
152
|
},
|
|
153
153
|
"channel.webhook.noUrl": {
|
|
154
|
-
value: "
|
|
154
|
+
value: "Aucune URL de webhook configurée",
|
|
155
155
|
description: "Error when webhook channel has no URL"
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -160,8 +160,8 @@ var init_es = __esm(() => {
|
|
|
160
160
|
|
|
161
161
|
// src/i18n/catalogs/index.ts
|
|
162
162
|
init_en();
|
|
163
|
-
init_fr();
|
|
164
163
|
init_es();
|
|
164
|
+
init_fr();
|
|
165
165
|
export {
|
|
166
166
|
frMessages,
|
|
167
167
|
esMessages,
|
|
@@ -62,96 +62,96 @@ var init_en = __esm(() => {
|
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
// src/i18n/catalogs/
|
|
65
|
+
// src/i18n/catalogs/es.ts
|
|
66
66
|
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
67
|
-
var
|
|
68
|
-
var
|
|
69
|
-
|
|
67
|
+
var esMessages;
|
|
68
|
+
var init_es = __esm(() => {
|
|
69
|
+
esMessages = defineTranslation2({
|
|
70
70
|
meta: {
|
|
71
71
|
key: "notifications.messages",
|
|
72
72
|
version: "1.0.0",
|
|
73
73
|
domain: "notifications",
|
|
74
|
-
description: "Template and channel strings (
|
|
74
|
+
description: "Template and channel strings (Spanish)",
|
|
75
75
|
owners: ["platform"],
|
|
76
76
|
stability: "experimental"
|
|
77
77
|
},
|
|
78
|
-
locale: "
|
|
78
|
+
locale: "es",
|
|
79
79
|
fallback: "en",
|
|
80
80
|
messages: {
|
|
81
81
|
"template.welcome.name": {
|
|
82
|
-
value: "
|
|
82
|
+
value: "Bienvenida",
|
|
83
83
|
description: "Welcome template display name"
|
|
84
84
|
},
|
|
85
85
|
"template.welcome.description": {
|
|
86
|
-
value: "
|
|
86
|
+
value: "Enviado cuando un usuario se registra.",
|
|
87
87
|
description: "Welcome template description"
|
|
88
88
|
},
|
|
89
89
|
"template.orgInvite.name": {
|
|
90
|
-
value: "
|
|
90
|
+
value: "Invitación a la organización",
|
|
91
91
|
description: "Org invite template display name"
|
|
92
92
|
},
|
|
93
93
|
"template.orgInvite.description": {
|
|
94
|
-
value: "
|
|
94
|
+
value: "Enviado cuando un usuario es invitado a una organización.",
|
|
95
95
|
description: "Org invite template description"
|
|
96
96
|
},
|
|
97
97
|
"template.mention.name": {
|
|
98
|
-
value: "
|
|
98
|
+
value: "Mención",
|
|
99
99
|
description: "Mention template display name"
|
|
100
100
|
},
|
|
101
101
|
"template.mention.description": {
|
|
102
|
-
value: "
|
|
102
|
+
value: "Enviado cuando un usuario es mencionado.",
|
|
103
103
|
description: "Mention template description"
|
|
104
104
|
},
|
|
105
105
|
"channel.webhook.noUrl": {
|
|
106
|
-
value: "
|
|
106
|
+
value: "No se ha configurado una URL de webhook",
|
|
107
107
|
description: "Error when webhook channel has no URL"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
// src/i18n/catalogs/
|
|
113
|
+
// src/i18n/catalogs/fr.ts
|
|
114
114
|
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
|
|
115
|
+
var frMessages;
|
|
116
|
+
var init_fr = __esm(() => {
|
|
117
|
+
frMessages = defineTranslation3({
|
|
118
118
|
meta: {
|
|
119
119
|
key: "notifications.messages",
|
|
120
120
|
version: "1.0.0",
|
|
121
121
|
domain: "notifications",
|
|
122
|
-
description: "Template and channel strings (
|
|
122
|
+
description: "Template and channel strings (French)",
|
|
123
123
|
owners: ["platform"],
|
|
124
124
|
stability: "experimental"
|
|
125
125
|
},
|
|
126
|
-
locale: "
|
|
126
|
+
locale: "fr",
|
|
127
127
|
fallback: "en",
|
|
128
128
|
messages: {
|
|
129
129
|
"template.welcome.name": {
|
|
130
|
-
value: "
|
|
130
|
+
value: "Bienvenue",
|
|
131
131
|
description: "Welcome template display name"
|
|
132
132
|
},
|
|
133
133
|
"template.welcome.description": {
|
|
134
|
-
value: "
|
|
134
|
+
value: "Envoyé lorsqu'un utilisateur s'inscrit.",
|
|
135
135
|
description: "Welcome template description"
|
|
136
136
|
},
|
|
137
137
|
"template.orgInvite.name": {
|
|
138
|
-
value: "
|
|
138
|
+
value: "Invitation à l'organisation",
|
|
139
139
|
description: "Org invite template display name"
|
|
140
140
|
},
|
|
141
141
|
"template.orgInvite.description": {
|
|
142
|
-
value: "
|
|
142
|
+
value: "Envoyé lorsqu'un utilisateur est invité à une organisation.",
|
|
143
143
|
description: "Org invite template description"
|
|
144
144
|
},
|
|
145
145
|
"template.mention.name": {
|
|
146
|
-
value: "
|
|
146
|
+
value: "Mention",
|
|
147
147
|
description: "Mention template display name"
|
|
148
148
|
},
|
|
149
149
|
"template.mention.description": {
|
|
150
|
-
value: "
|
|
150
|
+
value: "Envoyé lorsqu'un utilisateur est mentionné.",
|
|
151
151
|
description: "Mention template description"
|
|
152
152
|
},
|
|
153
153
|
"channel.webhook.noUrl": {
|
|
154
|
-
value: "
|
|
154
|
+
value: "Aucune URL de webhook configurée",
|
|
155
155
|
description: "Error when webhook channel has no URL"
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -171,8 +171,8 @@ import {
|
|
|
171
171
|
var factory, createNotificationsI18n, getDefaultI18n, resetI18nRegistry;
|
|
172
172
|
var init_messages = __esm(() => {
|
|
173
173
|
init_en();
|
|
174
|
-
init_fr();
|
|
175
174
|
init_es();
|
|
175
|
+
init_fr();
|
|
176
176
|
factory = createI18nFactory({
|
|
177
177
|
specKey: "notifications.messages",
|
|
178
178
|
catalogs: [enMessages, frMessages, esMessages]
|
|
@@ -182,14 +182,6 @@ var init_messages = __esm(() => {
|
|
|
182
182
|
resetI18nRegistry = factory.resetRegistry;
|
|
183
183
|
});
|
|
184
184
|
|
|
185
|
-
// src/i18n/locale.ts
|
|
186
|
-
import {
|
|
187
|
-
DEFAULT_LOCALE,
|
|
188
|
-
SUPPORTED_LOCALES,
|
|
189
|
-
resolveLocale,
|
|
190
|
-
isSupportedLocale
|
|
191
|
-
} from "@contractspec/lib.contracts-spec/translations";
|
|
192
|
-
|
|
193
185
|
// src/i18n/keys.ts
|
|
194
186
|
var TEMPLATE_KEYS = {
|
|
195
187
|
"template.welcome.name": "template.welcome.name",
|
|
@@ -207,11 +199,19 @@ var I18N_KEYS = {
|
|
|
207
199
|
...CHANNEL_KEYS
|
|
208
200
|
};
|
|
209
201
|
|
|
202
|
+
// src/i18n/locale.ts
|
|
203
|
+
import {
|
|
204
|
+
DEFAULT_LOCALE,
|
|
205
|
+
isSupportedLocale,
|
|
206
|
+
resolveLocale,
|
|
207
|
+
SUPPORTED_LOCALES
|
|
208
|
+
} from "@contractspec/lib.contracts-spec/translations";
|
|
209
|
+
|
|
210
210
|
// src/i18n/index.ts
|
|
211
|
-
init_messages();
|
|
212
211
|
init_en();
|
|
213
|
-
init_fr();
|
|
214
212
|
init_es();
|
|
213
|
+
init_fr();
|
|
214
|
+
init_messages();
|
|
215
215
|
export {
|
|
216
216
|
resolveLocale,
|
|
217
217
|
resetI18nRegistry,
|
|
@@ -17,9 +17,9 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
17
17
|
// src/i18n/locale.ts
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_LOCALE,
|
|
20
|
-
|
|
20
|
+
isSupportedLocale,
|
|
21
21
|
resolveLocale,
|
|
22
|
-
|
|
22
|
+
SUPPORTED_LOCALES
|
|
23
23
|
} from "@contractspec/lib.contracts-spec/translations";
|
|
24
24
|
export {
|
|
25
25
|
resolveLocale,
|