UNPKG

tyntec-sdk

Version:

TypeScript SDK for Tyntec Conversations API V3

1,395 lines (1,394 loc) 190 kB
import { z } from 'zod'; import { templateComponentsSchema } from './whatsapp/template.schema'; declare const SUPPORTED_CHANNELS: readonly ["whatsapp", "telegram", "facebook"]; export type SupportedChannel = (typeof SUPPORTED_CHANNELS)[number]; export declare const messageBaseFields: z.ZodObject<{ to: z.ZodString; idSender: z.ZodOptional<z.ZodString>; channel: z.ZodEnum<["whatsapp", "telegram", "facebook"]>; sender: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { to: string; channel: "whatsapp" | "telegram" | "facebook"; idSender?: string | undefined; sender?: boolean | undefined; }, { to: string; channel: "whatsapp" | "telegram" | "facebook"; idSender?: string | undefined; sender?: boolean | undefined; }>; export declare const whatsAppMessageStructure: z.ZodObject<{ channel: z.ZodLiteral<"whatsapp">; content: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"image">; image: z.ZodOptional<z.ZodObject<{ url: z.ZodString; caption: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; privateUrl: z.ZodOptional<z.ZodString>; idFile: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { contentType: "image"; image?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { contentType: "image"; image?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"video">; video: z.ZodOptional<z.ZodObject<{ url: z.ZodString; caption: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; privateUrl: z.ZodOptional<z.ZodString>; idFile: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { contentType: "video"; video?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { contentType: "video"; video?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"document">; document: z.ZodOptional<z.ZodObject<{ url: z.ZodString; caption: z.ZodOptional<z.ZodString>; filename: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; privateUrl: z.ZodOptional<z.ZodString>; idFile: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; filename?: string | undefined; }, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; filename?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { contentType: "document"; document?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; filename?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { contentType: "document"; document?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; filename?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"audio">; audio: z.ZodOptional<z.ZodObject<{ url: z.ZodString; caption: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; privateUrl: z.ZodOptional<z.ZodString>; idFile: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { contentType: "audio"; audio?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { contentType: "audio"; audio?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"sticker">; sticker: z.ZodOptional<z.ZodObject<{ url: z.ZodString; caption: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; privateUrl: z.ZodOptional<z.ZodString>; idFile: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { contentType: "sticker"; sticker?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { contentType: "sticker"; sticker?: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; } | undefined; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>]>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"text">; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; contentType: "text"; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { text: string; contentType: "text"; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"location">; location: z.ZodObject<{ longitude: z.ZodNumber; latitude: z.ZodNumber; name: z.ZodString; address: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; longitude: number; latitude: number; address: string; }, { name: string; longitude: number; latitude: number; address: string; }>; }, "strip", z.ZodTypeAny, { contentType: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { contentType: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"contacts">; contacts: z.ZodArray<z.ZodObject<{ addresses: z.ZodArray<z.ZodObject<{ city: z.ZodString; country: z.ZodString; countryCode: z.ZodString; street: z.ZodString; type: z.ZodString; zip: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; city: string; country: string; countryCode: string; street: string; zip: string; }, { type: string; city: string; country: string; countryCode: string; street: string; zip: string; }>, "many">; name: z.ZodObject<{ formattedName: z.ZodString; lastName: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { formattedName: string; lastName?: string | undefined; }, { formattedName: string; lastName?: string | undefined; }>; }, "strip", z.ZodTypeAny, { name: { formattedName: string; lastName?: string | undefined; }; addresses: { type: string; city: string; country: string; countryCode: string; street: string; zip: string; }[]; }, { name: { formattedName: string; lastName?: string | undefined; }; addresses: { type: string; city: string; country: string; countryCode: string; street: string; zip: string; }[]; }>, "many">; }, "strip", z.ZodTypeAny, { contentType: "contacts"; contacts: { name: { formattedName: string; lastName?: string | undefined; }; addresses: { type: string; city: string; country: string; countryCode: string; street: string; zip: string; }[]; }[]; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { contentType: "contacts"; contacts: { name: { formattedName: string; lastName?: string | undefined; }; addresses: { type: string; city: string; country: string; countryCode: string; street: string; zip: string; }[]; }[]; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"reaction">; reaction: z.ZodObject<{ messageId: z.ZodString; emoji: z.ZodString; }, "strip", z.ZodTypeAny, { messageId: string; emoji: string; }, { messageId: string; emoji: string; }>; }, "strip", z.ZodTypeAny, { contentType: "reaction"; reaction: { messageId: string; emoji: string; }; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { contentType: "reaction"; reaction: { messageId: string; emoji: string; }; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"template">; template: z.ZodObject<{ templateId: z.ZodString; templateLanguage: z.ZodString; components: z.ZodObject<{ header: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type: "text"; }>, z.ZodObject<{ type: z.ZodLiteral<"image">; image: z.ZodObject<{ url: z.ZodString; caption: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; privateUrl: z.ZodOptional<z.ZodString>; idFile: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }>; }, "strip", z.ZodTypeAny, { image: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "image"; }, { image: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "image"; }>, z.ZodObject<{ type: z.ZodLiteral<"video">; video: z.ZodObject<{ url: z.ZodString; caption: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodString>; privateUrl: z.ZodOptional<z.ZodString>; idFile: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }, { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }>; }, "strip", z.ZodTypeAny, { video: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "video"; }, { video: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "video"; }>, z.ZodObject<{ type: z.ZodLiteral<"document">; document: z.ZodObject<{ url: z.ZodString; caption: z.ZodOptional<z.ZodString>; filename: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { url: string; caption?: string | undefined; filename?: string | undefined; }, { url: string; caption?: string | undefined; filename?: string | undefined; }>; }, "strip", z.ZodTypeAny, { document: { url: string; caption?: string | undefined; filename?: string | undefined; }; type: "document"; }, { document: { url: string; caption?: string | undefined; filename?: string | undefined; }; type: "document"; }>, z.ZodObject<{ type: z.ZodLiteral<"location">; location: z.ZodObject<{ longitude: z.ZodNumber; latitude: z.ZodNumber; name: z.ZodString; address: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; longitude: number; latitude: number; address: string; }, { name: string; longitude: number; latitude: number; address: string; }>; }, "strip", z.ZodTypeAny, { type: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; }, { type: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; }>]>, "many">>; body: z.ZodOptional<z.ZodArray<z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type: "text"; }>, "many">>; button: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral<"quick_reply">; index: z.ZodNumber; payload: z.ZodString; }, "strip", z.ZodTypeAny, { type: "quick_reply"; payload: string; index: number; }, { type: "quick_reply"; payload: string; index: number; }>, z.ZodObject<{ type: z.ZodLiteral<"url">; index: z.ZodNumber; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; type: "url"; index: number; }, { text: string; type: "url"; index: number; }>]>, "many">>; }, "strip", z.ZodTypeAny, { header?: ({ text: string; type: "text"; } | { image: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "image"; } | { video: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "video"; } | { document: { url: string; caption?: string | undefined; filename?: string | undefined; }; type: "document"; } | { type: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; })[] | undefined; body?: { text: string; type: "text"; }[] | undefined; button?: ({ type: "quick_reply"; payload: string; index: number; } | { text: string; type: "url"; index: number; })[] | undefined; }, { header?: ({ text: string; type: "text"; } | { image: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "image"; } | { video: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "video"; } | { document: { url: string; caption?: string | undefined; filename?: string | undefined; }; type: "document"; } | { type: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; })[] | undefined; body?: { text: string; type: "text"; }[] | undefined; button?: ({ type: "quick_reply"; payload: string; index: number; } | { text: string; type: "url"; index: number; })[] | undefined; }>; }, "strip", z.ZodTypeAny, { components: { header?: ({ text: string; type: "text"; } | { image: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "image"; } | { video: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "video"; } | { document: { url: string; caption?: string | undefined; filename?: string | undefined; }; type: "document"; } | { type: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; })[] | undefined; body?: { text: string; type: "text"; }[] | undefined; button?: ({ type: "quick_reply"; payload: string; index: number; } | { text: string; type: "url"; index: number; })[] | undefined; }; templateId: string; templateLanguage: string; }, { components: { header?: ({ text: string; type: "text"; } | { image: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "image"; } | { video: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "video"; } | { document: { url: string; caption?: string | undefined; filename?: string | undefined; }; type: "document"; } | { type: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; })[] | undefined; body?: { text: string; type: "text"; }[] | undefined; button?: ({ type: "quick_reply"; payload: string; index: number; } | { text: string; type: "url"; index: number; })[] | undefined; }; templateId: string; templateLanguage: string; }>; }, "strip", z.ZodTypeAny, { template: { components: { header?: ({ text: string; type: "text"; } | { image: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "image"; } | { video: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "video"; } | { document: { url: string; caption?: string | undefined; filename?: string | undefined; }; type: "document"; } | { type: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; })[] | undefined; body?: { text: string; type: "text"; }[] | undefined; button?: ({ type: "quick_reply"; payload: string; index: number; } | { text: string; type: "url"; index: number; })[] | undefined; }; templateId: string; templateLanguage: string; }; contentType: "template"; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { template: { components: { header?: ({ text: string; type: "text"; } | { image: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "image"; } | { video: { url: string; type?: string | undefined; caption?: string | undefined; privateUrl?: string | undefined; idFile?: string | undefined; }; type: "video"; } | { document: { url: string; caption?: string | undefined; filename?: string | undefined; }; type: "document"; } | { type: "location"; location: { name: string; longitude: number; latitude: number; address: string; }; })[] | undefined; body?: { text: string; type: "text"; }[] | undefined; button?: ({ type: "quick_reply"; payload: string; index: number; } | { text: string; type: "url"; index: number; })[] | undefined; }; templateId: string; templateLanguage: string; }; contentType: "template"; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }>, z.ZodObject<{ senderName: z.ZodOptional<z.ZodString>; urlPreviewDisplayed: z.ZodOptional<z.ZodBoolean>; } & { contentType: z.ZodLiteral<"interactive">; interactive: z.ZodObject<{ subType: z.ZodEnum<["buttons", "list", "product", "productList"]>; components: z.ZodObject<{ header: z.ZodOptional<z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type: "text"; }>>; body: z.ZodOptional<z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type: "text"; }>>; footer: z.ZodOptional<z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; }, "strip", z.ZodTypeAny, { text: string; type: "text"; }, { text: string; type: "text"; }>>; buttons: z.ZodOptional<z.ZodArray<z.ZodObject<{ type: z.ZodLiteral<"reply">; reply: z.ZodObject<{ payload: z.ZodString; title: z.ZodString; }, "strip", z.ZodTypeAny, { payload: string; title: string; }, { payload: string; title: string; }>; }, "strip", z.ZodTypeAny, { type: "reply"; reply: { payload: string; title: string; }; }, { type: "reply"; reply: { payload: string; title: string; }; }>, "many">>; list: z.ZodOptional<z.ZodObject<{ title: z.ZodString; sections: z.ZodArray<z.ZodObject<{ title: z.ZodString; rows: z.ZodArray<z.ZodObject<{ payload: z.ZodString; title: z.ZodString; description: z.ZodString; }, "strip", z.ZodTypeAny, { payload: string; title: string; description: string; }, { payload: string; title: string; description: string; }>, "many">; }, "strip", z.ZodTypeAny, { title: string; rows: { payload: string; title: string; description: string; }[]; }, { title: string; rows: { payload: string; title: string; description: string; }[]; }>, "many">; }, "strip", z.ZodTypeAny, { title: string; sections: { title: string; rows: { payload: string; title: string; description: string; }[]; }[]; }, { title: string; sections: { title: string; rows: { payload: string; title: string; description: string; }[]; }[]; }>>; productList: z.ZodOptional<z.ZodObject<{ catalogId: z.ZodString; sections: z.ZodArray<z.ZodObject<{ items: z.ZodArray<z.ZodObject<{ productId: z.ZodString; }, "strip", z.ZodTypeAny, { productId: string; }, { productId: string; }>, "many">; }, "strip", z.ZodTypeAny, { items: { productId: string; }[]; }, { items: { productId: string; }[]; }>, "many">; }, "strip", z.ZodTypeAny, { sections: { items: { productId: string; }[]; }[]; catalogId: string; }, { sections: { items: { productId: string; }[]; }[]; catalogId: string; }>>; product: z.ZodOptional<z.ZodObject<{ catalogId: z.ZodString; productId: z.ZodString; }, "strip", z.ZodTypeAny, { productId: string; catalogId: string; }, { productId: string; catalogId: string; }>>; }, "strip", z.ZodTypeAny, { buttons?: { type: "reply"; reply: { payload: string; title: string; }; }[] | undefined; list?: { title: string; sections: { title: string; rows: { payload: string; title: string; description: string; }[]; }[]; } | undefined; product?: { productId: string; catalogId: string; } | undefined; productList?: { sections: { items: { productId: string; }[]; }[]; catalogId: string; } | undefined; header?: { text: string; type: "text"; } | undefined; body?: { text: string; type: "text"; } | undefined; footer?: { text: string; type: "text"; } | undefined; }, { buttons?: { type: "reply"; reply: { payload: string; title: string; }; }[] | undefined; list?: { title: string; sections: { title: string; rows: { payload: string; title: string; description: string; }[]; }[]; } | undefined; product?: { productId: string; catalogId: string; } | undefined; productList?: { sections: { items: { productId: string; }[]; }[]; catalogId: string; } | undefined; header?: { text: string; type: "text"; } | undefined; body?: { text: string; type: "text"; } | undefined; footer?: { text: string; type: "text"; } | undefined; }>; }, "strip", z.ZodTypeAny, { subType: "buttons" | "list" | "product" | "productList"; components: { buttons?: { type: "reply"; reply: { payload: string; title: string; }; }[] | undefined; list?: { title: string; sections: { title: string; rows: { payload: string; title: string; description: string; }[]; }[]; } | undefined; product?: { productId: string; catalogId: string; } | undefined; productList?: { sections: { items: { productId: string; }[]; }[]; catalogId: string; } | undefined; header?: { text: string; type: "text"; } | undefined; body?: { text: string; type: "text"; } | undefined; footer?: { text: string; type: "text"; } | undefined; }; }, { subType: "buttons" | "list" | "product" | "productList"; components: { buttons?: { type: "reply"; reply: { payload: string; title: string; }; }[] | undefined; list?: { title: string; sections: { title: string; rows: { payload: string; title: string; description: string; }[]; }[]; } | undefined; product?: { productId: string; catalogId: string; } | undefined; productList?: { sections: { items: { productId: string; }[]; }[]; catalogId: string; } | undefined; header?: { text: string; type: "text"; } | undefined; body?: { text: string; type: "text"; } | undefined; footer?: { text: string; type: "text"; } | undefined; }; }>; }, "strip", z.ZodTypeAny, { interactive: { subType: "buttons" | "list" | "product" | "productList"; components: { buttons?: { type: "reply"; reply: { payload: string; title: string; }; }[] | undefined; list?: { title: string; sections: { title: string; rows: { payload: string; title: string; description: string; }[]; }[]; } | undefined; product?: { productId: string; catalogId: string; } | undefined; productList?: { sections: { items: { productId: string; }[]; }[]; catalogId: string; } | undefined; header?: { text: string; type: "text"; } | undefined; body?: { text: string; type: "text"; } | undefined; footer?: { text: string; type: "text"; } | undefined; }; }; contentType: "interactive"; senderName?: string | undefined; urlPreviewDisplayed?: boolean | undefined; }, { interactive: { subType: "buttons" | "list" | "product" | "productList"; components: { buttons?: { type: "reply"; reply: { payload: string; title: string; }; }[] | undefined; list?: { title: string; sections: { title: string; rows: { payload: string; title: string; description: string; }[]; }[]; } | undefined; product?: { productId: string; catalogId: string; } | undefined; productList?: { sections: {