@develit-services/notification 0.0.28 → 0.0.30
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/dist/@types.cjs +2 -1
- package/dist/@types.d.cts +2 -2
- package/dist/@types.d.mts +2 -2
- package/dist/@types.d.ts +2 -2
- package/dist/@types.mjs +1 -1
- package/dist/export/worker.cjs +1 -1
- package/dist/export/worker.d.cts +1 -1
- package/dist/export/worker.d.mts +1 -1
- package/dist/export/worker.d.ts +1 -1
- package/dist/export/worker.mjs +1 -1
- package/dist/export/wrangler.cjs +2 -2
- package/dist/export/wrangler.mjs +2 -2
- package/dist/shared/{notification.3PxQAUeO.cjs → notification.0BUVxa7A.cjs} +42 -3
- package/dist/shared/{notification.CQ9G8X8X.mjs → notification.CQgItTyx.mjs} +42 -4
- package/dist/shared/{notification.CI6gLJsN.d.mts → notification.CR2sU8BK.d.mts} +21 -2
- package/dist/shared/{notification.YN3G-lx3.d.cts → notification.CbDIA6Ri.d.cts} +21 -2
- package/dist/shared/{notification.Dme_B9k_.d.ts → notification.DqfsDSe7.d.ts} +21 -2
- package/package.json +1 -1
package/dist/@types.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const twilio_connector = require('./shared/notification.
|
|
3
|
+
const twilio_connector = require('./shared/notification.0BUVxa7A.cjs');
|
|
4
4
|
require('zod');
|
|
5
5
|
require('@develit-io/backend-sdk');
|
|
6
6
|
require('zod/v4');
|
|
@@ -17,6 +17,7 @@ exports.EcomailConnector = twilio_connector.EcomailConnector;
|
|
|
17
17
|
exports.IEmailConnector = twilio_connector.IEmailConnector;
|
|
18
18
|
exports.ISmsConnector = twilio_connector.ISmsConnector;
|
|
19
19
|
exports.TwilioConnector = twilio_connector.TwilioConnector;
|
|
20
|
+
exports.iAttachmentSchema = twilio_connector.iAttachmentSchema;
|
|
20
21
|
exports.iContactSchema = twilio_connector.iContactSchema;
|
|
21
22
|
exports.iEmailSchema = twilio_connector.iEmailSchema;
|
|
22
23
|
exports.sendEmailInputSchema = twilio_connector.sendEmailInputSchema;
|
package/dist/@types.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IEmailConnector, g as IEmail, h as IContact, a as ISmsConnector, i as ISms, t as tables } from './shared/notification.
|
|
2
|
-
export {
|
|
1
|
+
import { I as IEmailConnector, g as IEmail, h as IContact, a as ISmsConnector, i as ISms, t as tables } from './shared/notification.CbDIA6Ri.cjs';
|
|
2
|
+
export { m as IAttachment, p as IPushNotification, q as ISlack, N as NotificationQueueMessage, S as SendEmailInput, b as SendEmailOutput, e as SendSlackInput, f as SendSlackOutput, c as SendSmsInput, d as SendSmsOutput, k as iAttachmentSchema, j as iContactSchema, l as iEmailSchema, s as sendEmailInputSchema, n as sendSlackInputSchema, o as sendSmsInputSchema } from './shared/notification.CbDIA6Ri.cjs';
|
|
3
3
|
import { InternalError } from '@develit-io/backend-sdk';
|
|
4
4
|
import twilio from 'twilio';
|
|
5
5
|
import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
|
package/dist/@types.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IEmailConnector, g as IEmail, h as IContact, a as ISmsConnector, i as ISms, t as tables } from './shared/notification.
|
|
2
|
-
export {
|
|
1
|
+
import { I as IEmailConnector, g as IEmail, h as IContact, a as ISmsConnector, i as ISms, t as tables } from './shared/notification.CR2sU8BK.mjs';
|
|
2
|
+
export { m as IAttachment, p as IPushNotification, q as ISlack, N as NotificationQueueMessage, S as SendEmailInput, b as SendEmailOutput, e as SendSlackInput, f as SendSlackOutput, c as SendSmsInput, d as SendSmsOutput, k as iAttachmentSchema, j as iContactSchema, l as iEmailSchema, s as sendEmailInputSchema, n as sendSlackInputSchema, o as sendSmsInputSchema } from './shared/notification.CR2sU8BK.mjs';
|
|
3
3
|
import { InternalError } from '@develit-io/backend-sdk';
|
|
4
4
|
import twilio from 'twilio';
|
|
5
5
|
import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
|
package/dist/@types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IEmailConnector, g as IEmail, h as IContact, a as ISmsConnector, i as ISms, t as tables } from './shared/notification.
|
|
2
|
-
export {
|
|
1
|
+
import { I as IEmailConnector, g as IEmail, h as IContact, a as ISmsConnector, i as ISms, t as tables } from './shared/notification.DqfsDSe7.js';
|
|
2
|
+
export { m as IAttachment, p as IPushNotification, q as ISlack, N as NotificationQueueMessage, S as SendEmailInput, b as SendEmailOutput, e as SendSlackInput, f as SendSlackOutput, c as SendSmsInput, d as SendSmsOutput, k as iAttachmentSchema, j as iContactSchema, l as iEmailSchema, s as sendEmailInputSchema, n as sendSlackInputSchema, o as sendSmsInputSchema } from './shared/notification.DqfsDSe7.js';
|
|
3
3
|
import { InternalError } from '@develit-io/backend-sdk';
|
|
4
4
|
import twilio from 'twilio';
|
|
5
5
|
import { InferSelectModel, InferInsertModel } from 'drizzle-orm';
|
package/dist/@types.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EcomailConnector, I as IEmailConnector,
|
|
1
|
+
export { E as EcomailConnector, I as IEmailConnector, e as ISmsConnector, T as TwilioConnector, c as iAttachmentSchema, i as iContactSchema, d as iEmailSchema, s as sendEmailInputSchema, b as sendSlackInputSchema, a as sendSmsInputSchema } from './shared/notification.CQgItTyx.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '@develit-io/backend-sdk';
|
|
4
4
|
import 'zod/v4';
|
package/dist/export/worker.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
|
-
const twilio_connector = require('../shared/notification.
|
|
6
|
+
const twilio_connector = require('../shared/notification.0BUVxa7A.cjs');
|
|
7
7
|
const database_schema = require('../shared/notification.4b3eUEIG.cjs');
|
|
8
8
|
require('drizzle-orm');
|
|
9
9
|
require('drizzle-orm/sqlite-core');
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, S as SendEmailInput, b as SendEmailOutput, c as SendSmsInput, d as SendSmsOutput, e as SendSlackInput, f as SendSlackOutput } from '../shared/notification.
|
|
3
|
+
import { I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, S as SendEmailInput, b as SendEmailOutput, c as SendSmsInput, d as SendSmsOutput, e as SendSlackInput, f as SendSlackOutput } from '../shared/notification.CbDIA6Ri.cjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, S as SendEmailInput, b as SendEmailOutput, c as SendSmsInput, d as SendSmsOutput, e as SendSlackInput, f as SendSlackOutput } from '../shared/notification.
|
|
3
|
+
import { I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, S as SendEmailInput, b as SendEmailOutput, c as SendSmsInput, d as SendSmsOutput, e as SendSlackInput, f as SendSlackOutput } from '../shared/notification.CR2sU8BK.mjs';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
2
|
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
-
import { I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, S as SendEmailInput, b as SendEmailOutput, c as SendSmsInput, d as SendSmsOutput, e as SendSlackInput, f as SendSlackOutput } from '../shared/notification.
|
|
3
|
+
import { I as IEmailConnector, a as ISmsConnector, t as tables, N as NotificationQueueMessage, S as SendEmailInput, b as SendEmailOutput, c as SendSmsInput, d as SendSmsOutput, e as SendSlackInput, f as SendSlackOutput } from '../shared/notification.DqfsDSe7.js';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
6
6
|
import 'zod';
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createInternalError, uuidv4, develitWorker, useResult, cloudflareQueue, action } from '@develit-io/backend-sdk';
|
|
2
|
-
import { E as EcomailConnector, T as TwilioConnector, s as sendEmailInputSchema, a as sendSmsInputSchema, b as sendSlackInputSchema } from '../shared/notification.
|
|
2
|
+
import { E as EcomailConnector, T as TwilioConnector, s as sendEmailInputSchema, a as sendSmsInputSchema, b as sendSlackInputSchema } from '../shared/notification.CQgItTyx.mjs';
|
|
3
3
|
import { s as schema } from '../shared/notification.C0X8Orrh.mjs';
|
|
4
4
|
import 'drizzle-orm';
|
|
5
5
|
import 'drizzle-orm/sqlite-core';
|
package/dist/export/wrangler.cjs
CHANGED
|
@@ -41,10 +41,10 @@ function defineNotificationServiceWrangler(config) {
|
|
|
41
41
|
],
|
|
42
42
|
consumers: [
|
|
43
43
|
{
|
|
44
|
-
queue: `${
|
|
44
|
+
queue: `${project}-notifications`,
|
|
45
45
|
max_batch_size: 1,
|
|
46
46
|
max_batch_timeout: 5,
|
|
47
|
-
dead_letter_queue: `${project}-
|
|
47
|
+
dead_letter_queue: `${project}-notifications-dlq`
|
|
48
48
|
}
|
|
49
49
|
]
|
|
50
50
|
},
|
package/dist/export/wrangler.mjs
CHANGED
|
@@ -39,10 +39,10 @@ function defineNotificationServiceWrangler(config) {
|
|
|
39
39
|
],
|
|
40
40
|
consumers: [
|
|
41
41
|
{
|
|
42
|
-
queue: `${
|
|
42
|
+
queue: `${project}-notifications`,
|
|
43
43
|
max_batch_size: 1,
|
|
44
44
|
max_batch_timeout: 5,
|
|
45
|
-
dead_letter_queue: `${project}-
|
|
45
|
+
dead_letter_queue: `${project}-notifications-dlq`
|
|
46
46
|
}
|
|
47
47
|
]
|
|
48
48
|
},
|
|
@@ -17,6 +17,27 @@ const iContactSchema = z.z.union([
|
|
|
17
17
|
name: z.z.union([z.z.string(), z.z.undefined()])
|
|
18
18
|
})
|
|
19
19
|
]);
|
|
20
|
+
const iAttachmentSchema = z.z.object({
|
|
21
|
+
filename: z.z.string().min(1).max(255),
|
|
22
|
+
content: z.z.string().refine(
|
|
23
|
+
(val) => {
|
|
24
|
+
try {
|
|
25
|
+
return /^[A-Za-z0-9+/]*={0,2}$/.test(val) && val.length > 0;
|
|
26
|
+
} catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
{ message: "Content must be valid base64 encoded data" }
|
|
31
|
+
),
|
|
32
|
+
contentType: z.z.string().refine(
|
|
33
|
+
(val) => /^[a-zA-Z0-9][a-zA-Z0-9!#$&\-\^_]*\/[a-zA-Z0-9][a-zA-Z0-9!#$&\-\^_]*$/.test(
|
|
34
|
+
val
|
|
35
|
+
),
|
|
36
|
+
{ message: "Content type must be valid MIME type" }
|
|
37
|
+
),
|
|
38
|
+
size: z.z.number().min(1).max(25 * 1024 * 1024).optional()
|
|
39
|
+
// 25MB limit
|
|
40
|
+
});
|
|
20
41
|
const iEmailSchema = z.z.object({
|
|
21
42
|
to: z.z.union([iContactSchema, z.z.array(iContactSchema)]),
|
|
22
43
|
replyTo: z.z.union([iContactSchema, z.z.array(iContactSchema)]).optional(),
|
|
@@ -27,8 +48,20 @@ const iEmailSchema = z.z.object({
|
|
|
27
48
|
text: z.z.string().optional(),
|
|
28
49
|
html: z.z.string().optional(),
|
|
29
50
|
templateId: z.z.number().optional(),
|
|
30
|
-
templateVariables: z.z.record(z.z.string(), z.z.string()).optional()
|
|
31
|
-
|
|
51
|
+
templateVariables: z.z.record(z.z.string(), z.z.string()).optional(),
|
|
52
|
+
attachments: z.z.array(iAttachmentSchema).max(10).optional()
|
|
53
|
+
// Max 10 attachments
|
|
54
|
+
}).refine(
|
|
55
|
+
(data) => {
|
|
56
|
+
if (!data.attachments) return true;
|
|
57
|
+
const totalSize = data.attachments.reduce(
|
|
58
|
+
(sum, att) => sum + (att.size || 0),
|
|
59
|
+
0
|
|
60
|
+
);
|
|
61
|
+
return totalSize <= 25 * 1024 * 1024;
|
|
62
|
+
},
|
|
63
|
+
{ message: "Total attachment size cannot exceed 25MB" }
|
|
64
|
+
);
|
|
32
65
|
|
|
33
66
|
class IEmailConnector {
|
|
34
67
|
constructor({
|
|
@@ -88,7 +121,12 @@ class EcomailConnector extends IEmailConnector {
|
|
|
88
121
|
}
|
|
89
122
|
);
|
|
90
123
|
const subject = email.subject;
|
|
91
|
-
const attachments =
|
|
124
|
+
const attachments = email.attachments ? email.attachments.map((attachment) => ({
|
|
125
|
+
type: attachment.contentType,
|
|
126
|
+
name: attachment.filename,
|
|
127
|
+
content: attachment.content
|
|
128
|
+
// Already base64 encoded
|
|
129
|
+
})) : [];
|
|
92
130
|
const contacts = toContacts.flatMap((to) => {
|
|
93
131
|
const entries = [];
|
|
94
132
|
if (ccContacts.length > 0) {
|
|
@@ -219,6 +257,7 @@ exports.EcomailConnector = EcomailConnector;
|
|
|
219
257
|
exports.IEmailConnector = IEmailConnector;
|
|
220
258
|
exports.ISmsConnector = ISmsConnector;
|
|
221
259
|
exports.TwilioConnector = TwilioConnector;
|
|
260
|
+
exports.iAttachmentSchema = iAttachmentSchema;
|
|
222
261
|
exports.iContactSchema = iContactSchema;
|
|
223
262
|
exports.iEmailSchema = iEmailSchema;
|
|
224
263
|
exports.sendEmailInputSchema = sendEmailInputSchema;
|
|
@@ -10,6 +10,27 @@ const iContactSchema = z.union([
|
|
|
10
10
|
name: z.union([z.string(), z.undefined()])
|
|
11
11
|
})
|
|
12
12
|
]);
|
|
13
|
+
const iAttachmentSchema = z.object({
|
|
14
|
+
filename: z.string().min(1).max(255),
|
|
15
|
+
content: z.string().refine(
|
|
16
|
+
(val) => {
|
|
17
|
+
try {
|
|
18
|
+
return /^[A-Za-z0-9+/]*={0,2}$/.test(val) && val.length > 0;
|
|
19
|
+
} catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{ message: "Content must be valid base64 encoded data" }
|
|
24
|
+
),
|
|
25
|
+
contentType: z.string().refine(
|
|
26
|
+
(val) => /^[a-zA-Z0-9][a-zA-Z0-9!#$&\-\^_]*\/[a-zA-Z0-9][a-zA-Z0-9!#$&\-\^_]*$/.test(
|
|
27
|
+
val
|
|
28
|
+
),
|
|
29
|
+
{ message: "Content type must be valid MIME type" }
|
|
30
|
+
),
|
|
31
|
+
size: z.number().min(1).max(25 * 1024 * 1024).optional()
|
|
32
|
+
// 25MB limit
|
|
33
|
+
});
|
|
13
34
|
const iEmailSchema = z.object({
|
|
14
35
|
to: z.union([iContactSchema, z.array(iContactSchema)]),
|
|
15
36
|
replyTo: z.union([iContactSchema, z.array(iContactSchema)]).optional(),
|
|
@@ -20,8 +41,20 @@ const iEmailSchema = z.object({
|
|
|
20
41
|
text: z.string().optional(),
|
|
21
42
|
html: z.string().optional(),
|
|
22
43
|
templateId: z.number().optional(),
|
|
23
|
-
templateVariables: z.record(z.string(), z.string()).optional()
|
|
24
|
-
|
|
44
|
+
templateVariables: z.record(z.string(), z.string()).optional(),
|
|
45
|
+
attachments: z.array(iAttachmentSchema).max(10).optional()
|
|
46
|
+
// Max 10 attachments
|
|
47
|
+
}).refine(
|
|
48
|
+
(data) => {
|
|
49
|
+
if (!data.attachments) return true;
|
|
50
|
+
const totalSize = data.attachments.reduce(
|
|
51
|
+
(sum, att) => sum + (att.size || 0),
|
|
52
|
+
0
|
|
53
|
+
);
|
|
54
|
+
return totalSize <= 25 * 1024 * 1024;
|
|
55
|
+
},
|
|
56
|
+
{ message: "Total attachment size cannot exceed 25MB" }
|
|
57
|
+
);
|
|
25
58
|
|
|
26
59
|
class IEmailConnector {
|
|
27
60
|
constructor({
|
|
@@ -81,7 +114,12 @@ class EcomailConnector extends IEmailConnector {
|
|
|
81
114
|
}
|
|
82
115
|
);
|
|
83
116
|
const subject = email.subject;
|
|
84
|
-
const attachments =
|
|
117
|
+
const attachments = email.attachments ? email.attachments.map((attachment) => ({
|
|
118
|
+
type: attachment.contentType,
|
|
119
|
+
name: attachment.filename,
|
|
120
|
+
content: attachment.content
|
|
121
|
+
// Already base64 encoded
|
|
122
|
+
})) : [];
|
|
85
123
|
const contacts = toContacts.flatMap((to) => {
|
|
86
124
|
const entries = [];
|
|
87
125
|
if (ccContacts.length > 0) {
|
|
@@ -208,4 +246,4 @@ class TwilioConnector extends ISmsConnector {
|
|
|
208
246
|
}
|
|
209
247
|
}
|
|
210
248
|
|
|
211
|
-
export { EcomailConnector as E, IEmailConnector as I, TwilioConnector as T, sendSmsInputSchema as a, sendSlackInputSchema as b,
|
|
249
|
+
export { EcomailConnector as E, IEmailConnector as I, TwilioConnector as T, sendSmsInputSchema as a, sendSlackInputSchema as b, iAttachmentSchema as c, iEmailSchema as d, ISmsConnector as e, iContactSchema as i, sendEmailInputSchema as s };
|
|
@@ -7,6 +7,12 @@ declare const iContactSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
|
7
7
|
email: z.ZodString;
|
|
8
8
|
name: z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>;
|
|
9
9
|
}, z.core.$strip>]>;
|
|
10
|
+
declare const iAttachmentSchema: z.ZodObject<{
|
|
11
|
+
filename: z.ZodString;
|
|
12
|
+
content: z.ZodString;
|
|
13
|
+
contentType: z.ZodString;
|
|
14
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>;
|
|
10
16
|
declare const iEmailSchema: z.ZodObject<{
|
|
11
17
|
to: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
12
18
|
email: z.ZodString;
|
|
@@ -45,8 +51,15 @@ declare const iEmailSchema: z.ZodObject<{
|
|
|
45
51
|
html: z.ZodOptional<z.ZodString>;
|
|
46
52
|
templateId: z.ZodOptional<z.ZodNumber>;
|
|
47
53
|
templateVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
54
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
55
|
+
filename: z.ZodString;
|
|
56
|
+
content: z.ZodString;
|
|
57
|
+
contentType: z.ZodString;
|
|
58
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
}, z.core.$strip>>>;
|
|
48
60
|
}, z.core.$strip>;
|
|
49
61
|
type IContact = z.infer<typeof iContactSchema>;
|
|
62
|
+
type IAttachment = z.infer<typeof iAttachmentSchema>;
|
|
50
63
|
type IEmail = z.infer<typeof iEmailSchema>;
|
|
51
64
|
|
|
52
65
|
declare abstract class IEmailConnector {
|
|
@@ -103,6 +116,12 @@ declare const sendEmailInputSchema: z$1.ZodObject<{
|
|
|
103
116
|
html: z$1.ZodOptional<z$1.ZodString>;
|
|
104
117
|
templateId: z$1.ZodOptional<z$1.ZodNumber>;
|
|
105
118
|
templateVariables: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
119
|
+
attachments: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
120
|
+
filename: z$1.ZodString;
|
|
121
|
+
content: z$1.ZodString;
|
|
122
|
+
contentType: z$1.ZodString;
|
|
123
|
+
size: z$1.ZodOptional<z$1.ZodNumber>;
|
|
124
|
+
}, z$1.core.$strip>>>;
|
|
106
125
|
}, z$1.core.$strip>;
|
|
107
126
|
metadata: z$1.ZodObject<{
|
|
108
127
|
userAgent: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -200,5 +219,5 @@ interface ISlack {
|
|
|
200
219
|
|
|
201
220
|
declare const tables: typeof schema;
|
|
202
221
|
|
|
203
|
-
export { IEmailConnector as I, ISmsConnector as a, iContactSchema as j,
|
|
204
|
-
export type { NotificationQueueMessage as N, SendEmailInput as S, SendEmailOutput as b, SendSmsInput as c, SendSmsOutput as d, SendSlackInput as e, SendSlackOutput as f, IEmail as g, IContact as h, ISms as i, IPushNotification as
|
|
222
|
+
export { IEmailConnector as I, ISmsConnector as a, iContactSchema as j, iAttachmentSchema as k, iEmailSchema as l, sendSlackInputSchema as n, sendSmsInputSchema as o, sendEmailInputSchema as s, tables as t };
|
|
223
|
+
export type { NotificationQueueMessage as N, SendEmailInput as S, SendEmailOutput as b, SendSmsInput as c, SendSmsOutput as d, SendSlackInput as e, SendSlackOutput as f, IEmail as g, IContact as h, ISms as i, IAttachment as m, IPushNotification as p, ISlack as q };
|
|
@@ -7,6 +7,12 @@ declare const iContactSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
|
7
7
|
email: z.ZodString;
|
|
8
8
|
name: z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>;
|
|
9
9
|
}, z.core.$strip>]>;
|
|
10
|
+
declare const iAttachmentSchema: z.ZodObject<{
|
|
11
|
+
filename: z.ZodString;
|
|
12
|
+
content: z.ZodString;
|
|
13
|
+
contentType: z.ZodString;
|
|
14
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>;
|
|
10
16
|
declare const iEmailSchema: z.ZodObject<{
|
|
11
17
|
to: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
12
18
|
email: z.ZodString;
|
|
@@ -45,8 +51,15 @@ declare const iEmailSchema: z.ZodObject<{
|
|
|
45
51
|
html: z.ZodOptional<z.ZodString>;
|
|
46
52
|
templateId: z.ZodOptional<z.ZodNumber>;
|
|
47
53
|
templateVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
54
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
55
|
+
filename: z.ZodString;
|
|
56
|
+
content: z.ZodString;
|
|
57
|
+
contentType: z.ZodString;
|
|
58
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
}, z.core.$strip>>>;
|
|
48
60
|
}, z.core.$strip>;
|
|
49
61
|
type IContact = z.infer<typeof iContactSchema>;
|
|
62
|
+
type IAttachment = z.infer<typeof iAttachmentSchema>;
|
|
50
63
|
type IEmail = z.infer<typeof iEmailSchema>;
|
|
51
64
|
|
|
52
65
|
declare abstract class IEmailConnector {
|
|
@@ -103,6 +116,12 @@ declare const sendEmailInputSchema: z$1.ZodObject<{
|
|
|
103
116
|
html: z$1.ZodOptional<z$1.ZodString>;
|
|
104
117
|
templateId: z$1.ZodOptional<z$1.ZodNumber>;
|
|
105
118
|
templateVariables: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
119
|
+
attachments: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
120
|
+
filename: z$1.ZodString;
|
|
121
|
+
content: z$1.ZodString;
|
|
122
|
+
contentType: z$1.ZodString;
|
|
123
|
+
size: z$1.ZodOptional<z$1.ZodNumber>;
|
|
124
|
+
}, z$1.core.$strip>>>;
|
|
106
125
|
}, z$1.core.$strip>;
|
|
107
126
|
metadata: z$1.ZodObject<{
|
|
108
127
|
userAgent: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -200,5 +219,5 @@ interface ISlack {
|
|
|
200
219
|
|
|
201
220
|
declare const tables: typeof schema;
|
|
202
221
|
|
|
203
|
-
export { IEmailConnector as I, ISmsConnector as a, iContactSchema as j,
|
|
204
|
-
export type { NotificationQueueMessage as N, SendEmailInput as S, SendEmailOutput as b, SendSmsInput as c, SendSmsOutput as d, SendSlackInput as e, SendSlackOutput as f, IEmail as g, IContact as h, ISms as i, IPushNotification as
|
|
222
|
+
export { IEmailConnector as I, ISmsConnector as a, iContactSchema as j, iAttachmentSchema as k, iEmailSchema as l, sendSlackInputSchema as n, sendSmsInputSchema as o, sendEmailInputSchema as s, tables as t };
|
|
223
|
+
export type { NotificationQueueMessage as N, SendEmailInput as S, SendEmailOutput as b, SendSmsInput as c, SendSmsOutput as d, SendSlackInput as e, SendSlackOutput as f, IEmail as g, IContact as h, ISms as i, IAttachment as m, IPushNotification as p, ISlack as q };
|
|
@@ -7,6 +7,12 @@ declare const iContactSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
|
7
7
|
email: z.ZodString;
|
|
8
8
|
name: z.ZodUnion<readonly [z.ZodString, z.ZodUndefined]>;
|
|
9
9
|
}, z.core.$strip>]>;
|
|
10
|
+
declare const iAttachmentSchema: z.ZodObject<{
|
|
11
|
+
filename: z.ZodString;
|
|
12
|
+
content: z.ZodString;
|
|
13
|
+
contentType: z.ZodString;
|
|
14
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>;
|
|
10
16
|
declare const iEmailSchema: z.ZodObject<{
|
|
11
17
|
to: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
12
18
|
email: z.ZodString;
|
|
@@ -45,8 +51,15 @@ declare const iEmailSchema: z.ZodObject<{
|
|
|
45
51
|
html: z.ZodOptional<z.ZodString>;
|
|
46
52
|
templateId: z.ZodOptional<z.ZodNumber>;
|
|
47
53
|
templateVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
54
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
55
|
+
filename: z.ZodString;
|
|
56
|
+
content: z.ZodString;
|
|
57
|
+
contentType: z.ZodString;
|
|
58
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
}, z.core.$strip>>>;
|
|
48
60
|
}, z.core.$strip>;
|
|
49
61
|
type IContact = z.infer<typeof iContactSchema>;
|
|
62
|
+
type IAttachment = z.infer<typeof iAttachmentSchema>;
|
|
50
63
|
type IEmail = z.infer<typeof iEmailSchema>;
|
|
51
64
|
|
|
52
65
|
declare abstract class IEmailConnector {
|
|
@@ -103,6 +116,12 @@ declare const sendEmailInputSchema: z$1.ZodObject<{
|
|
|
103
116
|
html: z$1.ZodOptional<z$1.ZodString>;
|
|
104
117
|
templateId: z$1.ZodOptional<z$1.ZodNumber>;
|
|
105
118
|
templateVariables: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
119
|
+
attachments: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
120
|
+
filename: z$1.ZodString;
|
|
121
|
+
content: z$1.ZodString;
|
|
122
|
+
contentType: z$1.ZodString;
|
|
123
|
+
size: z$1.ZodOptional<z$1.ZodNumber>;
|
|
124
|
+
}, z$1.core.$strip>>>;
|
|
106
125
|
}, z$1.core.$strip>;
|
|
107
126
|
metadata: z$1.ZodObject<{
|
|
108
127
|
userAgent: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -200,5 +219,5 @@ interface ISlack {
|
|
|
200
219
|
|
|
201
220
|
declare const tables: typeof schema;
|
|
202
221
|
|
|
203
|
-
export { IEmailConnector as I, ISmsConnector as a, iContactSchema as j,
|
|
204
|
-
export type { NotificationQueueMessage as N, SendEmailInput as S, SendEmailOutput as b, SendSmsInput as c, SendSmsOutput as d, SendSlackInput as e, SendSlackOutput as f, IEmail as g, IContact as h, ISms as i, IPushNotification as
|
|
222
|
+
export { IEmailConnector as I, ISmsConnector as a, iContactSchema as j, iAttachmentSchema as k, iEmailSchema as l, sendSlackInputSchema as n, sendSmsInputSchema as o, sendEmailInputSchema as s, tables as t };
|
|
223
|
+
export type { NotificationQueueMessage as N, SendEmailInput as S, SendEmailOutput as b, SendSmsInput as c, SendSmsOutput as d, SendSlackInput as e, SendSlackOutput as f, IEmail as g, IContact as h, ISms as i, IAttachment as m, IPushNotification as p, ISlack as q };
|