UNPKG

@solufy/evolution-sdk

Version:

Unofficial SDK for the Evolution Whatsapp API v2

157 lines (154 loc) 4.35 kB
import * as libphonenumber_js from 'libphonenumber-js'; import { z } from 'zod'; declare const FindAllGroupsResponseSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{ id: z.ZodString; subject: z.ZodString; subjectOwner: z.ZodString; subjectTime: z.ZodDate; pictureUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>; size: z.ZodNumber; creation: z.ZodDate; owner: z.ZodString; restrict: z.ZodBoolean; announce: z.ZodBoolean; }, "strip", z.ZodTypeAny, { id: string; subject: string; subjectOwner: string; subjectTime: Date; size: number; creation: Date; owner: string; restrict: boolean; announce: boolean; pictureUrl?: string | null | undefined; }, { id: string; subject: string; subjectOwner: string; subjectTime: Date; size: number; creation: Date; owner: string; restrict: boolean; announce: boolean; pictureUrl?: string | null | undefined; }>, "many">, { jid: `${string}@g.us`; name: string; pictureUrl: string | undefined; size: number; subject: { owner: `${string}@s.whatsapp.net`; time: Date; }; owner: { jid: `${string}@s.whatsapp.net`; phoneNumber: libphonenumber_js.E164Number; }; createdAt: Date; restrict: boolean; announce: boolean; }[], { id: string; subject: string; subjectOwner: string; subjectTime: Date; size: number; creation: Date; owner: string; restrict: boolean; announce: boolean; pictureUrl?: string | null | undefined; }[]>; declare const FindAllGroupsWithParticipantsResponseSchema: z.ZodEffects<z.ZodArray<z.ZodObject<{ id: z.ZodString; subject: z.ZodString; subjectOwner: z.ZodString; subjectTime: z.ZodDate; pictureUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>; size: z.ZodNumber; creation: z.ZodDate; owner: z.ZodString; restrict: z.ZodBoolean; announce: z.ZodBoolean; } & { participants: z.ZodArray<z.ZodObject<{ id: z.ZodString; admin: z.ZodOptional<z.ZodNullable<z.ZodEnum<["admin", "superadmin"]>>>; }, "strip", z.ZodTypeAny, { id: string; admin?: "admin" | "superadmin" | null | undefined; }, { id: string; admin?: "admin" | "superadmin" | null | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { id: string; subject: string; subjectOwner: string; subjectTime: Date; size: number; creation: Date; owner: string; restrict: boolean; announce: boolean; participants: { id: string; admin?: "admin" | "superadmin" | null | undefined; }[]; pictureUrl?: string | null | undefined; }, { id: string; subject: string; subjectOwner: string; subjectTime: Date; size: number; creation: Date; owner: string; restrict: boolean; announce: boolean; participants: { id: string; admin?: "admin" | "superadmin" | null | undefined; }[]; pictureUrl?: string | null | undefined; }>, "many">, { participants: { id: string; role: "admin" | "superadmin" | "member"; }[]; jid: `${string}@g.us`; name: string; pictureUrl: string | undefined; size: number; subject: { owner: `${string}@s.whatsapp.net`; time: Date; }; owner: { jid: `${string}@s.whatsapp.net`; phoneNumber: libphonenumber_js.E164Number; }; createdAt: Date; restrict: boolean; announce: boolean; }[], { id: string; subject: string; subjectOwner: string; subjectTime: Date; size: number; creation: Date; owner: string; restrict: boolean; announce: boolean; participants: { id: string; admin?: "admin" | "superadmin" | null | undefined; }[]; pictureUrl?: string | null | undefined; }[]>; type FindAllGroupsResponse = z.infer<typeof FindAllGroupsResponseSchema>; type FindAllGroupsWithParticipantsResponse = z.infer<typeof FindAllGroupsWithParticipantsResponseSchema>; export { type FindAllGroupsResponse, FindAllGroupsResponseSchema, type FindAllGroupsWithParticipantsResponse, FindAllGroupsWithParticipantsResponseSchema, FindAllGroupsResponseSchema as ResponseSchema, FindAllGroupsWithParticipantsResponseSchema as ResponseWithParticipantsSchema };