Skip to content

Commit

Permalink
refactor: change dashboard notification types
Browse files Browse the repository at this point in the history
See: BEDS-481
  • Loading branch information
LuccaBitfly committed Oct 2, 2024
1 parent f0174b1 commit b29696d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions backend/pkg/api/types/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ type InternalGetUserNotificationsResponse ApiDataResponse[NotificationOverviewDa
type NotificationDashboardsTableRow struct {
IsAccountDashboard bool `json:"is_account_dashboard"` // if false it's a validator dashboard
ChainId uint64 `json:"chain_id"`
Timestamp int64 `json:"timestamp"`
Epoch uint64 `json:"epoch"`
DashboardId uint64 `json:"dashboard_id"`
GroupId uint64 `json:"group_id"`
GroupName string `json:"group_name"`
NotificationId uint64 `json:"notification_id"` // may be string? db schema is not defined afaik
EntityCount uint64 `json:"entity_count"`
EventTypes []string `json:"event_types" tstype:"('validator_online' | 'validator_offline' | 'group_online' | 'group_offline' | 'attestation_missed' | 'proposal_success' | 'proposal_missed' | 'proposal_upcoming' | 'max_collateral' | 'min_collateral' | 'sync' | 'withdrawal' | 'got_slashed' | 'has_slashed' | 'incoming_tx' | 'outgoing_tx' | 'transfer_erc20' | 'transfer_erc721' | 'transfer_erc1155')[]" faker:"oneof: validator_offline, group_offline, attestation_missed, proposal_success, proposal_missed, proposal_upcoming, max_collateral, min_collateral, sync, withdrawal, slashed_own, incoming_tx, outgoing_tx, transfer_erc20, transfer_erc721, transfer_erc1155"`
EventTypes []string `json:"event_types" tstype:"('validator_online' | 'validator_offline' | 'group_online' | 'group_offline' | 'attestation_missed' | 'proposal_success' | 'proposal_missed' | 'proposal_upcoming' | 'max_collateral' | 'min_collateral' | 'sync' | 'withdrawal' | 'got_slashed' | 'has_slashed' | 'incoming_tx' | 'outgoing_tx' | 'transfer_erc20' | 'transfer_erc721' | 'transfer_erc1155')[]" faker:"slice_len=2, oneof: validator_offline, group_offline, attestation_missed, proposal_success, proposal_missed, proposal_upcoming, max_collateral, min_collateral, sync, withdrawal, slashed_own, incoming_tx, outgoing_tx, transfer_erc20, transfer_erc721, transfer_erc1155"`
}

type InternalGetUserNotificationDashboardsResponse ApiPagingResponse[NotificationDashboardsTableRow]
Expand Down
4 changes: 2 additions & 2 deletions frontend/types/api/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export type InternalGetUserNotificationsResponse = ApiDataResponse<NotificationO
export interface NotificationDashboardsTableRow {
is_account_dashboard: boolean; // if false it's a validator dashboard
chain_id: number /* uint64 */;
timestamp: number /* int64 */;
epoch: number /* uint64 */;
dashboard_id: number /* uint64 */;
group_id: number /* uint64 */;
group_name: string;
notification_id: number /* uint64 */; // may be string? db schema is not defined afaik
entity_count: number /* uint64 */;
event_types: ('validator_online' | 'validator_offline' | 'group_online' | 'group_offline' | 'attestation_missed' | 'proposal_success' | 'proposal_missed' | 'proposal_upcoming' | 'max_collateral' | 'min_collateral' | 'sync' | 'withdrawal' | 'got_slashed' | 'has_slashed' | 'incoming_tx' | 'outgoing_tx' | 'transfer_erc20' | 'transfer_erc721' | 'transfer_erc1155')[];
}
Expand Down

0 comments on commit b29696d

Please sign in to comment.