Skip to main content

Api Code Documentation

Api Code Documentation / Exports

Table of contents#

Modules#

Interfaces#

Type aliases#

Functions#

Type aliases#

NotificationMetadata#

Ƭ NotificationMetadata: ProjectNotificationMetadata | SubprojectNotificationMetadata | WorkflowitemNotificationMetadata

Type representing the notification metadata

notexported

Defined in#

src/notification_list.ts:201

Functions#

exitIfMissing#

exitIfMissing(requiredEnvVars): void

Checks if required environment variables are set, stops the process otherwise

notexported

Parameters#

NameTypeDescription
requiredEnvVarsanyenvironment variables required for the API to run

Returns#

void

Defined in#

src/config.ts:121


getMetadata#

getMetadata(ctx, user, notification, service): Promise<NotificationMetadata | undefined>

Retrieves the metadata for a specific notification

notexported

Parameters#

NameTypeDescription
ctxCtxthe current context Ctx
userServiceUserthe ServiceUser performing the request
notificationNotificationthe {@link Notification.Notification} for which the metadata should be retrieved
serviceServicethe {@link Service} object used to offer an interface to the domain logic

Returns#

Promise<NotificationMetadata | undefined>

the notification metadata as a NotificationMetadata or undefined if no project and subproject id is provided in the {@link Notification.Notification}

Defined in#

src/notification_list.ts:353


getProjectMetadata#

getProjectMetadata(ctx, user, service, projectId): Promise<ProjectWithViewPermissions | ProjectWithoutViewPermissions>

Get the metadata of a project to show in the notification

notexported

Parameters#

NameTypeDescription
ctxCtxthe current context Ctx
userServiceUserthe ServiceUser performing the request
serviceServicethe {@link Service} object used to offer an interface to the domain logic
projectIdstringthe id of the project to be returned

Returns#

Promise<ProjectWithViewPermissions | ProjectWithoutViewPermissions>

a promise containing the metadata visible to a user either with or without permissions

Defined in#

src/notification_list.ts:260


getSubprojectMetadata#

getSubprojectMetadata(ctx, user, service, projectId, subprojectId): Promise<SubprojectWithViewPermissions | SubprojectWithoutViewPermissions>

Get the metadata of a subproject to show in the notification

notexported

Parameters#

NameTypeDescription
ctxCtxthe current context Ctx
userServiceUserthe ServiceUser performing the request
serviceServicethe {@link Service} object used to offer an interface to the domain logic
projectIdstringthe id of the project which contains the subproject
subprojectIdstringthe id of the subproject to be returned

Returns#

Promise<SubprojectWithViewPermissions | SubprojectWithoutViewPermissions>

a promise containing the metadata visible to a user either with or without permissions

Defined in#

src/notification_list.ts:288


getWorkflowitemMetadata#

getWorkflowitemMetadata(ctx, user, service, projectId, subprojectId, workflowitemId): Promise<WorkflowitemWithViewPermissions | WorkflowitemWithoutViewPermissions>

Get the metadata of a workflowitem to show in the notification

notexported

Parameters#

NameTypeDescription
ctxCtxthe current context Ctx
userServiceUserthe ServiceUser performing the request
serviceServicethe {@link Service} object used to offer an interface to the domain logic
projectIdstringthe id of the project which contains the workflowitem
subprojectIdstringthe id of the subproject which contains the workflowitem
workflowitemIdstringthe id of the workflowitem to be returned

Returns#

Promise<WorkflowitemWithViewPermissions | WorkflowitemWithoutViewPermissions>

a promise containing the metadata visible to a user either with or without permissions

Defined in#

src/notification_list.ts:318