From a2e849e168bb7875fbb24db61bfd2b7397c275d3 Mon Sep 17 00:00:00 2001 From: tristan Date: Mon, 6 Apr 2026 13:34:48 +0200 Subject: [PATCH] feat : add Application/Environment/LogFile TypeScript types --- frontend/services/dto/application.ts | 46 ++++++++++++++++++++ frontend/services/dto/managed-application.ts | 10 ----- 2 files changed, 46 insertions(+), 10 deletions(-) create mode 100644 frontend/services/dto/application.ts delete mode 100644 frontend/services/dto/managed-application.ts diff --git a/frontend/services/dto/application.ts b/frontend/services/dto/application.ts new file mode 100644 index 0000000..9010486 --- /dev/null +++ b/frontend/services/dto/application.ts @@ -0,0 +1,46 @@ +type LogFile = { + id?: number + label: string + path: string +} + +type Environment = { + id?: number + '@id'?: string + name: string + containerName: string + deployScriptPath: string + maintenanceFilePath: string + appUrl?: string + logFiles: LogFile[] + maintenance: boolean +} + +type EnvironmentWrite = { + name: string + containerName: string + deployScriptPath: string + maintenanceFilePath: string + appUrl?: string + logFiles: LogFile[] +} + +type Application = { + id?: number + '@id'?: string + slug: string + name: string + registryImage: string + description?: string + giteaUrl?: string + createdAt?: string + environments?: Environment[] +} + +type ApplicationWrite = { + name: string + slug: string + registryImage: string + description?: string + giteaUrl?: string +} diff --git a/frontend/services/dto/managed-application.ts b/frontend/services/dto/managed-application.ts deleted file mode 100644 index d24ae6b..0000000 --- a/frontend/services/dto/managed-application.ts +++ /dev/null @@ -1,10 +0,0 @@ -export type ManagedApplication = { - slug: string - name: string - maintenance: boolean -} - -export type ManagedApplicationCollection = { - 'hydra:member'?: ManagedApplication[] - member?: ManagedApplication[] -}