-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* BC-5268 move alert api to nest --------- Co-authored-by: Tomasz Wiaderek <[email protected]> Co-authored-by: Cedric Evers <[email protected]>
- Loading branch information
1 parent
2cba8e4
commit 30fbd28
Showing
47 changed files
with
1,004 additions
and
458 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
apps/server/src/modules/alert/adapter/dto/component.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
export class ComponentDto { | ||
constructor( | ||
id: number, | ||
name: string, | ||
description: string, | ||
link: string, | ||
status: number, | ||
order: number, | ||
group_id: number, | ||
created_at: Date, | ||
updated_at: Date, | ||
deleted_at: Date, | ||
enabled: boolean, | ||
status_name: string | ||
) { | ||
this.id = id; | ||
this.name = name; | ||
this.description = description; | ||
this.link = link; | ||
this.status = status; | ||
this.order = order; | ||
this.group_id = group_id; | ||
this.created_at = created_at; | ||
this.updated_at = updated_at; | ||
this.deleted_at = deleted_at; | ||
this.enabled = enabled; | ||
this.status_name = status_name; | ||
} | ||
|
||
id: number; | ||
|
||
name: string; | ||
|
||
description: string; | ||
|
||
link: string; | ||
|
||
status: number; | ||
|
||
order: number; | ||
|
||
group_id: number; | ||
|
||
created_at: Date; | ||
|
||
updated_at: Date; | ||
|
||
deleted_at: Date; | ||
|
||
enabled: boolean; | ||
|
||
status_name: string; | ||
} |
9 changes: 9 additions & 0 deletions
9
apps/server/src/modules/alert/adapter/dto/component.response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { ComponentDto } from './component.dto'; | ||
|
||
export class ComponentResponse { | ||
constructor(data: ComponentDto) { | ||
this.data = data; | ||
} | ||
|
||
data: ComponentDto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
export class IncidentDto { | ||
constructor( | ||
id: number, | ||
component_id: number, | ||
name: string, | ||
status: number, | ||
message: string, | ||
created_at: Date, | ||
updated_at: Date, | ||
deleted_at: Date, | ||
visible: number, | ||
stickied: boolean, | ||
occurred_at: Date, | ||
user_id: number, | ||
notifications: boolean, | ||
is_resolved: boolean, | ||
human_status: string, | ||
latest_update_id: number, | ||
latest_status: number, | ||
latest_human_status: string, | ||
latest_icon: string, | ||
permalink: string, | ||
duration: number | ||
) { | ||
this.id = id; | ||
this.component_id = component_id; | ||
this.name = name; | ||
this.status = status; | ||
this.message = message; | ||
this.created_at = created_at; | ||
this.updated_at = updated_at; | ||
this.deleted_at = deleted_at; | ||
this.visible = visible; | ||
this.stickied = stickied; | ||
this.occurred_at = occurred_at; | ||
this.user_id = user_id; | ||
this.notifications = notifications; | ||
this.is_resolved = is_resolved; | ||
this.human_status = human_status; | ||
this.latest_update_id = latest_update_id; | ||
this.latest_status = latest_status; | ||
this.latest_human_status = latest_human_status; | ||
this.latest_icon = latest_icon; | ||
this.permalink = permalink; | ||
this.duration = duration; | ||
} | ||
|
||
id: number; | ||
|
||
component_id: number; | ||
|
||
name: string; | ||
|
||
status: number; | ||
|
||
message: string; | ||
|
||
created_at: Date; | ||
|
||
updated_at: Date; | ||
|
||
deleted_at: Date; | ||
|
||
visible: number; | ||
|
||
stickied: boolean; | ||
|
||
occurred_at: Date; | ||
|
||
user_id: number; | ||
|
||
notifications: boolean; | ||
|
||
is_resolved: boolean; | ||
|
||
human_status: string; | ||
|
||
latest_update_id: number; | ||
|
||
latest_status: number; | ||
|
||
latest_human_status: string; | ||
|
||
latest_icon: string; | ||
|
||
permalink: string; | ||
|
||
duration: number; | ||
} |
9 changes: 9 additions & 0 deletions
9
apps/server/src/modules/alert/adapter/dto/incidents.response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { IncidentDto } from './incident.dto'; | ||
|
||
export class IncidentsResponse { | ||
constructor(data: IncidentDto[]) { | ||
this.data = data; | ||
} | ||
|
||
data: IncidentDto[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from './component.dto'; | ||
export * from './component.response'; | ||
export * from './incident.dto'; | ||
export * from './incidents.response'; | ||
export * from './messages.dto'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Message } from '../../controller/dto'; | ||
|
||
export class MessagesDto { | ||
constructor(messages: [], success: boolean) { | ||
this.messages = messages; | ||
this.success = success; | ||
} | ||
|
||
messages: Message[]; | ||
|
||
success: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export enum Importance { | ||
INGORE = -1, | ||
ALL_INSTANCES = 0, | ||
CURRENT_INSTANCE = 1, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './importance'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './status.adapter'; |
Oops, something went wrong.