Adds type definitions for Templates

This commit is contained in:
Alicia Sykes
2023-04-19 21:13:11 +01:00
parent fef32824de
commit 12171606e9

30
src/Types.ts Normal file
View File

@@ -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;
}