@node-in-layers/notifications 0.0.0-stage → 1.0.0

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.
Files changed (56) hide show
  1. package/README.md +605 -2
  2. package/backend/features.d.ts +5 -0
  3. package/backend/features.js +350 -0
  4. package/backend/features.js.map +1 -0
  5. package/backend/index.d.ts +6 -0
  6. package/backend/index.js +7 -0
  7. package/backend/index.js.map +1 -0
  8. package/backend/internal-libs.d.ts +63 -0
  9. package/backend/internal-libs.js +100 -0
  10. package/backend/internal-libs.js.map +1 -0
  11. package/backend/libs.d.ts +23 -0
  12. package/backend/libs.js +48 -0
  13. package/backend/libs.js.map +1 -0
  14. package/backend/services.d.ts +4 -0
  15. package/backend/services.js +57 -0
  16. package/backend/services.js.map +1 -0
  17. package/backend/types.d.ts +36 -0
  18. package/backend/types.js +2 -0
  19. package/backend/types.js.map +1 -0
  20. package/core/features.d.ts +4 -0
  21. package/core/features.js +6 -0
  22. package/core/features.js.map +1 -0
  23. package/core/index.d.ts +7 -0
  24. package/core/index.js +8 -0
  25. package/core/index.js.map +1 -0
  26. package/core/internal-libs.d.ts +5 -0
  27. package/core/internal-libs.js +34 -0
  28. package/core/internal-libs.js.map +1 -0
  29. package/core/libs.d.ts +28 -0
  30. package/core/libs.js +57 -0
  31. package/core/libs.js.map +1 -0
  32. package/core/models/NotificationConfigs.d.ts +13 -0
  33. package/core/models/NotificationConfigs.js +44 -0
  34. package/core/models/NotificationConfigs.js.map +1 -0
  35. package/core/models/NotificationTemplates.d.ts +11 -0
  36. package/core/models/NotificationTemplates.js +40 -0
  37. package/core/models/NotificationTemplates.js.map +1 -0
  38. package/core/models/Notifications.d.ts +49 -0
  39. package/core/models/Notifications.js +94 -0
  40. package/core/models/Notifications.js.map +1 -0
  41. package/core/models/index.d.ts +3 -0
  42. package/core/models/index.js +4 -0
  43. package/core/models/index.js.map +1 -0
  44. package/core/services.d.ts +4 -0
  45. package/core/services.js +6 -0
  46. package/core/services.js.map +1 -0
  47. package/core/types.d.ts +323 -0
  48. package/core/types.js +220 -0
  49. package/core/types.js.map +1 -0
  50. package/index.d.ts +4 -0
  51. package/index.js +5 -0
  52. package/index.js.map +1 -0
  53. package/package.json +99 -4
  54. package/types.d.ts +56 -0
  55. package/types.js +6 -0
  56. package/types.js.map +1 -0
@@ -0,0 +1,323 @@
1
+ import { CrossLayerProps, ErrorObject, ModelCrudsFunctions, NilAnnotatedFunction, Response } from '@node-in-layers/core';
2
+ import { JsonAble, JsonObj, PrimaryKeyType } from 'functional-models';
3
+ import { z } from 'zod';
4
+ import { NotificationsNamespace } from '../types.js';
5
+ export declare enum NotificationStatus {
6
+ Pending = "pending",
7
+ Sending = "sending",
8
+ Sent = "sent",
9
+ PartialFailure = "partial_failure",
10
+ Failed = "failed"
11
+ }
12
+ export declare enum NotificationSeverity {
13
+ Info = "info",
14
+ Warning = "warning",
15
+ Error = "error",
16
+ Critical = "critical"
17
+ }
18
+ export declare enum NotificationType {
19
+ System = "system",
20
+ ExecutionFailure = "executionFailure",
21
+ User = "user"
22
+ }
23
+ export declare enum NotificationChannel {
24
+ Email = "email",
25
+ Sms = "sms",
26
+ Sns = "sns",
27
+ Webhook = "webhook",
28
+ Slack = "slack",
29
+ InApp = "in_app",
30
+ Custom = "custom"
31
+ }
32
+ export type NotificationTarget = Readonly<{
33
+ channel: NotificationChannel | string;
34
+ notifier?: string;
35
+ to?: readonly string[];
36
+ cc?: readonly string[];
37
+ bcc?: readonly string[];
38
+ replyTo?: string;
39
+ phoneNumbers?: readonly string[];
40
+ topicArn?: string;
41
+ targetArn?: string;
42
+ url?: string;
43
+ channelId?: string;
44
+ options?: JsonObj;
45
+ }>;
46
+ export type NotificationUser = Readonly<{
47
+ id: PrimaryKeyType;
48
+ email?: string;
49
+ username?: string;
50
+ firstName?: string;
51
+ lastName?: string;
52
+ phoneNumber?: string;
53
+ enabled?: boolean;
54
+ }> & Record<string, JsonAble>;
55
+ export type NotifiersMap = Readonly<Record<string, string>>;
56
+ export type NotificationDeliveryResult = Readonly<{
57
+ channel: NotificationChannel | string;
58
+ notifier: string;
59
+ success: boolean;
60
+ sentAt?: string;
61
+ details?: JsonObj;
62
+ error?: ErrorObject['error'];
63
+ }>;
64
+ export type Notification<TData extends JsonObj = JsonObj> = Readonly<{
65
+ id: PrimaryKeyType;
66
+ type: NotificationType | string;
67
+ severity: NotificationSeverity;
68
+ title: string;
69
+ message: string;
70
+ htmlMessage?: string;
71
+ data?: TData;
72
+ userId?: PrimaryKeyType;
73
+ recipients?: readonly string[];
74
+ targets?: readonly NotificationTarget[];
75
+ channels?: readonly (NotificationChannel | string)[];
76
+ notifiers?: NotifiersMap;
77
+ idempotencyKey?: string;
78
+ status: NotificationStatus;
79
+ deliveryResults?: Readonly<Record<string, NotificationDeliveryResult>>;
80
+ taskId?: PrimaryKeyType;
81
+ crossLayerProps?: CrossLayerProps<Record<string, JsonAble>>;
82
+ ttl?: number;
83
+ sentAt?: string;
84
+ createdAt?: string;
85
+ updatedAt?: string;
86
+ }>;
87
+ export type NotificationConfigRecord = Readonly<{
88
+ id: PrimaryKeyType;
89
+ key: string;
90
+ adminEmails?: readonly string[];
91
+ fromEmail?: string;
92
+ subjectPrefix?: string;
93
+ defaultChannels?: readonly (NotificationChannel | string)[];
94
+ notifiers?: NotifiersMap;
95
+ createdAt?: string;
96
+ updatedAt?: string;
97
+ }>;
98
+ export type NotificationTemplateRecord = Readonly<{
99
+ id: PrimaryKeyType;
100
+ channel: string;
101
+ type: string;
102
+ body: string;
103
+ htmlBody?: string;
104
+ createdAt?: string;
105
+ updatedAt?: string;
106
+ }>;
107
+ export type NotificationChannelProps<TData extends JsonObj = JsonObj, TOptions extends JsonObj = JsonObj> = Readonly<{
108
+ channel: NotificationChannel | string;
109
+ notification: Notification<TData>;
110
+ target?: NotificationTarget;
111
+ template?: string;
112
+ htmlTemplate?: string;
113
+ options?: TOptions;
114
+ }>;
115
+ export type NotificationChannelResult = NotificationDeliveryResult;
116
+ export type NotificationChannelFeature<TData extends JsonObj = JsonObj, TOptions extends JsonObj = JsonObj> = NilAnnotatedFunction<NotificationChannelProps<TData, TOptions>, NotificationChannelResult>;
117
+ export type NotificationSendOptions = Readonly<{
118
+ severity?: NotificationSeverity;
119
+ htmlMessage?: string;
120
+ data?: JsonObj;
121
+ recipients?: readonly string[];
122
+ targets?: readonly NotificationTarget[];
123
+ channels?: readonly (NotificationChannel | string)[];
124
+ notifiers?: NotifiersMap;
125
+ idempotencyKey?: string;
126
+ ttl?: number;
127
+ options?: JsonObj;
128
+ }>;
129
+ export type SendNotificationProps = Readonly<{
130
+ type?: NotificationType | string;
131
+ title: string;
132
+ message: string;
133
+ userId?: PrimaryKeyType;
134
+ }> & NotificationSendOptions;
135
+ export type SendNotificationResult = Readonly<{
136
+ notification: Notification;
137
+ }>;
138
+ export type SendUserNotificationProps = Readonly<{
139
+ userId?: PrimaryKeyType;
140
+ user?: NotificationUser;
141
+ title: string;
142
+ message: string;
143
+ notificationProps?: NotificationSendOptions;
144
+ }> & NotificationSendOptions;
145
+ export type SendSystemNotificationProps = Readonly<{
146
+ title: string;
147
+ message: string;
148
+ }> & NotificationSendOptions;
149
+ export type SendExecutionFailureNotificationProps = Readonly<{
150
+ domain: string;
151
+ functionName: string;
152
+ error: JsonAble | ErrorObject;
153
+ args?: JsonObj;
154
+ title?: string;
155
+ message?: string;
156
+ }> & NotificationSendOptions;
157
+ export declare const primaryKeySchema: z.ZodType<PrimaryKeyType>;
158
+ export declare const NotificationTargetSchema: z.ZodType<NotificationTarget>;
159
+ export declare const NotificationUserSchema: z.ZodType<NotificationUser>;
160
+ export declare const NotificationDeliveryResultSchema: z.ZodType<NotificationDeliveryResult>;
161
+ export declare const NotificationSchema: z.ZodType<Notification>;
162
+ export declare const NotificationSendOptionsSchema: z.ZodReadonly<z.ZodObject<{
163
+ severity: z.ZodOptional<z.ZodEnum<typeof NotificationSeverity>>;
164
+ htmlMessage: z.ZodOptional<z.ZodString>;
165
+ data: z.ZodOptional<z.ZodType<Readonly<{
166
+ [s: string]: JsonAble;
167
+ }>, unknown, z.core.$ZodTypeInternals<Readonly<{
168
+ [s: string]: JsonAble;
169
+ }>, unknown>>>;
170
+ recipients: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
171
+ targets: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<Readonly<{
172
+ channel: NotificationChannel | string;
173
+ notifier?: string;
174
+ to?: readonly string[];
175
+ cc?: readonly string[];
176
+ bcc?: readonly string[];
177
+ replyTo?: string;
178
+ phoneNumbers?: readonly string[];
179
+ topicArn?: string;
180
+ targetArn?: string;
181
+ url?: string;
182
+ channelId?: string;
183
+ options?: JsonObj;
184
+ }>, unknown, z.core.$ZodTypeInternals<Readonly<{
185
+ channel: NotificationChannel | string;
186
+ notifier?: string;
187
+ to?: readonly string[];
188
+ cc?: readonly string[];
189
+ bcc?: readonly string[];
190
+ replyTo?: string;
191
+ phoneNumbers?: readonly string[];
192
+ topicArn?: string;
193
+ targetArn?: string;
194
+ url?: string;
195
+ channelId?: string;
196
+ options?: JsonObj;
197
+ }>, unknown>>>>>;
198
+ channels: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<typeof NotificationChannel>, z.ZodString]>>>>;
199
+ notifiers: z.ZodOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
200
+ idempotencyKey: z.ZodOptional<z.ZodString>;
201
+ ttl: z.ZodOptional<z.ZodNumber>;
202
+ options: z.ZodOptional<z.ZodType<Readonly<{
203
+ [s: string]: JsonAble;
204
+ }>, unknown, z.core.$ZodTypeInternals<Readonly<{
205
+ [s: string]: JsonAble;
206
+ }>, unknown>>>;
207
+ }, z.core.$strip>>;
208
+ export declare const SendNotificationPropsSchema: z.ZodType<SendNotificationProps>;
209
+ export declare const SendNotificationResultSchema: z.ZodType<SendNotificationResult>;
210
+ export declare const SendUserNotificationPropsSchema: z.ZodType<SendUserNotificationProps>;
211
+ export declare const SendSystemNotificationPropsSchema: z.ZodType<SendSystemNotificationProps>;
212
+ export declare const SendExecutionFailureNotificationPropsSchema: z.ZodType<SendExecutionFailureNotificationProps>;
213
+ export declare const NotificationChannelPropsSchema: z.ZodType<NotificationChannelProps>;
214
+ export declare const createNotificationChannelSchema: <TData extends JsonObj = JsonObj, TOptions extends JsonObj = JsonObj>(args: Readonly<{
215
+ functionName: string;
216
+ domain: string;
217
+ description?: string;
218
+ }>) => import("@node-in-layers/core").AnnotatedFunctionProps<Readonly<{
219
+ channel: NotificationChannel | string;
220
+ notification: Readonly<{
221
+ id: PrimaryKeyType;
222
+ type: NotificationType | string;
223
+ severity: NotificationSeverity;
224
+ title: string;
225
+ message: string;
226
+ htmlMessage?: string;
227
+ data?: TData | undefined;
228
+ userId?: PrimaryKeyType;
229
+ recipients?: readonly string[];
230
+ targets?: readonly Readonly<{
231
+ channel: NotificationChannel | string;
232
+ notifier?: string;
233
+ to?: readonly string[];
234
+ cc?: readonly string[];
235
+ bcc?: readonly string[];
236
+ replyTo?: string;
237
+ phoneNumbers?: readonly string[];
238
+ topicArn?: string;
239
+ targetArn?: string;
240
+ url?: string;
241
+ channelId?: string;
242
+ options?: JsonObj;
243
+ }>[] | undefined;
244
+ channels?: readonly (NotificationChannel | string)[];
245
+ notifiers?: NotifiersMap;
246
+ idempotencyKey?: string;
247
+ status: NotificationStatus;
248
+ deliveryResults?: Readonly<Record<string, Readonly<{
249
+ channel: NotificationChannel | string;
250
+ notifier: string;
251
+ success: boolean;
252
+ sentAt?: string;
253
+ details?: JsonObj;
254
+ error?: ErrorObject['error'];
255
+ }>>> | undefined;
256
+ taskId?: PrimaryKeyType;
257
+ crossLayerProps?: CrossLayerProps<Record<string, JsonAble>>;
258
+ ttl?: number;
259
+ sentAt?: string;
260
+ createdAt?: string;
261
+ updatedAt?: string;
262
+ }>;
263
+ target?: Readonly<{
264
+ channel: NotificationChannel | string;
265
+ notifier?: string;
266
+ to?: readonly string[];
267
+ cc?: readonly string[];
268
+ bcc?: readonly string[];
269
+ replyTo?: string;
270
+ phoneNumbers?: readonly string[];
271
+ topicArn?: string;
272
+ targetArn?: string;
273
+ url?: string;
274
+ channelId?: string;
275
+ options?: JsonObj;
276
+ }> | undefined;
277
+ template?: string;
278
+ htmlTemplate?: string;
279
+ options?: TOptions | undefined;
280
+ }>, Readonly<{
281
+ channel: NotificationChannel | string;
282
+ notifier: string;
283
+ success: boolean;
284
+ sentAt?: string;
285
+ details?: JsonObj;
286
+ error?: ErrorObject['error'];
287
+ }>>;
288
+ export declare const SendNotificationSchema: import("@node-in-layers/core").AnnotatedFunctionProps<SendNotificationProps, Readonly<{
289
+ notification: Notification;
290
+ }>>;
291
+ export declare const SendUserNotificationSchema: import("@node-in-layers/core").AnnotatedFunctionProps<SendUserNotificationProps, Readonly<{
292
+ notification: Notification;
293
+ }>>;
294
+ export declare const SendSystemNotificationSchema: import("@node-in-layers/core").AnnotatedFunctionProps<SendSystemNotificationProps, Readonly<{
295
+ notification: Notification;
296
+ }>>;
297
+ export declare const SendExecutionFailureNotificationSchema: import("@node-in-layers/core").AnnotatedFunctionProps<SendExecutionFailureNotificationProps, Readonly<{
298
+ notification: Notification;
299
+ }>>;
300
+ export type NotificationsPublicFeatures = Readonly<{
301
+ sendNotification: NilAnnotatedFunction<SendNotificationProps, SendNotificationResult>;
302
+ sendUserNotification: NilAnnotatedFunction<SendUserNotificationProps, SendNotificationResult>;
303
+ sendSystemNotification: NilAnnotatedFunction<SendSystemNotificationProps, SendNotificationResult>;
304
+ sendExecutionFailureNotification: NilAnnotatedFunction<SendExecutionFailureNotificationProps, SendNotificationResult>;
305
+ }>;
306
+ export type CoreCruds = Readonly<{
307
+ Notifications: ModelCrudsFunctions<Notification>;
308
+ NotificationConfigs: ModelCrudsFunctions<NotificationConfigRecord>;
309
+ NotificationTemplates: ModelCrudsFunctions<NotificationTemplateRecord>;
310
+ }>;
311
+ export type CoreServices = Readonly<object>;
312
+ export type CoreServicesLayer = Readonly<{
313
+ [NotificationsNamespace.Core]: CoreServices & {
314
+ cruds: CoreCruds;
315
+ };
316
+ }>;
317
+ export type CoreFeatures = Readonly<object>;
318
+ export type CoreFeaturesLayer = Readonly<{
319
+ [NotificationsNamespace.Core]: CoreFeatures & {
320
+ cruds: CoreCruds;
321
+ };
322
+ }>;
323
+ export type NotificationResponse = Response<SendNotificationResult>;
package/core/types.js ADDED
@@ -0,0 +1,220 @@
1
+ import { annotationFunctionProps, jsonAbleSchema, jsonObjSchema, } from '@node-in-layers/core';
2
+ import { z } from 'zod';
3
+ import { NotificationsNamespace } from '../types.js';
4
+ export var NotificationStatus;
5
+ (function (NotificationStatus) {
6
+ NotificationStatus["Pending"] = "pending";
7
+ NotificationStatus["Sending"] = "sending";
8
+ NotificationStatus["Sent"] = "sent";
9
+ NotificationStatus["PartialFailure"] = "partial_failure";
10
+ NotificationStatus["Failed"] = "failed";
11
+ })(NotificationStatus || (NotificationStatus = {}));
12
+ export var NotificationSeverity;
13
+ (function (NotificationSeverity) {
14
+ NotificationSeverity["Info"] = "info";
15
+ NotificationSeverity["Warning"] = "warning";
16
+ NotificationSeverity["Error"] = "error";
17
+ NotificationSeverity["Critical"] = "critical";
18
+ })(NotificationSeverity || (NotificationSeverity = {}));
19
+ export var NotificationType;
20
+ (function (NotificationType) {
21
+ NotificationType["System"] = "system";
22
+ NotificationType["ExecutionFailure"] = "executionFailure";
23
+ NotificationType["User"] = "user";
24
+ })(NotificationType || (NotificationType = {}));
25
+ export var NotificationChannel;
26
+ (function (NotificationChannel) {
27
+ NotificationChannel["Email"] = "email";
28
+ NotificationChannel["Sms"] = "sms";
29
+ NotificationChannel["Sns"] = "sns";
30
+ NotificationChannel["Webhook"] = "webhook";
31
+ NotificationChannel["Slack"] = "slack";
32
+ NotificationChannel["InApp"] = "in_app";
33
+ NotificationChannel["Custom"] = "custom";
34
+ })(NotificationChannel || (NotificationChannel = {}));
35
+ export const primaryKeySchema = z.union([
36
+ z.string(),
37
+ z.number().int(),
38
+ ]);
39
+ export const NotificationTargetSchema = z
40
+ .object({
41
+ channel: z.union([z.enum(NotificationChannel), z.string()]),
42
+ notifier: z.string().optional(),
43
+ to: z.array(z.string()).readonly().optional(),
44
+ cc: z.array(z.string()).readonly().optional(),
45
+ bcc: z.array(z.string()).readonly().optional(),
46
+ replyTo: z.string().optional(),
47
+ phoneNumbers: z.array(z.string()).readonly().optional(),
48
+ topicArn: z.string().optional(),
49
+ targetArn: z.string().optional(),
50
+ url: z.string().optional(),
51
+ channelId: z.string().optional(),
52
+ options: jsonObjSchema.optional(),
53
+ })
54
+ .readonly();
55
+ export const NotificationUserSchema = z
56
+ .object({
57
+ id: primaryKeySchema,
58
+ email: z.string().optional(),
59
+ username: z.string().optional(),
60
+ firstName: z.string().optional(),
61
+ lastName: z.string().optional(),
62
+ phoneNumber: z.string().optional(),
63
+ enabled: z.boolean().optional(),
64
+ })
65
+ .catchall(jsonAbleSchema)
66
+ .readonly();
67
+ export const NotificationDeliveryResultSchema = z
68
+ .object({
69
+ channel: z.union([z.enum(NotificationChannel), z.string()]),
70
+ notifier: z.string(),
71
+ success: z.boolean(),
72
+ sentAt: z.string().optional(),
73
+ details: jsonObjSchema.optional(),
74
+ error: z
75
+ .object({
76
+ code: z.string(),
77
+ message: z.string(),
78
+ details: z.string().optional(),
79
+ data: z.record(z.string(), jsonAbleSchema).optional(),
80
+ trace: z.string().optional(),
81
+ cause: z.any().optional(),
82
+ })
83
+ .readonly()
84
+ .optional(),
85
+ })
86
+ .readonly();
87
+ export const NotificationSchema = z
88
+ .object({
89
+ id: primaryKeySchema,
90
+ type: z.union([z.enum(NotificationType), z.string()]),
91
+ severity: z.enum(NotificationSeverity),
92
+ title: z.string(),
93
+ message: z.string(),
94
+ htmlMessage: z.string().optional(),
95
+ data: jsonObjSchema.optional(),
96
+ userId: primaryKeySchema.optional(),
97
+ recipients: z.array(z.string()).readonly().optional(),
98
+ targets: z.array(NotificationTargetSchema).readonly().optional(),
99
+ channels: z
100
+ .array(z.union([z.enum(NotificationChannel), z.string()]))
101
+ .readonly()
102
+ .optional(),
103
+ notifiers: z.record(z.string(), z.string()).readonly().optional(),
104
+ idempotencyKey: z.string().optional(),
105
+ status: z.enum(NotificationStatus),
106
+ deliveryResults: z
107
+ .record(z.string(), NotificationDeliveryResultSchema)
108
+ .readonly()
109
+ .optional(),
110
+ taskId: primaryKeySchema.optional(),
111
+ crossLayerProps: z
112
+ .custom()
113
+ .optional(),
114
+ ttl: z.number().int().optional(),
115
+ sentAt: z.string().optional(),
116
+ createdAt: z.string().optional(),
117
+ updatedAt: z.string().optional(),
118
+ })
119
+ .readonly();
120
+ export const NotificationSendOptionsSchema = z
121
+ .object({
122
+ severity: z.enum(NotificationSeverity).optional(),
123
+ htmlMessage: z.string().optional(),
124
+ data: jsonObjSchema.optional(),
125
+ recipients: z.array(z.string()).readonly().optional(),
126
+ targets: z.array(NotificationTargetSchema).readonly().optional(),
127
+ channels: z
128
+ .array(z.union([z.enum(NotificationChannel), z.string()]))
129
+ .readonly()
130
+ .optional(),
131
+ notifiers: z.record(z.string(), z.string()).readonly().optional(),
132
+ idempotencyKey: z.string().optional(),
133
+ ttl: z.number().int().optional(),
134
+ options: jsonObjSchema.optional(),
135
+ })
136
+ .readonly();
137
+ export const SendNotificationPropsSchema = z
138
+ .intersection(z.object({
139
+ type: z.union([z.enum(NotificationType), z.string()]).optional(),
140
+ title: z.string(),
141
+ message: z.string(),
142
+ userId: primaryKeySchema.optional(),
143
+ }), NotificationSendOptionsSchema)
144
+ .readonly();
145
+ export const SendNotificationResultSchema = z
146
+ .object({
147
+ notification: NotificationSchema,
148
+ })
149
+ .readonly();
150
+ export const SendUserNotificationPropsSchema = z
151
+ .intersection(z.object({
152
+ userId: primaryKeySchema.optional(),
153
+ user: NotificationUserSchema.optional(),
154
+ title: z.string(),
155
+ message: z.string(),
156
+ notificationProps: NotificationSendOptionsSchema.optional(),
157
+ }), NotificationSendOptionsSchema)
158
+ .readonly();
159
+ export const SendSystemNotificationPropsSchema = z
160
+ .intersection(z.object({
161
+ title: z.string(),
162
+ message: z.string(),
163
+ }), NotificationSendOptionsSchema)
164
+ .readonly();
165
+ export const SendExecutionFailureNotificationPropsSchema = z
166
+ .intersection(z.object({
167
+ domain: z.string(),
168
+ functionName: z.string(),
169
+ error: z.union([jsonAbleSchema, z.custom()]),
170
+ args: jsonObjSchema.optional(),
171
+ title: z.string().optional(),
172
+ message: z.string().optional(),
173
+ }), NotificationSendOptionsSchema)
174
+ .readonly();
175
+ export const NotificationChannelPropsSchema = z
176
+ .object({
177
+ channel: z.union([z.enum(NotificationChannel), z.string()]),
178
+ notification: NotificationSchema,
179
+ target: NotificationTargetSchema.optional(),
180
+ template: z.string().optional(),
181
+ htmlTemplate: z.string().optional(),
182
+ options: jsonObjSchema.optional(),
183
+ })
184
+ .readonly();
185
+ export const createNotificationChannelSchema = (args) => annotationFunctionProps({
186
+ functionName: args.functionName,
187
+ domain: args.domain,
188
+ description: args.description,
189
+ args: NotificationChannelPropsSchema,
190
+ returns: NotificationDeliveryResultSchema,
191
+ });
192
+ export const SendNotificationSchema = annotationFunctionProps({
193
+ functionName: 'sendNotification',
194
+ domain: NotificationsNamespace.Backend,
195
+ description: 'Sends a notification through configured channels.',
196
+ args: SendNotificationPropsSchema,
197
+ returns: SendNotificationResultSchema,
198
+ });
199
+ export const SendUserNotificationSchema = annotationFunctionProps({
200
+ functionName: 'sendUserNotification',
201
+ domain: NotificationsNamespace.Backend,
202
+ description: 'Sends a notification to a user.',
203
+ args: SendUserNotificationPropsSchema,
204
+ returns: SendNotificationResultSchema,
205
+ });
206
+ export const SendSystemNotificationSchema = annotationFunctionProps({
207
+ functionName: 'sendSystemNotification',
208
+ domain: NotificationsNamespace.Backend,
209
+ description: 'Sends a system notification.',
210
+ args: SendSystemNotificationPropsSchema,
211
+ returns: SendNotificationResultSchema,
212
+ });
213
+ export const SendExecutionFailureNotificationSchema = annotationFunctionProps({
214
+ functionName: 'sendExecutionFailureNotification',
215
+ domain: NotificationsNamespace.Backend,
216
+ description: 'Sends a notification for a failed feature or service call.',
217
+ args: SendExecutionFailureNotificationPropsSchema,
218
+ returns: SendNotificationResultSchema,
219
+ });
220
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,uBAAuB,EACvB,cAAc,EACd,aAAa,GACd,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEpD,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,wDAAkC,CAAA;IAClC,uCAAiB,CAAA;AACnB,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B;AAED,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,6CAAqB,CAAA;AACvB,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,yDAAqC,CAAA;IACrC,iCAAa,CAAA;AACf,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,MAAM,CAAN,IAAY,mBAQX;AARD,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,kCAAW,CAAA;IACX,kCAAW,CAAA;IACX,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,uCAAgB,CAAA;IAChB,wCAAiB,CAAA;AACnB,CAAC,EARW,mBAAmB,KAAnB,mBAAmB,QAQ9B;AA6JD,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,CA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3
+ export * from './core/types.js';
4
+ export * from './core/libs.js';
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * as notificationsCore from './core/index.js';
2
+ export * from './types.js';
3
+ export * from './core/types.js';
4
+ export * from './core/libs.js';
5
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,iBAAiB,MAAM,iBAAiB,CAAA;AAEpD,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,101 @@
1
1
  {
2
2
  "name": "@node-in-layers/notifications",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "type": "module",
4
+ "version": "1.0.0",
5
+ "description": "A Node In Layers Package, generated by the Node in Layers Toolkit.",
6
+ "main": "index.js",
7
+ "scripts": {
8
+ "build": "rm -Rf ./dist && tsgo -p ./tsconfig.json && cp package.json ./dist && cp README.md ./dist",
9
+ "build:watch": "nodemon -e '*' --watch ./src --exec \"npm run build || exit 1\"",
10
+ "commit": "cz",
11
+ "dist": "npm run build && cd dist && npm publish",
12
+ "eslint": "eslint .",
13
+ "feature-tests": "./node_modules/.bin/cucumber-js -p default",
14
+ "prettier": "prettier --write .",
15
+ "prettier:check": "prettier -c .",
16
+ "test": "mocha -r tsx ./test/src/*.test.ts ./test/src/**/*.test.ts ./test/src/**/**/*.test.ts",
17
+ "test:coverage": "c8 --all --reporter cobertura --reporter text --reporter lcov --reporter html npm run test"
18
+ },
19
+ "config": {
20
+ "commitizen": {
21
+ "path": "./node_modules/cz-conventional-changelog"
22
+ }
23
+ },
24
+ "overrides": {
25
+ "external-editor": {
26
+ "tmp": ">=0.2.6"
27
+ },
28
+ "commitizen": {
29
+ "lodash": ">=4.17.24",
30
+ "inquirer": {
31
+ "external-editor": {
32
+ "tmp": ">=0.2.6"
33
+ }
34
+ }
35
+ },
36
+ "mocha": {
37
+ "diff": ">=8.0.3",
38
+ "serialize-javascript": ">=7.0.5"
39
+ },
40
+ "sinon": {
41
+ "diff": ">=8.0.3"
42
+ },
43
+ "@cucumber/cucumber": {
44
+ "tmp": ">=0.2.6"
45
+ }
46
+ },
47
+ "author": "",
48
+ "license": "ISC",
49
+ "devDependencies": {
50
+ "@cucumber/cucumber": "^13.0.0",
51
+ "@eslint/compat": "^1.2.0",
52
+ "@eslint/eslintrc": "^3.1.0",
53
+ "@eslint/js": "^9.12.0",
54
+ "@types/chai-as-promised": "^8.0.1",
55
+ "@types/json-stringify-safe": "^5.0.3",
56
+ "@types/lodash": "^4.17.13",
57
+ "@types/mocha": "^9.1.1",
58
+ "@types/node": "^22.19.20",
59
+ "@types/nodemailer": "^7.0.4",
60
+ "@types/proxyquire": "^1.3.31",
61
+ "@types/sinon": "^17.0.3",
62
+ "@typescript-eslint/eslint-plugin": "8.13.0",
63
+ "@typescript-eslint/parser": "8.13.0",
64
+ "@typescript/native-preview": "^7.0.0-dev.20260604.1",
65
+ "argparse": "",
66
+ "c8": "^11.0.0",
67
+ "chai": "^4.2.0",
68
+ "chai-as-promised": "^7.1.1",
69
+ "cz-conventional-changelog": "^3.3.0",
70
+ "eslint": "^9.39.3",
71
+ "eslint-config-prettier": "^9.1.0",
72
+ "eslint-import-resolver-typescript": "^3.6.3",
73
+ "eslint-plugin-functional": "~7.1.0",
74
+ "eslint-plugin-import": "^2.31.0",
75
+ "esprima": "^4.0.1",
76
+ "globals": "^15.12.0",
77
+ "handlebars": "^4.7.10",
78
+ "js-yaml": "^4.1.0",
79
+ "mocha": "^11.0.1",
80
+ "nodemon": "^3.1.7",
81
+ "prettier": "^3.3.3",
82
+ "proxyquire": "^2.1.3",
83
+ "sinon": "^21.0.1",
84
+ "sinon-chai": "^3.5.0",
85
+ "source-map-support": "^0.5.21",
86
+ "ts-node": "^10.4.0",
87
+ "tsx": "^4.19.2",
88
+ "typescript": "5.3.3",
89
+ "@node-in-layers/data": "^1.3.6"
90
+ },
91
+ "dependencies": {
92
+ "@node-in-layers/auth": "^1.5.3",
93
+ "@node-in-layers/core": "^1.18.3",
94
+ "@node-in-layers/tasks": "^1.1.2",
95
+ "functional-models": "^3.12.1",
96
+ "lodash": "^4.18.1",
97
+ "modern-async": "^2.0.4",
98
+ "nodemailer": "^10.3.1",
99
+ "zod": "^4.6.7"
100
+ }
101
+ }