@rollershop/capacitor-emarsys-sdk 1.2.0 → 1.2.1-beta.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.
- package/README.md +146 -108
- package/dist/docs.json +329 -329
- package/dist/plugin.cjs.js +0 -2
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +0 -2
- package/dist/plugin.js.map +1 -1
- package/package.json +35 -33
package/README.md
CHANGED
|
@@ -88,11 +88,11 @@ npx cap sync
|
|
|
88
88
|
|
|
89
89
|
The following options are available to initialize the SDK:
|
|
90
90
|
|
|
91
|
-
| Prop | Type
|
|
92
|
-
| --------------------------------- |
|
|
93
|
-
| **`mobileEngageApplicationCode`** | <code>string</code>
|
|
94
|
-
| **`merchantId`** | <code>string</code>
|
|
95
|
-
| **`consoleLogLevels`** | <code>
|
|
91
|
+
| Prop | Type | Description | Since |
|
|
92
|
+
| --------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
|
|
93
|
+
| **`mobileEngageApplicationCode`** | <code>string</code> | Emarsys App code, which is generated when the app is added to the account. | 1.0.0 |
|
|
94
|
+
| **`merchantId`** | <code>string</code> | Emarsys Predict Merchant ID (If the Predict feature is enabled on the Emarsys account). | 1.0.0 |
|
|
95
|
+
| **`consoleLogLevels`** | <code>{}</code> | The default console logging is only showing logs when you call an unallowed method. You are able to modify the allowed loglevels for console logging, by setting it during the setup. | 1.0.0 |
|
|
96
96
|
|
|
97
97
|
### Examples
|
|
98
98
|
|
|
@@ -113,7 +113,7 @@ In `capacitor.config.json`:
|
|
|
113
113
|
In `capacitor.config.ts`:
|
|
114
114
|
|
|
115
115
|
```ts
|
|
116
|
-
/// <reference types="@capacitor
|
|
116
|
+
/// <reference types="@rollershop/capacitor-emarsys-sdk" />
|
|
117
117
|
|
|
118
118
|
import { CapacitorConfig } from '@capacitor/cli';
|
|
119
119
|
|
|
@@ -264,12 +264,12 @@ In order to track email link clicks that open the application directly with the
|
|
|
264
264
|
### checkPermissions()
|
|
265
265
|
|
|
266
266
|
```typescript
|
|
267
|
-
checkPermissions() =>
|
|
267
|
+
checkPermissions() => any
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
Check permission to receive push notifications.
|
|
271
271
|
|
|
272
|
-
**Returns:** <code>
|
|
272
|
+
**Returns:** <code>any</code>
|
|
273
273
|
|
|
274
274
|
**Since:** 1.0.0
|
|
275
275
|
|
|
@@ -279,12 +279,12 @@ Check permission to receive push notifications.
|
|
|
279
279
|
### requestPermissions()
|
|
280
280
|
|
|
281
281
|
```typescript
|
|
282
|
-
requestPermissions() =>
|
|
282
|
+
requestPermissions() => any
|
|
283
283
|
```
|
|
284
284
|
|
|
285
285
|
Request permission to receive push notifications.
|
|
286
286
|
|
|
287
|
-
**Returns:** <code>
|
|
287
|
+
**Returns:** <code>any</code>
|
|
288
288
|
|
|
289
289
|
**Since:** 1.0.0
|
|
290
290
|
|
|
@@ -294,14 +294,14 @@ Request permission to receive push notifications.
|
|
|
294
294
|
### register()
|
|
295
295
|
|
|
296
296
|
```typescript
|
|
297
|
-
register() =>
|
|
297
|
+
register() => any
|
|
298
298
|
```
|
|
299
299
|
|
|
300
300
|
Register the app to receive push notifications.
|
|
301
301
|
|
|
302
302
|
This method will resolve with the push token or reject if there was a problem. It does not prompt the user for notification permissions, use `requestPermissions()` first.
|
|
303
303
|
|
|
304
|
-
**Returns:** <code>
|
|
304
|
+
**Returns:** <code>any</code>
|
|
305
305
|
|
|
306
306
|
**Since:** 1.0.0
|
|
307
307
|
|
|
@@ -311,7 +311,7 @@ This method will resolve with the push token or reject if there was a problem. I
|
|
|
311
311
|
### setContact(...)
|
|
312
312
|
|
|
313
313
|
```typescript
|
|
314
|
-
setContact(options: SetContactOptions) =>
|
|
314
|
+
setContact(options: SetContactOptions) => any
|
|
315
315
|
```
|
|
316
316
|
|
|
317
317
|
After application setup is finished, you can use this method to identify the user with `contactFieldValue`.
|
|
@@ -322,6 +322,8 @@ Without contact identification all tracked events will be linked to an anonymous
|
|
|
322
322
|
| ------------- | --------------------------------------------------------------- |
|
|
323
323
|
| **`options`** | <code><a href="#setcontactoptions">SetContactOptions</a></code> |
|
|
324
324
|
|
|
325
|
+
**Returns:** <code>any</code>
|
|
326
|
+
|
|
325
327
|
**Since:** 1.0.0
|
|
326
328
|
|
|
327
329
|
--------------------
|
|
@@ -330,7 +332,7 @@ Without contact identification all tracked events will be linked to an anonymous
|
|
|
330
332
|
### setAuthenticatedContact(...)
|
|
331
333
|
|
|
332
334
|
```typescript
|
|
333
|
-
setAuthenticatedContact(options: SetAuthenticatedContactOptions) =>
|
|
335
|
+
setAuthenticatedContact(options: SetAuthenticatedContactOptions) => any
|
|
334
336
|
```
|
|
335
337
|
|
|
336
338
|
After the application setup is finished, you can use this method to identify the user with an `openIdToken`.
|
|
@@ -341,6 +343,8 @@ Without contact identification all tracked events will be linked to an anonymous
|
|
|
341
343
|
| ------------- | ----------------------------------------------------------------------------------------- |
|
|
342
344
|
| **`options`** | <code><a href="#setauthenticatedcontactoptions">SetAuthenticatedContactOptions</a></code> |
|
|
343
345
|
|
|
346
|
+
**Returns:** <code>any</code>
|
|
347
|
+
|
|
344
348
|
**Since:** 1.0.0
|
|
345
349
|
|
|
346
350
|
--------------------
|
|
@@ -349,13 +353,15 @@ Without contact identification all tracked events will be linked to an anonymous
|
|
|
349
353
|
### clearContact()
|
|
350
354
|
|
|
351
355
|
```typescript
|
|
352
|
-
clearContact() =>
|
|
356
|
+
clearContact() => any
|
|
353
357
|
```
|
|
354
358
|
|
|
355
359
|
When the user signs out, this method should be used.
|
|
356
360
|
|
|
357
361
|
You only need to call `clearContact` when you explicitly want to sign out the contact from Emarsys even if the user isn’t logged in into your application.
|
|
358
362
|
|
|
363
|
+
**Returns:** <code>any</code>
|
|
364
|
+
|
|
359
365
|
**Since:** 1.0.0
|
|
360
366
|
|
|
361
367
|
--------------------
|
|
@@ -364,12 +370,12 @@ You only need to call `clearContact` when you explicitly want to sign out the co
|
|
|
364
370
|
### getPushToken()
|
|
365
371
|
|
|
366
372
|
```typescript
|
|
367
|
-
getPushToken() =>
|
|
373
|
+
getPushToken() => any
|
|
368
374
|
```
|
|
369
375
|
|
|
370
376
|
Use this method to get the current push token.
|
|
371
377
|
|
|
372
|
-
**Returns:** <code>
|
|
378
|
+
**Returns:** <code>any</code>
|
|
373
379
|
|
|
374
380
|
**Since:** 1.0.0
|
|
375
381
|
|
|
@@ -379,11 +385,13 @@ Use this method to get the current push token.
|
|
|
379
385
|
### clearPushToken()
|
|
380
386
|
|
|
381
387
|
```typescript
|
|
382
|
-
clearPushToken() =>
|
|
388
|
+
clearPushToken() => any
|
|
383
389
|
```
|
|
384
390
|
|
|
385
391
|
Use this method to remove the push token of the contact.
|
|
386
392
|
|
|
393
|
+
**Returns:** <code>any</code>
|
|
394
|
+
|
|
387
395
|
**Since:** 1.0.0
|
|
388
396
|
|
|
389
397
|
--------------------
|
|
@@ -392,11 +400,13 @@ Use this method to remove the push token of the contact.
|
|
|
392
400
|
### pauseInApp()
|
|
393
401
|
|
|
394
402
|
```typescript
|
|
395
|
-
pauseInApp() =>
|
|
403
|
+
pauseInApp() => any
|
|
396
404
|
```
|
|
397
405
|
|
|
398
406
|
When a critical activity starts and should not be interrupted by In-App, pause In-App messages.
|
|
399
407
|
|
|
408
|
+
**Returns:** <code>any</code>
|
|
409
|
+
|
|
400
410
|
**Since:** 1.0.0
|
|
401
411
|
|
|
402
412
|
--------------------
|
|
@@ -405,12 +415,12 @@ When a critical activity starts and should not be interrupted by In-App, pause I
|
|
|
405
415
|
### isInAppPaused()
|
|
406
416
|
|
|
407
417
|
```typescript
|
|
408
|
-
isInAppPaused() =>
|
|
418
|
+
isInAppPaused() => any
|
|
409
419
|
```
|
|
410
420
|
|
|
411
421
|
Use this method to check if in app messages are paused.
|
|
412
422
|
|
|
413
|
-
**Returns:** <code>
|
|
423
|
+
**Returns:** <code>any</code>
|
|
414
424
|
|
|
415
425
|
**Since:** 1.0.0
|
|
416
426
|
|
|
@@ -420,11 +430,13 @@ Use this method to check if in app messages are paused.
|
|
|
420
430
|
### resumeInApp()
|
|
421
431
|
|
|
422
432
|
```typescript
|
|
423
|
-
resumeInApp() =>
|
|
433
|
+
resumeInApp() => any
|
|
424
434
|
```
|
|
425
435
|
|
|
426
436
|
In order to show In-App messages after being paused, use the resume method.
|
|
427
437
|
|
|
438
|
+
**Returns:** <code>any</code>
|
|
439
|
+
|
|
428
440
|
**Since:** 1.0.0
|
|
429
441
|
|
|
430
442
|
--------------------
|
|
@@ -433,7 +445,7 @@ In order to show In-App messages after being paused, use the resume method.
|
|
|
433
445
|
### trackItem(...)
|
|
434
446
|
|
|
435
447
|
```typescript
|
|
436
|
-
trackItem(options: { itemId: string; }) =>
|
|
448
|
+
trackItem(options: { itemId: string; }) => any
|
|
437
449
|
```
|
|
438
450
|
|
|
439
451
|
If an item was viewed use the `trackItemView` method with an itemId.
|
|
@@ -442,6 +454,8 @@ If an item was viewed use the `trackItemView` method with an itemId.
|
|
|
442
454
|
| ------------- | -------------------------------- |
|
|
443
455
|
| **`options`** | <code>{ itemId: string; }</code> |
|
|
444
456
|
|
|
457
|
+
**Returns:** <code>any</code>
|
|
458
|
+
|
|
445
459
|
**Since:** 1.0.0
|
|
446
460
|
|
|
447
461
|
--------------------
|
|
@@ -450,7 +464,7 @@ If an item was viewed use the `trackItemView` method with an itemId.
|
|
|
450
464
|
### trackCategory(...)
|
|
451
465
|
|
|
452
466
|
```typescript
|
|
453
|
-
trackCategory(options: { categoryPath: string; }) =>
|
|
467
|
+
trackCategory(options: { categoryPath: string; }) => any
|
|
454
468
|
```
|
|
455
469
|
|
|
456
470
|
When the user navigates between the categories you should call `trackCategoryView` in every navigation. Be aware to send `categoryPath` in the required format. Please visit [Predict's documentation](https://dev.emarsys.com/v2/web-extend-command-reference) for more information.
|
|
@@ -459,6 +473,8 @@ When the user navigates between the categories you should call `trackCategoryVie
|
|
|
459
473
|
| ------------- | -------------------------------------- |
|
|
460
474
|
| **`options`** | <code>{ categoryPath: string; }</code> |
|
|
461
475
|
|
|
476
|
+
**Returns:** <code>any</code>
|
|
477
|
+
|
|
462
478
|
**Since:** 1.0.0
|
|
463
479
|
|
|
464
480
|
--------------------
|
|
@@ -467,7 +483,7 @@ When the user navigates between the categories you should call `trackCategoryVie
|
|
|
467
483
|
### trackSearch(...)
|
|
468
484
|
|
|
469
485
|
```typescript
|
|
470
|
-
trackSearch(options: { searchTerm: string; }) =>
|
|
486
|
+
trackSearch(options: { searchTerm: string; }) => any
|
|
471
487
|
```
|
|
472
488
|
|
|
473
489
|
To report search terms entered by the contact use `trackSearchTerm` method.
|
|
@@ -476,6 +492,8 @@ To report search terms entered by the contact use `trackSearchTerm` method.
|
|
|
476
492
|
| ------------- | ------------------------------------ |
|
|
477
493
|
| **`options`** | <code>{ searchTerm: string; }</code> |
|
|
478
494
|
|
|
495
|
+
**Returns:** <code>any</code>
|
|
496
|
+
|
|
479
497
|
**Since:** 1.0.0
|
|
480
498
|
|
|
481
499
|
--------------------
|
|
@@ -484,7 +502,7 @@ To report search terms entered by the contact use `trackSearchTerm` method.
|
|
|
484
502
|
### trackTag(...)
|
|
485
503
|
|
|
486
504
|
```typescript
|
|
487
|
-
trackTag(options: { tag: string; }) =>
|
|
505
|
+
trackTag(options: { tag: string; }) => any
|
|
488
506
|
```
|
|
489
507
|
|
|
490
508
|
To report search terms entered by the contact use `trackSearchTerm` method.
|
|
@@ -493,6 +511,8 @@ To report search terms entered by the contact use `trackSearchTerm` method.
|
|
|
493
511
|
| ------------- | ----------------------------- |
|
|
494
512
|
| **`options`** | <code>{ tag: string; }</code> |
|
|
495
513
|
|
|
514
|
+
**Returns:** <code>any</code>
|
|
515
|
+
|
|
496
516
|
**Since:** 1.0.0
|
|
497
517
|
|
|
498
518
|
--------------------
|
|
@@ -501,7 +521,7 @@ To report search terms entered by the contact use `trackSearchTerm` method.
|
|
|
501
521
|
### trackCard(...)
|
|
502
522
|
|
|
503
523
|
```typescript
|
|
504
|
-
trackCard(options: CardItems) =>
|
|
524
|
+
trackCard(options: CardItems) => any
|
|
505
525
|
```
|
|
506
526
|
|
|
507
527
|
When you want to track the cart items in the basket you can call this method with a list of CartItems.
|
|
@@ -510,6 +530,8 @@ When you want to track the cart items in the basket you can call this method wit
|
|
|
510
530
|
| ------------- | ----------------------------------------------- |
|
|
511
531
|
| **`options`** | <code><a href="#carditems">CardItems</a></code> |
|
|
512
532
|
|
|
533
|
+
**Returns:** <code>any</code>
|
|
534
|
+
|
|
513
535
|
**Since:** 1.0.0
|
|
514
536
|
|
|
515
537
|
--------------------
|
|
@@ -518,7 +540,7 @@ When you want to track the cart items in the basket you can call this method wit
|
|
|
518
540
|
### trackPurchase(...)
|
|
519
541
|
|
|
520
542
|
```typescript
|
|
521
|
-
trackPurchase(options: Purchase) =>
|
|
543
|
+
trackPurchase(options: Purchase) => any
|
|
522
544
|
```
|
|
523
545
|
|
|
524
546
|
To report a purchase event you should call this method with the items purchased and with an `orderId`.
|
|
@@ -527,6 +549,8 @@ To report a purchase event you should call this method with the items purchased
|
|
|
527
549
|
| ------------- | --------------------------------------------- |
|
|
528
550
|
| **`options`** | <code><a href="#purchase">Purchase</a></code> |
|
|
529
551
|
|
|
552
|
+
**Returns:** <code>any</code>
|
|
553
|
+
|
|
530
554
|
**Since:** 1.0.0
|
|
531
555
|
|
|
532
556
|
--------------------
|
|
@@ -535,20 +559,22 @@ To report a purchase event you should call this method with the items purchased
|
|
|
535
559
|
### trackCustomEvent(...)
|
|
536
560
|
|
|
537
561
|
```typescript
|
|
538
|
-
trackCustomEvent(event: CustomEvent) =>
|
|
562
|
+
trackCustomEvent(event: CustomEvent) => any
|
|
539
563
|
```
|
|
540
564
|
|
|
541
565
|
| Param | Type |
|
|
542
566
|
| ----------- | --------------------------------------------------- |
|
|
543
567
|
| **`event`** | <code><a href="#customevent">CustomEvent</a></code> |
|
|
544
568
|
|
|
569
|
+
**Returns:** <code>any</code>
|
|
570
|
+
|
|
545
571
|
--------------------
|
|
546
572
|
|
|
547
573
|
|
|
548
574
|
### recommendProducts(...)
|
|
549
575
|
|
|
550
576
|
```typescript
|
|
551
|
-
recommendProducts(options: RecommendedProductOptions) =>
|
|
577
|
+
recommendProducts(options: RecommendedProductOptions) => any
|
|
552
578
|
```
|
|
553
579
|
|
|
554
580
|
With the Emarsys SDK you can ask for product recommendations based on different recommendation logics.
|
|
@@ -559,7 +585,7 @@ This method is also going to track the value attached to the logic on the backen
|
|
|
559
585
|
| ------------- | ------------------------------------------------------------------------------- |
|
|
560
586
|
| **`options`** | <code><a href="#recommendedproductoptions">RecommendedProductOptions</a></code> |
|
|
561
587
|
|
|
562
|
-
**Returns:** <code>
|
|
588
|
+
**Returns:** <code>any</code>
|
|
563
589
|
|
|
564
590
|
**Since:** 1.0.0
|
|
565
591
|
|
|
@@ -569,7 +595,7 @@ This method is also going to track the value attached to the logic on the backen
|
|
|
569
595
|
### trackRecommendationClick(...)
|
|
570
596
|
|
|
571
597
|
```typescript
|
|
572
|
-
trackRecommendationClick(product: Product) =>
|
|
598
|
+
trackRecommendationClick(product: Product) => any
|
|
573
599
|
```
|
|
574
600
|
|
|
575
601
|
The Emarsys SDK doesn't track automatically recommendationClicks, so you have to call manually `trackRecommendationClick` when an interaction happens with any of the recommended `products`.
|
|
@@ -578,6 +604,8 @@ The Emarsys SDK doesn't track automatically recommendationClicks, so you have to
|
|
|
578
604
|
| ------------- | ------------------------------------------- |
|
|
579
605
|
| **`product`** | <code><a href="#product">Product</a></code> |
|
|
580
606
|
|
|
607
|
+
**Returns:** <code>any</code>
|
|
608
|
+
|
|
581
609
|
**Since:** 1.0.0
|
|
582
610
|
|
|
583
611
|
--------------------
|
|
@@ -586,12 +614,12 @@ The Emarsys SDK doesn't track automatically recommendationClicks, so you have to
|
|
|
586
614
|
### fetchMessages()
|
|
587
615
|
|
|
588
616
|
```typescript
|
|
589
|
-
fetchMessages() =>
|
|
617
|
+
fetchMessages() => any
|
|
590
618
|
```
|
|
591
619
|
|
|
592
620
|
In order to receive the messageInbox content, you can use this method.
|
|
593
621
|
|
|
594
|
-
**Returns:** <code>
|
|
622
|
+
**Returns:** <code>any</code>
|
|
595
623
|
|
|
596
624
|
**Since:** 1.0.0
|
|
597
625
|
|
|
@@ -601,7 +629,7 @@ In order to receive the messageInbox content, you can use this method.
|
|
|
601
629
|
### addTag(...)
|
|
602
630
|
|
|
603
631
|
```typescript
|
|
604
|
-
addTag(options: InboxTag) =>
|
|
632
|
+
addTag(options: InboxTag) => any
|
|
605
633
|
```
|
|
606
634
|
|
|
607
635
|
To label a message with a tag, you can use this method. (for example: "READ", "SEEN" etc)
|
|
@@ -610,6 +638,8 @@ To label a message with a tag, you can use this method. (for example: "READ", "S
|
|
|
610
638
|
| ------------- | --------------------------------------------- |
|
|
611
639
|
| **`options`** | <code><a href="#inboxtag">InboxTag</a></code> |
|
|
612
640
|
|
|
641
|
+
**Returns:** <code>any</code>
|
|
642
|
+
|
|
613
643
|
**Since:** 1.0.0
|
|
614
644
|
|
|
615
645
|
--------------------
|
|
@@ -618,7 +648,7 @@ To label a message with a tag, you can use this method. (for example: "READ", "S
|
|
|
618
648
|
### removeTag(...)
|
|
619
649
|
|
|
620
650
|
```typescript
|
|
621
|
-
removeTag(options: InboxTag) =>
|
|
651
|
+
removeTag(options: InboxTag) => any
|
|
622
652
|
```
|
|
623
653
|
|
|
624
654
|
To remove a label from a message, you can use this method.
|
|
@@ -627,6 +657,8 @@ To remove a label from a message, you can use this method.
|
|
|
627
657
|
| ------------- | --------------------------------------------- |
|
|
628
658
|
| **`options`** | <code><a href="#inboxtag">InboxTag</a></code> |
|
|
629
659
|
|
|
660
|
+
**Returns:** <code>any</code>
|
|
661
|
+
|
|
630
662
|
**Since:** 1.0.0
|
|
631
663
|
|
|
632
664
|
--------------------
|
|
@@ -635,12 +667,12 @@ To remove a label from a message, you can use this method.
|
|
|
635
667
|
### getApplicationCode()
|
|
636
668
|
|
|
637
669
|
```typescript
|
|
638
|
-
getApplicationCode() =>
|
|
670
|
+
getApplicationCode() => any
|
|
639
671
|
```
|
|
640
672
|
|
|
641
673
|
Provides what is the actual `applicationCode` set in the SDK.
|
|
642
674
|
|
|
643
|
-
**Returns:** <code>
|
|
675
|
+
**Returns:** <code>any</code>
|
|
644
676
|
|
|
645
677
|
**Since:** 1.0.0
|
|
646
678
|
|
|
@@ -650,7 +682,7 @@ Provides what is the actual `applicationCode` set in the SDK.
|
|
|
650
682
|
### setApplicationCode(...)
|
|
651
683
|
|
|
652
684
|
```typescript
|
|
653
|
-
setApplicationCode(options: ApplicationCode) =>
|
|
685
|
+
setApplicationCode(options: ApplicationCode) => any
|
|
654
686
|
```
|
|
655
687
|
|
|
656
688
|
If any error occurs during the change process, the Mobile Engage feature will be turned off.
|
|
@@ -659,6 +691,8 @@ If any error occurs during the change process, the Mobile Engage feature will be
|
|
|
659
691
|
| ------------- | ----------------------------------------------------------- |
|
|
660
692
|
| **`options`** | <code><a href="#applicationcode">ApplicationCode</a></code> |
|
|
661
693
|
|
|
694
|
+
**Returns:** <code>any</code>
|
|
695
|
+
|
|
662
696
|
**Since:** 1.0.0
|
|
663
697
|
|
|
664
698
|
--------------------
|
|
@@ -667,12 +701,12 @@ If any error occurs during the change process, the Mobile Engage feature will be
|
|
|
667
701
|
### getMerchantId()
|
|
668
702
|
|
|
669
703
|
```typescript
|
|
670
|
-
getMerchantId() =>
|
|
704
|
+
getMerchantId() => any
|
|
671
705
|
```
|
|
672
706
|
|
|
673
707
|
Provides what is the actual `merchantId` set in the SDK.
|
|
674
708
|
|
|
675
|
-
**Returns:** <code>
|
|
709
|
+
**Returns:** <code>any</code>
|
|
676
710
|
|
|
677
711
|
**Since:** 1.0.0
|
|
678
712
|
|
|
@@ -682,7 +716,7 @@ Provides what is the actual `merchantId` set in the SDK.
|
|
|
682
716
|
### setMerchantId(...)
|
|
683
717
|
|
|
684
718
|
```typescript
|
|
685
|
-
setMerchantId(options: MerchantId) =>
|
|
719
|
+
setMerchantId(options: MerchantId) => any
|
|
686
720
|
```
|
|
687
721
|
|
|
688
722
|
Change the actual `merchantId` that is set in the SDK.
|
|
@@ -691,6 +725,8 @@ Change the actual `merchantId` that is set in the SDK.
|
|
|
691
725
|
| ------------- | ------------------------------------------------- |
|
|
692
726
|
| **`options`** | <code><a href="#merchantid">MerchantId</a></code> |
|
|
693
727
|
|
|
728
|
+
**Returns:** <code>any</code>
|
|
729
|
+
|
|
694
730
|
**Since:** 1.0.0
|
|
695
731
|
|
|
696
732
|
--------------------
|
|
@@ -699,12 +735,12 @@ Change the actual `merchantId` that is set in the SDK.
|
|
|
699
735
|
### getContactFieldId()
|
|
700
736
|
|
|
701
737
|
```typescript
|
|
702
|
-
getContactFieldId() =>
|
|
738
|
+
getContactFieldId() => any
|
|
703
739
|
```
|
|
704
740
|
|
|
705
741
|
Provides what is the actual `contactFieldId` set in the SDK.
|
|
706
742
|
|
|
707
|
-
**Returns:** <code>
|
|
743
|
+
**Returns:** <code>any</code>
|
|
708
744
|
|
|
709
745
|
**Since:** 1.0.0
|
|
710
746
|
|
|
@@ -714,12 +750,12 @@ Provides what is the actual `contactFieldId` set in the SDK.
|
|
|
714
750
|
### getHardwareId()
|
|
715
751
|
|
|
716
752
|
```typescript
|
|
717
|
-
getHardwareId() =>
|
|
753
|
+
getHardwareId() => any
|
|
718
754
|
```
|
|
719
755
|
|
|
720
756
|
Provides what is the actual `hardwareId` set in the SDK.
|
|
721
757
|
|
|
722
|
-
**Returns:** <code>
|
|
758
|
+
**Returns:** <code>any</code>
|
|
723
759
|
|
|
724
760
|
**Since:** 1.0.0
|
|
725
761
|
|
|
@@ -729,12 +765,12 @@ Provides what is the actual `hardwareId` set in the SDK.
|
|
|
729
765
|
### getLanguageCode()
|
|
730
766
|
|
|
731
767
|
```typescript
|
|
732
|
-
getLanguageCode() =>
|
|
768
|
+
getLanguageCode() => any
|
|
733
769
|
```
|
|
734
770
|
|
|
735
771
|
Provides what is the actual language of the application.
|
|
736
772
|
|
|
737
|
-
**Returns:** <code>
|
|
773
|
+
**Returns:** <code>any</code>
|
|
738
774
|
|
|
739
775
|
**Since:** 1.0.0
|
|
740
776
|
|
|
@@ -744,12 +780,12 @@ Provides what is the actual language of the application.
|
|
|
744
780
|
### getSdkVersion()
|
|
745
781
|
|
|
746
782
|
```typescript
|
|
747
|
-
getSdkVersion() =>
|
|
783
|
+
getSdkVersion() => any
|
|
748
784
|
```
|
|
749
785
|
|
|
750
786
|
Provides the actual `sdkVersion`
|
|
751
787
|
|
|
752
|
-
**Returns:** <code>
|
|
788
|
+
**Returns:** <code>any</code>
|
|
753
789
|
|
|
754
790
|
**Since:** 1.0.0
|
|
755
791
|
|
|
@@ -769,7 +805,7 @@ Called when a event is received
|
|
|
769
805
|
| **`eventName`** | <code>'pushMessageEvent'</code> |
|
|
770
806
|
| **`listenerFunc`** | <code>(event: <a href="#pushmessageevent">PushMessageEvent</a>) => void</code> |
|
|
771
807
|
|
|
772
|
-
**Returns:** <code>
|
|
808
|
+
**Returns:** <code>any</code>
|
|
773
809
|
|
|
774
810
|
**Since:** 1.0.0
|
|
775
811
|
|
|
@@ -789,7 +825,7 @@ Called when a silent push message is received
|
|
|
789
825
|
| **`eventName`** | <code>'silentPushMessageInformation'</code> |
|
|
790
826
|
| **`listenerFunc`** | <code>(information: <a href="#silentpushmessageinformation">SilentPushMessageInformation</a>) => void</code> |
|
|
791
827
|
|
|
792
|
-
**Returns:** <code>
|
|
828
|
+
**Returns:** <code>any</code>
|
|
793
829
|
|
|
794
830
|
**Since:** 1.0.0
|
|
795
831
|
|
|
@@ -799,11 +835,13 @@ Called when a silent push message is received
|
|
|
799
835
|
### removeAllListeners()
|
|
800
836
|
|
|
801
837
|
```typescript
|
|
802
|
-
removeAllListeners() =>
|
|
838
|
+
removeAllListeners() => any
|
|
803
839
|
```
|
|
804
840
|
|
|
805
841
|
Remove all native listeners for this plugin.
|
|
806
842
|
|
|
843
|
+
**Returns:** <code>any</code>
|
|
844
|
+
|
|
807
845
|
**Since:** 1.0.0
|
|
808
846
|
|
|
809
847
|
--------------------
|
|
@@ -842,9 +880,9 @@ Remove all native listeners for this plugin.
|
|
|
842
880
|
|
|
843
881
|
#### CardItems
|
|
844
882
|
|
|
845
|
-
| Prop | Type
|
|
846
|
-
| ----------- |
|
|
847
|
-
| **`items`** | <code>
|
|
883
|
+
| Prop | Type |
|
|
884
|
+
| ----------- | --------------- |
|
|
885
|
+
| **`items`** | <code>{}</code> |
|
|
848
886
|
|
|
849
887
|
|
|
850
888
|
#### CardItem
|
|
@@ -871,44 +909,12 @@ Remove all native listeners for this plugin.
|
|
|
871
909
|
| **`attributes`** | <code>{ [key: string]: string; }</code> | The event attributes | 1.0.0 |
|
|
872
910
|
|
|
873
911
|
|
|
874
|
-
#### RecommendedProducts
|
|
875
|
-
|
|
876
|
-
| Prop | Type | Since |
|
|
877
|
-
| -------------- | ---------------------- | ----- |
|
|
878
|
-
| **`products`** | <code>Product[]</code> | 1.0.0 |
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
#### Product
|
|
882
|
-
|
|
883
|
-
| Prop | Type | Since |
|
|
884
|
-
| ------------------------ | ------------------------------------ | ----- |
|
|
885
|
-
| **`productId`** | <code>string</code> | 1.0.0 |
|
|
886
|
-
| **`title`** | <code>string</code> | 1.0.0 |
|
|
887
|
-
| **`linkUrl`** | <code>string</code> | 1.0.0 |
|
|
888
|
-
| **`customFields`** | <code>{ [key: string]: any; }</code> | 1.0.0 |
|
|
889
|
-
| **`feature`** | <code>string</code> | 1.0.0 |
|
|
890
|
-
| **`cohort`** | <code>string</code> | 1.0.0 |
|
|
891
|
-
| **`imageUrl`** | <code>string</code> | 1.0.0 |
|
|
892
|
-
| **`zoomImageUrl`** | <code>string</code> | 1.0.0 |
|
|
893
|
-
| **`categoryPath`** | <code>string</code> | 1.0.0 |
|
|
894
|
-
| **`available`** | <code>number</code> | 1.0.0 |
|
|
895
|
-
| **`productDescription`** | <code>string</code> | 1.0.0 |
|
|
896
|
-
| **`price`** | <code>number</code> | 1.0.0 |
|
|
897
|
-
| **`msrp`** | <code>number</code> | 1.0.0 |
|
|
898
|
-
| **`album`** | <code>string</code> | 1.0.0 |
|
|
899
|
-
| **`actor`** | <code>string</code> | 1.0.0 |
|
|
900
|
-
| **`artist`** | <code>string</code> | 1.0.0 |
|
|
901
|
-
| **`author`** | <code>string</code> | 1.0.0 |
|
|
902
|
-
| **`brand`** | <code>string</code> | 1.0.0 |
|
|
903
|
-
| **`year`** | <code>number</code> | 1.0.0 |
|
|
904
|
-
|
|
905
|
-
|
|
906
912
|
#### RecommendedProductOptions
|
|
907
913
|
|
|
908
914
|
| Prop | Type | Description | Default | Since |
|
|
909
915
|
| ---------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- | ----- |
|
|
910
916
|
| **`logic`** | <code><a href="#recommendedproductlogic">RecommendedProductLogic</a></code> | The logic that should be used. | | 1.0.0 |
|
|
911
|
-
| **`filter`** | <code>
|
|
917
|
+
| **`filter`** | <code>{}</code> | You can filter product recommendations with the SDK. There are two types of filters: `Exclude` or `Include`. In every case there are four types of comparators you can use to compare your chosen field to the `value`. This is an optional parameter. | | 1.0.0 |
|
|
912
918
|
| **`limit`** | <code>number</code> | You can limit the number of recommended products received by defining a `limit`. | <code>5</code> | 1.0.0 |
|
|
913
919
|
| **`availabilityZone`** | <code>string</code> | You can personalize the recommendation further by setting the `availabilityZones` parameter of the recommendation, to only recommend the locally available products. This is an optional parameter. | | 1.0.0 |
|
|
914
920
|
|
|
@@ -927,10 +933,10 @@ Based on `searchTerm`
|
|
|
927
933
|
|
|
928
934
|
Based on `cartItems`
|
|
929
935
|
|
|
930
|
-
| Prop | Type
|
|
931
|
-
| ----------- |
|
|
932
|
-
| **`type`** | <code>'cart'</code>
|
|
933
|
-
| **`value`** | <code>
|
|
936
|
+
| Prop | Type | Since |
|
|
937
|
+
| ----------- | ------------------- | ----- |
|
|
938
|
+
| **`type`** | <code>'cart'</code> | 1.0.0 |
|
|
939
|
+
| **`value`** | <code>{}</code> | 1.0.0 |
|
|
934
940
|
|
|
935
941
|
|
|
936
942
|
#### RecommendedProductRelatedLogic
|
|
@@ -982,7 +988,7 @@ Optionally based on the variants
|
|
|
982
988
|
| Prop | Type | Since |
|
|
983
989
|
| ----------- | ----------------------- | ----- |
|
|
984
990
|
| **`type`** | <code>'personal'</code> | 1.0.0 |
|
|
985
|
-
| **`value`** | <code>
|
|
991
|
+
| **`value`** | <code>{}</code> | 1.0.0 |
|
|
986
992
|
|
|
987
993
|
|
|
988
994
|
#### RecommendedProductHomeLogic
|
|
@@ -991,10 +997,10 @@ Based on most recent browsing behaviour
|
|
|
991
997
|
|
|
992
998
|
Optionally based on the variants
|
|
993
999
|
|
|
994
|
-
| Prop | Type
|
|
995
|
-
| ----------- |
|
|
996
|
-
| **`type`** | <code>'home'</code>
|
|
997
|
-
| **`value`** | <code>
|
|
1000
|
+
| Prop | Type | Since |
|
|
1001
|
+
| ----------- | ------------------- | ----- |
|
|
1002
|
+
| **`type`** | <code>'home'</code> | 1.0.0 |
|
|
1003
|
+
| **`value`** | <code>{}</code> | 1.0.0 |
|
|
998
1004
|
|
|
999
1005
|
|
|
1000
1006
|
#### RecommendedProductValueFilter
|
|
@@ -1014,7 +1020,39 @@ Optionally based on the variants
|
|
|
1014
1020
|
| **`filterType`** | <code><a href="#recommendedproductfiltertype">RecommendedProductFilterType</a></code> | | 1.0.0 |
|
|
1015
1021
|
| **`comparatorType`** | <code><a href="#recommendedproductarrayfiltercomparatortype">RecommendedProductArrayFilterComparatorType</a></code> | `inValues`: any of the `values` has a match with the `field`, `overlapsValues`: One or more of the `field` values are found in `expectation values` (applicable only to fields containing multiple values) | 1.0.0 |
|
|
1016
1022
|
| **`field`** | <code>string</code> | | 1.0.0 |
|
|
1017
|
-
| **`value`** | <code>
|
|
1023
|
+
| **`value`** | <code>{}</code> | | 1.0.0 |
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
#### RecommendedProducts
|
|
1027
|
+
|
|
1028
|
+
| Prop | Type | Since |
|
|
1029
|
+
| -------------- | --------------- | ----- |
|
|
1030
|
+
| **`products`** | <code>{}</code> | 1.0.0 |
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
#### Product
|
|
1034
|
+
|
|
1035
|
+
| Prop | Type | Since |
|
|
1036
|
+
| ------------------------ | ------------------------------------ | ----- |
|
|
1037
|
+
| **`productId`** | <code>string</code> | 1.0.0 |
|
|
1038
|
+
| **`title`** | <code>string</code> | 1.0.0 |
|
|
1039
|
+
| **`linkUrl`** | <code>string</code> | 1.0.0 |
|
|
1040
|
+
| **`customFields`** | <code>{ [key: string]: any; }</code> | 1.0.0 |
|
|
1041
|
+
| **`feature`** | <code>string</code> | 1.0.0 |
|
|
1042
|
+
| **`cohort`** | <code>string</code> | 1.0.0 |
|
|
1043
|
+
| **`imageUrl`** | <code>string</code> | 1.0.0 |
|
|
1044
|
+
| **`zoomImageUrl`** | <code>string</code> | 1.0.0 |
|
|
1045
|
+
| **`categoryPath`** | <code>string</code> | 1.0.0 |
|
|
1046
|
+
| **`available`** | <code>number</code> | 1.0.0 |
|
|
1047
|
+
| **`productDescription`** | <code>string</code> | 1.0.0 |
|
|
1048
|
+
| **`price`** | <code>number</code> | 1.0.0 |
|
|
1049
|
+
| **`msrp`** | <code>number</code> | 1.0.0 |
|
|
1050
|
+
| **`album`** | <code>string</code> | 1.0.0 |
|
|
1051
|
+
| **`actor`** | <code>string</code> | 1.0.0 |
|
|
1052
|
+
| **`artist`** | <code>string</code> | 1.0.0 |
|
|
1053
|
+
| **`author`** | <code>string</code> | 1.0.0 |
|
|
1054
|
+
| **`brand`** | <code>string</code> | 1.0.0 |
|
|
1055
|
+
| **`year`** | <code>number</code> | 1.0.0 |
|
|
1018
1056
|
|
|
1019
1057
|
|
|
1020
1058
|
#### InboxTag
|
|
@@ -1046,19 +1084,19 @@ Optionally based on the variants
|
|
|
1046
1084
|
| **`contactFieldId`** | <code>number</code> | 1.0.0 |
|
|
1047
1085
|
|
|
1048
1086
|
|
|
1049
|
-
####
|
|
1087
|
+
#### PushMessageEvent
|
|
1050
1088
|
|
|
1051
|
-
| Prop
|
|
1052
|
-
|
|
|
1053
|
-
| **`
|
|
1089
|
+
| Prop | Type | Since |
|
|
1090
|
+
| --------------- | ------------------- | ----- |
|
|
1091
|
+
| **`eventName`** | <code>string</code> | 1.0.0 |
|
|
1092
|
+
| **`data`** | <code>{}</code> | 1.0.0 |
|
|
1054
1093
|
|
|
1055
1094
|
|
|
1056
|
-
####
|
|
1095
|
+
#### PluginListenerHandle
|
|
1057
1096
|
|
|
1058
|
-
| Prop
|
|
1059
|
-
|
|
|
1060
|
-
| **`
|
|
1061
|
-
| **`data`** | <code>{ key: string; value: string; }[]</code> | 1.0.0 |
|
|
1097
|
+
| Prop | Type |
|
|
1098
|
+
| ------------ | ------------------------- |
|
|
1099
|
+
| **`remove`** | <code>() => any</code> |
|
|
1062
1100
|
|
|
1063
1101
|
|
|
1064
1102
|
#### SilentPushMessageInformation
|