@screeb/sdk-browser 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +4 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.mjs +4 -2
- package/docs/README.md +10 -9
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -470,9 +470,11 @@ 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,
|
|
@@ -533,4 +535,4 @@ exports.surveyClose = surveyClose;
|
|
|
533
535
|
exports.surveyStart = surveyStart;
|
|
534
536
|
exports.targetingCheck = targetingCheck;
|
|
535
537
|
exports.targetingDebug = targetingDebug;
|
|
536
|
-
CONSTANTS.version = '0.
|
|
538
|
+
CONSTANTS.version = '0.3.0'
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -316,7 +316,7 @@ export declare const surveyClose: () => void | Promise<unknown>;
|
|
|
316
316
|
* );
|
|
317
317
|
* ```
|
|
318
318
|
*/
|
|
319
|
-
export declare const surveyStart: (surveyId: string, distributionId
|
|
319
|
+
export declare const surveyStart: (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string) => void | Promise<unknown>;
|
|
320
320
|
/**
|
|
321
321
|
* Interrupts a running message.
|
|
322
322
|
*
|
|
@@ -350,7 +350,7 @@ 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
354
|
/**
|
|
355
355
|
* Forces a targeting check.
|
|
356
356
|
*
|
package/dist/es/index.d.ts
CHANGED
|
@@ -316,7 +316,7 @@ export declare const surveyClose: () => void | Promise<unknown>;
|
|
|
316
316
|
* );
|
|
317
317
|
* ```
|
|
318
318
|
*/
|
|
319
|
-
export declare const surveyStart: (surveyId: string, distributionId
|
|
319
|
+
export declare const surveyStart: (surveyId: string, distributionId?: string, allowMultipleResponses?: boolean, hiddenFields?: PropertyRecord, hooks?: HooksSurveyStart, language?: string) => void | Promise<unknown>;
|
|
320
320
|
/**
|
|
321
321
|
* Interrupts a running message.
|
|
322
322
|
*
|
|
@@ -350,7 +350,7 @@ 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
354
|
/**
|
|
355
355
|
* Forces a targeting check.
|
|
356
356
|
*
|
package/dist/es/index.mjs
CHANGED
|
@@ -468,9 +468,11 @@ 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,
|
|
@@ -514,4 +516,4 @@ var targetingCheck = function () { return callScreebCommand("targeting.check");
|
|
|
514
516
|
var targetingDebug = function () { return callScreebCommand("targeting.debug"); };
|
|
515
517
|
|
|
516
518
|
export { close, debug, eventTrack, identity, identityGet, identityGroupAssign, identityGroupUnassign, identityProperties, identityReset, init, isLoaded, load, messageClose, messageStart, surveyClose, surveyStart, targetingCheck, targetingDebug };
|
|
517
|
-
CONSTANTS.version = '0.
|
|
519
|
+
CONSTANTS.version = '0.3.0'
|
package/docs/README.md
CHANGED
|
@@ -996,18 +996,19 @@ ___
|
|
|
996
996
|
|
|
997
997
|
### messageStart
|
|
998
998
|
|
|
999
|
-
▸ **messageStart**(`messageId`, `hiddenFields?`, `hooks?`, `language?`): `void` \| `Promise`\<`unknown`\>
|
|
999
|
+
▸ **messageStart**(`messageId`, `allowMultipleResponses?`, `hiddenFields?`, `hooks?`, `language?`): `void` \| `Promise`\<`unknown`\>
|
|
1000
1000
|
|
|
1001
1001
|
Starts a message by its ID.
|
|
1002
1002
|
|
|
1003
1003
|
#### Parameters
|
|
1004
1004
|
|
|
1005
|
-
| Name | Type |
|
|
1006
|
-
| :------ | :------ |
|
|
1007
|
-
| `messageId` | `string` |
|
|
1008
|
-
| `
|
|
1009
|
-
| `
|
|
1010
|
-
| `
|
|
1005
|
+
| Name | Type | Default value |
|
|
1006
|
+
| :------ | :------ | :------ |
|
|
1007
|
+
| `messageId` | `string` | `undefined` |
|
|
1008
|
+
| `allowMultipleResponses` | `boolean` | `true` |
|
|
1009
|
+
| `hiddenFields` | [`PropertyRecord`](README.md#propertyrecord) | `{}` |
|
|
1010
|
+
| `hooks?` | [`HooksMessageStart`](README.md#hooksmessagestart) | `undefined` |
|
|
1011
|
+
| `language?` | `string` | `undefined` |
|
|
1011
1012
|
|
|
1012
1013
|
#### Returns
|
|
1013
1014
|
|
|
@@ -1057,7 +1058,7 @@ ___
|
|
|
1057
1058
|
|
|
1058
1059
|
### surveyStart
|
|
1059
1060
|
|
|
1060
|
-
▸ **surveyStart**(`surveyId`, `distributionId
|
|
1061
|
+
▸ **surveyStart**(`surveyId`, `distributionId?`, `allowMultipleResponses?`, `hiddenFields?`, `hooks?`, `language?`): `void` \| `Promise`\<`unknown`\>
|
|
1061
1062
|
|
|
1062
1063
|
Starts a survey by its ID.
|
|
1063
1064
|
|
|
@@ -1066,7 +1067,7 @@ Starts a survey by its ID.
|
|
|
1066
1067
|
| Name | Type | Default value |
|
|
1067
1068
|
| :------ | :------ | :------ |
|
|
1068
1069
|
| `surveyId` | `string` | `undefined` |
|
|
1069
|
-
| `distributionId
|
|
1070
|
+
| `distributionId?` | `string` | `undefined` |
|
|
1070
1071
|
| `allowMultipleResponses` | `boolean` | `true` |
|
|
1071
1072
|
| `hiddenFields` | [`PropertyRecord`](README.md#propertyrecord) | `{}` |
|
|
1072
1073
|
| `hooks?` | [`HooksSurveyStart`](README.md#hookssurveystart) | `undefined` |
|