13.1.0 • Published 4 months ago

capacitor-gleap-plugin-v4 v13.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Capacitor Gleap Plugin

Gleap SDK for Capacitor is the easiest way to integrate Gleap into your Ionic apps! Achieve better app quality with comprehensive in-app bug reporting & customer feedback for your web-apps and websites. Many thanks to Stephan Nagel (congrapp) for his work on the Gleap capacitor plugin.

This plugin supports capacitor 5. See the instructions below for earlier capacitor versions.

Install

npm install capacitor-gleap-plugin
npx cap sync

Capacitor 4 or earlier

Please install the plugin version capacitor-gleap-plugin@10.0.3 if you are using capacitor 4 or earlier.

API

initialize(...)

initialize(options: { API_KEY: string; }) => Promise<{ initialized: boolean; }>

Initialize Gleap with an API key

ParamType
options{ API_KEY: string; }

Returns: Promise<{ initialized: boolean; }>

Since: 7.0.0


identify(...)

identify(options: { userId: string; userHash?: string; name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; plan?: string; value?: number; customData?: Object; }) => Promise<{ identify: boolean; }>

Set user identity

ParamType
options{ userId: string; userHash?: string; name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; plan?: string; value?: number; customData?: Object; }

Returns: Promise<{ identify: boolean; }>

Since: 7.0.0


clearIdentity()

clearIdentity() => Promise<{ clearIdentity: boolean; }>

Clear user identity

Returns: Promise<{ clearIdentity: boolean; }>

Since: 7.0.0


getIdentity()

getIdentity() => Promise<{ identity: { userId: string; name?: string; email?: string; phone?: string; value?: number; }; }>

Get the current user identity

Returns: Promise<{ identity: { userId: string; name?: string; email?: string; phone?: string; value?: number; }; }>

Since: 8.1.0


isUserIdentified()

isUserIdentified() => Promise<{ isUserIdentified: boolean; }>

User identified status.

Returns: Promise<{ isUserIdentified: boolean; }>

Since: 8.1.0


log(...)

log(options: { message: string; logLevel?: "ERROR" | "WARNING" | "INFO"; }) => Promise<{ logged: boolean; }>

Submit a custom log message with the given level

ParamType
options{ message: string; logLevel?: "ERROR" | "WARNING" | "INFO"; }

Returns: Promise<{ logged: boolean; }>

Since: 7.0.0


showSurvey(...)

showSurvey(options: { surveyId: string; format?: "survey" | "survey_full"; }) => Promise<{ opened: boolean; }>

Manually show a survey.

ParamType
options{ surveyId: string; format?: "survey" | "survey_full"; }

Returns: Promise<{ opened: boolean; }>

Since: 8.5.1


attachCustomData(...)

attachCustomData(options: { data: any; }) => Promise<{ attachedCustomData: boolean; }>

Add custom data

ParamType
options{ data: any; }

Returns: Promise<{ attachedCustomData: boolean; }>

Since: 7.0.0


setTags(...)

setTags(options: { tags: string[]; }) => Promise<{ tagsSet: boolean; }>

Set tags

ParamType
options{ tags: string[]; }

Returns: Promise<{ tagsSet: boolean; }>

Since: 8.6.0


setCustomData(...)

setCustomData(options: { key: string; value: string; }) => Promise<{ setCustomData: boolean; }>

Set custom data

ParamType
options{ key: string; value: string; }

Returns: Promise<{ setCustomData: boolean; }>

Since: 7.0.0


removeCustomData(...)

removeCustomData(options: { key: string; }) => Promise<{ removedCustomData: boolean; }>

Remove custom data by key

ParamType
options{ key: string; }

Returns: Promise<{ removedCustomData: boolean; }>

Since: 7.0.0


clearCustomData()

clearCustomData() => Promise<{ clearedCustomData: boolean; }>

Clear custom data

Returns: Promise<{ clearedCustomData: boolean; }>

Since: 7.0.0


trackEvent(...)

trackEvent(options: { name: string; data?: any; }) => Promise<{ loggedEvent: boolean; }>

Log event to Gleap

ParamType
options{ name: string; data?: any; }

Returns: Promise<{ loggedEvent: boolean; }>

Since: 8.0.0


trackPage(...)

trackPage(options: { pageName: string; }) => Promise<{ trackedPage: boolean; }>

Track a page view

ParamType
options{ pageName: string; }

Returns: Promise<{ trackedPage: boolean; }>

Since: 8.4.1


setEventCallback(...)

setEventCallback(callback: GleapEventCallback) => Promise<CallbackID>
ParamType
callback(name: string, data?: any) => void

Returns: Promise<string>

Since: 7.0.0


sendSilentCrashReport(...)

sendSilentCrashReport(options: { description: string; severity?: "LOW" | "MEDIUM" | "HIGH"; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; }) => Promise<{ sentSilentBugReport: boolean; }>

Log event to Gleap

ParamType
options{ description: string; severity?: "LOW" | "MEDIUM" | "HIGH"; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; }

Returns: Promise<{ sentSilentBugReport: boolean; }>

Since: 7.0.0


preFillForm(...)

preFillForm(options: { data: any; }) => Promise<{ preFilledForm: boolean; }>

Prefills the widget's form data

ParamType
options{ data: any; }

Returns: Promise<{ preFilledForm: boolean; }>

Since: 7.0.0


addAttachment(...)

addAttachment(options: { base64data: string; name: string; }) => Promise<{ attachmentAdded: boolean; }>

Add attachment as bas64 string

ParamType
options{ base64data: string; name: string; }

Returns: Promise<{ attachmentAdded: boolean; }>

Since: 7.0.0


removeAllAttachments()

removeAllAttachments() => Promise<{ allAttachmentsRemoved: boolean; }>

All attachments removed

Returns: Promise<{ allAttachmentsRemoved: boolean; }>

Since: 7.0.0


open()

open() => Promise<{ openedWidget: boolean; }>

Open widget

Returns: Promise<{ openedWidget: boolean; }>

Since: 7.0.0


openNews(...)

openNews(options: { showBackButton?: boolean; }) => Promise<{ openedNews: boolean; }>

Open news

ParamType
options{ showBackButton?: boolean; }

Returns: Promise<{ openedNews: boolean; }>

Since: 8.4.0


openNewsArticle(...)

openNewsArticle(options: { articleId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>

Open news article

ParamType
options{ articleId: string; showBackButton?: boolean; }

Returns: Promise<{ opened: boolean; }>

Since: 8.4.0


openHelpCenter(...)

openHelpCenter(options: { showBackButton?: boolean; }) => Promise<{ opened: boolean; }>

Open help center

ParamType
options{ showBackButton?: boolean; }

Returns: Promise<{ opened: boolean; }>

Since: 8.4.0


openHelpCenterArticle(...)

openHelpCenterArticle(options: { articleId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>

Open help center article

ParamType
options{ articleId: string; showBackButton?: boolean; }

Returns: Promise<{ opened: boolean; }>

Since: 8.4.0


openHelpCenterCollection(...)

openHelpCenterCollection(options: { collectionId: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>

Open help center collection

ParamType
options{ collectionId: string; showBackButton?: boolean; }

Returns: Promise<{ opened: boolean; }>

Since: 8.4.0


searchHelpCenter(...)

searchHelpCenter(options: { term: string; showBackButton?: boolean; }) => Promise<{ opened: boolean; }>

Search help center

ParamType
options{ term: string; showBackButton?: boolean; }

Returns: Promise<{ opened: boolean; }>

Since: 8.4.0


openFeatureRequests(...)

openFeatureRequests(options: { showBackButton?: boolean; }) => Promise<{ openedFeatureRequests: boolean; }>

Open feature requests

ParamType
options{ showBackButton?: boolean; }

Returns: Promise<{ openedFeatureRequests: boolean; }>

Since: 8.4.0


close()

close() => Promise<{ closedWidget: boolean; }>

Close widget

Returns: Promise<{ closedWidget: boolean; }>

Since: 7.0.0


isOpened()

isOpened() => Promise<{ isOpened: boolean; }>

Check widget status code

Returns: Promise<{ isOpened: boolean; }>

Since: 7.0.0


startFeedbackFlow(...)

startFeedbackFlow(options: { feedbackFlow?: string; showBackButton?: boolean; }) => Promise<{ startedFeedbackFlow: boolean; }>

Start feedback flow

ParamType
options{ feedbackFlow?: string; showBackButton?: boolean; }

Returns: Promise<{ startedFeedbackFlow: boolean; }>

Since: 7.0.0


startClassicForm(...)

startClassicForm(options: { formId?: string; showBackButton?: boolean; }) => Promise<{ classicFormStarted: boolean; }>

Start a classic form

ParamType
options{ formId?: string; showBackButton?: boolean; }

Returns: Promise<{ classicFormStarted: boolean; }>

Since: 13.1.0


startConversation(...)

startConversation(options: { showBackButton?: boolean; }) => Promise<{ conversationStarted: boolean; }>

Start a new conversation

ParamType
options{ showBackButton?: boolean; }

Returns: Promise<{ conversationStarted: boolean; }>

Since: 13.1.0


startBot(...)

startBot(options: { botId?: string; showBackButton?: boolean; }) => Promise<{ startedBot: boolean; }>

Start bot

ParamType
options{ botId?: string; showBackButton?: boolean; }

Returns: Promise<{ startedBot: boolean; }>

Since: 10.0.3


showFeedbackButton(...)

showFeedbackButton(options: { show?: boolean; }) => Promise<{ feedbackButtonShown: boolean; }>

Show or hide the feedback button.

ParamType
options{ show?: boolean; }

Returns: Promise<{ feedbackButtonShown: boolean; }>

Since: 8.0.0


setDisableInAppNotifications(...)

setDisableInAppNotifications(options: { disableInAppNotifications?: boolean; }) => Promise<{ inAppNotificationsDisabled: boolean; }>

Disable in app notifications.

ParamType
options{ disableInAppNotifications?: boolean; }

Returns: Promise<{ inAppNotificationsDisabled: boolean; }>

Since: 8.6.1


setLanguage(...)

setLanguage(options: { languageCode: string; }) => Promise<{ setLanguage: string; }>

Set Language

ParamType
options{ languageCode: string; }

Returns: Promise<{ setLanguage: string; }>

Since: 7.0.0


disableConsoleLogOverwrite()

disableConsoleLogOverwrite() => Promise<{ consoleLogDisabled: boolean; }>

Disable console log overwrite

Returns: Promise<{ consoleLogDisabled: boolean; }>

Since: 7.0.0


enableDebugConsoleLog()

enableDebugConsoleLog() => Promise<{ debugConsoleLogEnabled: boolean; }>

Enable debug console log

Returns: Promise<{ debugConsoleLogEnabled: boolean; }>

Since: 7.0.0


Interfaces

Object

Provides functionality common to all JavaScript objects.

PropTypeDescription
constructorFunctionThe initial value of Object.prototype.constructor is the standard built-in Object constructor.
MethodSignatureDescription
toString() => stringReturns a string representation of an object.
toLocaleString() => stringReturns a date converted to a string using the current locale.
valueOf() => ObjectReturns the primitive value of the specified object.
hasOwnProperty(v: PropertyKey) => booleanDetermines whether an object has a property with the specified name.
isPrototypeOf(v: Object) => booleanDetermines whether an object exists in another object's prototype chain.
propertyIsEnumerable(v: PropertyKey) => booleanDetermines whether a specified property is enumerable.

Function

Creates a new function.

PropType
prototypeany
lengthnumber
argumentsany
callerFunction
MethodSignatureDescription
apply(this: Function, thisArg: any, argArray?: any) => anyCalls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
call(this: Function, thisArg: any, ...argArray: any[]) => anyCalls a method of an object, substituting another object for the current object.
bind(this: Function, thisArg: any, ...argArray: any[]) => anyFor a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.
toString() => stringReturns a string representation of a function.

Boolean

MethodSignatureDescription
valueOf() => booleanReturns the primitive value of the specified object.
13.1.0

4 months ago