Skip to main content

WebHook

Defined in: domain/WebHook.ts:16

Represents a WebHook entity. Extends Deletable to support soft deletion.

Remarks

Each webhook is associated with a specific project and contains a URL and secret.

Example

const webhook = new WebHook(101, 1, "https://example.com/hook", "secret123", new Date(), null);
console.log(webhook.url, webhook.secret);

Extends

Constructors

Constructor

new WebHook(
project_id,
id?,
url?,
secret?,
events?,
createdAt?,
deletedAt?): WebHook;

Defined in: domain/WebHook.ts:36

Creates a new WebHook instance.

Parameters

project_id

number

The ID of the project this webhook belongs to.

id?

number

The unique identifier for the webhook.

url?

string

The URL of the webhook.

secret?

string

The secret used for webhook authentication.

events?

string[]

createdAt?

Date

The date the webhook was created.

deletedAt?

The date the webhook was deleted (if applicable).

null | Date

Returns

WebHook

Overrides

Deletable.constructor

Properties

createdAt?

optional createdAt: Date;

Defined in: domain/WebHook.ts:25


deleted

deleted: boolean;

Defined in: types/Deletable.ts:21

Indicates whether the entity is deleted.

Inherited from

Deletable.deleted


deletedAt

deletedAt: null | Date;

Defined in: types/Deletable.ts:23

The date the entity was deleted, or null if not deleted.

Inherited from

Deletable.deletedAt


events?

optional events: string[];

Defined in: domain/WebHook.ts:24

The creation date of the webhook.


id?

optional id: number;

Defined in: types/Id.ts:15

The unique identifier for the entity.

Inherited from

Deletable.id


project_id

project_id: number;

Defined in: domain/WebHook.ts:18

The ID of the project this webhook belongs to.


secret?

optional secret: string;

Defined in: domain/WebHook.ts:22

The secret used for webhook authentication.


url?

optional url: string;

Defined in: domain/WebHook.ts:20

The URL of the webhook.