From 12171606e981e187d08257f6b46195d5d23edd0b Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 19 Apr 2023 21:13:11 +0100 Subject: [PATCH] Adds type definitions for Templates --- src/Types.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/Types.ts diff --git a/src/Types.ts b/src/Types.ts new file mode 100644 index 0000000..d3ccb87 --- /dev/null +++ b/src/Types.ts @@ -0,0 +1,30 @@ +export interface PortainerAppTemplate { + version: string; + templates: Template[]; +} + +export interface Template { + type: 1 | 2 | 3; // 1 = Container, 2 = Swarm stack, 3 = Compose stack + title: string; + description: string; + categories: string[]; + platform: string; + command?: string; + interactive?: boolean; + logo: string; + image: string; + restart_policy?: 'always' | 'unless-stopped' | 'on-failure' | 'no'; + ports?: string[]; + volumes?: Volume[]; + environment?: Environment[]; +} + +export interface Volume { + bind: string; + container: string; +} + +export interface Environment { + name: string; + label?: string; +}