capacitor-gleap-plugin 18.0.0 → 18.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CapacitorGleapPlugin.podspec +1 -1
- package/README.md +61 -3
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/gleapplugins/capacitor/GleapPlugin.java +44 -0
- package/dist/docs.json +42 -0
- package/dist/esm/definitions.d.ts +23 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +10 -0
- package/dist/esm/web.js +9 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +9 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +9 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/GleapPlugin.m +2 -0
- package/ios/Plugin/GleapPlugin.swift +27 -0
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
# Capacitor
|
|
1
|
+
# Gleap Capacitor and Ionic SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Add AI-native customer support, live chat, in-app bug reporting, a help center and surveys to your Capacitor and Ionic apps with [Gleap](https://www.gleap.ai). Gleap is an Intercom alternative for software teams that connects customer conversations and feedback with product development.
|
|
4
4
|
|
|
5
|
-
This plugin supports
|
|
5
|
+
This plugin supports Capacitor 7. See the instructions below for earlier Capacitor versions.
|
|
6
|
+
|
|
7
|
+
Thanks to Stephan Nagel (congrapp) for his work on the Gleap Capacitor plugin.
|
|
8
|
+
|
|
9
|
+
[SDK documentation](https://docs.gleap.ai/documentation/ioniccapacitor/README) · [Website](https://www.gleap.ai) · [Plans and pricing](https://www.gleap.ai/pricing)
|
|
6
10
|
|
|
7
11
|
## Install
|
|
8
12
|
|
|
@@ -38,6 +42,17 @@ await Gleap.initialize({ API_KEY: "YOUR_API_KEY" });
|
|
|
38
42
|
|
|
39
43
|
For self-hosted or custom setups you can override single hosts with `setApiUrl({ url })`, `setWSApiUrl({ url })`, `setRealtimeHost({ host })`, `setFrameUrl({ url })`, `setBannerUrl({ url })` and `setModalUrl({ url })`. All of them must be called before `initialize`; a manual setter called after `setRegion` overrides that single host.
|
|
40
44
|
|
|
45
|
+
## Env data
|
|
46
|
+
|
|
47
|
+
With every ticket the SDK sends env data (device, OS, screen size, locale, URL, …), shown under the **Env data** tab in Gleap. Leave out individual keys or stop collecting env data entirely:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
await Gleap.setEnvDataPropsToIgnore({ propsToIgnore: ["deviceName", "batteryLevel"] });
|
|
51
|
+
await Gleap.setDisableEnvData({ disableEnvData: true });
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Both can be called at any time and apply to the next ticket. Each `setEnvDataPropsToIgnore` call replaces the previous list, an empty array resets it. `setDisableEnvData({ disableEnvData: false })` turns the collection back on.
|
|
55
|
+
|
|
41
56
|
## API
|
|
42
57
|
|
|
43
58
|
<docgen-index>
|
|
@@ -61,6 +76,7 @@ For self-hosted or custom setups you can override single hosts with `setApiUrl({
|
|
|
61
76
|
* [`setTags(...)`](#settags)
|
|
62
77
|
* [`setNetworkLogsBlacklist(...)`](#setnetworklogsblacklist)
|
|
63
78
|
* [`setNetworkLogPropsToIgnore(...)`](#setnetworklogpropstoignore)
|
|
79
|
+
* [`setEnvDataPropsToIgnore(...)`](#setenvdatapropstoignore)
|
|
64
80
|
* [`registerAgentTool(...)`](#registeragenttool)
|
|
65
81
|
* [`sendAgentToolResult(...)`](#sendagenttoolresult)
|
|
66
82
|
* [`addListener('agentToolExecution', ...)`](#addlisteneragenttoolexecution-)
|
|
@@ -95,6 +111,7 @@ For self-hosted or custom setups you can override single hosts with `setApiUrl({
|
|
|
95
111
|
* [`startBot(...)`](#startbot)
|
|
96
112
|
* [`showFeedbackButton(...)`](#showfeedbackbutton)
|
|
97
113
|
* [`setDisableInAppNotifications(...)`](#setdisableinappnotifications)
|
|
114
|
+
* [`setDisableEnvData(...)`](#setdisableenvdata)
|
|
98
115
|
* [`setLanguage(...)`](#setlanguage)
|
|
99
116
|
* [`disableConsoleLogOverwrite()`](#disableconsolelogoverwrite)
|
|
100
117
|
* [`enableDebugConsoleLog()`](#enabledebugconsolelog)
|
|
@@ -458,6 +475,27 @@ Set network logs props to ignore
|
|
|
458
475
|
--------------------
|
|
459
476
|
|
|
460
477
|
|
|
478
|
+
### setEnvDataPropsToIgnore(...)
|
|
479
|
+
|
|
480
|
+
```typescript
|
|
481
|
+
setEnvDataPropsToIgnore(options: { propsToIgnore: string[]; }) => Promise<{ envDataPropsToIgnoreSet: boolean; }>
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
Set env data props to ignore. The given env data keys (exact and case-sensitive, e.g. "deviceName" or "currentUrl")
|
|
485
|
+
are removed before a ticket or conversation is sent. Each call replaces the previous list, an empty list resets it.
|
|
486
|
+
Can be called before or after initialize.
|
|
487
|
+
|
|
488
|
+
| Param | Type |
|
|
489
|
+
| ------------- | ----------------------------------------- |
|
|
490
|
+
| **`options`** | <code>{ propsToIgnore: string[]; }</code> |
|
|
491
|
+
|
|
492
|
+
**Returns:** <code>Promise<{ envDataPropsToIgnoreSet: boolean; }></code>
|
|
493
|
+
|
|
494
|
+
**Since:** 18.1.0
|
|
495
|
+
|
|
496
|
+
--------------------
|
|
497
|
+
|
|
498
|
+
|
|
461
499
|
### registerAgentTool(...)
|
|
462
500
|
|
|
463
501
|
```typescript
|
|
@@ -1079,6 +1117,26 @@ Disable in app notifications.
|
|
|
1079
1117
|
--------------------
|
|
1080
1118
|
|
|
1081
1119
|
|
|
1120
|
+
### setDisableEnvData(...)
|
|
1121
|
+
|
|
1122
|
+
```typescript
|
|
1123
|
+
setDisableEnvData(options: { disableEnvData: boolean; }) => Promise<{ envDataDisabled: boolean; }>
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
Disable env data. While disabled (true), no env data (device, OS, screen size, locale, URL, ...) is collected
|
|
1127
|
+
and tickets are sent without it. Pass false to collect env data again. Can be called before or after initialize.
|
|
1128
|
+
|
|
1129
|
+
| Param | Type |
|
|
1130
|
+
| ------------- | ----------------------------------------- |
|
|
1131
|
+
| **`options`** | <code>{ disableEnvData: boolean; }</code> |
|
|
1132
|
+
|
|
1133
|
+
**Returns:** <code>Promise<{ envDataDisabled: boolean; }></code>
|
|
1134
|
+
|
|
1135
|
+
**Since:** 18.1.0
|
|
1136
|
+
|
|
1137
|
+
--------------------
|
|
1138
|
+
|
|
1139
|
+
|
|
1082
1140
|
### setLanguage(...)
|
|
1083
1141
|
|
|
1084
1142
|
```typescript
|
package/android/build.gradle
CHANGED
|
@@ -55,5 +55,5 @@ dependencies {
|
|
|
55
55
|
testImplementation "junit:junit:$junitVersion"
|
|
56
56
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
57
57
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
58
|
-
implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '18.
|
|
58
|
+
implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '18.1.0'
|
|
59
59
|
}
|
|
@@ -513,6 +513,38 @@ public class GleapPlugin extends Plugin {
|
|
|
513
513
|
call.resolve(ret);
|
|
514
514
|
}
|
|
515
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Sets env data properties to be removed before a ticket is sent.
|
|
518
|
+
*
|
|
519
|
+
* @since 18.1.0
|
|
520
|
+
*/
|
|
521
|
+
@PluginMethod
|
|
522
|
+
public void setEnvDataPropsToIgnore(PluginCall call) {
|
|
523
|
+
// Check if 'propsToIgnore' key is provided, return error if not
|
|
524
|
+
if (!call.getData().has("propsToIgnore")) {
|
|
525
|
+
call.reject("Must provide a propsToIgnore array");
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
try {
|
|
530
|
+
// Retrieve and set the env data properties to be ignored
|
|
531
|
+
JSArray jsonPropsToIgnore = call.getArray("propsToIgnore");
|
|
532
|
+
String[] propsToIgnore = new String[jsonPropsToIgnore.length()];
|
|
533
|
+
for (int i = 0; i < jsonPropsToIgnore.length(); i++) {
|
|
534
|
+
propsToIgnore[i] = jsonPropsToIgnore.getString(i);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
implementation.setEnvDataPropsToIgnore(propsToIgnore);
|
|
538
|
+
} catch (Exception ex) {
|
|
539
|
+
// Handle exceptions if necessary
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// Confirm successful setting of env data properties to ignore
|
|
543
|
+
JSObject ret = new JSObject();
|
|
544
|
+
ret.put("envDataPropsToIgnoreSet", true);
|
|
545
|
+
call.resolve(ret);
|
|
546
|
+
}
|
|
547
|
+
|
|
516
548
|
@PluginMethod
|
|
517
549
|
public void attachCustomData(PluginCall call) {
|
|
518
550
|
// If key is empty, then pass back error
|
|
@@ -752,6 +784,18 @@ public class GleapPlugin extends Plugin {
|
|
|
752
784
|
call.resolve(ret);
|
|
753
785
|
}
|
|
754
786
|
|
|
787
|
+
@PluginMethod
|
|
788
|
+
public void setDisableEnvData(PluginCall call) {
|
|
789
|
+
boolean disableEnvData = call.getBoolean("disableEnvData", false);
|
|
790
|
+
|
|
791
|
+
implementation.setDisableEnvData(disableEnvData);
|
|
792
|
+
|
|
793
|
+
// Build Json object and resolve success
|
|
794
|
+
JSObject ret = new JSObject();
|
|
795
|
+
ret.put("envDataDisabled", true);
|
|
796
|
+
call.resolve(ret);
|
|
797
|
+
}
|
|
798
|
+
|
|
755
799
|
@PluginMethod
|
|
756
800
|
public void showFeedbackButton(PluginCall call) {
|
|
757
801
|
boolean show = call.getBoolean("show");
|
package/dist/docs.json
CHANGED
|
@@ -390,6 +390,27 @@
|
|
|
390
390
|
"complexTypes": [],
|
|
391
391
|
"slug": "setnetworklogpropstoignore"
|
|
392
392
|
},
|
|
393
|
+
{
|
|
394
|
+
"name": "setEnvDataPropsToIgnore",
|
|
395
|
+
"signature": "(options: { propsToIgnore: string[]; }) => Promise<{ envDataPropsToIgnoreSet: boolean; }>",
|
|
396
|
+
"parameters": [
|
|
397
|
+
{
|
|
398
|
+
"name": "options",
|
|
399
|
+
"docs": "",
|
|
400
|
+
"type": "{ propsToIgnore: string[]; }"
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
"returns": "Promise<{ envDataPropsToIgnoreSet: boolean; }>",
|
|
404
|
+
"tags": [
|
|
405
|
+
{
|
|
406
|
+
"name": "since",
|
|
407
|
+
"text": "18.1.0"
|
|
408
|
+
}
|
|
409
|
+
],
|
|
410
|
+
"docs": "Set env data props to ignore. The given env data keys (exact and case-sensitive, e.g. \"deviceName\" or \"currentUrl\")\nare removed before a ticket or conversation is sent. Each call replaces the previous list, an empty list resets it.\nCan be called before or after initialize.",
|
|
411
|
+
"complexTypes": [],
|
|
412
|
+
"slug": "setenvdatapropstoignore"
|
|
413
|
+
},
|
|
393
414
|
{
|
|
394
415
|
"name": "registerAgentTool",
|
|
395
416
|
"signature": "(options: { name: string; }) => Promise<void>",
|
|
@@ -1080,6 +1101,27 @@
|
|
|
1080
1101
|
"complexTypes": [],
|
|
1081
1102
|
"slug": "setdisableinappnotifications"
|
|
1082
1103
|
},
|
|
1104
|
+
{
|
|
1105
|
+
"name": "setDisableEnvData",
|
|
1106
|
+
"signature": "(options: { disableEnvData: boolean; }) => Promise<{ envDataDisabled: boolean; }>",
|
|
1107
|
+
"parameters": [
|
|
1108
|
+
{
|
|
1109
|
+
"name": "options",
|
|
1110
|
+
"docs": "",
|
|
1111
|
+
"type": "{ disableEnvData: boolean; }"
|
|
1112
|
+
}
|
|
1113
|
+
],
|
|
1114
|
+
"returns": "Promise<{ envDataDisabled: boolean; }>",
|
|
1115
|
+
"tags": [
|
|
1116
|
+
{
|
|
1117
|
+
"name": "since",
|
|
1118
|
+
"text": "18.1.0"
|
|
1119
|
+
}
|
|
1120
|
+
],
|
|
1121
|
+
"docs": "Disable env data. While disabled (true), no env data (device, OS, screen size, locale, URL, ...) is collected\nand tickets are sent without it. Pass false to collect env data again. Can be called before or after initialize.",
|
|
1122
|
+
"complexTypes": [],
|
|
1123
|
+
"slug": "setdisableenvdata"
|
|
1124
|
+
},
|
|
1083
1125
|
{
|
|
1084
1126
|
"name": "setLanguage",
|
|
1085
1127
|
"signature": "(options: { languageCode: string; }) => Promise<{ setLanguage: string; }>",
|
|
@@ -221,6 +221,18 @@ export interface GleapPlugin {
|
|
|
221
221
|
propsToIgnoreSet: boolean;
|
|
222
222
|
}>;
|
|
223
223
|
/**
|
|
224
|
+
* Set env data props to ignore. The given env data keys (exact and case-sensitive, e.g. "deviceName" or "currentUrl")
|
|
225
|
+
* are removed before a ticket or conversation is sent. Each call replaces the previous list, an empty list resets it.
|
|
226
|
+
* Can be called before or after initialize.
|
|
227
|
+
*
|
|
228
|
+
* @since 18.1.0
|
|
229
|
+
*/
|
|
230
|
+
setEnvDataPropsToIgnore(options: {
|
|
231
|
+
propsToIgnore: string[];
|
|
232
|
+
}): Promise<{
|
|
233
|
+
envDataPropsToIgnoreSet: boolean;
|
|
234
|
+
}>;
|
|
235
|
+
/**
|
|
224
236
|
* Registers a Frontend tool defined on your AI agent in the Gleap dashboard.
|
|
225
237
|
* Prefer the `registerAgentTool(name, handler)` helper exported by this
|
|
226
238
|
* package — it wires the agentToolExecution event and result round-trip for
|
|
@@ -569,6 +581,17 @@ export interface GleapPlugin {
|
|
|
569
581
|
inAppNotificationsDisabled: boolean;
|
|
570
582
|
}>;
|
|
571
583
|
/**
|
|
584
|
+
* Disable env data. While disabled (true), no env data (device, OS, screen size, locale, URL, ...) is collected
|
|
585
|
+
* and tickets are sent without it. Pass false to collect env data again. Can be called before or after initialize.
|
|
586
|
+
*
|
|
587
|
+
* @since 18.1.0
|
|
588
|
+
*/
|
|
589
|
+
setDisableEnvData(options: {
|
|
590
|
+
disableEnvData: boolean;
|
|
591
|
+
}): Promise<{
|
|
592
|
+
envDataDisabled: boolean;
|
|
593
|
+
}>;
|
|
594
|
+
/**
|
|
572
595
|
* Set Language
|
|
573
596
|
*
|
|
574
597
|
* @since 7.0.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport type CallbackID = string;\n\nexport interface GleapEventMessage {\n name: string,\n data?: any,\n}\n\nexport type GleapEventCallback = (message: GleapEventMessage | null, err?: any) => void;\n\nexport interface GleapPlugin {\n /**\n * Initialize Gleap with an API key\n *\n * @since 7.0.0\n */\n initialize(options: {\n API_KEY: string;\n }): Promise<{\n initialized: boolean;\n }>;\n\n /**\n * Set the data region of your Gleap project (\"eu\" is the default).\n * Sets the API, websocket and realtime hosts at once. Must be called before initialize.\n * A manual setter (setApiUrl, setWSApiUrl, setRealtimeHost) called afterwards overrides that single host.\n *\n * @since 18.0.0\n */\n setRegion(options: {\n region: 'eu' | 'us';\n }): Promise<{\n region: string;\n }>;\n\n /**\n * Set a custom API url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setApiUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set a custom websocket API url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setWSApiUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set a custom realtime host (hostname only, without protocol or path). Must be called before initialize.\n *\n * @since 18.0.0\n */\n setRealtimeHost(options: {\n host: string;\n }): Promise<{\n host: string;\n }>;\n\n /**\n * Set a custom widget frame url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setFrameUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set a custom banner url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setBannerUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set a custom modal url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setModalUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set user identity\n *\n * @since 7.0.0\n */\n identify(options: {\n userId: string;\n userHash?: string;\n name?: string;\n email?: string;\n phone?: string;\n companyId?: string;\n companyName?: string;\n avatar?: string;\n sla?: number;\n plan?: string;\n value?: number;\n customData?: Object;\n }): Promise<{\n identify: boolean;\n }>;\n\n /**\n * Update user properties\n *\n * @since 13.2.1\n */\n updateContact(options: {\n name?: string;\n email?: string;\n phone?: string;\n companyId?: string;\n companyName?: string;\n avatar?: string;\n sla?: number;\n plan?: string;\n value?: number;\n customData?: Object;\n }): Promise<{\n identify: boolean;\n }>;\n\n /**\n * Clear user identity\n *\n * @since 7.0.0\n */\n clearIdentity(): Promise<{\n clearIdentity: boolean;\n }>;\n\n /**\n * Get the current user identity\n *\n * @since 8.1.0\n */\n getIdentity(): Promise<{\n identity: {\n userId: string;\n name?: string;\n email?: string;\n phone?: string;\n value?: number;\n };\n }>;\n\n /**\n * User identified status.\n *\n * @since 8.1.0\n */\n isUserIdentified(): Promise<{\n isUserIdentified: boolean;\n }>;\n\n /**\n * Submit a custom log message with the given level\n *\n * @since 7.0.0\n */\n log(options: {\n message: string;\n logLevel?: \"ERROR\" | \"WARNING\" | \"INFO\";\n }): Promise<{\n logged: boolean;\n }>;\n\n /**\n * Manually show a survey.\n *\n * @since 8.5.1\n */\n showSurvey(options: {\n surveyId: string;\n format?: \"survey\" | \"survey_full\";\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Add custom data\n *\n * @since 7.0.0\n */\n attachCustomData(options: {\n data: any;\n }): Promise<{\n attachedCustomData: boolean;\n }>;\n\n /**\n * Set tags\n *\n * @since 8.6.0\n */\n setTags(options: {\n tags: string[];\n }): Promise<{\n tagsSet: boolean;\n }>;\n\n /**\n * Set network logs blacklist\n *\n * @since 13.2.1\n */\n setNetworkLogsBlacklist(options: {\n blacklist: string[];\n }): Promise<{\n blacklistSet: boolean;\n }>;\n\n /**\n * Set network logs props to ignore\n *\n * @since 13.2.1\n */\n setNetworkLogPropsToIgnore(options: {\n propsToIgnore: string[];\n }): Promise<{\n propsToIgnoreSet: boolean;\n }>;\n\n /**\n * Registers a Frontend tool defined on your AI agent in the Gleap dashboard.\n * Prefer the `registerAgentTool(name, handler)` helper exported by this\n * package — it wires the agentToolExecution event and result round-trip for\n * you.\n *\n * @since 15.0.0\n */\n registerAgentTool(options: {\n name: string;\n }): Promise<void>;\n\n /**\n * Resolves a pending agent tool execution with the handler's result.\n * Used by the `registerAgentTool(name, handler)` helper.\n *\n * @since 15.0.0\n */\n sendAgentToolResult(options: {\n executionId: string;\n result: string;\n }): Promise<void>;\n\n /**\n * Called when a registered agent tool should execute.\n *\n * @since 15.0.0\n */\n addListener(\n eventName: 'agentToolExecution',\n listenerFunc: (data: {\n executionId: string;\n name: string;\n params: any;\n }) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Sets the value of a ticket attribute\n *\n * @since 13.5.0\n */\n setTicketAttribute(options: {\n key: string;\n value: string;\n }): Promise<{\n setTicketAttribute: boolean;\n }>;\n\n /**\n * Unset a ticket attribute\n *\n * @since 14.1.0\n */\n unsetTicketAttribute(options: {\n key: string;\n }): Promise<{\n unsetTicketAttribute: boolean;\n }>;\n\n /**\n * Clear all ticket attributes\n *\n * @since 14.1.0\n */\n clearTicketAttributes(): Promise<{\n clearTicketAttributes: boolean;\n }>;\n\n /**\n * Set custom data\n *\n * @since 7.0.0\n */\n setCustomData(options: {\n key: string;\n value: string;\n }): Promise<{\n setCustomData: boolean;\n }>;\n\n /**\n * Remove custom data by key\n *\n * @since 7.0.0\n */\n removeCustomData(options: {\n key: string;\n }): Promise<{\n removedCustomData: boolean;\n }>;\n\n /**\n * Clear custom data\n *\n * @since 7.0.0\n */\n clearCustomData(): Promise<{\n clearedCustomData: boolean;\n }>;\n\n /**\n * Log event to Gleap\n *\n * @since 8.0.0\n */\n trackEvent(options: {\n name: string;\n data?: any;\n }): Promise<{\n loggedEvent: boolean;\n }>;\n\n /**\n * Track a page view\n *\n * @since 8.4.1\n */\n trackPage(options: {\n pageName: string;\n }): Promise<{\n trackedPage: boolean;\n }>;\n\n /**\n * \n *\n * @since 7.0.0\n */\n setEventCallback(\n callback: GleapEventCallback,\n ): Promise<CallbackID>;\n\n /**\n * Log event to Gleap\n *\n * @since 7.0.0\n */\n sendSilentCrashReport(options: {\n description: string,\n severity?: \"LOW\" | \"MEDIUM\" | \"HIGH\";\n dataExclusion?: {\n customData: Boolean;\n metaData: Boolean;\n attachments: Boolean;\n consoleLog: Boolean;\n networkLogs: Boolean;\n customEventLog: Boolean;\n screenshot: Boolean;\n replays: Boolean;\n };\n }): Promise<{\n sentSilentBugReport: boolean;\n }>;\n\n /**\n * Prefills the widget's form data\n *\n * @since 7.0.0\n */\n preFillForm(options: {\n data: any;\n }): Promise<{\n preFilledForm: boolean;\n }>;\n\n /**\n * Add attachment as bas64 string\n *\n * @since 7.0.0\n */\n addAttachment(options: {\n base64data: string;\n name: string;\n }): Promise<{\n attachmentAdded: boolean;\n }>;\n\n /**\n * All attachments removed\n *\n * @since 7.0.0\n */\n removeAllAttachments(): Promise<{\n allAttachmentsRemoved: boolean;\n }>;\n\n /**\n * Open widget\n *\n * @since 7.0.0\n */\n open(): Promise<{\n openedWidget: boolean;\n }>;\n\n /**\n * Open news\n *\n * @since 8.4.0\n */\n openNews(options: {\n showBackButton?: boolean;\n }): Promise<{\n openedNews: boolean;\n }>;\n\n /**\n * Open news article\n *\n * @since 8.4.0\n */\n openNewsArticle(options: {\n articleId: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Open help center\n *\n * @since 8.4.0\n */\n openHelpCenter(options: {\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Open help center article\n *\n * @since 8.4.0\n */\n openHelpCenterArticle(options: {\n articleId: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Ask the AI a question\n *\n * @since 15.0.0\n */\n askAI(options: {\n question: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Open help center collection\n *\n * @since 8.4.0\n */\n openHelpCenterCollection(options: {\n collectionId: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Search help center\n *\n * @since 8.4.0\n */\n searchHelpCenter(options: {\n term: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Open feature requests\n *\n * @since 8.4.0\n */\n openFeatureRequests(options: {\n showBackButton?: boolean;\n }): Promise<{\n openedFeatureRequests: boolean;\n }>;\n\n /**\n * Close widget\n *\n * @since 7.0.0\n */\n close(): Promise<{\n closedWidget: boolean;\n }>;\n\n /**\n * Check widget status code\n *\n * @since 7.0.0\n */\n isOpened(): Promise<{\n isOpened: boolean;\n }>;\n\n /**\n * Start feedback flow\n *\n * @since 7.0.0\n */\n startFeedbackFlow(options: {\n feedbackFlow?: string;\n showBackButton?: boolean;\n }): Promise<{\n startedFeedbackFlow: boolean;\n }>;\n\n /**\n * Start a classic form\n *\n * @since 13.1.0\n */\n startClassicForm(options: {\n formId?: string;\n showBackButton?: boolean;\n }): Promise<{\n classicFormStarted: boolean;\n }>;\n\n /**\n * Start a new conversation\n *\n * @since 13.1.0\n */\n startConversation(options: {\n showBackButton?: boolean;\n }): Promise<{\n conversationStarted: boolean;\n }>;\n\n /**\n * Opens the conversations tab.\n *\n * @since 13.9.0\n */\n openConversation(options: {\n showBackButton?: boolean;\n }): Promise<{\n conversationsOpened: boolean;\n }>;\n\n /**\n * Start bot\n *\n * @since 10.0.3\n */\n startBot(options: {\n botId?: string;\n showBackButton?: boolean;\n }): Promise<{\n startedBot: boolean;\n }>;\n\n /**\n * Show or hide the feedback button.\n *\n * @since 8.0.0\n */\n showFeedbackButton(options: {\n show?: boolean;\n }): Promise<{\n feedbackButtonShown: boolean;\n }>;\n\n /**\n* Disable in app notifications.\n*\n* @since 8.6.1\n*/\n setDisableInAppNotifications(options: {\n disableInAppNotifications?: boolean;\n }): Promise<{\n inAppNotificationsDisabled: boolean;\n }>;\n\n /**\n * Set Language\n *\n * @since 7.0.0\n */\n setLanguage(options: {\n languageCode: string;\n }): Promise<{\n setLanguage: string;\n }>;\n\n /**\n * Disable console log overwrite\n *\n * @since 7.0.0\n */\n disableConsoleLogOverwrite(): Promise<{\n consoleLogDisabled: boolean;\n }>;\n\n /**\n * Enable debug console log\n *\n * @since 7.0.0\n */\n enableDebugConsoleLog(): Promise<{\n debugConsoleLogEnabled: boolean;\n }>;\n\n /**\n * Set the notification container offset\n *\n * @since 15.2.0\n */\n setNotificationContainerOffset(options: {\n x: number;\n y: number;\n }): Promise<{\n notificationContainerOffsetSet: boolean;\n }>;\n\n}"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport type CallbackID = string;\n\nexport interface GleapEventMessage {\n name: string,\n data?: any,\n}\n\nexport type GleapEventCallback = (message: GleapEventMessage | null, err?: any) => void;\n\nexport interface GleapPlugin {\n /**\n * Initialize Gleap with an API key\n *\n * @since 7.0.0\n */\n initialize(options: {\n API_KEY: string;\n }): Promise<{\n initialized: boolean;\n }>;\n\n /**\n * Set the data region of your Gleap project (\"eu\" is the default).\n * Sets the API, websocket and realtime hosts at once. Must be called before initialize.\n * A manual setter (setApiUrl, setWSApiUrl, setRealtimeHost) called afterwards overrides that single host.\n *\n * @since 18.0.0\n */\n setRegion(options: {\n region: 'eu' | 'us';\n }): Promise<{\n region: string;\n }>;\n\n /**\n * Set a custom API url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setApiUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set a custom websocket API url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setWSApiUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set a custom realtime host (hostname only, without protocol or path). Must be called before initialize.\n *\n * @since 18.0.0\n */\n setRealtimeHost(options: {\n host: string;\n }): Promise<{\n host: string;\n }>;\n\n /**\n * Set a custom widget frame url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setFrameUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set a custom banner url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setBannerUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set a custom modal url. Must be called before initialize.\n *\n * @since 18.0.0\n */\n setModalUrl(options: {\n url: string;\n }): Promise<{\n url: string;\n }>;\n\n /**\n * Set user identity\n *\n * @since 7.0.0\n */\n identify(options: {\n userId: string;\n userHash?: string;\n name?: string;\n email?: string;\n phone?: string;\n companyId?: string;\n companyName?: string;\n avatar?: string;\n sla?: number;\n plan?: string;\n value?: number;\n customData?: Object;\n }): Promise<{\n identify: boolean;\n }>;\n\n /**\n * Update user properties\n *\n * @since 13.2.1\n */\n updateContact(options: {\n name?: string;\n email?: string;\n phone?: string;\n companyId?: string;\n companyName?: string;\n avatar?: string;\n sla?: number;\n plan?: string;\n value?: number;\n customData?: Object;\n }): Promise<{\n identify: boolean;\n }>;\n\n /**\n * Clear user identity\n *\n * @since 7.0.0\n */\n clearIdentity(): Promise<{\n clearIdentity: boolean;\n }>;\n\n /**\n * Get the current user identity\n *\n * @since 8.1.0\n */\n getIdentity(): Promise<{\n identity: {\n userId: string;\n name?: string;\n email?: string;\n phone?: string;\n value?: number;\n };\n }>;\n\n /**\n * User identified status.\n *\n * @since 8.1.0\n */\n isUserIdentified(): Promise<{\n isUserIdentified: boolean;\n }>;\n\n /**\n * Submit a custom log message with the given level\n *\n * @since 7.0.0\n */\n log(options: {\n message: string;\n logLevel?: \"ERROR\" | \"WARNING\" | \"INFO\";\n }): Promise<{\n logged: boolean;\n }>;\n\n /**\n * Manually show a survey.\n *\n * @since 8.5.1\n */\n showSurvey(options: {\n surveyId: string;\n format?: \"survey\" | \"survey_full\";\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Add custom data\n *\n * @since 7.0.0\n */\n attachCustomData(options: {\n data: any;\n }): Promise<{\n attachedCustomData: boolean;\n }>;\n\n /**\n * Set tags\n *\n * @since 8.6.0\n */\n setTags(options: {\n tags: string[];\n }): Promise<{\n tagsSet: boolean;\n }>;\n\n /**\n * Set network logs blacklist\n *\n * @since 13.2.1\n */\n setNetworkLogsBlacklist(options: {\n blacklist: string[];\n }): Promise<{\n blacklistSet: boolean;\n }>;\n\n /**\n * Set network logs props to ignore\n *\n * @since 13.2.1\n */\n setNetworkLogPropsToIgnore(options: {\n propsToIgnore: string[];\n }): Promise<{\n propsToIgnoreSet: boolean;\n }>;\n\n /**\n * Set env data props to ignore. The given env data keys (exact and case-sensitive, e.g. \"deviceName\" or \"currentUrl\")\n * are removed before a ticket or conversation is sent. Each call replaces the previous list, an empty list resets it.\n * Can be called before or after initialize.\n *\n * @since 18.1.0\n */\n setEnvDataPropsToIgnore(options: {\n propsToIgnore: string[];\n }): Promise<{\n envDataPropsToIgnoreSet: boolean;\n }>;\n\n /**\n * Registers a Frontend tool defined on your AI agent in the Gleap dashboard.\n * Prefer the `registerAgentTool(name, handler)` helper exported by this\n * package — it wires the agentToolExecution event and result round-trip for\n * you.\n *\n * @since 15.0.0\n */\n registerAgentTool(options: {\n name: string;\n }): Promise<void>;\n\n /**\n * Resolves a pending agent tool execution with the handler's result.\n * Used by the `registerAgentTool(name, handler)` helper.\n *\n * @since 15.0.0\n */\n sendAgentToolResult(options: {\n executionId: string;\n result: string;\n }): Promise<void>;\n\n /**\n * Called when a registered agent tool should execute.\n *\n * @since 15.0.0\n */\n addListener(\n eventName: 'agentToolExecution',\n listenerFunc: (data: {\n executionId: string;\n name: string;\n params: any;\n }) => void,\n ): Promise<PluginListenerHandle>;\n\n /**\n * Sets the value of a ticket attribute\n *\n * @since 13.5.0\n */\n setTicketAttribute(options: {\n key: string;\n value: string;\n }): Promise<{\n setTicketAttribute: boolean;\n }>;\n\n /**\n * Unset a ticket attribute\n *\n * @since 14.1.0\n */\n unsetTicketAttribute(options: {\n key: string;\n }): Promise<{\n unsetTicketAttribute: boolean;\n }>;\n\n /**\n * Clear all ticket attributes\n *\n * @since 14.1.0\n */\n clearTicketAttributes(): Promise<{\n clearTicketAttributes: boolean;\n }>;\n\n /**\n * Set custom data\n *\n * @since 7.0.0\n */\n setCustomData(options: {\n key: string;\n value: string;\n }): Promise<{\n setCustomData: boolean;\n }>;\n\n /**\n * Remove custom data by key\n *\n * @since 7.0.0\n */\n removeCustomData(options: {\n key: string;\n }): Promise<{\n removedCustomData: boolean;\n }>;\n\n /**\n * Clear custom data\n *\n * @since 7.0.0\n */\n clearCustomData(): Promise<{\n clearedCustomData: boolean;\n }>;\n\n /**\n * Log event to Gleap\n *\n * @since 8.0.0\n */\n trackEvent(options: {\n name: string;\n data?: any;\n }): Promise<{\n loggedEvent: boolean;\n }>;\n\n /**\n * Track a page view\n *\n * @since 8.4.1\n */\n trackPage(options: {\n pageName: string;\n }): Promise<{\n trackedPage: boolean;\n }>;\n\n /**\n * \n *\n * @since 7.0.0\n */\n setEventCallback(\n callback: GleapEventCallback,\n ): Promise<CallbackID>;\n\n /**\n * Log event to Gleap\n *\n * @since 7.0.0\n */\n sendSilentCrashReport(options: {\n description: string,\n severity?: \"LOW\" | \"MEDIUM\" | \"HIGH\";\n dataExclusion?: {\n customData: Boolean;\n metaData: Boolean;\n attachments: Boolean;\n consoleLog: Boolean;\n networkLogs: Boolean;\n customEventLog: Boolean;\n screenshot: Boolean;\n replays: Boolean;\n };\n }): Promise<{\n sentSilentBugReport: boolean;\n }>;\n\n /**\n * Prefills the widget's form data\n *\n * @since 7.0.0\n */\n preFillForm(options: {\n data: any;\n }): Promise<{\n preFilledForm: boolean;\n }>;\n\n /**\n * Add attachment as bas64 string\n *\n * @since 7.0.0\n */\n addAttachment(options: {\n base64data: string;\n name: string;\n }): Promise<{\n attachmentAdded: boolean;\n }>;\n\n /**\n * All attachments removed\n *\n * @since 7.0.0\n */\n removeAllAttachments(): Promise<{\n allAttachmentsRemoved: boolean;\n }>;\n\n /**\n * Open widget\n *\n * @since 7.0.0\n */\n open(): Promise<{\n openedWidget: boolean;\n }>;\n\n /**\n * Open news\n *\n * @since 8.4.0\n */\n openNews(options: {\n showBackButton?: boolean;\n }): Promise<{\n openedNews: boolean;\n }>;\n\n /**\n * Open news article\n *\n * @since 8.4.0\n */\n openNewsArticle(options: {\n articleId: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Open help center\n *\n * @since 8.4.0\n */\n openHelpCenter(options: {\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Open help center article\n *\n * @since 8.4.0\n */\n openHelpCenterArticle(options: {\n articleId: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Ask the AI a question\n *\n * @since 15.0.0\n */\n askAI(options: {\n question: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Open help center collection\n *\n * @since 8.4.0\n */\n openHelpCenterCollection(options: {\n collectionId: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Search help center\n *\n * @since 8.4.0\n */\n searchHelpCenter(options: {\n term: string;\n showBackButton?: boolean;\n }): Promise<{\n opened: boolean;\n }>;\n\n /**\n * Open feature requests\n *\n * @since 8.4.0\n */\n openFeatureRequests(options: {\n showBackButton?: boolean;\n }): Promise<{\n openedFeatureRequests: boolean;\n }>;\n\n /**\n * Close widget\n *\n * @since 7.0.0\n */\n close(): Promise<{\n closedWidget: boolean;\n }>;\n\n /**\n * Check widget status code\n *\n * @since 7.0.0\n */\n isOpened(): Promise<{\n isOpened: boolean;\n }>;\n\n /**\n * Start feedback flow\n *\n * @since 7.0.0\n */\n startFeedbackFlow(options: {\n feedbackFlow?: string;\n showBackButton?: boolean;\n }): Promise<{\n startedFeedbackFlow: boolean;\n }>;\n\n /**\n * Start a classic form\n *\n * @since 13.1.0\n */\n startClassicForm(options: {\n formId?: string;\n showBackButton?: boolean;\n }): Promise<{\n classicFormStarted: boolean;\n }>;\n\n /**\n * Start a new conversation\n *\n * @since 13.1.0\n */\n startConversation(options: {\n showBackButton?: boolean;\n }): Promise<{\n conversationStarted: boolean;\n }>;\n\n /**\n * Opens the conversations tab.\n *\n * @since 13.9.0\n */\n openConversation(options: {\n showBackButton?: boolean;\n }): Promise<{\n conversationsOpened: boolean;\n }>;\n\n /**\n * Start bot\n *\n * @since 10.0.3\n */\n startBot(options: {\n botId?: string;\n showBackButton?: boolean;\n }): Promise<{\n startedBot: boolean;\n }>;\n\n /**\n * Show or hide the feedback button.\n *\n * @since 8.0.0\n */\n showFeedbackButton(options: {\n show?: boolean;\n }): Promise<{\n feedbackButtonShown: boolean;\n }>;\n\n /**\n* Disable in app notifications.\n*\n* @since 8.6.1\n*/\n setDisableInAppNotifications(options: {\n disableInAppNotifications?: boolean;\n }): Promise<{\n inAppNotificationsDisabled: boolean;\n }>;\n\n /**\n * Disable env data. While disabled (true), no env data (device, OS, screen size, locale, URL, ...) is collected\n * and tickets are sent without it. Pass false to collect env data again. Can be called before or after initialize.\n *\n * @since 18.1.0\n */\n setDisableEnvData(options: {\n disableEnvData: boolean;\n }): Promise<{\n envDataDisabled: boolean;\n }>;\n\n /**\n * Set Language\n *\n * @since 7.0.0\n */\n setLanguage(options: {\n languageCode: string;\n }): Promise<{\n setLanguage: string;\n }>;\n\n /**\n * Disable console log overwrite\n *\n * @since 7.0.0\n */\n disableConsoleLogOverwrite(): Promise<{\n consoleLogDisabled: boolean;\n }>;\n\n /**\n * Enable debug console log\n *\n * @since 7.0.0\n */\n enableDebugConsoleLog(): Promise<{\n debugConsoleLogEnabled: boolean;\n }>;\n\n /**\n * Set the notification container offset\n *\n * @since 15.2.0\n */\n setNotificationContainerOffset(options: {\n x: number;\n y: number;\n }): Promise<{\n notificationContainerOffsetSet: boolean;\n }>;\n\n}"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -102,6 +102,11 @@ export declare class GleapWeb extends WebPlugin implements GleapPlugin {
|
|
|
102
102
|
}): Promise<{
|
|
103
103
|
inAppNotificationsDisabled: boolean;
|
|
104
104
|
}>;
|
|
105
|
+
setDisableEnvData(options: {
|
|
106
|
+
disableEnvData: boolean;
|
|
107
|
+
}): Promise<{
|
|
108
|
+
envDataDisabled: boolean;
|
|
109
|
+
}>;
|
|
105
110
|
identify(options: {
|
|
106
111
|
userId: string;
|
|
107
112
|
userHash?: string | undefined;
|
|
@@ -142,6 +147,11 @@ export declare class GleapWeb extends WebPlugin implements GleapPlugin {
|
|
|
142
147
|
}): Promise<{
|
|
143
148
|
propsToIgnoreSet: boolean;
|
|
144
149
|
}>;
|
|
150
|
+
setEnvDataPropsToIgnore(options: {
|
|
151
|
+
propsToIgnore: string[];
|
|
152
|
+
}): Promise<{
|
|
153
|
+
envDataPropsToIgnoreSet: boolean;
|
|
154
|
+
}>;
|
|
145
155
|
setTags(options: {
|
|
146
156
|
tags: string[];
|
|
147
157
|
}): Promise<{
|
package/dist/esm/web.js
CHANGED
|
@@ -173,6 +173,11 @@ export class GleapWeb extends WebPlugin {
|
|
|
173
173
|
Gleap.setDisableInAppNotifications((_a = options.disableInAppNotifications) !== null && _a !== void 0 ? _a : false);
|
|
174
174
|
return { inAppNotificationsDisabled: true };
|
|
175
175
|
}
|
|
176
|
+
async setDisableEnvData(options) {
|
|
177
|
+
var _a;
|
|
178
|
+
Gleap.setDisableEnvData((_a = options.disableEnvData) !== null && _a !== void 0 ? _a : false);
|
|
179
|
+
return { envDataDisabled: true };
|
|
180
|
+
}
|
|
176
181
|
async identify(options) {
|
|
177
182
|
var userData = {
|
|
178
183
|
name: options.name,
|
|
@@ -206,6 +211,10 @@ export class GleapWeb extends WebPlugin {
|
|
|
206
211
|
Gleap.setNetworkLogPropsToIgnore(options.propsToIgnore);
|
|
207
212
|
return { propsToIgnoreSet: true };
|
|
208
213
|
}
|
|
214
|
+
async setEnvDataPropsToIgnore(options) {
|
|
215
|
+
Gleap.setEnvDataPropsToIgnore(options.propsToIgnore);
|
|
216
|
+
return { envDataPropsToIgnoreSet: true };
|
|
217
|
+
}
|
|
209
218
|
async setTags(options) {
|
|
210
219
|
Gleap.setTags(options.tags);
|
|
211
220
|
return { tagsSet: true };
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,OAAO,QAAS,SAAQ,SAAS;IAAvC;;QAKU,+BAA0B,GAE9B,EAAE,CAAC;IA+mBT,CAAC;IA7mBC,KAAK,CAAC,UAAU,CAAC,OAEhB;QACC,IAAI,QAAQ,CAAC,WAAW,EAAE;YACxB,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;SAC9B;QAED,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAElC,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,yBAAyB,EAAE,CAAC;QAEjC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAEf;QACC,IAAI,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAA,EAAE;YACpB,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;SACvC;QAED,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEhC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAwB;QACtC,IAAI,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAA,E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AAK,CAAC,aAAa,CAAC,QAGnB;QACC,MAAM,IAAI,CAAC,WAAW,CAAC,0CAA0C,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,oBAAoB;QACxB,MAAM,IAAI,CAAC,WAAW,CAAC,iDAAiD,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,8BAA8B,CAAC,QAGpC;QACC,OAAO,EAAE,8BAA8B,EAAE,IAAI,EAAE,CAAC;IAClD,CAAC;IAEO,MAAM,CAAC,MAAc;QAC3B,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,UAAU,GACZ,gEAAgE,CAAC;QACnE,IAAI,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;QACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC;SAC3E;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;;AApnBM,kBAAS,GAA0C,EAAE,CAAC;AACtD,oBAAW,GAAG,KAAK,CAAC;AACpB,kCAAyB,GAAG,CAAC,CAAC","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\n\nimport type { GleapEventCallback, GleapPlugin } from './definitions';\n\nexport class GleapWeb extends WebPlugin implements GleapPlugin {\n static callbacks: { [key: string]: GleapEventCallback } = {};\n static initialized = false;\n static agentToolExecutionCounter = 0;\n\n private pendingAgentToolExecutions: {\n [executionId: string]: (result: string) => void;\n } = {};\n\n async initialize(options: {\n API_KEY: string;\n }): Promise<{ initialized: boolean }> {\n if (GleapWeb.initialized) {\n return { initialized: true };\n }\n\n Gleap.initialize(options.API_KEY);\n\n GleapWeb.initialized = true;\n this.registerCallbackListeners();\n\n return { initialized: true };\n }\n\n async setRegion(options: {\n region: 'eu' | 'us';\n }): Promise<{ region: string }> {\n if (!options?.region) {\n throw new Error('No region provided');\n }\n\n Gleap.setRegion(options.region);\n\n return { region: options.region };\n }\n\n async setApiUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setApiUrl(options.url);\n\n return { url: options.url };\n }\n\n async setWSApiUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setWSApiUrl(options.url);\n\n return { url: options.url };\n }\n\n async setRealtimeHost(options: { host: string }): Promise<{ host: string }> {\n if (!options?.host) {\n throw new Error('No host provided');\n }\n\n Gleap.setRealtimeHost(options.host);\n\n return { host: options.host };\n }\n\n async setFrameUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setFrameUrl(options.url);\n\n return { url: options.url };\n }\n\n async setBannerUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setBannerUrl(options.url);\n\n return { url: options.url };\n }\n\n async setModalUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setModalUrl(options.url);\n\n return { url: options.url };\n }\n\n registerCallbackListeners(): void {\n Gleap.on('open', () => {\n this.notifyCallbacks('open', {});\n });\n\n Gleap.on('initialized', () => {\n this.notifyCallbacks('initialized', {});\n });\n\n Gleap.on('close', () => {\n this.notifyCallbacks('close', {});\n });\n\n Gleap.on('feedback-sent', formData => {\n this.notifyCallbacks('feedback-sent', formData);\n });\n\n Gleap.on('outbound-sent', formData => {\n this.notifyCallbacks('outbound-sent', formData);\n });\n\n Gleap.on('tool-execution', toolExecution => {\n this.notifyCallbacks('tool-execution', toolExecution);\n });\n\n Gleap.on('flow-started', flow => {\n this.notifyCallbacks('flow-started', flow);\n });\n\n Gleap.on('error-while-sending', () => {\n this.notifyCallbacks('error-while-sending', {});\n });\n\n Gleap.on('unregister-pushmessage-group', groupName => {\n this.notifyCallbacks('unregister-pushmessage-group', groupName);\n });\n\n Gleap.on('register-pushmessage-group', groupName => {\n this.notifyCallbacks('register-pushmessage-group', groupName);\n });\n\n Gleap.on('unread-count-changed', groupName => {\n this.notifyCallbacks('notification-count-updated', groupName);\n });\n\n Gleap.registerCustomAction(customAction => {\n this.notifyCallbacks('custom-action-called', customAction);\n });\n }\n\n async registerAgentTool(options: { name: string }): Promise<void> {\n const gleapSdk = Gleap as any;\n if (typeof gleapSdk.registerAgentTool !== 'function') {\n console.warn(\n 'Gleap: registerAgentTool requires a newer version of the Gleap JS SDK.',\n );\n return;\n }\n\n gleapSdk.registerAgentTool(\n options.name,\n (params: any) =>\n new Promise<string>(resolve => {\n const executionId = `web-${++GleapWeb.agentToolExecutionCounter}`;\n this.pendingAgentToolExecutions[executionId] = resolve;\n\n this.notifyListeners('agentToolExecution', {\n executionId,\n name: options.name,\n params: params ?? {},\n });\n }),\n );\n }\n\n async sendAgentToolResult(options: {\n executionId: string;\n result: string;\n }): Promise<void> {\n const resolve = this.pendingAgentToolExecutions[options.executionId];\n if (resolve) {\n delete this.pendingAgentToolExecutions[options.executionId];\n resolve(options.result);\n }\n }\n\n async setTicketAttribute(options: {\n key: string;\n value: string;\n }): Promise<{ setTicketAttribute: boolean }> {\n Gleap.setTicketAttribute(options.key, options.value);\n\n return { setTicketAttribute: true };\n }\n\n async unsetTicketAttribute(options: {\n key: string;\n }): Promise<{ unsetTicketAttribute: boolean }> {\n Gleap.unsetTicketAttribute(options.key);\n\n return { unsetTicketAttribute: true };\n }\n\n async clearTicketAttributes(): Promise<{ clearTicketAttributes: boolean }> {\n Gleap.clearTicketAttributes();\n\n return { clearTicketAttributes: true };\n }\n\n notifyCallbacks(event: string, data: any): void {\n if (!GleapWeb.callbacks) {\n return;\n }\n\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId]({\n name: event,\n data,\n });\n }\n }\n\n async startClassicForm(options: {\n formId?: string | undefined;\n showBackButton?: boolean | undefined;\n }): Promise<{ classicFormStarted: boolean }> {\n Gleap.startClassicForm(options.formId ?? '', options.showBackButton);\n\n return { classicFormStarted: true };\n }\n\n async startConversation(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ conversationStarted: boolean }> {\n Gleap.startConversation(options.showBackButton);\n\n return { conversationStarted: true };\n }\n\n async openConversation(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ conversationsOpened: boolean }> {\n Gleap.openConversations(options.showBackButton);\n\n return { conversationsOpened: true };\n }\n\n async showSurvey(options: {\n surveyId: string;\n format?: 'survey' | 'survey_full' | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.showSurvey(options.surveyId, options.format);\n\n return { opened: true };\n }\n\n async showFeedbackButton(options: {\n show: boolean;\n }): Promise<{ feedbackButtonShown: boolean }> {\n Gleap.showFeedbackButton(options.show ? true : false);\n\n return { feedbackButtonShown: true };\n }\n\n async setDisableInAppNotifications(options: {\n disableInAppNotifications?: boolean | undefined;\n }): Promise<{ inAppNotificationsDisabled: boolean }> {\n Gleap.setDisableInAppNotifications(\n options.disableInAppNotifications ?? false,\n );\n\n return { inAppNotificationsDisabled: true };\n }\n\n async identify(options: {\n userId: string;\n userHash?: string | undefined;\n customData?: Object | undefined;\n name?: string | undefined;\n email?: string | undefined;\n phone?: string | undefined;\n companyId?: string | undefined;\n companyName?: string | undefined;\n avatar?: string | undefined;\n sla?: number | undefined;\n plan?: string | undefined;\n value?: number | undefined;\n }): Promise<{ identify: boolean }> {\n var userData = {\n name: options.name,\n email: options.email,\n phone: options.phone,\n companyId: options.companyId,\n companyName: options.companyName,\n avatar: options.avatar,\n sla: options.sla,\n plan: options.plan,\n value: options.value,\n customData: options.customData,\n };\n if (options.userHash) {\n Gleap.identify(options.userId, userData, options.userHash);\n } else {\n Gleap.identify(options.userId, userData);\n }\n\n return { identify: true };\n }\n\n async updateContact(options: {\n name?: string | undefined;\n email?: string | undefined;\n phone?: string | undefined;\n companyId?: string | undefined;\n companyName?: string | undefined;\n avatar?: string | undefined;\n sla?: number | undefined;\n plan?: string | undefined;\n value?: number | undefined;\n customData?: Object | undefined;\n }): Promise<{ identify: boolean }> {\n Gleap.updateContact(options);\n\n return { identify: true };\n }\n\n async setNetworkLogsBlacklist(options: {\n blacklist: string[];\n }): Promise<{ blacklistSet: boolean }> {\n Gleap.setNetworkLogsBlacklist(options.blacklist);\n\n return { blacklistSet: true };\n }\n\n async setNetworkLogPropsToIgnore(options: {\n propsToIgnore: string[];\n }): Promise<{ propsToIgnoreSet: boolean }> {\n Gleap.setNetworkLogPropsToIgnore(options.propsToIgnore);\n\n return { propsToIgnoreSet: true };\n }\n\n async setTags(options: { tags: string[] }): Promise<{ tagsSet: boolean }> {\n Gleap.setTags(options.tags);\n\n return { tagsSet: true };\n }\n\n async clearIdentity(): Promise<{ clearIdentity: boolean }> {\n Gleap.clearIdentity();\n\n return { clearIdentity: true };\n }\n\n async getIdentity(): Promise<{\n identity: {\n userId: string;\n name?: string | undefined;\n email?: string | undefined;\n phone?: string | undefined;\n companyId?: string | undefined;\n companyName?: string | undefined;\n avatar?: string | undefined;\n sla?: number | undefined;\n plan?: string | undefined;\n value?: number | undefined;\n };\n }> {\n return { identity: Gleap.getIdentity() };\n }\n\n async isUserIdentified(): Promise<{ isUserIdentified: boolean }> {\n return { isUserIdentified: Gleap.isUserIdentified() };\n }\n\n async attachCustomData(options: {\n data: any;\n }): Promise<{ attachedCustomData: boolean }> {\n Gleap.attachCustomData(options.data);\n\n return { attachedCustomData: true };\n }\n\n async setCustomData(options: {\n key: string;\n value: string;\n }): Promise<{ setCustomData: boolean }> {\n Gleap.setCustomData(options.key, options.value);\n\n return { setCustomData: true };\n }\n\n async removeCustomData(options: {\n key: string;\n }): Promise<{ removedCustomData: boolean }> {\n Gleap.removeCustomData(options.key);\n\n return { removedCustomData: true };\n }\n\n async clearCustomData(): Promise<{ clearedCustomData: boolean }> {\n Gleap.clearCustomData();\n\n return { clearedCustomData: true };\n }\n\n async trackEvent(options: {\n name: string;\n data?: any;\n }): Promise<{ loggedEvent: boolean }> {\n Gleap.trackEvent(options.name, options.data);\n\n return { loggedEvent: true };\n }\n\n async trackPage(options: {\n pageName: string;\n }): Promise<{ trackedPage: boolean }> {\n Gleap.trackEvent('pageView', {\n page: options.pageName,\n });\n\n return { trackedPage: true };\n }\n\n async startFeedbackFlow(options: {\n feedbackFlow?: string | undefined;\n showBackButton?: boolean | undefined;\n }): Promise<{ startedFeedbackFlow: boolean }> {\n if (!options.feedbackFlow) {\n }\n\n Gleap.startFeedbackFlow(\n options.feedbackFlow ?? 'bugreporting',\n options.showBackButton,\n );\n\n return { startedFeedbackFlow: true };\n }\n\n async startBot(options: {\n botId?: string | undefined;\n showBackButton?: boolean | undefined;\n }): Promise<{ startedBot: boolean }> {\n if (!options.botId) {\n }\n\n Gleap.startBot(options.botId ?? '', options.showBackButton);\n\n return { startedBot: true };\n }\n\n async setLanguage(options: {\n languageCode: string;\n }): Promise<{ setLanguage: string }> {\n Gleap.setLanguage(options.languageCode);\n\n return { setLanguage: options.languageCode };\n }\n\n async log(options: {\n message: string;\n logLevel?: 'ERROR' | 'WARNING' | 'INFO' | undefined;\n }): Promise<{ logged: boolean }> {\n Gleap.log(options.message, options.logLevel);\n\n return { logged: true };\n }\n\n async setEventCallback(callback: GleapEventCallback): Promise<string> {\n var callbackId = this.makeid(10);\n GleapWeb.callbacks[callbackId] = callback;\n return callbackId;\n }\n\n async sendSilentCrashReport(options: {\n description: string;\n severity?: 'LOW' | 'MEDIUM' | 'HIGH' | undefined;\n dataExclusion?:\n | {\n customData: Boolean;\n metaData: Boolean;\n attachments: Boolean;\n consoleLog: Boolean;\n networkLogs: Boolean;\n customEventLog: Boolean;\n screenshot: Boolean;\n replays: Boolean;\n }\n | undefined;\n }): Promise<{ sentSilentBugReport: boolean }> {\n Gleap.sendSilentCrashReport(\n options.description,\n options.severity,\n options.dataExclusion,\n );\n\n return { sentSilentBugReport: true };\n }\n\n async open(): Promise<{ openedWidget: boolean }> {\n Gleap.open();\n\n return { openedWidget: true };\n }\n\n async openFeatureRequests(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ openedFeatureRequests: boolean }> {\n Gleap.openFeatureRequests(options.showBackButton);\n\n return { openedFeatureRequests: true };\n }\n\n async openNews(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ openedNews: boolean }> {\n Gleap.openNews(options.showBackButton);\n\n return { openedNews: true };\n }\n\n async openNewsArticle(options: {\n articleId: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.openNewsArticle(options.articleId, options.showBackButton);\n\n return { opened: true };\n }\n\n async openHelpCenter(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.openHelpCenter(options.showBackButton);\n\n return { opened: true };\n }\n\n async openHelpCenterArticle(options: {\n articleId: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.openHelpCenterArticle(options.articleId, options.showBackButton);\n\n return { opened: true };\n }\n\n async askAI(options: {\n question: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.askAI(options.question, options.showBackButton);\n\n return { opened: true };\n }\n\n async openHelpCenterCollection(options: {\n collectionId: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.openHelpCenterCollection(\n options.collectionId,\n options.showBackButton,\n );\n\n return { opened: true };\n }\n\n async searchHelpCenter(options: {\n term: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.searchHelpCenter(options.term, options.showBackButton);\n\n return { opened: true };\n }\n\n async close(): Promise<{ closedWidget: boolean }> {\n Gleap.close();\n\n return { closedWidget: true };\n }\n\n async isOpened(): Promise<{ isOpened: boolean }> {\n return { isOpened: Gleap.isOpened() };\n }\n\n async disableConsoleLogOverwrite(): Promise<{ consoleLogDisabled: boolean }> {\n Gleap.disableConsoleLogOverwrite();\n\n return { consoleLogDisabled: true };\n }\n\n async enableDebugConsoleLog(): Promise<{ debugConsoleLogEnabled: boolean }> {\n return { debugConsoleLogEnabled: true };\n }\n\n async preFillForm(options: {\n data: any;\n }): Promise<{ preFilledForm: boolean }> {\n Gleap.preFillForm(options.data);\n\n return { preFilledForm: true };\n }\n\n async addAttachment(_options: {\n base64data: string;\n name: string;\n }): Promise<{ attachmentAdded: boolean }> {\n throw this.unavailable('addAttachment not available for browsers');\n }\n\n async removeAllAttachments(): Promise<{ allAttachmentsRemoved: boolean }> {\n throw this.unavailable('removeAllAttachments not available for browsers');\n }\n\n async setNotificationContainerOffset(_options: {\n x: number;\n y: number;\n }): Promise<{ notificationContainerOffsetSet: boolean }> {\n return { notificationContainerOffsetSet: true };\n }\n\n private makeid(length: number): string {\n var result = '';\n var characters =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,OAAO,QAAS,SAAQ,SAAS;IAAvC;;QAKU,+BAA0B,GAE9B,EAAE,CAAC;IA+nBT,CAAC;IA7nBC,KAAK,CAAC,UAAU,CAAC,OAEhB;QACC,IAAI,QAAQ,CAAC,WAAW,EAAE;YACxB,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;SAC9B;QAED,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAElC,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,yBAAyB,EAAE,CAAC;QAEjC,OAAO,EAAE,WAAW,EAAE,IAAI,EAA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G,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC;SAC3E;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;;AApoBM,kBAAS,GAA0C,EAAE,CAAC;AACtD,oBAAW,GAAG,KAAK,CAAC;AACpB,kCAAyB,GAAG,CAAC,CAAC","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\n\nimport type { GleapEventCallback, GleapPlugin } from './definitions';\n\nexport class GleapWeb extends WebPlugin implements GleapPlugin {\n static callbacks: { [key: string]: GleapEventCallback } = {};\n static initialized = false;\n static agentToolExecutionCounter = 0;\n\n private pendingAgentToolExecutions: {\n [executionId: string]: (result: string) => void;\n } = {};\n\n async initialize(options: {\n API_KEY: string;\n }): Promise<{ initialized: boolean }> {\n if (GleapWeb.initialized) {\n return { initialized: true };\n }\n\n Gleap.initialize(options.API_KEY);\n\n GleapWeb.initialized = true;\n this.registerCallbackListeners();\n\n return { initialized: true };\n }\n\n async setRegion(options: {\n region: 'eu' | 'us';\n }): Promise<{ region: string }> {\n if (!options?.region) {\n throw new Error('No region provided');\n }\n\n Gleap.setRegion(options.region);\n\n return { region: options.region };\n }\n\n async setApiUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setApiUrl(options.url);\n\n return { url: options.url };\n }\n\n async setWSApiUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setWSApiUrl(options.url);\n\n return { url: options.url };\n }\n\n async setRealtimeHost(options: { host: string }): Promise<{ host: string }> {\n if (!options?.host) {\n throw new Error('No host provided');\n }\n\n Gleap.setRealtimeHost(options.host);\n\n return { host: options.host };\n }\n\n async setFrameUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setFrameUrl(options.url);\n\n return { url: options.url };\n }\n\n async setBannerUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setBannerUrl(options.url);\n\n return { url: options.url };\n }\n\n async setModalUrl(options: { url: string }): Promise<{ url: string }> {\n if (!options?.url) {\n throw new Error('No url provided');\n }\n\n Gleap.setModalUrl(options.url);\n\n return { url: options.url };\n }\n\n registerCallbackListeners(): void {\n Gleap.on('open', () => {\n this.notifyCallbacks('open', {});\n });\n\n Gleap.on('initialized', () => {\n this.notifyCallbacks('initialized', {});\n });\n\n Gleap.on('close', () => {\n this.notifyCallbacks('close', {});\n });\n\n Gleap.on('feedback-sent', formData => {\n this.notifyCallbacks('feedback-sent', formData);\n });\n\n Gleap.on('outbound-sent', formData => {\n this.notifyCallbacks('outbound-sent', formData);\n });\n\n Gleap.on('tool-execution', toolExecution => {\n this.notifyCallbacks('tool-execution', toolExecution);\n });\n\n Gleap.on('flow-started', flow => {\n this.notifyCallbacks('flow-started', flow);\n });\n\n Gleap.on('error-while-sending', () => {\n this.notifyCallbacks('error-while-sending', {});\n });\n\n Gleap.on('unregister-pushmessage-group', groupName => {\n this.notifyCallbacks('unregister-pushmessage-group', groupName);\n });\n\n Gleap.on('register-pushmessage-group', groupName => {\n this.notifyCallbacks('register-pushmessage-group', groupName);\n });\n\n Gleap.on('unread-count-changed', groupName => {\n this.notifyCallbacks('notification-count-updated', groupName);\n });\n\n Gleap.registerCustomAction(customAction => {\n this.notifyCallbacks('custom-action-called', customAction);\n });\n }\n\n async registerAgentTool(options: { name: string }): Promise<void> {\n const gleapSdk = Gleap as any;\n if (typeof gleapSdk.registerAgentTool !== 'function') {\n console.warn(\n 'Gleap: registerAgentTool requires a newer version of the Gleap JS SDK.',\n );\n return;\n }\n\n gleapSdk.registerAgentTool(\n options.name,\n (params: any) =>\n new Promise<string>(resolve => {\n const executionId = `web-${++GleapWeb.agentToolExecutionCounter}`;\n this.pendingAgentToolExecutions[executionId] = resolve;\n\n this.notifyListeners('agentToolExecution', {\n executionId,\n name: options.name,\n params: params ?? {},\n });\n }),\n );\n }\n\n async sendAgentToolResult(options: {\n executionId: string;\n result: string;\n }): Promise<void> {\n const resolve = this.pendingAgentToolExecutions[options.executionId];\n if (resolve) {\n delete this.pendingAgentToolExecutions[options.executionId];\n resolve(options.result);\n }\n }\n\n async setTicketAttribute(options: {\n key: string;\n value: string;\n }): Promise<{ setTicketAttribute: boolean }> {\n Gleap.setTicketAttribute(options.key, options.value);\n\n return { setTicketAttribute: true };\n }\n\n async unsetTicketAttribute(options: {\n key: string;\n }): Promise<{ unsetTicketAttribute: boolean }> {\n Gleap.unsetTicketAttribute(options.key);\n\n return { unsetTicketAttribute: true };\n }\n\n async clearTicketAttributes(): Promise<{ clearTicketAttributes: boolean }> {\n Gleap.clearTicketAttributes();\n\n return { clearTicketAttributes: true };\n }\n\n notifyCallbacks(event: string, data: any): void {\n if (!GleapWeb.callbacks) {\n return;\n }\n\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId]({\n name: event,\n data,\n });\n }\n }\n\n async startClassicForm(options: {\n formId?: string | undefined;\n showBackButton?: boolean | undefined;\n }): Promise<{ classicFormStarted: boolean }> {\n Gleap.startClassicForm(options.formId ?? '', options.showBackButton);\n\n return { classicFormStarted: true };\n }\n\n async startConversation(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ conversationStarted: boolean }> {\n Gleap.startConversation(options.showBackButton);\n\n return { conversationStarted: true };\n }\n\n async openConversation(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ conversationsOpened: boolean }> {\n Gleap.openConversations(options.showBackButton);\n\n return { conversationsOpened: true };\n }\n\n async showSurvey(options: {\n surveyId: string;\n format?: 'survey' | 'survey_full' | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.showSurvey(options.surveyId, options.format);\n\n return { opened: true };\n }\n\n async showFeedbackButton(options: {\n show: boolean;\n }): Promise<{ feedbackButtonShown: boolean }> {\n Gleap.showFeedbackButton(options.show ? true : false);\n\n return { feedbackButtonShown: true };\n }\n\n async setDisableInAppNotifications(options: {\n disableInAppNotifications?: boolean | undefined;\n }): Promise<{ inAppNotificationsDisabled: boolean }> {\n Gleap.setDisableInAppNotifications(\n options.disableInAppNotifications ?? false,\n );\n\n return { inAppNotificationsDisabled: true };\n }\n\n async setDisableEnvData(options: {\n disableEnvData: boolean;\n }): Promise<{ envDataDisabled: boolean }> {\n Gleap.setDisableEnvData(options.disableEnvData ?? false);\n\n return { envDataDisabled: true };\n }\n\n async identify(options: {\n userId: string;\n userHash?: string | undefined;\n customData?: Object | undefined;\n name?: string | undefined;\n email?: string | undefined;\n phone?: string | undefined;\n companyId?: string | undefined;\n companyName?: string | undefined;\n avatar?: string | undefined;\n sla?: number | undefined;\n plan?: string | undefined;\n value?: number | undefined;\n }): Promise<{ identify: boolean }> {\n var userData = {\n name: options.name,\n email: options.email,\n phone: options.phone,\n companyId: options.companyId,\n companyName: options.companyName,\n avatar: options.avatar,\n sla: options.sla,\n plan: options.plan,\n value: options.value,\n customData: options.customData,\n };\n if (options.userHash) {\n Gleap.identify(options.userId, userData, options.userHash);\n } else {\n Gleap.identify(options.userId, userData);\n }\n\n return { identify: true };\n }\n\n async updateContact(options: {\n name?: string | undefined;\n email?: string | undefined;\n phone?: string | undefined;\n companyId?: string | undefined;\n companyName?: string | undefined;\n avatar?: string | undefined;\n sla?: number | undefined;\n plan?: string | undefined;\n value?: number | undefined;\n customData?: Object | undefined;\n }): Promise<{ identify: boolean }> {\n Gleap.updateContact(options);\n\n return { identify: true };\n }\n\n async setNetworkLogsBlacklist(options: {\n blacklist: string[];\n }): Promise<{ blacklistSet: boolean }> {\n Gleap.setNetworkLogsBlacklist(options.blacklist);\n\n return { blacklistSet: true };\n }\n\n async setNetworkLogPropsToIgnore(options: {\n propsToIgnore: string[];\n }): Promise<{ propsToIgnoreSet: boolean }> {\n Gleap.setNetworkLogPropsToIgnore(options.propsToIgnore);\n\n return { propsToIgnoreSet: true };\n }\n\n async setEnvDataPropsToIgnore(options: {\n propsToIgnore: string[];\n }): Promise<{ envDataPropsToIgnoreSet: boolean }> {\n Gleap.setEnvDataPropsToIgnore(options.propsToIgnore);\n\n return { envDataPropsToIgnoreSet: true };\n }\n\n async setTags(options: { tags: string[] }): Promise<{ tagsSet: boolean }> {\n Gleap.setTags(options.tags);\n\n return { tagsSet: true };\n }\n\n async clearIdentity(): Promise<{ clearIdentity: boolean }> {\n Gleap.clearIdentity();\n\n return { clearIdentity: true };\n }\n\n async getIdentity(): Promise<{\n identity: {\n userId: string;\n name?: string | undefined;\n email?: string | undefined;\n phone?: string | undefined;\n companyId?: string | undefined;\n companyName?: string | undefined;\n avatar?: string | undefined;\n sla?: number | undefined;\n plan?: string | undefined;\n value?: number | undefined;\n };\n }> {\n return { identity: Gleap.getIdentity() };\n }\n\n async isUserIdentified(): Promise<{ isUserIdentified: boolean }> {\n return { isUserIdentified: Gleap.isUserIdentified() };\n }\n\n async attachCustomData(options: {\n data: any;\n }): Promise<{ attachedCustomData: boolean }> {\n Gleap.attachCustomData(options.data);\n\n return { attachedCustomData: true };\n }\n\n async setCustomData(options: {\n key: string;\n value: string;\n }): Promise<{ setCustomData: boolean }> {\n Gleap.setCustomData(options.key, options.value);\n\n return { setCustomData: true };\n }\n\n async removeCustomData(options: {\n key: string;\n }): Promise<{ removedCustomData: boolean }> {\n Gleap.removeCustomData(options.key);\n\n return { removedCustomData: true };\n }\n\n async clearCustomData(): Promise<{ clearedCustomData: boolean }> {\n Gleap.clearCustomData();\n\n return { clearedCustomData: true };\n }\n\n async trackEvent(options: {\n name: string;\n data?: any;\n }): Promise<{ loggedEvent: boolean }> {\n Gleap.trackEvent(options.name, options.data);\n\n return { loggedEvent: true };\n }\n\n async trackPage(options: {\n pageName: string;\n }): Promise<{ trackedPage: boolean }> {\n Gleap.trackEvent('pageView', {\n page: options.pageName,\n });\n\n return { trackedPage: true };\n }\n\n async startFeedbackFlow(options: {\n feedbackFlow?: string | undefined;\n showBackButton?: boolean | undefined;\n }): Promise<{ startedFeedbackFlow: boolean }> {\n if (!options.feedbackFlow) {\n }\n\n Gleap.startFeedbackFlow(\n options.feedbackFlow ?? 'bugreporting',\n options.showBackButton,\n );\n\n return { startedFeedbackFlow: true };\n }\n\n async startBot(options: {\n botId?: string | undefined;\n showBackButton?: boolean | undefined;\n }): Promise<{ startedBot: boolean }> {\n if (!options.botId) {\n }\n\n Gleap.startBot(options.botId ?? '', options.showBackButton);\n\n return { startedBot: true };\n }\n\n async setLanguage(options: {\n languageCode: string;\n }): Promise<{ setLanguage: string }> {\n Gleap.setLanguage(options.languageCode);\n\n return { setLanguage: options.languageCode };\n }\n\n async log(options: {\n message: string;\n logLevel?: 'ERROR' | 'WARNING' | 'INFO' | undefined;\n }): Promise<{ logged: boolean }> {\n Gleap.log(options.message, options.logLevel);\n\n return { logged: true };\n }\n\n async setEventCallback(callback: GleapEventCallback): Promise<string> {\n var callbackId = this.makeid(10);\n GleapWeb.callbacks[callbackId] = callback;\n return callbackId;\n }\n\n async sendSilentCrashReport(options: {\n description: string;\n severity?: 'LOW' | 'MEDIUM' | 'HIGH' | undefined;\n dataExclusion?:\n | {\n customData: Boolean;\n metaData: Boolean;\n attachments: Boolean;\n consoleLog: Boolean;\n networkLogs: Boolean;\n customEventLog: Boolean;\n screenshot: Boolean;\n replays: Boolean;\n }\n | undefined;\n }): Promise<{ sentSilentBugReport: boolean }> {\n Gleap.sendSilentCrashReport(\n options.description,\n options.severity,\n options.dataExclusion,\n );\n\n return { sentSilentBugReport: true };\n }\n\n async open(): Promise<{ openedWidget: boolean }> {\n Gleap.open();\n\n return { openedWidget: true };\n }\n\n async openFeatureRequests(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ openedFeatureRequests: boolean }> {\n Gleap.openFeatureRequests(options.showBackButton);\n\n return { openedFeatureRequests: true };\n }\n\n async openNews(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ openedNews: boolean }> {\n Gleap.openNews(options.showBackButton);\n\n return { openedNews: true };\n }\n\n async openNewsArticle(options: {\n articleId: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.openNewsArticle(options.articleId, options.showBackButton);\n\n return { opened: true };\n }\n\n async openHelpCenter(options: {\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.openHelpCenter(options.showBackButton);\n\n return { opened: true };\n }\n\n async openHelpCenterArticle(options: {\n articleId: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.openHelpCenterArticle(options.articleId, options.showBackButton);\n\n return { opened: true };\n }\n\n async askAI(options: {\n question: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.askAI(options.question, options.showBackButton);\n\n return { opened: true };\n }\n\n async openHelpCenterCollection(options: {\n collectionId: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.openHelpCenterCollection(\n options.collectionId,\n options.showBackButton,\n );\n\n return { opened: true };\n }\n\n async searchHelpCenter(options: {\n term: string;\n showBackButton?: boolean | undefined;\n }): Promise<{ opened: boolean }> {\n Gleap.searchHelpCenter(options.term, options.showBackButton);\n\n return { opened: true };\n }\n\n async close(): Promise<{ closedWidget: boolean }> {\n Gleap.close();\n\n return { closedWidget: true };\n }\n\n async isOpened(): Promise<{ isOpened: boolean }> {\n return { isOpened: Gleap.isOpened() };\n }\n\n async disableConsoleLogOverwrite(): Promise<{ consoleLogDisabled: boolean }> {\n Gleap.disableConsoleLogOverwrite();\n\n return { consoleLogDisabled: true };\n }\n\n async enableDebugConsoleLog(): Promise<{ debugConsoleLogEnabled: boolean }> {\n return { debugConsoleLogEnabled: true };\n }\n\n async preFillForm(options: {\n data: any;\n }): Promise<{ preFilledForm: boolean }> {\n Gleap.preFillForm(options.data);\n\n return { preFilledForm: true };\n }\n\n async addAttachment(_options: {\n base64data: string;\n name: string;\n }): Promise<{ attachmentAdded: boolean }> {\n throw this.unavailable('addAttachment not available for browsers');\n }\n\n async removeAllAttachments(): Promise<{ allAttachmentsRemoved: boolean }> {\n throw this.unavailable('removeAllAttachments not available for browsers');\n }\n\n async setNotificationContainerOffset(_options: {\n x: number;\n y: number;\n }): Promise<{ notificationContainerOffsetSet: boolean }> {\n return { notificationContainerOffsetSet: true };\n }\n\n private makeid(length: number): string {\n var result = '';\n var characters =\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -231,6 +231,11 @@ class GleapWeb extends core.WebPlugin {
|
|
|
231
231
|
Gleap$1.setDisableInAppNotifications((_a = options.disableInAppNotifications) !== null && _a !== void 0 ? _a : false);
|
|
232
232
|
return { inAppNotificationsDisabled: true };
|
|
233
233
|
}
|
|
234
|
+
async setDisableEnvData(options) {
|
|
235
|
+
var _a;
|
|
236
|
+
Gleap$1.setDisableEnvData((_a = options.disableEnvData) !== null && _a !== void 0 ? _a : false);
|
|
237
|
+
return { envDataDisabled: true };
|
|
238
|
+
}
|
|
234
239
|
async identify(options) {
|
|
235
240
|
var userData = {
|
|
236
241
|
name: options.name,
|
|
@@ -264,6 +269,10 @@ class GleapWeb extends core.WebPlugin {
|
|
|
264
269
|
Gleap$1.setNetworkLogPropsToIgnore(options.propsToIgnore);
|
|
265
270
|
return { propsToIgnoreSet: true };
|
|
266
271
|
}
|
|
272
|
+
async setEnvDataPropsToIgnore(options) {
|
|
273
|
+
Gleap$1.setEnvDataPropsToIgnore(options.propsToIgnore);
|
|
274
|
+
return { envDataPropsToIgnoreSet: true };
|
|
275
|
+
}
|
|
267
276
|
async setTags(options) {
|
|
268
277
|
Gleap$1.setTags(options.tags);
|
|
269
278
|
return { tagsSet: true };
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Gleap = registerPlugin('Gleap', {\n web: () => import('./web').then(m => new m.GleapWeb()),\n});\nconst registeredAgentTools = {};\nlet agentToolListenerAttached = false;\n/**\n * Registers the handler for a Frontend tool defined on your AI agent in the\n * Gleap dashboard. The agent calls the handler with the configured parameters\n * and waits for the returned result (string or object, which gets\n * stringified).\n */\nconst registerAgentTool = async (name, handler) => {\n if (!name || typeof handler !== 'function') {\n return;\n }\n registeredAgentTools[name] = handler;\n if (!agentToolListenerAttached) {\n agentToolListenerAttached = true;\n await Gleap.addListener('agentToolExecution', async (data) => {\n var _a;\n try {\n const { executionId, name: toolName, params } = data !== null && data !== void 0 ? data : {};\n if (!executionId || !toolName) {\n return;\n }\n let result;\n const toolHandler = registeredAgentTools[toolName];\n if (!toolHandler) {\n result = `No handler registered for tool '${toolName}' in the app. Register one via Gleap.registerAgentTool('${toolName}', handler).`;\n }\n else {\n try {\n const handlerResult = await toolHandler(params !== null && params !== void 0 ? params : {});\n result =\n typeof handlerResult === 'string'\n ? handlerResult\n : JSON.stringify(handlerResult !== null && handlerResult !== void 0 ? handlerResult : '');\n if (!result) {\n result = 'The action completed without returning a result.';\n }\n }\n catch (error) {\n result = `Tool execution failed: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : 'unknown error'}`;\n }\n }\n await Gleap.sendAgentToolResult({ executionId, result });\n }\n catch (exp) {\n // Ignore.\n }\n });\n }\n await Gleap.registerAgentTool({ name });\n};\nexport * from './definitions';\nexport { Gleap, registerAgentTool };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\nexport class GleapWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.pendingAgentToolExecutions = {};\n }\n async initialize(options) {\n if (GleapWeb.initialized) {\n return { initialized: true };\n }\n Gleap.initialize(options.API_KEY);\n GleapWeb.initialized = true;\n this.registerCallbackListeners();\n return { initialized: true };\n }\n async setRegion(options) {\n if (!(options === null || options === void 0 ? void 0 : options.region)) {\n throw new Error('No region provided');\n }\n Gleap.setRegion(options.region);\n return { region: options.region };\n }\n async setApiUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setApiUrl(options.url);\n return { url: options.url };\n }\n async setWSApiUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setWSApiUrl(options.url);\n return { url: options.url };\n }\n async setRealtimeHost(options) {\n if (!(options === null || options === void 0 ? void 0 : options.host)) {\n throw new Error('No host provided');\n }\n Gleap.setRealtimeHost(options.host);\n return { host: options.host };\n }\n async setFrameUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setFrameUrl(options.url);\n return { url: options.url };\n }\n async setBannerUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setBannerUrl(options.url);\n return { url: options.url };\n }\n async setModalUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setModalUrl(options.url);\n return { url: options.url };\n }\n registerCallbackListeners() {\n Gleap.on('open', () => {\n this.notifyCallbacks('open', {});\n });\n Gleap.on('initialized', () => {\n this.notifyCallbacks('initialized', {});\n });\n Gleap.on('close', () => {\n this.notifyCallbacks('close', {});\n });\n Gleap.on('feedback-sent', formData => {\n this.notifyCallbacks('feedback-sent', formData);\n });\n Gleap.on('outbound-sent', formData => {\n this.notifyCallbacks('outbound-sent', formData);\n });\n Gleap.on('tool-execution', toolExecution => {\n this.notifyCallbacks('tool-execution', toolExecution);\n });\n Gleap.on('flow-started', flow => {\n this.notifyCallbacks('flow-started', flow);\n });\n Gleap.on('error-while-sending', () => {\n this.notifyCallbacks('error-while-sending', {});\n });\n Gleap.on('unregister-pushmessage-group', groupName => {\n this.notifyCallbacks('unregister-pushmessage-group', groupName);\n });\n Gleap.on('register-pushmessage-group', groupName => {\n this.notifyCallbacks('register-pushmessage-group', groupName);\n });\n Gleap.on('unread-count-changed', groupName => {\n this.notifyCallbacks('notification-count-updated', groupName);\n });\n Gleap.registerCustomAction(customAction => {\n this.notifyCallbacks('custom-action-called', customAction);\n });\n }\n async registerAgentTool(options) {\n const gleapSdk = Gleap;\n if (typeof gleapSdk.registerAgentTool !== 'function') {\n console.warn('Gleap: registerAgentTool requires a newer version of the Gleap JS SDK.');\n return;\n }\n gleapSdk.registerAgentTool(options.name, (params) => new Promise(resolve => {\n const executionId = `web-${++GleapWeb.agentToolExecutionCounter}`;\n this.pendingAgentToolExecutions[executionId] = resolve;\n this.notifyListeners('agentToolExecution', {\n executionId,\n name: options.name,\n params: params !== null && params !== void 0 ? params : {},\n });\n }));\n }\n async sendAgentToolResult(options) {\n const resolve = this.pendingAgentToolExecutions[options.executionId];\n if (resolve) {\n delete this.pendingAgentToolExecutions[options.executionId];\n resolve(options.result);\n }\n }\n async setTicketAttribute(options) {\n Gleap.setTicketAttribute(options.key, options.value);\n return { setTicketAttribute: true };\n }\n async unsetTicketAttribute(options) {\n Gleap.unsetTicketAttribute(options.key);\n return { unsetTicketAttribute: true };\n }\n async clearTicketAttributes() {\n Gleap.clearTicketAttributes();\n return { clearTicketAttributes: true };\n }\n notifyCallbacks(event, data) {\n if (!GleapWeb.callbacks) {\n return;\n }\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId]({\n name: event,\n data,\n });\n }\n }\n async startClassicForm(options) {\n var _a;\n Gleap.startClassicForm((_a = options.formId) !== null && _a !== void 0 ? _a : '', options.showBackButton);\n return { classicFormStarted: true };\n }\n async startConversation(options) {\n Gleap.startConversation(options.showBackButton);\n return { conversationStarted: true };\n }\n async openConversation(options) {\n Gleap.openConversations(options.showBackButton);\n return { conversationsOpened: true };\n }\n async showSurvey(options) {\n Gleap.showSurvey(options.surveyId, options.format);\n return { opened: true };\n }\n async showFeedbackButton(options) {\n Gleap.showFeedbackButton(options.show ? true : false);\n return { feedbackButtonShown: true };\n }\n async setDisableInAppNotifications(options) {\n var _a;\n Gleap.setDisableInAppNotifications((_a = options.disableInAppNotifications) !== null && _a !== void 0 ? _a : false);\n return { inAppNotificationsDisabled: true };\n }\n async identify(options) {\n var userData = {\n name: options.name,\n email: options.email,\n phone: options.phone,\n companyId: options.companyId,\n companyName: options.companyName,\n avatar: options.avatar,\n sla: options.sla,\n plan: options.plan,\n value: options.value,\n customData: options.customData,\n };\n if (options.userHash) {\n Gleap.identify(options.userId, userData, options.userHash);\n }\n else {\n Gleap.identify(options.userId, userData);\n }\n return { identify: true };\n }\n async updateContact(options) {\n Gleap.updateContact(options);\n return { identify: true };\n }\n async setNetworkLogsBlacklist(options) {\n Gleap.setNetworkLogsBlacklist(options.blacklist);\n return { blacklistSet: true };\n }\n async setNetworkLogPropsToIgnore(options) {\n Gleap.setNetworkLogPropsToIgnore(options.propsToIgnore);\n return { propsToIgnoreSet: true };\n }\n async setTags(options) {\n Gleap.setTags(options.tags);\n return { tagsSet: true };\n }\n async clearIdentity() {\n Gleap.clearIdentity();\n return { clearIdentity: true };\n }\n async getIdentity() {\n return { identity: Gleap.getIdentity() };\n }\n async isUserIdentified() {\n return { isUserIdentified: Gleap.isUserIdentified() };\n }\n async attachCustomData(options) {\n Gleap.attachCustomData(options.data);\n return { attachedCustomData: true };\n }\n async setCustomData(options) {\n Gleap.setCustomData(options.key, options.value);\n return { setCustomData: true };\n }\n async removeCustomData(options) {\n Gleap.removeCustomData(options.key);\n return { removedCustomData: true };\n }\n async clearCustomData() {\n Gleap.clearCustomData();\n return { clearedCustomData: true };\n }\n async trackEvent(options) {\n Gleap.trackEvent(options.name, options.data);\n return { loggedEvent: true };\n }\n async trackPage(options) {\n Gleap.trackEvent('pageView', {\n page: options.pageName,\n });\n return { trackedPage: true };\n }\n async startFeedbackFlow(options) {\n var _a;\n if (!options.feedbackFlow) {\n }\n Gleap.startFeedbackFlow((_a = options.feedbackFlow) !== null && _a !== void 0 ? _a : 'bugreporting', options.showBackButton);\n return { startedFeedbackFlow: true };\n }\n async startBot(options) {\n var _a;\n if (!options.botId) {\n }\n Gleap.startBot((_a = options.botId) !== null && _a !== void 0 ? _a : '', options.showBackButton);\n return { startedBot: true };\n }\n async setLanguage(options) {\n Gleap.setLanguage(options.languageCode);\n return { setLanguage: options.languageCode };\n }\n async log(options) {\n Gleap.log(options.message, options.logLevel);\n return { logged: true };\n }\n async setEventCallback(callback) {\n var callbackId = this.makeid(10);\n GleapWeb.callbacks[callbackId] = callback;\n return callbackId;\n }\n async sendSilentCrashReport(options) {\n Gleap.sendSilentCrashReport(options.description, options.severity, options.dataExclusion);\n return { sentSilentBugReport: true };\n }\n async open() {\n Gleap.open();\n return { openedWidget: true };\n }\n async openFeatureRequests(options) {\n Gleap.openFeatureRequests(options.showBackButton);\n return { openedFeatureRequests: true };\n }\n async openNews(options) {\n Gleap.openNews(options.showBackButton);\n return { openedNews: true };\n }\n async openNewsArticle(options) {\n Gleap.openNewsArticle(options.articleId, options.showBackButton);\n return { opened: true };\n }\n async openHelpCenter(options) {\n Gleap.openHelpCenter(options.showBackButton);\n return { opened: true };\n }\n async openHelpCenterArticle(options) {\n Gleap.openHelpCenterArticle(options.articleId, options.showBackButton);\n return { opened: true };\n }\n async askAI(options) {\n Gleap.askAI(options.question, options.showBackButton);\n return { opened: true };\n }\n async openHelpCenterCollection(options) {\n Gleap.openHelpCenterCollection(options.collectionId, options.showBackButton);\n return { opened: true };\n }\n async searchHelpCenter(options) {\n Gleap.searchHelpCenter(options.term, options.showBackButton);\n return { opened: true };\n }\n async close() {\n Gleap.close();\n return { closedWidget: true };\n }\n async isOpened() {\n return { isOpened: Gleap.isOpened() };\n }\n async disableConsoleLogOverwrite() {\n Gleap.disableConsoleLogOverwrite();\n return { consoleLogDisabled: true };\n }\n async enableDebugConsoleLog() {\n return { debugConsoleLogEnabled: true };\n }\n async preFillForm(options) {\n Gleap.preFillForm(options.data);\n return { preFilledForm: true };\n }\n async addAttachment(_options) {\n throw this.unavailable('addAttachment not available for browsers');\n }\n async removeAllAttachments() {\n throw this.unavailable('removeAllAttachments not available for browsers');\n }\n async setNotificationContainerOffset(_options) {\n return { notificationContainerOffsetSet: true };\n }\n makeid(length) {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n }\n}\nGleapWeb.callbacks = {};\nGleapWeb.initialized = false;\nGleapWeb.agentToolExecutionCounter = 0;\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","Gleap"],"mappings":";;;;;AACK,MAAC,KAAK,GAAGA,mBAAc,CAAC,OAAO,EAAE;AACtC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC1D,CAAC;AACD,MAAM,oBAAoB,GAAG,EAAE;AAC/B,IAAI,yBAAyB,GAAG,KAAK;AACrC;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,iBAAiB,GAAG,OAAO,IAAI,EAAE,OAAO,KAAK;AACnD,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;AAChD,QAAQ;AACR,IAAI;AACJ,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAAG,OAAO;AACxC,IAAI,IAAI,CAAC,yBAAyB,EAAE;AACpC,QAAQ,yBAAyB,GAAG,IAAI;AACxC,QAAQ,MAAM,KAAK,CAAC,WAAW,CAAC,oBAAoB,EAAE,OAAO,IAAI,KAAK;AACtE,YAAY,I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leap = registerPlugin('Gleap', {\n web: () => import('./web').then(m => new m.GleapWeb()),\n});\nconst registeredAgentTools = {};\nlet agentToolListenerAttached = false;\n/**\n * Registers the handler for a Frontend tool defined on your AI agent in the\n * Gleap dashboard. The agent calls the handler with the configured parameters\n * and waits for the returned result (string or object, which gets\n * stringified).\n */\nconst registerAgentTool = async (name, handler) => {\n if (!name || typeof handler !== 'function') {\n return;\n }\n registeredAgentTools[name] = handler;\n if (!agentToolListenerAttached) {\n agentToolListenerAttached = true;\n await Gleap.addListener('agentToolExecution', async (data) => {\n var _a;\n try {\n const { executionId, name: toolName, params } = data !== null && data !== void 0 ? data : {};\n if (!executionId || !toolName) {\n return;\n }\n let result;\n const toolHandler = registeredAgentTools[toolName];\n if (!toolHandler) {\n result = `No handler registered for tool '${toolName}' in the app. Register one via Gleap.registerAgentTool('${toolName}', handler).`;\n }\n else {\n try {\n const handlerResult = await toolHandler(params !== null && params !== void 0 ? params : {});\n result =\n typeof handlerResult === 'string'\n ? handlerResult\n : JSON.stringify(handlerResult !== null && handlerResult !== void 0 ? handlerResult : '');\n if (!result) {\n result = 'The action completed without returning a result.';\n }\n }\n catch (error) {\n result = `Tool execution failed: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : 'unknown error'}`;\n }\n }\n await Gleap.sendAgentToolResult({ executionId, result });\n }\n catch (exp) {\n // Ignore.\n }\n });\n }\n await Gleap.registerAgentTool({ name });\n};\nexport * from './definitions';\nexport { Gleap, registerAgentTool };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\nexport class GleapWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.pendingAgentToolExecutions = {};\n }\n async initialize(options) {\n if (GleapWeb.initialized) {\n return { initialized: true };\n }\n Gleap.initialize(options.API_KEY);\n GleapWeb.initialized = true;\n this.registerCallbackListeners();\n return { initialized: true };\n }\n async setRegion(options) {\n if (!(options === null || options === void 0 ? void 0 : options.region)) {\n throw new Error('No region provided');\n }\n Gleap.setRegion(options.region);\n return { region: options.region };\n }\n async setApiUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setApiUrl(options.url);\n return { url: options.url };\n }\n async setWSApiUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setWSApiUrl(options.url);\n return { url: options.url };\n }\n async setRealtimeHost(options) {\n if (!(options === null || options === void 0 ? void 0 : options.host)) {\n throw new Error('No host provided');\n }\n Gleap.setRealtimeHost(options.host);\n return { host: options.host };\n }\n async setFrameUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setFrameUrl(options.url);\n return { url: options.url };\n }\n async setBannerUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setBannerUrl(options.url);\n return { url: options.url };\n }\n async setModalUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setModalUrl(options.url);\n return { url: options.url };\n }\n registerCallbackListeners() {\n Gleap.on('open', () => {\n this.notifyCallbacks('open', {});\n });\n Gleap.on('initialized', () => {\n this.notifyCallbacks('initialized', {});\n });\n Gleap.on('close', () => {\n this.notifyCallbacks('close', {});\n });\n Gleap.on('feedback-sent', formData => {\n this.notifyCallbacks('feedback-sent', formData);\n });\n Gleap.on('outbound-sent', formData => {\n this.notifyCallbacks('outbound-sent', formData);\n });\n Gleap.on('tool-execution', toolExecution => {\n this.notifyCallbacks('tool-execution', toolExecution);\n });\n Gleap.on('flow-started', flow => {\n this.notifyCallbacks('flow-started', flow);\n });\n Gleap.on('error-while-sending', () => {\n this.notifyCallbacks('error-while-sending', {});\n });\n Gleap.on('unregister-pushmessage-group', groupName => {\n this.notifyCallbacks('unregister-pushmessage-group', groupName);\n });\n Gleap.on('register-pushmessage-group', groupName => {\n this.notifyCallbacks('register-pushmessage-group', groupName);\n });\n Gleap.on('unread-count-changed', groupName => {\n this.notifyCallbacks('notification-count-updated', groupName);\n });\n Gleap.registerCustomAction(customAction => {\n this.notifyCallbacks('custom-action-called', customAction);\n });\n }\n async registerAgentTool(options) {\n const gleapSdk = Gleap;\n if (typeof gleapSdk.registerAgentTool !== 'function') {\n console.warn('Gleap: registerAgentTool requires a newer version of the Gleap JS SDK.');\n return;\n }\n gleapSdk.registerAgentTool(options.name, (params) => new Promise(resolve => {\n const executionId = `web-${++GleapWeb.agentToolExecutionCounter}`;\n this.pendingAgentToolExecutions[executionId] = resolve;\n this.notifyListeners('agentToolExecution', {\n executionId,\n name: options.name,\n params: params !== null && params !== void 0 ? params : {},\n });\n }));\n }\n async sendAgentToolResult(options) {\n const resolve = this.pendingAgentToolExecutions[options.executionId];\n if (resolve) {\n delete this.pendingAgentToolExecutions[options.executionId];\n resolve(options.result);\n }\n }\n async setTicketAttribute(options) {\n Gleap.setTicketAttribute(options.key, options.value);\n return { setTicketAttribute: true };\n }\n async unsetTicketAttribute(options) {\n Gleap.unsetTicketAttribute(options.key);\n return { unsetTicketAttribute: true };\n }\n async clearTicketAttributes() {\n Gleap.clearTicketAttributes();\n return { clearTicketAttributes: true };\n }\n notifyCallbacks(event, data) {\n if (!GleapWeb.callbacks) {\n return;\n }\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId]({\n name: event,\n data,\n });\n }\n }\n async startClassicForm(options) {\n var _a;\n Gleap.startClassicForm((_a = options.formId) !== null && _a !== void 0 ? _a : '', options.showBackButton);\n return { classicFormStarted: true };\n }\n async startConversation(options) {\n Gleap.startConversation(options.showBackButton);\n return { conversationStarted: true };\n }\n async openConversation(options) {\n Gleap.openConversations(options.showBackButton);\n return { conversationsOpened: true };\n }\n async showSurvey(options) {\n Gleap.showSurvey(options.surveyId, options.format);\n return { opened: true };\n }\n async showFeedbackButton(options) {\n Gleap.showFeedbackButton(options.show ? true : false);\n return { feedbackButtonShown: true };\n }\n async setDisableInAppNotifications(options) {\n var _a;\n Gleap.setDisableInAppNotifications((_a = options.disableInAppNotifications) !== null && _a !== void 0 ? _a : false);\n return { inAppNotificationsDisabled: true };\n }\n async setDisableEnvData(options) {\n var _a;\n Gleap.setDisableEnvData((_a = options.disableEnvData) !== null && _a !== void 0 ? _a : false);\n return { envDataDisabled: true };\n }\n async identify(options) {\n var userData = {\n name: options.name,\n email: options.email,\n phone: options.phone,\n companyId: options.companyId,\n companyName: options.companyName,\n avatar: options.avatar,\n sla: options.sla,\n plan: options.plan,\n value: options.value,\n customData: options.customData,\n };\n if (options.userHash) {\n Gleap.identify(options.userId, userData, options.userHash);\n }\n else {\n Gleap.identify(options.userId, userData);\n }\n return { identify: true };\n }\n async updateContact(options) {\n Gleap.updateContact(options);\n return { identify: true };\n }\n async setNetworkLogsBlacklist(options) {\n Gleap.setNetworkLogsBlacklist(options.blacklist);\n return { blacklistSet: true };\n }\n async setNetworkLogPropsToIgnore(options) {\n Gleap.setNetworkLogPropsToIgnore(options.propsToIgnore);\n return { propsToIgnoreSet: true };\n }\n async setEnvDataPropsToIgnore(options) {\n Gleap.setEnvDataPropsToIgnore(options.propsToIgnore);\n return { envDataPropsToIgnoreSet: true };\n }\n async setTags(options) {\n Gleap.setTags(options.tags);\n return { tagsSet: true };\n }\n async clearIdentity() {\n Gleap.clearIdentity();\n return { clearIdentity: true };\n }\n async getIdentity() {\n return { identity: Gleap.getIdentity() };\n }\n async isUserIdentified() {\n return { isUserIdentified: Gleap.isUserIdentified() };\n }\n async attachCustomData(options) {\n Gleap.attachCustomData(options.data);\n return { attachedCustomData: true };\n }\n async setCustomData(options) {\n Gleap.setCustomData(options.key, options.value);\n return { setCustomData: true };\n }\n async removeCustomData(options) {\n Gleap.removeCustomData(options.key);\n return { removedCustomData: true };\n }\n async clearCustomData() {\n Gleap.clearCustomData();\n return { clearedCustomData: true };\n }\n async trackEvent(options) {\n Gleap.trackEvent(options.name, options.data);\n return { loggedEvent: true };\n }\n async trackPage(options) {\n Gleap.trackEvent('pageView', {\n page: options.pageName,\n });\n return { trackedPage: true };\n }\n async startFeedbackFlow(options) {\n var _a;\n if (!options.feedbackFlow) {\n }\n Gleap.startFeedbackFlow((_a = options.feedbackFlow) !== null && _a !== void 0 ? _a : 'bugreporting', options.showBackButton);\n return { startedFeedbackFlow: true };\n }\n async startBot(options) {\n var _a;\n if (!options.botId) {\n }\n Gleap.startBot((_a = options.botId) !== null && _a !== void 0 ? _a : '', options.showBackButton);\n return { startedBot: true };\n }\n async setLanguage(options) {\n Gleap.setLanguage(options.languageCode);\n return { setLanguage: options.languageCode };\n }\n async log(options) {\n Gleap.log(options.message, options.logLevel);\n return { logged: true };\n }\n async setEventCallback(callback) {\n var callbackId = this.makeid(10);\n GleapWeb.callbacks[callbackId] = callback;\n return callbackId;\n }\n async sendSilentCrashReport(options) {\n Gleap.sendSilentCrashReport(options.description, options.severity, options.dataExclusion);\n return { sentSilentBugReport: true };\n }\n async open() {\n Gleap.open();\n return { openedWidget: true };\n }\n async openFeatureRequests(options) {\n Gleap.openFeatureRequests(options.showBackButton);\n return { openedFeatureRequests: true };\n }\n async openNews(options) {\n Gleap.openNews(options.showBackButton);\n return { openedNews: true };\n }\n async openNewsArticle(options) {\n Gleap.openNewsArticle(options.articleId, options.showBackButton);\n return { opened: true };\n }\n async openHelpCenter(options) {\n Gleap.openHelpCenter(options.showBackButton);\n return { opened: true };\n }\n async openHelpCenterArticle(options) {\n Gleap.openHelpCenterArticle(options.articleId, options.showBackButton);\n return { opened: true };\n }\n async askAI(options) {\n Gleap.askAI(options.question, options.showBackButton);\n return { opened: true };\n }\n async openHelpCenterCollection(options) {\n Gleap.openHelpCenterCollection(options.collectionId, options.showBackButton);\n return { opened: true };\n }\n async searchHelpCenter(options) {\n Gleap.searchHelpCenter(options.term, options.showBackButton);\n return { opened: true };\n }\n async close() {\n Gleap.close();\n return { closedWidget: true };\n }\n async isOpened() {\n return { isOpened: Gleap.isOpened() };\n }\n async disableConsoleLogOverwrite() {\n Gleap.disableConsoleLogOverwrite();\n return { consoleLogDisabled: true };\n }\n async enableDebugConsoleLog() {\n return { debugConsoleLogEnabled: true };\n }\n async preFillForm(options) {\n Gleap.preFillForm(options.data);\n return { preFilledForm: true };\n }\n async addAttachment(_options) {\n throw this.unavailable('addAttachment not available for browsers');\n }\n async removeAllAttachments() {\n throw this.unavailable('removeAllAttachments not available for browsers');\n }\n async setNotificationContainerOffset(_options) {\n return { notificationContainerOffsetSet: true };\n }\n makeid(length) {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n }\n}\nGleapWeb.callbacks = {};\nGleapWeb.initialized = false;\nGleapWeb.agentToolExecutionCounter = 0;\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","Gleap"],"mappings":";;;;;AACK,MAAC,KAAK,GAAGA,mBAAc,CAAC,OAAO,EAAE;AACtC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC1D,CAAC;AACD,MAAM,oBAAoB,GAAG,EAAE;AAC/B,IAAI,yBAAyB,GAAG,KAAK;AACrC;AACA;AACA;AACA;AACA;AACA;AACK,MAAC,iBAAiB,GAAG,OAAO,IAAI,EAAE,OAAO,KAAK;AACnD,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;AAChD,QAAQ;AACR,IAAI;AACJ,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAAG,OAAO;AACxC,IAAI,IAAI,CAAC,yBAAyB,EAAE;AACpC,QAAQ,yBAAyB,GAAG,IAAI;AACxC,QAAQ,MAAM,KAAK,CAAC,WAAW,CAAC,oBAAoB,EAAE,OAAO,IA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C,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;AACzC,YAAY,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC;AACrF,QAAQ;AACR,QAAQ,OAAO,MAAM;AACrB,IAAI;AACJ;AACA,QAAQ,CAAC,SAAS,GAAG,EAAE;AACvB,QAAQ,CAAC,WAAW,GAAG,KAAK;AAC5B,QAAQ,CAAC,yBAAyB,GAAG,CAAC;;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -229,6 +229,11 @@ var capacitorGleap = (function (exports, core, Gleap$1) {
|
|
|
229
229
|
Gleap$1.setDisableInAppNotifications((_a = options.disableInAppNotifications) !== null && _a !== void 0 ? _a : false);
|
|
230
230
|
return { inAppNotificationsDisabled: true };
|
|
231
231
|
}
|
|
232
|
+
async setDisableEnvData(options) {
|
|
233
|
+
var _a;
|
|
234
|
+
Gleap$1.setDisableEnvData((_a = options.disableEnvData) !== null && _a !== void 0 ? _a : false);
|
|
235
|
+
return { envDataDisabled: true };
|
|
236
|
+
}
|
|
232
237
|
async identify(options) {
|
|
233
238
|
var userData = {
|
|
234
239
|
name: options.name,
|
|
@@ -262,6 +267,10 @@ var capacitorGleap = (function (exports, core, Gleap$1) {
|
|
|
262
267
|
Gleap$1.setNetworkLogPropsToIgnore(options.propsToIgnore);
|
|
263
268
|
return { propsToIgnoreSet: true };
|
|
264
269
|
}
|
|
270
|
+
async setEnvDataPropsToIgnore(options) {
|
|
271
|
+
Gleap$1.setEnvDataPropsToIgnore(options.propsToIgnore);
|
|
272
|
+
return { envDataPropsToIgnoreSet: true };
|
|
273
|
+
}
|
|
265
274
|
async setTags(options) {
|
|
266
275
|
Gleap$1.setTags(options.tags);
|
|
267
276
|
return { tagsSet: true };
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Gleap = registerPlugin('Gleap', {\n web: () => import('./web').then(m => new m.GleapWeb()),\n});\nconst registeredAgentTools = {};\nlet agentToolListenerAttached = false;\n/**\n * Registers the handler for a Frontend tool defined on your AI agent in the\n * Gleap dashboard. The agent calls the handler with the configured parameters\n * and waits for the returned result (string or object, which gets\n * stringified).\n */\nconst registerAgentTool = async (name, handler) => {\n if (!name || typeof handler !== 'function') {\n return;\n }\n registeredAgentTools[name] = handler;\n if (!agentToolListenerAttached) {\n agentToolListenerAttached = true;\n await Gleap.addListener('agentToolExecution', async (data) => {\n var _a;\n try {\n const { executionId, name: toolName, params } = data !== null && data !== void 0 ? data : {};\n if (!executionId || !toolName) {\n return;\n }\n let result;\n const toolHandler = registeredAgentTools[toolName];\n if (!toolHandler) {\n result = `No handler registered for tool '${toolName}' in the app. Register one via Gleap.registerAgentTool('${toolName}', handler).`;\n }\n else {\n try {\n const handlerResult = await toolHandler(params !== null && params !== void 0 ? params : {});\n result =\n typeof handlerResult === 'string'\n ? handlerResult\n : JSON.stringify(handlerResult !== null && handlerResult !== void 0 ? handlerResult : '');\n if (!result) {\n result = 'The action completed without returning a result.';\n }\n }\n catch (error) {\n result = `Tool execution failed: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : 'unknown error'}`;\n }\n }\n await Gleap.sendAgentToolResult({ executionId, result });\n }\n catch (exp) {\n // Ignore.\n }\n });\n }\n await Gleap.registerAgentTool({ name });\n};\nexport * from './definitions';\nexport { Gleap, registerAgentTool };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\nexport class GleapWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.pendingAgentToolExecutions = {};\n }\n async initialize(options) {\n if (GleapWeb.initialized) {\n return { initialized: true };\n }\n Gleap.initialize(options.API_KEY);\n GleapWeb.initialized = true;\n this.registerCallbackListeners();\n return { initialized: true };\n }\n async setRegion(options) {\n if (!(options === null || options === void 0 ? void 0 : options.region)) {\n throw new Error('No region provided');\n }\n Gleap.setRegion(options.region);\n return { region: options.region };\n }\n async setApiUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setApiUrl(options.url);\n return { url: options.url };\n }\n async setWSApiUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setWSApiUrl(options.url);\n return { url: options.url };\n }\n async setRealtimeHost(options) {\n if (!(options === null || options === void 0 ? void 0 : options.host)) {\n throw new Error('No host provided');\n }\n Gleap.setRealtimeHost(options.host);\n return { host: options.host };\n }\n async setFrameUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setFrameUrl(options.url);\n return { url: options.url };\n }\n async setBannerUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setBannerUrl(options.url);\n return { url: options.url };\n }\n async setModalUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setModalUrl(options.url);\n return { url: options.url };\n }\n registerCallbackListeners() {\n Gleap.on('open', () => {\n this.notifyCallbacks('open', {});\n });\n Gleap.on('initialized', () => {\n this.notifyCallbacks('initialized', {});\n });\n Gleap.on('close', () => {\n this.notifyCallbacks('close', {});\n });\n Gleap.on('feedback-sent', formData => {\n this.notifyCallbacks('feedback-sent', formData);\n });\n Gleap.on('outbound-sent', formData => {\n this.notifyCallbacks('outbound-sent', formData);\n });\n Gleap.on('tool-execution', toolExecution => {\n this.notifyCallbacks('tool-execution', toolExecution);\n });\n Gleap.on('flow-started', flow => {\n this.notifyCallbacks('flow-started', flow);\n });\n Gleap.on('error-while-sending', () => {\n this.notifyCallbacks('error-while-sending', {});\n });\n Gleap.on('unregister-pushmessage-group', groupName => {\n this.notifyCallbacks('unregister-pushmessage-group', groupName);\n });\n Gleap.on('register-pushmessage-group', groupName => {\n this.notifyCallbacks('register-pushmessage-group', groupName);\n });\n Gleap.on('unread-count-changed', groupName => {\n this.notifyCallbacks('notification-count-updated', groupName);\n });\n Gleap.registerCustomAction(customAction => {\n this.notifyCallbacks('custom-action-called', customAction);\n });\n }\n async registerAgentTool(options) {\n const gleapSdk = Gleap;\n if (typeof gleapSdk.registerAgentTool !== 'function') {\n console.warn('Gleap: registerAgentTool requires a newer version of the Gleap JS SDK.');\n return;\n }\n gleapSdk.registerAgentTool(options.name, (params) => new Promise(resolve => {\n const executionId = `web-${++GleapWeb.agentToolExecutionCounter}`;\n this.pendingAgentToolExecutions[executionId] = resolve;\n this.notifyListeners('agentToolExecution', {\n executionId,\n name: options.name,\n params: params !== null && params !== void 0 ? params : {},\n });\n }));\n }\n async sendAgentToolResult(options) {\n const resolve = this.pendingAgentToolExecutions[options.executionId];\n if (resolve) {\n delete this.pendingAgentToolExecutions[options.executionId];\n resolve(options.result);\n }\n }\n async setTicketAttribute(options) {\n Gleap.setTicketAttribute(options.key, options.value);\n return { setTicketAttribute: true };\n }\n async unsetTicketAttribute(options) {\n Gleap.unsetTicketAttribute(options.key);\n return { unsetTicketAttribute: true };\n }\n async clearTicketAttributes() {\n Gleap.clearTicketAttributes();\n return { clearTicketAttributes: true };\n }\n notifyCallbacks(event, data) {\n if (!GleapWeb.callbacks) {\n return;\n }\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId]({\n name: event,\n data,\n });\n }\n }\n async startClassicForm(options) {\n var _a;\n Gleap.startClassicForm((_a = options.formId) !== null && _a !== void 0 ? _a : '', options.showBackButton);\n return { classicFormStarted: true };\n }\n async startConversation(options) {\n Gleap.startConversation(options.showBackButton);\n return { conversationStarted: true };\n }\n async openConversation(options) {\n Gleap.openConversations(options.showBackButton);\n return { conversationsOpened: true };\n }\n async showSurvey(options) {\n Gleap.showSurvey(options.surveyId, options.format);\n return { opened: true };\n }\n async showFeedbackButton(options) {\n Gleap.showFeedbackButton(options.show ? true : false);\n return { feedbackButtonShown: true };\n }\n async setDisableInAppNotifications(options) {\n var _a;\n Gleap.setDisableInAppNotifications((_a = options.disableInAppNotifications) !== null && _a !== void 0 ? _a : false);\n return { inAppNotificationsDisabled: true };\n }\n async identify(options) {\n var userData = {\n name: options.name,\n email: options.email,\n phone: options.phone,\n companyId: options.companyId,\n companyName: options.companyName,\n avatar: options.avatar,\n sla: options.sla,\n plan: options.plan,\n value: options.value,\n customData: options.customData,\n };\n if (options.userHash) {\n Gleap.identify(options.userId, userData, options.userHash);\n }\n else {\n Gleap.identify(options.userId, userData);\n }\n return { identify: true };\n }\n async updateContact(options) {\n Gleap.updateContact(options);\n return { identify: true };\n }\n async setNetworkLogsBlacklist(options) {\n Gleap.setNetworkLogsBlacklist(options.blacklist);\n return { blacklistSet: true };\n }\n async setNetworkLogPropsToIgnore(options) {\n Gleap.setNetworkLogPropsToIgnore(options.propsToIgnore);\n return { propsToIgnoreSet: true };\n }\n async setTags(options) {\n Gleap.setTags(options.tags);\n return { tagsSet: true };\n }\n async clearIdentity() {\n Gleap.clearIdentity();\n return { clearIdentity: true };\n }\n async getIdentity() {\n return { identity: Gleap.getIdentity() };\n }\n async isUserIdentified() {\n return { isUserIdentified: Gleap.isUserIdentified() };\n }\n async attachCustomData(options) {\n Gleap.attachCustomData(options.data);\n return { attachedCustomData: true };\n }\n async setCustomData(options) {\n Gleap.setCustomData(options.key, options.value);\n return { setCustomData: true };\n }\n async removeCustomData(options) {\n Gleap.removeCustomData(options.key);\n return { removedCustomData: true };\n }\n async clearCustomData() {\n Gleap.clearCustomData();\n return { clearedCustomData: true };\n }\n async trackEvent(options) {\n Gleap.trackEvent(options.name, options.data);\n return { loggedEvent: true };\n }\n async trackPage(options) {\n Gleap.trackEvent('pageView', {\n page: options.pageName,\n });\n return { trackedPage: true };\n }\n async startFeedbackFlow(options) {\n var _a;\n if (!options.feedbackFlow) {\n }\n Gleap.startFeedbackFlow((_a = options.feedbackFlow) !== null && _a !== void 0 ? _a : 'bugreporting', options.showBackButton);\n return { startedFeedbackFlow: true };\n }\n async startBot(options) {\n var _a;\n if (!options.botId) {\n }\n Gleap.startBot((_a = options.botId) !== null && _a !== void 0 ? _a : '', options.showBackButton);\n return { startedBot: true };\n }\n async setLanguage(options) {\n Gleap.setLanguage(options.languageCode);\n return { setLanguage: options.languageCode };\n }\n async log(options) {\n Gleap.log(options.message, options.logLevel);\n return { logged: true };\n }\n async setEventCallback(callback) {\n var callbackId = this.makeid(10);\n GleapWeb.callbacks[callbackId] = callback;\n return callbackId;\n }\n async sendSilentCrashReport(options) {\n Gleap.sendSilentCrashReport(options.description, options.severity, options.dataExclusion);\n return { sentSilentBugReport: true };\n }\n async open() {\n Gleap.open();\n return { openedWidget: true };\n }\n async openFeatureRequests(options) {\n Gleap.openFeatureRequests(options.showBackButton);\n return { openedFeatureRequests: true };\n }\n async openNews(options) {\n Gleap.openNews(options.showBackButton);\n return { openedNews: true };\n }\n async openNewsArticle(options) {\n Gleap.openNewsArticle(options.articleId, options.showBackButton);\n return { opened: true };\n }\n async openHelpCenter(options) {\n Gleap.openHelpCenter(options.showBackButton);\n return { opened: true };\n }\n async openHelpCenterArticle(options) {\n Gleap.openHelpCenterArticle(options.articleId, options.showBackButton);\n return { opened: true };\n }\n async askAI(options) {\n Gleap.askAI(options.question, options.showBackButton);\n return { opened: true };\n }\n async openHelpCenterCollection(options) {\n Gleap.openHelpCenterCollection(options.collectionId, options.showBackButton);\n return { opened: true };\n }\n async searchHelpCenter(options) {\n Gleap.searchHelpCenter(options.term, options.showBackButton);\n return { opened: true };\n }\n async close() {\n Gleap.close();\n return { closedWidget: true };\n }\n async isOpened() {\n return { isOpened: Gleap.isOpened() };\n }\n async disableConsoleLogOverwrite() {\n Gleap.disableConsoleLogOverwrite();\n return { consoleLogDisabled: true };\n }\n async enableDebugConsoleLog() {\n return { debugConsoleLogEnabled: true };\n }\n async preFillForm(options) {\n Gleap.preFillForm(options.data);\n return { preFilledForm: true };\n }\n async addAttachment(_options) {\n throw this.unavailable('addAttachment not available for browsers');\n }\n async removeAllAttachments() {\n throw this.unavailable('removeAllAttachments not available for browsers');\n }\n async setNotificationContainerOffset(_options) {\n return { notificationContainerOffsetSet: true };\n }\n makeid(length) {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n }\n}\nGleapWeb.callbacks = {};\nGleapWeb.initialized = false;\nGleapWeb.agentToolExecutionCounter = 0;\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","Gleap"],"mappings":";;;AACK,UAAC,KAAK,GAAGA,mBAAc,CAAC,OAAO,EAAE;IACtC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;IACD,MAAM,oBAAoB,GAAG,EAAE;IAC/B,IAAI,yBAAyB,GAAG,KAAK;IACrC;IACA;IACA;IACA;IACA;IACA;AACK,UAAC,iBAAiB,GAAG,OAAO,IAAI,EAAE,OAAO,KAAK;IACnD,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;IAChD,QAAQ;IACR,IAAI;IACJ,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAAG,OAAO;IACxC,IAAI,IAAI,CAAC,yBAAyB,EAAE;IACpC,QAAQ,yBAAyB,GAAG,IAAI;IACxC,QAAQ,MAAM,KAAK,CAAC,WAAW,CAAC,oBAAoB,EAAE,OAAO,IAAI,KAAK;IACtE,YAAY,IAAI,EAAE;IAClB,YAAY,IAAI;IAChB,gBAAgB,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,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W,CAAC,OAAO,EAAE;IAC/B,QAAQA,OAAK,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;IACvC,QAAQ,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE;IACtC,IAAI;IACJ,IAAI,MAAM,aAAa,CAAC,QAAQ,EAAE;IAClC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,0CAA0C,CAAC;IAC1E,IAAI;IACJ,IAAI,MAAM,oBAAoB,GAAG;IACjC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,iDAAiD,CAAC;IACjF,IAAI;IACJ,IAAI,MAAM,8BAA8B,CAAC,QAAQ,EAAE;IACnD,QAAQ,OAAO,EAAE,8BAA8B,EAAE,IAAI,EAAE;IACvD,IAAI;IACJ,IAAI,MAAM,CAAC,MAAM,EAAE;IACnB,QAAQ,IAAI,MAAM,GAAG,EAAE;IACvB,QAAQ,IAAI,UAAU,GAAG,gEAAgE;IACzF,QAAQ,IAAI,gBAAgB,GAAG,UAAU,CAAC,MAAM;IAChD,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;IACzC,YAAY,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC;IACrF,QAAQ;IACR,QAAQ,OAAO,MAAM;IACrB,IAAI;IACJ;IACA,QAAQ,CAAC,SAAS,GAAG,EAAE;IACvB,QAAQ,CAAC,WAAW,GAAG,KAAK;IAC5B,QAAQ,CAAC,yBAAyB,GAAG,CAAC;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Gleap = registerPlugin('Gleap', {\n web: () => import('./web').then(m => new m.GleapWeb()),\n});\nconst registeredAgentTools = {};\nlet agentToolListenerAttached = false;\n/**\n * Registers the handler for a Frontend tool defined on your AI agent in the\n * Gleap dashboard. The agent calls the handler with the configured parameters\n * and waits for the returned result (string or object, which gets\n * stringified).\n */\nconst registerAgentTool = async (name, handler) => {\n if (!name || typeof handler !== 'function') {\n return;\n }\n registeredAgentTools[name] = handler;\n if (!agentToolListenerAttached) {\n agentToolListenerAttached = true;\n await Gleap.addListener('agentToolExecution', async (data) => {\n var _a;\n try {\n const { executionId, name: toolName, params } = data !== null && data !== void 0 ? data : {};\n if (!executionId || !toolName) {\n return;\n }\n let result;\n const toolHandler = registeredAgentTools[toolName];\n if (!toolHandler) {\n result = `No handler registered for tool '${toolName}' in the app. Register one via Gleap.registerAgentTool('${toolName}', handler).`;\n }\n else {\n try {\n const handlerResult = await toolHandler(params !== null && params !== void 0 ? params : {});\n result =\n typeof handlerResult === 'string'\n ? handlerResult\n : JSON.stringify(handlerResult !== null && handlerResult !== void 0 ? handlerResult : '');\n if (!result) {\n result = 'The action completed without returning a result.';\n }\n }\n catch (error) {\n result = `Tool execution failed: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : 'unknown error'}`;\n }\n }\n await Gleap.sendAgentToolResult({ executionId, result });\n }\n catch (exp) {\n // Ignore.\n }\n });\n }\n await Gleap.registerAgentTool({ name });\n};\nexport * from './definitions';\nexport { Gleap, registerAgentTool };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\nexport class GleapWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.pendingAgentToolExecutions = {};\n }\n async initialize(options) {\n if (GleapWeb.initialized) {\n return { initialized: true };\n }\n Gleap.initialize(options.API_KEY);\n GleapWeb.initialized = true;\n this.registerCallbackListeners();\n return { initialized: true };\n }\n async setRegion(options) {\n if (!(options === null || options === void 0 ? void 0 : options.region)) {\n throw new Error('No region provided');\n }\n Gleap.setRegion(options.region);\n return { region: options.region };\n }\n async setApiUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setApiUrl(options.url);\n return { url: options.url };\n }\n async setWSApiUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setWSApiUrl(options.url);\n return { url: options.url };\n }\n async setRealtimeHost(options) {\n if (!(options === null || options === void 0 ? void 0 : options.host)) {\n throw new Error('No host provided');\n }\n Gleap.setRealtimeHost(options.host);\n return { host: options.host };\n }\n async setFrameUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setFrameUrl(options.url);\n return { url: options.url };\n }\n async setBannerUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setBannerUrl(options.url);\n return { url: options.url };\n }\n async setModalUrl(options) {\n if (!(options === null || options === void 0 ? void 0 : options.url)) {\n throw new Error('No url provided');\n }\n Gleap.setModalUrl(options.url);\n return { url: options.url };\n }\n registerCallbackListeners() {\n Gleap.on('open', () => {\n this.notifyCallbacks('open', {});\n });\n Gleap.on('initialized', () => {\n this.notifyCallbacks('initialized', {});\n });\n Gleap.on('close', () => {\n this.notifyCallbacks('close', {});\n });\n Gleap.on('feedback-sent', formData => {\n this.notifyCallbacks('feedback-sent', formData);\n });\n Gleap.on('outbound-sent', formData => {\n this.notifyCallbacks('outbound-sent', formData);\n });\n Gleap.on('tool-execution', toolExecution => {\n this.notifyCallbacks('tool-execution', toolExecution);\n });\n Gleap.on('flow-started', flow => {\n this.notifyCallbacks('flow-started', flow);\n });\n Gleap.on('error-while-sending', () => {\n this.notifyCallbacks('error-while-sending', {});\n });\n Gleap.on('unregister-pushmessage-group', groupName => {\n this.notifyCallbacks('unregister-pushmessage-group', groupName);\n });\n Gleap.on('register-pushmessage-group', groupName => {\n this.notifyCallbacks('register-pushmessage-group', groupName);\n });\n Gleap.on('unread-count-changed', groupName => {\n this.notifyCallbacks('notification-count-updated', groupName);\n });\n Gleap.registerCustomAction(customAction => {\n this.notifyCallbacks('custom-action-called', customAction);\n });\n }\n async registerAgentTool(options) {\n const gleapSdk = Gleap;\n if (typeof gleapSdk.registerAgentTool !== 'function') {\n console.warn('Gleap: registerAgentTool requires a newer version of the Gleap JS SDK.');\n return;\n }\n gleapSdk.registerAgentTool(options.name, (params) => new Promise(resolve => {\n const executionId = `web-${++GleapWeb.agentToolExecutionCounter}`;\n this.pendingAgentToolExecutions[executionId] = resolve;\n this.notifyListeners('agentToolExecution', {\n executionId,\n name: options.name,\n params: params !== null && params !== void 0 ? params : {},\n });\n }));\n }\n async sendAgentToolResult(options) {\n const resolve = this.pendingAgentToolExecutions[options.executionId];\n if (resolve) {\n delete this.pendingAgentToolExecutions[options.executionId];\n resolve(options.result);\n }\n }\n async setTicketAttribute(options) {\n Gleap.setTicketAttribute(options.key, options.value);\n return { setTicketAttribute: true };\n }\n async unsetTicketAttribute(options) {\n Gleap.unsetTicketAttribute(options.key);\n return { unsetTicketAttribute: true };\n }\n async clearTicketAttributes() {\n Gleap.clearTicketAttributes();\n return { clearTicketAttributes: true };\n }\n notifyCallbacks(event, data) {\n if (!GleapWeb.callbacks) {\n return;\n }\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId]({\n name: event,\n data,\n });\n }\n }\n async startClassicForm(options) {\n var _a;\n Gleap.startClassicForm((_a = options.formId) !== null && _a !== void 0 ? _a : '', options.showBackButton);\n return { classicFormStarted: true };\n }\n async startConversation(options) {\n Gleap.startConversation(options.showBackButton);\n return { conversationStarted: true };\n }\n async openConversation(options) {\n Gleap.openConversations(options.showBackButton);\n return { conversationsOpened: true };\n }\n async showSurvey(options) {\n Gleap.showSurvey(options.surveyId, options.format);\n return { opened: true };\n }\n async showFeedbackButton(options) {\n Gleap.showFeedbackButton(options.show ? true : false);\n return { feedbackButtonShown: true };\n }\n async setDisableInAppNotifications(options) {\n var _a;\n Gleap.setDisableInAppNotifications((_a = options.disableInAppNotifications) !== null && _a !== void 0 ? _a : false);\n return { inAppNotificationsDisabled: true };\n }\n async setDisableEnvData(options) {\n var _a;\n Gleap.setDisableEnvData((_a = options.disableEnvData) !== null && _a !== void 0 ? _a : false);\n return { envDataDisabled: true };\n }\n async identify(options) {\n var userData = {\n name: options.name,\n email: options.email,\n phone: options.phone,\n companyId: options.companyId,\n companyName: options.companyName,\n avatar: options.avatar,\n sla: options.sla,\n plan: options.plan,\n value: options.value,\n customData: options.customData,\n };\n if (options.userHash) {\n Gleap.identify(options.userId, userData, options.userHash);\n }\n else {\n Gleap.identify(options.userId, userData);\n }\n return { identify: true };\n }\n async updateContact(options) {\n Gleap.updateContact(options);\n return { identify: true };\n }\n async setNetworkLogsBlacklist(options) {\n Gleap.setNetworkLogsBlacklist(options.blacklist);\n return { blacklistSet: true };\n }\n async setNetworkLogPropsToIgnore(options) {\n Gleap.setNetworkLogPropsToIgnore(options.propsToIgnore);\n return { propsToIgnoreSet: true };\n }\n async setEnvDataPropsToIgnore(options) {\n Gleap.setEnvDataPropsToIgnore(options.propsToIgnore);\n return { envDataPropsToIgnoreSet: true };\n }\n async setTags(options) {\n Gleap.setTags(options.tags);\n return { tagsSet: true };\n }\n async clearIdentity() {\n Gleap.clearIdentity();\n return { clearIdentity: true };\n }\n async getIdentity() {\n return { identity: Gleap.getIdentity() };\n }\n async isUserIdentified() {\n return { isUserIdentified: Gleap.isUserIdentified() };\n }\n async attachCustomData(options) {\n Gleap.attachCustomData(options.data);\n return { attachedCustomData: true };\n }\n async setCustomData(options) {\n Gleap.setCustomData(options.key, options.value);\n return { setCustomData: true };\n }\n async removeCustomData(options) {\n Gleap.removeCustomData(options.key);\n return { removedCustomData: true };\n }\n async clearCustomData() {\n Gleap.clearCustomData();\n return { clearedCustomData: true };\n }\n async trackEvent(options) {\n Gleap.trackEvent(options.name, options.data);\n return { loggedEvent: true };\n }\n async trackPage(options) {\n Gleap.trackEvent('pageView', {\n page: options.pageName,\n });\n return { trackedPage: true };\n }\n async startFeedbackFlow(options) {\n var _a;\n if (!options.feedbackFlow) {\n }\n Gleap.startFeedbackFlow((_a = options.feedbackFlow) !== null && _a !== void 0 ? _a : 'bugreporting', options.showBackButton);\n return { startedFeedbackFlow: true };\n }\n async startBot(options) {\n var _a;\n if (!options.botId) {\n }\n Gleap.startBot((_a = options.botId) !== null && _a !== void 0 ? _a : '', options.showBackButton);\n return { startedBot: true };\n }\n async setLanguage(options) {\n Gleap.setLanguage(options.languageCode);\n return { setLanguage: options.languageCode };\n }\n async log(options) {\n Gleap.log(options.message, options.logLevel);\n return { logged: true };\n }\n async setEventCallback(callback) {\n var callbackId = this.makeid(10);\n GleapWeb.callbacks[callbackId] = callback;\n return callbackId;\n }\n async sendSilentCrashReport(options) {\n Gleap.sendSilentCrashReport(options.description, options.severity, options.dataExclusion);\n return { sentSilentBugReport: true };\n }\n async open() {\n Gleap.open();\n return { openedWidget: true };\n }\n async openFeatureRequests(options) {\n Gleap.openFeatureRequests(options.showBackButton);\n return { openedFeatureRequests: true };\n }\n async openNews(options) {\n Gleap.openNews(options.showBackButton);\n return { openedNews: true };\n }\n async openNewsArticle(options) {\n Gleap.openNewsArticle(options.articleId, options.showBackButton);\n return { opened: true };\n }\n async openHelpCenter(options) {\n Gleap.openHelpCenter(options.showBackButton);\n return { opened: true };\n }\n async openHelpCenterArticle(options) {\n Gleap.openHelpCenterArticle(options.articleId, options.showBackButton);\n return { opened: true };\n }\n async askAI(options) {\n Gleap.askAI(options.question, options.showBackButton);\n return { opened: true };\n }\n async openHelpCenterCollection(options) {\n Gleap.openHelpCenterCollection(options.collectionId, options.showBackButton);\n return { opened: true };\n }\n async searchHelpCenter(options) {\n Gleap.searchHelpCenter(options.term, options.showBackButton);\n return { opened: true };\n }\n async close() {\n Gleap.close();\n return { closedWidget: true };\n }\n async isOpened() {\n return { isOpened: Gleap.isOpened() };\n }\n async disableConsoleLogOverwrite() {\n Gleap.disableConsoleLogOverwrite();\n return { consoleLogDisabled: true };\n }\n async enableDebugConsoleLog() {\n return { debugConsoleLogEnabled: true };\n }\n async preFillForm(options) {\n Gleap.preFillForm(options.data);\n return { preFilledForm: true };\n }\n async addAttachment(_options) {\n throw this.unavailable('addAttachment not available for browsers');\n }\n async removeAllAttachments() {\n throw this.unavailable('removeAllAttachments not available for browsers');\n }\n async setNotificationContainerOffset(_options) {\n return { notificationContainerOffsetSet: true };\n }\n makeid(length) {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n }\n}\nGleapWeb.callbacks = {};\nGleapWeb.initialized = false;\nGleapWeb.agentToolExecutionCounter = 0;\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","Gleap"],"mappings":";;;AACK,UAAC,KAAK,GAAGA,mBAAc,CAAC,OAAO,EAAE;IACtC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC1D,CAAC;IACD,MAAM,oBAAoB,GAAG,EAAE;IAC/B,IAAI,yBAAyB,GAAG,KAAK;IACrC;IACA;IACA;IACA;IACA;IACA;AACK,UAAC,iBAAiB,GAAG,OAAO,IAAI,EAAE,OAAO,KAAK;IACnD,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;IAChD,QAAQ;IACR,IAAI;IACJ,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAAG,OAAO;IACxC,IAAI,IAAI,CAAC,yBAAyB,EAAE;IACpC,QAAQ,yBAAyB,GAAG,IAAI;IACxC,QAAQ,MAAM,KAAK,CAAC,WAAW,CAAC,oBAAoB,EAAE,OAAO,IAAI,KAAK;IACtE,YAAY,IAAI,EAAE;IAClB,YAAY,IAAI;IAChB,gBAAgB,MAAM,EAAE,WAAW,EAAE,IAAI,EA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MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC;IACrF,QAAQ;IACR,QAAQ,OAAO,MAAM;IACrB,IAAI;IACJ;IACA,QAAQ,CAAC,SAAS,GAAG,EAAE;IACvB,QAAQ,CAAC,WAAW,GAAG,KAAK;IAC5B,QAAQ,CAAC,yBAAyB,GAAG,CAAC;;;;;;;;;;;;;;;;"}
|
package/ios/Plugin/GleapPlugin.m
CHANGED
|
@@ -17,6 +17,7 @@ CAP_PLUGIN(GleapPlugin, "Gleap",
|
|
|
17
17
|
CAP_PLUGIN_METHOD(clearIdentity, CAPPluginReturnPromise);
|
|
18
18
|
CAP_PLUGIN_METHOD(setNetworkLogsBlacklist, CAPPluginReturnPromise);
|
|
19
19
|
CAP_PLUGIN_METHOD(setNetworkLogPropsToIgnore, CAPPluginReturnPromise);
|
|
20
|
+
CAP_PLUGIN_METHOD(setEnvDataPropsToIgnore, CAPPluginReturnPromise);
|
|
20
21
|
CAP_PLUGIN_METHOD(attachCustomData, CAPPluginReturnPromise);
|
|
21
22
|
CAP_PLUGIN_METHOD(setCustomData, CAPPluginReturnPromise);
|
|
22
23
|
CAP_PLUGIN_METHOD(removeCustomData, CAPPluginReturnPromise);
|
|
@@ -59,6 +60,7 @@ CAP_PLUGIN(GleapPlugin, "Gleap",
|
|
|
59
60
|
CAP_PLUGIN_METHOD(isUserIdentified, CAPPluginReturnPromise);
|
|
60
61
|
CAP_PLUGIN_METHOD(setTags, CAPPluginReturnPromise);
|
|
61
62
|
CAP_PLUGIN_METHOD(setDisableInAppNotifications, CAPPluginReturnPromise);
|
|
63
|
+
CAP_PLUGIN_METHOD(setDisableEnvData, CAPPluginReturnPromise);
|
|
62
64
|
CAP_PLUGIN_METHOD(startClassicForm, CAPPluginReturnPromise);
|
|
63
65
|
CAP_PLUGIN_METHOD(startConversation, CAPPluginReturnPromise);
|
|
64
66
|
CAP_PLUGIN_METHOD(openConversations, CAPPluginReturnPromise);
|
|
@@ -327,6 +327,22 @@ public class GleapPlugin: CAPPlugin, GleapDelegate {
|
|
|
327
327
|
])
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
+
@objc func setEnvDataPropsToIgnore(_ call: CAPPluginCall) {
|
|
331
|
+
// If value is empty, then pass back error
|
|
332
|
+
guard let propsToIgnore = call.options["propsToIgnore"] as? [String] else {
|
|
333
|
+
call.reject("Must provide a propsToIgnore array")
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Remove these env data keys before a ticket is sent
|
|
338
|
+
Gleap.setEnvDataPropsToIgnore(propsToIgnore)
|
|
339
|
+
|
|
340
|
+
// Provide feedback that it has been success
|
|
341
|
+
call.resolve([
|
|
342
|
+
"envDataPropsToIgnoreSet": true
|
|
343
|
+
])
|
|
344
|
+
}
|
|
345
|
+
|
|
330
346
|
@objc func setTags(_ call: CAPPluginCall) {
|
|
331
347
|
// If value is empty, then pass back error
|
|
332
348
|
guard let tags = call.options["tags"] as? [String] else {
|
|
@@ -567,6 +583,17 @@ public class GleapPlugin: CAPPlugin, GleapDelegate {
|
|
|
567
583
|
])
|
|
568
584
|
}
|
|
569
585
|
|
|
586
|
+
@objc func setDisableEnvData(_ call: CAPPluginCall) {
|
|
587
|
+
let disableEnvData = call.getBool("disableEnvData") ?? false
|
|
588
|
+
|
|
589
|
+
Gleap.setDisableEnvData(disableEnvData)
|
|
590
|
+
|
|
591
|
+
// Provide feedback that it has been success
|
|
592
|
+
call.resolve([
|
|
593
|
+
"envDataDisabled": true
|
|
594
|
+
])
|
|
595
|
+
}
|
|
596
|
+
|
|
570
597
|
@objc func showFeedbackButton(_ call: CAPPluginCall) {
|
|
571
598
|
let showFeedbackButton = call.getBool("show") ?? false
|
|
572
599
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
+
"homepage": "https://www.gleap.ai",
|
|
2
3
|
"name": "capacitor-gleap-plugin",
|
|
3
|
-
"version": "18.
|
|
4
|
-
"description": "Gleap SDK for Capacitor
|
|
4
|
+
"version": "18.1.0",
|
|
5
|
+
"description": "Gleap SDK for Capacitor and Ionic: AI customer support, live chat, in-app bug reporting and customer feedback.",
|
|
5
6
|
"main": "dist/plugin.cjs.js",
|
|
6
7
|
"module": "dist/esm/index.js",
|
|
7
8
|
"types": "dist/esm/index.d.ts",
|
|
@@ -25,7 +26,13 @@
|
|
|
25
26
|
"keywords": [
|
|
26
27
|
"capacitor",
|
|
27
28
|
"plugin",
|
|
28
|
-
"native"
|
|
29
|
+
"native",
|
|
30
|
+
"gleap",
|
|
31
|
+
"ionic",
|
|
32
|
+
"customer-support",
|
|
33
|
+
"bug-reporting",
|
|
34
|
+
"customer-feedback",
|
|
35
|
+
"intercom-alternative"
|
|
29
36
|
],
|
|
30
37
|
"scripts": {
|
|
31
38
|
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
@@ -76,6 +83,6 @@
|
|
|
76
83
|
}
|
|
77
84
|
},
|
|
78
85
|
"dependencies": {
|
|
79
|
-
"gleap": "^18.
|
|
86
|
+
"gleap": "^18.1.0"
|
|
80
87
|
}
|
|
81
88
|
}
|