UNPKG

gohl

Version:

Go Highlevel Node Js ease of use library implementation to their API

83 lines (82 loc) 2.98 kB
import { Blog } from "./classes/blogs"; import { Business } from "./classes/business"; import { Calendar } from "./classes/calendars"; import { Campaign } from "./classes/campaigns"; import { Company } from "./classes/company"; import { Contacts } from "./classes/contacts"; import { Workflow } from "./classes/contacts.workflows"; import { Conversations } from "./classes/conversations"; import { Course } from "./classes/courses"; import { CustomFields } from "./classes/customfields"; import { CustomMenus } from "./classes/custommenus"; import { Email } from "./classes/email"; import { Form } from "./classes/forms"; import { Location } from "./classes/location"; import { MediaLibrary } from "./classes/medialibrary"; import { OAuth } from "./classes/oauth"; import { Opportunities } from "./classes/opportunities"; import { Products } from "./classes/products"; import { SaaS } from "./classes/saas"; import { Snapshots } from "./classes/snapshots"; import { SubAccount } from "./classes/subaccounts"; import { Survey } from "./classes/surveys"; import { TriggerLink } from "./classes/triggerlinks"; import { User } from "./classes/users"; import { AuthData } from "./interfaces/auth/authdata"; import { Credientials } from "./interfaces/auth/credientials"; export declare class Gohighlevel { credientials: Credientials; oauth: OAuth; calendar: Calendar; contacts: Contacts; conversations: Conversations; medialibrary: MediaLibrary; campaigns: Campaign; company: Company; links: TriggerLink; courses: Course; businesses: Business; workflows: Workflow; surveys: Survey; blogs: Blog; forms: Form; subaccounts: SubAccount; agency: { locations: Location; users: User; }; customFields: CustomFields; customMenus: CustomMenus; opportunities: Opportunities; products: Products; saas: SaaS; snapshots: Snapshots; email: Email; private authData; constructor(credientials: Credientials); /** * Use mock or live server * @param test */ setTestMode(test: boolean): void; /** * Set the Authorization Data for the GHL Account. * Set the auth after getting it from the GHL.oauth.getOAuthURL() * @param authData */ setAuth(authData: AuthData): void; /** * Retrieves the authentication tokens based on the refresh token. * If the current token hasn't expired, the current token is returned. * Otherwise, the token is refreshed and the new token is returned. * If an error occurs when refreshing the token, the current token is returned. * @returns The authentication tokens including the access token, refresh token, expires in time, scope, location ID, and user type. */ getAuth(): Promise<AuthData>; /** * Determines if the given auth data has expired. * * @returns True if the token has expired, false otherwise. */ isAuthExpired(): boolean; }