UNPKG

tyntec-sdk

Version:

TypeScript SDK for Tyntec Conversations API V3

757 lines (756 loc) 21.2 kB
import { z } from 'zod'; export declare const buttonSchema: 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; }; }>; export declare const listSectionSchema: 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; }[]; }>; export declare const productListSectionSchema: 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; }[]; }>; export declare const interactiveComponentsSchema: 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; }>; export declare const interactiveMessageSchema: 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: { 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; }>;