import { GenericFields, Pageable, Response } from "../../types/generic"; import RestClient from "../../utils/RestClient"; export interface Contact extends Omit { entity: "contact"; name: string; email?: string; contact?: string; type?: "vendor" | "customer" | "employee" | "self"; reference_id?: string; notes?: Record; } declare class RPXContact { client: RestClient; constructor(client: RestClient); /** * Creates a contact for the account * @link https://razorpay.com/docs/api/x/contacts#create-a-contact */ create(contactInfo: Omit): Promise; /** * updates a contact for the account * @link https://razorpay.com/docs/api/x/contacts#update-a-contact */ update(contactId: Contact["id"], contactInfo: Omit): Promise; /** * Fetches all contacts the account * @link https://razorpay.com/docs/api/x/contacts#fetch-all-contacts */ getAll(filters?: Pageable & Partial>): Promise>; /** * Fetches details of a contact * @link https://razorpay.com/docs/api/x/contacts#fetch-a-contact-by-id */ get(contactId: Contact["id"]): Promise; /** * Activates a contact * @link https://razorpay.com/docs/api/x/contacts#activate-or-deactivate-a-contact */ activate(contactId: Contact["id"]): Promise; /** * Deactivates a contact * @link https://razorpay.com/docs/api/x/contacts#activate-or-deactivate-a-contact */ deactivate(contactId: Contact["id"]): Promise; } export default RPXContact;