From 43dfe6b190f31fa2326f434cdf1280666d5268eb Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Sat, 22 Nov 2025 17:50:58 +0100 Subject: [PATCH] chore: fix typing issue --- app/client/api-client/types.gen.ts | 60 +++++++++++++++++-- .../components/create-notification-form.tsx | 2 +- 2 files changed, 55 insertions(+), 7 deletions(-) diff --git a/app/client/api-client/types.gen.ts b/app/client/api-client/types.gen.ts index e6b8892..ffb49f5 100644 --- a/app/client/api-client/types.gen.ts +++ b/app/client/api-client/types.gen.ts @@ -1841,6 +1841,12 @@ export type GetScheduleNotificationsResponses = { createdAt: number; destination: { config: { + apiToken: string; + priority: -1 | 0 | 1; + type: 'pushover'; + userKey: string; + devices?: string; + } | { from: string; password: string; smtpHost: string; @@ -1879,7 +1885,7 @@ export type GetScheduleNotificationsResponses = { enabled: boolean; id: number; name: string; - type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'slack'; + type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'pushover' | 'slack'; updatedAt: number; }; destinationId: number; @@ -1916,6 +1922,12 @@ export type UpdateScheduleNotificationsResponses = { createdAt: number; destination: { config: { + apiToken: string; + priority: -1 | 0 | 1; + type: 'pushover'; + userKey: string; + devices?: string; + } | { from: string; password: string; smtpHost: string; @@ -1954,7 +1966,7 @@ export type UpdateScheduleNotificationsResponses = { enabled: boolean; id: number; name: string; - type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'slack'; + type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'pushover' | 'slack'; updatedAt: number; }; destinationId: number; @@ -1980,6 +1992,12 @@ export type ListNotificationDestinationsResponses = { */ 200: Array<{ config: { + apiToken: string; + priority: -1 | 0 | 1; + type: 'pushover'; + userKey: string; + devices?: string; + } | { from: string; password: string; smtpHost: string; @@ -2018,7 +2036,7 @@ export type ListNotificationDestinationsResponses = { enabled: boolean; id: number; name: string; - type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'slack'; + type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'pushover' | 'slack'; updatedAt: number; }>; }; @@ -2028,6 +2046,12 @@ export type ListNotificationDestinationsResponse = ListNotificationDestinationsR export type CreateNotificationDestinationData = { body?: { config: { + apiToken: string; + priority: -1 | 0 | 1; + type: 'pushover'; + userKey: string; + devices?: string; + } | { from: string; password: string; smtpHost: string; @@ -2075,6 +2099,12 @@ export type CreateNotificationDestinationResponses = { */ 201: { config: { + apiToken: string; + priority: -1 | 0 | 1; + type: 'pushover'; + userKey: string; + devices?: string; + } | { from: string; password: string; smtpHost: string; @@ -2113,7 +2143,7 @@ export type CreateNotificationDestinationResponses = { enabled: boolean; id: number; name: string; - type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'slack'; + type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'pushover' | 'slack'; updatedAt: number; }; }; @@ -2169,6 +2199,12 @@ export type GetNotificationDestinationResponses = { */ 200: { config: { + apiToken: string; + priority: -1 | 0 | 1; + type: 'pushover'; + userKey: string; + devices?: string; + } | { from: string; password: string; smtpHost: string; @@ -2207,7 +2243,7 @@ export type GetNotificationDestinationResponses = { enabled: boolean; id: number; name: string; - type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'slack'; + type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'pushover' | 'slack'; updatedAt: number; }; }; @@ -2217,6 +2253,12 @@ export type GetNotificationDestinationResponse = GetNotificationDestinationRespo export type UpdateNotificationDestinationData = { body?: { config?: { + apiToken: string; + priority: -1 | 0 | 1; + type: 'pushover'; + userKey: string; + devices?: string; + } | { from: string; password: string; smtpHost: string; @@ -2274,6 +2316,12 @@ export type UpdateNotificationDestinationResponses = { */ 200: { config: { + apiToken: string; + priority: -1 | 0 | 1; + type: 'pushover'; + userKey: string; + devices?: string; + } | { from: string; password: string; smtpHost: string; @@ -2312,7 +2360,7 @@ export type UpdateNotificationDestinationResponses = { enabled: boolean; id: number; name: string; - type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'slack'; + type: 'custom' | 'discord' | 'email' | 'gotify' | 'ntfy' | 'pushover' | 'slack'; updatedAt: number; }; }; diff --git a/app/client/modules/notifications/components/create-notification-form.tsx b/app/client/modules/notifications/components/create-notification-form.tsx index 79b4353..7d3c562 100644 --- a/app/client/modules/notifications/components/create-notification-form.tsx +++ b/app/client/modules/notifications/components/create-notification-form.tsx @@ -68,7 +68,7 @@ const defaultValuesForType = { type: "pushover" as const, userKey: "", apiToken: "", - priority: 0, + priority: 0 as const, }, custom: { type: "custom" as const,