portainer-redeploy
Version:
A TypeScript client for redeploy a stack in Portainer
29 lines (28 loc) • 762 B
TypeScript
import { AxiosResponse } from 'axios';
interface EnvironmentVariable {
name: string;
value: string;
}
interface GitConfig {
Authentication: {
Username: string;
};
ReferenceName: string;
}
interface StackPayload {
Env: EnvironmentVariable[];
EndpointId: number;
GitConfig: GitConfig;
}
export default class PortainerClient {
private baseDomain;
private apiKey;
constructor(baseDomain: string, apiKey: string, selfSigned: boolean);
private getRequest;
getEndpoints(): Promise<AxiosResponse>;
getStacks(): Promise<AxiosResponse>;
getStack(stackId: string): Promise<AxiosResponse>;
redeployStack(stackId: string, payload: StackPayload): Promise<AxiosResponse>;
}
export {};