capacitor-gleap-plugin 13.0.1 → 13.2.1

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.
@@ -13,6 +13,6 @@ Pod::Spec.new do |s|
13
13
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
14
  s.ios.deployment_target = '13.0'
15
15
  s.dependency 'Capacitor'
16
- s.dependency 'Gleap', '13.0.0'
16
+ s.dependency 'Gleap', '13.2.1'
17
17
  s.swift_version = '5.1'
18
18
  end
package/README.md CHANGED
@@ -13,7 +13,7 @@ npx cap sync
13
13
 
14
14
  ## Capacitor 4 or earlier
15
15
 
16
- Please install the plugin version `capacitor-gleap-plugin@10.0.3` if you are using capacitor 4 or earlier.
16
+ Please install the plugin version from our capacitor-v4 brunch with `npm install GleapSDK/Capacitor-SDK#capacitor-v4 --save` if you are using capacitor 4 or earlier.
17
17
 
18
18
  ## API
19
19
 
@@ -21,6 +21,7 @@ Please install the plugin version `capacitor-gleap-plugin@10.0.3` if you are usi
21
21
 
22
22
  * [`initialize(...)`](#initialize)
23
23
  * [`identify(...)`](#identify)
24
+ * [`updateContact(...)`](#updatecontact)
24
25
  * [`clearIdentity()`](#clearidentity)
25
26
  * [`getIdentity()`](#getidentity)
26
27
  * [`isUserIdentified()`](#isuseridentified)
@@ -28,6 +29,8 @@ Please install the plugin version `capacitor-gleap-plugin@10.0.3` if you are usi
28
29
  * [`showSurvey(...)`](#showsurvey)
29
30
  * [`attachCustomData(...)`](#attachcustomdata)
30
31
  * [`setTags(...)`](#settags)
32
+ * [`setNetworkLogsBlacklist(...)`](#setnetworklogsblacklist)
33
+ * [`setNetworkLogPropsToIgnore(...)`](#setnetworklogpropstoignore)
31
34
  * [`setCustomData(...)`](#setcustomdata)
32
35
  * [`removeCustomData(...)`](#removecustomdata)
33
36
  * [`clearCustomData()`](#clearcustomdata)
@@ -49,6 +52,8 @@ Please install the plugin version `capacitor-gleap-plugin@10.0.3` if you are usi
49
52
  * [`close()`](#close)
50
53
  * [`isOpened()`](#isopened)
51
54
  * [`startFeedbackFlow(...)`](#startfeedbackflow)
55
+ * [`startClassicForm(...)`](#startclassicform)
56
+ * [`startConversation(...)`](#startconversation)
52
57
  * [`startBot(...)`](#startbot)
53
58
  * [`showFeedbackButton(...)`](#showfeedbackbutton)
54
59
  * [`setDisableInAppNotifications(...)`](#setdisableinappnotifications)
@@ -101,6 +106,25 @@ Set user identity
101
106
  --------------------
102
107
 
103
108
 
109
+ ### updateContact(...)
110
+
111
+ ```typescript
112
+ updateContact(options: { name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; plan?: string; value?: number; customData?: Object; }) => Promise<{ identify: boolean; }>
113
+ ```
114
+
115
+ Update user properties
116
+
117
+ | Param | Type |
118
+ | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
119
+ | **`options`** | <code>{ name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; plan?: string; value?: number; customData?: <a href="#object">Object</a>; }</code> |
120
+
121
+ **Returns:** <code>Promise&lt;{ identify: boolean; }&gt;</code>
122
+
123
+ **Since:** 13.2.1
124
+
125
+ --------------------
126
+
127
+
104
128
  ### clearIdentity()
105
129
 
106
130
  ```typescript
@@ -222,6 +246,44 @@ Set tags
222
246
  --------------------
223
247
 
224
248
 
249
+ ### setNetworkLogsBlacklist(...)
250
+
251
+ ```typescript
252
+ setNetworkLogsBlacklist(options: { blacklist: string[]; }) => Promise<{ blacklistSet: boolean; }>
253
+ ```
254
+
255
+ Set network logs blacklist
256
+
257
+ | Param | Type |
258
+ | ------------- | ------------------------------------- |
259
+ | **`options`** | <code>{ blacklist: string[]; }</code> |
260
+
261
+ **Returns:** <code>Promise&lt;{ blacklistSet: boolean; }&gt;</code>
262
+
263
+ **Since:** 13.2.1
264
+
265
+ --------------------
266
+
267
+
268
+ ### setNetworkLogPropsToIgnore(...)
269
+
270
+ ```typescript
271
+ setNetworkLogPropsToIgnore(options: { propsToIgnore: string[]; }) => Promise<{ propsToIgnoreSet: boolean; }>
272
+ ```
273
+
274
+ Set network logs props to ignore
275
+
276
+ | Param | Type |
277
+ | ------------- | ----------------------------------------- |
278
+ | **`options`** | <code>{ propsToIgnore: string[]; }</code> |
279
+
280
+ **Returns:** <code>Promise&lt;{ propsToIgnoreSet: boolean; }&gt;</code>
281
+
282
+ **Since:** 13.2.1
283
+
284
+ --------------------
285
+
286
+
225
287
  ### setCustomData(...)
226
288
 
227
289
  ```typescript
@@ -599,6 +661,44 @@ Start feedback flow
599
661
  --------------------
600
662
 
601
663
 
664
+ ### startClassicForm(...)
665
+
666
+ ```typescript
667
+ startClassicForm(options: { formId?: string; showBackButton?: boolean; }) => Promise<{ classicFormStarted: boolean; }>
668
+ ```
669
+
670
+ Start a classic form
671
+
672
+ | Param | Type |
673
+ | ------------- | ----------------------------------------------------------- |
674
+ | **`options`** | <code>{ formId?: string; showBackButton?: boolean; }</code> |
675
+
676
+ **Returns:** <code>Promise&lt;{ classicFormStarted: boolean; }&gt;</code>
677
+
678
+ **Since:** 13.1.0
679
+
680
+ --------------------
681
+
682
+
683
+ ### startConversation(...)
684
+
685
+ ```typescript
686
+ startConversation(options: { showBackButton?: boolean; }) => Promise<{ conversationStarted: boolean; }>
687
+ ```
688
+
689
+ Start a new conversation
690
+
691
+ | Param | Type |
692
+ | ------------- | ------------------------------------------ |
693
+ | **`options`** | <code>{ showBackButton?: boolean; }</code> |
694
+
695
+ **Returns:** <code>Promise&lt;{ conversationStarted: boolean; }&gt;</code>
696
+
697
+ **Since:** 13.1.0
698
+
699
+ --------------------
700
+
701
+
602
702
  ### startBot(...)
603
703
 
604
704
  ```typescript
@@ -55,7 +55,7 @@ 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: '13.0.1'
58
+ implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '13.2.1'
59
59
  if (rootProject && rootProject.ext) {
60
60
  if (rootProject.ext.targetSdkVersion == 30 || rootProject.ext.compileSdkVersion == 30) {
61
61
  implementation( "androidx.appcompat:appcompat:1.3.0") {
@@ -14,8 +14,7 @@ import io.gleap.APPLICATIONTYPE;
14
14
  import io.gleap.Gleap;
15
15
  import io.gleap.GleapLogLevel;
16
16
  import io.gleap.GleapNotInitialisedException;
17
- import io.gleap.GleapUser;
18
- import io.gleap.GleapUserProperties;
17
+ import io.gleap.GleapSessionProperties;
19
18
  import io.gleap.SurveyType;
20
19
  import io.gleap.callbacks.InitializedCallback;
21
20
  import io.gleap.callbacks.ConfigLoadedCallback;
@@ -27,6 +26,7 @@ import io.gleap.callbacks.RegisterPushMessageGroupCallback;
27
26
  import io.gleap.callbacks.UnRegisterPushMessageGroupCallback;
28
27
  import io.gleap.callbacks.WidgetClosedCallback;
29
28
  import io.gleap.callbacks.WidgetOpenedCallback;
29
+ import io.gleap.callbacks.NotificationUnreadCountUpdatedCallback;
30
30
  import java.io.File;
31
31
  import java.io.FileOutputStream;
32
32
  import java.io.OutputStream;
@@ -84,37 +84,37 @@ public class GleapPlugin extends Plugin {
84
84
  return;
85
85
  }
86
86
 
87
- GleapUserProperties userProperties = new GleapUserProperties();
87
+ GleapSessionProperties sessionProperties = new GleapSessionProperties();
88
88
  if (call.getData().has("email")) {
89
- userProperties.setEmail(call.getString("email"));
89
+ sessionProperties.setEmail(call.getString("email"));
90
90
  }
91
91
  if (call.getData().has("name")) {
92
- userProperties.setName(call.getString("name"));
92
+ sessionProperties.setName(call.getString("name"));
93
93
  }
94
94
  if (call.getData().has("phone")) {
95
- userProperties.setPhone(call.getString("phone"));
95
+ sessionProperties.setPhone(call.getString("phone"));
96
96
  }
97
97
  if (call.getData().has("plan")) {
98
- userProperties.setPlan(call.getString("plan"));
98
+ sessionProperties.setPlan(call.getString("plan"));
99
99
  }
100
100
  if (call.getData().has("companyName")) {
101
- userProperties.setCompanyName(call.getString("companyName"));
101
+ sessionProperties.setCompanyName(call.getString("companyName"));
102
102
  }
103
103
  if (call.getData().has("companyId")) {
104
- userProperties.setCompanyId(call.getString("companyId"));
104
+ sessionProperties.setCompanyId(call.getString("companyId"));
105
105
  }
106
106
  if (call.getData().has("value")) {
107
- userProperties.setValue(call.getDouble("value"));
107
+ sessionProperties.setValue(call.getDouble("value"));
108
108
  }
109
109
  if (call.getData().has("userHash")) {
110
- userProperties.setHash(call.getString("userHash"));
110
+ sessionProperties.setHash(call.getString("userHash"));
111
111
  }
112
112
  if (call.getData().has("customData")) {
113
- userProperties.setCustomData(call.getObject("customData"));
113
+ sessionProperties.setCustomData(call.getObject("customData"));
114
114
  }
115
115
 
116
116
  String userId = call.getString("userId");
117
- implementation.identifyUser(userId, userProperties);
117
+ implementation.identifyContact(userId, sessionProperties);
118
118
 
119
119
  // Build Json object and resolve success
120
120
  JSObject ret = new JSObject();
@@ -139,20 +139,15 @@ public class GleapPlugin extends Plugin {
139
139
  JSObject ret = new JSObject();
140
140
 
141
141
  try {
142
- GleapUser gleapUser = implementation.getIdentity();
143
- if (gleapUser != null) {
144
- GleapUserProperties userProps = gleapUser.getGleapUserProperties();
145
-
146
- JSObject identityObj = new JSObject();
147
-
148
- if (userProps != null) {
149
- identityObj.put("userId", gleapUser.getUserId());
150
- identityObj.put("phone", userProps.getPhoneNumber());
151
- identityObj.put("email", userProps.getEmail());
152
- identityObj.put("name", userProps.getName());
153
- identityObj.put("value", userProps.getValue());
154
- }
155
-
142
+ GleapSessionProperties userProps = implementation.getIdentity();
143
+
144
+ JSObject identityObj = new JSObject();
145
+ if (userProps != null) {
146
+ identityObj.put("userId", userProps.getUserId());
147
+ identityObj.put("phone", userProps.getPhone());
148
+ identityObj.put("email", userProps.getEmail());
149
+ identityObj.put("name", userProps.getName());
150
+ identityObj.put("value", userProps.getValue());
156
151
  ret.put("identity", identityObj);
157
152
  } else {
158
153
  ret.put("identity", null);
@@ -222,6 +217,62 @@ public class GleapPlugin extends Plugin {
222
217
  call.resolve(ret);
223
218
  }
224
219
 
220
+ @PluginMethod
221
+ public void setNetworkLogsBlacklist(PluginCall call) {
222
+ // If key is empty, then pass back error
223
+ if (!call.getData().has("blacklist")) {
224
+ call.reject("Must provide a blacklist array");
225
+ return;
226
+ }
227
+
228
+ try {
229
+ // Set custom data
230
+ JSArray jsonBlacklist = call.getArray("blacklist");
231
+ String[] blacklist = new String[jsonBlacklist.length()];
232
+ for (int i = 0; i < jsonBlacklist.length(); i++) {
233
+ blacklist[i] = jsonBlacklist.getString(i);
234
+ }
235
+
236
+ implementation.setNetworkLogsBlacklist(blacklist);
237
+ } catch (Exception ex) {}
238
+
239
+ // Build Json object and resolve success
240
+ JSObject ret = new JSObject();
241
+ ret.put("blacklistSet", true);
242
+ call.resolve(ret);
243
+ }
244
+ /**
245
+ * Sets properties to be ignored in network logs.
246
+ *
247
+ * @since 13.2.1
248
+ */
249
+ @PluginMethod
250
+ public void setNetworkLogPropsToIgnore(PluginCall call) {
251
+ // Check if 'propsToIgnore' key is provided, return error if not
252
+ if (!call.getData().has("propsToIgnore")) {
253
+ call.reject("Must provide a propsToIgnore array");
254
+ return;
255
+ }
256
+
257
+ try {
258
+ // Retrieve and set the properties to be ignored
259
+ JSArray jsonPropsToIgnore = call.getArray("propsToIgnore");
260
+ String[] propsToIgnore = new String[jsonPropsToIgnore.length()];
261
+ for (int i = 0; i < jsonPropsToIgnore.length(); i++) {
262
+ propsToIgnore[i] = jsonPropsToIgnore.getString(i);
263
+ }
264
+
265
+ implementation.setNetworkLogPropsToIgnore(propsToIgnore);
266
+ } catch (Exception ex) {
267
+ // Handle exceptions if necessary
268
+ }
269
+
270
+ // Confirm successful setting of properties to ignore
271
+ JSObject ret = new JSObject();
272
+ ret.put("propsToIgnoreSet", true);
273
+ call.resolve(ret);
274
+ }
275
+
225
276
  @PluginMethod
226
277
  public void attachCustomData(PluginCall call) {
227
278
  // If key is empty, then pass back error
@@ -713,6 +764,37 @@ public class GleapPlugin extends Plugin {
713
764
  call.resolve(ret);
714
765
  }
715
766
 
767
+ @PluginMethod
768
+ public void startConversation(PluginCall call) throws GleapNotInitialisedException {
769
+ boolean showBackButton = call.getBoolean("showBackButton");
770
+
771
+ // Start conversation
772
+ implementation.startConversation(showBackButton);
773
+
774
+ // Build Json object and resolve success
775
+ JSObject ret = new JSObject();
776
+ ret.put("conversationStarted", true);
777
+ call.resolve(ret);
778
+ }
779
+
780
+ @PluginMethod
781
+ public void startClassicForm(PluginCall call) throws GleapNotInitialisedException {
782
+ if (!call.getData().has("formId")) {
783
+ call.reject("No formId provided");
784
+ return;
785
+ }
786
+
787
+ // Start feedback flow
788
+ boolean showBackButton = call.getBoolean("showBackButton");
789
+ String formId = call.getString("formId");
790
+ implementation.startClassicForm(formId, showBackButton);
791
+
792
+ // Build Json object and resolve success
793
+ JSObject ret = new JSObject();
794
+ ret.put("classicFormStarted", true);
795
+ call.resolve(ret);
796
+ }
797
+
716
798
  @PluginMethod
717
799
  public void setLanguage(PluginCall call) {
718
800
  // If languageCode is empty, then pass back error
@@ -746,6 +828,18 @@ public class GleapPlugin extends Plugin {
746
828
  }
747
829
  );
748
830
 
831
+ implementation.setNotificationUnreadCountUpdatedCallback(new NotificationUnreadCountUpdatedCallback() {
832
+ @Override
833
+ public void invoke(int count) {
834
+ // called when the sending of the feedback failed
835
+ JSObject data = new JSObject();
836
+ data.put("name", "notification-count-updated");
837
+ data.put("data", count);
838
+ call.resolve(data);
839
+ }
840
+ }
841
+ );
842
+
749
843
  implementation.setWidgetClosedCallback(
750
844
  new WidgetClosedCallback() {
751
845
  @Override
package/dist/docs.json CHANGED
@@ -49,6 +49,29 @@
49
49
  ],
50
50
  "slug": "identify"
51
51
  },
52
+ {
53
+ "name": "updateContact",
54
+ "signature": "(options: { name?: string; email?: string; phone?: string; companyId?: string; companyName?: string; plan?: string; value?: number; customData?: Object; }) => Promise<{ identify: boolean; }>",
55
+ "parameters": [
56
+ {
57
+ "name": "options",
58
+ "docs": "",
59
+ "type": "{ name?: string | undefined; email?: string | undefined; phone?: string | undefined; companyId?: string | undefined; companyName?: string | undefined; plan?: string | undefined; value?: number | undefined; customData?: Object | undefined; }"
60
+ }
61
+ ],
62
+ "returns": "Promise<{ identify: boolean; }>",
63
+ "tags": [
64
+ {
65
+ "name": "since",
66
+ "text": "13.2.1"
67
+ }
68
+ ],
69
+ "docs": "Update user properties",
70
+ "complexTypes": [
71
+ "Object"
72
+ ],
73
+ "slug": "updatecontact"
74
+ },
52
75
  {
53
76
  "name": "clearIdentity",
54
77
  "signature": "() => Promise<{ clearIdentity: boolean; }>",
@@ -178,6 +201,48 @@
178
201
  "complexTypes": [],
179
202
  "slug": "settags"
180
203
  },
204
+ {
205
+ "name": "setNetworkLogsBlacklist",
206
+ "signature": "(options: { blacklist: string[]; }) => Promise<{ blacklistSet: boolean; }>",
207
+ "parameters": [
208
+ {
209
+ "name": "options",
210
+ "docs": "",
211
+ "type": "{ blacklist: string[]; }"
212
+ }
213
+ ],
214
+ "returns": "Promise<{ blacklistSet: boolean; }>",
215
+ "tags": [
216
+ {
217
+ "name": "since",
218
+ "text": "13.2.1"
219
+ }
220
+ ],
221
+ "docs": "Set network logs blacklist",
222
+ "complexTypes": [],
223
+ "slug": "setnetworklogsblacklist"
224
+ },
225
+ {
226
+ "name": "setNetworkLogPropsToIgnore",
227
+ "signature": "(options: { propsToIgnore: string[]; }) => Promise<{ propsToIgnoreSet: boolean; }>",
228
+ "parameters": [
229
+ {
230
+ "name": "options",
231
+ "docs": "",
232
+ "type": "{ propsToIgnore: string[]; }"
233
+ }
234
+ ],
235
+ "returns": "Promise<{ propsToIgnoreSet: boolean; }>",
236
+ "tags": [
237
+ {
238
+ "name": "since",
239
+ "text": "13.2.1"
240
+ }
241
+ ],
242
+ "docs": "Set network logs props to ignore",
243
+ "complexTypes": [],
244
+ "slug": "setnetworklogpropstoignore"
245
+ },
181
246
  {
182
247
  "name": "setCustomData",
183
248
  "signature": "(options: { key: string; value: string; }) => Promise<{ setCustomData: boolean; }>",
@@ -594,6 +659,48 @@
594
659
  "complexTypes": [],
595
660
  "slug": "startfeedbackflow"
596
661
  },
662
+ {
663
+ "name": "startClassicForm",
664
+ "signature": "(options: { formId?: string; showBackButton?: boolean; }) => Promise<{ classicFormStarted: boolean; }>",
665
+ "parameters": [
666
+ {
667
+ "name": "options",
668
+ "docs": "",
669
+ "type": "{ formId?: string | undefined; showBackButton?: boolean | undefined; }"
670
+ }
671
+ ],
672
+ "returns": "Promise<{ classicFormStarted: boolean; }>",
673
+ "tags": [
674
+ {
675
+ "name": "since",
676
+ "text": "13.1.0"
677
+ }
678
+ ],
679
+ "docs": "Start a classic form",
680
+ "complexTypes": [],
681
+ "slug": "startclassicform"
682
+ },
683
+ {
684
+ "name": "startConversation",
685
+ "signature": "(options: { showBackButton?: boolean; }) => Promise<{ conversationStarted: boolean; }>",
686
+ "parameters": [
687
+ {
688
+ "name": "options",
689
+ "docs": "",
690
+ "type": "{ showBackButton?: boolean | undefined; }"
691
+ }
692
+ ],
693
+ "returns": "Promise<{ conversationStarted: boolean; }>",
694
+ "tags": [
695
+ {
696
+ "name": "since",
697
+ "text": "13.1.0"
698
+ }
699
+ ],
700
+ "docs": "Start a new conversation",
701
+ "complexTypes": [],
702
+ "slug": "startconversation"
703
+ },
597
704
  {
598
705
  "name": "startBot",
599
706
  "signature": "(options: { botId?: string; showBackButton?: boolean; }) => Promise<{ startedBot: boolean; }>",
@@ -31,6 +31,23 @@ export interface GleapPlugin {
31
31
  identify: boolean;
32
32
  }>;
33
33
  /**
34
+ * Update user properties
35
+ *
36
+ * @since 13.2.1
37
+ */
38
+ updateContact(options: {
39
+ name?: string;
40
+ email?: string;
41
+ phone?: string;
42
+ companyId?: string;
43
+ companyName?: string;
44
+ plan?: string;
45
+ value?: number;
46
+ customData?: Object;
47
+ }): Promise<{
48
+ identify: boolean;
49
+ }>;
50
+ /**
34
51
  * Clear user identity
35
52
  *
36
53
  * @since 7.0.0
@@ -103,6 +120,26 @@ export interface GleapPlugin {
103
120
  tagsSet: boolean;
104
121
  }>;
105
122
  /**
123
+ * Set network logs blacklist
124
+ *
125
+ * @since 13.2.1
126
+ */
127
+ setNetworkLogsBlacklist(options: {
128
+ blacklist: string[];
129
+ }): Promise<{
130
+ blacklistSet: boolean;
131
+ }>;
132
+ /**
133
+ * Set network logs props to ignore
134
+ *
135
+ * @since 13.2.1
136
+ */
137
+ setNetworkLogPropsToIgnore(options: {
138
+ propsToIgnore: string[];
139
+ }): Promise<{
140
+ propsToIgnoreSet: boolean;
141
+ }>;
142
+ /**
106
143
  * Set custom data
107
144
  *
108
145
  * @since 7.0.0
@@ -318,6 +355,27 @@ export interface GleapPlugin {
318
355
  startedFeedbackFlow: boolean;
319
356
  }>;
320
357
  /**
358
+ * Start a classic form
359
+ *
360
+ * @since 13.1.0
361
+ */
362
+ startClassicForm(options: {
363
+ formId?: string;
364
+ showBackButton?: boolean;
365
+ }): Promise<{
366
+ classicFormStarted: boolean;
367
+ }>;
368
+ /**
369
+ * Start a new conversation
370
+ *
371
+ * @since 13.1.0
372
+ */
373
+ startConversation(options: {
374
+ showBackButton?: boolean;
375
+ }): Promise<{
376
+ conversationStarted: boolean;
377
+ }>;
378
+ /**
321
379
  * Start bot
322
380
  *
323
381
  * @since 10.0.3
@@ -339,10 +397,10 @@ export interface GleapPlugin {
339
397
  feedbackButtonShown: boolean;
340
398
  }>;
341
399
  /**
342
- * Disable in app notifications.
343
- *
344
- * @since 8.6.1
345
- */
400
+ * Disable in app notifications.
401
+ *
402
+ * @since 8.6.1
403
+ */
346
404
  setDisableInAppNotifications(options: {
347
405
  disableInAppNotifications?: boolean;
348
406
  }): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export type CallbackID = string;\n\nexport type GleapEventCallback = (\n name: string,\n data?: any,\n) => 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 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 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 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 * 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 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}"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export type CallbackID = string;\n\nexport type GleapEventCallback = (\n name: string,\n data?: any,\n) => 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 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 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 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 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 * 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 * 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}"]}
package/dist/esm/web.d.ts CHANGED
@@ -12,6 +12,17 @@ export declare class GleapWeb extends WebPlugin implements GleapPlugin {
12
12
  }>;
13
13
  registerCallbackListeners(): void;
14
14
  notifyCallbacks(event: string, data: any): void;
15
+ startClassicForm(options: {
16
+ formId?: string | undefined;
17
+ showBackButton?: boolean | undefined;
18
+ }): Promise<{
19
+ classicFormStarted: boolean;
20
+ }>;
21
+ startConversation(options: {
22
+ showBackButton?: boolean | undefined;
23
+ }): Promise<{
24
+ conversationStarted: boolean;
25
+ }>;
15
26
  showSurvey(options: {
16
27
  surveyId: string;
17
28
  format?: 'survey' | 'survey_full' | undefined;
@@ -42,6 +53,28 @@ export declare class GleapWeb extends WebPlugin implements GleapPlugin {
42
53
  }): Promise<{
43
54
  identify: boolean;
44
55
  }>;
56
+ updateContact(options: {
57
+ name?: string | undefined;
58
+ email?: string | undefined;
59
+ phone?: string | undefined;
60
+ companyId?: string | undefined;
61
+ companyName?: string | undefined;
62
+ plan?: string | undefined;
63
+ value?: number | undefined;
64
+ customData?: Object | undefined;
65
+ }): Promise<{
66
+ identify: boolean;
67
+ }>;
68
+ setNetworkLogsBlacklist(options: {
69
+ blacklist: string[];
70
+ }): Promise<{
71
+ blacklistSet: boolean;
72
+ }>;
73
+ setNetworkLogPropsToIgnore(options: {
74
+ propsToIgnore: string[];
75
+ }): Promise<{
76
+ propsToIgnoreSet: boolean;
77
+ }>;
45
78
  setTags(options: {
46
79
  tags: string[];
47
80
  }): Promise<{
package/dist/esm/web.js CHANGED
@@ -35,6 +35,9 @@ export class GleapWeb extends WebPlugin {
35
35
  Gleap.on('register-pushmessage-group', groupName => {
36
36
  this.notifyCallbacks('register-pushmessage-group', groupName);
37
37
  });
38
+ Gleap.on('unread-count-changed', groupName => {
39
+ this.notifyCallbacks('notification-count-updated', groupName);
40
+ });
38
41
  Gleap.registerCustomAction(customAction => {
39
42
  this.notifyCallbacks('custom-action-called', customAction);
40
43
  });
@@ -47,6 +50,15 @@ export class GleapWeb extends WebPlugin {
47
50
  GleapWeb.callbacks[callbackId](event, data);
48
51
  }
49
52
  }
53
+ async startClassicForm(options) {
54
+ var _a;
55
+ Gleap.startClassicForm((_a = options.formId) !== null && _a !== void 0 ? _a : '', options.showBackButton);
56
+ return { classicFormStarted: true };
57
+ }
58
+ async startConversation(options) {
59
+ Gleap.startConversation(options.showBackButton);
60
+ return { conversationStarted: true };
61
+ }
50
62
  async showSurvey(options) {
51
63
  Gleap.showSurvey(options.surveyId, options.format);
52
64
  return { opened: true };
@@ -79,6 +91,18 @@ export class GleapWeb extends WebPlugin {
79
91
  }
80
92
  return { identify: true };
81
93
  }
94
+ async updateContact(options) {
95
+ Gleap.updateContact(options);
96
+ return { identify: true };
97
+ }
98
+ async setNetworkLogsBlacklist(options) {
99
+ Gleap.setNetworkLogsBlacklist(options.blacklist);
100
+ return { blacklistSet: true };
101
+ }
102
+ async setNetworkLogPropsToIgnore(options) {
103
+ Gleap.setNetworkLogPropsToIgnore(options.propsToIgnore);
104
+ return { propsToIgnoreSet: true };
105
+ }
82
106
  async setTags(options) {
83
107
  Gleap.setTags(options.tags);
84
108
  return { tagsSet: true };
@@ -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;IAIrC,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,yBAAyB;QACvB,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;YACpB,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE;YAC3B,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QAC1C,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAC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;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;;AAzYM,kBAAS,GAA0C,EAAE,CAAC;AACtD,oBAAW,GAAG,KAAK,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\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 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('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.registerCustomAction(customAction => {\n this.notifyCallbacks('custom-action-called', customAction);\n });\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](event, data);\n }\n }\n\n async showSurvey(options: { surveyId: string; format?: 'survey' | 'survey_full' | undefined; }): 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: { disableInAppNotifications?: boolean | undefined; }): Promise<{ inAppNotificationsDisabled: boolean; }> {\n Gleap.setDisableInAppNotifications(options.disableInAppNotifications ?? false);\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 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 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 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 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(\n options.botId ?? '',\n options.showBackButton,\n );\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 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 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;IAIrC,KAAK,CAAC,UAAU,CAAC,OAEhB;QACC,IAAI,QAAQ,CAAC,WAAW,EAAE;YACxB,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC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AAC;QAEhC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,KAAK,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;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;;AA3aM,kBAAS,GAA0C,EAAE,CAAC;AACtD,oBAAW,GAAG,KAAK,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\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 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('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 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](event, data);\n }\n }\n\n async startClassicForm(options: { formId?: string | undefined; showBackButton?: boolean | undefined; }): Promise<{ classicFormStarted: boolean; }> {\n Gleap.startClassicForm(options.formId ?? '', options.showBackButton);\n\n return { classicFormStarted: true };\n }\n\n async startConversation(options: { showBackButton?: boolean | undefined; }): Promise<{ conversationStarted: boolean; }> {\n Gleap.startConversation(options.showBackButton);\n\n return { conversationStarted: true };\n }\n\n async showSurvey(options: { surveyId: string; format?: 'survey' | 'survey_full' | undefined; }): 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: { disableInAppNotifications?: boolean | undefined; }): Promise<{ inAppNotificationsDisabled: boolean; }> {\n Gleap.setDisableInAppNotifications(options.disableInAppNotifications ?? false);\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 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 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: { name?: string | undefined; email?: string | undefined; phone?: string | undefined; companyId?: string | undefined; companyName?: string | undefined; plan?: string | undefined; value?: number | undefined; customData?: Object | undefined; }): Promise<{ identify: boolean; }> {\n Gleap.updateContact(options);\n\n return { identify: true };\n }\n\n async setNetworkLogsBlacklist(options: { blacklist: string[]; }): Promise<{ blacklistSet: boolean; }> {\n Gleap.setNetworkLogsBlacklist(options.blacklist);\n\n return { blacklistSet: true };\n }\n\n async setNetworkLogPropsToIgnore(options: { propsToIgnore: string[]; }): 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 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(\n options.botId ?? '',\n options.showBackButton,\n );\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 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 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"]}
@@ -48,6 +48,9 @@ class GleapWeb extends core.WebPlugin {
48
48
  Gleap__default["default"].on('register-pushmessage-group', groupName => {
49
49
  this.notifyCallbacks('register-pushmessage-group', groupName);
50
50
  });
51
+ Gleap__default["default"].on('unread-count-changed', groupName => {
52
+ this.notifyCallbacks('notification-count-updated', groupName);
53
+ });
51
54
  Gleap__default["default"].registerCustomAction(customAction => {
52
55
  this.notifyCallbacks('custom-action-called', customAction);
53
56
  });
@@ -60,6 +63,15 @@ class GleapWeb extends core.WebPlugin {
60
63
  GleapWeb.callbacks[callbackId](event, data);
61
64
  }
62
65
  }
66
+ async startClassicForm(options) {
67
+ var _a;
68
+ Gleap__default["default"].startClassicForm((_a = options.formId) !== null && _a !== void 0 ? _a : '', options.showBackButton);
69
+ return { classicFormStarted: true };
70
+ }
71
+ async startConversation(options) {
72
+ Gleap__default["default"].startConversation(options.showBackButton);
73
+ return { conversationStarted: true };
74
+ }
63
75
  async showSurvey(options) {
64
76
  Gleap__default["default"].showSurvey(options.surveyId, options.format);
65
77
  return { opened: true };
@@ -92,6 +104,18 @@ class GleapWeb extends core.WebPlugin {
92
104
  }
93
105
  return { identify: true };
94
106
  }
107
+ async updateContact(options) {
108
+ Gleap__default["default"].updateContact(options);
109
+ return { identify: true };
110
+ }
111
+ async setNetworkLogsBlacklist(options) {
112
+ Gleap__default["default"].setNetworkLogsBlacklist(options.blacklist);
113
+ return { blacklistSet: true };
114
+ }
115
+ async setNetworkLogPropsToIgnore(options) {
116
+ Gleap__default["default"].setNetworkLogPropsToIgnore(options.propsToIgnore);
117
+ return { propsToIgnoreSet: true };
118
+ }
95
119
  async setTags(options) {
96
120
  Gleap__default["default"].setTags(options.tags);
97
121
  return { tagsSet: true };
@@ -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});\nexport * from './definitions';\nexport { Gleap };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\nexport class GleapWeb extends WebPlugin {\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 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('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.registerCustomAction(customAction => {\n this.notifyCallbacks('custom-action-called', customAction);\n });\n }\n notifyCallbacks(event, data) {\n if (!GleapWeb.callbacks) {\n return;\n }\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId](event, data);\n }\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 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 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 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 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;\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;;ACDM,MAAM,QAAQ,SAASC,cAAS,CAAC;AACxC,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;AAC9B,QAAQ,IAAI,QAAQ,CAAC,WAAW,EAAE;AAClC,YAAY,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AACzC,SAAS;AACT,QAAQC,yBAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC1C,QAAQ,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;AACpC,QAAQ,IAAI,CAAC,yBAAyB,EAAE,CAAC;AACzC,QAAQ,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;AACrC,KAAK;AACL,IAAI,yBAAyB,GAAG;AAChC,QAAQA,yBAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM;AAC/B,YAAY,IAAI,CAA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Aa,CAAC,QAAQ,EAAE;AAClC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,0CAA0C,CAAC,CAAC;AAC3E,KAAK;AACL,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,iDAAiD,CAAC,CAAC;AAClF,KAAK;AACL,IAAI,MAAM,CAAC,MAAM,EAAE;AACnB,QAAQ,IAAI,MAAM,GAAG,EAAE,CAAC;AACxB,QAAQ,IAAI,UAAU,GAAG,gEAAgE,CAAC;AAC1F,QAAQ,IAAI,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;AACjD,QAAQ,KAAK,IAAI,CAAC,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,CAAC;AACtF,SAAS;AACT,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK;AACL,CAAC;AACD,QAAQ,CAAC,SAAS,GAAG,EAAE,CAAC;AACxB,QAAQ,CAAC,WAAW,GAAG,KAAK;;;;;;;;;"}
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});\nexport * from './definitions';\nexport { Gleap };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\nexport class GleapWeb extends WebPlugin {\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 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('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 notifyCallbacks(event, data) {\n if (!GleapWeb.callbacks) {\n return;\n }\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId](event, data);\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 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 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 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 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;\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","Gleap"],"mappings":";;;;;;;;;;;AACK,MAAC,KAAK,GAAGA,mBAAc,CAAC,OAAO,EAAE;AACtC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAA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B,KAAK;AACL,CAAC;AACD,QAAQ,CAAC,SAAS,GAAG,EAAE,CAAC;AACxB,QAAQ,CAAC,WAAW,GAAG,KAAK;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -44,6 +44,9 @@ var capacitorGleap = (function (exports, core, Gleap$1) {
44
44
  Gleap__default["default"].on('register-pushmessage-group', groupName => {
45
45
  this.notifyCallbacks('register-pushmessage-group', groupName);
46
46
  });
47
+ Gleap__default["default"].on('unread-count-changed', groupName => {
48
+ this.notifyCallbacks('notification-count-updated', groupName);
49
+ });
47
50
  Gleap__default["default"].registerCustomAction(customAction => {
48
51
  this.notifyCallbacks('custom-action-called', customAction);
49
52
  });
@@ -56,6 +59,15 @@ var capacitorGleap = (function (exports, core, Gleap$1) {
56
59
  GleapWeb.callbacks[callbackId](event, data);
57
60
  }
58
61
  }
62
+ async startClassicForm(options) {
63
+ var _a;
64
+ Gleap__default["default"].startClassicForm((_a = options.formId) !== null && _a !== void 0 ? _a : '', options.showBackButton);
65
+ return { classicFormStarted: true };
66
+ }
67
+ async startConversation(options) {
68
+ Gleap__default["default"].startConversation(options.showBackButton);
69
+ return { conversationStarted: true };
70
+ }
59
71
  async showSurvey(options) {
60
72
  Gleap__default["default"].showSurvey(options.surveyId, options.format);
61
73
  return { opened: true };
@@ -88,6 +100,18 @@ var capacitorGleap = (function (exports, core, Gleap$1) {
88
100
  }
89
101
  return { identify: true };
90
102
  }
103
+ async updateContact(options) {
104
+ Gleap__default["default"].updateContact(options);
105
+ return { identify: true };
106
+ }
107
+ async setNetworkLogsBlacklist(options) {
108
+ Gleap__default["default"].setNetworkLogsBlacklist(options.blacklist);
109
+ return { blacklistSet: true };
110
+ }
111
+ async setNetworkLogPropsToIgnore(options) {
112
+ Gleap__default["default"].setNetworkLogPropsToIgnore(options.propsToIgnore);
113
+ return { propsToIgnoreSet: true };
114
+ }
91
115
  async setTags(options) {
92
116
  Gleap__default["default"].setTags(options.tags);
93
117
  return { tagsSet: true };
@@ -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});\nexport * from './definitions';\nexport { Gleap };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\nexport class GleapWeb extends WebPlugin {\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 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('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.registerCustomAction(customAction => {\n this.notifyCallbacks('custom-action-called', customAction);\n });\n }\n notifyCallbacks(event, data) {\n if (!GleapWeb.callbacks) {\n return;\n }\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId](event, data);\n }\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 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 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 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 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;\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","Gleap"],"mappings":";;;;;;;AACK,UAAC,KAAK,GAAGA,mBAAc,CAAC,OAAO,EAAE;IACtC,IAAI,GA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AAC,CAAC;IACtF,SAAS;IACT,QAAQ,OAAO,MAAM,CAAC;IACtB,KAAK;IACL,CAAC;IACD,QAAQ,CAAC,SAAS,GAAG,EAAE,CAAC;IACxB,QAAQ,CAAC,WAAW,GAAG,KAAK;;;;;;;;;;;;;;;;;"}
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});\nexport * from './definitions';\nexport { Gleap };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport Gleap from 'gleap';\nexport class GleapWeb extends WebPlugin {\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 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('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 notifyCallbacks(event, data) {\n if (!GleapWeb.callbacks) {\n return;\n }\n for (var callbackId in GleapWeb.callbacks) {\n GleapWeb.callbacks[callbackId](event, data);\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 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 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 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 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;\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;;ICDM,MAAM,QAAQ,SAASC,cAAS,CAAC;IACxC,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE;IAC9B,QAAQ,IAAI,QAAQ,CAAC,WAAW,EAAE;IAClC,YAAY,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IACzC,SAAS;IACT,QAAQC,yBAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,QAAQ,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;IACpC,QAAQ,IAAI,CAAC,yBAAyB,EAAE,CAAC;IACzC,QAAQ,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;IACrC,KAAK;IACL,IAAI,yBAAyB,GAAG;IAChC,QAAQA,yBAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM;IAC/B,YAAY,IA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IAClC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,0CAA0C,CAAC,CAAC;IAC3E,KAAK;IACL,IAAI,MAAM,oBAAoB,GAAG;IACjC,QAAQ,MAAM,IAAI,CAAC,WAAW,CAAC,iDAAiD,CAAC,CAAC;IAClF,KAAK;IACL,IAAI,MAAM,CAAC,MAAM,EAAE;IACnB,QAAQ,IAAI,MAAM,GAAG,EAAE,CAAC;IACxB,QAAQ,IAAI,UAAU,GAAG,gEAAgE,CAAC;IAC1F,QAAQ,IAAI,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;IACjD,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,CAAC;IACtF,SAAS;IACT,QAAQ,OAAO,MAAM,CAAC;IACtB,KAAK;IACL,CAAC;IACD,QAAQ,CAAC,SAAS,GAAG,EAAE,CAAC;IACxB,QAAQ,CAAC,WAAW,GAAG,KAAK;;;;;;;;;;;;;;;;;"}
@@ -6,7 +6,10 @@
6
6
  CAP_PLUGIN(GleapPlugin, "Gleap",
7
7
  CAP_PLUGIN_METHOD(initialize, CAPPluginReturnPromise);
8
8
  CAP_PLUGIN_METHOD(identify, CAPPluginReturnPromise);
9
+ CAP_PLUGIN_METHOD(updateContact, CAPPluginReturnPromise);
9
10
  CAP_PLUGIN_METHOD(clearIdentity, CAPPluginReturnPromise);
11
+ CAP_PLUGIN_METHOD(setNetworkLogsBlacklist, CAPPluginReturnPromise);
12
+ CAP_PLUGIN_METHOD(setNetworkLogPropsToIgnore, CAPPluginReturnPromise);
10
13
  CAP_PLUGIN_METHOD(attachCustomData, CAPPluginReturnPromise);
11
14
  CAP_PLUGIN_METHOD(setCustomData, CAPPluginReturnPromise);
12
15
  CAP_PLUGIN_METHOD(removeCustomData, CAPPluginReturnPromise);
@@ -43,4 +46,6 @@ CAP_PLUGIN(GleapPlugin, "Gleap",
43
46
  CAP_PLUGIN_METHOD(isUserIdentified, CAPPluginReturnPromise);
44
47
  CAP_PLUGIN_METHOD(setTags, CAPPluginReturnPromise);
45
48
  CAP_PLUGIN_METHOD(setDisableInAppNotifications, CAPPluginReturnPromise);
49
+ CAP_PLUGIN_METHOD(startClassicForm, CAPPluginReturnPromise);
50
+ CAP_PLUGIN_METHOD(startConversation, CAPPluginReturnPromise);
46
51
  )
@@ -66,9 +66,9 @@ public class GleapPlugin: CAPPlugin, GleapDelegate {
66
66
  }
67
67
 
68
68
  if let userHash = call.getString("userHash") {
69
- Gleap.identifyUser(with: userId, andData: userProperty, andUserHash: userHash)
69
+ Gleap.identifyContact(userId, andData: userProperty, andUserHash: userHash)
70
70
  } else {
71
- Gleap.identifyUser(with: userId, andData: userProperty)
71
+ Gleap.identifyContact(userId, andData: userProperty)
72
72
  }
73
73
 
74
74
  // Provide feedback that it has been success
@@ -77,6 +77,42 @@ public class GleapPlugin: CAPPlugin, GleapDelegate {
77
77
  ])
78
78
  }
79
79
 
80
+ @objc func updateContact(_ call: CAPPluginCall) {
81
+ // Map all values
82
+ let userProperty = GleapUserProperty()
83
+ if (call.getString("name") != nil) {
84
+ userProperty.name = call.getString("name") ?? ""
85
+ }
86
+ if (call.getString("email") != nil) {
87
+ userProperty.email = call.getString("email") ?? ""
88
+ }
89
+ if (call.getDouble("value") != nil) {
90
+ userProperty.value = (call.getDouble("value") ?? 0.0) as NSNumber
91
+ }
92
+ if (call.getString("phone") != nil) {
93
+ userProperty.phone = call.getString("phone") ?? ""
94
+ }
95
+ if (call.getString("plan") != nil) {
96
+ userProperty.plan = call.getString("plan") ?? ""
97
+ }
98
+ if (call.getString("companyName") != nil) {
99
+ userProperty.companyName = call.getString("companyName") ?? ""
100
+ }
101
+ if (call.getString("companyId") != nil) {
102
+ userProperty.companyId = call.getString("companyId") ?? ""
103
+ }
104
+ if (call.getObject("customData") != nil) {
105
+ userProperty.customData = call.getObject("customData")!
106
+ }
107
+
108
+ Gleap.updateContact(userProperty)
109
+
110
+ // Provide feedback that it has been success
111
+ call.resolve([
112
+ "identify": true
113
+ ])
114
+ }
115
+
80
116
  @objc func clearIdentity(_ call: CAPPluginCall) {
81
117
  // Clear User Identity in Gleap
82
118
  Gleap.clearIdentity()
@@ -147,6 +183,38 @@ public class GleapPlugin: CAPPlugin, GleapDelegate {
147
183
  ])
148
184
  }
149
185
 
186
+ @objc func setNetworkLogsBlacklist(_ call: CAPPluginCall) {
187
+ // If value is empty, then pass back error
188
+ guard let blacklist = call.options["blacklist"] as? [String] else {
189
+ call.reject("Must provide a blacklist array")
190
+ return;
191
+ }
192
+
193
+ // Append custom data
194
+ Gleap.setNetworkLogsBlacklist(blacklist)
195
+
196
+ // Provide feedback that it has been success
197
+ call.resolve([
198
+ "blacklistSet": true
199
+ ])
200
+ }
201
+
202
+ @objc func setNetworkLogPropsToIgnore(_ call: CAPPluginCall) {
203
+ // If value is empty, then pass back error
204
+ guard let propsToIgnore = call.options["propsToIgnore"] as? [String] else {
205
+ call.reject("Must provide a propsToIgnore array")
206
+ return;
207
+ }
208
+
209
+ // Append custom data
210
+ Gleap.setNetworkLogPropsToIgnore(propsToIgnore)
211
+
212
+ // Provide feedback that it has been success
213
+ call.resolve([
214
+ "propsToIgnoreSet": true
215
+ ])
216
+ }
217
+
150
218
  @objc func setTags(_ call: CAPPluginCall) {
151
219
  // If value is empty, then pass back error
152
220
  guard let tags = call.options["tags"] as? [String] else {
@@ -515,6 +583,29 @@ public class GleapPlugin: CAPPlugin, GleapDelegate {
515
583
  ])
516
584
  }
517
585
 
586
+ @objc func startClassicForm(_ call: CAPPluginCall) {
587
+ let formId = call.getString("formId") ?? "bugreporting"
588
+ let showBackButton = call.getBool("showBackButton") ?? true
589
+
590
+ Gleap.startClassicForm(formId, showBackButton: showBackButton)
591
+
592
+ // Provide feedback that it has been success
593
+ call.resolve([
594
+ "classicFormStarted": true
595
+ ])
596
+ }
597
+
598
+ @objc func startConversation(_ call: CAPPluginCall) {
599
+ let showBackButton = call.getBool("showBackButton") ?? true
600
+
601
+ Gleap.startConversation(showBackButton)
602
+
603
+ // Provide feedback that it has been success
604
+ call.resolve([
605
+ "conversationStarted": true
606
+ ])
607
+ }
608
+
518
609
  @objc func startFeedbackFlow(_ call: CAPPluginCall) {
519
610
  let feedbackFlow = call.getString("feedbackFlow") ?? "bugreporting"
520
611
  let showBackButton = call.getBool("showBackButton") ?? true
@@ -573,6 +664,10 @@ public class GleapPlugin: CAPPlugin, GleapDelegate {
573
664
  public func widgetOpened() {
574
665
  notifyEventUpdate(name: "widget-opened", data: nil)
575
666
  }
667
+
668
+ public func notificationCountUpdated(_ count: Int) {
669
+ notifyEventUpdate(name: "notification-count-updated", data: count)
670
+ }
576
671
 
577
672
  public func feedbackFlowStarted(_ feedbackAction: [AnyHashable : Any]) {
578
673
  notifyEventUpdate(name: "flow-started", data: feedbackAction)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-gleap-plugin",
3
- "version": "13.0.1",
3
+ "version": "13.2.1",
4
4
  "description": "Gleap SDK for Capacitor is the easiest way to integrate Gleap into your Ionic apps! Achieve better app quality with comprehensive in-app bug reporting & customer feedback for your web-apps and websites. Many thanks to Stephan Nagel (congrapp) for his work on the Gleap capacitor plugin.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -76,6 +76,6 @@
76
76
  }
77
77
  },
78
78
  "dependencies": {
79
- "gleap": "13.0.4"
79
+ "gleap": "13.2.4"
80
80
  }
81
81
  }