@screeb/sdk-browser
Advanced tools
Comparing version 0.1.11 to 0.1.12
@@ -9,5 +9,18 @@ @screeb/sdk-browser | ||
- [Channel](README.md#channel) | ||
- [ChannelType](README.md#channeltype) | ||
- [HookCommonProperties](README.md#hookcommonproperties) | ||
- [HookOnQuestionReplied](README.md#hookonquestionreplied) | ||
- [HookOnReady](README.md#hookonready) | ||
- [HookOnSurveyCompleted](README.md#hookonsurveycompleted) | ||
- [HookOnSurveyHidden](README.md#hookonsurveyhidden) | ||
- [HookOnSurveyShowed](README.md#hookonsurveyshowed) | ||
- [HookOnSurveyStarted](README.md#hookonsurveystarted) | ||
- [Hooks](README.md#hooks) | ||
- [PropertyRecord](README.md#propertyrecord) | ||
- [PropertyType](README.md#propertytype) | ||
- [ResponseItem](README.md#responseitem) | ||
- [ResponseItemAnswer](README.md#responseitemanswer) | ||
- [ResponseItemQuestion](README.md#responseitemquestion) | ||
- [ResponseStatus](README.md#responsestatus) | ||
- [ScreebFunction](README.md#screebfunction) | ||
@@ -17,2 +30,7 @@ - [ScreebIdentityGetReturn](README.md#screebidentitygetreturn) | ||
- [ScreebOptions](README.md#screeboptions) | ||
- [Survey](README.md#survey) | ||
- [SurveyFormat](README.md#surveyformat) | ||
- [SurveyPosition](README.md#surveyposition) | ||
- [SurveySize](README.md#surveysize) | ||
- [User](README.md#user) | ||
@@ -40,2 +58,157 @@ ### Functions | ||
### Channel | ||
Ƭ **Channel**: `Object` | ||
#### Type declaration | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `id` | `string` | | ||
| `type` | [`ChannelType`](README.md#channeltype) | | ||
___ | ||
### ChannelType | ||
Ƭ **ChannelType**: ``"widget"`` \| ``"ios"`` \| ``"android"`` | ||
___ | ||
### HookCommonProperties | ||
Ƭ **HookCommonProperties**: `Object` | ||
#### Type declaration | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `channel` | [`Channel`](README.md#channel) | | ||
| `survey` | [`Survey`](README.md#survey) | | ||
| `user` | [`User`](README.md#user) | | ||
___ | ||
### HookOnQuestionReplied | ||
Ƭ **HookOnQuestionReplied**: (`data`: [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `answer`: [`ResponseItemAnswer`](README.md#responseitemanswer) ; `id`: `string` ; `items`: [`ResponseItem`](README.md#responseitem)[] ; `question`: [`ResponseItemQuestion`](README.md#responseitemquestion) ; `status`: ``null`` } }) => `void` | ||
#### Type declaration | ||
▸ (`data`): `void` | ||
##### Parameters | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `data` | [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `answer`: [`ResponseItemAnswer`](README.md#responseitemanswer) ; `id`: `string` ; `items`: [`ResponseItem`](README.md#responseitem)[] ; `question`: [`ResponseItemQuestion`](README.md#responseitemquestion) ; `status`: ``null`` } } | | ||
##### Returns | ||
`void` | ||
___ | ||
### HookOnReady | ||
Ƭ **HookOnReady**: (`data`: { `channel`: [`Channel`](README.md#channel) ; `user`: [`User`](README.md#user) }) => `void` | ||
#### Type declaration | ||
▸ (`data`): `void` | ||
##### Parameters | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `data` | `Object` | | ||
| `data.channel` | [`Channel`](README.md#channel) | | ||
| `data.user` | [`User`](README.md#user) | | ||
##### Returns | ||
`void` | ||
___ | ||
### HookOnSurveyCompleted | ||
Ƭ **HookOnSurveyCompleted**: (`data`: [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `id`: `string` ; `items`: [`ResponseItem`](README.md#responseitem)[] } }) => `void` | ||
#### Type declaration | ||
▸ (`data`): `void` | ||
##### Parameters | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `data` | [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `id`: `string` ; `items`: [`ResponseItem`](README.md#responseitem)[] } } | | ||
##### Returns | ||
`void` | ||
___ | ||
### HookOnSurveyHidden | ||
Ƭ **HookOnSurveyHidden**: (`data`: [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `hide_reason`: [`ResponseStatus`](README.md#responsestatus) ; `id`: `string` ; `items`: [`ResponseItem`](README.md#responseitem)[] } }) => `void` | ||
#### Type declaration | ||
▸ (`data`): `void` | ||
##### Parameters | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `data` | [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `hide_reason`: [`ResponseStatus`](README.md#responsestatus) ; `id`: `string` ; `items`: [`ResponseItem`](README.md#responseitem)[] } } | | ||
##### Returns | ||
`void` | ||
___ | ||
### HookOnSurveyShowed | ||
Ƭ **HookOnSurveyShowed**: (`data`: [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `id`: `string` ; `items`: [`ResponseItem`](README.md#responseitem)[] } }) => `void` | ||
#### Type declaration | ||
▸ (`data`): `void` | ||
##### Parameters | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `data` | [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `id`: `string` ; `items`: [`ResponseItem`](README.md#responseitem)[] } } | | ||
##### Returns | ||
`void` | ||
___ | ||
### HookOnSurveyStarted | ||
Ƭ **HookOnSurveyStarted**: (`data`: [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `id`: `string` } }) => `void` | ||
#### Type declaration | ||
▸ (`data`): `void` | ||
##### Parameters | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `data` | [`HookCommonProperties`](README.md#hookcommonproperties) & { `response`: { `id`: `string` } } | | ||
##### Returns | ||
`void` | ||
___ | ||
### Hooks | ||
@@ -51,8 +224,8 @@ | ||
| :------ | :------ | :------ | | ||
| `onQuestionReplied?` | `HookOnQuestionReplied` | This hook is triggered when a question is answered | | ||
| `onReady?` | `HookOnReady` | This hook is triggered when Screeb SD is loaded, initialized and ready to rock | | ||
| `onSurveyCompleted?` | `HookOnSurveyCompleted` | This hook is triggered when a survey is completed | | ||
| `onSurveyHidden?` | `HookOnSurveyHidden` | This hook is triggered when a survey is hidden | | ||
| `onSurveyShowed?` | `HookOnSurveyShowed` | This hook is triggered when a survey is displayed on screen (also triggered when page is reloaded) | | ||
| `onSurveyStarted?` | `HookOnSurveyStarted` | This hook is triggered when a survey is started | | ||
| `onQuestionReplied?` | [`HookOnQuestionReplied`](README.md#hookonquestionreplied) | This hook is triggered when a question is answered | | ||
| `onReady?` | [`HookOnReady`](README.md#hookonready) | This hook is triggered when Screeb SD is loaded, initialized and ready to rock | | ||
| `onSurveyCompleted?` | [`HookOnSurveyCompleted`](README.md#hookonsurveycompleted) | This hook is triggered when a survey is completed | | ||
| `onSurveyHidden?` | [`HookOnSurveyHidden`](README.md#hookonsurveyhidden) | This hook is triggered when a survey is hidden | | ||
| `onSurveyShowed?` | [`HookOnSurveyShowed`](README.md#hookonsurveyshowed) | This hook is triggered when a survey is displayed on screen (also triggered when page is reloaded) | | ||
| `onSurveyStarted?` | [`HookOnSurveyStarted`](README.md#hookonsurveystarted) | This hook is triggered when a survey is started | | ||
| `version` | `string` | This defines the version of hooks and their data | | ||
@@ -82,2 +255,49 @@ | ||
### ResponseItem | ||
Ƭ **ResponseItem**: `Object` | ||
#### Type declaration | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `answer` | [`ResponseItemAnswer`](README.md#responseitemanswer) | | ||
| `question` | [`ResponseItemQuestion`](README.md#responseitemquestion) | | ||
___ | ||
### ResponseItemAnswer | ||
Ƭ **ResponseItemAnswer**: `Object` | ||
#### Type declaration | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `fields?` | { `boolean?`: `boolean` ; `number?`: `number` ; `text?`: `string` ; `time?`: `string` ; `type`: ``"string"`` \| ``"number"`` \| ``"boolean"`` \| ``"none"`` \| ``"time"`` \| ``"file"`` }[] | | ||
| `replied_at?` | `string` | | ||
___ | ||
### ResponseItemQuestion | ||
Ƭ **ResponseItemQuestion**: `Object` | ||
#### Type declaration | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `id` | `string` | | ||
| `title` | `string` | | ||
| `type` | ``"text"`` \| ``"video"`` | | ||
| `url?` | `string` | | ||
___ | ||
### ResponseStatus | ||
Ƭ **ResponseStatus**: ``"displayed"`` \| ``"started"`` \| ``"ended"`` \| ``"closed"`` \| ``"interrupted"`` | ||
___ | ||
### ScreebFunction | ||
@@ -144,2 +364,48 @@ | ||
___ | ||
### Survey | ||
Ƭ **Survey**: `Object` | ||
#### Type declaration | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `id` | `string` | | ||
| `survey_format` | [`SurveyFormat`](README.md#surveyformat) | | ||
| `survey_position` | [`SurveyPosition`](README.md#surveyposition) | | ||
| `survey_size` | ``100`` | | ||
___ | ||
### SurveyFormat | ||
Ƭ **SurveyFormat**: ``"conversationnal"`` \| ``"cards"`` | ||
___ | ||
### SurveyPosition | ||
Ƭ **SurveyPosition**: ``"center-left"`` \| ``"center-center"`` \| ``"center-right"`` \| ``"bottom-left"`` \| ``"bottom-center"`` \| ``"bottom-right"`` | ||
___ | ||
### SurveySize | ||
Ƭ **SurveySize**: ``25`` \| ``50`` \| ``75`` \| ``100`` \| ``125`` \| ``150`` | ||
___ | ||
### User | ||
Ƭ **User**: `Object` | ||
#### Type declaration | ||
| Name | Type | | ||
| :------ | :------ | | ||
| `anonymous_id` | `string` | | ||
| `userId?` | `string` | | ||
## Functions | ||
@@ -146,0 +412,0 @@ |
{ | ||
"name": "@screeb/sdk-browser", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"description": "Screeb's browser sdk.", | ||
@@ -31,7 +31,16 @@ "keywords": [ | ||
".": { | ||
"import": "./dist/es/index.js" | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.es.js" | ||
}, | ||
"require": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.cjs.js" | ||
} | ||
} | ||
}, | ||
"module": "dist/es/index.js", | ||
"types": "dist/es/index.d.ts", | ||
"module": "dist/index.es.js", | ||
"main": "dist/index.cjs.js", | ||
"jsnext:main": "dist/index.es.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
@@ -47,7 +56,7 @@ "dist", | ||
"lint": "eslint .", | ||
"test": "jest" | ||
"test": "echo 'test disabled'" | ||
}, | ||
"devDependencies": { | ||
"@screeb/eslint-config": "^0.1.6", | ||
"@screeb/typescript-config": "^0.1.6", | ||
"@screeb/typescript-config": "^0.1.7", | ||
"@types/jest": "^29.5.5", | ||
@@ -54,0 +63,0 @@ "@types/node": "^20.8.4", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65289
9
1348
1