@m5kdev/commons 0.12.0 → 0.13.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.
@@ -0,0 +1,25 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/modules/notification/notification.constants.ts
3
+ const NOTIFICATION_PLATFORMS = [
4
+ "web",
5
+ "ios",
6
+ "android"
7
+ ];
8
+ const NOTIFICATION_PROVIDERS = [
9
+ "web",
10
+ "apn",
11
+ "fcm"
12
+ ];
13
+ const NOTIFICATION_SEND_STATUSES = [
14
+ "pending",
15
+ "sent",
16
+ "failed"
17
+ ];
18
+ const NOTIFICATION_DELIVER_JOB_NAME = "notification.deliver";
19
+ //#endregion
20
+ exports.NOTIFICATION_DELIVER_JOB_NAME = NOTIFICATION_DELIVER_JOB_NAME;
21
+ exports.NOTIFICATION_PLATFORMS = NOTIFICATION_PLATFORMS;
22
+ exports.NOTIFICATION_PROVIDERS = NOTIFICATION_PROVIDERS;
23
+ exports.NOTIFICATION_SEND_STATUSES = NOTIFICATION_SEND_STATUSES;
24
+
25
+ //# sourceMappingURL=notification.constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.constants.cjs","names":[],"sources":["../../../../src/modules/notification/notification.constants.ts"],"sourcesContent":["export const NOTIFICATION_PLATFORMS = [\"web\", \"ios\", \"android\"] as const;\r\nexport type NotificationPlatform = (typeof NOTIFICATION_PLATFORMS)[number];\r\n\r\nexport const NOTIFICATION_PROVIDERS = [\"web\", \"apn\", \"fcm\"] as const;\r\nexport type NotificationProvider = (typeof NOTIFICATION_PROVIDERS)[number];\r\n\r\nexport const NOTIFICATION_SEND_STATUSES = [\"pending\", \"sent\", \"failed\"] as const;\r\nexport type NotificationSendStatus = (typeof NOTIFICATION_SEND_STATUSES)[number];\r\n\r\nexport const NOTIFICATION_DELIVER_JOB_NAME = \"notification.deliver\" as const;\r\n"],"mappings":";;AAAA,MAAa,yBAAyB;CAAC;CAAO;CAAO;CAAU;AAG/D,MAAa,yBAAyB;CAAC;CAAO;CAAO;CAAM;AAG3D,MAAa,6BAA6B;CAAC;CAAW;CAAQ;CAAS;AAGvE,MAAa,gCAAgC"}
@@ -0,0 +1,11 @@
1
+ //#region src/modules/notification/notification.constants.d.ts
2
+ declare const NOTIFICATION_PLATFORMS: readonly ["web", "ios", "android"];
3
+ type NotificationPlatform = (typeof NOTIFICATION_PLATFORMS)[number];
4
+ declare const NOTIFICATION_PROVIDERS: readonly ["web", "apn", "fcm"];
5
+ type NotificationProvider = (typeof NOTIFICATION_PROVIDERS)[number];
6
+ declare const NOTIFICATION_SEND_STATUSES: readonly ["pending", "sent", "failed"];
7
+ type NotificationSendStatus = (typeof NOTIFICATION_SEND_STATUSES)[number];
8
+ declare const NOTIFICATION_DELIVER_JOB_NAME: "notification.deliver";
9
+ //#endregion
10
+ export { NOTIFICATION_DELIVER_JOB_NAME, NOTIFICATION_PLATFORMS, NOTIFICATION_PROVIDERS, NOTIFICATION_SEND_STATUSES, NotificationPlatform, NotificationProvider, NotificationSendStatus };
11
+ //# sourceMappingURL=notification.constants.d.cts.map
@@ -0,0 +1,11 @@
1
+ //#region src/modules/notification/notification.constants.d.ts
2
+ declare const NOTIFICATION_PLATFORMS: readonly ["web", "ios", "android"];
3
+ type NotificationPlatform = (typeof NOTIFICATION_PLATFORMS)[number];
4
+ declare const NOTIFICATION_PROVIDERS: readonly ["web", "apn", "fcm"];
5
+ type NotificationProvider = (typeof NOTIFICATION_PROVIDERS)[number];
6
+ declare const NOTIFICATION_SEND_STATUSES: readonly ["pending", "sent", "failed"];
7
+ type NotificationSendStatus = (typeof NOTIFICATION_SEND_STATUSES)[number];
8
+ declare const NOTIFICATION_DELIVER_JOB_NAME: "notification.deliver";
9
+ //#endregion
10
+ export { NOTIFICATION_DELIVER_JOB_NAME, NOTIFICATION_PLATFORMS, NOTIFICATION_PROVIDERS, NOTIFICATION_SEND_STATUSES, NotificationPlatform, NotificationProvider, NotificationSendStatus };
11
+ //# sourceMappingURL=notification.constants.d.mts.map
@@ -0,0 +1,21 @@
1
+ //#region src/modules/notification/notification.constants.ts
2
+ const NOTIFICATION_PLATFORMS = [
3
+ "web",
4
+ "ios",
5
+ "android"
6
+ ];
7
+ const NOTIFICATION_PROVIDERS = [
8
+ "web",
9
+ "apn",
10
+ "fcm"
11
+ ];
12
+ const NOTIFICATION_SEND_STATUSES = [
13
+ "pending",
14
+ "sent",
15
+ "failed"
16
+ ];
17
+ const NOTIFICATION_DELIVER_JOB_NAME = "notification.deliver";
18
+ //#endregion
19
+ export { NOTIFICATION_DELIVER_JOB_NAME, NOTIFICATION_PLATFORMS, NOTIFICATION_PROVIDERS, NOTIFICATION_SEND_STATUSES };
20
+
21
+ //# sourceMappingURL=notification.constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.constants.mjs","names":[],"sources":["../../../../src/modules/notification/notification.constants.ts"],"sourcesContent":["export const NOTIFICATION_PLATFORMS = [\"web\", \"ios\", \"android\"] as const;\r\nexport type NotificationPlatform = (typeof NOTIFICATION_PLATFORMS)[number];\r\n\r\nexport const NOTIFICATION_PROVIDERS = [\"web\", \"apn\", \"fcm\"] as const;\r\nexport type NotificationProvider = (typeof NOTIFICATION_PROVIDERS)[number];\r\n\r\nexport const NOTIFICATION_SEND_STATUSES = [\"pending\", \"sent\", \"failed\"] as const;\r\nexport type NotificationSendStatus = (typeof NOTIFICATION_SEND_STATUSES)[number];\r\n\r\nexport const NOTIFICATION_DELIVER_JOB_NAME = \"notification.deliver\" as const;\r\n"],"mappings":";AAAA,MAAa,yBAAyB;CAAC;CAAO;CAAO;CAAU;AAG/D,MAAa,yBAAyB;CAAC;CAAO;CAAO;CAAM;AAG3D,MAAa,6BAA6B;CAAC;CAAW;CAAQ;CAAS;AAGvE,MAAa,gCAAgC"}
@@ -0,0 +1,97 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_src_modules_notification_notification_constants = require("./notification.constants.cjs");
3
+ let zod = require("zod");
4
+ //#region src/modules/notification/notification.schema.ts
5
+ const notificationPlatformSchema = zod.z.enum(require_src_modules_notification_notification_constants.NOTIFICATION_PLATFORMS);
6
+ const notificationProviderSchema = zod.z.enum(require_src_modules_notification_notification_constants.NOTIFICATION_PROVIDERS);
7
+ const notificationSendStatusSchema = zod.z.enum(require_src_modules_notification_notification_constants.NOTIFICATION_SEND_STATUSES);
8
+ /** Web Push `PushSubscriptionJSON` subset we persist and accept from clients. */
9
+ const pushSubscriptionJsonSchema = zod.z.object({
10
+ endpoint: zod.z.string().url(),
11
+ expirationTime: zod.z.number().nullable().optional(),
12
+ keys: zod.z.object({
13
+ p256dh: zod.z.string(),
14
+ auth: zod.z.string()
15
+ })
16
+ });
17
+ const notificationRegisterDeviceInputSchema = zod.z.discriminatedUnion("platform", [
18
+ zod.z.object({
19
+ platform: zod.z.literal("web"),
20
+ subscription: pushSubscriptionJsonSchema,
21
+ label: zod.z.string().max(120).optional()
22
+ }),
23
+ zod.z.object({
24
+ platform: zod.z.literal("ios"),
25
+ token: zod.z.string().min(1).max(4096),
26
+ label: zod.z.string().max(120).optional()
27
+ }),
28
+ zod.z.object({
29
+ platform: zod.z.literal("android"),
30
+ token: zod.z.string().min(1).max(4096),
31
+ label: zod.z.string().max(120).optional()
32
+ })
33
+ ]);
34
+ const notificationRegisterDeviceOutputSchema = zod.z.object({ deviceId: zod.z.string() });
35
+ const notificationUnregisterDeviceInputSchema = zod.z.object({ deviceId: zod.z.string() });
36
+ const notificationUnregisterDeviceOutputSchema = zod.z.object({ ok: zod.z.literal(true) });
37
+ const notificationDeviceSelectSchema = zod.z.object({
38
+ id: zod.z.string(),
39
+ userId: zod.z.string(),
40
+ platform: notificationPlatformSchema,
41
+ endpoint: zod.z.string().nullable(),
42
+ label: zod.z.string().nullable(),
43
+ enabled: zod.z.boolean(),
44
+ createdAt: zod.z.date(),
45
+ updatedAt: zod.z.date()
46
+ });
47
+ const notificationListDevicesOutputSchema = zod.z.array(notificationDeviceSelectSchema);
48
+ const notificationVapidPublicKeyOutputSchema = zod.z.object({ publicKey: zod.z.string() });
49
+ const notificationSendLogSelectSchema = zod.z.object({
50
+ id: zod.z.string(),
51
+ batchId: zod.z.string(),
52
+ userId: zod.z.string(),
53
+ deviceId: zod.z.string(),
54
+ provider: notificationProviderSchema,
55
+ title: zod.z.string(),
56
+ body: zod.z.string(),
57
+ data: zod.z.record(zod.z.string(), zod.z.unknown()).nullable(),
58
+ status: notificationSendStatusSchema,
59
+ error: zod.z.string().nullable(),
60
+ jobId: zod.z.string().nullable(),
61
+ createdAt: zod.z.date(),
62
+ updatedAt: zod.z.date()
63
+ });
64
+ const notificationListSendLogsInputSchema = zod.z.object({
65
+ batchId: zod.z.string().optional(),
66
+ limit: zod.z.number().int().min(1).max(100).optional()
67
+ });
68
+ const notificationListSendLogsOutputSchema = zod.z.array(notificationSendLogSelectSchema);
69
+ const notificationSendTestInputSchema = zod.z.object({
70
+ userId: zod.z.string().optional(),
71
+ title: zod.z.string().min(1).max(200),
72
+ body: zod.z.string().min(1).max(2e3),
73
+ data: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
74
+ });
75
+ const notificationSendTestOutputSchema = zod.z.object({
76
+ batchId: zod.z.string(),
77
+ jobId: zod.z.string()
78
+ });
79
+ //#endregion
80
+ exports.notificationDeviceSelectSchema = notificationDeviceSelectSchema;
81
+ exports.notificationListDevicesOutputSchema = notificationListDevicesOutputSchema;
82
+ exports.notificationListSendLogsInputSchema = notificationListSendLogsInputSchema;
83
+ exports.notificationListSendLogsOutputSchema = notificationListSendLogsOutputSchema;
84
+ exports.notificationPlatformSchema = notificationPlatformSchema;
85
+ exports.notificationProviderSchema = notificationProviderSchema;
86
+ exports.notificationRegisterDeviceInputSchema = notificationRegisterDeviceInputSchema;
87
+ exports.notificationRegisterDeviceOutputSchema = notificationRegisterDeviceOutputSchema;
88
+ exports.notificationSendLogSelectSchema = notificationSendLogSelectSchema;
89
+ exports.notificationSendStatusSchema = notificationSendStatusSchema;
90
+ exports.notificationSendTestInputSchema = notificationSendTestInputSchema;
91
+ exports.notificationSendTestOutputSchema = notificationSendTestOutputSchema;
92
+ exports.notificationUnregisterDeviceInputSchema = notificationUnregisterDeviceInputSchema;
93
+ exports.notificationUnregisterDeviceOutputSchema = notificationUnregisterDeviceOutputSchema;
94
+ exports.notificationVapidPublicKeyOutputSchema = notificationVapidPublicKeyOutputSchema;
95
+ exports.pushSubscriptionJsonSchema = pushSubscriptionJsonSchema;
96
+
97
+ //# sourceMappingURL=notification.schema.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.schema.cjs","names":["z","NOTIFICATION_PLATFORMS","NOTIFICATION_PROVIDERS","NOTIFICATION_SEND_STATUSES"],"sources":["../../../../src/modules/notification/notification.schema.ts"],"sourcesContent":["import { z } from \"zod\";\r\nimport {\r\n NOTIFICATION_PLATFORMS,\r\n NOTIFICATION_PROVIDERS,\r\n NOTIFICATION_SEND_STATUSES,\r\n} from \"./notification.constants\";\r\n\r\nexport const notificationPlatformSchema = z.enum(NOTIFICATION_PLATFORMS);\r\nexport const notificationProviderSchema = z.enum(NOTIFICATION_PROVIDERS);\r\nexport const notificationSendStatusSchema = z.enum(NOTIFICATION_SEND_STATUSES);\r\n\r\n/** Web Push `PushSubscriptionJSON` subset we persist and accept from clients. */\r\nexport const pushSubscriptionJsonSchema = z.object({\r\n endpoint: z.string().url(),\r\n expirationTime: z.number().nullable().optional(),\r\n keys: z.object({\r\n p256dh: z.string(),\r\n auth: z.string(),\r\n }),\r\n});\r\n\r\nexport const notificationRegisterDeviceInputSchema = z.discriminatedUnion(\"platform\", [\r\n z.object({\r\n platform: z.literal(\"web\"),\r\n subscription: pushSubscriptionJsonSchema,\r\n label: z.string().max(120).optional(),\r\n }),\r\n z.object({\r\n platform: z.literal(\"ios\"),\r\n token: z.string().min(1).max(4096),\r\n label: z.string().max(120).optional(),\r\n }),\r\n z.object({\r\n platform: z.literal(\"android\"),\r\n token: z.string().min(1).max(4096),\r\n label: z.string().max(120).optional(),\r\n }),\r\n]);\r\n\r\nexport type NotificationRegisterDeviceInput = z.infer<typeof notificationRegisterDeviceInputSchema>;\r\n\r\nexport const notificationRegisterDeviceOutputSchema = z.object({\r\n deviceId: z.string(),\r\n});\r\n\r\nexport const notificationUnregisterDeviceInputSchema = z.object({\r\n deviceId: z.string(),\r\n});\r\n\r\nexport const notificationUnregisterDeviceOutputSchema = z.object({\r\n ok: z.literal(true),\r\n});\r\n\r\nexport const notificationDeviceSelectSchema = z.object({\r\n id: z.string(),\r\n userId: z.string(),\r\n platform: notificationPlatformSchema,\r\n endpoint: z.string().nullable(),\r\n label: z.string().nullable(),\r\n enabled: z.boolean(),\r\n createdAt: z.date(),\r\n updatedAt: z.date(),\r\n});\r\n\r\nexport const notificationListDevicesOutputSchema = z.array(notificationDeviceSelectSchema);\r\n\r\nexport const notificationVapidPublicKeyOutputSchema = z.object({\r\n publicKey: z.string(),\r\n});\r\n\r\nexport const notificationSendLogSelectSchema = z.object({\r\n id: z.string(),\r\n batchId: z.string(),\r\n userId: z.string(),\r\n deviceId: z.string(),\r\n provider: notificationProviderSchema,\r\n title: z.string(),\r\n body: z.string(),\r\n data: z.record(z.string(), z.unknown()).nullable(),\r\n status: notificationSendStatusSchema,\r\n error: z.string().nullable(),\r\n jobId: z.string().nullable(),\r\n createdAt: z.date(),\r\n updatedAt: z.date(),\r\n});\r\n\r\nexport const notificationListSendLogsInputSchema = z.object({\r\n batchId: z.string().optional(),\r\n limit: z.number().int().min(1).max(100).optional(),\r\n});\r\n\r\nexport const notificationListSendLogsOutputSchema = z.array(notificationSendLogSelectSchema);\r\n\r\nexport const notificationSendTestInputSchema = z.object({\r\n userId: z.string().optional(),\r\n title: z.string().min(1).max(200),\r\n body: z.string().min(1).max(2000),\r\n data: z.record(z.string(), z.unknown()).optional(),\r\n});\r\n\r\nexport const notificationSendTestOutputSchema = z.object({\r\n batchId: z.string(),\r\n jobId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OAAOA,IAAAA,EAAE,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,UAAU;CACnD,CAAC;AAEF,MAAa,uCAAuCA,IAAAA,EAAE,MAAM,gCAAgC;AAE5F,MAAa,kCAAkCA,IAAAA,EAAE,OAAO;CACtD,QAAQA,IAAAA,EAAE,QAAQ,CAAC,UAAU;CAC7B,OAAOA,IAAAA,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,IAAI;CACjC,MAAMA,IAAAA,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,IAAK;CACjC,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,QAAQ,EAAEA,IAAAA,EAAE,SAAS,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,MAAa,mCAAmCA,IAAAA,EAAE,OAAO;CACvD,SAASA,IAAAA,EAAE,QAAQ;CACnB,OAAOA,IAAAA,EAAE,QAAQ;CAClB,CAAC"}
@@ -0,0 +1,151 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/modules/notification/notification.schema.d.ts
4
+ declare const notificationPlatformSchema: z.ZodEnum<{
5
+ web: "web";
6
+ ios: "ios";
7
+ android: "android";
8
+ }>;
9
+ declare const notificationProviderSchema: z.ZodEnum<{
10
+ web: "web";
11
+ apn: "apn";
12
+ fcm: "fcm";
13
+ }>;
14
+ declare const notificationSendStatusSchema: z.ZodEnum<{
15
+ pending: "pending";
16
+ sent: "sent";
17
+ failed: "failed";
18
+ }>;
19
+ /** Web Push `PushSubscriptionJSON` subset we persist and accept from clients. */
20
+ declare const pushSubscriptionJsonSchema: z.ZodObject<{
21
+ endpoint: z.ZodString;
22
+ expirationTime: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
23
+ keys: z.ZodObject<{
24
+ p256dh: z.ZodString;
25
+ auth: z.ZodString;
26
+ }, z.core.$strip>;
27
+ }, z.core.$strip>;
28
+ declare const notificationRegisterDeviceInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
29
+ platform: z.ZodLiteral<"web">;
30
+ subscription: z.ZodObject<{
31
+ endpoint: z.ZodString;
32
+ expirationTime: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
+ keys: z.ZodObject<{
34
+ p256dh: z.ZodString;
35
+ auth: z.ZodString;
36
+ }, z.core.$strip>;
37
+ }, z.core.$strip>;
38
+ label: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ platform: z.ZodLiteral<"ios">;
41
+ token: z.ZodString;
42
+ label: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strip>, z.ZodObject<{
44
+ platform: z.ZodLiteral<"android">;
45
+ token: z.ZodString;
46
+ label: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strip>], "platform">;
48
+ type NotificationRegisterDeviceInput = z.infer<typeof notificationRegisterDeviceInputSchema>;
49
+ declare const notificationRegisterDeviceOutputSchema: z.ZodObject<{
50
+ deviceId: z.ZodString;
51
+ }, z.core.$strip>;
52
+ declare const notificationUnregisterDeviceInputSchema: z.ZodObject<{
53
+ deviceId: z.ZodString;
54
+ }, z.core.$strip>;
55
+ declare const notificationUnregisterDeviceOutputSchema: z.ZodObject<{
56
+ ok: z.ZodLiteral<true>;
57
+ }, z.core.$strip>;
58
+ declare const notificationDeviceSelectSchema: z.ZodObject<{
59
+ id: z.ZodString;
60
+ userId: z.ZodString;
61
+ platform: z.ZodEnum<{
62
+ web: "web";
63
+ ios: "ios";
64
+ android: "android";
65
+ }>;
66
+ endpoint: z.ZodNullable<z.ZodString>;
67
+ label: z.ZodNullable<z.ZodString>;
68
+ enabled: z.ZodBoolean;
69
+ createdAt: z.ZodDate;
70
+ updatedAt: z.ZodDate;
71
+ }, z.core.$strip>;
72
+ declare const notificationListDevicesOutputSchema: z.ZodArray<z.ZodObject<{
73
+ id: z.ZodString;
74
+ userId: z.ZodString;
75
+ platform: z.ZodEnum<{
76
+ web: "web";
77
+ ios: "ios";
78
+ android: "android";
79
+ }>;
80
+ endpoint: z.ZodNullable<z.ZodString>;
81
+ label: z.ZodNullable<z.ZodString>;
82
+ enabled: z.ZodBoolean;
83
+ createdAt: z.ZodDate;
84
+ updatedAt: z.ZodDate;
85
+ }, z.core.$strip>>;
86
+ declare const notificationVapidPublicKeyOutputSchema: z.ZodObject<{
87
+ publicKey: z.ZodString;
88
+ }, z.core.$strip>;
89
+ declare const notificationSendLogSelectSchema: z.ZodObject<{
90
+ id: z.ZodString;
91
+ batchId: z.ZodString;
92
+ userId: z.ZodString;
93
+ deviceId: z.ZodString;
94
+ provider: z.ZodEnum<{
95
+ web: "web";
96
+ apn: "apn";
97
+ fcm: "fcm";
98
+ }>;
99
+ title: z.ZodString;
100
+ body: z.ZodString;
101
+ data: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
102
+ status: z.ZodEnum<{
103
+ pending: "pending";
104
+ sent: "sent";
105
+ failed: "failed";
106
+ }>;
107
+ error: z.ZodNullable<z.ZodString>;
108
+ jobId: z.ZodNullable<z.ZodString>;
109
+ createdAt: z.ZodDate;
110
+ updatedAt: z.ZodDate;
111
+ }, z.core.$strip>;
112
+ declare const notificationListSendLogsInputSchema: z.ZodObject<{
113
+ batchId: z.ZodOptional<z.ZodString>;
114
+ limit: z.ZodOptional<z.ZodNumber>;
115
+ }, z.core.$strip>;
116
+ declare const notificationListSendLogsOutputSchema: z.ZodArray<z.ZodObject<{
117
+ id: z.ZodString;
118
+ batchId: z.ZodString;
119
+ userId: z.ZodString;
120
+ deviceId: z.ZodString;
121
+ provider: z.ZodEnum<{
122
+ web: "web";
123
+ apn: "apn";
124
+ fcm: "fcm";
125
+ }>;
126
+ title: z.ZodString;
127
+ body: z.ZodString;
128
+ data: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
129
+ status: z.ZodEnum<{
130
+ pending: "pending";
131
+ sent: "sent";
132
+ failed: "failed";
133
+ }>;
134
+ error: z.ZodNullable<z.ZodString>;
135
+ jobId: z.ZodNullable<z.ZodString>;
136
+ createdAt: z.ZodDate;
137
+ updatedAt: z.ZodDate;
138
+ }, z.core.$strip>>;
139
+ declare const notificationSendTestInputSchema: z.ZodObject<{
140
+ userId: z.ZodOptional<z.ZodString>;
141
+ title: z.ZodString;
142
+ body: z.ZodString;
143
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
144
+ }, z.core.$strip>;
145
+ declare const notificationSendTestOutputSchema: z.ZodObject<{
146
+ batchId: z.ZodString;
147
+ jobId: z.ZodString;
148
+ }, z.core.$strip>;
149
+ //#endregion
150
+ export { NotificationRegisterDeviceInput, notificationDeviceSelectSchema, notificationListDevicesOutputSchema, notificationListSendLogsInputSchema, notificationListSendLogsOutputSchema, notificationPlatformSchema, notificationProviderSchema, notificationRegisterDeviceInputSchema, notificationRegisterDeviceOutputSchema, notificationSendLogSelectSchema, notificationSendStatusSchema, notificationSendTestInputSchema, notificationSendTestOutputSchema, notificationUnregisterDeviceInputSchema, notificationUnregisterDeviceOutputSchema, notificationVapidPublicKeyOutputSchema, pushSubscriptionJsonSchema };
151
+ //# sourceMappingURL=notification.schema.d.cts.map
@@ -0,0 +1,151 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/modules/notification/notification.schema.d.ts
4
+ declare const notificationPlatformSchema: z.ZodEnum<{
5
+ web: "web";
6
+ ios: "ios";
7
+ android: "android";
8
+ }>;
9
+ declare const notificationProviderSchema: z.ZodEnum<{
10
+ web: "web";
11
+ apn: "apn";
12
+ fcm: "fcm";
13
+ }>;
14
+ declare const notificationSendStatusSchema: z.ZodEnum<{
15
+ pending: "pending";
16
+ sent: "sent";
17
+ failed: "failed";
18
+ }>;
19
+ /** Web Push `PushSubscriptionJSON` subset we persist and accept from clients. */
20
+ declare const pushSubscriptionJsonSchema: z.ZodObject<{
21
+ endpoint: z.ZodString;
22
+ expirationTime: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
23
+ keys: z.ZodObject<{
24
+ p256dh: z.ZodString;
25
+ auth: z.ZodString;
26
+ }, z.core.$strip>;
27
+ }, z.core.$strip>;
28
+ declare const notificationRegisterDeviceInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
29
+ platform: z.ZodLiteral<"web">;
30
+ subscription: z.ZodObject<{
31
+ endpoint: z.ZodString;
32
+ expirationTime: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
+ keys: z.ZodObject<{
34
+ p256dh: z.ZodString;
35
+ auth: z.ZodString;
36
+ }, z.core.$strip>;
37
+ }, z.core.$strip>;
38
+ label: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ platform: z.ZodLiteral<"ios">;
41
+ token: z.ZodString;
42
+ label: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strip>, z.ZodObject<{
44
+ platform: z.ZodLiteral<"android">;
45
+ token: z.ZodString;
46
+ label: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strip>], "platform">;
48
+ type NotificationRegisterDeviceInput = z.infer<typeof notificationRegisterDeviceInputSchema>;
49
+ declare const notificationRegisterDeviceOutputSchema: z.ZodObject<{
50
+ deviceId: z.ZodString;
51
+ }, z.core.$strip>;
52
+ declare const notificationUnregisterDeviceInputSchema: z.ZodObject<{
53
+ deviceId: z.ZodString;
54
+ }, z.core.$strip>;
55
+ declare const notificationUnregisterDeviceOutputSchema: z.ZodObject<{
56
+ ok: z.ZodLiteral<true>;
57
+ }, z.core.$strip>;
58
+ declare const notificationDeviceSelectSchema: z.ZodObject<{
59
+ id: z.ZodString;
60
+ userId: z.ZodString;
61
+ platform: z.ZodEnum<{
62
+ web: "web";
63
+ ios: "ios";
64
+ android: "android";
65
+ }>;
66
+ endpoint: z.ZodNullable<z.ZodString>;
67
+ label: z.ZodNullable<z.ZodString>;
68
+ enabled: z.ZodBoolean;
69
+ createdAt: z.ZodDate;
70
+ updatedAt: z.ZodDate;
71
+ }, z.core.$strip>;
72
+ declare const notificationListDevicesOutputSchema: z.ZodArray<z.ZodObject<{
73
+ id: z.ZodString;
74
+ userId: z.ZodString;
75
+ platform: z.ZodEnum<{
76
+ web: "web";
77
+ ios: "ios";
78
+ android: "android";
79
+ }>;
80
+ endpoint: z.ZodNullable<z.ZodString>;
81
+ label: z.ZodNullable<z.ZodString>;
82
+ enabled: z.ZodBoolean;
83
+ createdAt: z.ZodDate;
84
+ updatedAt: z.ZodDate;
85
+ }, z.core.$strip>>;
86
+ declare const notificationVapidPublicKeyOutputSchema: z.ZodObject<{
87
+ publicKey: z.ZodString;
88
+ }, z.core.$strip>;
89
+ declare const notificationSendLogSelectSchema: z.ZodObject<{
90
+ id: z.ZodString;
91
+ batchId: z.ZodString;
92
+ userId: z.ZodString;
93
+ deviceId: z.ZodString;
94
+ provider: z.ZodEnum<{
95
+ web: "web";
96
+ apn: "apn";
97
+ fcm: "fcm";
98
+ }>;
99
+ title: z.ZodString;
100
+ body: z.ZodString;
101
+ data: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
102
+ status: z.ZodEnum<{
103
+ pending: "pending";
104
+ sent: "sent";
105
+ failed: "failed";
106
+ }>;
107
+ error: z.ZodNullable<z.ZodString>;
108
+ jobId: z.ZodNullable<z.ZodString>;
109
+ createdAt: z.ZodDate;
110
+ updatedAt: z.ZodDate;
111
+ }, z.core.$strip>;
112
+ declare const notificationListSendLogsInputSchema: z.ZodObject<{
113
+ batchId: z.ZodOptional<z.ZodString>;
114
+ limit: z.ZodOptional<z.ZodNumber>;
115
+ }, z.core.$strip>;
116
+ declare const notificationListSendLogsOutputSchema: z.ZodArray<z.ZodObject<{
117
+ id: z.ZodString;
118
+ batchId: z.ZodString;
119
+ userId: z.ZodString;
120
+ deviceId: z.ZodString;
121
+ provider: z.ZodEnum<{
122
+ web: "web";
123
+ apn: "apn";
124
+ fcm: "fcm";
125
+ }>;
126
+ title: z.ZodString;
127
+ body: z.ZodString;
128
+ data: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
129
+ status: z.ZodEnum<{
130
+ pending: "pending";
131
+ sent: "sent";
132
+ failed: "failed";
133
+ }>;
134
+ error: z.ZodNullable<z.ZodString>;
135
+ jobId: z.ZodNullable<z.ZodString>;
136
+ createdAt: z.ZodDate;
137
+ updatedAt: z.ZodDate;
138
+ }, z.core.$strip>>;
139
+ declare const notificationSendTestInputSchema: z.ZodObject<{
140
+ userId: z.ZodOptional<z.ZodString>;
141
+ title: z.ZodString;
142
+ body: z.ZodString;
143
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
144
+ }, z.core.$strip>;
145
+ declare const notificationSendTestOutputSchema: z.ZodObject<{
146
+ batchId: z.ZodString;
147
+ jobId: z.ZodString;
148
+ }, z.core.$strip>;
149
+ //#endregion
150
+ export { NotificationRegisterDeviceInput, notificationDeviceSelectSchema, notificationListDevicesOutputSchema, notificationListSendLogsInputSchema, notificationListSendLogsOutputSchema, notificationPlatformSchema, notificationProviderSchema, notificationRegisterDeviceInputSchema, notificationRegisterDeviceOutputSchema, notificationSendLogSelectSchema, notificationSendStatusSchema, notificationSendTestInputSchema, notificationSendTestOutputSchema, notificationUnregisterDeviceInputSchema, notificationUnregisterDeviceOutputSchema, notificationVapidPublicKeyOutputSchema, pushSubscriptionJsonSchema };
151
+ //# sourceMappingURL=notification.schema.d.mts.map
@@ -0,0 +1,81 @@
1
+ import { NOTIFICATION_PLATFORMS, NOTIFICATION_PROVIDERS, NOTIFICATION_SEND_STATUSES } from "./notification.constants.mjs";
2
+ import { z } from "zod";
3
+ //#region src/modules/notification/notification.schema.ts
4
+ const notificationPlatformSchema = z.enum(NOTIFICATION_PLATFORMS);
5
+ const notificationProviderSchema = z.enum(NOTIFICATION_PROVIDERS);
6
+ const notificationSendStatusSchema = z.enum(NOTIFICATION_SEND_STATUSES);
7
+ /** Web Push `PushSubscriptionJSON` subset we persist and accept from clients. */
8
+ const pushSubscriptionJsonSchema = z.object({
9
+ endpoint: z.string().url(),
10
+ expirationTime: z.number().nullable().optional(),
11
+ keys: z.object({
12
+ p256dh: z.string(),
13
+ auth: z.string()
14
+ })
15
+ });
16
+ const notificationRegisterDeviceInputSchema = z.discriminatedUnion("platform", [
17
+ z.object({
18
+ platform: z.literal("web"),
19
+ subscription: pushSubscriptionJsonSchema,
20
+ label: z.string().max(120).optional()
21
+ }),
22
+ z.object({
23
+ platform: z.literal("ios"),
24
+ token: z.string().min(1).max(4096),
25
+ label: z.string().max(120).optional()
26
+ }),
27
+ z.object({
28
+ platform: z.literal("android"),
29
+ token: z.string().min(1).max(4096),
30
+ label: z.string().max(120).optional()
31
+ })
32
+ ]);
33
+ const notificationRegisterDeviceOutputSchema = z.object({ deviceId: z.string() });
34
+ const notificationUnregisterDeviceInputSchema = z.object({ deviceId: z.string() });
35
+ const notificationUnregisterDeviceOutputSchema = z.object({ ok: z.literal(true) });
36
+ const notificationDeviceSelectSchema = z.object({
37
+ id: z.string(),
38
+ userId: z.string(),
39
+ platform: notificationPlatformSchema,
40
+ endpoint: z.string().nullable(),
41
+ label: z.string().nullable(),
42
+ enabled: z.boolean(),
43
+ createdAt: z.date(),
44
+ updatedAt: z.date()
45
+ });
46
+ const notificationListDevicesOutputSchema = z.array(notificationDeviceSelectSchema);
47
+ const notificationVapidPublicKeyOutputSchema = z.object({ publicKey: z.string() });
48
+ const notificationSendLogSelectSchema = z.object({
49
+ id: z.string(),
50
+ batchId: z.string(),
51
+ userId: z.string(),
52
+ deviceId: z.string(),
53
+ provider: notificationProviderSchema,
54
+ title: z.string(),
55
+ body: z.string(),
56
+ data: z.record(z.string(), z.unknown()).nullable(),
57
+ status: notificationSendStatusSchema,
58
+ error: z.string().nullable(),
59
+ jobId: z.string().nullable(),
60
+ createdAt: z.date(),
61
+ updatedAt: z.date()
62
+ });
63
+ const notificationListSendLogsInputSchema = z.object({
64
+ batchId: z.string().optional(),
65
+ limit: z.number().int().min(1).max(100).optional()
66
+ });
67
+ const notificationListSendLogsOutputSchema = z.array(notificationSendLogSelectSchema);
68
+ const notificationSendTestInputSchema = z.object({
69
+ userId: z.string().optional(),
70
+ title: z.string().min(1).max(200),
71
+ body: z.string().min(1).max(2e3),
72
+ data: z.record(z.string(), z.unknown()).optional()
73
+ });
74
+ const notificationSendTestOutputSchema = z.object({
75
+ batchId: z.string(),
76
+ jobId: z.string()
77
+ });
78
+ //#endregion
79
+ export { notificationDeviceSelectSchema, notificationListDevicesOutputSchema, notificationListSendLogsInputSchema, notificationListSendLogsOutputSchema, notificationPlatformSchema, notificationProviderSchema, notificationRegisterDeviceInputSchema, notificationRegisterDeviceOutputSchema, notificationSendLogSelectSchema, notificationSendStatusSchema, notificationSendTestInputSchema, notificationSendTestOutputSchema, notificationUnregisterDeviceInputSchema, notificationUnregisterDeviceOutputSchema, notificationVapidPublicKeyOutputSchema, pushSubscriptionJsonSchema };
80
+
81
+ //# sourceMappingURL=notification.schema.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.schema.mjs","names":[],"sources":["../../../../src/modules/notification/notification.schema.ts"],"sourcesContent":["import { z } from \"zod\";\r\nimport {\r\n NOTIFICATION_PLATFORMS,\r\n NOTIFICATION_PROVIDERS,\r\n NOTIFICATION_SEND_STATUSES,\r\n} from \"./notification.constants\";\r\n\r\nexport const notificationPlatformSchema = z.enum(NOTIFICATION_PLATFORMS);\r\nexport const notificationProviderSchema = z.enum(NOTIFICATION_PROVIDERS);\r\nexport const notificationSendStatusSchema = z.enum(NOTIFICATION_SEND_STATUSES);\r\n\r\n/** Web Push `PushSubscriptionJSON` subset we persist and accept from clients. */\r\nexport const pushSubscriptionJsonSchema = z.object({\r\n endpoint: z.string().url(),\r\n expirationTime: z.number().nullable().optional(),\r\n keys: z.object({\r\n p256dh: z.string(),\r\n auth: z.string(),\r\n }),\r\n});\r\n\r\nexport const notificationRegisterDeviceInputSchema = z.discriminatedUnion(\"platform\", [\r\n z.object({\r\n platform: z.literal(\"web\"),\r\n subscription: pushSubscriptionJsonSchema,\r\n label: z.string().max(120).optional(),\r\n }),\r\n z.object({\r\n platform: z.literal(\"ios\"),\r\n token: z.string().min(1).max(4096),\r\n label: z.string().max(120).optional(),\r\n }),\r\n z.object({\r\n platform: z.literal(\"android\"),\r\n token: z.string().min(1).max(4096),\r\n label: z.string().max(120).optional(),\r\n }),\r\n]);\r\n\r\nexport type NotificationRegisterDeviceInput = z.infer<typeof notificationRegisterDeviceInputSchema>;\r\n\r\nexport const notificationRegisterDeviceOutputSchema = z.object({\r\n deviceId: z.string(),\r\n});\r\n\r\nexport const notificationUnregisterDeviceInputSchema = z.object({\r\n deviceId: z.string(),\r\n});\r\n\r\nexport const notificationUnregisterDeviceOutputSchema = z.object({\r\n ok: z.literal(true),\r\n});\r\n\r\nexport const notificationDeviceSelectSchema = z.object({\r\n id: z.string(),\r\n userId: z.string(),\r\n platform: notificationPlatformSchema,\r\n endpoint: z.string().nullable(),\r\n label: z.string().nullable(),\r\n enabled: z.boolean(),\r\n createdAt: z.date(),\r\n updatedAt: z.date(),\r\n});\r\n\r\nexport const notificationListDevicesOutputSchema = z.array(notificationDeviceSelectSchema);\r\n\r\nexport const notificationVapidPublicKeyOutputSchema = z.object({\r\n publicKey: z.string(),\r\n});\r\n\r\nexport const notificationSendLogSelectSchema = z.object({\r\n id: z.string(),\r\n batchId: z.string(),\r\n userId: z.string(),\r\n deviceId: z.string(),\r\n provider: notificationProviderSchema,\r\n title: z.string(),\r\n body: z.string(),\r\n data: z.record(z.string(), z.unknown()).nullable(),\r\n status: notificationSendStatusSchema,\r\n error: z.string().nullable(),\r\n jobId: z.string().nullable(),\r\n createdAt: z.date(),\r\n updatedAt: z.date(),\r\n});\r\n\r\nexport const notificationListSendLogsInputSchema = z.object({\r\n batchId: z.string().optional(),\r\n limit: z.number().int().min(1).max(100).optional(),\r\n});\r\n\r\nexport const notificationListSendLogsOutputSchema = z.array(notificationSendLogSelectSchema);\r\n\r\nexport const notificationSendTestInputSchema = z.object({\r\n userId: z.string().optional(),\r\n title: z.string().min(1).max(200),\r\n body: z.string().min(1).max(2000),\r\n data: z.record(z.string(), z.unknown()).optional(),\r\n});\r\n\r\nexport const notificationSendTestOutputSchema = z.object({\r\n batchId: z.string(),\r\n jobId: z.string(),\r\n});"],"mappings":";;;AAOA,MAAa,6BAA6B,EAAE,KAAK,uBAAuB;AACxE,MAAa,6BAA6B,EAAE,KAAK,uBAAuB;AACxE,MAAa,+BAA+B,EAAE,KAAK,2BAA2B;;AAG9E,MAAa,6BAA6B,EAAE,OAAO;CACjD,UAAU,EAAE,QAAQ,CAAC,KAAK;CAC1B,gBAAgB,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;CAChD,MAAM,EAAE,OAAO;EACb,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,QAAQ;EACjB,CAAC;CACH,CAAC;AAEF,MAAa,wCAAwC,EAAE,mBAAmB,YAAY;CACpF,EAAE,OAAO;EACP,UAAU,EAAE,QAAQ,MAAM;EAC1B,cAAc;EACd,OAAO,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,UAAU;EACtC,CAAC;CACF,EAAE,OAAO;EACP,UAAU,EAAE,QAAQ,MAAM;EAC1B,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,KAAK;EAClC,OAAO,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,UAAU;EACtC,CAAC;CACF,EAAE,OAAO;EACP,UAAU,EAAE,QAAQ,UAAU;EAC9B,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,KAAK;EAClC,OAAO,EAAE,QAAQ,CAAC,IAAI,IAAI,CAAC,UAAU;EACtC,CAAC;CACH,CAAC;AAIF,MAAa,yCAAyC,EAAE,OAAO,EAC7D,UAAU,EAAE,QAAQ,EACrB,CAAC;AAEF,MAAa,0CAA0C,EAAE,OAAO,EAC9D,UAAU,EAAE,QAAQ,EACrB,CAAC;AAEF,MAAa,2CAA2C,EAAE,OAAO,EAC/D,IAAI,EAAE,QAAQ,KAAK,EACpB,CAAC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AAE,EAAE,SAAS,CAAC,CAAC,UAAU;CACnD,CAAC;AAEF,MAAa,mCAAmC,EAAE,OAAO;CACvD,SAAS,EAAE,QAAQ;CACnB,OAAO,EAAE,QAAQ;CAClB,CAAC"}
@@ -38,6 +38,7 @@ declare const recurrenceRulesSchema: z.ZodObject<{
38
38
  }, z.core.$strip>;
39
39
  declare const updateRecurrenceRulesSchema: z.ZodObject<{
40
40
  id: z.ZodString;
41
+ interval: z.ZodNumber;
41
42
  bysetpos: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
42
43
  bymonth: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
43
44
  bymonthday: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
@@ -49,7 +50,6 @@ declare const updateRecurrenceRulesSchema: z.ZodObject<{
49
50
  bysecond: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
50
51
  freq: z.ZodNumber;
51
52
  dtstart: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
52
- interval: z.ZodNumber;
53
53
  wkst: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
54
54
  count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
55
55
  until: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
@@ -61,6 +61,7 @@ declare const createRecurrenceSchema: z.ZodObject<{
61
61
  enabled: z.ZodBoolean;
62
62
  metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
63
63
  recurrenceRules: z.ZodArray<z.ZodObject<{
64
+ interval: z.ZodNumber;
64
65
  bysetpos: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
65
66
  bymonth: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
66
67
  bymonthday: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
@@ -72,7 +73,6 @@ declare const createRecurrenceSchema: z.ZodObject<{
72
73
  bysecond: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
73
74
  freq: z.ZodNumber;
74
75
  dtstart: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
75
- interval: z.ZodNumber;
76
76
  wkst: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
77
77
  count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
78
78
  until: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
@@ -38,6 +38,7 @@ declare const recurrenceRulesSchema: z.ZodObject<{
38
38
  }, z.core.$strip>;
39
39
  declare const updateRecurrenceRulesSchema: z.ZodObject<{
40
40
  id: z.ZodString;
41
+ interval: z.ZodNumber;
41
42
  bysetpos: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
42
43
  bymonth: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
43
44
  bymonthday: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
@@ -49,7 +50,6 @@ declare const updateRecurrenceRulesSchema: z.ZodObject<{
49
50
  bysecond: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
50
51
  freq: z.ZodNumber;
51
52
  dtstart: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
52
- interval: z.ZodNumber;
53
53
  wkst: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
54
54
  count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
55
55
  until: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
@@ -61,6 +61,7 @@ declare const createRecurrenceSchema: z.ZodObject<{
61
61
  enabled: z.ZodBoolean;
62
62
  metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
63
63
  recurrenceRules: z.ZodArray<z.ZodObject<{
64
+ interval: z.ZodNumber;
64
65
  bysetpos: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
65
66
  bymonth: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
66
67
  bymonthday: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
@@ -72,7 +73,6 @@ declare const createRecurrenceSchema: z.ZodObject<{
72
73
  bysecond: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
73
74
  freq: z.ZodNumber;
74
75
  dtstart: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
75
- interval: z.ZodNumber;
76
76
  wkst: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
77
77
  count: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
78
78
  until: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
@@ -11,10 +11,10 @@ declare const workflowSelectSchema: z.ZodObject<{
11
11
  input: z.ZodUnknown;
12
12
  output: z.ZodUnknown;
13
13
  status: z.ZodEnum<{
14
+ failed: "failed";
14
15
  queued: "queued";
15
16
  running: "running";
16
17
  completed: "completed";
17
- failed: "failed";
18
18
  }>;
19
19
  error: z.ZodNullable<z.ZodString>;
20
20
  retries: z.ZodNumber;
@@ -28,10 +28,10 @@ declare const workflowReadInputSchema: z.ZodObject<{
28
28
  }, z.core.$strip>;
29
29
  declare const workflowListInputSchema: z.ZodObject<{
30
30
  status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
31
+ failed: "failed";
31
32
  queued: "queued";
32
33
  running: "running";
33
34
  completed: "completed";
34
- failed: "failed";
35
35
  }>>>;
36
36
  jobName: z.ZodOptional<z.ZodString>;
37
37
  }, z.core.$strip>;
@@ -51,10 +51,10 @@ declare const workflowReadOutputSchema: z.ZodObject<{
51
51
  input: z.ZodUnknown;
52
52
  output: z.ZodUnknown;
53
53
  status: z.ZodEnum<{
54
+ failed: "failed";
54
55
  queued: "queued";
55
56
  running: "running";
56
57
  completed: "completed";
57
- failed: "failed";
58
58
  }>;
59
59
  error: z.ZodNullable<z.ZodString>;
60
60
  retries: z.ZodNumber;
@@ -73,10 +73,10 @@ declare const workflowListOutputSchema: z.ZodArray<z.ZodObject<{
73
73
  input: z.ZodUnknown;
74
74
  output: z.ZodUnknown;
75
75
  status: z.ZodEnum<{
76
+ failed: "failed";
76
77
  queued: "queued";
77
78
  running: "running";
78
79
  completed: "completed";
79
- failed: "failed";
80
80
  }>;
81
81
  error: z.ZodNullable<z.ZodString>;
82
82
  retries: z.ZodNumber;
@@ -11,10 +11,10 @@ declare const workflowSelectSchema: z.ZodObject<{
11
11
  input: z.ZodUnknown;
12
12
  output: z.ZodUnknown;
13
13
  status: z.ZodEnum<{
14
+ failed: "failed";
14
15
  queued: "queued";
15
16
  running: "running";
16
17
  completed: "completed";
17
- failed: "failed";
18
18
  }>;
19
19
  error: z.ZodNullable<z.ZodString>;
20
20
  retries: z.ZodNumber;
@@ -28,10 +28,10 @@ declare const workflowReadInputSchema: z.ZodObject<{
28
28
  }, z.core.$strip>;
29
29
  declare const workflowListInputSchema: z.ZodObject<{
30
30
  status: z.ZodOptional<z.ZodArray<z.ZodEnum<{
31
+ failed: "failed";
31
32
  queued: "queued";
32
33
  running: "running";
33
34
  completed: "completed";
34
- failed: "failed";
35
35
  }>>>;
36
36
  jobName: z.ZodOptional<z.ZodString>;
37
37
  }, z.core.$strip>;
@@ -51,10 +51,10 @@ declare const workflowReadOutputSchema: z.ZodObject<{
51
51
  input: z.ZodUnknown;
52
52
  output: z.ZodUnknown;
53
53
  status: z.ZodEnum<{
54
+ failed: "failed";
54
55
  queued: "queued";
55
56
  running: "running";
56
57
  completed: "completed";
57
- failed: "failed";
58
58
  }>;
59
59
  error: z.ZodNullable<z.ZodString>;
60
60
  retries: z.ZodNumber;
@@ -73,10 +73,10 @@ declare const workflowListOutputSchema: z.ZodArray<z.ZodObject<{
73
73
  input: z.ZodUnknown;
74
74
  output: z.ZodUnknown;
75
75
  status: z.ZodEnum<{
76
+ failed: "failed";
76
77
  queued: "queued";
77
78
  running: "running";
78
79
  completed: "completed";
79
- failed: "failed";
80
80
  }>;
81
81
  error: z.ZodNullable<z.ZodString>;
82
82
  retries: z.ZodNumber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m5kdev/commons",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "license": "GPL-3.0-only",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "devDependencies": {
19
19
  "tsdown": "0.21.7",
20
20
  "typescript": "5.9.2",
21
- "@m5kdev/config": "0.12.0"
21
+ "@m5kdev/config": "0.13.0"
22
22
  },
23
23
  "exports": {
24
24
  "./utils/*": {
@@ -121,6 +121,16 @@
121
121
  "default": "./dist/src/modules/workflow/*.cjs"
122
122
  }
123
123
  },
124
+ "./modules/notification/*": {
125
+ "import": {
126
+ "types": "./dist/src/modules/notification/*.d.mts",
127
+ "default": "./dist/src/modules/notification/*.mjs"
128
+ },
129
+ "require": {
130
+ "types": "./dist/src/modules/notification/*.d.cts",
131
+ "default": "./dist/src/modules/notification/*.cjs"
132
+ }
133
+ },
124
134
  "./modules/table/*": {
125
135
  "import": {
126
136
  "types": "./dist/src/modules/table/*.d.mts",