@homeflare/distilled-proxmox-backup 0.2.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.
- package/LICENSE +201 -0
- package/README.md +102 -0
- package/dist/credentials.d.ts +50 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +105 -0
- package/dist/credentials.js.map +1 -0
- package/dist/errors.d.ts +100 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +73 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol.d.ts +19 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +158 -0
- package/dist/protocol.js.map +1 -0
- package/dist/protocol.test.d.ts +2 -0
- package/dist/protocol.test.d.ts.map +1 -0
- package/dist/protocol.test.js +75 -0
- package/dist/protocol.test.js.map +1 -0
- package/dist/retry.d.ts +53 -0
- package/dist/retry.d.ts.map +1 -0
- package/dist/retry.js +46 -0
- package/dist/retry.js.map +1 -0
- package/dist/services/access.d.ts +587 -0
- package/dist/services/access.d.ts.map +1 -0
- package/dist/services/access.js +787 -0
- package/dist/services/access.js.map +1 -0
- package/dist/services/admin.d.ts +1110 -0
- package/dist/services/admin.d.ts.map +1 -0
- package/dist/services/admin.js +1428 -0
- package/dist/services/admin.js.map +1 -0
- package/dist/services/backup.d.ts +224 -0
- package/dist/services/backup.d.ts.map +1 -0
- package/dist/services/backup.js +325 -0
- package/dist/services/backup.js.map +1 -0
- package/dist/services/config.d.ts +3662 -0
- package/dist/services/config.d.ts.map +1 -0
- package/dist/services/config.js +4445 -0
- package/dist/services/config.js.map +1 -0
- package/dist/services/index.d.ts +14 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +15 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/nodes.d.ts +1441 -0
- package/dist/services/nodes.d.ts.map +1 -0
- package/dist/services/nodes.js +1829 -0
- package/dist/services/nodes.js.map +1 -0
- package/dist/services/ping.d.ts +15 -0
- package/dist/services/ping.d.ts.map +1 -0
- package/dist/services/ping.js +21 -0
- package/dist/services/ping.js.map +1 -0
- package/dist/services/pull.d.ts +54 -0
- package/dist/services/pull.d.ts.map +1 -0
- package/dist/services/pull.js +47 -0
- package/dist/services/pull.js.map +1 -0
- package/dist/services/push.d.ts +50 -0
- package/dist/services/push.d.ts.map +1 -0
- package/dist/services/push.js +45 -0
- package/dist/services/push.js.map +1 -0
- package/dist/services/reader.d.ts +68 -0
- package/dist/services/reader.d.ts.map +1 -0
- package/dist/services/reader.js +89 -0
- package/dist/services/reader.js.map +1 -0
- package/dist/services/root.d.ts +14 -0
- package/dist/services/root.d.ts.map +1 -0
- package/dist/services/root.js +19 -0
- package/dist/services/root.js.map +1 -0
- package/dist/services/status.d.ts +78 -0
- package/dist/services/status.d.ts.map +1 -0
- package/dist/services/status.js +97 -0
- package/dist/services/status.js.map +1 -0
- package/dist/services/tape.d.ts +711 -0
- package/dist/services/tape.d.ts.map +1 -0
- package/dist/services/tape.js +986 -0
- package/dist/services/tape.js.map +1 -0
- package/dist/services/version.d.ts +17 -0
- package/dist/services/version.d.ts.map +1 -0
- package/dist/services/version.js +25 -0
- package/dist/services/version.js.map +1 -0
- package/dist/task.d.ts +48 -0
- package/dist/task.d.ts.map +1 -0
- package/dist/task.js +57 -0
- package/dist/task.js.map +1 -0
- package/dist/traits.d.ts +13 -0
- package/dist/traits.d.ts.map +1 -0
- package/dist/traits.js +15 -0
- package/dist/traits.js.map +1 -0
- package/package.json +81 -0
- package/src/credentials.ts +139 -0
- package/src/errors.ts +126 -0
- package/src/index.ts +36 -0
- package/src/protocol.test.ts +128 -0
- package/src/protocol.ts +196 -0
- package/src/retry.ts +79 -0
- package/src/services/access.ts +1787 -0
- package/src/services/admin.ts +3258 -0
- package/src/services/backup.ts +698 -0
- package/src/services/config.ts +10561 -0
- package/src/services/index.ts +14 -0
- package/src/services/nodes.ts +4313 -0
- package/src/services/ping.ts +43 -0
- package/src/services/pull.ts +118 -0
- package/src/services/push.ts +108 -0
- package/src/services/reader.ts +196 -0
- package/src/services/root.ts +39 -0
- package/src/services/status.ts +233 -0
- package/src/services/tape.ts +2257 -0
- package/src/services/version.ts +49 -0
- package/src/task.ts +84 -0
- package/src/traits.ts +46 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (apidoc.js, via scripts/apidoc.ts — see its header). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as T from "../traits.ts";
|
|
5
|
+
import {
|
|
6
|
+
ProxmoxBackupProtocol,
|
|
7
|
+
type ProxmoxBackupOpError,
|
|
8
|
+
type ProxmoxBackupOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import * as Retry from "../retry.ts";
|
|
11
|
+
|
|
12
|
+
export type { ProxmoxBackupOpError, ProxmoxBackupOpContext };
|
|
13
|
+
|
|
14
|
+
export interface GetStatusRequest {}
|
|
15
|
+
export const GetStatusRequest = /*@__PURE__*/ S.suspend(() =>
|
|
16
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/status", code: 200 })),
|
|
17
|
+
).annotate({
|
|
18
|
+
identifier: "GetStatusRequest",
|
|
19
|
+
}) as any as S.Schema<GetStatusRequest>;
|
|
20
|
+
|
|
21
|
+
export interface GetStatusResponse {}
|
|
22
|
+
export const GetStatusResponse = /*@__PURE__*/ S.suspend(() =>
|
|
23
|
+
S.Struct({}),
|
|
24
|
+
).annotate({
|
|
25
|
+
identifier: "GetStatusResponse",
|
|
26
|
+
}) as any as S.Schema<GetStatusResponse>;
|
|
27
|
+
|
|
28
|
+
export interface GetStatusMetricsRequest {
|
|
29
|
+
/** Include historic values (last 30 minutes) */
|
|
30
|
+
history?: string;
|
|
31
|
+
/** Only return values with a timestamp > start-time. Only has an effect if 'history' is also set */
|
|
32
|
+
start_time?: string;
|
|
33
|
+
}
|
|
34
|
+
export const GetStatusMetricsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
35
|
+
S.Struct({
|
|
36
|
+
history: S.optional(S.String.pipe(T.Query())),
|
|
37
|
+
start_time: S.optional(S.String.pipe(T.Query("start-time"))),
|
|
38
|
+
}).pipe(T.Http({ method: "GET", uri: "/status/metrics", code: 200 })),
|
|
39
|
+
).annotate({
|
|
40
|
+
identifier: "GetStatusMetricsRequest",
|
|
41
|
+
}) as any as S.Schema<GetStatusMetricsRequest>;
|
|
42
|
+
|
|
43
|
+
export interface GetStatusMetricsResponse {}
|
|
44
|
+
export const GetStatusMetricsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
45
|
+
S.Struct({}),
|
|
46
|
+
).annotate({
|
|
47
|
+
identifier: "GetStatusMetricsResponse",
|
|
48
|
+
}) as any as S.Schema<GetStatusMetricsResponse>;
|
|
49
|
+
|
|
50
|
+
export interface ListStatusDatastoreUsageRequest {}
|
|
51
|
+
export const ListStatusDatastoreUsageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
52
|
+
S.Struct({}).pipe(
|
|
53
|
+
T.Http({ method: "GET", uri: "/status/datastore-usage", code: 200 }),
|
|
54
|
+
),
|
|
55
|
+
).annotate({
|
|
56
|
+
identifier: "ListStatusDatastoreUsageRequest",
|
|
57
|
+
}) as any as S.Schema<ListStatusDatastoreUsageRequest>;
|
|
58
|
+
|
|
59
|
+
export type ListStatusDatastoreUsageResponseBodyItemBackendType =
|
|
60
|
+
| "filesystem"
|
|
61
|
+
| "s3";
|
|
62
|
+
export const ListStatusDatastoreUsageResponseBodyItemBackendType = S.String;
|
|
63
|
+
|
|
64
|
+
export interface ListStatusDatastoreUsageResponseBodyItemGcStatusCacheStats {
|
|
65
|
+
hits: number;
|
|
66
|
+
misses: number;
|
|
67
|
+
}
|
|
68
|
+
export const ListStatusDatastoreUsageResponseBodyItemGcStatusCacheStats =
|
|
69
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
70
|
+
S.Struct({
|
|
71
|
+
hits: S.Number,
|
|
72
|
+
misses: S.Number,
|
|
73
|
+
}),
|
|
74
|
+
).annotate({
|
|
75
|
+
identifier: "ListStatusDatastoreUsageResponseBodyItemGcStatusCacheStats",
|
|
76
|
+
}) as any as S.Schema<ListStatusDatastoreUsageResponseBodyItemGcStatusCacheStats>;
|
|
77
|
+
|
|
78
|
+
export interface ListStatusDatastoreUsageResponseBodyItemGcStatus {
|
|
79
|
+
cache_stats?: ListStatusDatastoreUsageResponseBodyItemGcStatusCacheStats;
|
|
80
|
+
disk_bytes?: number;
|
|
81
|
+
disk_chunks?: number;
|
|
82
|
+
index_data_bytes?: number;
|
|
83
|
+
index_file_count?: number;
|
|
84
|
+
pending_bytes?: number;
|
|
85
|
+
pending_chunks?: number;
|
|
86
|
+
removed_bad?: number;
|
|
87
|
+
removed_bytes?: number;
|
|
88
|
+
removed_chunks?: number;
|
|
89
|
+
still_bad?: number;
|
|
90
|
+
upid?: string;
|
|
91
|
+
}
|
|
92
|
+
export const ListStatusDatastoreUsageResponseBodyItemGcStatus =
|
|
93
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
94
|
+
S.Struct({
|
|
95
|
+
cache_stats: S.optional(
|
|
96
|
+
ListStatusDatastoreUsageResponseBodyItemGcStatusCacheStats.pipe(
|
|
97
|
+
T.Body("cache-stats"),
|
|
98
|
+
),
|
|
99
|
+
),
|
|
100
|
+
disk_bytes: S.optional(S.Number.pipe(T.Body("disk-bytes"))),
|
|
101
|
+
disk_chunks: S.optional(S.Number.pipe(T.Body("disk-chunks"))),
|
|
102
|
+
index_data_bytes: S.optional(S.Number.pipe(T.Body("index-data-bytes"))),
|
|
103
|
+
index_file_count: S.optional(S.Number.pipe(T.Body("index-file-count"))),
|
|
104
|
+
pending_bytes: S.optional(S.Number.pipe(T.Body("pending-bytes"))),
|
|
105
|
+
pending_chunks: S.optional(S.Number.pipe(T.Body("pending-chunks"))),
|
|
106
|
+
removed_bad: S.optional(S.Number.pipe(T.Body("removed-bad"))),
|
|
107
|
+
removed_bytes: S.optional(S.Number.pipe(T.Body("removed-bytes"))),
|
|
108
|
+
removed_chunks: S.optional(S.Number.pipe(T.Body("removed-chunks"))),
|
|
109
|
+
still_bad: S.optional(S.Number.pipe(T.Body("still-bad"))),
|
|
110
|
+
upid: S.optional(S.String),
|
|
111
|
+
}),
|
|
112
|
+
).annotate({
|
|
113
|
+
identifier: "ListStatusDatastoreUsageResponseBodyItemGcStatus",
|
|
114
|
+
}) as any as S.Schema<ListStatusDatastoreUsageResponseBodyItemGcStatus>;
|
|
115
|
+
|
|
116
|
+
export type ListStatusDatastoreUsageResponseBodyItemHistoryList = Array<number>;
|
|
117
|
+
export const ListStatusDatastoreUsageResponseBodyItemHistoryList =
|
|
118
|
+
/*@__PURE__*/ S.Array(
|
|
119
|
+
S.Number,
|
|
120
|
+
) as any as S.Schema<ListStatusDatastoreUsageResponseBodyItemHistoryList>;
|
|
121
|
+
|
|
122
|
+
export type ListStatusDatastoreUsageResponseBodyItemMountStatus =
|
|
123
|
+
| "mounted"
|
|
124
|
+
| "notmounted"
|
|
125
|
+
| "nonremovable";
|
|
126
|
+
export const ListStatusDatastoreUsageResponseBodyItemMountStatus = S.String;
|
|
127
|
+
|
|
128
|
+
export interface ListStatusDatastoreUsageResponseBodyItem {
|
|
129
|
+
avail?: number;
|
|
130
|
+
backend_type?: ListStatusDatastoreUsageResponseBodyItemBackendType;
|
|
131
|
+
error?: string;
|
|
132
|
+
estimated_full_date?: number;
|
|
133
|
+
gc_status?: ListStatusDatastoreUsageResponseBodyItemGcStatus;
|
|
134
|
+
history?: ListStatusDatastoreUsageResponseBodyItemHistoryList;
|
|
135
|
+
history_delta?: number;
|
|
136
|
+
history_start?: number;
|
|
137
|
+
mount_status?: ListStatusDatastoreUsageResponseBodyItemMountStatus;
|
|
138
|
+
store: string;
|
|
139
|
+
total?: number;
|
|
140
|
+
used?: number;
|
|
141
|
+
}
|
|
142
|
+
export const ListStatusDatastoreUsageResponseBodyItem = /*@__PURE__*/ S.suspend(
|
|
143
|
+
() =>
|
|
144
|
+
S.Struct({
|
|
145
|
+
avail: S.optional(S.Number),
|
|
146
|
+
backend_type: S.optional(
|
|
147
|
+
ListStatusDatastoreUsageResponseBodyItemBackendType.pipe(
|
|
148
|
+
T.Body("backend-type"),
|
|
149
|
+
),
|
|
150
|
+
),
|
|
151
|
+
error: S.optional(S.String),
|
|
152
|
+
estimated_full_date: S.optional(
|
|
153
|
+
S.Number.pipe(T.Body("estimated-full-date")),
|
|
154
|
+
),
|
|
155
|
+
gc_status: S.optional(
|
|
156
|
+
ListStatusDatastoreUsageResponseBodyItemGcStatus.pipe(
|
|
157
|
+
T.Body("gc-status"),
|
|
158
|
+
),
|
|
159
|
+
),
|
|
160
|
+
history: S.optional(ListStatusDatastoreUsageResponseBodyItemHistoryList),
|
|
161
|
+
history_delta: S.optional(S.Number.pipe(T.Body("history-delta"))),
|
|
162
|
+
history_start: S.optional(S.Number.pipe(T.Body("history-start"))),
|
|
163
|
+
mount_status: S.optional(
|
|
164
|
+
ListStatusDatastoreUsageResponseBodyItemMountStatus.pipe(
|
|
165
|
+
T.Body("mount-status"),
|
|
166
|
+
),
|
|
167
|
+
),
|
|
168
|
+
store: S.String,
|
|
169
|
+
total: S.optional(S.Number),
|
|
170
|
+
used: S.optional(S.Number),
|
|
171
|
+
}),
|
|
172
|
+
).annotate({
|
|
173
|
+
identifier: "ListStatusDatastoreUsageResponseBodyItem",
|
|
174
|
+
}) as any as S.Schema<ListStatusDatastoreUsageResponseBodyItem>;
|
|
175
|
+
|
|
176
|
+
export type ListStatusDatastoreUsageResponseBodyList =
|
|
177
|
+
Array<ListStatusDatastoreUsageResponseBodyItem>;
|
|
178
|
+
export const ListStatusDatastoreUsageResponseBodyList = /*@__PURE__*/ S.Array(
|
|
179
|
+
ListStatusDatastoreUsageResponseBodyItem,
|
|
180
|
+
) as any as S.Schema<ListStatusDatastoreUsageResponseBodyList>;
|
|
181
|
+
|
|
182
|
+
export type ListStatusDatastoreUsageResponse =
|
|
183
|
+
ListStatusDatastoreUsageResponseBodyList;
|
|
184
|
+
export const ListStatusDatastoreUsageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
185
|
+
ListStatusDatastoreUsageResponseBodyList.pipe(T.RawResponseRoot()),
|
|
186
|
+
).annotate({
|
|
187
|
+
identifier: "ListStatusDatastoreUsageResponse",
|
|
188
|
+
}) as any as S.Schema<ListStatusDatastoreUsageResponse>;
|
|
189
|
+
|
|
190
|
+
export type GetStatusError = ProxmoxBackupOpError;
|
|
191
|
+
/** Directory index. */
|
|
192
|
+
export const getStatus: API.OperationMethod<
|
|
193
|
+
GetStatusRequest,
|
|
194
|
+
GetStatusResponse,
|
|
195
|
+
GetStatusError,
|
|
196
|
+
ProxmoxBackupOpContext
|
|
197
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
198
|
+
input: GetStatusRequest,
|
|
199
|
+
output: GetStatusResponse,
|
|
200
|
+
errors: [],
|
|
201
|
+
protocol: ProxmoxBackupProtocol,
|
|
202
|
+
retry: Retry.Retry,
|
|
203
|
+
}));
|
|
204
|
+
|
|
205
|
+
export type GetStatusMetricsError = ProxmoxBackupOpError;
|
|
206
|
+
/** Return backup server metrics. */
|
|
207
|
+
export const getStatusMetrics: API.OperationMethod<
|
|
208
|
+
GetStatusMetricsRequest,
|
|
209
|
+
GetStatusMetricsResponse,
|
|
210
|
+
GetStatusMetricsError,
|
|
211
|
+
ProxmoxBackupOpContext
|
|
212
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
213
|
+
input: GetStatusMetricsRequest,
|
|
214
|
+
output: GetStatusMetricsResponse,
|
|
215
|
+
errors: [],
|
|
216
|
+
protocol: ProxmoxBackupProtocol,
|
|
217
|
+
retry: Retry.Retry,
|
|
218
|
+
}));
|
|
219
|
+
|
|
220
|
+
export type ListStatusDatastoreUsageError = ProxmoxBackupOpError;
|
|
221
|
+
/** List Datastore usages and estimates */
|
|
222
|
+
export const listStatusDatastoreUsage: API.OperationMethod<
|
|
223
|
+
ListStatusDatastoreUsageRequest,
|
|
224
|
+
ListStatusDatastoreUsageResponse,
|
|
225
|
+
ListStatusDatastoreUsageError,
|
|
226
|
+
ProxmoxBackupOpContext
|
|
227
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
228
|
+
input: ListStatusDatastoreUsageRequest,
|
|
229
|
+
output: ListStatusDatastoreUsageResponse,
|
|
230
|
+
errors: [],
|
|
231
|
+
protocol: ProxmoxBackupProtocol,
|
|
232
|
+
retry: Retry.Retry,
|
|
233
|
+
}));
|