@myagentroam/protocol 0.10.41 → 0.10.42
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.
|
@@ -8,7 +8,7 @@ export declare const mailNotificationRequestSchema: z.ZodObject<{
|
|
|
8
8
|
callId: z.ZodString;
|
|
9
9
|
templateId: z.ZodString;
|
|
10
10
|
title: z.ZodOptional<z.ZodString>;
|
|
11
|
-
recipientEmail: z.ZodString
|
|
11
|
+
recipientEmail: z.ZodOptional<z.ZodString>;
|
|
12
12
|
message: z.ZodString;
|
|
13
13
|
}, "strict", z.ZodTypeAny, {
|
|
14
14
|
message: string;
|
|
@@ -19,8 +19,8 @@ export declare const mailNotificationRequestSchema: z.ZodObject<{
|
|
|
19
19
|
userId: number;
|
|
20
20
|
executionId: string;
|
|
21
21
|
callId: string;
|
|
22
|
-
recipientEmail: string;
|
|
23
22
|
title?: string | undefined;
|
|
23
|
+
recipientEmail?: string | undefined;
|
|
24
24
|
}, {
|
|
25
25
|
message: string;
|
|
26
26
|
source: "MANUAL" | "SCHEDULED";
|
|
@@ -30,8 +30,8 @@ export declare const mailNotificationRequestSchema: z.ZodObject<{
|
|
|
30
30
|
userId: number;
|
|
31
31
|
executionId: string;
|
|
32
32
|
callId: string;
|
|
33
|
-
recipientEmail: string;
|
|
34
33
|
title?: string | undefined;
|
|
34
|
+
recipientEmail?: string | undefined;
|
|
35
35
|
}>;
|
|
36
36
|
export type MailNotificationRequest = z.infer<typeof mailNotificationRequestSchema>;
|
|
37
37
|
export declare const mailNotificationResponseSchema: z.ZodUnion<[z.ZodObject<{
|
|
@@ -21,7 +21,7 @@ export const mailNotificationRequestSchema = z
|
|
|
21
21
|
.max(160)
|
|
22
22
|
.regex(/^[^\r\n]*$/u)
|
|
23
23
|
.optional(),
|
|
24
|
-
recipientEmail: z.string().min(3).max(320),
|
|
24
|
+
recipientEmail: z.string().min(3).max(320).optional(),
|
|
25
25
|
message: z.string().min(1).max(4000)
|
|
26
26
|
})
|
|
27
27
|
.strict();
|
|
@@ -20,9 +20,8 @@ const notificationInput = z
|
|
|
20
20
|
function validateChannels(input, context) {
|
|
21
21
|
if (new Set(input.channels).size !== input.channels.length)
|
|
22
22
|
context.addIssue({ code: 'custom', message: 'Duplicate notification channels.' });
|
|
23
|
-
if (input.channels.includes('email')
|
|
24
|
-
|
|
25
|
-
: input.recipientEmail !== undefined || input.templateId !== undefined)
|
|
23
|
+
if (!input.channels.includes('email') &&
|
|
24
|
+
(input.recipientEmail !== undefined || input.templateId !== undefined))
|
|
26
25
|
context.addIssue({
|
|
27
26
|
code: 'custom',
|
|
28
27
|
message: 'Email parameters must match the requested channels.'
|