Skip to content

Commit

Permalink
chore(*): updated types for messages hooks & commands
Browse files Browse the repository at this point in the history
  • Loading branch information
MD4 committed Oct 11, 2024
1 parent 8a58713 commit 3514f90
Show file tree
Hide file tree
Showing 13 changed files with 349 additions and 97 deletions.
7 changes: 0 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/screeb-sdk-angular/docs/classes/Screeb.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ Initializes Screeb tag.
| `websiteId` | `string` | Your website/channel id. |
| `userId?` | `string` | The unique identifier of your user. |
| `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. |

#### Returns
Expand Down Expand Up @@ -454,7 +454,7 @@ Starts a message by its ID.
| :------ | :------ |
| `messageId` | `string` |
| `hiddenFields` | `PropertyRecord` |
| `hooks?` | `Hooks` |
| `hooks?` | `HooksMessageStart` |
| `language?` | `string` |

#### Returns
Expand Down Expand Up @@ -513,7 +513,7 @@ Starts a survey by its ID.
| `distributionId` | `string` |
| `allowMultipleResponses` | `boolean` |
| `hiddenFields` | `PropertyRecord` |
| `hooks?` | `Hooks` |
| `hooks?` | `HooksSurveyStart` |
| `language?` | `string` |

#### Returns
Expand Down
2 changes: 1 addition & 1 deletion packages/screeb-sdk-angular/docs/classes/ScreebConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ___

### hooks

`Optional` **hooks**: `Hooks`
`Optional` **hooks**: `HooksInit`

Hooks to define callback for various event

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from "@angular/core";
import { Hooks, PropertyRecord, ScreebOptions } from "@screeb/sdk-browser";
import { HooksInit, PropertyRecord, ScreebOptions } from "@screeb/sdk-browser";

/** Configuration of Screeb module */
@Injectable({ providedIn: "root" })
Expand All @@ -11,7 +11,7 @@ export class ScreebConfig {
/** The properties of your user. */
userProperties?: PropertyRecord;
/** Hooks to define callback for various event */
hooks?: Hooks;
hooks?: HooksInit;
/**
* Indicates if Screeb should be automatically loaded.
* This will ping to the Screeb servers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export class Screeb {
distributionId: string,
allowMultipleResponses: boolean,
hiddenFields: _Screeb.PropertyRecord,
hooks?: _Screeb.Hooks,
hooks?: _Screeb.HooksSurveyStart,
language?: string
) {
await this.ensureScreeb("surveyStart");
Expand Down Expand Up @@ -377,7 +377,7 @@ export class Screeb {
public async messageStart(
messageId: string,
hiddenFields: _Screeb.PropertyRecord,
hooks?: _Screeb.Hooks,
hooks?: _Screeb.HooksMessageStart,
language?: string
) {
await this.ensureScreeb("messageStart");
Expand Down Expand Up @@ -464,7 +464,7 @@ export class Screeb {
websiteId: string,
userId?: string,
userProperties?: _Screeb.PropertyRecord,
hooks?: _Screeb.Hooks,
hooks?: _Screeb.HooksInit,
language?: string
) {
await this.ensureScreeb("init", true);
Expand Down
Loading

0 comments on commit 3514f90

Please sign in to comment.