Skip to main content

Project

Defined in: domain/Project.ts:25

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

Remarks​

Use the provided getter methods to retrieve related collections such as API keys, webhooks, events, members, and memberships.

Example​

const project = new Project(1, 101, "My Project", "guid-123", new Date(), null);
const apiKeys = await project.getApiKeys();
const webhooks = await project.getWebHooks();
const events = await project.getEvents();
const members = await project.getMembers();
const memberships = await project.getMemberships();

Extends​

Constructors​

Constructor​

new Project(
organisation_id,
id?,
name?,
guid?,
apiKey?,
createdAt?,
deletedAt?): Project;

Defined in: domain/Project.ts:77

Creates a new Project instance.

Parameters​

organisation_id​

number

The ID of the organisation this project belongs to.

id?​

number

The unique identifier for the project.

name?​

string

The name of the project.

guid?​

string

The GUID of the project.

apiKey?​

string

The Api key of the project.

createdAt?​

Date

The date the project was created.

deletedAt?​

The date the project was deleted (if applicable).

null | Date

Returns​

Project

Overrides​

Deletable.constructor

Properties​

apiKey?​

optional apiKey: string;

Defined in: domain/Project.ts:31

The Api key of the project.


createdAt?​

optional createdAt: Date;

Defined in: domain/Project.ts:35

The creation date of the project.


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


guid?​

optional guid: string;

Defined in: domain/Project.ts:29

The GUID of the project.


id?​

optional id: number;

Defined in: types/Id.ts:15

The unique identifier for the entity.

Inherited from​

Deletable.id


name?​

optional name: string;

Defined in: domain/Project.ts:27

The name of the project.


organisation_id​

organisation_id: number;

Defined in: domain/Project.ts:33

The organisation ID this project belongs to.

Methods​

getApiKeys()​

getApiKeys(): Promise<ApiKeys>;

Defined in: domain/Project.ts:98

Retrieves the API keys associated with this project.

Returns​

Promise<ApiKeys>

A promise that resolves to an ApiKeys instance.


getEvents()​

getEvents(): Promise<Events>;

Defined in: domain/Project.ts:120

Retrieves the events associated with this project.

Returns​

Promise<Events>

A promise that resolves to an Events instance.


getMembers()​

getMembers(): Promise<Members>;

Defined in: domain/Project.ts:131

Retrieves the members associated with this project.

Returns​

Promise<Members>

A promise that resolves to a Members instance.


getMemberships()​

getMemberships(): Promise<Memberships>;

Defined in: domain/Project.ts:142

Retrieves the memberships associated with this project.

Returns​

Promise<Memberships>

A promise that resolves to a Memberships instance.


getWebHooks()​

getWebHooks(): Promise<WebHooks>;

Defined in: domain/Project.ts:109

Retrieves the webhooks associated with this project.

Returns​

Promise<WebHooks>

A promise that resolves to a WebHooks instance.