next-lxd 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ import { Resource } from "./Resource";
2
+
3
+ import type {
4
+ LxdWarningsResponse,
5
+ LxdWarningResponse,
6
+ LxdWarningPut,
7
+ LxdBaseResponse,
8
+ } from "../types";
9
+
10
+ export class Warnings extends Resource {
11
+ async list(project?: string): Promise<LxdWarningsResponse> {
12
+ return this.client.request({
13
+ method: "GET",
14
+ path: `/1.0/warnings${project ? `?project=${project}` : ""}`,
15
+ }) as Promise<LxdWarningsResponse>;
16
+ }
17
+
18
+ async get(uuid: string): Promise<LxdWarningResponse> {
19
+ return this.client.request({
20
+ method: "GET",
21
+ path: `/1.0/warnings/${uuid}`,
22
+ }) as Promise<LxdWarningResponse>;
23
+ }
24
+
25
+ async put(uuid: string, data: LxdWarningPut): Promise<LxdBaseResponse<void>> {
26
+ return this.client.request({
27
+ method: "PUT",
28
+ path: `/1.0/warnings/${uuid}`,
29
+ body: data,
30
+ }) as Promise<LxdBaseResponse<void>>;
31
+ }
32
+
33
+ async delete(uuid: string): Promise<LxdBaseResponse<void>> {
34
+ return this.client.request({
35
+ method: "DELETE",
36
+ path: `/1.0/warnings/${uuid}`,
37
+ }) as Promise<LxdBaseResponse<void>>;
38
+ }
39
+ }
package/index.ts ADDED
@@ -0,0 +1,19 @@
1
+ export { Client } from './classes/Client';
2
+ export { Instances } from './classes/Instances';
3
+ export { Instance } from './classes/Instance';
4
+ export { Images } from './classes/Images';
5
+ export { Image } from './classes/Image';
6
+ export { Networks } from './classes/Networks';
7
+ export { Network } from './classes/Network';
8
+ export { Profiles } from './classes/Profiles';
9
+ export { Profile } from './classes/Profile';
10
+ export { Projects } from './classes/Projects';
11
+ export { Project } from './classes/Project';
12
+ export { StoragePools } from './classes/StoragePools';
13
+ export { StoragePool } from './classes/StoragePool';
14
+ export { Certificates } from './classes/Certificates';
15
+ export { Certificate } from './classes/Certificate';
16
+ export { Operations } from './classes/Operations';
17
+ export { Operation } from './classes/Operation';
18
+ export { Cluster } from './classes/Cluster';
19
+ export { Warnings } from './classes/Warnings';