/** * A session retrieves a token upon creation and uses it for subsequent requests * against the Portainer API. */ export default class PortainerSession { private host; private token; /** * Instantiate with JWT token. For username+password auth, use PortainerSession.create() * * @param host Portainer URL (e.g. https://portainer.example.com) * @param token The JWT token received via authentication */ private constructor(); /** * Instantiate a new Portainer Session with username+password. * * @param host Portainer URL (e.g. https://portainer.example.com) * @param username Username to use for authentication * @param password Password to use for authentication */ static create(host: string, username: string, password: string): Promise; getSettings(): Promise; getPublicSettings(): Promise; static getPublicSettings(host: string): Promise; getDockerhubInfo(): Promise; getEndpointGroups(): Promise; getEndpointGroupById(id: string): Promise; getEndpoints(): Promise; getEndpointById(id: string): Promise; getRegistries(): Promise; getRegistryById(id: string): Promise; getStacks(): Promise; getStackById(id: string): Promise; getStackDefinitionFile(id: string): Promise; getStatus(): Promise; static getStatus(host: string): Promise; getTags(): Promise; getTagById(id: string): Promise; getTeamMemberships(): Promise; getTeams(): Promise; getTeamById(id: string): Promise; getTeamMembershipsByTeamId(id: string): Promise; getTemplates(): Promise; getTemplateById(id: string): Promise; getUsers(): Promise; getUserById(id: string): Promise; getMembershipsByUserId(id: string): Promise; }