@screeb/sdk-browser 0.1.17 → 0.1.18
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/dist/cjs/index.cjs +44 -1
- package/dist/cjs/index.d.ts +34 -0
- package/dist/es/index.d.ts +34 -0
- package/dist/es/index.mjs +43 -2
- package/docs/README.md +63 -0
- package/package.json +1 -1
- package/readme/screeb-logo.svg +0 -15
package/dist/cjs/index.cjs
CHANGED
|
@@ -435,6 +435,47 @@ var surveyStart = function (surveyId, allowMultipleResponses, hiddenFields, hook
|
|
|
435
435
|
hooks: hooks,
|
|
436
436
|
});
|
|
437
437
|
};
|
|
438
|
+
/**
|
|
439
|
+
* Interrupts a running message.
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* ```ts
|
|
443
|
+
* import * as Screeb from "@screeb/sdk-browser";
|
|
444
|
+
*
|
|
445
|
+
* Screeb.messageClose();
|
|
446
|
+
* ```
|
|
447
|
+
*/
|
|
448
|
+
var messageClose = function () { return callScreebCommand("message.close"); };
|
|
449
|
+
/**
|
|
450
|
+
* Starts a message by its ID.
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* ```ts
|
|
454
|
+
* import * as Screeb from "@screeb/sdk-browser";
|
|
455
|
+
*
|
|
456
|
+
* Screeb.messageStart(
|
|
457
|
+
* '<UUID>',
|
|
458
|
+
* false,
|
|
459
|
+
* {
|
|
460
|
+
* color: "green",
|
|
461
|
+
* article_id: 42
|
|
462
|
+
* },
|
|
463
|
+
* {
|
|
464
|
+
* version: "1.0.0",
|
|
465
|
+
* onMessageShowed: (payload) => console.log("Message showed", payload),
|
|
466
|
+
* },
|
|
467
|
+
* "en"
|
|
468
|
+
* );
|
|
469
|
+
* ```
|
|
470
|
+
*/
|
|
471
|
+
var messageStart = function (messageId, hiddenFields, hooks, language) {
|
|
472
|
+
if (hiddenFields === void 0) { hiddenFields = {}; }
|
|
473
|
+
return callScreebCommand("message.start", messageId, {
|
|
474
|
+
language: language,
|
|
475
|
+
hidden_fields: hiddenFields,
|
|
476
|
+
hooks: hooks,
|
|
477
|
+
});
|
|
478
|
+
};
|
|
438
479
|
/**
|
|
439
480
|
* Forces a targeting check.
|
|
440
481
|
*
|
|
@@ -484,8 +525,10 @@ exports.identityReset = identityReset;
|
|
|
484
525
|
exports.init = init;
|
|
485
526
|
exports.isLoaded = isLoaded;
|
|
486
527
|
exports.load = load;
|
|
528
|
+
exports.messageClose = messageClose;
|
|
529
|
+
exports.messageStart = messageStart;
|
|
487
530
|
exports.surveyClose = surveyClose;
|
|
488
531
|
exports.surveyStart = surveyStart;
|
|
489
532
|
exports.targetingCheck = targetingCheck;
|
|
490
533
|
exports.targetingDebug = targetingDebug;
|
|
491
|
-
CONSTANTS.version = '0.1.
|
|
534
|
+
CONSTANTS.version = '0.1.18'
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -315,6 +315,40 @@ export declare const surveyClose: () => void | Promise<unknown>;
|
|
|
315
315
|
* ```
|
|
316
316
|
*/
|
|
317
317
|
export declare const surveyStart: (surveyId: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: Hooks, language?: string) => void | Promise<unknown>;
|
|
318
|
+
/**
|
|
319
|
+
* Interrupts a running message.
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* ```ts
|
|
323
|
+
* import * as Screeb from "@screeb/sdk-browser";
|
|
324
|
+
*
|
|
325
|
+
* Screeb.messageClose();
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
export declare const messageClose: () => void | Promise<unknown>;
|
|
329
|
+
/**
|
|
330
|
+
* Starts a message by its ID.
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```ts
|
|
334
|
+
* import * as Screeb from "@screeb/sdk-browser";
|
|
335
|
+
*
|
|
336
|
+
* Screeb.messageStart(
|
|
337
|
+
* '<UUID>',
|
|
338
|
+
* false,
|
|
339
|
+
* {
|
|
340
|
+
* color: "green",
|
|
341
|
+
* article_id: 42
|
|
342
|
+
* },
|
|
343
|
+
* {
|
|
344
|
+
* version: "1.0.0",
|
|
345
|
+
* onMessageShowed: (payload) => console.log("Message showed", payload),
|
|
346
|
+
* },
|
|
347
|
+
* "en"
|
|
348
|
+
* );
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
export declare const messageStart: (messageId: string, hiddenFields?: PropertyRecord, hooks?: Hooks, language?: string) => void | Promise<unknown>;
|
|
318
352
|
/**
|
|
319
353
|
* Forces a targeting check.
|
|
320
354
|
*
|
package/dist/es/index.d.ts
CHANGED
|
@@ -315,6 +315,40 @@ export declare const surveyClose: () => void | Promise<unknown>;
|
|
|
315
315
|
* ```
|
|
316
316
|
*/
|
|
317
317
|
export declare const surveyStart: (surveyId: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: Hooks, language?: string) => void | Promise<unknown>;
|
|
318
|
+
/**
|
|
319
|
+
* Interrupts a running message.
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* ```ts
|
|
323
|
+
* import * as Screeb from "@screeb/sdk-browser";
|
|
324
|
+
*
|
|
325
|
+
* Screeb.messageClose();
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
export declare const messageClose: () => void | Promise<unknown>;
|
|
329
|
+
/**
|
|
330
|
+
* Starts a message by its ID.
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```ts
|
|
334
|
+
* import * as Screeb from "@screeb/sdk-browser";
|
|
335
|
+
*
|
|
336
|
+
* Screeb.messageStart(
|
|
337
|
+
* '<UUID>',
|
|
338
|
+
* false,
|
|
339
|
+
* {
|
|
340
|
+
* color: "green",
|
|
341
|
+
* article_id: 42
|
|
342
|
+
* },
|
|
343
|
+
* {
|
|
344
|
+
* version: "1.0.0",
|
|
345
|
+
* onMessageShowed: (payload) => console.log("Message showed", payload),
|
|
346
|
+
* },
|
|
347
|
+
* "en"
|
|
348
|
+
* );
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
export declare const messageStart: (messageId: string, hiddenFields?: PropertyRecord, hooks?: Hooks, language?: string) => void | Promise<unknown>;
|
|
318
352
|
/**
|
|
319
353
|
* Forces a targeting check.
|
|
320
354
|
*
|
package/dist/es/index.mjs
CHANGED
|
@@ -433,6 +433,47 @@ var surveyStart = function (surveyId, allowMultipleResponses, hiddenFields, hook
|
|
|
433
433
|
hooks: hooks,
|
|
434
434
|
});
|
|
435
435
|
};
|
|
436
|
+
/**
|
|
437
|
+
* Interrupts a running message.
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* ```ts
|
|
441
|
+
* import * as Screeb from "@screeb/sdk-browser";
|
|
442
|
+
*
|
|
443
|
+
* Screeb.messageClose();
|
|
444
|
+
* ```
|
|
445
|
+
*/
|
|
446
|
+
var messageClose = function () { return callScreebCommand("message.close"); };
|
|
447
|
+
/**
|
|
448
|
+
* Starts a message by its ID.
|
|
449
|
+
*
|
|
450
|
+
* @example
|
|
451
|
+
* ```ts
|
|
452
|
+
* import * as Screeb from "@screeb/sdk-browser";
|
|
453
|
+
*
|
|
454
|
+
* Screeb.messageStart(
|
|
455
|
+
* '<UUID>',
|
|
456
|
+
* false,
|
|
457
|
+
* {
|
|
458
|
+
* color: "green",
|
|
459
|
+
* article_id: 42
|
|
460
|
+
* },
|
|
461
|
+
* {
|
|
462
|
+
* version: "1.0.0",
|
|
463
|
+
* onMessageShowed: (payload) => console.log("Message showed", payload),
|
|
464
|
+
* },
|
|
465
|
+
* "en"
|
|
466
|
+
* );
|
|
467
|
+
* ```
|
|
468
|
+
*/
|
|
469
|
+
var messageStart = function (messageId, hiddenFields, hooks, language) {
|
|
470
|
+
if (hiddenFields === void 0) { hiddenFields = {}; }
|
|
471
|
+
return callScreebCommand("message.start", messageId, {
|
|
472
|
+
language: language,
|
|
473
|
+
hidden_fields: hiddenFields,
|
|
474
|
+
hooks: hooks,
|
|
475
|
+
});
|
|
476
|
+
};
|
|
436
477
|
/**
|
|
437
478
|
* Forces a targeting check.
|
|
438
479
|
*
|
|
@@ -470,5 +511,5 @@ var targetingCheck = function () { return callScreebCommand("targeting.check");
|
|
|
470
511
|
*/
|
|
471
512
|
var targetingDebug = function () { return callScreebCommand("targeting.debug"); };
|
|
472
513
|
|
|
473
|
-
export { close, debug, eventTrack, identity, identityGet, identityGroupAssign, identityGroupUnassign, identityProperties, identityReset, init, isLoaded, load, surveyClose, surveyStart, targetingCheck, targetingDebug };
|
|
474
|
-
CONSTANTS.version = '0.1.
|
|
514
|
+
export { close, debug, eventTrack, identity, identityGet, identityGroupAssign, identityGroupUnassign, identityProperties, identityReset, init, isLoaded, load, messageClose, messageStart, surveyClose, surveyStart, targetingCheck, targetingDebug };
|
|
515
|
+
CONSTANTS.version = '0.1.18'
|
package/docs/README.md
CHANGED
|
@@ -46,6 +46,8 @@
|
|
|
46
46
|
- [init](README.md#init)
|
|
47
47
|
- [isLoaded](README.md#isloaded)
|
|
48
48
|
- [load](README.md#load)
|
|
49
|
+
- [messageClose](README.md#messageclose)
|
|
50
|
+
- [messageStart](README.md#messagestart)
|
|
49
51
|
- [surveyClose](README.md#surveyclose)
|
|
50
52
|
- [surveyStart](README.md#surveystart)
|
|
51
53
|
- [targetingCheck](README.md#targetingcheck)
|
|
@@ -793,6 +795,67 @@ Screeb.load();
|
|
|
793
795
|
|
|
794
796
|
___
|
|
795
797
|
|
|
798
|
+
### messageClose
|
|
799
|
+
|
|
800
|
+
▸ **messageClose**(): `void` \| `Promise`\<`unknown`\>
|
|
801
|
+
|
|
802
|
+
Interrupts a running message.
|
|
803
|
+
|
|
804
|
+
#### Returns
|
|
805
|
+
|
|
806
|
+
`void` \| `Promise`\<`unknown`\>
|
|
807
|
+
|
|
808
|
+
**`Example`**
|
|
809
|
+
|
|
810
|
+
```ts
|
|
811
|
+
import * as Screeb from "@screeb/sdk-browser";
|
|
812
|
+
|
|
813
|
+
Screeb.messageClose();
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
___
|
|
817
|
+
|
|
818
|
+
### messageStart
|
|
819
|
+
|
|
820
|
+
▸ **messageStart**(`messageId`, `hiddenFields?`, `hooks?`, `language?`): `void` \| `Promise`\<`unknown`\>
|
|
821
|
+
|
|
822
|
+
Starts a message by its ID.
|
|
823
|
+
|
|
824
|
+
#### Parameters
|
|
825
|
+
|
|
826
|
+
| Name | Type |
|
|
827
|
+
| :------ | :------ |
|
|
828
|
+
| `messageId` | `string` |
|
|
829
|
+
| `hiddenFields` | [`PropertyRecord`](README.md#propertyrecord) |
|
|
830
|
+
| `hooks?` | [`Hooks`](README.md#hooks) |
|
|
831
|
+
| `language?` | `string` |
|
|
832
|
+
|
|
833
|
+
#### Returns
|
|
834
|
+
|
|
835
|
+
`void` \| `Promise`\<`unknown`\>
|
|
836
|
+
|
|
837
|
+
**`Example`**
|
|
838
|
+
|
|
839
|
+
```ts
|
|
840
|
+
import * as Screeb from "@screeb/sdk-browser";
|
|
841
|
+
|
|
842
|
+
Screeb.messageStart(
|
|
843
|
+
'<UUID>',
|
|
844
|
+
false,
|
|
845
|
+
{
|
|
846
|
+
color: "green",
|
|
847
|
+
article_id: 42
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
version: "1.0.0",
|
|
851
|
+
onMessageShowed: (payload) => console.log("Message showed", payload),
|
|
852
|
+
},
|
|
853
|
+
"en"
|
|
854
|
+
);
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
___
|
|
858
|
+
|
|
796
859
|
### surveyClose
|
|
797
860
|
|
|
798
861
|
▸ **surveyClose**(): `void` \| `Promise`\<`unknown`\>
|
package/package.json
CHANGED
package/readme/screeb-logo.svg
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<svg width="773" height="366" viewBox="0 0 773 366" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g clip-path="url(#clip0_201_47)">
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
4
|
-
d="M711.7 197.1C714.6 194.1 717.2 191.1 719.7 187.9C750.7 201 772.5 230.9 772.4 266.5V364.7L684.5 365.3H606.7C558.6 365.3 520.5 325.3 520.5 277.1C520.5 261.5 524.5 245.9 531.5 232H630.4C661.2 232 690.1 219.5 711.7 197.1ZM600.2 292.8C609.1 292.8 616.1 285.6 616.1 276.9C616.1 268.4 609 261.2 600.2 261.2C591.5 261.2 584.5 268.4 584.5 276.9C584.5 285.6 591.5 292.8 600.2 292.8ZM645.5 292.8C654.4 292.8 661.4 285.6 661.4 276.9C661.4 268.4 654.4 261.2 645.5 261.2C636.8 261.2 629.8 268.4 629.8 276.9C629.8 285.6 636.8 292.8 645.5 292.8ZM690.9 292.8C699.8 292.8 706.8 285.6 706.8 276.9C706.8 268.4 699.7 261.2 690.9 261.2C682.2 261.2 675.2 268.4 675.2 276.9C675.2 285.6 682.2 292.8 690.9 292.8Z"
|
|
5
|
-
fill="#5e21f1" />
|
|
6
|
-
<path fill-rule="evenodd" clip-rule="evenodd"
|
|
7
|
-
d="M626.5 213C682 213 725.9 166.6 725.9 111.1C725.9 55.6 682 0 626.4 0H102.7C47.2 0 0 42.7 0 98.3V211.8L102.7 213H626.5ZM98.8 147.6C98.8 151.7 100.9 155.4 103.8 157.5C117.2 167.1 133.1 171.9 148.6 171.7C174.4 171.7 192.5 158.4 192.5 134.6V134.3C192.5 113.4 178.9 104.7 154.6 98.4C133.9 93.1 128.8 90.6 128.8 82.7V82.4C128.8 76.6 134.1 72 144.2 72C152.4 72 160.6 74.9 169.3 80C171.4 81.2 173.4 81.9 176 81.9C182.8 81.9 188.3 76.6 188.3 69.8C188.3 64.7 185.4 61.1 182.5 59.4C171.8 52.6 159.1 48.8 144.6 48.8C120.1 48.8 102.7 63.2 102.7 84.9V85.2C102.7 109 118.3 115.6 142.4 121.8C162.4 126.9 166.5 130.3 166.5 137V137.4C166.5 144.4 160 148.7 149.2 148.7C137.6 148.7 127.7 144.6 118.6 137.9C116.9 136.7 114.5 135.5 111.1 135.5C104.3 135.5 98.8 140.8 98.8 147.6ZM200.8 124.9V124.6C200.8 98.4 220.8 76.9 248.8 76.9C262.6 76.9 272.4 80.7 280.1 87.2C281.8 88.6 284.2 91.6 284.2 96.1C284.2 102.6 278.9 107.7 272.4 107.7C269 107.7 266.4 106.3 264.9 105.1C260.3 101.5 255.5 99.3 248.7 99.3C235.7 99.3 226.5 110.8 226.5 124.3V124.6C226.5 138.6 235.6 149.9 249.7 149.9C256.5 149.9 261.8 147.5 266.8 143.6C268.2 142.6 270.7 141.2 273.8 141.2C280 141.2 284.7 146.2 284.7 152.3C284.7 155.7 283.2 158.5 280.9 160.5C273.2 167.5 263.5 172.3 248.4 172.3C220.9 172.2 200.8 151.1 200.8 124.9ZM308.1 77.5C300.9 77.5 295.1 83.3 295.1 90.5V158.1C295.1 165.3 300.9 171.1 308.1 171.1C315.3 171.1 321.1 165.3 321.1 158.1V133.8C321.1 115.4 328.4 105.3 341.6 102.2C346.9 101 351.3 96.9 351.3 90.1C351.3 82.8 346.7 77.5 338.7 77.5C331 77.5 324.9 85.7 321.1 94.6V90.5C321.1 83.3 315.3 77.5 308.1 77.5ZM521.3 121C521.3 102 507.8 76.9 477.2 76.9C458.9 76.9 444.3 87.1 437 101.9C430.9 88.5 418 76.9 397.2 76.9C370.5 76.9 351.9 98.4 351.9 124.6V124.9C351.9 152.9 372.2 172.3 399.8 172.3C413.1 172.3 423.6 168 431.6 161.2C433.5 159.5 435 156.9 435 153.5C435 147.7 430.7 143.2 424.9 143.2C422.2 143.2 420.5 143.9 418.6 145.3C413.3 149.2 407.3 151.5 400.1 151.5C388.5 151.5 380.3 145.3 377.7 133.6H432.561C436.215 156.976 455.14 172.4 479.8 172.4C493.1 172.4 503.6 168.1 511.6 161.3C513.5 159.6 515 157 515 153.6C515 147.8 510.7 143.3 504.9 143.3C502.2 143.3 500.5 144 498.6 145.4C493.3 149.3 487.3 151.6 480.1 151.6C468.5 151.6 460.3 145.4 457.7 133.7H509.2C516 133.4 521.3 128.5 521.3 121ZM432.5 133.2L432.522 133.349C432.308 133.302 432.246 133.251 432.5 133.2ZM377.4 117.2C379.5 105.4 386.5 97.7 397.2 97.7C408.1 97.7 415 105.6 416.5 117.2H377.4ZM457.4 117.2C459.5 105.4 466.5 97.7 477.2 97.7C488.1 97.7 495 105.6 496.5 117.2H457.4ZM546.4 44.4C539.2 44.4 533.4 50.2 533.4 57.4V158.3C533.4 165.5 539.2 171.3 546.4 171.3C553.6 171.3 559.4 165.5 559.4 158.5V158.3C565.5 165.7 574.1 172 587.9 172C609.6 172 629.6 155.2 629.6 124.6V124.3C629.6 93.7 609.3 76.9 587.9 76.9C574.4 76.9 565.7 83.3 559.4 91.8V57.4C559.4 50.2 553.6 44.4 546.4 44.4ZM603.7 124.3V124.6C603.7 139.9 593.4 149.9 581.3 149.9C569.2 149.9 559.1 139.8 559.1 124.6V124.3C559.1 109.1 569.2 99 581.3 99C593.4 99 603.7 109.1 603.7 124.3Z"
|
|
8
|
-
fill="#5e21f1" />
|
|
9
|
-
</g>
|
|
10
|
-
<defs>
|
|
11
|
-
<clipPath id="clip0_201_47">
|
|
12
|
-
<rect width="772.5" height="365.4" fill="#5e21f1" />
|
|
13
|
-
</clipPath>
|
|
14
|
-
</defs>
|
|
15
|
-
</svg>
|