gohl
Version:
Go Highlevel Node Js ease of use library implementation to their API
127 lines (126 loc) • 4.88 kB
TypeScript
import { AuthData } from "../interfaces/auth/authdata";
import { CallbackInfo } from "../interfaces/auth/callback";
import { Credientials } from "../interfaces/auth/credientials";
export declare class OAuth {
private credientials;
/**
* Creates an OAuth instance with the given credientials for GHL.
* @param credientials - The credientials for the OAuth flow.
*/
constructor(credientials: Credientials);
/**
* Returns the OAuth URL for the given credientials.
* Documentation - https://highlevel.stoplight.io/docs/integrations/a04191c0fabf9-authorization
* You can set up an app in Gohighlevel Marketplace - https://marketplace.gohighlevel.com/
* @returns The OAuth URL, encoded as a URI component.
*/
getOAuthURL(): string;
/**
* Retrieves the authentication tokens based on the provided information.
* If neither a refresh token nor a code is provided, an error is thrown.
*
* @param info - The CallbackInfo containing the code or refresh token.
* @returns The authentication tokens including the access token, refresh token, expires in time, scope, location ID, and user type.
*/
getCallbackAuthTokens(info: CallbackInfo): Promise<AuthData>;
/***
* ADD SCOPES
*/
private addScope;
/**
* Add all scopes
*/
scopeAll(): void;
scopeBlogsPostReadonly(): this;
scopeBlogsPostUpdateWrite(): this;
scopeBlogsCheckSlugReadonly(): this;
scopeBlogsCategoryReadonly(): this;
scopeBlogsAuthReadonly(): this;
scopeBusinessesReadonly(): this;
scopeBusinessesWrite(): this;
scopeCompaniesReadonly(): this;
scopeCalendarsReadonly(): this;
scopeCalendarsWrite(): this;
scopeCalendarsEventsReadonly(): this;
scopeCalendarsEventsWrite(): this;
scopeCalendarsGroupsReadonly(): this;
scopeCalendarsGroupsWrite(): this;
scopeCalendarsResourcesReadonly(): this;
scopeCalendarsResourcesWrite(): this;
scopeCampaignsReadonly(): this;
scopeContactsReadonly(): this;
scopeContactsWrite(): this;
scopeConversationsReadonly(): this;
scopeConversationsWrite(): this;
scopeConversationsMessagesReadonly(): this;
scopeConversationsMessagesWrite(): this;
scopeConversationsReports(): this;
scopeCoursesReadonly(): this;
scopeCoursesWrite(): this;
scopeFormsReadonly(): this;
scopeFormsWrite(): this;
scopeFunnnelsRedirectReadonly(): this;
scopeFunnnelsRedirectWrite(): this;
scopeFunnnelsPageWrite(): this;
scopeFunnnelsPageCountReadonly(): this;
scopeFunnnelsFunnelReadonly(): this;
scopeInvoicesReadonly(): this;
scopeInvoicesWrite(): this;
scopeInvoicesScheduleReadonly(): this;
scopeInvoicesScheduleWrite(): this;
scopeInvoicesTemplateReadonly(): this;
scopeInvoicesTemplateWrite(): this;
scopeLinksReadonly(): this;
scopeLinksWrite(): this;
scopeLocationsReadonly(): this;
scopeLocationsWrite(): this;
scopeLocationsCustomValuesReadonly(): this;
scopeLocationsCustomValuesWrite(): this;
scopeLocationsCustomFieldsReadonly(): this;
scopeLocationsCustomFieldsWrite(): this;
scopeLocationsTasksReadonly(): this;
scopeLocationsTasksWrite(): this;
scopeLocationsTagsReadonly(): this;
scopeLocationsTagsWrite(): this;
scopeLocationsTemplatesReadonly(): this;
scopeLCEmail(): this;
scopeMediasReadonly(): this;
scopeMediasWrite(): this;
scopePaymentsOrdersReadonly(): this;
scopePaymentsOrdersWrite(): this;
scopePaymentsIntegrationReadonly(): this;
scopePaymentsIntegrationWrite(): this;
scopePaymentsTransactionsReadonly(): this;
scopePaymentsSubscriptionsReadonly(): this;
scopePaymentsCustomProviderReadonly(): this;
scopePaymentsCustomProviderWrite(): this;
scopeProductsReadonly(): this;
scopeProductsWrite(): this;
scopeProductsPricesReadonly(): this;
scopeProductsPricesWrite(): this;
scopeProductsCollectionReadonly(): this;
scopeProductsCollectionWrite(): this;
scopeOauthReadonly(): this;
scopeOauthWrite(): this;
scopeObjectsSchemaReadonly(): this;
scopeObjectsSchemaWrite(): this;
scopeObjectsRecordReadonly(): this;
scopeObjectsRecordWrite(): this;
scopeOpportunitiesReadonly(): this;
scopeOpportunitiesWrite(): this;
scopeSaasCompanyReadonly(): this;
scopeSaasCompanyWrite(): this;
scopeSaasLocationReadonly(): this;
scopeSaasLocationWrite(): this;
scopeSnapshotsReadonly(): this;
scopeSnapshotsWrite(): this;
scopeStoreShippingReadonly(): this;
scopeStoreShippingWrite(): this;
scopeStoreSettingReadonly(): this;
scopeStoreSettingWrite(): this;
scopeSurveysReadonly(): this;
scopeUsersReadonly(): this;
scopeUsersWrite(): this;
scopeWordPressSiteReadonly(): this;
scopeWorkflowsReadonly(): this;
}