Skip to content

Commit 9f30b94

Browse files
committed
fix: dto
1 parent fd44af0 commit 9f30b94

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

libs/internal-sdk/src/models/components/messagecta.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export type MessageCTA = {
3232
/**
3333
* Data associated with the call to action
3434
*/
35-
data: MessageCTAData;
35+
data?: MessageCTAData | undefined;
3636
/**
3737
* Action associated with the call to action
3838
*/
@@ -46,14 +46,14 @@ export const MessageCTA$inboundSchema: z.ZodType<
4646
unknown
4747
> = z.object({
4848
type: ChannelCTATypeEnum$inboundSchema.optional(),
49-
data: MessageCTAData$inboundSchema,
49+
data: MessageCTAData$inboundSchema.optional(),
5050
action: MessageAction$inboundSchema.optional(),
5151
});
5252

5353
/** @internal */
5454
export type MessageCTA$Outbound = {
5555
type?: string | undefined;
56-
data: MessageCTAData$Outbound;
56+
data?: MessageCTAData$Outbound | undefined;
5757
action?: MessageAction$Outbound | undefined;
5858
};
5959

@@ -64,7 +64,7 @@ export const MessageCTA$outboundSchema: z.ZodType<
6464
MessageCTA
6565
> = z.object({
6666
type: ChannelCTATypeEnum$outboundSchema.optional(),
67-
data: MessageCTAData$outboundSchema,
67+
data: MessageCTAData$outboundSchema.optional(),
6868
action: MessageAction$outboundSchema.optional(),
6969
});
7070

libs/internal-sdk/src/models/components/messageresponsedto.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
/**
4646
* Content of the message, can be an email block or a string
4747
*/
48-
export type Content = EmailBlock | string;
48+
export type Content = Array<EmailBlock> | string;
4949

5050
/**
5151
* The payload that was used to send the notification trigger
@@ -117,7 +117,7 @@ export type MessageResponseDto = {
117117
/**
118118
* Content of the message, can be an email block or a string
119119
*/
120-
content: EmailBlock | string;
120+
content: Array<EmailBlock> | string;
121121
/**
122122
* Transaction ID associated with the message
123123
*/
@@ -198,17 +198,17 @@ export type MessageResponseDto = {
198198

199199
/** @internal */
200200
export const Content$inboundSchema: z.ZodType<Content, z.ZodTypeDef, unknown> =
201-
z.union([EmailBlock$inboundSchema, z.string()]);
201+
z.union([z.array(EmailBlock$inboundSchema), z.string()]);
202202

203203
/** @internal */
204-
export type Content$Outbound = EmailBlock$Outbound | string;
204+
export type Content$Outbound = Array<EmailBlock$Outbound> | string;
205205

206206
/** @internal */
207207
export const Content$outboundSchema: z.ZodType<
208208
Content$Outbound,
209209
z.ZodTypeDef,
210210
Content
211-
> = z.union([EmailBlock$outboundSchema, z.string()]);
211+
> = z.union([z.array(EmailBlock$outboundSchema), z.string()]);
212212

213213
/**
214214
* @internal
@@ -355,7 +355,7 @@ export const MessageResponseDto$inboundSchema: z.ZodType<
355355
deliveredAt: z.array(z.string()).optional(),
356356
lastSeenDate: z.string().optional(),
357357
lastReadDate: z.string().optional(),
358-
content: z.union([EmailBlock$inboundSchema, z.string()]),
358+
content: z.union([z.array(EmailBlock$inboundSchema), z.string()]),
359359
transactionId: z.string(),
360360
subject: z.string().optional(),
361361
channel: ChannelTypeEnum$inboundSchema,
@@ -404,7 +404,7 @@ export type MessageResponseDto$Outbound = {
404404
deliveredAt?: Array<string> | undefined;
405405
lastSeenDate?: string | undefined;
406406
lastReadDate?: string | undefined;
407-
content: EmailBlock$Outbound | string;
407+
content: Array<EmailBlock$Outbound> | string;
408408
transactionId: string;
409409
subject?: string | undefined;
410410
channel: string;
@@ -446,7 +446,7 @@ export const MessageResponseDto$outboundSchema: z.ZodType<
446446
deliveredAt: z.array(z.string()).optional(),
447447
lastSeenDate: z.string().optional(),
448448
lastReadDate: z.string().optional(),
449-
content: z.union([EmailBlock$outboundSchema, z.string()]),
449+
content: z.union([z.array(EmailBlock$outboundSchema), z.string()]),
450450
transactionId: z.string(),
451451
subject: z.string().optional(),
452452
channel: ChannelTypeEnum$outboundSchema,

0 commit comments

Comments
 (0)