ghl-sdk
Version:
GoHighLevel SDK
1,806 lines (1,792 loc) • 166 kB
TypeScript
import { AxiosRequestConfig } from 'axios';
declare class GhlClient {
private readonly baseUrl;
private axiosInstance;
private rateLimitDaily;
private rateLimitBurst;
constructor(accessToken?: string);
private handleError;
private handleRateLimit;
protected get<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
protected post<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
protected put<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
protected patch<T>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>;
protected delete<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
}
type BlogsSearchParams = {
locationId: string;
limit: string;
offset: string;
};
type CheckSlugDto = {
locationId: string;
urlSlug: string;
postId?: string;
};
type CheckSlugResponse = {
exists: boolean;
};
type UpdatePostDto = {
title: string;
locationId: string;
status: string;
blogId?: string;
imageUrl?: string;
description?: string;
rawHTML?: string;
wordCount?: number;
readTimeInMinutes?: number;
imageAltText?: string;
categories?: string[];
tags?: string[];
author?: string;
urlSlug?: string;
canonicalLink?: string;
publishedAt?: string;
};
type UpdatePostResponse = {
updatedBlogPost: UpdatePostDto;
};
type CreatePostDto = {
title: string;
locationId: string;
blogId: string;
imageUrl: string;
description: string;
rawHTML: string;
status: string;
wordCount: number;
readTimeInMinutes: number;
imageAltText: string;
categories: string[];
tags: string[];
author: string;
urlSlug: string;
canonicalLink: string;
publishedAt: string;
archived?: boolean;
currentVersion?: string;
metaData?: object;
};
type BlogsAuthorSocialsSchema = {
type: string;
url: string;
};
type CreatePostResponse = {
data: CreatePostDto;
};
type BlogsAuthorsSchema = {
socials?: BlogsAuthorSocialsSchema[];
_id?: string;
name?: string;
imageUrl?: string;
imageAltText?: string;
description?: string;
locationId?: string;
updatedAt?: string;
};
type ListAuthorsResponse = {
authors: BlogsAuthorsSchema[];
count: number;
traceId: string;
};
type BlogsCategorySchema = {
_id: string;
label?: string;
urlSlug?: string;
description?: string;
imageUrl?: string;
imageAltText?: string;
locationId?: string;
updatedAt?: string;
};
type ListCategoriesResponse = {
categories: BlogsCategorySchema[];
count: number;
traceId: string;
};
declare class BlogsClient extends GhlClient {
constructor(accessToken: string);
findAuthors(params: BlogsSearchParams): Promise<ListAuthorsResponse>;
findCategories(params: BlogsSearchParams): Promise<ListCategoriesResponse>;
checkSlug(dto: CheckSlugDto): Promise<CheckSlugResponse>;
create(dto: CreatePostDto): Promise<CreatePostResponse>;
update(id: string, dto: UpdatePostDto): Promise<UpdatePostResponse>;
}
type Business = {
id: string;
name: string;
locationId: string;
phone?: string;
email?: string;
website?: string;
address?: string;
city?: string;
postalCode?: string;
state?: string;
country?: string;
description?: string;
updatedBy?: any;
createdAt?: string;
updatedAt?: string;
};
type CreateBusinessDto = {
name: string;
locationId: string;
phone?: string;
email?: string;
website?: string;
address?: string;
city?: string;
postalCode?: string;
state?: string;
country?: string;
description?: string;
};
type UpdateBusinessDto = {
name?: string;
phone?: string;
email?: string;
website?: string;
address?: string;
city?: string;
postalCode?: string;
state?: string;
country?: string;
description?: string;
};
type CreateUpdateBusinessResponse = {
success: boolean;
business: Business;
};
type GetBusinessResponse = {
business: Business;
};
type ListBusinessesResponse = {
businesses: Business[];
};
declare class BusinessesClient extends GhlClient {
constructor(accessToken: string);
findByLocation(locationId: string): Promise<ListBusinessesResponse>;
findById(id: string): Promise<GetBusinessResponse>;
create(dto: CreateBusinessDto): Promise<CreateUpdateBusinessResponse>;
update(id: string, dto: UpdateBusinessDto): Promise<CreateUpdateBusinessResponse>;
remove(id: string): Promise<void>;
}
type StrictOmit<T, K extends keyof T> = Omit<T, K>;
type BadRequestResponse = {
statusCode?: number;
message?: string;
};
type UnauthorizedResponse = {
statusCode?: number;
message?: string;
error?: string;
};
type UnprocessableResponse = {
statusCode?: number;
message?: string;
error?: string;
};
type SuccessDeleteResponse = {
success?: boolean;
};
type SuccededDeleteResponse = {
succeded?: boolean;
};
type IntervalType = 'yearly' | 'monthly' | 'weekly' | 'daily' | 'hourly' | 'minutely' | 'secondly';
type DayOfMonth = -1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28;
type DayOfWeek = 'mo' | 'tu' | 'we' | 'th' | 'fr' | 'sa' | 'su';
type NumOfWeek = -1 | 1 | 2 | 3 | 4;
type MonthOfYear = 'jan' | 'feb' | 'mar' | 'apr' | 'may' | 'jun' | 'jul' | 'aug' | 'sep' | 'oct' | 'nov' | 'dec';
type CustomRRuleOptions = {
intervalType: IntervalType;
interval: number;
startDate: string;
startTime?: string;
endDate?: string;
endTime?: string;
dayOfMonth?: DayOfMonth;
dayOfWeek?: DayOfWeek;
numOfWeek?: NumOfWeek;
monthOfYear?: MonthOfYear;
count?: number;
daysBefore?: number;
};
type ScheduleOptions = {
executeAt: string;
rrule: CustomRRuleOptions;
};
declare enum CountryCodes {
Afghanistan = "AF",
AlandIslands = "AX",
Albania = "AL",
Algeria = "DZ",
AmericanSamoa = "AS",
AndorrA = "AD",
Angola = "AO",
Anguilla = "AI",
Antarctica = "AQ",
AntiguaAndBarbuda = "AG",
Argentina = "AR",
Armenia = "AM",
Aruba = "AW",
Australia = "AU",
Austria = "AT",
Azerbaijan = "AZ",
Bahamas = "BS",
Bahrain = "BH",
Bangladesh = "BD",
Barbados = "BB",
Belarus = "BY",
Belgium = "BE",
Belize = "BZ",
Benin = "BJ",
Bermuda = "BM",
Bhutan = "BT",
Bolivia = "BO",
BosniaAndHerzegovina = "BA",
Botswana = "BW",
BouvetIsland = "BV",
Brazil = "BR",
BritishIndianOceanTerritory = "IO",
BruneiDarussalam = "BN",
Bulgaria = "BG",
BurkinaFaso = "BF",
Burundi = "BI",
Cambodia = "KH",
Cameroon = "CM",
Canada = "CA",
CapeVerde = "CV",
CaymanIslands = "KY",
CentralAfricanRepublic = "CF",
Chad = "TD",
Chile = "CL",
China = "CN",
ChristmasIsland = "CX",
CocosKeelingIslands = "CC",
Colombia = "CO",
Comoros = "KM",
Congo = "CG",
CongoTheDemocraticRepublicOfThe = "CD",
CookIslands = "CK",
CostaRica = "CR",
CoteDIvoire = "CI",
Croatia = "HR",
Cuba = "CU",
Cyprus = "CY",
CzechRepublic = "CZ",
Denmark = "DK",
Djibouti = "DJ",
Dominica = "DM",
DominicanRepublic = "DO",
Ecuador = "EC",
Egypt = "EG",
ElSalvador = "SV",
EquatorialGuinea = "GQ",
Eritrea = "ER",
Estonia = "EE",
Ethiopia = "ET",
FalklandIslandsMalvinas = "FK",
FaroeIslands = "FO",
Fiji = "FJ",
Finland = "FI",
France = "FR",
FrenchGuiana = "GF",
FrenchPolynesia = "PF",
FrenchSouthernTerritories = "TF",
Gabon = "GA",
Gambia = "GM",
Georgia = "GE",
Germany = "DE",
Ghana = "GH",
Gibraltar = "GI",
Greece = "GR",
Greenland = "GL",
Grenada = "GD",
Guadeloupe = "GP",
Guam = "GU",
Guatemala = "GT",
Guernsey = "GG",
Guinea = "GN",
GuineaBissau = "GW",
Guyana = "GY",
Haiti = "HT",
HeardIslandAndMcdonaldIslands = "HM",
HolySeeVaticanCityState = "VA",
Honduras = "HN",
HongKong = "HK",
Hungary = "HU",
Iceland = "IS",
India = "IN",
Indonesia = "ID",
IranIslamicRepublicOf = "IR",
Iraq = "IQ",
Ireland = "IE",
IsleOfMan = "IM",
Isreal = "IL",
Italy = "IT",
Jamaica = "JM",
Japan = "JP",
Jersey = "JE",
Jordan = "JO",
Kazakhstan = "KZ",
Kenya = "KE",
Kiribati = "KI",
KoreaDemocraticPeoplesRepublic = "KP",
KoreaRepublicOf = "KR",
Kosovo = "XK",
Kuwait = "KW",
Kyrgyzstan = "KG",
LaoPeoplesDemocraticRepublic = "LA",
Latvia = "LV",
Lebanon = "LB",
Lesotho = "LS",
Liberia = "LR",
LibyanArabJamahiriya = "LY",
Liechtenstein = "LI",
Lithuania = "LT",
Luxembourg = "LU",
Macao = "MO",
MacedoniaTheFormerYugoslavRepublicOf = "MK",
Madagascar = "MG",
Malawi = "MW",
Malaysia = "MY",
Maldives = "MV",
Mali = "ML",
Malta = "MT",
MarshallIslands = "MH",
Martinique = "MQ",
Mauritania = "MR",
Mauritius = "MU",
Mayotte = "YT",
Mexico = "MX",
MicronesiaFederatedStatesOf = "FM",
MoldovaRepublicOf = "MD",
Monaco = "MC",
Mongolia = "MN",
Montenegro = "ME",
Montserrat = "MS",
Morocco = "MA",
Mozambique = "MZ",
Myanmar = "MM",
Namibia = "NA",
Nauru = "NR",
Nepal = "NP",
Netherlands = "NL",
NetherlandsAntilles = "AN",
NewCaledonia = "NC",
NewZealand = "NZ",
Nicaragua = "NI",
Niger = "NE",
Nigeria = "NG",
Niue = "NU",
NorfolkIsland = "NF",
NorthernMarianaIslands = "MP",
Norway = "NO",
Oman = "OM",
Pakistan = "PK",
Palau = "PW",
PalestinianTerritoryOccupied = "PS",
Panama = "PA",
PapuaNewGuinea = "PG",
Paraguay = "PY",
Peru = "PE",
Philippines = "PH",
Pitcairn = "PN",
Poland = "PL",
Portugal = "PT",
PuertoRico = "PR",
Qatar = "QA",
Reunion = "RE",
Romania = "RO",
RussianFederation = "RU",
Rwanda = "RW",
SaintHelena = "SH",
SaintKittsAndNevis = "KN",
SaintLucia = "LC",
SaintMartin = "MF",
SaintPierreAndMiquelon = "PM",
SaintVincentAndTheGrenadines = "VC",
Samoa = "WS",
SanMarino = "SM",
SaoTomeAndPrincipe = "ST",
SaudiArabia = "SA",
Senegal = "SN",
Serbia = "RS",
Seychelles = "SC",
SierraLeone = "SL",
Singapore = "SG",
SintMaarten = "SX",
Slovakia = "SK",
Slovenia = "SI",
SolomonIslands = "SB",
Somalia = "SO",
SouthAfrica = "ZA",
SouthGeorgiaAndTheSouthSandwichIslands = "GS",
Spain = "ES",
SriLanka = "LK",
Sudan = "SD",
Suriname = "SR",
SvalbardAndJanMayen = "SJ",
Swaziland = "SZ",
Sweden = "SE",
Switzerland = "CH",
SyrianArabRepublic = "SY",
Taiwan = "TW",
Tajikistan = "TJ",
Tanzania = "TZ",
Thailand = "TH",
TimorLeste = "TL",
Togo = "TG",
Tokelau = "TK",
Tonga = "TO",
TrinidadAndTobago = "TT",
Tunisia = "TN",
Turkey = "TR",
Turkmenistan = "TM",
TurksAndCaicosIslands = "TC",
Tuvalu = "TV",
Uganda = "UG",
UK = "GB",
Ukraine = "UA",
UnitedArabEmirates = "AE",
UnitedStates = "US",
UnitedStatesMinorOutlyingIslands = "UM",
Uruguay = "UY",
Uzbekistan = "UZ",
Vanuatu = "VU",
Venezuela = "VE",
VietNam = "VN",
VirginIslandsBritish = "VG",
VirginIslandsUS = "VI",
WallisAndFutuna = "WF",
WesternSahara = "EH",
Yemen = "YE",
Zambia = "ZM",
Zimbabwe = "ZW"
}
type FieldType = 'TEXT' | 'LARGE_TEXT' | 'NUMERICAL' | 'PHONE' | 'MONETORY' | 'CHECKBOX' | 'SINGLE_OPTIONS' | 'MULTIPLE_OPTIONS' | 'DATE' | 'TEXTBOX_LIST' | 'FILE_UPLOAD' | 'RADIO';
type FileFormat = '.pdf' | '.docx' | '.doc' | '.jpg' | '.jpeg' | '.png' | '.gif' | '.csv' | '.xlsx' | '.xls' | 'all';
type CalendarSearchParams = {
groupId?: string;
showDrafted?: boolean;
locationId: string;
};
type CalendarEventSearchParams = {
locationId: string;
startTime: string;
endTime: string;
calendarId?: string;
groupId?: string;
userId?: string;
};
type CalendarGroup = {
locationId: string;
name: string;
description: string;
slug: string;
isActive?: boolean;
id?: string;
};
type ListCalendarGroupsResponse = {
groups: CalendarGroup[];
};
type ValidateCalendarGroupSlugDto = {
locationId: string;
slug: string;
};
type ValidateCalendarGroupSlugResponse = {
available: boolean;
};
type CreateCalendarGroupDto = {
locationId: string;
name: string;
description: string;
slug: string;
isActive?: boolean;
};
type CalendarGetFreeSlots = {
startDate: string;
endDate: string;
userId?: string;
userIds?: string[];
timezone?: string;
enableLookBusy?: string;
};
type CreateUpdateCalendarGroupResponse = {
group: CalendarGroup;
};
type UpdateCalendarGroupStatusResponse = {
success: boolean;
};
type CalendarGroupStatusUpdateParams = {
isActive: boolean;
};
type UpdateCalendarGroupDto = {
name: string;
description: string;
slug: string;
};
type CalendarEvent = {
id: string;
title: string;
calendarId: string;
locationId: string;
contactId: string;
groupId: string;
appointmentStatus: string;
assignedUserId: string;
users: string[];
startTime: string;
endTime: string;
dateAdded: string;
dateUpdated: string;
address?: string;
notes?: string;
assignedResources?: string[];
isRecurring?: boolean;
rrule?: string;
masterEventId?: string;
};
type ListCalendarEventsResponse = {
events: CalendarEvent[];
};
type CalendarSlotsSchema = {
slots: string[];
};
type GetCalendarSlotsResponse = {
__dates__: CalendarSlotsSchema;
};
type CalendarNotification = {
shouldSendToContact: boolean;
shouldSendToGuest: boolean;
shouldSendToUser: boolean;
shouldSendToSelectedUsers: boolean;
type?: 'email';
};
type CalendarTeamMemberPriorityTypes = 0 | 0.5 | 1;
type CalendarMeetingLocationTypes = 'custom' | 'zoom' | 'gmeet' | 'phone' | 'address';
type CalendarTeamMember = {
userId: string;
priority?: CalendarTeamMemberPriorityTypes;
meetingLocationType?: CalendarMeetingLocationTypes;
meeitngLocation?: string;
isPrimary?: boolean;
};
type Hour = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23;
type Minute = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59;
type CalendarDay = 0 | 1 | 2 | 3 | 4 | 5 | 6;
type CalendarHour = {
openHour: Hour;
openMinute: Minute;
closeHour: Hour;
closeMinute: Minute;
};
type CalendarOpenHour = {
daysOfTheWeek: CalendarDay[];
hours: CalendarHour[];
};
type CalendarRecurringCount = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24;
type CalendarRecurring = {
freq?: 'DAILY' | 'WEEKLY' | 'MONTHLY';
count?: CalendarRecurringCount;
bookingOption?: 'skip' | 'continue' | 'book_next';
bookingOverlapDefaultStatus?: 'confirmed' | 'new';
};
type CalendarAvailability = {
date: string;
hours: CalendarHour;
deleted?: boolean;
};
type CalendarLookBusyConfiguration = {
enabled: boolean;
LookBusyPercentage: number;
};
type CalendarEventType = 'RoundRobin_OptimizeForAvailability' | 'RoundRobin_OptimizeForEqualDistribution';
type CalendarUserAssignedType = 'round_robin' | 'collective' | 'class' | 'service' | 'personal';
type CalendarNonUserAssignedType = 'event';
type CalendarWidgetType = 'default' | 'classic';
type CalendarBaseDto = {
id: string;
name: string;
locationId: string;
notifications?: CalendarNotification[];
isActive?: boolean;
groupId?: string;
eventType?: CalendarEventType;
description?: string;
slug?: string;
widgetSlug?: string;
widgetType?: CalendarWidgetType;
eventTitle?: string;
eventColor?: string;
slotDuration?: number;
slotDurationUnit?: 'mins' | 'hours';
slotInterval?: number;
slotIntervalUnit?: 'mins' | 'hours';
slotBuffer?: number;
slotBufferUnit?: 'mins' | 'hours';
preBuffer?: number;
preBufferUnit?: 'mins' | 'hours';
appoinmentPerSlot?: number;
appoinmentPerDay?: number;
allowBookingAfter?: number;
allowBookingAfterUnit?: 'hours' | 'days' | 'weeks' | 'months';
allowBookingFor?: number;
allowBookingForUnit?: 'days' | 'weeks' | 'months';
openHours?: CalendarOpenHour[];
enableRecurring?: boolean;
recurring?: CalendarRecurring;
formId?: string;
stickyContact?: boolean;
isLivePaymentMode?: boolean;
autoConfirm?: boolean;
shouldSendAlertEmailsToAssignedMember?: boolean;
alertEmail?: string;
googleInvitationEmails?: boolean;
allowReschedule?: boolean;
allowCancellation?: boolean;
shouldAssignContactToTeamMember?: boolean;
shouldSkipAssigningContactForExisting?: boolean;
notes?: string;
pixelId?: string;
formSubmitType?: 'RedirectURL' | 'ThankYouMessage';
formSubmitRedirectURL?: string;
formSubmitThanksMessage?: string;
availabilityType?: 0 | 1;
availabilities?: CalendarAvailability[];
guestType?: 'count_only' | 'collect_detail';
consentLabel?: string;
calendarCoverImage?: string;
lookBusyConfig?: CalendarLookBusyConfiguration;
};
type CalendarUserAssignedDTO = CalendarBaseDto & {
teamMembers: CalendarTeamMember[];
calendarType: CalendarUserAssignedType;
};
type CalendarNonUserAssignedDTO = CalendarBaseDto & {
calendarType: CalendarNonUserAssignedType;
meetingLocation: string;
};
type Calendar = CalendarUserAssignedDTO | CalendarNonUserAssignedDTO;
type ListCalendarsResponse = {
calendars: Calendar[];
};
type CalendarBaseCreateUpdateDto = {
name: string;
locationId: string;
notifications?: CalendarNotification[];
isActive?: boolean;
groupId?: string;
eventType?: CalendarEventType;
description?: string;
slug?: string;
widgetSlug?: string;
widgetType?: CalendarWidgetType;
eventTitle?: string;
eventColor?: string;
slotDuration?: number;
slotDurationUnit?: 'mins' | 'hours';
slotInterval?: number;
slotIntervalUnit?: 'mins' | 'hours';
slotBuffer?: number;
slotBufferUnit?: 'mins' | 'hours';
preBuffer?: number;
preBufferUnit?: 'mins' | 'hours';
appoinmentPerSlot?: number;
appoinmentPerDay?: number;
allowBookingAfter?: number;
allowBookingAfterUnit?: 'hours' | 'days' | 'weeks' | 'months';
allowBookingFor?: number;
allowBookingForUnit?: 'days' | 'weeks' | 'months';
openHours?: CalendarOpenHour[];
enableRecurring?: boolean;
recurring?: CalendarRecurring;
formId?: string;
stickyContact?: boolean;
isLivePaymentMode?: boolean;
autoConfirm?: boolean;
shouldSendAlertEmailsToAssignedMember?: boolean;
alertEmail?: string;
googleInvitationEmails?: boolean;
allowReschedule?: boolean;
allowCancellation?: boolean;
shouldAssignContactToTeamMember?: boolean;
shouldSkipAssigningContactForExisting?: boolean;
notes?: string;
pixelId?: string;
formSubmitType?: 'RedirectURL' | 'ThankYouMessage';
formSubmitRedirectURL?: string;
formSubmitThanksMessage?: string;
availabilityType?: 0 | 1;
availabilities?: CalendarAvailability[];
guestType?: 'count_only' | 'collect_detail';
consentLabel?: string;
calendarCoverImage?: string;
lookBusyConfig?: CalendarLookBusyConfiguration;
};
type CalendarCreateUserAssignedDto = CalendarBaseDto & {
teamMembers: CalendarTeamMember[];
calendarType: CalendarUserAssignedType;
};
type CalendarCreateNonUserAssignedDto = CalendarBaseDto & {
calendarType: CalendarNonUserAssignedType;
meetingLocation: string;
};
type CreateCalendarDto = CalendarCreateUserAssignedDto | CalendarCreateNonUserAssignedDto;
type UpdateCalendarDto = Partial<CalendarCreateUserAssignedDto> | Partial<CalendarCreateNonUserAssignedDto>;
type GetCalendarResponse = {
calendar: Calendar;
};
type CalendarUpdateAvailabilityDTO = {
date: string;
hours: CalendarHour;
deleted?: boolean;
id?: string;
};
type GetCalendarEventResponse = {
event: CalendarEvent;
};
type AppointmentCreateUpdateDto = {
calendarId: string;
locationId: string;
contactId: string;
startTime: string;
endTime?: string;
title?: string;
meetingLocationType?: CalendarMeetingLocationTypes;
appointmentStatus?: string;
assignedUserId?: string;
address?: string;
ignoreDateRange?: boolean;
toNotify?: boolean;
rrule?: string;
};
type AppointmentCreateUpdateResponse = {
id: string;
calendarId: string;
locationId: string;
contactId: string;
startTime?: string;
endTime?: string;
title?: string;
appointmentStatus?: string;
assignedUserId?: string;
address?: string;
isRecurring?: boolean;
rrule?: string;
};
type CalendarAppointmentEditSchemaDTO = {
calendarId: string;
startTime: string;
endTime: string;
title: string;
meetingLocationType: string;
appointmentStatus: string;
address: string;
ignoreDateRange: boolean;
toNotify: boolean;
};
type CreateBlockSlotDto = {
locationId: string;
startTime: string;
endTime: string;
calendarId?: string;
title?: string;
assignedUserId?: string;
};
type BlockSlotCreateUpdateResponse = {
id: string;
locationId: string;
title: string;
startTime: string;
endTime: string;
calendarId?: string;
assignedUserId?: string;
};
type UpdateBlockSlotDto = {
calendarId?: string;
startTime?: string;
endTime?: string;
title?: string;
assignedUserId?: string;
};
type AppointmentNote = {
id?: string;
body?: string;
userId?: string;
dateAdded?: string;
contactId?: string;
createdBy?: {
name?: string;
profilePhoto?: string;
};
};
type ListAppointmentNotesResponse = {
notes?: AppointmentNote[];
hasMore?: boolean;
};
type AppointmentNoteDto = {
body: string;
userId?: string;
};
type AppointmentNoteResponse = {
note: AppointmentNote;
};
type CalendarResourceType = 'equipments' | 'rooms';
type CalendarResourceSearchParams = {
locationId: string;
limit: number;
skip: number;
};
type CalendarResourceResponse = {
locationId: string;
name: string;
isActive: boolean;
resourceType: CalendarResourceType;
calendarIds: string[];
description?: string;
quantity?: number;
outOfService?: number;
capacity?: number;
};
type CreateCalendarResourceDto = {
locationId: string;
name: string;
description: string;
quantity: number;
outOfService: number;
capacity: number;
calendarIds: string[];
};
type UpdateCalendarResourceDto = {
locationId: string;
name: string;
description: string;
quantity: number;
outOfService: number;
capacity: number;
calendarIds: string[];
isActive: boolean;
};
type CalendarNotificationSearchParams = {
deleted?: boolean;
isActive?: boolean;
limit?: number;
skip?: number;
};
type CalendarNotificationReceiverType = 'contact' | 'guest' | 'assignedUser' | 'emails';
type CalendarNotificationChannel = 'email' | 'inApp';
type CalendarNotificationType = 'booked' | 'confirmation' | 'cancellation' | 'reminder' | 'followup' | 'reschedule';
type CalendarNotificationTime = {
timeOffset: number;
unit: string;
};
type CalendarNotificationDetails = {
_id: string;
altType: 'calendar';
calendarId: string;
receiverType: CalendarNotificationReceiverType;
receiverEmailIds: string[];
channel: CalendarNotificationChannel;
notificationType: CalendarNotificationType;
isActive: boolean;
templateId: string;
body: string;
subject: string;
afterTime: CalendarNotificationTime[];
beforeTime: CalendarNotificationTime[];
selectedUsers: string[];
deleted: boolean;
};
type CalendarNotificationDto = {
altType: 'calendar';
altId: string;
receiverType: CalendarNotificationReceiverType;
channel: CalendarNotificationChannel;
notificationType: CalendarNotificationType;
isActive?: boolean;
templateId?: string;
body?: string;
subject?: string;
afterTime?: CalendarNotificationTime;
beforeTime?: CalendarNotificationTime;
additionalEmailIds?: string[];
selectedUsers?: string[];
fromAddress?: string;
fromName?: string;
};
type CalendarNotificationOperationResponse = {
message: string;
};
declare class CalendarsClient extends GhlClient {
constructor(accessToken: string);
find(params: CalendarSearchParams): Promise<ListCalendarsResponse>;
findById(id: string): Promise<GetCalendarResponse>;
create(dto: CreateCalendarDto): Promise<GetCalendarResponse>;
update(id: string, dto: UpdateCalendarDto): Promise<GetCalendarResponse>;
remove(id: string): Promise<void>;
findFreeSlots(calendarId: string): Promise<GetCalendarSlotsResponse>;
findGroups(calendarId: string): Promise<ListCalendarGroupsResponse>;
createGroup(dto: CreateCalendarGroupDto): Promise<CreateUpdateCalendarGroupResponse>;
validateGroupSlug(dto: ValidateCalendarGroupSlugDto): Promise<ValidateCalendarGroupSlugResponse>;
removeGroup(groupId: string): Promise<SuccessDeleteResponse>;
updateGroup(groupId: string, dto: UpdateCalendarGroupDto): Promise<CreateUpdateCalendarGroupResponse>;
updateGroupStatus(groupId: string, isActive: boolean): Promise<UpdateCalendarGroupStatusResponse>;
findEvents(params: CalendarEventSearchParams): Promise<ListCalendarEventsResponse>;
findBlockedSlots(params: CalendarEventSearchParams): Promise<ListCalendarEventsResponse>;
findAppointmentById(eventId: string): Promise<GetCalendarEventResponse>;
updateAppointment(eventId: string, dto: AppointmentCreateUpdateDto): Promise<AppointmentCreateUpdateResponse>;
createAppointment(dto: AppointmentCreateUpdateDto): Promise<AppointmentCreateUpdateResponse>;
createBlockSlot(dto: CreateBlockSlotDto): Promise<BlockSlotCreateUpdateResponse>;
updateBlockSlot(eventId: string, dto: UpdateBlockSlotDto): Promise<BlockSlotCreateUpdateResponse>;
removeEvent(eventId: string): Promise<SuccededDeleteResponse>;
findAppointmentNotes(appointmentId: string): Promise<ListAppointmentNotesResponse>;
createAppointmentNote(appointmentId: string, dto: AppointmentNoteDto): Promise<AppointmentNoteResponse>;
updateAppointmentNote(appointmentId: string, noteId: string, dto: AppointmentNoteDto): Promise<AppointmentNoteResponse>;
removeAppointmentNote(appointmentId: string, noteId: string): Promise<SuccessDeleteResponse>;
findResourceById(resourceId: string, resourceType: CalendarResourceType): Promise<CalendarResourceResponse>;
updateResource(resourceId: string, resourceType: CalendarResourceType, dto: UpdateCalendarResourceDto): Promise<CalendarResourceResponse>;
deleteResource(resourceId: string, resourceType: CalendarResourceType): Promise<SuccessDeleteResponse>;
findResourcesByType(resourceType: CalendarResourceType, params: CalendarResourceSearchParams): Promise<CalendarResourceResponse[]>;
createCalendarResource(resourceType: CalendarResourceType, dto: CreateCalendarResourceDto): Promise<CalendarResourceResponse>;
findNotifications(calendarId: string, params: CalendarNotificationSearchParams): Promise<CalendarNotificationDetails[]>;
createNotifications(calendarId: string, dto: CalendarNotificationDto[]): Promise<CalendarNotificationDetails[]>;
findNotificationById(calendarId: string, notificationId: string): Promise<CalendarNotificationDetails>;
updateNotification(calendarId: string, notificationId: string, dto: CalendarNotificationDto): Promise<CalendarNotificationOperationResponse>;
removeNotification(calendarId: string, notificationId: string): Promise<CalendarNotificationOperationResponse>;
}
type CampaignSearchParams = {
status: string;
locationId: string;
};
type Campaign = {
id: string;
name: string;
status: string;
locationId: string;
};
type CampaignsResponse = {
campaigns: Campaign[];
};
declare class CampaignsClient extends GhlClient {
constructor(accessToken: string);
find(params: CampaignSearchParams): Promise<CampaignsResponse>;
}
type CompaniesIOnboarding = {
pending: boolean;
haveWebsite?: boolean;
websiteUrl?: string;
industryServed?: string;
customerCount?: string;
tools?: string[];
conversationDemo?: boolean;
location?: boolean;
locationId?: string;
};
type CompaniesEndTrial = {
trial_end_req_by: string;
trial_ended_on: string;
};
declare enum CompaniesAgencyProAddonActivePlansEnum {
ReviewsMonthly150 = "reviews_monthly_150",
ListingMonthly50 = "listing_monthly_50",
ConversationsMonthly100 = "conversations_monthly_100",
PrioritySupportMonthly300 = "priority-support_monthly_300",
PrioritySupportAnnual300 = "priority-support_annual_300",
PrioritySupportMonthly300Legacy = "priority-support_monthly_300_legacy",
PrioritySupportAnnual300Legacy = "priority-support_annual_300_legacy",
PrioritySupportMonthly240July = "priority-support_monthly_240_july",
HipaaMonthly297 = "hipaa_monthly_297",
HipaaAnnual297 = "hipaa_annual_297",
HipaaMonthly297Legacy = "hipaa_monthly_297_legacy",
AgencyProPlusMonthly399 = "agency-pro-plus_monthly_399",
AgencyProPlusAnnual399 = "agency-pro-plus_annual_399"
}
type CompaniesAgencyProAddOn = {
is_active: boolean;
agency_pro_addon_subscription_id: string;
agency_pro_addon_active_plan: CompaniesAgencyProAddonActivePlansEnum;
};
type CompaniesReactivationAttempt = {
attempted_on: string;
attempted_by: string;
invoice_id: string;
};
type CompaniesDowngrade = {
attempted_on: string;
attempted_by: string;
previous_plan: string;
current_plan: string;
reason: string;
};
declare enum CompanySubscriptionStatusEnum {
Pending = "pending",
Approved = "approved",
Rejected = "rejected"
}
type CompaniesPauseSubscriptionInfo = {
requested_on: string;
req_by: string;
reason: string;
status: CompanySubscriptionStatusEnum;
processed_on: string;
};
type CompaniesBillingInfo = {
first_trial_extension_processed_on?: string;
first_trial_extension_reason?: string;
second_trial_extension_processed_on?: string;
second_trial_extension_reason?: string;
pause_subscription_requested_on?: string;
pause_subscription_reason?: string;
pause_subscription_status?: CompanySubscriptionStatusEnum;
pause_subscription_req_processed_on: string;
pause_subscription_req_by: string;
end_trial_early?: CompaniesEndTrial;
agency_pro_addon?: CompaniesAgencyProAddOn;
coupons_added?: string[];
reactivation_attempt?: CompaniesReactivationAttempt;
downgrade?: CompaniesDowngrade;
first_payment_date?: string;
pause_subscription_info?: CompaniesPauseSubscriptionInfo;
};
type Company = {
id?: string;
name?: string;
email?: string;
logoUrl?: string;
phone?: string;
website?: string;
domain?: string;
spareDomain?: string;
privacyPolicy?: string;
termsConditions?: string;
theme?: string;
address?: string;
city?: string;
postalCode?: string;
country?: string;
state?: string;
timezone?: string;
relationshipNumber?: string;
faviconUrl?: string;
subdomain?: string;
plan?: number;
currency?: string;
customerType?: string;
termsOfServiceVersion?: string;
termsOfServiceAcceptedBy?: string;
termsOfServiceAcceptedDate?: string;
privacyPolicyVersion?: string;
privacyPolicyAcceptedBy?: string;
privacyPolicyAcceptedDate?: string;
affiliatePolicyVersion?: string;
affiliatePolicyAcceptedBy?: string;
affiliatePolicyAcceptedDate?: string;
twilioTrialMode?: boolean;
twilioFreeCredits?: number;
isReselling?: boolean;
onboardingInfo?: CompaniesIOnboarding;
stripeId?: string;
upgradeEnabledForClients?: boolean;
cancelEnabledForClients?: boolean;
autoSuspendEnabled?: boolean;
saasSettings?: object;
stripeActivePlan?: string;
stripeConnectId?: string;
enableDepreciatedFeatures?: boolean;
premiumUpgraded?: boolean;
status?: string;
locationCount?: number;
disableEmailService?: boolean;
billingInfo?: CompaniesBillingInfo;
};
type CompanyResponse = {
company: Company;
};
declare class CompaniesClient extends GhlClient {
constructor(accessToken: string);
findById(id: string): Promise<CompanyResponse>;
}
type OpportunitiesSearchContactResponseSchema = {
id?: string;
name?: string;
companyName?: string;
email?: string;
phone?: string;
tags?: string[];
};
type OpportunitiesCFResponseSchema = {
id: string;
fieldValue: string | object | string[] | object[];
};
type Opportunity = {
id: string;
name?: string;
monetaryValue?: number;
pipelineId?: string;
pipelineStageId?: string;
assignedTo?: string;
status?: string;
source?: string;
lastStatusChangeAt?: string;
lastStageChangeAt?: string;
lastActionDate?: string;
indexVersion?: string;
createdAt?: string;
updatedAt?: string;
contactId?: string;
locationId?: string;
contact?: OpportunitiesSearchContactResponseSchema;
notes?: string[];
tasks?: string[];
calendarEvents?: string[];
customFields?: OpportunitiesCFResponseSchema[];
followers?: string[];
};
type OpportunitiesSearchMeta = {
total: number;
nextPageUrl: string;
startAfterId: string;
startAfter: number;
currentPage: number;
nextPage: number;
prevPage: number;
};
type OpportunitiesSearchResponse = {
opportunities: Opportunity[];
meta: OpportunitiesSearchMeta;
aggregations: object;
};
type OpportunityResponse = {
opportunity: Opportunity;
};
type OpportunityStatus = 'open' | 'won' | 'lost' | 'abandoned';
type UpdateOpportunityStatusResponse = {
succeded: boolean;
};
type OpportunitiesCFInputArraySchema = {
id: string;
key: string;
value: string[];
};
type OpportunitiesCFInputObjectSchema = {
id: string;
key: string;
value: object;
};
type OpportunitiesCFInputStringSchema = {
id: string;
key: string;
value: string;
};
type CreateOpportunityDto = {
pipelineId: string;
locationId: string;
name: string;
pipelineStageId?: string;
status: OpportunityStatus;
contactId: string;
monetaryValue?: number;
assignedTo?: string;
customFields?: Array<OpportunitiesCFInputArraySchema | OpportunitiesCFInputObjectSchema | OpportunitiesCFInputStringSchema>;
};
type UpdateOpportunityDto = {
pipelineId?: string;
name?: string;
pipelineStageId?: string;
status?: OpportunityStatus;
contactId?: string;
monetaryValue?: number;
assignedTo?: string;
customFields?: Array<OpportunitiesCFInputArraySchema | OpportunitiesCFInputObjectSchema | OpportunitiesCFInputStringSchema>;
};
type UpsertOpportunityDto = {
pipelineId: string;
locationId: string;
contactId: string;
name?: string;
pipelineStageId?: string;
status?: OpportunityStatus;
monetaryValue?: number;
assignedTo?: string;
};
type UpsertOpportunityResponse = {
opportunity: Opportunity;
new: boolean;
};
type AddOpportunityFollowersResponse = {
followers: string[];
followersAdded: string[];
};
type RemoveOpportunityFollowersResponse = {
followers: string[];
followersRemoved: string[];
};
type OpportunitySearchParams = {
location_id: string;
assigned_to?: string;
campaignId?: string;
contact_id?: string;
country?: string;
date?: string;
endDate?: string;
getCalendarEvents?: boolean;
getNotes?: boolean;
getTasks?: boolean;
id?: string;
limit?: number;
order?: string;
page?: number;
pipeline_id?: string;
pipeline_stage_id?: string;
q?: string;
startAfter?: string;
startAfterId?: string;
status?: OpportunityStatus | 'all';
};
type PipelineStage = {
id: string;
name: string;
position: number;
showInFunnel: boolean;
showInPieChart: boolean;
};
type Pipeline = {
id?: string;
name?: string;
stages?: PipelineStage[];
showInFunnel?: boolean;
showInPieChart?: boolean;
locationId?: string;
};
type ListPipelinesResponse = {
pipelines: Pipeline[];
};
type DuplicateContactSearchParams = {
email?: string;
number?: string;
locationId: string;
};
type BusinessContactSearchParams = {
limit?: string;
query?: string;
skip?: string;
locationId: string;
};
type ContactLegacySearchParams = {
limit?: number;
query?: string;
startAfter?: number;
startAfterId?: string;
locationId: string;
};
type ContactOpportunity = {
id: string;
pipeline_id: string;
pipeline_stage_id: string;
monetary_value: number;
status: OpportunityStatus;
};
type ContactCustomField = {
id: string;
value: string;
};
type ChannelDNDSettings = {
status: string;
message: string;
code: string;
};
type DNDSettings = {
Call: ChannelDNDSettings;
Email: ChannelDNDSettings;
SMS: ChannelDNDSettings;
WhatsApp: ChannelDNDSettings;
GMB: ChannelDNDSettings;
FB: ChannelDNDSettings;
};
type ContactTagsDto = {
tags: string[];
};
type Contact = {
id: string;
phoneLabel?: string;
country?: string;
address?: string;
source?: string;
type?: string;
locationId?: string;
dnd?: boolean;
state?: string;
businessName?: string;
customFields?: ContactCustomField;
tags?: string[];
dateAdded?: string;
additionalEmails?: string[];
phone?: string;
companyName?: string;
additionalPhones?: string[];
dateUpdated?: string;
city?: string;
dateOfBirth?: string;
firstNameLowerCase?: string;
lastNameLowerCase?: string;
email?: string;
assignedTo?: string;
followers?: string[];
validEmail?: boolean;
dndSettings?: DNDSettings;
opportunities?: ContactOpportunity;
postalCode?: string;
businessId?: string;
searchAfter?: string[];
};
type ContactSearchResponse = {
contacts: Contact[];
total: number;
};
type ContactTask = {
id?: string;
title?: string;
body?: string;
assignedTo?: string;
dueDate?: string;
completed?: boolean;
contactId?: string;
};
type ListContactTaskResponse = {
tasks: ContactTask[];
};
type ContactTaskResponse = {
task: ContactTask;
};
type CreateContactTaskDto = {
title: string;
body?: string;
dueDate: string;
completed: boolean;
assignedTo?: string;
};
type UpdateContactTaskDto = Partial<CreateContactTaskDto>;
type ContactEvent = {
id?: string;
calendarId?: string;
status?: string;
title?: string;
appoinmentStatus?: string;
assignedUserId?: string;
notes?: string;
startTime?: string;
endTime?: string;
address?: string;
locationId?: string;
contactId?: string;
groupId?: string;
users?: string[];
dateAdded?: string;
dateUpdated?: string;
assignedResources?: string[];
};
type ListContactEventsResponse = {
events: ContactEvent[];
};
type ContactNote = {
id?: string;
body?: string;
userId?: string;
dateAdded?: string;
contactId?: string;
};
type ListContactNotesResponse = {
notes: ContactNote[];
};
type ContactNoteDto = {
body: string;
userId?: string;
};
type ContactNoteResponse = {
note: ContactNote;
};
type ContactBusinessUpdateDto = {
locationId: string;
ids: string[];
businessId: string;
};
type ContactBulkUpateResponse = {
success: boolean;
ids: string[];
};
declare enum ContactDndStatus {
Active = "active",
Inactive = "inactive",
Permanent = "permanent"
}
type ContactDndSetting = {
status: ContactDndStatus;
message?: string;
code?: string;
};
type ContactDndSettings = {
Call: ContactDndSetting;
Email: ContactDndSetting;
SMS: ContactDndSetting;
WhatsApp: ContactDndSetting;
GMB: ContactDndSetting;
FB: ContactDndSetting;
};
type ContactAttributionSource = {
url: string;
campaign?: string;
utmSource?: string;
utmMedium?: string;
utmContent?: string;
referrer?: string;
campaignId?: string;
fbclid?: string;
gclid?: string;
msclikid?: string;
dclid?: string;
fbc?: string;
fbp?: string;
fbEventId?: string;
userAgent?: string;
ip?: string;
medium?: string;
mediumId?: string;
};
type ContactResponse = {
contact: Contact;
};
type ContactCustomFieldsInputArray = {
id: string;
key?: string;
field_value?: string[];
};
type ContactCustomFieldsInputObject = {
id: string;
key?: string;
field_value?: object;
};
type ContactCustomFieldsInputString = {
id: string;
key?: string;
field_value?: string;
};
type ContactInboundDndSetting = {
status: string;
message: string;
};
type ContactInboundDndSettings = {
all: ContactInboundDndSetting;
};
type CreateContactDto = ContactCreateSuccessfulResponseSchema & {
locationId: string;
};
type ContactCreateSuccessfulResponseSchema = {
id?: string;
dateAdded?: string;
dateUpdated?: string;
deleted?: boolean;
tags?: string[][];
type?: string;
customFields?: ContactCustomField[];
locationId?: string;
firstName?: string;
firstNameLowerCase?: string;
lastName?: string;
lastNameLowerCase?: string;
fullNameLowerCase?: string;
email?: string;
emailLowerCase?: string;
bounceEmail?: boolean;
unsubscribeEmail?: boolean;
dnd?: boolean;
dndSettings?: DNDSettings;
phone?: string;
address1?: string;
city?: string;
state?: string;
country?: string;
postalCode?: string;
website?: string;
source?: string;
companyName?: string;
dateOfBirth?: string;
birthMonth?: number;
birthDay?: number;
lastSessionActivityAt?: string;
offers?: string[];
products?: string[];
businessId?: string;
assignedTo?: string;
};
type UpdateContactDto = {
firstName?: string;
lastName?: string;
name?: string;
email?: string;
phone?: string;
address1?: string;
city?: string;
state?: string;
postalCode?: string;
website?: string;
timezone?: string;
dnd?: boolean;
dndSettings?: DNDSettings;
inboundDndSettings?: ContactInboundDndSettings;
tags?: string[];
customFields?: Array<ContactCustomFieldsInputString | ContactCustomFieldsInputArray | ContactCustomFieldsInputObject>;
source?: string;
country?: string;
assignedTo?: string;
};
type ContactUpdateSuccessfulResponseSchema = {
id?: string;
locationId?: string;
name?: string;
fullNameLowerCase?: string;
firstName?: string;
firstNameLowerCase?: string;
lastName?: string;
lastNameLowerCase?: string;
email?: string;
emailLowerCase?: string;
timezone?: string;
companyName?: string;
phone?: string;
dnd?: boolean;
dndSettings?: DNDSettings;
type?: string;
source?: string;
assignedTo?: string;
address1?: string;
city?: string;
state?: string;
country?: string;
postalCode?: string;
website?: string;
tags?: string[][];
dateOfBirth?: string;
dateAdded?: string;
dateUpdated?: string;
attachments?: string;
ssn?: string;
keyword?: string;
lastActivity?: string;
customFields?: ContactCustomField[];
businessId?: string;
createdBy?: ContactAttributionSource;
lastUpdatedBy?: ContactAttributionSource;
};
type UpdateContactResponse = {
succeded?: boolean;
contact: ContactUpdateSuccessfulResponseSchema;
};
type UpsertContactResponse = {
new: boolean;
contact: ContactUpdateSuccessfulResponseSchema;
traceId: string;
};
type ContactSearchResult = {
id?: string;
locationId?: string;
email?: string;
timezone?: string;
country?: string;
source?: string;
dateAdded?: string;
customFields?: ContactCustomField[];
tags?: string[][];
businessId?: string;
attributions?: ContactAttributionSource[];
followers?: string[];
};
type ContactsMetaSchema = {
total?: number;
nextPageUrl?: string;
startAfterId?: string;
startAfter?: number;
currentPage?: number;
nextPage?: number;
prevPage?: number | null;
};
type FindContactsResponse = {
contacts: ContactSearchResult[];
count: number;
};
type ContactAddFollowersResponse = {
followers: string[];
followersAdded: string[];
};
type ContactRemoveFollowersResponse = {
followers: string[];
followersRemoved: string[];
};
type ContactActionResponse = {
succeded?: boolean;
};
declare enum SearchFilterOpporators {
eq = "eq",
not_eq = "not_eq",
contains = "contains",
not_contains = "not_contains",
exists = "exists",
not_exists = "not_exists",
range = "range"
}
type SearchConfigDates = {
gt?: string;
lt?: string;
gte?: string;
lte?: string;
};
type SearchContactId = {
field: 'id';
operator: 'eq' | 'not_eq';
value: string;
};
type SearchAddressValue = {
field: 'address';
operator: 'eq' | 'not_eq' | 'contains' | 'not_contains';
value: string;
};
type SearchAddressExists = {
field: 'address';
operator: 'exists' | 'not_exists';
};
type SearchAddress = SearchAddressValue | SearchAddressExists;
type SearchAssignedToValue = {
field: 'assignedTo';
operator: 'eq' | 'not_eq';
value: string;
};
type SearchAssignedToExists = {
field: 'assignedTo';
operator: 'exists' | 'not_exists';
};
type SearchAssignedTo = SearchAssignedToValue | SearchAssignedToExists;
type SearchBusinessNameValue = {
field: 'businessName';
operator: 'eq' | 'not_eq' | 'contains' | 'not_contains';
value: string;
};
type SearchBusinessNameExists = {
field: 'businessName';
operator: 'exists' | 'not_exists';
};
type SearchBusinessName = SearchBusinessNameValue | SearchBusinessNameExists;
type SearchCityValue = {
field: 'city';
operator: 'eq' | 'not_eq' | 'contains' | 'not_contains';
value: string;
};
type SearchCityExists = {
field: 'city';
operator: 'exists' | 'not_exists';
};
type SearchCity = SearchCityValue | SearchCityExists;
type SearchCountryValue = {
field: 'country';
operator: 'eq' | 'not_eq';
value: string;
};
type SearchCountryExists = {
field: 'country';
operator: 'exists' | 'not_exists';
};
type SearchCountry = SearchCountryValue | SearchCountryExists;
type SearchCompanyNameValue = {
field: 'companyName';
operator: 'eq' | 'not_eq' | 'contains' | 'not_contains';
value: string;
};
type SearchCompanyNameExists = {
field: 'companyName';
operator: 'exists' | 'not_exists';
};
type SearchCompanyName = SearchCompanyNameValue | SearchCompanyNameExists;
type SearchDateAddedRange = {
field: 'dateAdded';
operator: 'range';
value: SearchConfigDates;
};
type SearchDateAddedExists = {
field: 'dateAdded';
operator: 'exists' | 'not_exists';
};
type SearchDateAdded = SearchDateAddedRange | SearchDateAddedExists;
type SearchDateUpdatedRange = {
field: 'dateUpdated';
operator: 'range';
value: SearchConfigDates;
};
type SearchDateUpdatedExists = {
field: 'dateUpdated';
operator: 'exists' | 'not_exists';
};
type SearchDateUpdated = SearchDateUpdatedRange | SearchDateUpdatedExists;
type SearchDNDValue = {
field: 'dnd';
operator: 'eq' | 'not_eq';
value: boolean;
};
type SearchDNDExists = {
field: 'dnd';
operator: 'exists' | 'not_exists';
};
type SearchDND = SearchDNDValue | SearchDNDExists;
type SearchEmailValue = {
field: 'email';
operator: 'eq' | 'not_eq';
value: string;
};
type SearchEmailExists = {
field: 'email';
operator: 'exists' | 'not_exists';
};
type SearchEmail = SearchEmailValue | SearchEmailExists;
type SearchFollowersValue = {
field: 'followers';
operator: 'eq' | 'not_eq';
value: string;
};
type SearchFollowersExists = {
field: 'followers';
operator: 'exists' | 'not_exists';
};
type SearchFollowers = SearchFollowersValue | SearchFollowersExists;
type SearchFirstNameLowerValue = {
field: 'firstNameLowerCase';
operator: 'eq' | 'not_eq' | 'contains' | 'not_contains';
value: string;
};
type SearchFirstNameLowerExists = {
field: 'firstNameLowerCase';
operator: 'exists' | 'not_exists';
};
type SearchFirstNameLower = SearchFirstNameLowerValue | SearchFirstNameLowerExists;
type SearchLastNameLowerValue = {
field: 'lastNameLowerCase';
operator: 'eq' | 'not_eq' | 'contains' | 'not_contains';
value: string;
};
type SearchLastNameLowerExists = {
field: 'lastNameLowerCase';
operator: 'exists' | 'not_exists';
};
type SearchLastNameLower = SearchLastNameLowerValue | SearchLastNameLowerExists;
type SearchIsValidWhatsappValue = {
field: 'isValidWhatsapp';
operator: 'eq' | 'not_eq';
value: boolean;
};
type SearchIsValidWhatsappExists = {
field: 'isValidWhatsapp';
operator: 'exists' | 'not_exists';
};
type SearchIsValidWhatsapp = SearchIsValidWhatsappValue | SearchIsValidWhatsappExists;
type SearchLastEmailClickedDateRange = {
field: 'lastEmailClickedDate';
operator: 'range'