@@ -27,8 +27,7 @@ type NotificationOverviewData struct {
2727 ClientsSubscriptionCount uint64 `db:"clients_subscription_count" json:"clients_subscription_count"`
2828 NetworksSubscriptionCount uint64 `db:"networks_subscription_count" json:"networks_subscription_count"`
2929}
30-
31- type InternalGetUserNotificationsResponse ApiDataResponse [NotificationOverviewData ]
30+ type GetUserNotificationsResponse ApiDataResponse [NotificationOverviewData ]
3231
3332// ------------------------------------------------------------
3433// Dashboards Table
@@ -43,8 +42,7 @@ type NotificationDashboardsTableRow struct {
4342 EntityCount uint64 `db:"entity_count" json:"entity_count"`
4443 EventTypes pq.StringArray `db:"event_types" json:"event_types" tstype:"('validator_online' | 'validator_offline' | 'group_efficiency_below' | 'attestation_missed' | 'proposal_success' | 'proposal_missed' | 'proposal_upcoming' | 'max_collateral' | 'min_collateral' | 'sync' | 'withdrawal' | 'validator_got_slashed' | 'validator_has_slashed' | 'incoming_tx' | 'outgoing_tx' | 'transfer_erc20' | 'transfer_erc721' | 'transfer_erc1155')[]" faker:"slice_len=2, oneof: validator_online, validator_offline, group_efficiency_below, attestation_missed, proposal_success, proposal_missed, proposal_upcoming, max_collateral, min_collateral, sync, withdrawal, validator_got_slashed, validator_has_slashed, incoming_tx, outgoing_tx, transfer_erc20, transfer_erc721, transfer_erc1155"`
4544}
46-
47- type InternalGetUserNotificationDashboardsResponse ApiPagingResponse [NotificationDashboardsTableRow ]
45+ type GetUserNotificationDashboardsResponse ApiPagingResponse [NotificationDashboardsTableRow ]
4846
4947// ------------------------------------------------------------
5048// Validator Dashboard Notification Detail
@@ -53,13 +51,11 @@ type NotificationEventValidatorBackOnline struct {
5351 Index uint64 `json:"index"`
5452 EpochCount uint64 `json:"epoch_count"`
5553}
56-
5754type NotificationEventWithdrawal struct {
5855 Index uint64 `json:"index"`
5956 Amount decimal.Decimal `json:"amount"`
6057 Address Address `json:"address"`
6158}
62-
6359type NotificationValidatorDashboardDetail struct {
6460 DashboardName string `db:"dashboard_name" json:"dashboard_name"`
6561 GroupName string `db:"group_name" json:"group_name"`
@@ -77,25 +73,22 @@ type NotificationValidatorDashboardDetail struct {
7773 MinCollateral []Address `json:"min_collateral"` // node addresses
7874 MaxCollateral []Address `json:"max_collateral"` // node addresses
7975}
80-
81- type InternalGetUserNotificationsValidatorDashboardResponse ApiDataResponse [NotificationValidatorDashboardDetail ]
76+ type GetUserNotificationsValidatorDashboardResponse ApiDataResponse [NotificationValidatorDashboardDetail ]
8277
8378type NotificationEventExecution struct {
8479 Address Address `json:"address"`
8580 Amount decimal.Decimal `json:"amount"`
8681 TransactionHash Hash `json:"transaction_hash"`
8782 TokenName string `json:"token_name"` // this field will prob change depending on how execution stuff is implemented
8883}
89-
9084type NotificationAccountDashboardDetail struct {
9185 IncomingTransactions []NotificationEventExecution `json:"incoming_transactions"`
9286 OutgoingTransactions []NotificationEventExecution `json:"outgoing_transactions"`
9387 ERC20TokenTransfers []NotificationEventExecution `json:"erc20_token_transfers"`
9488 ERC721TokenTransfers []NotificationEventExecution `json:"erc721_token_transfers"`
9589 ERC1155TokenTransfers []NotificationEventExecution `json:"erc1155_token_transfers"`
9690}
97-
98- type InternalGetUserNotificationsAccountDashboardResponse ApiDataResponse [NotificationAccountDashboardDetail ]
91+ type GetUserNotificationsAccountDashboardResponse ApiDataResponse [NotificationAccountDashboardDetail ]
9992
10093// ------------------------------------------------------------
10194// Machines Table
@@ -105,8 +98,7 @@ type NotificationMachinesTableRow struct {
10598 EventType string `json:"event_type" tstype:"'offline' | 'storage' | 'cpu' | 'memory'" faker:"oneof: offline, storage, cpu, memory"`
10699 Timestamp int64 `json:"timestamp"`
107100}
108-
109- type InternalGetUserNotificationMachinesResponse ApiPagingResponse [NotificationMachinesTableRow ]
101+ type GetUserNotificationMachinesResponse ApiPagingResponse [NotificationMachinesTableRow ]
110102
111103// ------------------------------------------------------------
112104// Clients Table
@@ -116,8 +108,7 @@ type NotificationClientsTableRow struct {
116108 Url string `json:"url"`
117109 Timestamp int64 `json:"timestamp"`
118110}
119-
120- type InternalGetUserNotificationClientsResponse ApiPagingResponse [NotificationClientsTableRow ]
111+ type GetUserNotificationClientsResponse ApiPagingResponse [NotificationClientsTableRow ]
121112
122113// ------------------------------------------------------------
123114// Networks Table
@@ -127,8 +118,7 @@ type NotificationNetworksTableRow struct {
127118 EventType string `json:"event_type" tstype:"'new_reward_round' | 'gas_above' | 'gas_below' | 'participation_rate'" faker:"oneof: new_reward_round, gas_above, gas_below, participation_rate"`
128119 Threshold decimal.Decimal `json:"threshold,omitempty"` // participation rate threshold should also be passed as decimal string
129120}
130-
131- type InternalGetUserNotificationNetworksResponse ApiPagingResponse [NotificationNetworksTableRow ]
121+ type GetUserNotificationNetworksResponse ApiPagingResponse [NotificationNetworksTableRow ]
132122
133123// ------------------------------------------------------------
134124// Notification Settings
@@ -145,24 +135,23 @@ type NotificationNetwork struct {
145135 ChainId uint64 `json:"chain_id"`
146136 Settings NotificationSettingsNetwork `json:"settings"`
147137}
148- type InternalPutUserNotificationSettingsNetworksResponse ApiDataResponse [NotificationNetwork ]
138+ type PutUserNotificationSettingsNetworksResponse ApiDataResponse [NotificationNetwork ]
149139
150140type NotificationPairedDevice struct {
151141 Id uint64 `json:"id"`
152142 PairedTimestamp int64 `json:"paired_timestamp"`
153143 Name string `json:"name,omitempty"`
154144 IsNotificationsEnabled bool `json:"is_notifications_enabled"`
155145}
156- type InternalPutUserNotificationSettingsPairedDevicesResponse ApiDataResponse [NotificationPairedDevice ]
146+ type PutUserNotificationSettingsPairedDevicesResponse ApiDataResponse [NotificationPairedDevice ]
157147
158148type NotificationSettingsClient struct {
159149 Id uint64 `json:"id"`
160150 Name string `json:"name"`
161151 Category string `json:"category" tstype:"'execution_layer' | 'consensus_layer' | 'other'" faker:"oneof: execution_layer, consensus_layer, other"`
162152 IsSubscribed bool `json:"is_subscribed"`
163153}
164-
165- type InternalPutUserNotificationSettingsClientResponse ApiDataResponse [NotificationSettingsClient ]
154+ type PutUserNotificationSettingsClientResponse ApiDataResponse [NotificationSettingsClient ]
166155
167156type NotificationSettingsGeneral struct {
168157 DoNotDisturbTimestamp int64 `json:"do_not_disturb_timestamp"` // notifications are disabled until this timestamp
@@ -178,15 +167,16 @@ type NotificationSettingsGeneral struct {
178167 IsMachineMemoryUsageSubscribed bool `json:"is_machine_memory_usage_subscribed"`
179168 MachineMemoryUsageThreshold float64 `json:"machine_memory_usage_threshold" faker:"boundary_start=0, boundary_end=1"`
180169}
181- type InternalPutUserNotificationSettingsGeneralResponse ApiDataResponse [NotificationSettingsGeneral ]
170+ type PutUserNotificationSettingsGeneralResponse ApiDataResponse [NotificationSettingsGeneral ]
171+
182172type NotificationSettings struct {
183173 GeneralSettings NotificationSettingsGeneral `json:"general_settings"`
184174 HasMachines bool `json:"has_machines"`
185175 Networks []NotificationNetwork `json:"networks"`
186176 PairedDevices []NotificationPairedDevice `json:"paired_devices"`
187177 Clients []NotificationSettingsClient `json:"clients" faker:"slice_len=10"`
188178}
189- type InternalGetUserNotificationSettingsResponse ApiDataResponse [NotificationSettings ]
179+ type GetUserNotificationSettingsResponse ApiDataResponse [NotificationSettings ]
190180
191181type NotificationSettingsValidatorDashboard struct {
192182 WebhookUrl string `json:"webhook_url" faker:"url"`
@@ -207,8 +197,7 @@ type NotificationSettingsValidatorDashboard struct {
207197 IsMinCollateralSubscribed bool `json:"is_min_collateral_subscribed"`
208198 MinCollateralThreshold float64 `json:"min_collateral_threshold" faker:"boundary_start=0, boundary_end=1"`
209199}
210-
211- type InternalPutUserNotificationSettingsValidatorDashboardResponse ApiDataResponse [NotificationSettingsValidatorDashboard ]
200+ type PutUserNotificationSettingsValidatorDashboardResponse ApiDataResponse [NotificationSettingsValidatorDashboard ]
212201
213202type NotificationSettingsAccountDashboard struct {
214203 WebhookUrl string `json:"webhook_url" faker:"url"`
@@ -223,7 +212,7 @@ type NotificationSettingsAccountDashboard struct {
223212 IsERC721TokenTransfersSubscribed bool `json:"is_erc721_token_transfers_subscribed"`
224213 IsERC1155TokenTransfersSubscribed bool `json:"is_erc1155_token_transfers_subscribed"`
225214}
226- type InternalPutUserNotificationSettingsAccountDashboardResponse ApiDataResponse [NotificationSettingsAccountDashboard ]
215+ type PutUserNotificationSettingsAccountDashboardResponse ApiDataResponse [NotificationSettingsAccountDashboard ]
227216
228217type NotificationSettingsDashboardsTableRow struct {
229218 IsAccountDashboard bool `json:"is_account_dashboard"` // if false it's a validator dashboard
@@ -235,5 +224,4 @@ type NotificationSettingsDashboardsTableRow struct {
235224 Settings interface {} `json:"settings" tstype:"NotificationSettingsAccountDashboard | NotificationSettingsValidatorDashboard" faker:"-"`
236225 ChainIds []uint64 `json:"chain_ids" faker:"chain_ids"`
237226}
238-
239- type InternalGetUserNotificationSettingsDashboardsResponse ApiPagingResponse [NotificationSettingsDashboardsTableRow ]
227+ type GetUserNotificationSettingsDashboardsResponse ApiPagingResponse [NotificationSettingsDashboardsTableRow ]
0 commit comments