@canonical/jujulib
Version:
Juju API client
66 lines (64 loc) • 1.58 kB
TypeScript
/**
Juju Block version 2.
This facade is available on:
Models
NOTE: This file was generated using the Juju schema
from Juju 3.3 at the git SHA 65fa4c1ee5.
Do not manually edit this file.
*/
import { ConnectionInfo, Transport } from "../../client.js";
import { Facade } from "../../types.js";
export interface Block {
id: string;
message?: string;
tag: string;
type: string;
}
export interface BlockResult {
error?: Error;
result: Block;
}
export interface BlockResults {
results?: BlockResult[];
}
export interface BlockSwitchParams {
message?: string;
type: string;
}
export interface Error {
code: string;
info?: AdditionalProperties;
message: string;
}
export interface ErrorResult {
error?: Error;
}
export interface AdditionalProperties {
[key: string]: any;
}
/**
API implements Block interface and is the concrete
implementation of the api end point.
*/
declare class BlockV2 implements Facade {
static NAME: string;
static VERSION: number;
NAME: string;
VERSION: number;
_transport: Transport;
_info: ConnectionInfo;
constructor(transport: Transport, info: ConnectionInfo);
/**
List implements Block.List().
*/
list(params: any): Promise<BlockResults>;
/**
SwitchBlockOff implements Block.SwitchBlockOff().
*/
switchBlockOff(params: BlockSwitchParams): Promise<ErrorResult>;
/**
SwitchBlockOn implements Block.SwitchBlockOn().
*/
switchBlockOn(params: BlockSwitchParams): Promise<ErrorResult>;
}
export default BlockV2;