mnotify-ts-sdk
Version:
Third-Party TypeScript SDK for mNotify BMS API
53 lines (52 loc) • 1.49 kB
TypeScript
import { z } from 'zod';
import { MNotifyClient } from '../client/MNotifyClient';
declare const ContactSchema: z.ZodObject<{
_id: z.ZodString;
phone: z.ZodString;
title: z.ZodOptional<z.ZodString>;
firstname: z.ZodString;
lastname: z.ZodString;
email: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
dbo: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
_id: string;
phone: string;
firstname: string;
lastname: string;
title?: string | undefined;
email?: string[] | undefined;
dbo?: string | undefined;
}, {
_id: string;
phone: string;
firstname: string;
lastname: string;
title?: string | undefined;
email?: string[] | undefined;
dbo?: string | undefined;
}>;
export type Contact = z.infer<typeof ContactSchema>;
export type CreateContact = Omit<Contact, '_id'>;
export declare class ContactService {
private readonly client;
constructor(client: MNotifyClient);
createContact(contact: Omit<Contact, "_id">): Promise<{
_id: string;
phone: string;
firstname: string;
lastname: string;
title?: string | undefined;
email?: string[] | undefined;
dbo?: string | undefined;
}>;
getContacts(): Promise<{
_id: string;
phone: string;
firstname: string;
lastname: string;
title?: string | undefined;
email?: string[] | undefined;
dbo?: string | undefined;
}[]>;
}
export {};