UNPKG

@gohighlevel/api-client

Version:
252 lines (251 loc) 10.3 kB
import { AxiosInstance, AxiosRequestConfig } from 'axios'; import * as Models from './models/contacts'; /** * Contacts Service * Documentation for Contacts API */ export declare class Contacts { private client; constructor(httpClient: AxiosInstance); /** * Search Contacts * Search contacts based on combinations of advanced filters. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-158396/6e629989abe7fad */ searchContactsAdvanced(requestBody: Models.SearchBodyV2DTO, options?: AxiosRequestConfig): Promise<any>; /** * Get Duplicate Contact * Get Duplicate Contact.&lt;br/&gt;&lt;br/&gt;If &#x60;Allow Duplicate Contact&#x60; is disabled under Settings, the global unique identifier will be used for searching the contact. If the setting is enabled, first priority for search is &#x60;email&#x60; and the second priority will be &#x60;phone&#x60;. */ getDuplicateContact(params: { locationId: string; number?: string; email?: string; }, options?: AxiosRequestConfig): Promise<any>; /** * Get all Tasks * Get all Tasks */ getAllTasks(params: { contactId: string; }, options?: AxiosRequestConfig): Promise<Models.TasksListSuccessfulResponseDto>; /** * Create Task * Create Task */ createTask(params: { contactId: string; }, requestBody: Models.CreateTaskParams, options?: AxiosRequestConfig): Promise<Models.TaskByIsSuccessfulResponseDto>; /** * Get Task * Get Task */ getTask(params: { contactId: string; taskId: string; }, options?: AxiosRequestConfig): Promise<Models.TaskByIsSuccessfulResponseDto>; /** * Update Task * Update Task */ updateTask(params: { contactId: string; taskId: string; }, requestBody: Models.UpdateTaskBody, options?: AxiosRequestConfig): Promise<Models.TaskByIsSuccessfulResponseDto>; /** * Delete Task * Delete Task */ deleteTask(params: { contactId: string; taskId: string; }, options?: AxiosRequestConfig): Promise<Models.DeleteTaskSuccessfulResponseDto>; /** * Update Task Completed * Update Task Completed */ updateTaskCompleted(params: { contactId: string; taskId: string; }, requestBody: Models.UpdateTaskStatusParams, options?: AxiosRequestConfig): Promise<Models.TaskByIsSuccessfulResponseDto>; /** * Get Appointments for Contact * Get Appointments for Contact */ getAppointmentsForContact(params: { contactId: string; }, options?: AxiosRequestConfig): Promise<Models.GetEventsSuccessfulResponseDto>; /** * Add Tags * Add Tags */ addTags(params: { contactId: string; }, requestBody: Models.TagsDTO, options?: AxiosRequestConfig): Promise<Models.CreateAddTagSuccessfulResponseDto>; /** * Remove Tags * Remove Tags */ removeTags(params: { contactId: string; }, requestBody: Models.TagsDTO, options?: AxiosRequestConfig): Promise<Models.CreateDeleteTagSuccessfulResponseDto>; /** * Get All Notes * Get All Notes */ getAllNotes(params: { contactId: string; }, options?: AxiosRequestConfig): Promise<Models.GetNotesListSuccessfulResponseDto>; /** * Create Note * Create Note */ createNote(params: { contactId: string; }, requestBody: Models.NotesDTO, options?: AxiosRequestConfig): Promise<Models.GetCreateUpdateNoteSuccessfulResponseDto>; /** * Get Note * Get Note */ getNote(params: { contactId: string; id: string; }, options?: AxiosRequestConfig): Promise<Models.GetCreateUpdateNoteSuccessfulResponseDto>; /** * Update Note * Update Note */ updateNote(params: { contactId: string; id: string; }, requestBody: Models.NotesDTO, options?: AxiosRequestConfig): Promise<Models.GetCreateUpdateNoteSuccessfulResponseDto>; /** * Delete Note * Delete Note */ deleteNote(params: { contactId: string; id: string; }, options?: AxiosRequestConfig): Promise<Models.DeleteNoteSuccessfulResponseDto>; /** * Update Contacts Tags * Allows you to update tags to multiple contacts at once, you can add or remove tags from the contacts */ createAssociation(params: { type: string; }, requestBody: Models.UpdateTagsDTO, options?: AxiosRequestConfig): Promise<Models.UpdateTagsResponseDTO>; /** * Add/Remove Contacts From Business * Add/Remove Contacts From Business . Passing a &#x60;null&#x60; businessId will remove the businessId from the contacts */ addRemoveContactFromBusiness(requestBody: Models.ContactsBusinessUpdate, options?: AxiosRequestConfig): Promise<Models.ContactsBulkUpateResponse>; /** * Get Contact * Get Contact */ getContact(params: { contactId: string; }, options?: AxiosRequestConfig): Promise<Models.ContactsByIdSuccessfulResponseDto>; /** * Update Contact * Please find the list of acceptable values for the &#x60;country&#x60; field &lt;a href&#x3D;&quot;https://highlevel.stoplight.io/docs/integrations/ZG9jOjI4MzUzNDIy-country-list&quot; target&#x3D;&quot;_blank&quot;&gt;here&lt;/a&gt; */ updateContact(params: { contactId: string; }, requestBody: Models.UpdateContactDto, options?: AxiosRequestConfig): Promise<Models.UpdateContactsSuccessfulResponseDto>; /** * Delete Contact * Delete Contact */ deleteContact(params: { contactId: string; }, options?: AxiosRequestConfig): Promise<Models.DeleteContactsSuccessfulResponseDto>; /** * Upsert Contact * Please find the list of acceptable values for the &#x60;country&#x60; field &lt;a href&#x3D;&quot;https://highlevel.stoplight.io/docs/integrations/ZG9jOjI4MzUzNDIy-country-list&quot; target&#x3D;&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;The Upsert API will adhere to the configuration defined under the “Allow Duplicate Contact” setting at the Location level. If the setting is configured to check both Email and Phone, the API will attempt to identify an existing contact based on the priority sequence specified in the setting, and will create or update the contact accordingly.&lt;br/&gt;&lt;br/&gt;If two separate contacts already exist—one with the same email and another with the same phone—and an upsert request includes both the email and phone, the API will update the contact that matches the first field in the configured sequence, and ignore the second field to prevent duplication. */ upsertContact(requestBody: Models.UpsertContactDto, options?: AxiosRequestConfig): Promise<Models.UpsertContactsSuccessfulResponseDto>; /** * Get Contacts By BusinessId * Get Contacts By BusinessId */ getContactsByBusinessId(params: { businessId: string; limit?: string; locationId: string; skip?: string; query?: string; }, options?: AxiosRequestConfig): Promise<Models.ContactsSearchSuccessfulResponseDto>; /** * Add Followers * Add Followers */ addFollowersContact(params: { contactId: string; }, requestBody: Models.FollowersDTO, options?: AxiosRequestConfig): Promise<Models.CreateAddFollowersSuccessfulResponseDto>; /** * Remove Followers * Remove Followers */ removeFollowersContact(params: { contactId: string; }, requestBody: Models.FollowersDTO, options?: AxiosRequestConfig): Promise<Models.DeleteFollowersSuccessfulResponseDto>; /** * Add Contact to Campaign * Add contact to Campaign */ addContactToCampaign(params: { contactId: string; campaignId: string; }, requestBody: Models.AddContactToCampaignDto, options?: AxiosRequestConfig): Promise<Models.CreateDeleteCantactsCampaignsSuccessfulResponseDto>; /** * Remove Contact From Campaign * Remove Contact From Campaign */ removeContactFromCampaign(params: { contactId: string; campaignId: string; }, options?: AxiosRequestConfig): Promise<Models.CreateDeleteCantactsCampaignsSuccessfulResponseDto>; /** * Remove Contact From Every Campaign * Remove Contact From Every Campaign */ removeContactFromEveryCampaign(params: { contactId: string; }, options?: AxiosRequestConfig): Promise<Models.CreateDeleteCantactsCampaignsSuccessfulResponseDto>; /** * Add Contact to Workflow * Add Contact to Workflow */ addContactToWorkflow(params: { contactId: string; workflowId: string; }, requestBody: Models.CreateWorkflowDto, options?: AxiosRequestConfig): Promise<Models.ContactsWorkflowSuccessfulResponseDto>; /** * Delete Contact from Workflow * Delete Contact from Workflow */ deleteContactFromWorkflow(params: { contactId: string; workflowId: string; }, requestBody: Models.CreateWorkflowDto, options?: AxiosRequestConfig): Promise<Models.ContactsWorkflowSuccessfulResponseDto>; /** * Create Contact * Please find the list of acceptable values for the &#x60;country&#x60; field &lt;a href&#x3D;&quot;https://highlevel.stoplight.io/docs/integrations/ZG9jOjI4MzUzNDIy-country-list&quot; target&#x3D;&quot;_blank&quot;&gt;here&lt;/a&gt; */ createContact(requestBody: Models.CreateContactDto, options?: AxiosRequestConfig): Promise<Models.CreateContactsSuccessfulResponseDto>; /** * Get Contacts * Get Contacts **Note:** This API endpoint is deprecated. Please use the [Search Contacts](https://highlevel.stoplight.io/docs/integrations/dbe4f3a00a106-search-contacts) endpoint instead. * @deprecated deprecated. Use the [Search Contacts](https://highlevel instead. */ getContacts(params: { locationId: string; startAfterId?: string; startAfter?: number; query?: string; limit?: number; }, options?: AxiosRequestConfig): Promise<Models.ContactsSearchSuccessfulResponseDto>; } export default Contacts; //# sourceMappingURL=contacts.d.ts.map