UNPKG

tyntec-sdk

Version:

TypeScript SDK for Tyntec Conversations API V3

431 lines (430 loc) 12.9 kB
import { z } from 'zod'; export declare const mediaMessageSchema: 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; }>]>; export declare const textMessageSchema: 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; }>; export declare const locationMessageSchema: 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; }>; export declare const contactsMessageSchema: 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; }>; export declare const reactionMessageSchema: 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; }>;