@screeb/sdk-browser 0.2.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -470,14 +470,40 @@ var messageClose = function () { return callScreebCommand("message.close"); };
470
470
  * );
471
471
  * ```
472
472
  */
473
- var messageStart = function (messageId, hiddenFields, hooks, language) {
473
+ var messageStart = function (messageId, allowMultipleResponses, hiddenFields, hooks, language) {
474
+ if (allowMultipleResponses === void 0) { allowMultipleResponses = true; }
474
475
  if (hiddenFields === void 0) { hiddenFields = {}; }
475
476
  return callScreebCommand("message.start", messageId, {
477
+ allow_multiple_responses: allowMultipleResponses,
476
478
  language: language,
477
479
  hidden_fields: hiddenFields,
478
480
  hooks: hooks,
479
481
  });
480
482
  };
483
+ /**
484
+ * Interrupts a running session replay.
485
+ *
486
+ * @example
487
+ * ```ts
488
+ * import * as Screeb from "@screeb/sdk-browser";
489
+ *
490
+ * Screeb.sessionReplayStop();
491
+ * ```
492
+ */
493
+ var sessionReplayStop = function () { return callScreebCommand("session-replay.stop"); };
494
+ /**
495
+ * Starts a session replay.
496
+ *
497
+ * @example
498
+ * ```ts
499
+ * import * as Screeb from "@screeb/sdk-browser";
500
+ *
501
+ * Screeb.sessionReplayStart();
502
+ * ```
503
+ */
504
+ var sessionReplayStart = function () {
505
+ return callScreebCommand("session-replay.start");
506
+ };
481
507
  /**
482
508
  * Forces a targeting check.
483
509
  *
@@ -529,8 +555,10 @@ exports.isLoaded = isLoaded;
529
555
  exports.load = load;
530
556
  exports.messageClose = messageClose;
531
557
  exports.messageStart = messageStart;
558
+ exports.sessionReplayStart = sessionReplayStart;
559
+ exports.sessionReplayStop = sessionReplayStop;
532
560
  exports.surveyClose = surveyClose;
533
561
  exports.surveyStart = surveyStart;
534
562
  exports.targetingCheck = targetingCheck;
535
563
  exports.targetingDebug = targetingDebug;
536
- CONSTANTS.version = '0.2.2'
564
+ CONSTANTS.version = '0.4.0'
@@ -350,7 +350,29 @@ export declare const messageClose: () => void | Promise<unknown>;
350
350
  * );
351
351
  * ```
352
352
  */
353
- export declare const messageStart: (messageId: string, hiddenFields?: PropertyRecord, hooks?: HooksMessageStart, language?: string) => void | Promise<unknown>;
353
+ export declare const messageStart: (messageId: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksMessageStart, language?: string) => void | Promise<unknown>;
354
+ /**
355
+ * Interrupts a running session replay.
356
+ *
357
+ * @example
358
+ * ```ts
359
+ * import * as Screeb from "@screeb/sdk-browser";
360
+ *
361
+ * Screeb.sessionReplayStop();
362
+ * ```
363
+ */
364
+ export declare const sessionReplayStop: () => void | Promise<unknown>;
365
+ /**
366
+ * Starts a session replay.
367
+ *
368
+ * @example
369
+ * ```ts
370
+ * import * as Screeb from "@screeb/sdk-browser";
371
+ *
372
+ * Screeb.sessionReplayStart();
373
+ * ```
374
+ */
375
+ export declare const sessionReplayStart: () => void | Promise<unknown>;
354
376
  /**
355
377
  * Forces a targeting check.
356
378
  *
@@ -350,7 +350,29 @@ export declare const messageClose: () => void | Promise<unknown>;
350
350
  * );
351
351
  * ```
352
352
  */
353
- export declare const messageStart: (messageId: string, hiddenFields?: PropertyRecord, hooks?: HooksMessageStart, language?: string) => void | Promise<unknown>;
353
+ export declare const messageStart: (messageId: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksMessageStart, language?: string) => void | Promise<unknown>;
354
+ /**
355
+ * Interrupts a running session replay.
356
+ *
357
+ * @example
358
+ * ```ts
359
+ * import * as Screeb from "@screeb/sdk-browser";
360
+ *
361
+ * Screeb.sessionReplayStop();
362
+ * ```
363
+ */
364
+ export declare const sessionReplayStop: () => void | Promise<unknown>;
365
+ /**
366
+ * Starts a session replay.
367
+ *
368
+ * @example
369
+ * ```ts
370
+ * import * as Screeb from "@screeb/sdk-browser";
371
+ *
372
+ * Screeb.sessionReplayStart();
373
+ * ```
374
+ */
375
+ export declare const sessionReplayStart: () => void | Promise<unknown>;
354
376
  /**
355
377
  * Forces a targeting check.
356
378
  *
package/dist/es/index.mjs CHANGED
@@ -468,14 +468,40 @@ var messageClose = function () { return callScreebCommand("message.close"); };
468
468
  * );
469
469
  * ```
470
470
  */
471
- var messageStart = function (messageId, hiddenFields, hooks, language) {
471
+ var messageStart = function (messageId, allowMultipleResponses, hiddenFields, hooks, language) {
472
+ if (allowMultipleResponses === void 0) { allowMultipleResponses = true; }
472
473
  if (hiddenFields === void 0) { hiddenFields = {}; }
473
474
  return callScreebCommand("message.start", messageId, {
475
+ allow_multiple_responses: allowMultipleResponses,
474
476
  language: language,
475
477
  hidden_fields: hiddenFields,
476
478
  hooks: hooks,
477
479
  });
478
480
  };
481
+ /**
482
+ * Interrupts a running session replay.
483
+ *
484
+ * @example
485
+ * ```ts
486
+ * import * as Screeb from "@screeb/sdk-browser";
487
+ *
488
+ * Screeb.sessionReplayStop();
489
+ * ```
490
+ */
491
+ var sessionReplayStop = function () { return callScreebCommand("session-replay.stop"); };
492
+ /**
493
+ * Starts a session replay.
494
+ *
495
+ * @example
496
+ * ```ts
497
+ * import * as Screeb from "@screeb/sdk-browser";
498
+ *
499
+ * Screeb.sessionReplayStart();
500
+ * ```
501
+ */
502
+ var sessionReplayStart = function () {
503
+ return callScreebCommand("session-replay.start");
504
+ };
479
505
  /**
480
506
  * Forces a targeting check.
481
507
  *
@@ -513,5 +539,5 @@ var targetingCheck = function () { return callScreebCommand("targeting.check");
513
539
  */
514
540
  var targetingDebug = function () { return callScreebCommand("targeting.debug"); };
515
541
 
516
- export { close, debug, eventTrack, identity, identityGet, identityGroupAssign, identityGroupUnassign, identityProperties, identityReset, init, isLoaded, load, messageClose, messageStart, surveyClose, surveyStart, targetingCheck, targetingDebug };
517
- CONSTANTS.version = '0.2.2'
542
+ export { close, debug, eventTrack, identity, identityGet, identityGroupAssign, identityGroupUnassign, identityProperties, identityReset, init, isLoaded, load, messageClose, messageStart, sessionReplayStart, sessionReplayStop, surveyClose, surveyStart, targetingCheck, targetingDebug };
543
+ CONSTANTS.version = '0.4.0'
package/docs/README.md CHANGED
@@ -59,6 +59,8 @@
59
59
  - [load](README.md#load)
60
60
  - [messageClose](README.md#messageclose)
61
61
  - [messageStart](README.md#messagestart)
62
+ - [sessionReplayStart](README.md#sessionreplaystart)
63
+ - [sessionReplayStop](README.md#sessionreplaystop)
62
64
  - [surveyClose](README.md#surveyclose)
63
65
  - [surveyStart](README.md#surveystart)
64
66
  - [targetingCheck](README.md#targetingcheck)
@@ -996,18 +998,19 @@ ___
996
998
 
997
999
  ### messageStart
998
1000
 
999
- ▸ **messageStart**(`messageId`, `hiddenFields?`, `hooks?`, `language?`): `void` \| `Promise`\<`unknown`\>
1001
+ ▸ **messageStart**(`messageId`, `allowMultipleResponses?`, `hiddenFields?`, `hooks?`, `language?`): `void` \| `Promise`\<`unknown`\>
1000
1002
 
1001
1003
  Starts a message by its ID.
1002
1004
 
1003
1005
  #### Parameters
1004
1006
 
1005
- | Name | Type |
1006
- | :------ | :------ |
1007
- | `messageId` | `string` |
1008
- | `hiddenFields` | [`PropertyRecord`](README.md#propertyrecord) |
1009
- | `hooks?` | [`HooksMessageStart`](README.md#hooksmessagestart) |
1010
- | `language?` | `string` |
1007
+ | Name | Type | Default value |
1008
+ | :------ | :------ | :------ |
1009
+ | `messageId` | `string` | `undefined` |
1010
+ | `allowMultipleResponses` | `boolean` | `true` |
1011
+ | `hiddenFields` | [`PropertyRecord`](README.md#propertyrecord) | `{}` |
1012
+ | `hooks?` | [`HooksMessageStart`](README.md#hooksmessagestart) | `undefined` |
1013
+ | `language?` | `string` | `undefined` |
1011
1014
 
1012
1015
  #### Returns
1013
1016
 
@@ -1035,6 +1038,46 @@ Screeb.messageStart(
1035
1038
 
1036
1039
  ___
1037
1040
 
1041
+ ### sessionReplayStart
1042
+
1043
+ ▸ **sessionReplayStart**(): `void` \| `Promise`\<`unknown`\>
1044
+
1045
+ Starts a session replay.
1046
+
1047
+ #### Returns
1048
+
1049
+ `void` \| `Promise`\<`unknown`\>
1050
+
1051
+ **`Example`**
1052
+
1053
+ ```ts
1054
+ import * as Screeb from "@screeb/sdk-browser";
1055
+
1056
+ Screeb.sessionReplayStart();
1057
+ ```
1058
+
1059
+ ___
1060
+
1061
+ ### sessionReplayStop
1062
+
1063
+ ▸ **sessionReplayStop**(): `void` \| `Promise`\<`unknown`\>
1064
+
1065
+ Interrupts a running session replay.
1066
+
1067
+ #### Returns
1068
+
1069
+ `void` \| `Promise`\<`unknown`\>
1070
+
1071
+ **`Example`**
1072
+
1073
+ ```ts
1074
+ import * as Screeb from "@screeb/sdk-browser";
1075
+
1076
+ Screeb.sessionReplayStop();
1077
+ ```
1078
+
1079
+ ___
1080
+
1038
1081
  ### surveyClose
1039
1082
 
1040
1083
  ▸ **surveyClose**(): `void` \| `Promise`\<`unknown`\>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@screeb/sdk-browser",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
4
4
  "description": "Screeb's browser sdk.",
5
5
  "keywords": [
6
6
  "product discovery",