@screeb/sdk-react
Advanced tools
@@ -397,2 +397,2 @@ 'use strict'; | ||
| exports.useScreeb = useScreeb; | ||
| CONSTANTS.version = '0.2.0' | ||
| CONSTANTS.version = '0.2.1' |
@@ -1,2 +0,2 @@ | ||
| import { Hooks, PropertyRecord, ScreebIdentityGetReturn, ScreebOptions } from "@screeb/sdk-browser"; | ||
| import { HooksInit, HooksMessageStart, HooksSurveyStart, PropertyRecord, ScreebIdentityGetReturn, ScreebOptions } from "@screeb/sdk-browser"; | ||
| /** Properties of Screeb provider */ | ||
@@ -11,3 +11,3 @@ export type ScreebProps = { | ||
| /** Hooks to define callback for various event */ | ||
| hooks?: Hooks; | ||
| hooks?: HooksInit; | ||
| /** The language you want to force */ | ||
@@ -260,3 +260,3 @@ language?: string; | ||
| */ | ||
| export type InitFunction = (websiteId: string, userId?: string, userProperties?: PropertyRecord, hooks?: Hooks, language?: string) => Promise<void>; | ||
| export type InitFunction = (websiteId: string, userId?: string, userProperties?: PropertyRecord, hooks?: HooksInit, language?: string) => Promise<void>; | ||
| /** | ||
@@ -306,3 +306,3 @@ * Appends Screeb tag into your dom. | ||
| */ | ||
| export type SurveyStartFunction = (surveyId: string, distributionId: string, allowMultipleResponses: boolean, hiddenFields: PropertyRecord, hooks?: Hooks, language?: string) => Promise<unknown>; | ||
| export type SurveyStartFunction = (surveyId: string, distributionId: string, allowMultipleResponses: boolean, hiddenFields: PropertyRecord, hooks?: HooksSurveyStart, language?: string) => Promise<unknown>; | ||
| /** | ||
@@ -336,3 +336,3 @@ * Interrupts a running message. | ||
| */ | ||
| export type MessageStartFunction = (messageId: string, hiddenFields: PropertyRecord, hooks?: Hooks, language?: string) => Promise<unknown>; | ||
| export type MessageStartFunction = (messageId: string, hiddenFields: PropertyRecord, hooks?: HooksMessageStart, language?: string) => Promise<unknown>; | ||
| /** | ||
@@ -339,0 +339,0 @@ * Forces a targeting check. |
@@ -374,2 +374,2 @@ import { jsx } from 'react/jsx-runtime'; | ||
| export { ScreebProvider, useScreeb }; | ||
| CONSTANTS.version = '0.2.0' | ||
| CONSTANTS.version = '0.2.1' |
@@ -1,2 +0,2 @@ | ||
| import { Hooks, PropertyRecord, ScreebIdentityGetReturn, ScreebOptions } from "@screeb/sdk-browser"; | ||
| import { HooksInit, HooksMessageStart, HooksSurveyStart, PropertyRecord, ScreebIdentityGetReturn, ScreebOptions } from "@screeb/sdk-browser"; | ||
| /** Properties of Screeb provider */ | ||
@@ -11,3 +11,3 @@ export type ScreebProps = { | ||
| /** Hooks to define callback for various event */ | ||
| hooks?: Hooks; | ||
| hooks?: HooksInit; | ||
| /** The language you want to force */ | ||
@@ -260,3 +260,3 @@ language?: string; | ||
| */ | ||
| export type InitFunction = (websiteId: string, userId?: string, userProperties?: PropertyRecord, hooks?: Hooks, language?: string) => Promise<void>; | ||
| export type InitFunction = (websiteId: string, userId?: string, userProperties?: PropertyRecord, hooks?: HooksInit, language?: string) => Promise<void>; | ||
| /** | ||
@@ -306,3 +306,3 @@ * Appends Screeb tag into your dom. | ||
| */ | ||
| export type SurveyStartFunction = (surveyId: string, distributionId: string, allowMultipleResponses: boolean, hiddenFields: PropertyRecord, hooks?: Hooks, language?: string) => Promise<unknown>; | ||
| export type SurveyStartFunction = (surveyId: string, distributionId: string, allowMultipleResponses: boolean, hiddenFields: PropertyRecord, hooks?: HooksSurveyStart, language?: string) => Promise<unknown>; | ||
| /** | ||
@@ -336,3 +336,3 @@ * Interrupts a running message. | ||
| */ | ||
| export type MessageStartFunction = (messageId: string, hiddenFields: PropertyRecord, hooks?: Hooks, language?: string) => Promise<unknown>; | ||
| export type MessageStartFunction = (messageId: string, hiddenFields: PropertyRecord, hooks?: HooksMessageStart, language?: string) => Promise<unknown>; | ||
| /** | ||
@@ -339,0 +339,0 @@ * Forces a targeting check. |
+7
-7
@@ -369,3 +369,3 @@ @screeb/sdk-react | ||
| Ƭ **InitFunction**: (`websiteId`: `string`, `userId?`: `string`, `userProperties?`: `PropertyRecord`, `hooks?`: `Hooks`, `language?`: `string`) => `Promise`\<`void`\> | ||
| Ƭ **InitFunction**: (`websiteId`: `string`, `userId?`: `string`, `userProperties?`: `PropertyRecord`, `hooks?`: `HooksInit`, `language?`: `string`) => `Promise`\<`void`\> | ||
@@ -404,3 +404,3 @@ Initializes Screeb tag. | ||
| | `userProperties?` | `PropertyRecord` | The properties of your user. ```text Requirements: - Property names must be limited to 128 characters - No more than 1000 attributes - Supported types for values: string, number, boolean and Date ``` | | ||
| | `hooks?` | `Hooks` | - | | ||
| | `hooks?` | `HooksInit` | - | | ||
| | `language?` | `string` | Force a specific language for the tag. eg: 'en'. default: browser language. | | ||
@@ -470,3 +470,3 @@ | ||
| Ƭ **MessageStartFunction**: (`messageId`: `string`, `hiddenFields`: `PropertyRecord`, `hooks?`: `Hooks`, `language?`: `string`) => `Promise`\<`unknown`\> | ||
| Ƭ **MessageStartFunction**: (`messageId`: `string`, `hiddenFields`: `PropertyRecord`, `hooks?`: `HooksMessageStart`, `language?`: `string`) => `Promise`\<`unknown`\> | ||
@@ -500,3 +500,3 @@ Starts a message by its ID. | ||
| | `hiddenFields` | `PropertyRecord` | | ||
| | `hooks?` | `Hooks` | | ||
| | `hooks?` | `HooksMessageStart` | | ||
| | `language?` | `string` | | ||
@@ -550,3 +550,3 @@ | ||
| | :------ | :------ | :------ | | ||
| | `hooks?` | `Hooks` | Hooks to define callback for various event | | ||
| | `hooks?` | `HooksInit` | Hooks to define callback for various event | | ||
| | `language?` | `string` | The language you want to force | | ||
@@ -593,3 +593,3 @@ | `userId?` | `string` | The unique identifier of your user. | | ||
| Ƭ **SurveyStartFunction**: (`surveyId`: `string`, `distributionId`: `string`, `allowMultipleResponses`: `boolean`, `hiddenFields`: `PropertyRecord`, `hooks?`: `Hooks`, `language?`: `string`) => `Promise`\<`unknown`\> | ||
| Ƭ **SurveyStartFunction**: (`surveyId`: `string`, `distributionId`: `string`, `allowMultipleResponses`: `boolean`, `hiddenFields`: `PropertyRecord`, `hooks?`: `HooksSurveyStart`, `language?`: `string`) => `Promise`\<`unknown`\> | ||
@@ -626,3 +626,3 @@ Starts a survey by its ID. | ||
| | `hiddenFields` | `PropertyRecord` | | ||
| | `hooks?` | `Hooks` | | ||
| | `hooks?` | `HooksSurveyStart` | | ||
| | `language?` | `string` | | ||
@@ -629,0 +629,0 @@ |
+2
-3
| { | ||
| "name": "@screeb/sdk-react", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "description": "Screeb's browser sdk, optimized for React.", | ||
@@ -44,7 +44,6 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@screeb/sdk-browser": "^0.2.0" | ||
| "@screeb/sdk-browser": "^0.2.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@screeb/eslint-config": "^0.1.6", | ||
| "@screeb/sdk-browser": "^0.1.6", | ||
| "@screeb/typescript-config": "^0.1.10", | ||
@@ -51,0 +50,0 @@ "@types/jest": "^29.5.5", |
83573
0.2%19
-5%Updated