@truenas/api-client 6.0.1 → 6.0.3
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/README.md +144 -217
- package/dist/chunk-6PF34AWT.cjs +4246 -0
- package/dist/chunk-6PF34AWT.cjs.map +1 -0
- package/dist/chunk-FUTD4L5T.js +4206 -0
- package/dist/chunk-FUTD4L5T.js.map +1 -0
- package/dist/index.cjs +130 -4343
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -31436
- package/dist/index.d.ts +29 -31436
- package/dist/index.js +1 -4324
- package/dist/index.js.map +1 -1
- package/dist/testing/index.cjs +729 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.d.cts +483 -0
- package/dist/testing/index.d.ts +483 -0
- package/dist/testing/index.js +716 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/truenas-auth-mechanism.enum-DikfjVxa.d.cts +30936 -0
- package/dist/truenas-auth-mechanism.enum-DikfjVxa.d.ts +30936 -0
- package/package.json +23 -2
package/dist/index.cjs
CHANGED
|
@@ -1,4361 +1,148 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var webSocket = require('rxjs/webSocket');
|
|
5
|
-
var operators = require('rxjs/operators');
|
|
3
|
+
var chunk6PF34AWT_cjs = require('./chunk-6PF34AWT.cjs');
|
|
6
4
|
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
5
|
|
|
13
|
-
// src/types/api-error.type.ts
|
|
14
|
-
function isJsonRpcError(error) {
|
|
15
|
-
return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
|
|
16
|
-
}
|
|
17
|
-
function isTrueNasError(error) {
|
|
18
|
-
return typeof error === "object" && error !== null && "reason" in error && typeof error.reason === "string";
|
|
19
|
-
}
|
|
20
|
-
function getApiErrorMessage(error, fallback = "API call failed") {
|
|
21
|
-
if (isJsonRpcError(error) && error.data && isTrueNasError(error.data)) {
|
|
22
|
-
return error.data.reason;
|
|
23
|
-
}
|
|
24
|
-
if (isTrueNasError(error)) {
|
|
25
|
-
return error.reason;
|
|
26
|
-
}
|
|
27
|
-
if (isJsonRpcError(error)) {
|
|
28
|
-
return error.message;
|
|
29
|
-
}
|
|
30
|
-
return fallback;
|
|
31
|
-
}
|
|
32
6
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
JobState2["Running"] = "RUNNING";
|
|
37
|
-
JobState2["Hold"] = "HOLD";
|
|
38
|
-
JobState2["Error"] = "ERROR";
|
|
39
|
-
JobState2["Failed"] = "FAILED";
|
|
40
|
-
JobState2["Aborted"] = "ABORTED";
|
|
41
|
-
JobState2["Success"] = "SUCCESS";
|
|
42
|
-
JobState2["Finished"] = "FINISHED";
|
|
43
|
-
JobState2["Locked"] = "LOCKED";
|
|
44
|
-
JobState2["Waiting"] = "WAITING";
|
|
45
|
-
return JobState2;
|
|
46
|
-
})(JobState || {});
|
|
47
|
-
var terminalStates = [
|
|
48
|
-
"SUCCESS" /* Success */,
|
|
49
|
-
"FAILED" /* Failed */,
|
|
50
|
-
"ABORTED" /* Aborted */,
|
|
51
|
-
"ERROR" /* Error */,
|
|
52
|
-
"FINISHED" /* Finished */
|
|
53
|
-
];
|
|
54
|
-
function isJobFinished(job) {
|
|
55
|
-
return terminalStates.includes(job.state);
|
|
56
|
-
}
|
|
57
|
-
var withId = (id) => rxjs.filter((msg) => msg.id === id);
|
|
58
|
-
function randomUUID() {
|
|
59
|
-
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
60
|
-
return crypto.randomUUID();
|
|
61
|
-
}
|
|
62
|
-
if (typeof crypto === "undefined" || typeof crypto.getRandomValues !== "function") {
|
|
63
|
-
throw new Error("Web Crypto API unavailable: cannot generate a UUID");
|
|
64
|
-
}
|
|
65
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
66
|
-
const r = crypto.getRandomValues(new Uint8Array(1))[0] % 16 | 0;
|
|
67
|
-
const v = c === "x" ? r : r & 3 | 8;
|
|
68
|
-
return v.toString(16);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// src/utils/jsonrpc.utils.ts
|
|
73
|
-
function createJsonRpcMessage(method, params) {
|
|
74
|
-
return {
|
|
75
|
-
jsonrpc: "2.0",
|
|
76
|
-
id: randomUUID(),
|
|
77
|
-
method,
|
|
78
|
-
params: params ?? []
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// src/api/truenas-api.ts
|
|
83
|
-
var EVENT_KINDS = ["added", "changed", "removed"];
|
|
84
|
-
var TrueNasApi = class {
|
|
85
|
-
constructor(authenticated, connection) {
|
|
86
|
-
this.authenticated = authenticated;
|
|
87
|
-
this.connection = connection;
|
|
88
|
-
/**
|
|
89
|
-
* Stream of job events from websocket.
|
|
90
|
-
* JSON-RPC 2.0 events have structure: { method: 'collection_update', params: { collection, fields, ... } }
|
|
91
|
-
*/
|
|
92
|
-
this.jobEvents = this.connection.messages().pipe(
|
|
93
|
-
rxjs.filter(
|
|
94
|
-
(res) => res.method === "collection_update" && res.params?.collection === "core.get_jobs"
|
|
95
|
-
),
|
|
96
|
-
rxjs.map((event) => event.params.fields),
|
|
97
|
-
rxjs.filter((job) => !!job?.id),
|
|
98
|
-
rxjs.share()
|
|
99
|
-
);
|
|
100
|
-
/**
|
|
101
|
-
* One shared stream per subscribed event name — see {@link events}.
|
|
102
|
-
* Keyed by name rather than by caller, because the subscription it stands
|
|
103
|
-
* for lives on the server and is per socket, not per caller.
|
|
104
|
-
*/
|
|
105
|
-
this.eventStreams = /* @__PURE__ */ new Map();
|
|
106
|
-
this.initializeJobEventsSubscription();
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Send a request to a method of the surface this instance is typed against,
|
|
110
|
-
* and emit its result.
|
|
111
|
-
*
|
|
112
|
-
* ```typescript
|
|
113
|
-
* api.call('system.info') // SystemInfo
|
|
114
|
-
* api.call('pool.dataset.delete', ['tank/ds', { recursive: true }])
|
|
115
|
-
* ```
|
|
116
|
-
*
|
|
117
|
-
* `params` is required exactly when the method takes them — the directory
|
|
118
|
-
* says which — so a method that needs an id cannot be called without one.
|
|
119
|
-
*
|
|
120
|
-
* The polymorphic `.query` methods are reachable here too, but their
|
|
121
|
-
* `response` is the five-way union the server may return, which is
|
|
122
|
-
* {@link query} / {@link queryOne} / {@link queryCount}'s job to resolve.
|
|
123
|
-
* Reach for a verb instead.
|
|
124
|
-
*/
|
|
125
|
-
call(method, ...params) {
|
|
126
|
-
return this.dispatch(method, params[0]);
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Send a JSON-RPC request and emit its result.
|
|
130
|
-
*
|
|
131
|
-
* Shared by {@link call} and the query verbs, which read the same directory
|
|
132
|
-
* but resolve different things from it: `call` takes the entry's `response`
|
|
133
|
-
* verbatim, the verbs narrow its polymorphic union by the verb chosen.
|
|
134
|
-
*
|
|
135
|
-
* Also the way the class reaches methods on its own behalf — `core.get_jobs`,
|
|
136
|
-
* `auth.generate_token`. Inside the class body `D` is a type parameter, so
|
|
137
|
-
* the checker cannot know those are among its methods; they are, since both
|
|
138
|
-
* are in the shared base every surface extends.
|
|
139
|
-
*/
|
|
140
|
-
dispatch(method, params) {
|
|
141
|
-
return rxjs.defer(() => {
|
|
142
|
-
const message = createJsonRpcMessage(method, params);
|
|
143
|
-
const messageId = message.id ?? "";
|
|
144
|
-
const reply = this.connection.messages().pipe(
|
|
145
|
-
withId(messageId),
|
|
146
|
-
rxjs.map((msg) => {
|
|
147
|
-
if (msg.error) {
|
|
148
|
-
const errorMessage = getApiErrorMessage(
|
|
149
|
-
msg.error,
|
|
150
|
-
"API call failed"
|
|
151
|
-
);
|
|
152
|
-
throw new Error(errorMessage);
|
|
153
|
-
}
|
|
154
|
-
return msg.result;
|
|
155
|
-
}),
|
|
156
|
-
rxjs.take(1)
|
|
157
|
-
);
|
|
158
|
-
const sending = this.connection.send(message);
|
|
159
|
-
return reply.pipe(rxjs.finalize(() => sending.unsubscribe()));
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Query a collection and emit the matching entries.
|
|
164
|
-
*
|
|
165
|
-
* ```typescript
|
|
166
|
-
* api.query('user.query') // UserEntry[]
|
|
167
|
-
* api.query('user.query', [['uid', '>', 1000]]) // UserEntry[]
|
|
168
|
-
* api.query('user.query', [], { select: ['id', 'username'] })
|
|
169
|
-
* // Pick<UserEntry, 'id' | 'username'>[]
|
|
170
|
-
* ```
|
|
171
|
-
*
|
|
172
|
-
* The precise result type comes from reading the options *literal*. Options
|
|
173
|
-
* annotated as `QueryListOptions<E>` lose that, and the result degrades to
|
|
174
|
-
* `Partial<E>[]` — not only when a `select` is present, but whenever the
|
|
175
|
-
* annotation merely permits one:
|
|
176
|
-
*
|
|
177
|
-
* ```typescript
|
|
178
|
-
* const opts: QueryListOptions<UserEntry> = { limit: 10 };
|
|
179
|
-
* api.query('user.query', [], opts); // Partial<UserEntry>[]
|
|
180
|
-
*
|
|
181
|
-
* const opts = { limit: 10 } satisfies QueryListOptions<UserEntry>;
|
|
182
|
-
* api.query('user.query', [], opts); // UserEntry[]
|
|
183
|
-
* ```
|
|
184
|
-
*
|
|
185
|
-
* That is imprecise, never unsound: `Partial<E>` is a supertype of `E`, so a
|
|
186
|
-
* field is only ever reported as *possibly* missing, never as present when it
|
|
187
|
-
* is not. Reach for `satisfies` over an annotation to keep the precision —
|
|
188
|
-
* the checking is the same, the inferred type is narrower.
|
|
189
|
-
*
|
|
190
|
-
* `count` and `get` are rejected: they would change the shape of the
|
|
191
|
-
* response, which is {@link queryCount} and {@link queryOne}'s job.
|
|
192
|
-
*/
|
|
193
|
-
query(method, filters, options) {
|
|
194
|
-
return this.dispatch(method, [filters ?? [], options ?? {}]);
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Query a collection and emit the single matching entry.
|
|
198
|
-
*
|
|
199
|
-
* Middleware errors unless exactly one entry matches, so this rejects
|
|
200
|
-
* `limit` and `offset` as well as the shape switches.
|
|
201
|
-
*/
|
|
202
|
-
queryOne(method, filters, options) {
|
|
203
|
-
return this.dispatch(method, [filters ?? [], { ...options, get: true }]);
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Emit the number of entries matching the filters.
|
|
207
|
-
*
|
|
208
|
-
* Takes no options: `select` and `order_by` cannot affect a count, and
|
|
209
|
-
* `limit` / `offset` would silently cap it.
|
|
210
|
-
*/
|
|
211
|
-
queryCount(method, filters) {
|
|
212
|
-
return this.dispatch(method, [filters ?? [], { count: true }]);
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Start a job and emit its id.
|
|
216
|
-
*
|
|
217
|
-
* Keyed off the surface's *job* directory rather than its call directory —
|
|
218
|
-
* a disjoint key space, so `callAndGetJobId('app.query')` is rejected and
|
|
219
|
-
* `call('app.start')` is too. Which one a method belongs to is a fact about
|
|
220
|
-
* the method, and the generated directories are where that fact lives.
|
|
221
|
-
*
|
|
222
|
-
* The id comes from the first job event whose `message_ids` carries this
|
|
223
|
-
* request's id, not from the response: what a job method returns on the wire
|
|
224
|
-
* differs by version (v25.10 answers with the id, v26 with `null`), while
|
|
225
|
-
* the event correlation holds for both.
|
|
226
|
-
*
|
|
227
|
-
* @returns Observable that emits the job ID when received from websocket events
|
|
228
|
-
*/
|
|
229
|
-
callAndGetJobId(method, ...params) {
|
|
230
|
-
return rxjs.defer(() => {
|
|
231
|
-
const message = createJsonRpcMessage(method, params[0]);
|
|
232
|
-
const seen = this.jobEvents.pipe(
|
|
233
|
-
rxjs.filter((job) => job.message_ids?.includes(message.id ?? "") ?? false),
|
|
234
|
-
rxjs.map((job) => job.id),
|
|
235
|
-
rxjs.take(1)
|
|
236
|
-
);
|
|
237
|
-
const sending = this.connection.send(message);
|
|
238
|
-
return seen.pipe(rxjs.finalize(() => sending.unsubscribe()));
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Start a job and follow it to completion.
|
|
243
|
-
*
|
|
244
|
-
* Emits the job's state as it progresses and completes when the job reaches
|
|
245
|
-
* a terminal state, so `last()` gives the finished job and the intermediate
|
|
246
|
-
* emissions drive a progress indicator.
|
|
247
|
-
*
|
|
248
|
-
* ```typescript
|
|
249
|
-
* api.job('pool.dataset.unlock', ['tank/enc', { … }])
|
|
250
|
-
* .subscribe(job => bar.set(job.progress.percent ?? 0));
|
|
251
|
-
* ```
|
|
252
|
-
*
|
|
253
|
-
* The result is typed from the job directory, which is the whole reason to
|
|
254
|
-
* prefer this over {@link callAndGetJobId} plus {@link trackJob}: those two
|
|
255
|
-
* lose the connection between the method and its result, and the job comes
|
|
256
|
-
* back with `result: unknown`. It is `R | null` either way — a job that has
|
|
257
|
-
* not finished has no result, and neither does one that failed.
|
|
258
|
-
*/
|
|
259
|
-
job(method, ...params) {
|
|
260
|
-
return this.callAndGetJobId(method, ...params).pipe(
|
|
261
|
-
rxjs.switchMap((jobId) => this.trackJob(jobId))
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* Subscribe to a collection and emit its changes.
|
|
266
|
-
*
|
|
267
|
-
* Emits the change itself rather than the transport frame, as a union
|
|
268
|
-
* discriminated on `msg`:
|
|
269
|
-
*
|
|
270
|
-
* ```typescript
|
|
271
|
-
* api.events('app.query').subscribe(event => {
|
|
272
|
-
* if (event.msg === 'removed') return drop(event.id);
|
|
273
|
-
* render(event.fields); // only reachable once narrowed
|
|
274
|
-
* });
|
|
275
|
-
* ```
|
|
276
|
-
*
|
|
277
|
-
* The narrowing is load-bearing, not decoration: a `removed` event carries
|
|
278
|
-
* an `id` and no `fields` in 55 of the 56 collections that declare one, so
|
|
279
|
-
* reaching `fields` unconditionally is wrong for almost all of them.
|
|
280
|
-
*
|
|
281
|
-
* Event *sources* — the entries taking subscribe-time arguments — are not
|
|
282
|
-
* reachable here; see {@link EventName}.
|
|
283
|
-
*/
|
|
284
|
-
events(event) {
|
|
285
|
-
const existing = this.eventStreams.get(event);
|
|
286
|
-
if (existing) return existing;
|
|
287
|
-
const stream = rxjs.defer(() => {
|
|
288
|
-
const resubscribe = this.authenticated.pipe(rxjs.distinctUntilChanged(), rxjs.filter(Boolean)).subscribe(() => {
|
|
289
|
-
this.connection.send(createJsonRpcMessage("core.subscribe", [event]));
|
|
290
|
-
});
|
|
291
|
-
return this.connection.messages().pipe(
|
|
292
|
-
rxjs.filter((res) => res.method === "collection_update"),
|
|
293
|
-
rxjs.map((res) => res.params),
|
|
294
|
-
rxjs.filter(
|
|
295
|
-
(params) => params?.collection === event && EVENT_KINDS.includes(params.msg)
|
|
296
|
-
),
|
|
297
|
-
// `collection` is the subscription the caller already named; what is
|
|
298
|
-
// left is exactly the payload the directory declares, plus its tag.
|
|
299
|
-
rxjs.map(({ collection, ...change }) => change),
|
|
300
|
-
rxjs.finalize(() => resubscribe.unsubscribe())
|
|
301
|
-
);
|
|
302
|
-
}).pipe(rxjs.share({ resetOnRefCountZero: false, resetOnComplete: false }));
|
|
303
|
-
this.eventStreams.set(event, stream);
|
|
304
|
-
return stream;
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Convenience wrapper for auth.generate_token API call.
|
|
308
|
-
*
|
|
309
|
-
* Goes through {@link dispatch} rather than {@link call}: inside the class
|
|
310
|
-
* body `D` is still a type parameter, so TypeScript cannot know that
|
|
311
|
-
* `auth.generate_token` is one of its methods. It is — the method is in the
|
|
312
|
-
* shared base, so every surface has it — but proving that to the checker
|
|
313
|
-
* would mean constraining `D` on the class, which would push the constraint
|
|
314
|
-
* onto every caller. The signature below is the guarantee instead.
|
|
315
|
-
*/
|
|
316
|
-
generateToken(ttl = 600, matchOrigin = false, singleUse = true) {
|
|
317
|
-
return this.dispatch("auth.generate_token", [
|
|
318
|
-
ttl,
|
|
319
|
-
{},
|
|
320
|
-
matchOrigin,
|
|
321
|
-
singleUse
|
|
322
|
-
]);
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Follow an already-started job to completion.
|
|
326
|
-
*
|
|
327
|
-
* @typeParam R - what the job resolves to. An id carries no evidence of
|
|
328
|
-
* which method produced it, so nothing here can infer this and the default
|
|
329
|
-
* is `unknown`; naming it is the caller's assertion. {@link job} knows the
|
|
330
|
-
* method and fills it in from the directory, which is the reason to prefer
|
|
331
|
-
* it whenever you are the one starting the job.
|
|
332
|
-
*/
|
|
333
|
-
trackJob(jobId) {
|
|
334
|
-
const updates$ = this.jobEvents.pipe(
|
|
335
|
-
rxjs.filter((job) => job.id === jobId),
|
|
336
|
-
rxjs.map((job) => job)
|
|
337
|
-
);
|
|
338
|
-
const read$ = this.dispatch("core.get_jobs", [
|
|
339
|
-
[["id", "=", jobId]]
|
|
340
|
-
]).pipe(
|
|
341
|
-
rxjs.map((jobs) => jobs[0]),
|
|
342
|
-
rxjs.share()
|
|
343
|
-
);
|
|
344
|
-
const missing$ = read$.pipe(
|
|
345
|
-
rxjs.filter((job) => job === void 0),
|
|
346
|
-
rxjs.takeUntil(updates$)
|
|
347
|
-
);
|
|
348
|
-
const snapshot$ = read$.pipe(
|
|
349
|
-
rxjs.filter((job) => job !== void 0),
|
|
350
|
-
rxjs.takeUntil(updates$)
|
|
351
|
-
);
|
|
352
|
-
return rxjs.merge(snapshot$, updates$).pipe(
|
|
353
|
-
rxjs.takeWhile((job) => !isJobFinished(job), true),
|
|
354
|
-
// Include the final state
|
|
355
|
-
rxjs.takeUntil(missing$)
|
|
356
|
-
);
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* Ask the server for job events, and keep asking after every reconnect —
|
|
360
|
-
* `authenticated$` returns to `false` when the socket drops, and a `take(1)`
|
|
361
|
-
* here left job tracking permanently deaf once that happened.
|
|
362
|
-
*/
|
|
363
|
-
initializeJobEventsSubscription() {
|
|
364
|
-
this.authenticated.pipe(rxjs.distinctUntilChanged(), rxjs.filter(Boolean)).subscribe(() => {
|
|
365
|
-
this.connection.send(
|
|
366
|
-
createJsonRpcMessage("core.subscribe", ["core.get_jobs"])
|
|
367
|
-
);
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
// src/generated/v25_10_0/index.ts
|
|
373
|
-
var v25_10_0_exports = {};
|
|
374
|
-
__export(v25_10_0_exports, {
|
|
375
|
-
ACLTemplateEntryAcltypeInput: () => ACLTemplateEntryAcltypeInput,
|
|
376
|
-
Aclmode: () => Aclmode,
|
|
377
|
-
Acltype: () => Acltype,
|
|
378
|
-
Action: () => Action,
|
|
379
|
-
Advpowermgmt: () => Advpowermgmt,
|
|
380
|
-
Algorithm: () => Algorithm,
|
|
381
|
-
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
382
|
-
Atime: () => Atime,
|
|
383
|
-
AuthMeSource: () => AuthMeSource,
|
|
384
|
-
Authenticator: () => Authenticator,
|
|
385
|
-
Authmethod: () => Authmethod,
|
|
386
|
-
Autotrim: () => Autotrim,
|
|
387
|
-
Basic: () => Basic,
|
|
388
|
-
Blocksize: () => Blocksize,
|
|
389
|
-
Bootloader: () => Bootloader,
|
|
390
|
-
Casesensitivity: () => Casesensitivity,
|
|
391
|
-
CloudBackupSnapshotItemType: () => CloudBackupSnapshotItemType,
|
|
392
|
-
CloudSyncCreateDirection: () => CloudSyncCreateDirection,
|
|
393
|
-
CloudSyncCreateDirectionInput: () => CloudSyncCreateDirectionInput,
|
|
394
|
-
CloudTaskAttributesEncryption: () => CloudTaskAttributesEncryption,
|
|
395
|
-
CloudTaskAttributesEncryptionInput: () => CloudTaskAttributesEncryptionInput,
|
|
396
|
-
Code: () => Code,
|
|
397
|
-
Compression: () => Compression,
|
|
398
|
-
CorePingRemoteTypeInput: () => CorePingRemoteTypeInput,
|
|
399
|
-
Credentials: () => Credentials,
|
|
400
|
-
DeviceGetInfoOtherTypeInput: () => DeviceGetInfoOtherTypeInput,
|
|
401
|
-
DiskDetailsTypeInput: () => DiskDetailsTypeInput,
|
|
402
|
-
DiskWipeModeInput: () => DiskWipeModeInput,
|
|
403
|
-
DockerStatusInfoStatusInput: () => DockerStatusInfoStatusInput,
|
|
404
|
-
Enclosure2SetSlotStatusStatusInput: () => Enclosure2SetSlotStatusStatusInput,
|
|
405
|
-
Endpoint: () => Endpoint,
|
|
406
|
-
Exec: () => Exec,
|
|
407
|
-
Feature: () => Feature,
|
|
408
|
-
FilesystemDirEntryType: () => FilesystemDirEntryType,
|
|
409
|
-
Function: () => Function,
|
|
410
|
-
GetDisplayDeviceType: () => GetDisplayDeviceType,
|
|
411
|
-
Hddstandby: () => Hddstandby,
|
|
412
|
-
InitShutdownScriptCreateType: () => InitShutdownScriptCreateType,
|
|
413
|
-
InitShutdownScriptCreateTypeInput: () => InitShutdownScriptCreateTypeInput,
|
|
414
|
-
InterfaceCreateAliasTypeInput: () => InterfaceCreateAliasTypeInput,
|
|
415
|
-
InterfaceCreateTypeInput: () => InterfaceCreateTypeInput,
|
|
416
|
-
Iotype: () => Iotype,
|
|
417
|
-
IpmiChassisIdentifyVerb: () => IpmiChassisIdentifyVerb,
|
|
418
|
-
IscsiExtentCreateType: () => IscsiExtentCreateType,
|
|
419
|
-
IscsiExtentCreateTypeInput: () => IscsiExtentCreateTypeInput,
|
|
420
|
-
IscsiTargetCreateMode: () => IscsiTargetCreateMode,
|
|
421
|
-
IscsiTargetCreateModeInput: () => IscsiTargetCreateModeInput,
|
|
422
|
-
KeychainCredentialEntryType: () => KeychainCredentialEntryType,
|
|
423
|
-
KeychainCredentialEntryTypeInput: () => KeychainCredentialEntryTypeInput,
|
|
424
|
-
Level: () => Level,
|
|
425
|
-
NFS4ACEType: () => NFS4ACEType,
|
|
426
|
-
NFS4ACETypeInput: () => NFS4ACETypeInput,
|
|
427
|
-
Name: () => Name,
|
|
428
|
-
Policy: () => Policy,
|
|
429
|
-
PoolCreateChecksum: () => PoolCreateChecksum,
|
|
430
|
-
PoolCreateDeduplication: () => PoolCreateDeduplication,
|
|
431
|
-
PoolCreateTopologyDataVdevDRAIDTypeInput: () => PoolCreateTopologyDataVdevDRAIDTypeInput,
|
|
432
|
-
PoolDatasetCreateFilesystemAcltypeInput: () => PoolDatasetCreateFilesystemAcltypeInput,
|
|
433
|
-
PoolDatasetCreateFilesystemChecksum: () => PoolDatasetCreateFilesystemChecksum,
|
|
434
|
-
PoolDatasetCreateFilesystemDeduplication: () => PoolDatasetCreateFilesystemDeduplication,
|
|
435
|
-
PoolDatasetCreateFilesystemReadonlyInput: () => PoolDatasetCreateFilesystemReadonlyInput,
|
|
436
|
-
PoolDatasetDeleteResult: () => PoolDatasetDeleteResult,
|
|
437
|
-
PoolScanStateInput: () => PoolScanStateInput,
|
|
438
|
-
PoolSnapshotEntryPropertyFieldsSource: () => PoolSnapshotEntryPropertyFieldsSource,
|
|
439
|
-
Protocol: () => Protocol,
|
|
440
|
-
Purpose: () => Purpose,
|
|
441
|
-
Readonly: () => Readonly,
|
|
442
|
-
ReplicationCountEligibleManualSnapshotsTransport: () => ReplicationCountEligibleManualSnapshotsTransport,
|
|
443
|
-
ReplicationCountEligibleManualSnapshotsTransportInput: () => ReplicationCountEligibleManualSnapshotsTransportInput,
|
|
444
|
-
ReplicationCreateReadonlyInput: () => ReplicationCreateReadonlyInput,
|
|
445
|
-
Resolution: () => Resolution,
|
|
446
|
-
Rpm: () => Rpm,
|
|
447
|
-
RsyncTaskCreateDirection: () => RsyncTaskCreateDirection,
|
|
448
|
-
RsyncTaskCreateDirectionInput: () => RsyncTaskCreateDirectionInput,
|
|
449
|
-
RsyncTaskCreateMode: () => RsyncTaskCreateMode,
|
|
450
|
-
RsyncTaskCreateModeInput: () => RsyncTaskCreateModeInput,
|
|
451
|
-
SMBEntryEncryption: () => SMBEntryEncryption,
|
|
452
|
-
SMBEntryEncryptionInput: () => SMBEntryEncryptionInput,
|
|
453
|
-
STIGType: () => STIGType,
|
|
454
|
-
Schema: () => Schema,
|
|
455
|
-
Security: () => Security,
|
|
456
|
-
Serialspeed: () => Serialspeed,
|
|
457
|
-
Service: () => Service,
|
|
458
|
-
ServiceControlVerb: () => ServiceControlVerb,
|
|
459
|
-
SharingSMBEntryPurposeInput: () => SharingSMBEntryPurposeInput,
|
|
460
|
-
SharingSMBEntryPurposeInput2: () => SharingSMBEntryPurposeInput2,
|
|
461
|
-
Shutdown: () => Shutdown,
|
|
462
|
-
Snapdev: () => Snapdev,
|
|
463
|
-
Snapdir: () => Snapdir,
|
|
464
|
-
SourceInput: () => SourceInput,
|
|
465
|
-
SourceValueType: () => SourceValueType,
|
|
466
|
-
State: () => State,
|
|
467
|
-
Status: () => Status,
|
|
468
|
-
SupportNewTicketCommunityTypeInput: () => SupportNewTicketCommunityTypeInput,
|
|
469
|
-
Sync: () => Sync,
|
|
470
|
-
SyslogServerTransport: () => SyslogServerTransport,
|
|
471
|
-
SyslogServerTransportInput: () => SyslogServerTransportInput,
|
|
472
|
-
Sysloglevel: () => Sysloglevel,
|
|
473
|
-
SystemProductTypeResult: () => SystemProductTypeResult,
|
|
474
|
-
SystemStateResult: () => SystemStateResult,
|
|
475
|
-
Tag: () => Tag,
|
|
476
|
-
Target: () => Target,
|
|
477
|
-
Time: () => Time,
|
|
478
|
-
TruecommandConfigChangedEventFieldsStatus: () => TruecommandConfigChangedEventFieldsStatus,
|
|
479
|
-
TruecommandConfigChangedEventFieldsStatusInput: () => TruecommandConfigChangedEventFieldsStatusInput,
|
|
480
|
-
TunableCreateType: () => TunableCreateType,
|
|
481
|
-
TunableCreateTypeInput: () => TunableCreateTypeInput,
|
|
482
|
-
UPSEntryMode: () => UPSEntryMode,
|
|
483
|
-
UPSEntryModeInput: () => UPSEntryModeInput,
|
|
484
|
-
Unixcharset: () => Unixcharset,
|
|
485
|
-
Username: () => Username,
|
|
486
|
-
VMDiskDeviceType: () => VMDiskDeviceType,
|
|
487
|
-
VMDiskDeviceTypeInput: () => VMDiskDeviceTypeInput,
|
|
488
|
-
VMWareEntryStateStateInput: () => VMWareEntryStateStateInput,
|
|
489
|
-
VMWareMatchDatastoresWithDatasetsResultFilesystemType: () => VMWareMatchDatastoresWithDatasetsResultFilesystemType,
|
|
490
|
-
Vendor: () => Vendor,
|
|
491
|
-
Volblocksize: () => Volblocksize,
|
|
492
|
-
When: () => When,
|
|
493
|
-
ZfsTierRewriteJobEntryStatusInput: () => ZfsTierRewriteJobEntryStatusInput
|
|
7
|
+
Object.defineProperty(exports, "AppState", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunk6PF34AWT_cjs.AppState; }
|
|
494
10
|
});
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
Passthrough: "PASSTHROUGH",
|
|
499
|
-
Restricted: "RESTRICTED",
|
|
500
|
-
Discard: "DISCARD",
|
|
501
|
-
Inherit: "INHERIT"
|
|
502
|
-
};
|
|
503
|
-
var ACLTemplateEntryAcltypeInput = {
|
|
504
|
-
Nfs4: "NFS4",
|
|
505
|
-
Posix1e: "POSIX1E"
|
|
506
|
-
};
|
|
507
|
-
var Acltype = {
|
|
508
|
-
Nfs4: "NFS4",
|
|
509
|
-
Posix1e: "POSIX1E"
|
|
510
|
-
};
|
|
511
|
-
var Action = {
|
|
512
|
-
Start: "START",
|
|
513
|
-
Stop: "STOP",
|
|
514
|
-
Pause: "PAUSE"
|
|
515
|
-
};
|
|
516
|
-
var Advpowermgmt = {
|
|
517
|
-
Disabled: "DISABLED",
|
|
518
|
-
"1": "1",
|
|
519
|
-
"64": "64",
|
|
520
|
-
"127": "127",
|
|
521
|
-
"128": "128",
|
|
522
|
-
"192": "192",
|
|
523
|
-
"254": "254"
|
|
524
|
-
};
|
|
525
|
-
var Algorithm = {
|
|
526
|
-
Aes128Ccm: "AES-128-CCM",
|
|
527
|
-
Aes192Ccm: "AES-192-CCM",
|
|
528
|
-
Aes256Ccm: "AES-256-CCM",
|
|
529
|
-
Aes128Gcm: "AES-128-GCM",
|
|
530
|
-
Aes192Gcm: "AES-192-GCM",
|
|
531
|
-
Aes256Gcm: "AES-256-GCM"
|
|
532
|
-
};
|
|
533
|
-
var AppContainerDetailsStateInput = {
|
|
534
|
-
Crashed: "crashed",
|
|
535
|
-
Created: "created",
|
|
536
|
-
Exited: "exited",
|
|
537
|
-
Running: "running",
|
|
538
|
-
Starting: "starting"
|
|
539
|
-
};
|
|
540
|
-
var Atime = {
|
|
541
|
-
On: "ON",
|
|
542
|
-
Off: "OFF",
|
|
543
|
-
Inherit: "INHERIT"
|
|
544
|
-
};
|
|
545
|
-
var Authenticator = {
|
|
546
|
-
Level1: "LEVEL_1",
|
|
547
|
-
Level2: "LEVEL_2"
|
|
548
|
-
};
|
|
549
|
-
var AuthMeSource = {
|
|
550
|
-
Local: "LOCAL",
|
|
551
|
-
Activedirectory: "ACTIVEDIRECTORY",
|
|
552
|
-
Ldap: "LDAP"
|
|
553
|
-
};
|
|
554
|
-
var Authmethod = {
|
|
555
|
-
None: "NONE",
|
|
556
|
-
Chap: "CHAP",
|
|
557
|
-
ChapMutual: "CHAP_MUTUAL"
|
|
558
|
-
};
|
|
559
|
-
var Autotrim = {
|
|
560
|
-
On: "ON",
|
|
561
|
-
Off: "OFF"
|
|
562
|
-
};
|
|
563
|
-
var Basic = {
|
|
564
|
-
Inherit: "INHERIT",
|
|
565
|
-
Noinherit: "NOINHERIT"
|
|
566
|
-
};
|
|
567
|
-
var Blocksize = {
|
|
568
|
-
"512": 512,
|
|
569
|
-
"1024": 1024,
|
|
570
|
-
"2048": 2048,
|
|
571
|
-
"4096": 4096
|
|
572
|
-
};
|
|
573
|
-
var Bootloader = {
|
|
574
|
-
UefiCsm: "UEFI_CSM",
|
|
575
|
-
Uefi: "UEFI"
|
|
576
|
-
};
|
|
577
|
-
var Casesensitivity = {
|
|
578
|
-
Sensitive: "SENSITIVE",
|
|
579
|
-
Insensitive: "INSENSITIVE",
|
|
580
|
-
Inherit: "INHERIT"
|
|
581
|
-
};
|
|
582
|
-
var CloudBackupSnapshotItemType = {
|
|
583
|
-
Dir: "dir",
|
|
584
|
-
File: "file"
|
|
585
|
-
};
|
|
586
|
-
var CloudSyncCreateDirection = {
|
|
587
|
-
Push: "PUSH",
|
|
588
|
-
Pull: "PULL"
|
|
589
|
-
};
|
|
590
|
-
var CloudSyncCreateDirectionInput = {
|
|
591
|
-
Push: "PUSH",
|
|
592
|
-
Pull: "PULL"
|
|
593
|
-
};
|
|
594
|
-
var CloudTaskAttributesEncryption = {
|
|
595
|
-
Null: null,
|
|
596
|
-
Aes256: "AES256"
|
|
597
|
-
};
|
|
598
|
-
var CloudTaskAttributesEncryptionInput = {
|
|
599
|
-
Null: null,
|
|
600
|
-
Aes256: "AES256"
|
|
601
|
-
};
|
|
602
|
-
var Code = {
|
|
603
|
-
Normal: "NORMAL",
|
|
604
|
-
Error: "ERROR"
|
|
605
|
-
};
|
|
606
|
-
var Compression = {
|
|
607
|
-
On: "ON",
|
|
608
|
-
Off: "OFF",
|
|
609
|
-
Lz4: "LZ4",
|
|
610
|
-
Gzip: "GZIP",
|
|
611
|
-
Gzip1: "GZIP-1",
|
|
612
|
-
Gzip9: "GZIP-9",
|
|
613
|
-
Zstd: "ZSTD",
|
|
614
|
-
ZstdFast: "ZSTD-FAST",
|
|
615
|
-
Zle: "ZLE",
|
|
616
|
-
Lzjb: "LZJB",
|
|
617
|
-
Zstd1: "ZSTD-1",
|
|
618
|
-
Zstd2: "ZSTD-2",
|
|
619
|
-
Zstd3: "ZSTD-3",
|
|
620
|
-
Zstd4: "ZSTD-4",
|
|
621
|
-
Zstd5: "ZSTD-5",
|
|
622
|
-
Zstd6: "ZSTD-6",
|
|
623
|
-
Zstd7: "ZSTD-7",
|
|
624
|
-
Zstd8: "ZSTD-8",
|
|
625
|
-
Zstd9: "ZSTD-9",
|
|
626
|
-
Zstd10: "ZSTD-10",
|
|
627
|
-
Zstd11: "ZSTD-11",
|
|
628
|
-
Zstd12: "ZSTD-12",
|
|
629
|
-
Zstd13: "ZSTD-13",
|
|
630
|
-
Zstd14: "ZSTD-14",
|
|
631
|
-
Zstd15: "ZSTD-15",
|
|
632
|
-
Zstd16: "ZSTD-16",
|
|
633
|
-
Zstd17: "ZSTD-17",
|
|
634
|
-
Zstd18: "ZSTD-18",
|
|
635
|
-
Zstd19: "ZSTD-19",
|
|
636
|
-
ZstdFast1: "ZSTD-FAST-1",
|
|
637
|
-
ZstdFast2: "ZSTD-FAST-2",
|
|
638
|
-
ZstdFast3: "ZSTD-FAST-3",
|
|
639
|
-
ZstdFast4: "ZSTD-FAST-4",
|
|
640
|
-
ZstdFast5: "ZSTD-FAST-5",
|
|
641
|
-
ZstdFast6: "ZSTD-FAST-6",
|
|
642
|
-
ZstdFast7: "ZSTD-FAST-7",
|
|
643
|
-
ZstdFast8: "ZSTD-FAST-8",
|
|
644
|
-
ZstdFast9: "ZSTD-FAST-9",
|
|
645
|
-
ZstdFast10: "ZSTD-FAST-10",
|
|
646
|
-
ZstdFast20: "ZSTD-FAST-20",
|
|
647
|
-
ZstdFast30: "ZSTD-FAST-30",
|
|
648
|
-
ZstdFast40: "ZSTD-FAST-40",
|
|
649
|
-
ZstdFast50: "ZSTD-FAST-50",
|
|
650
|
-
ZstdFast60: "ZSTD-FAST-60",
|
|
651
|
-
ZstdFast70: "ZSTD-FAST-70",
|
|
652
|
-
ZstdFast80: "ZSTD-FAST-80",
|
|
653
|
-
ZstdFast90: "ZSTD-FAST-90",
|
|
654
|
-
ZstdFast100: "ZSTD-FAST-100",
|
|
655
|
-
ZstdFast500: "ZSTD-FAST-500",
|
|
656
|
-
ZstdFast1000: "ZSTD-FAST-1000",
|
|
657
|
-
Inherit: "INHERIT"
|
|
658
|
-
};
|
|
659
|
-
var CorePingRemoteTypeInput = {
|
|
660
|
-
Icmp: "ICMP",
|
|
661
|
-
Icmpv4: "ICMPV4",
|
|
662
|
-
Icmpv6: "ICMPV6"
|
|
663
|
-
};
|
|
664
|
-
var Credentials = {
|
|
665
|
-
UnixSocket: "UNIX_SOCKET",
|
|
666
|
-
LoginPassword: "LOGIN_PASSWORD",
|
|
667
|
-
LoginTwofactor: "LOGIN_TWOFACTOR",
|
|
668
|
-
LoginOnetimePassword: "LOGIN_ONETIME_PASSWORD",
|
|
669
|
-
ApiKey: "API_KEY",
|
|
670
|
-
Token: "TOKEN",
|
|
671
|
-
TruenasNode: "TRUENAS_NODE"
|
|
672
|
-
};
|
|
673
|
-
var DeviceGetInfoOtherTypeInput = {
|
|
674
|
-
Serial: "SERIAL",
|
|
675
|
-
Gpu: "GPU"
|
|
676
|
-
};
|
|
677
|
-
var DiskDetailsTypeInput = {
|
|
678
|
-
Used: "USED",
|
|
679
|
-
Unused: "UNUSED",
|
|
680
|
-
Both: "BOTH"
|
|
681
|
-
};
|
|
682
|
-
var DiskWipeModeInput = {
|
|
683
|
-
Quick: "QUICK",
|
|
684
|
-
Full: "FULL",
|
|
685
|
-
FullRandom: "FULL_RANDOM"
|
|
686
|
-
};
|
|
687
|
-
var DockerStatusInfoStatusInput = {
|
|
688
|
-
Pending: "PENDING",
|
|
689
|
-
Running: "RUNNING",
|
|
690
|
-
Stopped: "STOPPED",
|
|
691
|
-
Initializing: "INITIALIZING",
|
|
692
|
-
Stopping: "STOPPING",
|
|
693
|
-
Unconfigured: "UNCONFIGURED",
|
|
694
|
-
Failed: "FAILED",
|
|
695
|
-
Migrating: "MIGRATING",
|
|
696
|
-
MigrationFailed: "MIGRATION_FAILED"
|
|
697
|
-
};
|
|
698
|
-
var Enclosure2SetSlotStatusStatusInput = {
|
|
699
|
-
Clear: "CLEAR",
|
|
700
|
-
On: "ON",
|
|
701
|
-
Off: "OFF"
|
|
702
|
-
};
|
|
703
|
-
var Endpoint = {
|
|
704
|
-
OvhEu: "ovh-eu",
|
|
705
|
-
OvhCa: "ovh-ca",
|
|
706
|
-
OvhUs: "ovh-us",
|
|
707
|
-
KimsufiEu: "kimsufi-eu",
|
|
708
|
-
KimsufiCa: "kimsufi-ca",
|
|
709
|
-
SoyoustartEu: "soyoustart-eu",
|
|
710
|
-
SoyoustartCa: "soyoustart-ca"
|
|
711
|
-
};
|
|
712
|
-
var Exec = {
|
|
713
|
-
On: "ON",
|
|
714
|
-
Off: "OFF",
|
|
715
|
-
Inherit: "INHERIT"
|
|
716
|
-
};
|
|
717
|
-
var Feature = {
|
|
718
|
-
Dedup: "DEDUP",
|
|
719
|
-
Fibrechannel: "FIBRECHANNEL",
|
|
720
|
-
Vm: "VM"
|
|
721
|
-
};
|
|
722
|
-
var FilesystemDirEntryType = {
|
|
723
|
-
Directory: "DIRECTORY",
|
|
724
|
-
File: "FILE",
|
|
725
|
-
Symlink: "SYMLINK",
|
|
726
|
-
Other: "OTHER"
|
|
727
|
-
};
|
|
728
|
-
var Function = {
|
|
729
|
-
Resilver: "RESILVER",
|
|
730
|
-
Scrub: "SCRUB"
|
|
731
|
-
};
|
|
732
|
-
var GetDisplayDeviceType = {
|
|
733
|
-
Spice: "SPICE",
|
|
734
|
-
Vnc: "VNC"
|
|
735
|
-
};
|
|
736
|
-
var Hddstandby = {
|
|
737
|
-
AlwaysOn: "ALWAYS ON",
|
|
738
|
-
"5": "5",
|
|
739
|
-
"10": "10",
|
|
740
|
-
"20": "20",
|
|
741
|
-
"30": "30",
|
|
742
|
-
"60": "60",
|
|
743
|
-
"120": "120",
|
|
744
|
-
"180": "180",
|
|
745
|
-
"240": "240",
|
|
746
|
-
"300": "300",
|
|
747
|
-
"330": "330"
|
|
748
|
-
};
|
|
749
|
-
var InitShutdownScriptCreateType = {
|
|
750
|
-
Command: "COMMAND",
|
|
751
|
-
Script: "SCRIPT"
|
|
752
|
-
};
|
|
753
|
-
var InitShutdownScriptCreateTypeInput = {
|
|
754
|
-
Command: "COMMAND",
|
|
755
|
-
Script: "SCRIPT"
|
|
756
|
-
};
|
|
757
|
-
var InterfaceCreateAliasTypeInput = {
|
|
758
|
-
Inet: "INET",
|
|
759
|
-
Inet6: "INET6"
|
|
760
|
-
};
|
|
761
|
-
var InterfaceCreateTypeInput = {
|
|
762
|
-
Bridge: "BRIDGE",
|
|
763
|
-
LinkAggregation: "LINK_AGGREGATION",
|
|
764
|
-
Vlan: "VLAN"
|
|
765
|
-
};
|
|
766
|
-
var Iotype = {
|
|
767
|
-
Native: "NATIVE",
|
|
768
|
-
Threads: "THREADS",
|
|
769
|
-
IoUring: "IO_URING"
|
|
770
|
-
};
|
|
771
|
-
var IpmiChassisIdentifyVerb = {
|
|
772
|
-
On: "ON",
|
|
773
|
-
Off: "OFF"
|
|
774
|
-
};
|
|
775
|
-
var IscsiExtentCreateType = {
|
|
776
|
-
Disk: "DISK",
|
|
777
|
-
File: "FILE"
|
|
778
|
-
};
|
|
779
|
-
var IscsiExtentCreateTypeInput = {
|
|
780
|
-
Disk: "DISK",
|
|
781
|
-
File: "FILE"
|
|
782
|
-
};
|
|
783
|
-
var IscsiTargetCreateMode = {
|
|
784
|
-
Iscsi: "ISCSI",
|
|
785
|
-
Fc: "FC",
|
|
786
|
-
Both: "BOTH"
|
|
787
|
-
};
|
|
788
|
-
var IscsiTargetCreateModeInput = {
|
|
789
|
-
Iscsi: "ISCSI",
|
|
790
|
-
Fc: "FC",
|
|
791
|
-
Both: "BOTH"
|
|
792
|
-
};
|
|
793
|
-
var KeychainCredentialEntryType = {
|
|
794
|
-
SshKeyPair: "SSH_KEY_PAIR",
|
|
795
|
-
SshCredentials: "SSH_CREDENTIALS"
|
|
796
|
-
};
|
|
797
|
-
var KeychainCredentialEntryTypeInput = {
|
|
798
|
-
SshKeyPair: "SSH_KEY_PAIR",
|
|
799
|
-
SshCredentials: "SSH_CREDENTIALS"
|
|
800
|
-
};
|
|
801
|
-
var Level = {
|
|
802
|
-
Info: "INFO",
|
|
803
|
-
Notice: "NOTICE",
|
|
804
|
-
Warning: "WARNING",
|
|
805
|
-
Error: "ERROR",
|
|
806
|
-
Critical: "CRITICAL",
|
|
807
|
-
Alert: "ALERT",
|
|
808
|
-
Emergency: "EMERGENCY"
|
|
809
|
-
};
|
|
810
|
-
var Name = {
|
|
811
|
-
Cpu: "cpu",
|
|
812
|
-
Cputemp: "cputemp",
|
|
813
|
-
Disk: "disk",
|
|
814
|
-
Interface: "interface",
|
|
815
|
-
Load: "load",
|
|
816
|
-
Processes: "processes",
|
|
817
|
-
Memory: "memory",
|
|
818
|
-
Uptime: "uptime",
|
|
819
|
-
Arcactualrate: "arcactualrate",
|
|
820
|
-
Arcrate: "arcrate",
|
|
821
|
-
Arcsize: "arcsize",
|
|
822
|
-
Arcresult: "arcresult",
|
|
823
|
-
Disktemp: "disktemp",
|
|
824
|
-
Upscharge: "upscharge",
|
|
825
|
-
Upsruntime: "upsruntime",
|
|
826
|
-
Upsvoltage: "upsvoltage",
|
|
827
|
-
Upscurrent: "upscurrent",
|
|
828
|
-
Upsfrequency: "upsfrequency",
|
|
829
|
-
Upsload: "upsload",
|
|
830
|
-
Upstemperature: "upstemperature"
|
|
831
|
-
};
|
|
832
|
-
var NFS4ACEType = {
|
|
833
|
-
Allow: "ALLOW",
|
|
834
|
-
Deny: "DENY"
|
|
835
|
-
};
|
|
836
|
-
var NFS4ACETypeInput = {
|
|
837
|
-
Allow: "ALLOW",
|
|
838
|
-
Deny: "DENY"
|
|
839
|
-
};
|
|
840
|
-
var Policy = {
|
|
841
|
-
Immediately: "IMMEDIATELY",
|
|
842
|
-
Hourly: "HOURLY",
|
|
843
|
-
Daily: "DAILY",
|
|
844
|
-
Never: "NEVER"
|
|
845
|
-
};
|
|
846
|
-
var PoolCreateChecksum = {
|
|
847
|
-
On: "ON",
|
|
848
|
-
Off: "OFF",
|
|
849
|
-
Fletcher2: "FLETCHER2",
|
|
850
|
-
Fletcher4: "FLETCHER4",
|
|
851
|
-
Sha256: "SHA256",
|
|
852
|
-
Sha512: "SHA512",
|
|
853
|
-
Skein: "SKEIN",
|
|
854
|
-
Edonr: "EDONR",
|
|
855
|
-
Blake3: "BLAKE3",
|
|
856
|
-
Null: null
|
|
857
|
-
};
|
|
858
|
-
var PoolCreateDeduplication = {
|
|
859
|
-
On: "ON",
|
|
860
|
-
Verify: "VERIFY",
|
|
861
|
-
Off: "OFF",
|
|
862
|
-
Null: null
|
|
863
|
-
};
|
|
864
|
-
var PoolCreateTopologyDataVdevDRAIDTypeInput = {
|
|
865
|
-
Draid1: "DRAID1",
|
|
866
|
-
Draid2: "DRAID2",
|
|
867
|
-
Draid3: "DRAID3"
|
|
868
|
-
};
|
|
869
|
-
var PoolDatasetCreateFilesystemAcltypeInput = {
|
|
870
|
-
Off: "OFF",
|
|
871
|
-
Nfsv4: "NFSV4",
|
|
872
|
-
Posix: "POSIX",
|
|
873
|
-
Inherit: "INHERIT"
|
|
874
|
-
};
|
|
875
|
-
var PoolDatasetCreateFilesystemChecksum = {
|
|
876
|
-
On: "ON",
|
|
877
|
-
Off: "OFF",
|
|
878
|
-
Fletcher2: "FLETCHER2",
|
|
879
|
-
Fletcher4: "FLETCHER4",
|
|
880
|
-
Sha256: "SHA256",
|
|
881
|
-
Sha512: "SHA512",
|
|
882
|
-
Skein: "SKEIN",
|
|
883
|
-
Edonr: "EDONR",
|
|
884
|
-
Blake3: "BLAKE3",
|
|
885
|
-
Inherit: "INHERIT"
|
|
886
|
-
};
|
|
887
|
-
var PoolDatasetCreateFilesystemDeduplication = {
|
|
888
|
-
On: "ON",
|
|
889
|
-
Verify: "VERIFY",
|
|
890
|
-
Off: "OFF",
|
|
891
|
-
Inherit: "INHERIT"
|
|
892
|
-
};
|
|
893
|
-
var PoolDatasetCreateFilesystemReadonlyInput = {
|
|
894
|
-
On: "ON",
|
|
895
|
-
Off: "OFF",
|
|
896
|
-
Inherit: "INHERIT"
|
|
897
|
-
};
|
|
898
|
-
var PoolDatasetDeleteResult = {
|
|
899
|
-
Null: null,
|
|
900
|
-
True: true
|
|
901
|
-
};
|
|
902
|
-
var PoolScanStateInput = {
|
|
903
|
-
Scanning: "SCANNING",
|
|
904
|
-
Finished: "FINISHED",
|
|
905
|
-
Canceled: "CANCELED"
|
|
906
|
-
};
|
|
907
|
-
var PoolSnapshotEntryPropertyFieldsSource = {
|
|
908
|
-
None: "NONE",
|
|
909
|
-
Default: "DEFAULT",
|
|
910
|
-
Local: "LOCAL",
|
|
911
|
-
Temporary: "TEMPORARY",
|
|
912
|
-
Inherited: "INHERITED",
|
|
913
|
-
Received: "RECEIVED"
|
|
914
|
-
};
|
|
915
|
-
var Protocol = {
|
|
916
|
-
Http: "HTTP",
|
|
917
|
-
Https: "HTTPS"
|
|
918
|
-
};
|
|
919
|
-
var Purpose = {
|
|
920
|
-
DefaultShare: "DEFAULT_SHARE",
|
|
921
|
-
LegacyShare: "LEGACY_SHARE",
|
|
922
|
-
TimemachineShare: "TIMEMACHINE_SHARE",
|
|
923
|
-
MultiprotocolShare: "MULTIPROTOCOL_SHARE",
|
|
924
|
-
TimeLockedShare: "TIME_LOCKED_SHARE",
|
|
925
|
-
PrivateDatasetsShare: "PRIVATE_DATASETS_SHARE",
|
|
926
|
-
ExternalShare: "EXTERNAL_SHARE",
|
|
927
|
-
VeeamRepositoryShare: "VEEAM_REPOSITORY_SHARE"
|
|
928
|
-
};
|
|
929
|
-
var Readonly = {
|
|
930
|
-
Set: "SET",
|
|
931
|
-
Require: "REQUIRE",
|
|
932
|
-
Ignore: "IGNORE"
|
|
933
|
-
};
|
|
934
|
-
var ReplicationCountEligibleManualSnapshotsTransport = {
|
|
935
|
-
Ssh: "SSH",
|
|
936
|
-
SshNetcat: "SSH+NETCAT",
|
|
937
|
-
Local: "LOCAL"
|
|
938
|
-
};
|
|
939
|
-
var ReplicationCountEligibleManualSnapshotsTransportInput = {
|
|
940
|
-
Ssh: "SSH",
|
|
941
|
-
SshNetcat: "SSH+NETCAT",
|
|
942
|
-
Local: "LOCAL"
|
|
943
|
-
};
|
|
944
|
-
var ReplicationCreateReadonlyInput = {
|
|
945
|
-
Set: "SET",
|
|
946
|
-
Require: "REQUIRE",
|
|
947
|
-
Ignore: "IGNORE"
|
|
948
|
-
};
|
|
949
|
-
var Resolution = {
|
|
950
|
-
"1920x1200": "1920x1200",
|
|
951
|
-
"1920x1080": "1920x1080",
|
|
952
|
-
"1600x1200": "1600x1200",
|
|
953
|
-
"1600x900": "1600x900",
|
|
954
|
-
"1400x1050": "1400x1050",
|
|
955
|
-
"1280x1024": "1280x1024",
|
|
956
|
-
"1280x720": "1280x720",
|
|
957
|
-
"1024x768": "1024x768",
|
|
958
|
-
"800x600": "800x600",
|
|
959
|
-
"640x480": "640x480"
|
|
960
|
-
};
|
|
961
|
-
var Rpm = {
|
|
962
|
-
Unknown: "UNKNOWN",
|
|
963
|
-
Ssd: "SSD",
|
|
964
|
-
"5400": "5400",
|
|
965
|
-
"7200": "7200",
|
|
966
|
-
"10000": "10000",
|
|
967
|
-
"15000": "15000"
|
|
968
|
-
};
|
|
969
|
-
var RsyncTaskCreateDirection = {
|
|
970
|
-
Pull: "PULL",
|
|
971
|
-
Push: "PUSH"
|
|
972
|
-
};
|
|
973
|
-
var RsyncTaskCreateDirectionInput = {
|
|
974
|
-
Pull: "PULL",
|
|
975
|
-
Push: "PUSH"
|
|
976
|
-
};
|
|
977
|
-
var RsyncTaskCreateMode = {
|
|
978
|
-
Module: "MODULE",
|
|
979
|
-
Ssh: "SSH"
|
|
980
|
-
};
|
|
981
|
-
var RsyncTaskCreateModeInput = {
|
|
982
|
-
Module: "MODULE",
|
|
983
|
-
Ssh: "SSH"
|
|
984
|
-
};
|
|
985
|
-
var Schema = {
|
|
986
|
-
Rfc2307: "RFC2307",
|
|
987
|
-
Rfc2307bis: "RFC2307BIS"
|
|
988
|
-
};
|
|
989
|
-
var Security = {
|
|
990
|
-
Plain: "PLAIN",
|
|
991
|
-
Ssl: "SSL",
|
|
992
|
-
Tls: "TLS"
|
|
993
|
-
};
|
|
994
|
-
var Serialspeed = {
|
|
995
|
-
"9600": "9600",
|
|
996
|
-
"19200": "19200",
|
|
997
|
-
"38400": "38400",
|
|
998
|
-
"57600": "57600",
|
|
999
|
-
"115200": "115200"
|
|
1000
|
-
};
|
|
1001
|
-
var Service = {
|
|
1002
|
-
Middleware: "MIDDLEWARE",
|
|
1003
|
-
Smb: "SMB",
|
|
1004
|
-
Sudo: "SUDO",
|
|
1005
|
-
System: "SYSTEM"
|
|
1006
|
-
};
|
|
1007
|
-
var ServiceControlVerb = {
|
|
1008
|
-
Start: "START",
|
|
1009
|
-
Stop: "STOP",
|
|
1010
|
-
Restart: "RESTART",
|
|
1011
|
-
Reload: "RELOAD"
|
|
1012
|
-
};
|
|
1013
|
-
var SharingSMBEntryPurposeInput = {
|
|
1014
|
-
DefaultShare: "DEFAULT_SHARE",
|
|
1015
|
-
LegacyShare: "LEGACY_SHARE",
|
|
1016
|
-
TimemachineShare: "TIMEMACHINE_SHARE",
|
|
1017
|
-
MultiprotocolShare: "MULTIPROTOCOL_SHARE",
|
|
1018
|
-
TimeLockedShare: "TIME_LOCKED_SHARE",
|
|
1019
|
-
PrivateDatasetsShare: "PRIVATE_DATASETS_SHARE",
|
|
1020
|
-
ExternalShare: "EXTERNAL_SHARE",
|
|
1021
|
-
VeeamRepositoryShare: "VEEAM_REPOSITORY_SHARE",
|
|
1022
|
-
FcpShare: "FCP_SHARE"
|
|
1023
|
-
};
|
|
1024
|
-
var SharingSMBEntryPurposeInput2 = {
|
|
1025
|
-
DefaultShare: "DEFAULT_SHARE",
|
|
1026
|
-
LegacyShare: "LEGACY_SHARE",
|
|
1027
|
-
TimemachineShare: "TIMEMACHINE_SHARE",
|
|
1028
|
-
MultiprotocolShare: "MULTIPROTOCOL_SHARE",
|
|
1029
|
-
TimeLockedShare: "TIME_LOCKED_SHARE",
|
|
1030
|
-
PrivateDatasetsShare: "PRIVATE_DATASETS_SHARE",
|
|
1031
|
-
ExternalShare: "EXTERNAL_SHARE",
|
|
1032
|
-
VeeamRepositoryShare: "VEEAM_REPOSITORY_SHARE"
|
|
1033
|
-
};
|
|
1034
|
-
var Shutdown = {
|
|
1035
|
-
Lowbatt: "LOWBATT",
|
|
1036
|
-
Batt: "BATT"
|
|
1037
|
-
};
|
|
1038
|
-
var SMBEntryEncryption = {
|
|
1039
|
-
Default: "DEFAULT",
|
|
1040
|
-
Negotiate: "NEGOTIATE",
|
|
1041
|
-
Desired: "DESIRED",
|
|
1042
|
-
Required: "REQUIRED"
|
|
1043
|
-
};
|
|
1044
|
-
var SMBEntryEncryptionInput = {
|
|
1045
|
-
Default: "DEFAULT",
|
|
1046
|
-
Negotiate: "NEGOTIATE",
|
|
1047
|
-
Desired: "DESIRED",
|
|
1048
|
-
Required: "REQUIRED"
|
|
1049
|
-
};
|
|
1050
|
-
var Snapdev = {
|
|
1051
|
-
Hidden: "HIDDEN",
|
|
1052
|
-
Visible: "VISIBLE",
|
|
1053
|
-
Inherit: "INHERIT"
|
|
1054
|
-
};
|
|
1055
|
-
var Snapdir = {
|
|
1056
|
-
Disabled: "DISABLED",
|
|
1057
|
-
Visible: "VISIBLE",
|
|
1058
|
-
Hidden: "HIDDEN",
|
|
1059
|
-
Inherit: "INHERIT"
|
|
1060
|
-
};
|
|
1061
|
-
var SourceInput = {
|
|
1062
|
-
None: "NONE",
|
|
1063
|
-
Default: "DEFAULT",
|
|
1064
|
-
Local: "LOCAL",
|
|
1065
|
-
Temporary: "TEMPORARY",
|
|
1066
|
-
Inherited: "INHERITED",
|
|
1067
|
-
Received: "RECEIVED"
|
|
1068
|
-
};
|
|
1069
|
-
var SourceValueType = {
|
|
1070
|
-
None: "NONE",
|
|
1071
|
-
Default: "DEFAULT",
|
|
1072
|
-
Temporary: "TEMPORARY",
|
|
1073
|
-
Local: "LOCAL",
|
|
1074
|
-
Inherited: "INHERITED",
|
|
1075
|
-
Received: "RECEIVED"
|
|
1076
|
-
};
|
|
1077
|
-
var State = {
|
|
1078
|
-
Crashed: "crashed",
|
|
1079
|
-
Created: "created",
|
|
1080
|
-
Exited: "exited",
|
|
1081
|
-
Running: "running",
|
|
1082
|
-
Starting: "starting"
|
|
1083
|
-
};
|
|
1084
|
-
var Status = {
|
|
1085
|
-
Pending: "PENDING",
|
|
1086
|
-
Running: "RUNNING",
|
|
1087
|
-
Stopped: "STOPPED",
|
|
1088
|
-
Initializing: "INITIALIZING",
|
|
1089
|
-
Stopping: "STOPPING",
|
|
1090
|
-
Unconfigured: "UNCONFIGURED",
|
|
1091
|
-
Failed: "FAILED"
|
|
1092
|
-
};
|
|
1093
|
-
var STIGType = {
|
|
1094
|
-
"0": 0,
|
|
1095
|
-
"1": 1
|
|
1096
|
-
};
|
|
1097
|
-
var SupportNewTicketCommunityTypeInput = {
|
|
1098
|
-
Bug: "BUG",
|
|
1099
|
-
Feature: "FEATURE"
|
|
1100
|
-
};
|
|
1101
|
-
var Sync = {
|
|
1102
|
-
Standard: "STANDARD",
|
|
1103
|
-
Always: "ALWAYS",
|
|
1104
|
-
Disabled: "DISABLED",
|
|
1105
|
-
Inherit: "INHERIT"
|
|
1106
|
-
};
|
|
1107
|
-
var Sysloglevel = {
|
|
1108
|
-
FEmerg: "F_EMERG",
|
|
1109
|
-
FAlert: "F_ALERT",
|
|
1110
|
-
FCrit: "F_CRIT",
|
|
1111
|
-
FErr: "F_ERR",
|
|
1112
|
-
FWarning: "F_WARNING",
|
|
1113
|
-
FNotice: "F_NOTICE",
|
|
1114
|
-
FInfo: "F_INFO",
|
|
1115
|
-
FDebug: "F_DEBUG"
|
|
1116
|
-
};
|
|
1117
|
-
var SyslogServerTransport = {
|
|
1118
|
-
Udp: "UDP",
|
|
1119
|
-
Tcp: "TCP",
|
|
1120
|
-
Tls: "TLS"
|
|
1121
|
-
};
|
|
1122
|
-
var SyslogServerTransportInput = {
|
|
1123
|
-
Udp: "UDP",
|
|
1124
|
-
Tcp: "TCP",
|
|
1125
|
-
Tls: "TLS"
|
|
1126
|
-
};
|
|
1127
|
-
var SystemProductTypeResult = {
|
|
1128
|
-
CommunityEdition: "COMMUNITY_EDITION",
|
|
1129
|
-
Enterprise: "ENTERPRISE"
|
|
1130
|
-
};
|
|
1131
|
-
var SystemStateResult = {
|
|
1132
|
-
Booting: "BOOTING",
|
|
1133
|
-
Ready: "READY",
|
|
1134
|
-
ShuttingDown: "SHUTTING_DOWN"
|
|
1135
|
-
};
|
|
1136
|
-
var Tag = {
|
|
1137
|
-
Owner: "owner@",
|
|
1138
|
-
Group: "group@",
|
|
1139
|
-
Everyone: "everyone@",
|
|
1140
|
-
User: "USER",
|
|
1141
|
-
"GROUP": "GROUP"
|
|
1142
|
-
};
|
|
1143
|
-
var Target = {
|
|
1144
|
-
Ws: "WS",
|
|
1145
|
-
Cli: "CLI",
|
|
1146
|
-
Rest: "REST"
|
|
1147
|
-
};
|
|
1148
|
-
var Time = {
|
|
1149
|
-
Local: "LOCAL",
|
|
1150
|
-
Utc: "UTC"
|
|
1151
|
-
};
|
|
1152
|
-
var TruecommandConfigChangedEventFieldsStatus = {
|
|
1153
|
-
Connected: "CONNECTED",
|
|
1154
|
-
Connecting: "CONNECTING",
|
|
1155
|
-
Disabled: "DISABLED",
|
|
1156
|
-
Failed: "FAILED"
|
|
1157
|
-
};
|
|
1158
|
-
var TruecommandConfigChangedEventFieldsStatusInput = {
|
|
1159
|
-
Connected: "CONNECTED",
|
|
1160
|
-
Connecting: "CONNECTING",
|
|
1161
|
-
Disabled: "DISABLED",
|
|
1162
|
-
Failed: "FAILED"
|
|
1163
|
-
};
|
|
1164
|
-
var TunableCreateType = {
|
|
1165
|
-
Sysctl: "SYSCTL",
|
|
1166
|
-
Udev: "UDEV",
|
|
1167
|
-
Zfs: "ZFS"
|
|
1168
|
-
};
|
|
1169
|
-
var TunableCreateTypeInput = {
|
|
1170
|
-
Sysctl: "SYSCTL",
|
|
1171
|
-
Udev: "UDEV",
|
|
1172
|
-
Zfs: "ZFS"
|
|
1173
|
-
};
|
|
1174
|
-
var Unixcharset = {
|
|
1175
|
-
Utf8: "UTF-8",
|
|
1176
|
-
Gb2312: "GB2312",
|
|
1177
|
-
HzGb2312: "HZ-GB-2312",
|
|
1178
|
-
Cp1361: "CP1361",
|
|
1179
|
-
Big5: "BIG5",
|
|
1180
|
-
Big5hkscs: "BIG5HKSCS",
|
|
1181
|
-
Cp037: "CP037",
|
|
1182
|
-
Cp273: "CP273",
|
|
1183
|
-
Cp424: "CP424",
|
|
1184
|
-
Cp437: "CP437",
|
|
1185
|
-
Cp500: "CP500",
|
|
1186
|
-
Cp775: "CP775",
|
|
1187
|
-
Cp850: "CP850",
|
|
1188
|
-
Cp852: "CP852",
|
|
1189
|
-
Cp855: "CP855",
|
|
1190
|
-
Cp857: "CP857",
|
|
1191
|
-
Cp858: "CP858",
|
|
1192
|
-
Cp860: "CP860",
|
|
1193
|
-
Cp861: "CP861",
|
|
1194
|
-
Cp862: "CP862",
|
|
1195
|
-
Cp863: "CP863",
|
|
1196
|
-
Cp864: "CP864",
|
|
1197
|
-
Cp865: "CP865",
|
|
1198
|
-
Cp866: "CP866",
|
|
1199
|
-
Cp869: "CP869",
|
|
1200
|
-
Cp932: "CP932",
|
|
1201
|
-
Cp949: "CP949",
|
|
1202
|
-
Cp950: "CP950",
|
|
1203
|
-
Cp1026: "CP1026",
|
|
1204
|
-
Cp1125: "CP1125",
|
|
1205
|
-
Cp1140: "CP1140",
|
|
1206
|
-
Cp1250: "CP1250",
|
|
1207
|
-
Cp1251: "CP1251",
|
|
1208
|
-
Cp1252: "CP1252",
|
|
1209
|
-
Cp1253: "CP1253",
|
|
1210
|
-
Cp1254: "CP1254",
|
|
1211
|
-
Cp1255: "CP1255",
|
|
1212
|
-
Cp1256: "CP1256",
|
|
1213
|
-
Cp1257: "CP1257",
|
|
1214
|
-
Cp1258: "CP1258",
|
|
1215
|
-
EucJis2004: "EUC_JIS_2004",
|
|
1216
|
-
EucJisx0213: "EUC_JISX0213",
|
|
1217
|
-
EucJp: "EUC_JP",
|
|
1218
|
-
EucKr: "EUC_KR",
|
|
1219
|
-
Gb18030: "GB18030",
|
|
1220
|
-
Gbk: "GBK",
|
|
1221
|
-
Hz: "HZ",
|
|
1222
|
-
Iso2022Jp: "ISO2022_JP",
|
|
1223
|
-
Iso2022Jp1: "ISO2022_JP_1",
|
|
1224
|
-
Iso2022Jp2: "ISO2022_JP_2",
|
|
1225
|
-
Iso2022Jp2004: "ISO2022_JP_2004",
|
|
1226
|
-
Iso2022Jp3: "ISO2022_JP_3",
|
|
1227
|
-
Iso2022JpExt: "ISO2022_JP_EXT",
|
|
1228
|
-
Iso2022Kr: "ISO2022_KR",
|
|
1229
|
-
Iso88591: "ISO8859_1",
|
|
1230
|
-
Iso88592: "ISO8859_2",
|
|
1231
|
-
Iso88593: "ISO8859_3",
|
|
1232
|
-
Iso88594: "ISO8859_4",
|
|
1233
|
-
Iso88595: "ISO8859_5",
|
|
1234
|
-
Iso88596: "ISO8859_6",
|
|
1235
|
-
Iso88597: "ISO8859_7",
|
|
1236
|
-
Iso88598: "ISO8859_8",
|
|
1237
|
-
Iso88599: "ISO8859_9",
|
|
1238
|
-
Iso885910: "ISO8859_10",
|
|
1239
|
-
Iso885911: "ISO8859_11",
|
|
1240
|
-
Iso885913: "ISO8859_13",
|
|
1241
|
-
Iso885914: "ISO8859_14",
|
|
1242
|
-
Iso885915: "ISO8859_15",
|
|
1243
|
-
Iso885916: "ISO8859_16",
|
|
1244
|
-
Johab: "JOHAB",
|
|
1245
|
-
Koi8R: "KOI8_R",
|
|
1246
|
-
Kz1048: "KZ1048",
|
|
1247
|
-
Latin1: "LATIN_1",
|
|
1248
|
-
MacCyrillic: "MAC_CYRILLIC",
|
|
1249
|
-
MacGreek: "MAC_GREEK",
|
|
1250
|
-
MacIceland: "MAC_ICELAND",
|
|
1251
|
-
MacLatin2: "MAC_LATIN2",
|
|
1252
|
-
MacRoman: "MAC_ROMAN",
|
|
1253
|
-
MacTurkish: "MAC_TURKISH",
|
|
1254
|
-
Ptcp154: "PTCP154",
|
|
1255
|
-
ShiftJis: "SHIFT_JIS",
|
|
1256
|
-
ShiftJis2004: "SHIFT_JIS_2004",
|
|
1257
|
-
ShiftJisx0213: "SHIFT_JISX0213",
|
|
1258
|
-
Tis620: "TIS_620",
|
|
1259
|
-
Utf16: "UTF_16",
|
|
1260
|
-
Utf16Be: "UTF_16_BE",
|
|
1261
|
-
Utf16Le: "UTF_16_LE"
|
|
1262
|
-
};
|
|
1263
|
-
var UPSEntryMode = {
|
|
1264
|
-
Master: "MASTER",
|
|
1265
|
-
Slave: "SLAVE"
|
|
1266
|
-
};
|
|
1267
|
-
var UPSEntryModeInput = {
|
|
1268
|
-
Master: "MASTER",
|
|
1269
|
-
Slave: "SLAVE"
|
|
1270
|
-
};
|
|
1271
|
-
var Username = {
|
|
1272
|
-
Root: "root",
|
|
1273
|
-
TruenasAdmin: "truenas_admin"
|
|
1274
|
-
};
|
|
1275
|
-
var Vendor = {
|
|
1276
|
-
Nextcloud: "NEXTCLOUD",
|
|
1277
|
-
Owncloud: "OWNCLOUD",
|
|
1278
|
-
Sharepoint: "SHAREPOINT",
|
|
1279
|
-
Other: "OTHER"
|
|
1280
|
-
};
|
|
1281
|
-
var VMDiskDeviceType = {
|
|
1282
|
-
Ahci: "AHCI",
|
|
1283
|
-
Virtio: "VIRTIO"
|
|
1284
|
-
};
|
|
1285
|
-
var VMDiskDeviceTypeInput = {
|
|
1286
|
-
Ahci: "AHCI",
|
|
1287
|
-
Virtio: "VIRTIO"
|
|
1288
|
-
};
|
|
1289
|
-
var VMWareEntryStateStateInput = {
|
|
1290
|
-
Pending: "PENDING",
|
|
1291
|
-
Success: "SUCCESS",
|
|
1292
|
-
Error: "ERROR",
|
|
1293
|
-
Blocked: "BLOCKED"
|
|
1294
|
-
};
|
|
1295
|
-
var VMWareMatchDatastoresWithDatasetsResultFilesystemType = {
|
|
1296
|
-
Filesystem: "FILESYSTEM",
|
|
1297
|
-
Volume: "VOLUME"
|
|
1298
|
-
};
|
|
1299
|
-
var Volblocksize = {
|
|
1300
|
-
"512": "512",
|
|
1301
|
-
"512B": "512B",
|
|
1302
|
-
"1K": "1K",
|
|
1303
|
-
"2K": "2K",
|
|
1304
|
-
"4K": "4K",
|
|
1305
|
-
"8K": "8K",
|
|
1306
|
-
"16K": "16K",
|
|
1307
|
-
"32K": "32K",
|
|
1308
|
-
"64K": "64K",
|
|
1309
|
-
"128K": "128K"
|
|
1310
|
-
};
|
|
1311
|
-
var When = {
|
|
1312
|
-
Preinit: "PREINIT",
|
|
1313
|
-
Postinit: "POSTINIT",
|
|
1314
|
-
Shutdown: "SHUTDOWN"
|
|
1315
|
-
};
|
|
1316
|
-
var ZfsTierRewriteJobEntryStatusInput = {
|
|
1317
|
-
Complete: "COMPLETE",
|
|
1318
|
-
Running: "RUNNING",
|
|
1319
|
-
Queued: "QUEUED",
|
|
1320
|
-
Cancelled: "CANCELLED",
|
|
1321
|
-
Stopped: "STOPPED",
|
|
1322
|
-
Error: "ERROR"
|
|
1323
|
-
};
|
|
1324
|
-
|
|
1325
|
-
// src/generated/v25_10_1/index.ts
|
|
1326
|
-
var v25_10_1_exports = {};
|
|
1327
|
-
__export(v25_10_1_exports, {
|
|
1328
|
-
ACLTemplateEntryAcltypeInput: () => ACLTemplateEntryAcltypeInput,
|
|
1329
|
-
Aclmode: () => Aclmode,
|
|
1330
|
-
Acltype: () => Acltype,
|
|
1331
|
-
Action: () => Action,
|
|
1332
|
-
Advpowermgmt: () => Advpowermgmt,
|
|
1333
|
-
Algorithm: () => Algorithm,
|
|
1334
|
-
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
1335
|
-
Atime: () => Atime,
|
|
1336
|
-
AuthMeSource: () => AuthMeSource,
|
|
1337
|
-
Authenticator: () => Authenticator,
|
|
1338
|
-
Authmethod: () => Authmethod,
|
|
1339
|
-
Autotrim: () => Autotrim,
|
|
1340
|
-
Basic: () => Basic,
|
|
1341
|
-
Blocksize: () => Blocksize,
|
|
1342
|
-
Bootloader: () => Bootloader,
|
|
1343
|
-
Casesensitivity: () => Casesensitivity,
|
|
1344
|
-
CloudBackupSnapshotItemType: () => CloudBackupSnapshotItemType,
|
|
1345
|
-
CloudSyncCreateDirection: () => CloudSyncCreateDirection,
|
|
1346
|
-
CloudSyncCreateDirectionInput: () => CloudSyncCreateDirectionInput,
|
|
1347
|
-
CloudTaskAttributesEncryption: () => CloudTaskAttributesEncryption,
|
|
1348
|
-
CloudTaskAttributesEncryptionInput: () => CloudTaskAttributesEncryptionInput,
|
|
1349
|
-
Code: () => Code,
|
|
1350
|
-
Compression: () => Compression,
|
|
1351
|
-
CorePingRemoteTypeInput: () => CorePingRemoteTypeInput,
|
|
1352
|
-
Credentials: () => Credentials,
|
|
1353
|
-
DeviceGetInfoOtherTypeInput: () => DeviceGetInfoOtherTypeInput,
|
|
1354
|
-
DiskDetailsTypeInput: () => DiskDetailsTypeInput,
|
|
1355
|
-
DiskWipeModeInput: () => DiskWipeModeInput,
|
|
1356
|
-
DockerStatusInfoStatus: () => DockerStatusInfoStatus,
|
|
1357
|
-
DockerStatusInfoStatusInput: () => DockerStatusInfoStatusInput,
|
|
1358
|
-
Enclosure2SetSlotStatusStatusInput: () => Enclosure2SetSlotStatusStatusInput,
|
|
1359
|
-
Endpoint: () => Endpoint,
|
|
1360
|
-
Exec: () => Exec,
|
|
1361
|
-
Feature: () => Feature,
|
|
1362
|
-
FilesystemDirEntryType: () => FilesystemDirEntryType,
|
|
1363
|
-
Function: () => Function,
|
|
1364
|
-
GetDisplayDeviceType: () => GetDisplayDeviceType,
|
|
1365
|
-
Hddstandby: () => Hddstandby,
|
|
1366
|
-
InitShutdownScriptCreateType: () => InitShutdownScriptCreateType,
|
|
1367
|
-
InitShutdownScriptCreateTypeInput: () => InitShutdownScriptCreateTypeInput,
|
|
1368
|
-
InterfaceCreateAliasTypeInput: () => InterfaceCreateAliasTypeInput,
|
|
1369
|
-
InterfaceCreateTypeInput: () => InterfaceCreateTypeInput,
|
|
1370
|
-
Iotype: () => Iotype,
|
|
1371
|
-
IpmiChassisIdentifyVerb: () => IpmiChassisIdentifyVerb,
|
|
1372
|
-
IscsiExtentCreateType: () => IscsiExtentCreateType,
|
|
1373
|
-
IscsiExtentCreateTypeInput: () => IscsiExtentCreateTypeInput,
|
|
1374
|
-
IscsiTargetCreateMode: () => IscsiTargetCreateMode,
|
|
1375
|
-
IscsiTargetCreateModeInput: () => IscsiTargetCreateModeInput,
|
|
1376
|
-
KeychainCredentialEntryType: () => KeychainCredentialEntryType,
|
|
1377
|
-
KeychainCredentialEntryTypeInput: () => KeychainCredentialEntryTypeInput,
|
|
1378
|
-
Level: () => Level,
|
|
1379
|
-
NFS4ACEType: () => NFS4ACEType,
|
|
1380
|
-
NFS4ACETypeInput: () => NFS4ACETypeInput,
|
|
1381
|
-
Name: () => Name,
|
|
1382
|
-
Policy: () => Policy,
|
|
1383
|
-
PoolCreateChecksum: () => PoolCreateChecksum,
|
|
1384
|
-
PoolCreateDeduplication: () => PoolCreateDeduplication,
|
|
1385
|
-
PoolCreateTopologyDataVdevDRAIDTypeInput: () => PoolCreateTopologyDataVdevDRAIDTypeInput,
|
|
1386
|
-
PoolDatasetCreateFilesystemAcltypeInput: () => PoolDatasetCreateFilesystemAcltypeInput,
|
|
1387
|
-
PoolDatasetCreateFilesystemChecksum: () => PoolDatasetCreateFilesystemChecksum,
|
|
1388
|
-
PoolDatasetCreateFilesystemDeduplication: () => PoolDatasetCreateFilesystemDeduplication,
|
|
1389
|
-
PoolDatasetCreateFilesystemReadonlyInput: () => PoolDatasetCreateFilesystemReadonlyInput,
|
|
1390
|
-
PoolDatasetDeleteResult: () => PoolDatasetDeleteResult,
|
|
1391
|
-
PoolScanStateInput: () => PoolScanStateInput,
|
|
1392
|
-
PoolSnapshotEntryPropertyFieldsSource: () => PoolSnapshotEntryPropertyFieldsSource,
|
|
1393
|
-
Protocol: () => Protocol,
|
|
1394
|
-
Purpose: () => Purpose2,
|
|
1395
|
-
Readonly: () => Readonly,
|
|
1396
|
-
ReplicationCountEligibleManualSnapshotsTransport: () => ReplicationCountEligibleManualSnapshotsTransport,
|
|
1397
|
-
ReplicationCountEligibleManualSnapshotsTransportInput: () => ReplicationCountEligibleManualSnapshotsTransportInput,
|
|
1398
|
-
ReplicationCreateReadonlyInput: () => ReplicationCreateReadonlyInput,
|
|
1399
|
-
Resolution: () => Resolution,
|
|
1400
|
-
Rpm: () => Rpm,
|
|
1401
|
-
RsyncTaskCreateDirection: () => RsyncTaskCreateDirection,
|
|
1402
|
-
RsyncTaskCreateDirectionInput: () => RsyncTaskCreateDirectionInput,
|
|
1403
|
-
RsyncTaskCreateMode: () => RsyncTaskCreateMode,
|
|
1404
|
-
RsyncTaskCreateModeInput: () => RsyncTaskCreateModeInput,
|
|
1405
|
-
SMBEntryEncryption: () => SMBEntryEncryption,
|
|
1406
|
-
SMBEntryEncryptionInput: () => SMBEntryEncryptionInput,
|
|
1407
|
-
STIGType: () => STIGType,
|
|
1408
|
-
Schema: () => Schema,
|
|
1409
|
-
Security: () => Security,
|
|
1410
|
-
Serialspeed: () => Serialspeed,
|
|
1411
|
-
Service: () => Service,
|
|
1412
|
-
ServiceControlVerb: () => ServiceControlVerb,
|
|
1413
|
-
Shutdown: () => Shutdown,
|
|
1414
|
-
Snapdev: () => Snapdev,
|
|
1415
|
-
Snapdir: () => Snapdir,
|
|
1416
|
-
SourceInput: () => SourceInput,
|
|
1417
|
-
SourceValueType: () => SourceValueType,
|
|
1418
|
-
State: () => State,
|
|
1419
|
-
SupportNewTicketCommunityTypeInput: () => SupportNewTicketCommunityTypeInput,
|
|
1420
|
-
Sync: () => Sync,
|
|
1421
|
-
SyslogServerTransport: () => SyslogServerTransport,
|
|
1422
|
-
SyslogServerTransportInput: () => SyslogServerTransportInput,
|
|
1423
|
-
Sysloglevel: () => Sysloglevel,
|
|
1424
|
-
SystemProductTypeResult: () => SystemProductTypeResult,
|
|
1425
|
-
SystemStateResult: () => SystemStateResult,
|
|
1426
|
-
Tag: () => Tag,
|
|
1427
|
-
Target: () => Target,
|
|
1428
|
-
Time: () => Time,
|
|
1429
|
-
TruecommandConfigChangedEventFieldsStatus: () => TruecommandConfigChangedEventFieldsStatus,
|
|
1430
|
-
TruecommandConfigChangedEventFieldsStatusInput: () => TruecommandConfigChangedEventFieldsStatusInput,
|
|
1431
|
-
TunableCreateType: () => TunableCreateType,
|
|
1432
|
-
TunableCreateTypeInput: () => TunableCreateTypeInput,
|
|
1433
|
-
UPSEntryMode: () => UPSEntryMode,
|
|
1434
|
-
UPSEntryModeInput: () => UPSEntryModeInput,
|
|
1435
|
-
Unixcharset: () => Unixcharset,
|
|
1436
|
-
Username: () => Username,
|
|
1437
|
-
VMDiskDeviceType: () => VMDiskDeviceType,
|
|
1438
|
-
VMDiskDeviceTypeInput: () => VMDiskDeviceTypeInput,
|
|
1439
|
-
VMWareEntryStateStateInput: () => VMWareEntryStateStateInput,
|
|
1440
|
-
VMWareMatchDatastoresWithDatasetsResultFilesystemType: () => VMWareMatchDatastoresWithDatasetsResultFilesystemType,
|
|
1441
|
-
Vendor: () => Vendor,
|
|
1442
|
-
Volblocksize: () => Volblocksize,
|
|
1443
|
-
When: () => When,
|
|
1444
|
-
ZfsTierRewriteJobEntryStatusInput: () => ZfsTierRewriteJobEntryStatusInput
|
|
11
|
+
Object.defineProperty(exports, "AuthError", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunk6PF34AWT_cjs.AuthError; }
|
|
1445
14
|
});
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
Pending: "PENDING",
|
|
1450
|
-
Running: "RUNNING",
|
|
1451
|
-
Stopped: "STOPPED",
|
|
1452
|
-
Initializing: "INITIALIZING",
|
|
1453
|
-
Stopping: "STOPPING",
|
|
1454
|
-
Unconfigured: "UNCONFIGURED",
|
|
1455
|
-
Failed: "FAILED",
|
|
1456
|
-
Migrating: "MIGRATING",
|
|
1457
|
-
MigrationFailed: "MIGRATION_FAILED"
|
|
1458
|
-
};
|
|
1459
|
-
var Purpose2 = {
|
|
1460
|
-
DefaultShare: "DEFAULT_SHARE",
|
|
1461
|
-
LegacyShare: "LEGACY_SHARE",
|
|
1462
|
-
TimemachineShare: "TIMEMACHINE_SHARE",
|
|
1463
|
-
MultiprotocolShare: "MULTIPROTOCOL_SHARE",
|
|
1464
|
-
TimeLockedShare: "TIME_LOCKED_SHARE",
|
|
1465
|
-
PrivateDatasetsShare: "PRIVATE_DATASETS_SHARE",
|
|
1466
|
-
ExternalShare: "EXTERNAL_SHARE",
|
|
1467
|
-
VeeamRepositoryShare: "VEEAM_REPOSITORY_SHARE",
|
|
1468
|
-
FcpShare: "FCP_SHARE"
|
|
1469
|
-
};
|
|
1470
|
-
|
|
1471
|
-
// src/generated/v25_10_2/index.ts
|
|
1472
|
-
var v25_10_2_exports = {};
|
|
1473
|
-
__export(v25_10_2_exports, {
|
|
1474
|
-
ACLTemplateEntryAcltypeInput: () => ACLTemplateEntryAcltypeInput,
|
|
1475
|
-
Aclmode: () => Aclmode,
|
|
1476
|
-
Acltype: () => Acltype,
|
|
1477
|
-
Action: () => Action,
|
|
1478
|
-
Advpowermgmt: () => Advpowermgmt,
|
|
1479
|
-
Algorithm: () => Algorithm,
|
|
1480
|
-
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
1481
|
-
Atime: () => Atime,
|
|
1482
|
-
AuthMeSource: () => AuthMeSource,
|
|
1483
|
-
Authenticator: () => Authenticator,
|
|
1484
|
-
Authmethod: () => Authmethod,
|
|
1485
|
-
Autotrim: () => Autotrim,
|
|
1486
|
-
Basic: () => Basic,
|
|
1487
|
-
Blocksize: () => Blocksize,
|
|
1488
|
-
Bootloader: () => Bootloader,
|
|
1489
|
-
Casesensitivity: () => Casesensitivity,
|
|
1490
|
-
CloudBackupSnapshotItemType: () => CloudBackupSnapshotItemType,
|
|
1491
|
-
CloudSyncCreateDirection: () => CloudSyncCreateDirection,
|
|
1492
|
-
CloudSyncCreateDirectionInput: () => CloudSyncCreateDirectionInput,
|
|
1493
|
-
CloudTaskAttributesEncryption: () => CloudTaskAttributesEncryption,
|
|
1494
|
-
CloudTaskAttributesEncryptionInput: () => CloudTaskAttributesEncryptionInput,
|
|
1495
|
-
Code: () => Code,
|
|
1496
|
-
Compression: () => Compression,
|
|
1497
|
-
CorePingRemoteTypeInput: () => CorePingRemoteTypeInput,
|
|
1498
|
-
Credentials: () => Credentials,
|
|
1499
|
-
DeviceGetInfoOtherTypeInput: () => DeviceGetInfoOtherTypeInput,
|
|
1500
|
-
DiskDetailsTypeInput: () => DiskDetailsTypeInput,
|
|
1501
|
-
DiskWipeModeInput: () => DiskWipeModeInput,
|
|
1502
|
-
DockerStatusInfoStatus: () => DockerStatusInfoStatus,
|
|
1503
|
-
DockerStatusInfoStatusInput: () => DockerStatusInfoStatusInput,
|
|
1504
|
-
Enclosure2SetSlotStatusStatusInput: () => Enclosure2SetSlotStatusStatusInput,
|
|
1505
|
-
Endpoint: () => Endpoint,
|
|
1506
|
-
Exec: () => Exec,
|
|
1507
|
-
Feature: () => Feature,
|
|
1508
|
-
FilesystemDirEntryType: () => FilesystemDirEntryType,
|
|
1509
|
-
Function: () => Function,
|
|
1510
|
-
GetDisplayDeviceType: () => GetDisplayDeviceType,
|
|
1511
|
-
Hddstandby: () => Hddstandby,
|
|
1512
|
-
InitShutdownScriptCreateType: () => InitShutdownScriptCreateType,
|
|
1513
|
-
InitShutdownScriptCreateTypeInput: () => InitShutdownScriptCreateTypeInput,
|
|
1514
|
-
InterfaceCreateAliasTypeInput: () => InterfaceCreateAliasTypeInput,
|
|
1515
|
-
InterfaceCreateTypeInput: () => InterfaceCreateTypeInput,
|
|
1516
|
-
Iotype: () => Iotype,
|
|
1517
|
-
IpmiChassisIdentifyRequestVerb: () => IpmiChassisIdentifyRequestVerb,
|
|
1518
|
-
IscsiExtentCreateType: () => IscsiExtentCreateType,
|
|
1519
|
-
IscsiExtentCreateTypeInput: () => IscsiExtentCreateTypeInput,
|
|
1520
|
-
IscsiTargetCreateMode: () => IscsiTargetCreateMode,
|
|
1521
|
-
IscsiTargetCreateModeInput: () => IscsiTargetCreateModeInput,
|
|
1522
|
-
KeychainCredentialEntryType: () => KeychainCredentialEntryType,
|
|
1523
|
-
KeychainCredentialEntryTypeInput: () => KeychainCredentialEntryTypeInput,
|
|
1524
|
-
Level: () => Level,
|
|
1525
|
-
NFS4ACEType: () => NFS4ACEType,
|
|
1526
|
-
NFS4ACETypeInput: () => NFS4ACETypeInput,
|
|
1527
|
-
Name: () => Name,
|
|
1528
|
-
Policy: () => Policy,
|
|
1529
|
-
PoolCreateChecksum: () => PoolCreateChecksum,
|
|
1530
|
-
PoolCreateDeduplication: () => PoolCreateDeduplication,
|
|
1531
|
-
PoolCreateTopologyDataVdevDRAIDTypeInput: () => PoolCreateTopologyDataVdevDRAIDTypeInput,
|
|
1532
|
-
PoolDatasetCreateFilesystemAcltypeInput: () => PoolDatasetCreateFilesystemAcltypeInput,
|
|
1533
|
-
PoolDatasetCreateFilesystemChecksum: () => PoolDatasetCreateFilesystemChecksum,
|
|
1534
|
-
PoolDatasetCreateFilesystemDeduplication: () => PoolDatasetCreateFilesystemDeduplication,
|
|
1535
|
-
PoolDatasetCreateFilesystemReadonlyInput: () => PoolDatasetCreateFilesystemReadonlyInput,
|
|
1536
|
-
PoolDatasetDeleteResult: () => PoolDatasetDeleteResult,
|
|
1537
|
-
PoolScanStateInput: () => PoolScanStateInput,
|
|
1538
|
-
PoolSnapshotEntryPropertyFieldsSource: () => PoolSnapshotEntryPropertyFieldsSource,
|
|
1539
|
-
Protocol: () => Protocol,
|
|
1540
|
-
Purpose: () => Purpose2,
|
|
1541
|
-
Readonly: () => Readonly,
|
|
1542
|
-
ReplicationCountEligibleManualSnapshotsTransport: () => ReplicationCountEligibleManualSnapshotsTransport,
|
|
1543
|
-
ReplicationCountEligibleManualSnapshotsTransportInput: () => ReplicationCountEligibleManualSnapshotsTransportInput,
|
|
1544
|
-
ReplicationCreateReadonlyInput: () => ReplicationCreateReadonlyInput,
|
|
1545
|
-
Resolution: () => Resolution,
|
|
1546
|
-
Rpm: () => Rpm,
|
|
1547
|
-
RsyncTaskCreateDirection: () => RsyncTaskCreateDirection,
|
|
1548
|
-
RsyncTaskCreateDirectionInput: () => RsyncTaskCreateDirectionInput,
|
|
1549
|
-
RsyncTaskCreateMode: () => RsyncTaskCreateMode,
|
|
1550
|
-
RsyncTaskCreateModeInput: () => RsyncTaskCreateModeInput,
|
|
1551
|
-
SMBEntryEncryption: () => SMBEntryEncryption,
|
|
1552
|
-
SMBEntryEncryptionInput: () => SMBEntryEncryptionInput,
|
|
1553
|
-
STIGType: () => STIGType,
|
|
1554
|
-
Schema: () => Schema,
|
|
1555
|
-
Security: () => Security,
|
|
1556
|
-
Serialspeed: () => Serialspeed,
|
|
1557
|
-
Service: () => Service,
|
|
1558
|
-
ServiceControlVerb: () => ServiceControlVerb,
|
|
1559
|
-
Shutdown: () => Shutdown,
|
|
1560
|
-
Snapdev: () => Snapdev,
|
|
1561
|
-
Snapdir: () => Snapdir,
|
|
1562
|
-
SourceInput: () => SourceInput,
|
|
1563
|
-
SourceValueType: () => SourceValueType,
|
|
1564
|
-
State: () => State,
|
|
1565
|
-
SupportNewTicketCommunityTypeInput: () => SupportNewTicketCommunityTypeInput,
|
|
1566
|
-
Sync: () => Sync,
|
|
1567
|
-
SyslogServerTransport: () => SyslogServerTransport,
|
|
1568
|
-
SyslogServerTransportInput: () => SyslogServerTransportInput,
|
|
1569
|
-
Sysloglevel: () => Sysloglevel,
|
|
1570
|
-
SystemProductTypeResult: () => SystemProductTypeResult,
|
|
1571
|
-
SystemStateResult: () => SystemStateResult,
|
|
1572
|
-
Tag: () => Tag,
|
|
1573
|
-
Target: () => Target,
|
|
1574
|
-
Time: () => Time,
|
|
1575
|
-
TruecommandConfigChangedEventFieldsStatus: () => TruecommandConfigChangedEventFieldsStatus,
|
|
1576
|
-
TruecommandConfigChangedEventFieldsStatusInput: () => TruecommandConfigChangedEventFieldsStatusInput,
|
|
1577
|
-
TunableCreateType: () => TunableCreateType,
|
|
1578
|
-
TunableCreateTypeInput: () => TunableCreateTypeInput,
|
|
1579
|
-
UPSEntryMode: () => UPSEntryMode,
|
|
1580
|
-
UPSEntryModeInput: () => UPSEntryModeInput,
|
|
1581
|
-
Unixcharset: () => Unixcharset,
|
|
1582
|
-
Username: () => Username,
|
|
1583
|
-
VMDiskDeviceType: () => VMDiskDeviceType,
|
|
1584
|
-
VMDiskDeviceTypeInput: () => VMDiskDeviceTypeInput,
|
|
1585
|
-
VMWareEntryStateStateInput: () => VMWareEntryStateStateInput,
|
|
1586
|
-
VMWareMatchDatastoresWithDatasetsResultFilesystemType: () => VMWareMatchDatastoresWithDatasetsResultFilesystemType,
|
|
1587
|
-
Vendor: () => Vendor,
|
|
1588
|
-
Volblocksize: () => Volblocksize,
|
|
1589
|
-
When: () => When,
|
|
1590
|
-
ZfsTierRewriteJobEntryStatusInput: () => ZfsTierRewriteJobEntryStatusInput
|
|
15
|
+
Object.defineProperty(exports, "AuthErrorCode", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunk6PF34AWT_cjs.AuthErrorCode; }
|
|
1591
18
|
});
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
On: "ON",
|
|
1596
|
-
Off: "OFF"
|
|
1597
|
-
};
|
|
1598
|
-
|
|
1599
|
-
// src/generated/v25_10_3/index.ts
|
|
1600
|
-
var v25_10_3_exports = {};
|
|
1601
|
-
__export(v25_10_3_exports, {
|
|
1602
|
-
ACLTemplateEntryAcltypeInput: () => ACLTemplateEntryAcltypeInput,
|
|
1603
|
-
Aclmode: () => Aclmode,
|
|
1604
|
-
Acltype: () => Acltype,
|
|
1605
|
-
Action: () => Action,
|
|
1606
|
-
Advpowermgmt: () => Advpowermgmt,
|
|
1607
|
-
Algorithm: () => Algorithm,
|
|
1608
|
-
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
1609
|
-
Atime: () => Atime,
|
|
1610
|
-
AuthMeSource: () => AuthMeSource,
|
|
1611
|
-
Authenticator: () => Authenticator,
|
|
1612
|
-
Authmethod: () => Authmethod,
|
|
1613
|
-
Autotrim: () => Autotrim,
|
|
1614
|
-
Basic: () => Basic,
|
|
1615
|
-
Blocksize: () => Blocksize,
|
|
1616
|
-
Bootloader: () => Bootloader,
|
|
1617
|
-
Casesensitivity: () => Casesensitivity,
|
|
1618
|
-
CloudBackupSnapshotItemType: () => CloudBackupSnapshotItemType,
|
|
1619
|
-
CloudSyncCreateDirection: () => CloudSyncCreateDirection,
|
|
1620
|
-
CloudSyncCreateDirectionInput: () => CloudSyncCreateDirectionInput,
|
|
1621
|
-
CloudTaskAttributesEncryption: () => CloudTaskAttributesEncryption,
|
|
1622
|
-
CloudTaskAttributesEncryptionInput: () => CloudTaskAttributesEncryptionInput,
|
|
1623
|
-
Code: () => Code,
|
|
1624
|
-
Compression: () => Compression,
|
|
1625
|
-
CorePingRemoteTypeInput: () => CorePingRemoteTypeInput,
|
|
1626
|
-
Credentials: () => Credentials,
|
|
1627
|
-
DeviceGetInfoOtherTypeInput: () => DeviceGetInfoOtherTypeInput,
|
|
1628
|
-
DiskDetailsTypeInput: () => DiskDetailsTypeInput,
|
|
1629
|
-
DiskWipeModeInput: () => DiskWipeModeInput,
|
|
1630
|
-
DockerStatusInfoStatus: () => DockerStatusInfoStatus,
|
|
1631
|
-
DockerStatusInfoStatusInput: () => DockerStatusInfoStatusInput,
|
|
1632
|
-
Enclosure2SetSlotStatusStatusInput: () => Enclosure2SetSlotStatusStatusInput,
|
|
1633
|
-
Endpoint: () => Endpoint,
|
|
1634
|
-
Exec: () => Exec,
|
|
1635
|
-
Feature: () => Feature,
|
|
1636
|
-
FilesystemDirEntryType: () => FilesystemDirEntryType,
|
|
1637
|
-
Function: () => Function,
|
|
1638
|
-
GetDisplayDeviceType: () => GetDisplayDeviceType,
|
|
1639
|
-
Hddstandby: () => Hddstandby,
|
|
1640
|
-
InitShutdownScriptCreateType: () => InitShutdownScriptCreateType,
|
|
1641
|
-
InitShutdownScriptCreateTypeInput: () => InitShutdownScriptCreateTypeInput,
|
|
1642
|
-
InterfaceCreateAliasTypeInput: () => InterfaceCreateAliasTypeInput,
|
|
1643
|
-
InterfaceCreateTypeInput: () => InterfaceCreateTypeInput,
|
|
1644
|
-
Iotype: () => Iotype,
|
|
1645
|
-
IpmiChassisIdentifyRequestVerb: () => IpmiChassisIdentifyRequestVerb,
|
|
1646
|
-
IscsiExtentCreateType: () => IscsiExtentCreateType,
|
|
1647
|
-
IscsiExtentCreateTypeInput: () => IscsiExtentCreateTypeInput,
|
|
1648
|
-
IscsiTargetCreateMode: () => IscsiTargetCreateMode,
|
|
1649
|
-
IscsiTargetCreateModeInput: () => IscsiTargetCreateModeInput,
|
|
1650
|
-
KeychainCredentialEntryType: () => KeychainCredentialEntryType,
|
|
1651
|
-
KeychainCredentialEntryTypeInput: () => KeychainCredentialEntryTypeInput,
|
|
1652
|
-
Level: () => Level,
|
|
1653
|
-
NFS4ACEType: () => NFS4ACEType,
|
|
1654
|
-
NFS4ACETypeInput: () => NFS4ACETypeInput,
|
|
1655
|
-
Name: () => Name,
|
|
1656
|
-
Policy: () => Policy,
|
|
1657
|
-
PoolCreateChecksum: () => PoolCreateChecksum,
|
|
1658
|
-
PoolCreateDeduplication: () => PoolCreateDeduplication,
|
|
1659
|
-
PoolCreateTopologyDataVdevDRAIDTypeInput: () => PoolCreateTopologyDataVdevDRAIDTypeInput,
|
|
1660
|
-
PoolDatasetCreateFilesystemAcltypeInput: () => PoolDatasetCreateFilesystemAcltypeInput,
|
|
1661
|
-
PoolDatasetCreateFilesystemChecksum: () => PoolDatasetCreateFilesystemChecksum,
|
|
1662
|
-
PoolDatasetCreateFilesystemDeduplication: () => PoolDatasetCreateFilesystemDeduplication,
|
|
1663
|
-
PoolDatasetCreateFilesystemReadonlyInput: () => PoolDatasetCreateFilesystemReadonlyInput,
|
|
1664
|
-
PoolDatasetDeleteResult: () => PoolDatasetDeleteResult,
|
|
1665
|
-
PoolScanStateInput: () => PoolScanStateInput,
|
|
1666
|
-
PoolSnapshotEntryPropertyFieldsSource: () => PoolSnapshotEntryPropertyFieldsSource,
|
|
1667
|
-
Protocol: () => Protocol,
|
|
1668
|
-
Purpose: () => Purpose2,
|
|
1669
|
-
Readonly: () => Readonly,
|
|
1670
|
-
ReplicationCountEligibleManualSnapshotsTransport: () => ReplicationCountEligibleManualSnapshotsTransport,
|
|
1671
|
-
ReplicationCountEligibleManualSnapshotsTransportInput: () => ReplicationCountEligibleManualSnapshotsTransportInput,
|
|
1672
|
-
ReplicationCreateReadonlyInput: () => ReplicationCreateReadonlyInput,
|
|
1673
|
-
Resolution: () => Resolution,
|
|
1674
|
-
Rpm: () => Rpm,
|
|
1675
|
-
RsyncTaskCreateDirection: () => RsyncTaskCreateDirection,
|
|
1676
|
-
RsyncTaskCreateDirectionInput: () => RsyncTaskCreateDirectionInput,
|
|
1677
|
-
RsyncTaskCreateMode: () => RsyncTaskCreateMode,
|
|
1678
|
-
RsyncTaskCreateModeInput: () => RsyncTaskCreateModeInput,
|
|
1679
|
-
SMBEntryEncryption: () => SMBEntryEncryption,
|
|
1680
|
-
SMBEntryEncryptionInput: () => SMBEntryEncryptionInput,
|
|
1681
|
-
STIGType: () => STIGType,
|
|
1682
|
-
Schema: () => Schema,
|
|
1683
|
-
Security: () => Security,
|
|
1684
|
-
Serialspeed: () => Serialspeed,
|
|
1685
|
-
Service: () => Service,
|
|
1686
|
-
ServiceControlVerb: () => ServiceControlVerb,
|
|
1687
|
-
Shutdown: () => Shutdown,
|
|
1688
|
-
Snapdev: () => Snapdev,
|
|
1689
|
-
Snapdir: () => Snapdir,
|
|
1690
|
-
SourceInput: () => SourceInput,
|
|
1691
|
-
SourceValueType: () => SourceValueType,
|
|
1692
|
-
State: () => State,
|
|
1693
|
-
SupportNewTicketCommunityTypeInput: () => SupportNewTicketCommunityTypeInput,
|
|
1694
|
-
Sync: () => Sync,
|
|
1695
|
-
SyslogServerTransport: () => SyslogServerTransport,
|
|
1696
|
-
SyslogServerTransportInput: () => SyslogServerTransportInput,
|
|
1697
|
-
Sysloglevel: () => Sysloglevel,
|
|
1698
|
-
SystemProductTypeResult: () => SystemProductTypeResult,
|
|
1699
|
-
SystemStateResult: () => SystemStateResult,
|
|
1700
|
-
Tag: () => Tag,
|
|
1701
|
-
Target: () => Target,
|
|
1702
|
-
Time: () => Time,
|
|
1703
|
-
TruecommandConfigChangedEventFieldsStatus: () => TruecommandConfigChangedEventFieldsStatus,
|
|
1704
|
-
TruecommandConfigChangedEventFieldsStatusInput: () => TruecommandConfigChangedEventFieldsStatusInput,
|
|
1705
|
-
TunableCreateType: () => TunableCreateType,
|
|
1706
|
-
TunableCreateTypeInput: () => TunableCreateTypeInput,
|
|
1707
|
-
UPSEntryMode: () => UPSEntryMode,
|
|
1708
|
-
UPSEntryModeInput: () => UPSEntryModeInput,
|
|
1709
|
-
Unixcharset: () => Unixcharset,
|
|
1710
|
-
Username: () => Username,
|
|
1711
|
-
VMDiskDeviceType: () => VMDiskDeviceType,
|
|
1712
|
-
VMDiskDeviceTypeInput: () => VMDiskDeviceTypeInput,
|
|
1713
|
-
VMWareEntryStateStateInput: () => VMWareEntryStateStateInput,
|
|
1714
|
-
VMWareMatchDatastoresWithDatasetsResultFilesystemType: () => VMWareMatchDatastoresWithDatasetsResultFilesystemType,
|
|
1715
|
-
Vendor: () => Vendor,
|
|
1716
|
-
Volblocksize: () => Volblocksize,
|
|
1717
|
-
When: () => When,
|
|
1718
|
-
ZfsTierRewriteJobEntryStatusInput: () => ZfsTierRewriteJobEntryStatusInput
|
|
19
|
+
Object.defineProperty(exports, "AuthResponseType", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunk6PF34AWT_cjs.AuthResponseType; }
|
|
1719
22
|
});
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
__export(v25_10_4_exports, {
|
|
1724
|
-
ACLTemplateEntryAcltypeInput: () => ACLTemplateEntryAcltypeInput,
|
|
1725
|
-
Aclmode: () => Aclmode,
|
|
1726
|
-
Acltype: () => Acltype,
|
|
1727
|
-
Action: () => Action,
|
|
1728
|
-
Advpowermgmt: () => Advpowermgmt,
|
|
1729
|
-
Algorithm: () => Algorithm,
|
|
1730
|
-
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
1731
|
-
Atime: () => Atime,
|
|
1732
|
-
AuthMeSource: () => AuthMeSource,
|
|
1733
|
-
Authenticator: () => Authenticator,
|
|
1734
|
-
Authmethod: () => Authmethod,
|
|
1735
|
-
Autotrim: () => Autotrim,
|
|
1736
|
-
Basic: () => Basic,
|
|
1737
|
-
Blocksize: () => Blocksize,
|
|
1738
|
-
Bootloader: () => Bootloader,
|
|
1739
|
-
Casesensitivity: () => Casesensitivity,
|
|
1740
|
-
CloudBackupSnapshotItemType: () => CloudBackupSnapshotItemType,
|
|
1741
|
-
CloudSyncCreateDirection: () => CloudSyncCreateDirection,
|
|
1742
|
-
CloudSyncCreateDirectionInput: () => CloudSyncCreateDirectionInput,
|
|
1743
|
-
CloudTaskAttributesEncryption: () => CloudTaskAttributesEncryption,
|
|
1744
|
-
CloudTaskAttributesEncryptionInput: () => CloudTaskAttributesEncryptionInput,
|
|
1745
|
-
Code: () => Code,
|
|
1746
|
-
Compression: () => Compression,
|
|
1747
|
-
CorePingRemoteTypeInput: () => CorePingRemoteTypeInput,
|
|
1748
|
-
Credentials: () => Credentials,
|
|
1749
|
-
DeviceGetInfoOtherTypeInput: () => DeviceGetInfoOtherTypeInput,
|
|
1750
|
-
DiskDetailsTypeInput: () => DiskDetailsTypeInput,
|
|
1751
|
-
DiskWipeModeInput: () => DiskWipeModeInput,
|
|
1752
|
-
DockerStatusInfoStatus: () => DockerStatusInfoStatus,
|
|
1753
|
-
DockerStatusInfoStatusInput: () => DockerStatusInfoStatusInput,
|
|
1754
|
-
Enclosure2SetSlotStatusStatusInput: () => Enclosure2SetSlotStatusStatusInput,
|
|
1755
|
-
Endpoint: () => Endpoint,
|
|
1756
|
-
Exec: () => Exec,
|
|
1757
|
-
Feature: () => Feature,
|
|
1758
|
-
FilesystemDirEntryType: () => FilesystemDirEntryType,
|
|
1759
|
-
Function: () => Function,
|
|
1760
|
-
GetDisplayDeviceType: () => GetDisplayDeviceType,
|
|
1761
|
-
Hddstandby: () => Hddstandby,
|
|
1762
|
-
InitShutdownScriptCreateType: () => InitShutdownScriptCreateType,
|
|
1763
|
-
InitShutdownScriptCreateTypeInput: () => InitShutdownScriptCreateTypeInput,
|
|
1764
|
-
InterfaceCreateAliasTypeInput: () => InterfaceCreateAliasTypeInput,
|
|
1765
|
-
InterfaceCreateTypeInput: () => InterfaceCreateTypeInput,
|
|
1766
|
-
Iotype: () => Iotype,
|
|
1767
|
-
IpmiChassisIdentifyRequestVerb: () => IpmiChassisIdentifyRequestVerb,
|
|
1768
|
-
IscsiExtentCreateType: () => IscsiExtentCreateType,
|
|
1769
|
-
IscsiExtentCreateTypeInput: () => IscsiExtentCreateTypeInput,
|
|
1770
|
-
IscsiTargetCreateMode: () => IscsiTargetCreateMode,
|
|
1771
|
-
IscsiTargetCreateModeInput: () => IscsiTargetCreateModeInput,
|
|
1772
|
-
KeychainCredentialEntryType: () => KeychainCredentialEntryType,
|
|
1773
|
-
KeychainCredentialEntryTypeInput: () => KeychainCredentialEntryTypeInput,
|
|
1774
|
-
Level: () => Level,
|
|
1775
|
-
NFS4ACEType: () => NFS4ACEType,
|
|
1776
|
-
NFS4ACETypeInput: () => NFS4ACETypeInput,
|
|
1777
|
-
Name: () => Name,
|
|
1778
|
-
Policy: () => Policy,
|
|
1779
|
-
PoolCreateChecksum: () => PoolCreateChecksum,
|
|
1780
|
-
PoolCreateDeduplication: () => PoolCreateDeduplication,
|
|
1781
|
-
PoolCreateTopologyDataVdevDRAIDTypeInput: () => PoolCreateTopologyDataVdevDRAIDTypeInput,
|
|
1782
|
-
PoolDatasetCreateFilesystemAcltypeInput: () => PoolDatasetCreateFilesystemAcltypeInput,
|
|
1783
|
-
PoolDatasetCreateFilesystemChecksum: () => PoolDatasetCreateFilesystemChecksum,
|
|
1784
|
-
PoolDatasetCreateFilesystemDeduplication: () => PoolDatasetCreateFilesystemDeduplication,
|
|
1785
|
-
PoolDatasetCreateFilesystemReadonlyInput: () => PoolDatasetCreateFilesystemReadonlyInput,
|
|
1786
|
-
PoolDatasetDeleteResult: () => PoolDatasetDeleteResult,
|
|
1787
|
-
PoolScanStateInput: () => PoolScanStateInput,
|
|
1788
|
-
PoolSnapshotEntryPropertyFieldsSource: () => PoolSnapshotEntryPropertyFieldsSource,
|
|
1789
|
-
Protocol: () => Protocol,
|
|
1790
|
-
Purpose: () => Purpose2,
|
|
1791
|
-
Readonly: () => Readonly,
|
|
1792
|
-
ReplicationCountEligibleManualSnapshotsTransport: () => ReplicationCountEligibleManualSnapshotsTransport,
|
|
1793
|
-
ReplicationCountEligibleManualSnapshotsTransportInput: () => ReplicationCountEligibleManualSnapshotsTransportInput,
|
|
1794
|
-
ReplicationCreateReadonlyInput: () => ReplicationCreateReadonlyInput,
|
|
1795
|
-
Resolution: () => Resolution,
|
|
1796
|
-
Rpm: () => Rpm,
|
|
1797
|
-
RsyncTaskCreateDirection: () => RsyncTaskCreateDirection,
|
|
1798
|
-
RsyncTaskCreateDirectionInput: () => RsyncTaskCreateDirectionInput,
|
|
1799
|
-
RsyncTaskCreateMode: () => RsyncTaskCreateMode,
|
|
1800
|
-
RsyncTaskCreateModeInput: () => RsyncTaskCreateModeInput,
|
|
1801
|
-
SMBEntryEncryption: () => SMBEntryEncryption,
|
|
1802
|
-
SMBEntryEncryptionInput: () => SMBEntryEncryptionInput,
|
|
1803
|
-
STIGType: () => STIGType,
|
|
1804
|
-
Schema: () => Schema,
|
|
1805
|
-
Security: () => Security,
|
|
1806
|
-
Serialspeed: () => Serialspeed,
|
|
1807
|
-
Service: () => Service,
|
|
1808
|
-
ServiceControlVerb: () => ServiceControlVerb,
|
|
1809
|
-
Shutdown: () => Shutdown,
|
|
1810
|
-
Snapdev: () => Snapdev,
|
|
1811
|
-
Snapdir: () => Snapdir,
|
|
1812
|
-
SourceInput: () => SourceInput,
|
|
1813
|
-
SourceValueType: () => SourceValueType,
|
|
1814
|
-
State: () => State,
|
|
1815
|
-
SupportNewTicketCommunityTypeInput: () => SupportNewTicketCommunityTypeInput,
|
|
1816
|
-
Sync: () => Sync,
|
|
1817
|
-
SyslogServerTransport: () => SyslogServerTransport,
|
|
1818
|
-
SyslogServerTransportInput: () => SyslogServerTransportInput,
|
|
1819
|
-
Sysloglevel: () => Sysloglevel,
|
|
1820
|
-
SystemProductTypeResult: () => SystemProductTypeResult,
|
|
1821
|
-
SystemStateResult: () => SystemStateResult,
|
|
1822
|
-
Tag: () => Tag,
|
|
1823
|
-
Target: () => Target,
|
|
1824
|
-
Time: () => Time,
|
|
1825
|
-
TruecommandConfigChangedEventFieldsStatus: () => TruecommandConfigChangedEventFieldsStatus,
|
|
1826
|
-
TruecommandConfigChangedEventFieldsStatusInput: () => TruecommandConfigChangedEventFieldsStatusInput,
|
|
1827
|
-
TunableCreateType: () => TunableCreateType,
|
|
1828
|
-
TunableCreateTypeInput: () => TunableCreateTypeInput,
|
|
1829
|
-
UPSEntryMode: () => UPSEntryMode,
|
|
1830
|
-
UPSEntryModeInput: () => UPSEntryModeInput,
|
|
1831
|
-
Unixcharset: () => Unixcharset,
|
|
1832
|
-
Username: () => Username,
|
|
1833
|
-
VMDiskDeviceType: () => VMDiskDeviceType,
|
|
1834
|
-
VMDiskDeviceTypeInput: () => VMDiskDeviceTypeInput,
|
|
1835
|
-
VMWareEntryStateStateInput: () => VMWareEntryStateStateInput,
|
|
1836
|
-
VMWareMatchDatastoresWithDatasetsResultFilesystemType: () => VMWareMatchDatastoresWithDatasetsResultFilesystemType,
|
|
1837
|
-
Vendor: () => Vendor,
|
|
1838
|
-
Volblocksize: () => Volblocksize,
|
|
1839
|
-
When: () => When,
|
|
1840
|
-
ZfsTierRewriteJobEntryStatusInput: () => ZfsTierRewriteJobEntryStatusInput
|
|
23
|
+
Object.defineProperty(exports, "InvalidVersionResponseError", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunk6PF34AWT_cjs.InvalidVersionResponseError; }
|
|
1841
26
|
});
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
__export(v25_10_5_exports, {
|
|
1846
|
-
ACLTemplateEntryAcltypeInput: () => ACLTemplateEntryAcltypeInput,
|
|
1847
|
-
Aclmode: () => Aclmode,
|
|
1848
|
-
Acltype: () => Acltype,
|
|
1849
|
-
Action: () => Action,
|
|
1850
|
-
Advpowermgmt: () => Advpowermgmt,
|
|
1851
|
-
Algorithm: () => Algorithm,
|
|
1852
|
-
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
1853
|
-
Atime: () => Atime,
|
|
1854
|
-
AuthMeSource: () => AuthMeSource,
|
|
1855
|
-
Authenticator: () => Authenticator,
|
|
1856
|
-
Authmethod: () => Authmethod,
|
|
1857
|
-
Autotrim: () => Autotrim,
|
|
1858
|
-
Basic: () => Basic,
|
|
1859
|
-
Blocksize: () => Blocksize,
|
|
1860
|
-
Bootloader: () => Bootloader,
|
|
1861
|
-
Casesensitivity: () => Casesensitivity,
|
|
1862
|
-
CloudBackupSnapshotItemType: () => CloudBackupSnapshotItemType,
|
|
1863
|
-
CloudSyncCreateDirection: () => CloudSyncCreateDirection,
|
|
1864
|
-
CloudSyncCreateDirectionInput: () => CloudSyncCreateDirectionInput,
|
|
1865
|
-
CloudTaskAttributesEncryption: () => CloudTaskAttributesEncryption,
|
|
1866
|
-
CloudTaskAttributesEncryptionInput: () => CloudTaskAttributesEncryptionInput,
|
|
1867
|
-
Code: () => Code,
|
|
1868
|
-
Compression: () => Compression,
|
|
1869
|
-
CorePingRemoteTypeInput: () => CorePingRemoteTypeInput,
|
|
1870
|
-
Credentials: () => Credentials,
|
|
1871
|
-
DeviceGetInfoOtherTypeInput: () => DeviceGetInfoOtherTypeInput,
|
|
1872
|
-
DiskDetailsTypeInput: () => DiskDetailsTypeInput,
|
|
1873
|
-
DiskWipeModeInput: () => DiskWipeModeInput,
|
|
1874
|
-
DockerStatusInfoStatus: () => DockerStatusInfoStatus,
|
|
1875
|
-
DockerStatusInfoStatusInput: () => DockerStatusInfoStatusInput,
|
|
1876
|
-
Enclosure2SetSlotStatusStatusInput: () => Enclosure2SetSlotStatusStatusInput,
|
|
1877
|
-
Endpoint: () => Endpoint,
|
|
1878
|
-
Exec: () => Exec,
|
|
1879
|
-
Feature: () => Feature,
|
|
1880
|
-
FilesystemDirEntryType: () => FilesystemDirEntryType,
|
|
1881
|
-
Function: () => Function,
|
|
1882
|
-
GetDisplayDeviceType: () => GetDisplayDeviceType,
|
|
1883
|
-
Hddstandby: () => Hddstandby,
|
|
1884
|
-
InitShutdownScriptCreateType: () => InitShutdownScriptCreateType,
|
|
1885
|
-
InitShutdownScriptCreateTypeInput: () => InitShutdownScriptCreateTypeInput,
|
|
1886
|
-
InterfaceCreateAliasTypeInput: () => InterfaceCreateAliasTypeInput,
|
|
1887
|
-
InterfaceCreateTypeInput: () => InterfaceCreateTypeInput,
|
|
1888
|
-
Iotype: () => Iotype,
|
|
1889
|
-
IpmiChassisIdentifyRequestVerb: () => IpmiChassisIdentifyRequestVerb,
|
|
1890
|
-
IscsiExtentCreateType: () => IscsiExtentCreateType,
|
|
1891
|
-
IscsiExtentCreateTypeInput: () => IscsiExtentCreateTypeInput,
|
|
1892
|
-
IscsiTargetCreateMode: () => IscsiTargetCreateMode,
|
|
1893
|
-
IscsiTargetCreateModeInput: () => IscsiTargetCreateModeInput,
|
|
1894
|
-
KeychainCredentialEntryType: () => KeychainCredentialEntryType,
|
|
1895
|
-
KeychainCredentialEntryTypeInput: () => KeychainCredentialEntryTypeInput,
|
|
1896
|
-
Level: () => Level,
|
|
1897
|
-
NFS4ACEType: () => NFS4ACEType,
|
|
1898
|
-
NFS4ACETypeInput: () => NFS4ACETypeInput,
|
|
1899
|
-
Name: () => Name,
|
|
1900
|
-
Policy: () => Policy,
|
|
1901
|
-
PoolCreateChecksum: () => PoolCreateChecksum,
|
|
1902
|
-
PoolCreateDeduplication: () => PoolCreateDeduplication,
|
|
1903
|
-
PoolCreateTopologyDataVdevDRAIDTypeInput: () => PoolCreateTopologyDataVdevDRAIDTypeInput,
|
|
1904
|
-
PoolDatasetCreateFilesystemAcltypeInput: () => PoolDatasetCreateFilesystemAcltypeInput,
|
|
1905
|
-
PoolDatasetCreateFilesystemChecksum: () => PoolDatasetCreateFilesystemChecksum,
|
|
1906
|
-
PoolDatasetCreateFilesystemDeduplication: () => PoolDatasetCreateFilesystemDeduplication,
|
|
1907
|
-
PoolDatasetCreateFilesystemReadonlyInput: () => PoolDatasetCreateFilesystemReadonlyInput,
|
|
1908
|
-
PoolDatasetDeleteResult: () => PoolDatasetDeleteResult,
|
|
1909
|
-
PoolScanStateInput: () => PoolScanStateInput,
|
|
1910
|
-
PoolSnapshotEntryPropertyFieldsSource: () => PoolSnapshotEntryPropertyFieldsSource,
|
|
1911
|
-
Protocol: () => Protocol,
|
|
1912
|
-
Purpose: () => Purpose2,
|
|
1913
|
-
Readonly: () => Readonly,
|
|
1914
|
-
ReplicationCountEligibleManualSnapshotsTransport: () => ReplicationCountEligibleManualSnapshotsTransport,
|
|
1915
|
-
ReplicationCountEligibleManualSnapshotsTransportInput: () => ReplicationCountEligibleManualSnapshotsTransportInput,
|
|
1916
|
-
ReplicationCreateReadonlyInput: () => ReplicationCreateReadonlyInput,
|
|
1917
|
-
Resolution: () => Resolution,
|
|
1918
|
-
Rpm: () => Rpm,
|
|
1919
|
-
RsyncTaskCreateDirection: () => RsyncTaskCreateDirection,
|
|
1920
|
-
RsyncTaskCreateDirectionInput: () => RsyncTaskCreateDirectionInput,
|
|
1921
|
-
RsyncTaskCreateMode: () => RsyncTaskCreateMode,
|
|
1922
|
-
RsyncTaskCreateModeInput: () => RsyncTaskCreateModeInput,
|
|
1923
|
-
SMBEntryEncryption: () => SMBEntryEncryption,
|
|
1924
|
-
SMBEntryEncryptionInput: () => SMBEntryEncryptionInput,
|
|
1925
|
-
STIGType: () => STIGType,
|
|
1926
|
-
Schema: () => Schema,
|
|
1927
|
-
Security: () => Security,
|
|
1928
|
-
Serialspeed: () => Serialspeed,
|
|
1929
|
-
Service: () => Service,
|
|
1930
|
-
ServiceControlVerb: () => ServiceControlVerb,
|
|
1931
|
-
Shutdown: () => Shutdown,
|
|
1932
|
-
Snapdev: () => Snapdev,
|
|
1933
|
-
Snapdir: () => Snapdir,
|
|
1934
|
-
SourceInput: () => SourceInput,
|
|
1935
|
-
SourceValueType: () => SourceValueType,
|
|
1936
|
-
State: () => State,
|
|
1937
|
-
SupportNewTicketCommunityTypeInput: () => SupportNewTicketCommunityTypeInput,
|
|
1938
|
-
Sync: () => Sync,
|
|
1939
|
-
SyslogServerTransport: () => SyslogServerTransport,
|
|
1940
|
-
SyslogServerTransportInput: () => SyslogServerTransportInput,
|
|
1941
|
-
Sysloglevel: () => Sysloglevel,
|
|
1942
|
-
SystemProductTypeResult: () => SystemProductTypeResult,
|
|
1943
|
-
SystemStateResult: () => SystemStateResult,
|
|
1944
|
-
Tag: () => Tag,
|
|
1945
|
-
Target: () => Target,
|
|
1946
|
-
Time: () => Time,
|
|
1947
|
-
TruecommandConfigChangedEventFieldsStatus: () => TruecommandConfigChangedEventFieldsStatus,
|
|
1948
|
-
TruecommandConfigChangedEventFieldsStatusInput: () => TruecommandConfigChangedEventFieldsStatusInput,
|
|
1949
|
-
TunableCreateType: () => TunableCreateType,
|
|
1950
|
-
TunableCreateTypeInput: () => TunableCreateTypeInput,
|
|
1951
|
-
UPSEntryMode: () => UPSEntryMode,
|
|
1952
|
-
UPSEntryModeInput: () => UPSEntryModeInput,
|
|
1953
|
-
Unixcharset: () => Unixcharset,
|
|
1954
|
-
Username: () => Username,
|
|
1955
|
-
VMDiskDeviceType: () => VMDiskDeviceType,
|
|
1956
|
-
VMDiskDeviceTypeInput: () => VMDiskDeviceTypeInput,
|
|
1957
|
-
VMWareEntryStateStateInput: () => VMWareEntryStateStateInput,
|
|
1958
|
-
VMWareMatchDatastoresWithDatasetsResultFilesystemType: () => VMWareMatchDatastoresWithDatasetsResultFilesystemType,
|
|
1959
|
-
Vendor: () => Vendor,
|
|
1960
|
-
Volblocksize: () => Volblocksize,
|
|
1961
|
-
When: () => When,
|
|
1962
|
-
ZfsTierRewriteJobEntryStatusInput: () => ZfsTierRewriteJobEntryStatusInput
|
|
27
|
+
Object.defineProperty(exports, "JobState", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunk6PF34AWT_cjs.JobState; }
|
|
1963
30
|
});
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
__export(v26_0_0_exports, {
|
|
1968
|
-
ACLTemplateEntryAcltypeInput: () => ACLTemplateEntryAcltypeInput,
|
|
1969
|
-
Access: () => Access,
|
|
1970
|
-
Aclmode: () => Aclmode,
|
|
1971
|
-
Acltype: () => Acltype,
|
|
1972
|
-
Advpowermgmt: () => Advpowermgmt,
|
|
1973
|
-
AppContainerDetailsState: () => AppContainerDetailsState,
|
|
1974
|
-
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
1975
|
-
Atime: () => Atime,
|
|
1976
|
-
AuthMeSource: () => AuthMeSource,
|
|
1977
|
-
Authenticator: () => Authenticator,
|
|
1978
|
-
Authmethod: () => Authmethod,
|
|
1979
|
-
Autotrim: () => Autotrim,
|
|
1980
|
-
Basic: () => Basic,
|
|
1981
|
-
Blocksize: () => Blocksize,
|
|
1982
|
-
Bootloader: () => Bootloader,
|
|
1983
|
-
Casesensitivity: () => Casesensitivity,
|
|
1984
|
-
CloudBackupSnapshotItemType: () => CloudBackupSnapshotItemType,
|
|
1985
|
-
CloudSyncCreateDirection: () => CloudSyncCreateDirection,
|
|
1986
|
-
CloudSyncCreateDirectionInput: () => CloudSyncCreateDirectionInput,
|
|
1987
|
-
CloudTaskAttributesEncryption: () => CloudTaskAttributesEncryption,
|
|
1988
|
-
CloudTaskAttributesEncryptionInput: () => CloudTaskAttributesEncryptionInput,
|
|
1989
|
-
Code: () => Code,
|
|
1990
|
-
Compression: () => Compression,
|
|
1991
|
-
ContainerNICDeviceType: () => ContainerNICDeviceType,
|
|
1992
|
-
ContainerNICDeviceTypeInput: () => ContainerNICDeviceTypeInput,
|
|
1993
|
-
ContainerStatusState: () => ContainerStatusState,
|
|
1994
|
-
ContainerStatusStateInput: () => ContainerStatusStateInput,
|
|
1995
|
-
CorePingRemoteTypeInput: () => CorePingRemoteTypeInput,
|
|
1996
|
-
Credentials: () => Credentials,
|
|
1997
|
-
DeviceGetInfoOtherTypeInput: () => DeviceGetInfoOtherTypeInput,
|
|
1998
|
-
DiskDetailsTypeInput: () => DiskDetailsTypeInput,
|
|
1999
|
-
DiskWipeModeInput: () => DiskWipeModeInput,
|
|
2000
|
-
DockerStatusInfoStatus: () => DockerStatusInfoStatus,
|
|
2001
|
-
DockerStatusInfoStatusInput: () => DockerStatusInfoStatusInput,
|
|
2002
|
-
Enclosure2SetSlotStatusStatusInput: () => Enclosure2SetSlotStatusStatusInput,
|
|
2003
|
-
Endpoint: () => Endpoint,
|
|
2004
|
-
Exec: () => Exec,
|
|
2005
|
-
FilesystemDirEntryType: () => FilesystemDirEntryType,
|
|
2006
|
-
Function: () => Function,
|
|
2007
|
-
GetDisplayDeviceType: () => GetDisplayDeviceType,
|
|
2008
|
-
Hddstandby: () => Hddstandby,
|
|
2009
|
-
InitShutdownScriptCreateType: () => InitShutdownScriptCreateType,
|
|
2010
|
-
InitShutdownScriptCreateTypeInput: () => InitShutdownScriptCreateTypeInput,
|
|
2011
|
-
InterfaceCreateAliasTypeInput: () => InterfaceCreateAliasTypeInput,
|
|
2012
|
-
InterfaceCreateTypeInput: () => InterfaceCreateTypeInput,
|
|
2013
|
-
Interval: () => Interval,
|
|
2014
|
-
Iotype: () => Iotype,
|
|
2015
|
-
IpmiChassisIdentifyRequestVerb: () => IpmiChassisIdentifyRequestVerb,
|
|
2016
|
-
IscsiExtentCreateType: () => IscsiExtentCreateType,
|
|
2017
|
-
IscsiExtentCreateTypeInput: () => IscsiExtentCreateTypeInput,
|
|
2018
|
-
IscsiTargetCreateMode: () => IscsiTargetCreateMode,
|
|
2019
|
-
IscsiTargetCreateModeInput: () => IscsiTargetCreateModeInput,
|
|
2020
|
-
KeychainCredentialEntryType: () => KeychainCredentialEntryType,
|
|
2021
|
-
KeychainCredentialEntryTypeInput: () => KeychainCredentialEntryTypeInput,
|
|
2022
|
-
Level: () => Level,
|
|
2023
|
-
NFS4ACEType: () => NFS4ACEType,
|
|
2024
|
-
NFS4ACETypeInput: () => NFS4ACETypeInput,
|
|
2025
|
-
Name: () => Name2,
|
|
2026
|
-
Passkey: () => Passkey,
|
|
2027
|
-
Policy: () => Policy,
|
|
2028
|
-
PoolCreateChecksum: () => PoolCreateChecksum,
|
|
2029
|
-
PoolCreateDeduplication: () => PoolCreateDeduplication,
|
|
2030
|
-
PoolCreateTopologyDedupVdevTypeInput: () => PoolCreateTopologyDedupVdevTypeInput,
|
|
2031
|
-
PoolDatasetCreateFilesystemAcltypeInput: () => PoolDatasetCreateFilesystemAcltypeInput,
|
|
2032
|
-
PoolDatasetCreateFilesystemChecksum: () => PoolDatasetCreateFilesystemChecksum,
|
|
2033
|
-
PoolDatasetCreateFilesystemDeduplication: () => PoolDatasetCreateFilesystemDeduplication,
|
|
2034
|
-
PoolDatasetCreateFilesystemReadonlyInput: () => PoolDatasetCreateFilesystemReadonlyInput,
|
|
2035
|
-
PoolDatasetDeleteResult: () => PoolDatasetDeleteResult,
|
|
2036
|
-
PoolScanState: () => PoolScanState,
|
|
2037
|
-
PoolScanStateInput: () => PoolScanStateInput,
|
|
2038
|
-
PoolScrubAction: () => PoolScrubAction,
|
|
2039
|
-
PoolSnapshotEntryPropertyFieldsSource: () => PoolSnapshotEntryPropertyFieldsSource,
|
|
2040
|
-
Protocol: () => Protocol,
|
|
2041
|
-
Purpose: () => Purpose2,
|
|
2042
|
-
Readonly: () => Readonly,
|
|
2043
|
-
Reason: () => Reason,
|
|
2044
|
-
ReplicationCountEligibleManualSnapshotsTransport: () => ReplicationCountEligibleManualSnapshotsTransport,
|
|
2045
|
-
ReplicationCountEligibleManualSnapshotsTransportInput: () => ReplicationCountEligibleManualSnapshotsTransportInput,
|
|
2046
|
-
ReplicationCreateReadonlyInput: () => ReplicationCreateReadonlyInput,
|
|
2047
|
-
Resolution: () => Resolution,
|
|
2048
|
-
Rpm: () => Rpm,
|
|
2049
|
-
RsyncTaskCreateDirection: () => RsyncTaskCreateDirection,
|
|
2050
|
-
RsyncTaskCreateDirectionInput: () => RsyncTaskCreateDirectionInput,
|
|
2051
|
-
RsyncTaskCreateMode: () => RsyncTaskCreateMode,
|
|
2052
|
-
RsyncTaskCreateModeInput: () => RsyncTaskCreateModeInput,
|
|
2053
|
-
S3AccesskeyEntryStatus: () => S3AccesskeyEntryStatus,
|
|
2054
|
-
S3AccesskeyEntryStatusInput: () => S3AccesskeyEntryStatusInput,
|
|
2055
|
-
SMBEntryEncryption: () => SMBEntryEncryption,
|
|
2056
|
-
SMBEntryEncryptionInput: () => SMBEntryEncryptionInput,
|
|
2057
|
-
STIGType: () => STIGType,
|
|
2058
|
-
Schema: () => Schema,
|
|
2059
|
-
Security: () => Security,
|
|
2060
|
-
Serialspeed: () => Serialspeed,
|
|
2061
|
-
Service: () => Service,
|
|
2062
|
-
ServiceControlVerb: () => ServiceControlVerb,
|
|
2063
|
-
Shutdown: () => Shutdown,
|
|
2064
|
-
Snapdev: () => Snapdev,
|
|
2065
|
-
Snapdir: () => Snapdir,
|
|
2066
|
-
SourceInput: () => SourceInput,
|
|
2067
|
-
SourceValueType: () => SourceValueType,
|
|
2068
|
-
SupportNewTicketCommunityTypeInput: () => SupportNewTicketCommunityTypeInput,
|
|
2069
|
-
Sync: () => Sync,
|
|
2070
|
-
SyslogServerTransport: () => SyslogServerTransport,
|
|
2071
|
-
SyslogServerTransportInput: () => SyslogServerTransportInput,
|
|
2072
|
-
Sysloglevel: () => Sysloglevel,
|
|
2073
|
-
SystemProductTypeResult: () => SystemProductTypeResult,
|
|
2074
|
-
SystemStateResult: () => SystemStateResult,
|
|
2075
|
-
Tag: () => Tag,
|
|
2076
|
-
Target: () => Target,
|
|
2077
|
-
Time: () => Time,
|
|
2078
|
-
TruecommandConfigChangedEventFieldsStatus: () => TruecommandConfigChangedEventFieldsStatus,
|
|
2079
|
-
TruecommandConfigChangedEventFieldsStatusInput: () => TruecommandConfigChangedEventFieldsStatusInput,
|
|
2080
|
-
TunableCreateType: () => TunableCreateType,
|
|
2081
|
-
TunableCreateTypeInput: () => TunableCreateTypeInput,
|
|
2082
|
-
UPSEntryMode: () => UPSEntryMode,
|
|
2083
|
-
UPSEntryModeInput: () => UPSEntryModeInput,
|
|
2084
|
-
Unixcharset: () => Unixcharset,
|
|
2085
|
-
Username: () => Username,
|
|
2086
|
-
VMDiskDeviceType: () => VMDiskDeviceType,
|
|
2087
|
-
VMDiskDeviceTypeInput: () => VMDiskDeviceTypeInput,
|
|
2088
|
-
VMWareEntryStateState: () => VMWareEntryStateState,
|
|
2089
|
-
VMWareEntryStateStateInput: () => VMWareEntryStateStateInput,
|
|
2090
|
-
VMWareMatchDatastoresWithDatasetsResultFilesystemType: () => VMWareMatchDatastoresWithDatasetsResultFilesystemType,
|
|
2091
|
-
Vendor: () => Vendor,
|
|
2092
|
-
Versioning: () => Versioning,
|
|
2093
|
-
Volblocksize: () => Volblocksize,
|
|
2094
|
-
When: () => When,
|
|
2095
|
-
ZfsTierRewriteJobEntryStatus: () => ZfsTierRewriteJobEntryStatus,
|
|
2096
|
-
ZfsTierRewriteJobEntryStatusInput: () => ZfsTierRewriteJobEntryStatusInput,
|
|
2097
|
-
ZpoolScrubRunAction: () => ZpoolScrubRunAction
|
|
31
|
+
Object.defineProperty(exports, "NoCompatibleVersionsError", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunk6PF34AWT_cjs.NoCompatibleVersionsError; }
|
|
2098
34
|
});
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
Readonly: "READONLY",
|
|
2103
|
-
Writeonly: "WRITEONLY",
|
|
2104
|
-
Readwrite: "READWRITE",
|
|
2105
|
-
Deny: "DENY"
|
|
2106
|
-
};
|
|
2107
|
-
var AppContainerDetailsState = {
|
|
2108
|
-
Crashed: "crashed",
|
|
2109
|
-
Created: "created",
|
|
2110
|
-
Exited: "exited",
|
|
2111
|
-
Running: "running",
|
|
2112
|
-
Starting: "starting"
|
|
2113
|
-
};
|
|
2114
|
-
var ContainerNICDeviceType = {
|
|
2115
|
-
E1000: "E1000",
|
|
2116
|
-
Virtio: "VIRTIO"
|
|
2117
|
-
};
|
|
2118
|
-
var ContainerNICDeviceTypeInput = {
|
|
2119
|
-
E1000: "E1000",
|
|
2120
|
-
Virtio: "VIRTIO"
|
|
2121
|
-
};
|
|
2122
|
-
var ContainerStatusState = {
|
|
2123
|
-
Running: "RUNNING",
|
|
2124
|
-
Stopped: "STOPPED",
|
|
2125
|
-
Suspended: "SUSPENDED"
|
|
2126
|
-
};
|
|
2127
|
-
var ContainerStatusStateInput = {
|
|
2128
|
-
Running: "RUNNING",
|
|
2129
|
-
Stopped: "STOPPED",
|
|
2130
|
-
Suspended: "SUSPENDED"
|
|
2131
|
-
};
|
|
2132
|
-
var Interval = {
|
|
2133
|
-
"30": 30,
|
|
2134
|
-
"60": 60
|
|
2135
|
-
};
|
|
2136
|
-
var Name2 = {
|
|
2137
|
-
Cpu: "cpu",
|
|
2138
|
-
Cputemp: "cputemp",
|
|
2139
|
-
Disk: "disk",
|
|
2140
|
-
Interface: "interface",
|
|
2141
|
-
Load: "load",
|
|
2142
|
-
Processes: "processes",
|
|
2143
|
-
Memory: "memory",
|
|
2144
|
-
Uptime: "uptime",
|
|
2145
|
-
Arcsize: "arcsize",
|
|
2146
|
-
Disktemp: "disktemp",
|
|
2147
|
-
Upscharge: "upscharge",
|
|
2148
|
-
Upsruntime: "upsruntime",
|
|
2149
|
-
Upsvoltage: "upsvoltage",
|
|
2150
|
-
Upscurrent: "upscurrent",
|
|
2151
|
-
Upsfrequency: "upsfrequency",
|
|
2152
|
-
Upsload: "upsload",
|
|
2153
|
-
Upstemperature: "upstemperature"
|
|
2154
|
-
};
|
|
2155
|
-
var Passkey = {
|
|
2156
|
-
Enabled: "ENABLED",
|
|
2157
|
-
Disabled: "DISABLED",
|
|
2158
|
-
Required: "REQUIRED"
|
|
2159
|
-
};
|
|
2160
|
-
var PoolCreateTopologyDedupVdevTypeInput = {
|
|
2161
|
-
Mirror: "MIRROR",
|
|
2162
|
-
Stripe: "STRIPE"
|
|
2163
|
-
};
|
|
2164
|
-
var PoolScanState = {
|
|
2165
|
-
Scanning: "SCANNING",
|
|
2166
|
-
Finished: "FINISHED",
|
|
2167
|
-
Canceled: "CANCELED"
|
|
2168
|
-
};
|
|
2169
|
-
var PoolScrubAction = {
|
|
2170
|
-
Start: "START",
|
|
2171
|
-
Stop: "STOP",
|
|
2172
|
-
Pause: "PAUSE"
|
|
2173
|
-
};
|
|
2174
|
-
var Reason = {
|
|
2175
|
-
Entitled: "ENTITLED",
|
|
2176
|
-
NoLicense: "NO_LICENSE",
|
|
2177
|
-
KeyMissing: "KEY_MISSING",
|
|
2178
|
-
WrongHardware: "WRONG_HARDWARE",
|
|
2179
|
-
TierInsufficient: "TIER_INSUFFICIENT",
|
|
2180
|
-
WrongLicenseType: "WRONG_LICENSE_TYPE",
|
|
2181
|
-
NotGated: "NOT_GATED"
|
|
2182
|
-
};
|
|
2183
|
-
var S3AccesskeyEntryStatus = {
|
|
2184
|
-
Enabled: "ENABLED",
|
|
2185
|
-
Disabled: "DISABLED",
|
|
2186
|
-
Expired: "EXPIRED",
|
|
2187
|
-
UserMissing: "USER_MISSING",
|
|
2188
|
-
SecretLost: "SECRET_LOST"
|
|
2189
|
-
};
|
|
2190
|
-
var S3AccesskeyEntryStatusInput = {
|
|
2191
|
-
Enabled: "ENABLED",
|
|
2192
|
-
Disabled: "DISABLED",
|
|
2193
|
-
Expired: "EXPIRED",
|
|
2194
|
-
UserMissing: "USER_MISSING",
|
|
2195
|
-
SecretLost: "SECRET_LOST"
|
|
2196
|
-
};
|
|
2197
|
-
var Versioning = {
|
|
2198
|
-
Off: "OFF",
|
|
2199
|
-
Enabled: "ENABLED",
|
|
2200
|
-
Suspended: "SUSPENDED"
|
|
2201
|
-
};
|
|
2202
|
-
var VMWareEntryStateState = {
|
|
2203
|
-
Pending: "PENDING",
|
|
2204
|
-
Success: "SUCCESS",
|
|
2205
|
-
Error: "ERROR",
|
|
2206
|
-
Blocked: "BLOCKED"
|
|
2207
|
-
};
|
|
2208
|
-
var ZfsTierRewriteJobEntryStatus = {
|
|
2209
|
-
Complete: "COMPLETE",
|
|
2210
|
-
Running: "RUNNING",
|
|
2211
|
-
Queued: "QUEUED",
|
|
2212
|
-
Cancelled: "CANCELLED",
|
|
2213
|
-
Stopped: "STOPPED",
|
|
2214
|
-
Error: "ERROR"
|
|
2215
|
-
};
|
|
2216
|
-
var ZpoolScrubRunAction = {
|
|
2217
|
-
Start: "START",
|
|
2218
|
-
Pause: "PAUSE",
|
|
2219
|
-
Cancel: "CANCEL"
|
|
2220
|
-
};
|
|
2221
|
-
|
|
2222
|
-
// src/generated/v27_0_0/index.ts
|
|
2223
|
-
var v27_0_0_exports = {};
|
|
2224
|
-
__export(v27_0_0_exports, {
|
|
2225
|
-
ACLTemplateEntryAcltypeInput: () => ACLTemplateEntryAcltypeInput,
|
|
2226
|
-
Access: () => Access,
|
|
2227
|
-
Aclmode: () => Aclmode,
|
|
2228
|
-
Acltype: () => Acltype,
|
|
2229
|
-
Advpowermgmt: () => Advpowermgmt,
|
|
2230
|
-
AppContainerDetailsState: () => AppContainerDetailsState,
|
|
2231
|
-
AppContainerDetailsStateInput: () => AppContainerDetailsStateInput,
|
|
2232
|
-
Atime: () => Atime,
|
|
2233
|
-
AuthMeSource: () => AuthMeSource,
|
|
2234
|
-
Authenticator: () => Authenticator,
|
|
2235
|
-
Authmethod: () => Authmethod,
|
|
2236
|
-
Autotrim: () => Autotrim,
|
|
2237
|
-
Basic: () => Basic,
|
|
2238
|
-
Blocksize: () => Blocksize,
|
|
2239
|
-
Bootloader: () => Bootloader,
|
|
2240
|
-
Casesensitivity: () => Casesensitivity,
|
|
2241
|
-
CloudBackupSnapshotItemType: () => CloudBackupSnapshotItemType,
|
|
2242
|
-
CloudSyncCreateDirection: () => CloudSyncCreateDirection,
|
|
2243
|
-
CloudSyncCreateDirectionInput: () => CloudSyncCreateDirectionInput,
|
|
2244
|
-
CloudTaskAttributesEncryption: () => CloudTaskAttributesEncryption,
|
|
2245
|
-
CloudTaskAttributesEncryptionInput: () => CloudTaskAttributesEncryptionInput,
|
|
2246
|
-
Code: () => Code,
|
|
2247
|
-
Compression: () => Compression,
|
|
2248
|
-
ContainerNICDeviceType: () => ContainerNICDeviceType,
|
|
2249
|
-
ContainerNICDeviceTypeInput: () => ContainerNICDeviceTypeInput,
|
|
2250
|
-
ContainerStatusState: () => ContainerStatusState,
|
|
2251
|
-
ContainerStatusStateInput: () => ContainerStatusStateInput,
|
|
2252
|
-
CorePingRemoteTypeInput: () => CorePingRemoteTypeInput,
|
|
2253
|
-
Credentials: () => Credentials,
|
|
2254
|
-
DeviceGetInfoOtherTypeInput: () => DeviceGetInfoOtherTypeInput,
|
|
2255
|
-
DiskDetailsTypeInput: () => DiskDetailsTypeInput,
|
|
2256
|
-
DiskWipeModeInput: () => DiskWipeModeInput,
|
|
2257
|
-
DockerStatusInfoStatus: () => DockerStatusInfoStatus,
|
|
2258
|
-
DockerStatusInfoStatusInput: () => DockerStatusInfoStatusInput,
|
|
2259
|
-
Enclosure2SetSlotStatusStatusInput: () => Enclosure2SetSlotStatusStatusInput,
|
|
2260
|
-
Endpoint: () => Endpoint,
|
|
2261
|
-
Exec: () => Exec,
|
|
2262
|
-
FilesystemDirEntryType: () => FilesystemDirEntryType,
|
|
2263
|
-
Function: () => Function,
|
|
2264
|
-
GetDisplayDeviceType: () => GetDisplayDeviceType,
|
|
2265
|
-
Hddstandby: () => Hddstandby,
|
|
2266
|
-
InitShutdownScriptCreateType: () => InitShutdownScriptCreateType,
|
|
2267
|
-
InitShutdownScriptCreateTypeInput: () => InitShutdownScriptCreateTypeInput,
|
|
2268
|
-
InterfaceCreateAliasTypeInput: () => InterfaceCreateAliasTypeInput,
|
|
2269
|
-
InterfaceCreateTypeInput: () => InterfaceCreateTypeInput,
|
|
2270
|
-
Interval: () => Interval,
|
|
2271
|
-
Iotype: () => Iotype,
|
|
2272
|
-
IpmiChassisIdentifyRequestVerb: () => IpmiChassisIdentifyRequestVerb,
|
|
2273
|
-
IscsiExtentCreateType: () => IscsiExtentCreateType,
|
|
2274
|
-
IscsiExtentCreateTypeInput: () => IscsiExtentCreateTypeInput,
|
|
2275
|
-
IscsiTargetCreateMode: () => IscsiTargetCreateMode,
|
|
2276
|
-
IscsiTargetCreateModeInput: () => IscsiTargetCreateModeInput,
|
|
2277
|
-
KeychainCredentialEntryType: () => KeychainCredentialEntryType,
|
|
2278
|
-
KeychainCredentialEntryTypeInput: () => KeychainCredentialEntryTypeInput,
|
|
2279
|
-
Level: () => Level,
|
|
2280
|
-
NFS4ACEType: () => NFS4ACEType,
|
|
2281
|
-
NFS4ACETypeInput: () => NFS4ACETypeInput,
|
|
2282
|
-
Name: () => Name2,
|
|
2283
|
-
Passkey: () => Passkey,
|
|
2284
|
-
Policy: () => Policy,
|
|
2285
|
-
PoolCreateChecksum: () => PoolCreateChecksum,
|
|
2286
|
-
PoolCreateDeduplication: () => PoolCreateDeduplication,
|
|
2287
|
-
PoolCreateTopologyDedupVdevTypeInput: () => PoolCreateTopologyDedupVdevTypeInput,
|
|
2288
|
-
PoolDatasetCreateFilesystemAcltypeInput: () => PoolDatasetCreateFilesystemAcltypeInput,
|
|
2289
|
-
PoolDatasetCreateFilesystemChecksum: () => PoolDatasetCreateFilesystemChecksum,
|
|
2290
|
-
PoolDatasetCreateFilesystemDeduplication: () => PoolDatasetCreateFilesystemDeduplication,
|
|
2291
|
-
PoolDatasetCreateFilesystemReadonlyInput: () => PoolDatasetCreateFilesystemReadonlyInput,
|
|
2292
|
-
PoolDatasetDeleteResult: () => PoolDatasetDeleteResult,
|
|
2293
|
-
PoolScanState: () => PoolScanState,
|
|
2294
|
-
PoolScanStateInput: () => PoolScanStateInput,
|
|
2295
|
-
PoolScrubAction: () => PoolScrubAction,
|
|
2296
|
-
PoolSnapshotEntryPropertyFieldsSource: () => PoolSnapshotEntryPropertyFieldsSource,
|
|
2297
|
-
Protocol: () => Protocol,
|
|
2298
|
-
Purpose: () => Purpose2,
|
|
2299
|
-
Readonly: () => Readonly,
|
|
2300
|
-
Reason: () => Reason,
|
|
2301
|
-
ReplicationCountEligibleManualSnapshotsTransport: () => ReplicationCountEligibleManualSnapshotsTransport,
|
|
2302
|
-
ReplicationCountEligibleManualSnapshotsTransportInput: () => ReplicationCountEligibleManualSnapshotsTransportInput,
|
|
2303
|
-
ReplicationCreateReadonlyInput: () => ReplicationCreateReadonlyInput,
|
|
2304
|
-
Resolution: () => Resolution,
|
|
2305
|
-
Rpm: () => Rpm,
|
|
2306
|
-
RsyncTaskCreateDirection: () => RsyncTaskCreateDirection,
|
|
2307
|
-
RsyncTaskCreateDirectionInput: () => RsyncTaskCreateDirectionInput,
|
|
2308
|
-
RsyncTaskCreateMode: () => RsyncTaskCreateMode,
|
|
2309
|
-
RsyncTaskCreateModeInput: () => RsyncTaskCreateModeInput,
|
|
2310
|
-
S3AccesskeyEntryStatus: () => S3AccesskeyEntryStatus,
|
|
2311
|
-
S3AccesskeyEntryStatusInput: () => S3AccesskeyEntryStatusInput,
|
|
2312
|
-
SMBEntryEncryption: () => SMBEntryEncryption,
|
|
2313
|
-
SMBEntryEncryptionInput: () => SMBEntryEncryptionInput,
|
|
2314
|
-
STIGType: () => STIGType,
|
|
2315
|
-
Schema: () => Schema,
|
|
2316
|
-
Security: () => Security,
|
|
2317
|
-
Serialspeed: () => Serialspeed,
|
|
2318
|
-
Service: () => Service2,
|
|
2319
|
-
ServiceControlVerb: () => ServiceControlVerb,
|
|
2320
|
-
Shutdown: () => Shutdown,
|
|
2321
|
-
Snapdev: () => Snapdev,
|
|
2322
|
-
Snapdir: () => Snapdir,
|
|
2323
|
-
SourceInput: () => SourceInput,
|
|
2324
|
-
SourceValueType: () => SourceValueType,
|
|
2325
|
-
SupportNewTicketCommunityTypeInput: () => SupportNewTicketCommunityTypeInput,
|
|
2326
|
-
Sync: () => Sync,
|
|
2327
|
-
SyslogServerTransport: () => SyslogServerTransport,
|
|
2328
|
-
SyslogServerTransportInput: () => SyslogServerTransportInput,
|
|
2329
|
-
Sysloglevel: () => Sysloglevel,
|
|
2330
|
-
SystemProductTypeResult: () => SystemProductTypeResult,
|
|
2331
|
-
SystemStateResult: () => SystemStateResult,
|
|
2332
|
-
Tag: () => Tag,
|
|
2333
|
-
Target: () => Target,
|
|
2334
|
-
Time: () => Time,
|
|
2335
|
-
TruecommandConfigChangedEventFieldsStatus: () => TruecommandConfigChangedEventFieldsStatus,
|
|
2336
|
-
TruecommandConfigChangedEventFieldsStatusInput: () => TruecommandConfigChangedEventFieldsStatusInput,
|
|
2337
|
-
TunableCreateType: () => TunableCreateType,
|
|
2338
|
-
TunableCreateTypeInput: () => TunableCreateTypeInput,
|
|
2339
|
-
UPSEntryMode: () => UPSEntryMode,
|
|
2340
|
-
UPSEntryModeInput: () => UPSEntryModeInput,
|
|
2341
|
-
Unixcharset: () => Unixcharset,
|
|
2342
|
-
Username: () => Username,
|
|
2343
|
-
VMDiskDeviceType: () => VMDiskDeviceType,
|
|
2344
|
-
VMDiskDeviceTypeInput: () => VMDiskDeviceTypeInput,
|
|
2345
|
-
VMWareEntryStateState: () => VMWareEntryStateState,
|
|
2346
|
-
VMWareEntryStateStateInput: () => VMWareEntryStateStateInput,
|
|
2347
|
-
VMWareMatchDatastoresWithDatasetsResultFilesystemType: () => VMWareMatchDatastoresWithDatasetsResultFilesystemType,
|
|
2348
|
-
VMWareMatchDatastoresWithDatasetsResultFilesystemTypeInput: () => VMWareMatchDatastoresWithDatasetsResultFilesystemTypeInput,
|
|
2349
|
-
Vendor: () => Vendor,
|
|
2350
|
-
Versioning: () => Versioning,
|
|
2351
|
-
Volblocksize: () => Volblocksize,
|
|
2352
|
-
When: () => When,
|
|
2353
|
-
ZfsTierRewriteJobEntryStatus: () => ZfsTierRewriteJobEntryStatus,
|
|
2354
|
-
ZfsTierRewriteJobEntryStatusInput: () => ZfsTierRewriteJobEntryStatusInput,
|
|
2355
|
-
ZpoolScrubRunAction: () => ZpoolScrubRunAction
|
|
35
|
+
Object.defineProperty(exports, "SUPPORTED_API_VERSIONS", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunk6PF34AWT_cjs.SUPPORTED_API_VERSIONS; }
|
|
2356
38
|
});
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
Middleware: "MIDDLEWARE",
|
|
2361
|
-
S3: "S3",
|
|
2362
|
-
Smb: "SMB",
|
|
2363
|
-
Sudo: "SUDO",
|
|
2364
|
-
System: "SYSTEM"
|
|
2365
|
-
};
|
|
2366
|
-
var VMWareMatchDatastoresWithDatasetsResultFilesystemTypeInput = {
|
|
2367
|
-
Filesystem: "FILESYSTEM",
|
|
2368
|
-
Volume: "VOLUME"
|
|
2369
|
-
};
|
|
2370
|
-
|
|
2371
|
-
// src/generated/index.ts
|
|
2372
|
-
var SUPPORTED_API_VERSIONS = [
|
|
2373
|
-
"v25.10.0",
|
|
2374
|
-
"v25.10.1",
|
|
2375
|
-
"v25.10.2",
|
|
2376
|
-
"v25.10.3",
|
|
2377
|
-
"v25.10.4",
|
|
2378
|
-
"v25.10.5",
|
|
2379
|
-
"v26.0.0",
|
|
2380
|
-
"v27.0.0"
|
|
2381
|
-
];
|
|
2382
|
-
|
|
2383
|
-
// src/config/api-version.config.ts
|
|
2384
|
-
var apiVersionConfig = {
|
|
2385
|
-
/**
|
|
2386
|
-
* Minimum supported API version. Systems below it are rejected.
|
|
2387
|
-
*
|
|
2388
|
-
* DERIVED, not declared. The client supports exactly the versions it ships
|
|
2389
|
-
* types for, so the oldest generated version *is* the minimum — there is no
|
|
2390
|
-
* second decision to make, and therefore nothing to keep in sync.
|
|
2391
|
-
*
|
|
2392
|
-
* To move the floor, change `--min-version` in the `generate:api` script in
|
|
2393
|
-
* package.json and regenerate; this follows on its own. Written as a literal
|
|
2394
|
-
* it would duplicate that value with nothing enforcing agreement, so raising
|
|
2395
|
-
* one and forgetting the other would silently keep generating types for
|
|
2396
|
-
* versions the client rejects.
|
|
2397
|
-
*/
|
|
2398
|
-
MIN_SUPPORTED_VERSION: SUPPORTED_API_VERSIONS[0],
|
|
2399
|
-
/**
|
|
2400
|
-
* Maximum supported API version. Systems above it are rejected.
|
|
2401
|
-
*
|
|
2402
|
-
* NOT derived, deliberately — and for a different reason than it used to
|
|
2403
|
-
* lag. It sat at v26.0.0 while types for v27 already shipped, because
|
|
2404
|
-
* `CLIENT_BY_VERSION_KEY` had no `27` and a v27 system would have passed the
|
|
2405
|
-
* range check only to throw on client selection. `TrueNasApiClientV27` now
|
|
2406
|
-
* exists, so this moves up with it.
|
|
2407
|
-
*
|
|
2408
|
-
* What it must not become is `SUPPORTED_API_VERSIONS[length - 1]`, the mirror
|
|
2409
|
-
* of how MIN is derived. MIN is safe to derive because the oldest generated
|
|
2410
|
-
* version always has a client — it is the floor the clients were built from.
|
|
2411
|
-
* The ceiling is not symmetric: generating types for v28 does not write a v28
|
|
2412
|
-
* client, so deriving this would re-create the exact gap described above on
|
|
2413
|
-
* the next regeneration, silently. The real invariant is "the newest version
|
|
2414
|
-
* a client can be built for", which lives in `CLIENT_BY_VERSION_KEY`; a
|
|
2415
|
-
* factory test asserts the two agree, which is the check that keeps this
|
|
2416
|
-
* literal honest without importing the factory here.
|
|
2417
|
-
*/
|
|
2418
|
-
MAX_SUPPORTED_VERSION: "v27.0.0",
|
|
2419
|
-
/**
|
|
2420
|
-
* Fallback version to use when version discovery fails due to CORS/network errors.
|
|
2421
|
-
* When /api/versions returns HTTP status 0 (CORS block, network down, etc.),
|
|
2422
|
-
* the system will attempt to connect using this version as a best-effort fallback.
|
|
2423
|
-
*
|
|
2424
|
-
* WARNING: Status 0 errors have multiple causes:
|
|
2425
|
-
* - CORS policy blocking the request
|
|
2426
|
-
* - Network disconnected
|
|
2427
|
-
* - DNS lookup failure
|
|
2428
|
-
* - Server unreachable
|
|
2429
|
-
*
|
|
2430
|
-
* Which is why it is no longer reached on all of them. A discovery failure is
|
|
2431
|
-
* now put to a reachability probe and a second attempt first, and only an
|
|
2432
|
-
* appliance that answers the probe and still will not serve `/api/versions`
|
|
2433
|
-
* is assumed to be this version. One that answers nothing is reported as
|
|
2434
|
-
* unreachable rather than pinned to a version nobody confirmed.
|
|
2435
|
-
*/
|
|
2436
|
-
FALLBACK_VERSION: "v25.10.0"
|
|
2437
|
-
};
|
|
2438
|
-
|
|
2439
|
-
// src/types/api-version.type.ts
|
|
2440
|
-
var VersionCompatibility = /* @__PURE__ */ ((VersionCompatibility2) => {
|
|
2441
|
-
VersionCompatibility2["Compatible"] = "compatible";
|
|
2442
|
-
VersionCompatibility2["TooOld"] = "too-old";
|
|
2443
|
-
VersionCompatibility2["TooNew"] = "too-new";
|
|
2444
|
-
VersionCompatibility2["Invalid"] = "invalid";
|
|
2445
|
-
return VersionCompatibility2;
|
|
2446
|
-
})(VersionCompatibility || {});
|
|
2447
|
-
|
|
2448
|
-
// src/utils/api-version.utils.ts
|
|
2449
|
-
var legacyCutoffYear = 25;
|
|
2450
|
-
function parseApiVersion(versionString) {
|
|
2451
|
-
const regex = /^v(\d{2})\.(\d+)\.(\d+)$/;
|
|
2452
|
-
const match = versionString.match(regex);
|
|
2453
|
-
if (!match) {
|
|
2454
|
-
return null;
|
|
2455
|
-
}
|
|
2456
|
-
const [, yearStr, minorStr, patchStr] = match;
|
|
2457
|
-
const year = parseInt(yearStr, 10);
|
|
2458
|
-
const minor = parseInt(minorStr, 10);
|
|
2459
|
-
const patch = parseInt(patchStr, 10);
|
|
2460
|
-
if (year <= legacyCutoffYear) {
|
|
2461
|
-
if (minor < 1 || minor > 12) {
|
|
2462
|
-
return null;
|
|
2463
|
-
}
|
|
2464
|
-
} else if (year >= 26) {
|
|
2465
|
-
if (minor < 0 || minor > 99) {
|
|
2466
|
-
return null;
|
|
2467
|
-
}
|
|
2468
|
-
}
|
|
2469
|
-
return {
|
|
2470
|
-
version: versionString,
|
|
2471
|
-
year,
|
|
2472
|
-
minor,
|
|
2473
|
-
patch,
|
|
2474
|
-
websocketPath: `/api/${versionString}`
|
|
2475
|
-
};
|
|
2476
|
-
}
|
|
2477
|
-
function compareVersions(a, b) {
|
|
2478
|
-
if (a.year !== b.year) {
|
|
2479
|
-
return a.year - b.year;
|
|
2480
|
-
}
|
|
2481
|
-
if (a.minor !== b.minor) {
|
|
2482
|
-
return a.minor - b.minor;
|
|
2483
|
-
}
|
|
2484
|
-
return a.patch - b.patch;
|
|
2485
|
-
}
|
|
2486
|
-
function checkVersionCompatibility(version) {
|
|
2487
|
-
const minVersion = parseApiVersion(apiVersionConfig.MIN_SUPPORTED_VERSION);
|
|
2488
|
-
const maxVersion = parseApiVersion(apiVersionConfig.MAX_SUPPORTED_VERSION);
|
|
2489
|
-
if (!minVersion || !maxVersion) {
|
|
2490
|
-
return "invalid" /* Invalid */;
|
|
2491
|
-
}
|
|
2492
|
-
if (compareVersions(version, minVersion) < 0) {
|
|
2493
|
-
return "too-old" /* TooOld */;
|
|
2494
|
-
}
|
|
2495
|
-
if (compareVersions(version, maxVersion) > 0) {
|
|
2496
|
-
return "too-new" /* TooNew */;
|
|
2497
|
-
}
|
|
2498
|
-
return "compatible" /* Compatible */;
|
|
2499
|
-
}
|
|
2500
|
-
function isVersionSupported(version) {
|
|
2501
|
-
return checkVersionCompatibility(version) === "compatible" /* Compatible */;
|
|
2502
|
-
}
|
|
2503
|
-
function filterCompatibleVersions(versions) {
|
|
2504
|
-
return versions.filter(isVersionSupported);
|
|
2505
|
-
}
|
|
2506
|
-
function getWebSocketPath(version) {
|
|
2507
|
-
return version.websocketPath;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
// src/enums/truenas-auth-mechanism.enum.ts
|
|
2511
|
-
var TrueNasAuthMechanism = /* @__PURE__ */ ((TrueNasAuthMechanism2) => {
|
|
2512
|
-
TrueNasAuthMechanism2["ApiKey"] = "API_KEY_PLAIN";
|
|
2513
|
-
TrueNasAuthMechanism2["Password"] = "PASSWORD_PLAIN";
|
|
2514
|
-
TrueNasAuthMechanism2["Otp"] = "OTP_TOKEN";
|
|
2515
|
-
TrueNasAuthMechanism2["Token"] = "TOKEN_PLAIN";
|
|
2516
|
-
return TrueNasAuthMechanism2;
|
|
2517
|
-
})(TrueNasAuthMechanism || {});
|
|
2518
|
-
|
|
2519
|
-
// src/errors/auth.errors.ts
|
|
2520
|
-
var AuthErrorCode = /* @__PURE__ */ ((AuthErrorCode2) => {
|
|
2521
|
-
AuthErrorCode2["PasswordAuthFailed"] = "PASSWORD_AUTH_FAILED";
|
|
2522
|
-
AuthErrorCode2["OtpAuthFailed"] = "OTP_AUTH_FAILED";
|
|
2523
|
-
AuthErrorCode2["ApiKeyAuthFailed"] = "API_KEY_AUTH_FAILED";
|
|
2524
|
-
AuthErrorCode2["TokenAuthFailed"] = "TOKEN_AUTH_FAILED";
|
|
2525
|
-
AuthErrorCode2["LoginSuperseded"] = "LOGIN_SUPERSEDED";
|
|
2526
|
-
AuthErrorCode2["FullAdminRequired"] = "FULL_ADMIN_REQUIRED";
|
|
2527
|
-
return AuthErrorCode2;
|
|
2528
|
-
})(AuthErrorCode || {});
|
|
2529
|
-
var AuthError = class _AuthError extends Error {
|
|
2530
|
-
constructor(code, message) {
|
|
2531
|
-
super(message);
|
|
2532
|
-
this.code = code;
|
|
2533
|
-
this.name = "AuthError";
|
|
2534
|
-
Object.setPrototypeOf(this, _AuthError.prototype);
|
|
2535
|
-
}
|
|
2536
|
-
};
|
|
2537
|
-
|
|
2538
|
-
// src/auth/truenas-authenticator.ts
|
|
2539
|
-
var throwOnAuthenticationFailure = (code, message) => rxjs.switchMap((response) => {
|
|
2540
|
-
if (response.response_type === "AUTH_ERR" /* AuthErr */) {
|
|
2541
|
-
return rxjs.throwError(() => new AuthError(code, message));
|
|
2542
|
-
}
|
|
2543
|
-
return rxjs.of(response);
|
|
39
|
+
Object.defineProperty(exports, "TrueNasApiClient", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunk6PF34AWT_cjs.TrueNasApiClient; }
|
|
2544
42
|
});
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
this.version = version;
|
|
2549
|
-
// in seconds (5 minutes)
|
|
2550
|
-
/**
|
|
2551
|
-
* whether or not the system is currently authenticated and accessible.
|
|
2552
|
-
* this is a `BehaviorSubject` instead of a signal, since we use its `getValue` method
|
|
2553
|
-
* throughout a lot of the codebase.
|
|
2554
|
-
*/
|
|
2555
|
-
this.authenticated$ = new rxjs.BehaviorSubject(false);
|
|
2556
|
-
/**
|
|
2557
|
-
* `true` when the system is currently being authenticated to, and `false` otherwise.
|
|
2558
|
-
* does not indicate whatsoever if authentication is successful or not, just whether the process
|
|
2559
|
-
* is ongoing.
|
|
2560
|
-
*/
|
|
2561
|
-
this.authenticating$ = new rxjs.BehaviorSubject(false);
|
|
2562
|
-
this.credentials = { username: "", password: "", key: "" };
|
|
2563
|
-
this.sessionLifetime = _TrueNasAuthenticator.DefaultSessionLifetime;
|
|
2564
|
-
/**
|
|
2565
|
-
* Claimed by each login when it sends and checked when its answer lands: a
|
|
2566
|
-
* difference means another login or a logout was issued in between, so this
|
|
2567
|
-
* answer is stale and must not write session state. Responses on one socket
|
|
2568
|
-
* are not ordered, which is why arrival is not enough to make an answer
|
|
2569
|
-
* current.
|
|
2570
|
-
*
|
|
2571
|
-
* `logout()` bumps it without claiming one. It has no answer to guard —
|
|
2572
|
-
* it settles its own state at the call — and bumping is what invalidates the
|
|
2573
|
-
* logins already on the wire that a logout is meant to override.
|
|
2574
|
-
*/
|
|
2575
|
-
this.authEpoch = 0;
|
|
2576
|
-
/**
|
|
2577
|
-
* Caller-issued logins still awaiting an answer, keyed by the epoch each
|
|
2578
|
-
* claimed. The value is whether its frame has been written to a socket yet.
|
|
2579
|
-
*
|
|
2580
|
-
* The auto-relogin below defers while any entry exists. It is this class
|
|
2581
|
-
* retrying a cached credential, not a request anyone made, so it must never
|
|
2582
|
-
* outrank an explicit login — and it would: `TrueNasConnection.send` holds a
|
|
2583
|
-
* frame through an outage rather than dropping it, so a login submitted while
|
|
2584
|
-
* the socket is down is still pending when `opened` fires, and a relogin
|
|
2585
|
-
* claiming the newer epoch has that login answered `LoginSuperseded` while the
|
|
2586
|
-
* client authenticates as the previously cached account.
|
|
2587
|
-
*
|
|
2588
|
-
* Keyed rather than counted, because a count cannot say *which* login a
|
|
2589
|
-
* removal belongs to: a login torn down by its caller would retire a slot
|
|
2590
|
-
* belonging to a different login that is still waiting, and the retry would
|
|
2591
|
-
* overtake it again. Identity also makes a double-subscribed login harmless.
|
|
2592
|
-
*/
|
|
2593
|
-
this.liveCallerLogins = /* @__PURE__ */ new Map();
|
|
2594
|
-
/** True only while the constructor's relogin is being constructed. */
|
|
2595
|
-
this.reloginInProgress = false;
|
|
2596
|
-
this.connection.opened.subscribe((isOpen) => {
|
|
2597
|
-
if (!isOpen) return;
|
|
2598
|
-
for (const epoch of this.liveCallerLogins.keys()) {
|
|
2599
|
-
this.liveCallerLogins.set(epoch, true);
|
|
2600
|
-
}
|
|
2601
|
-
});
|
|
2602
|
-
this.connection.opened.pipe(
|
|
2603
|
-
rxjs.filter(
|
|
2604
|
-
(isOpen) => !!(isOpen && this.credentials?.username && (this.credentials.password || this.credentials.key) && // An explicit login already on the wire outranks this retry.
|
|
2605
|
-
this.liveCallerLogins.size === 0)
|
|
2606
|
-
),
|
|
2607
|
-
rxjs.switchMap(() => {
|
|
2608
|
-
this.reloginInProgress = true;
|
|
2609
|
-
let relogin;
|
|
2610
|
-
try {
|
|
2611
|
-
relogin = this.credentials.password ? this.loginWithUserPass(
|
|
2612
|
-
this.credentials.username,
|
|
2613
|
-
this.credentials.password
|
|
2614
|
-
) : this.loginWithApiKey({
|
|
2615
|
-
username: this.credentials.username,
|
|
2616
|
-
key: this.credentials.key
|
|
2617
|
-
});
|
|
2618
|
-
} finally {
|
|
2619
|
-
this.reloginInProgress = false;
|
|
2620
|
-
}
|
|
2621
|
-
return relogin.pipe(rxjs.catchError(() => rxjs.EMPTY));
|
|
2622
|
-
})
|
|
2623
|
-
).subscribe();
|
|
2624
|
-
connection.closed.subscribe(() => {
|
|
2625
|
-
for (const [epoch, flushed] of this.liveCallerLogins) {
|
|
2626
|
-
if (flushed) this.liveCallerLogins.delete(epoch);
|
|
2627
|
-
}
|
|
2628
|
-
this.sessionLifetime = _TrueNasAuthenticator.DefaultSessionLifetime;
|
|
2629
|
-
this.authenticated$.next(false);
|
|
2630
|
-
});
|
|
2631
|
-
}
|
|
2632
|
-
static {
|
|
2633
|
-
this.DefaultSessionLifetime = 300;
|
|
2634
|
-
}
|
|
2635
|
-
/**
|
|
2636
|
-
* `login_options` asking for a reconnect token, when the server understands it.
|
|
2637
|
-
*
|
|
2638
|
-
* Omitted below v26. `AuthCommonOptions` is `additionalProperties: false`
|
|
2639
|
-
* there and has only `user_info`, so sending the member is a validation
|
|
2640
|
-
* error, not an ignored field — it would fail login outright on the oldest
|
|
2641
|
-
* version this client supports.
|
|
2642
|
-
*/
|
|
2643
|
-
/**
|
|
2644
|
-
* Two things this does not do, both deliberate and both worth knowing.
|
|
2645
|
-
*
|
|
2646
|
-
* There is no way for a consumer to decline: every v26+ password login now
|
|
2647
|
-
* mints a single-use credential carrying that session's roles, whether or not
|
|
2648
|
-
* the caller wants one. And the auto-relogin in the constructor subscribes
|
|
2649
|
-
* with no observer, so the token it mints is dropped — a caller reconnecting
|
|
2650
|
-
* repeatedly holds an ageing token while the appliance mints fresh ones
|
|
2651
|
-
* nobody reads. Tokens are single-use with a 600s TTL, so that is the
|
|
2652
|
-
* reconnect case the feature is named for.
|
|
2653
|
-
*/
|
|
2654
|
-
reconnectTokenOption() {
|
|
2655
|
-
if (!this.version || this.version.year <= legacyCutoffYear) return void 0;
|
|
2656
|
-
return { login_options: { reconnect_token: true } };
|
|
2657
|
-
}
|
|
2658
|
-
/**
|
|
2659
|
-
* Throws when another login or a logout was issued after this one was sent,
|
|
2660
|
-
* so a stale answer cannot be reported to its caller as a successful login.
|
|
2661
|
-
*/
|
|
2662
|
-
assertNotSuperseded(sentDuring) {
|
|
2663
|
-
if (this.authEpoch === sentDuring) return;
|
|
2664
|
-
throw new AuthError(
|
|
2665
|
-
"LOGIN_SUPERSEDED" /* LoginSuperseded */,
|
|
2666
|
-
"Login was superseded by a later logout or login and was discarded."
|
|
2667
|
-
);
|
|
2668
|
-
}
|
|
2669
|
-
/** Claim the next epoch for a login, and record it if a caller asked for it. */
|
|
2670
|
-
beginLogin() {
|
|
2671
|
-
const callerInitiated = !this.reloginInProgress;
|
|
2672
|
-
const sentDuring = ++this.authEpoch;
|
|
2673
|
-
if (callerInitiated) {
|
|
2674
|
-
this.liveCallerLogins.set(sentDuring, this.connection.opened.value);
|
|
2675
|
-
}
|
|
2676
|
-
return { sentDuring, callerInitiated };
|
|
2677
|
-
}
|
|
2678
|
-
endLogin(sentDuring, callerInitiated, answered) {
|
|
2679
|
-
const flushed = this.liveCallerLogins.get(sentDuring);
|
|
2680
|
-
if (callerInitiated && (answered || flushed)) {
|
|
2681
|
-
this.liveCallerLogins.delete(sentDuring);
|
|
2682
|
-
}
|
|
2683
|
-
this.authenticating$.next(false);
|
|
2684
|
-
}
|
|
2685
|
-
loginWithUserPass(username, password) {
|
|
2686
|
-
const { sentDuring, callerInitiated } = this.beginLogin();
|
|
2687
|
-
let answered = false;
|
|
2688
|
-
const message = createJsonRpcMessage("auth.login_ex", [
|
|
2689
|
-
{
|
|
2690
|
-
mechanism: "PASSWORD_PLAIN" /* Password */,
|
|
2691
|
-
username,
|
|
2692
|
-
password,
|
|
2693
|
-
...this.reconnectTokenOption()
|
|
2694
|
-
}
|
|
2695
|
-
]);
|
|
2696
|
-
this.authenticating$.next(true);
|
|
2697
|
-
this.connection.send(message);
|
|
2698
|
-
const messageId = message.id ?? "";
|
|
2699
|
-
return this.connection.messages().pipe(
|
|
2700
|
-
withId(messageId),
|
|
2701
|
-
rxjs.tap(() => {
|
|
2702
|
-
answered = true;
|
|
2703
|
-
}),
|
|
2704
|
-
rxjs.map((msg) => {
|
|
2705
|
-
if (msg.error) {
|
|
2706
|
-
const errorMessage = getApiErrorMessage(
|
|
2707
|
-
msg.error,
|
|
2708
|
-
"Authentication failed"
|
|
2709
|
-
);
|
|
2710
|
-
throw new Error(errorMessage);
|
|
2711
|
-
}
|
|
2712
|
-
return msg.result;
|
|
2713
|
-
}),
|
|
2714
|
-
throwOnAuthenticationFailure(
|
|
2715
|
-
"PASSWORD_AUTH_FAILED" /* PasswordAuthFailed */,
|
|
2716
|
-
"TrueNAS authentication failed. Please verify your TrueNAS user credentials and try again."
|
|
2717
|
-
),
|
|
2718
|
-
rxjs.tap((res) => {
|
|
2719
|
-
if (res.response_type === "SUCCESS" /* Success */) {
|
|
2720
|
-
this.assertNotSuperseded(sentDuring);
|
|
2721
|
-
this.credentials = { username, password, key: "" };
|
|
2722
|
-
this.sessionLifetime = res.user_info?.attributes?.preferences?.lifetime ?? _TrueNasAuthenticator.DefaultSessionLifetime;
|
|
2723
|
-
this.authenticated$.next(true);
|
|
2724
|
-
}
|
|
2725
|
-
}),
|
|
2726
|
-
rxjs.finalize(() => {
|
|
2727
|
-
this.endLogin(sentDuring, callerInitiated, answered);
|
|
2728
|
-
}),
|
|
2729
|
-
rxjs.take(1)
|
|
2730
|
-
);
|
|
2731
|
-
}
|
|
2732
|
-
loginWithOtp(code) {
|
|
2733
|
-
const { sentDuring, callerInitiated } = this.beginLogin();
|
|
2734
|
-
let answered = false;
|
|
2735
|
-
const message = createJsonRpcMessage("auth.login_ex", [
|
|
2736
|
-
{
|
|
2737
|
-
mechanism: "OTP_TOKEN" /* Otp */,
|
|
2738
|
-
otp_token: code
|
|
2739
|
-
}
|
|
2740
|
-
]);
|
|
2741
|
-
this.authenticating$.next(true);
|
|
2742
|
-
this.connection.send(message);
|
|
2743
|
-
const messageId = message.id ?? "";
|
|
2744
|
-
return this.connection.messages().pipe(
|
|
2745
|
-
withId(messageId),
|
|
2746
|
-
rxjs.tap(() => {
|
|
2747
|
-
answered = true;
|
|
2748
|
-
}),
|
|
2749
|
-
rxjs.map((msg) => {
|
|
2750
|
-
if (msg.error) {
|
|
2751
|
-
const errorMessage = getApiErrorMessage(
|
|
2752
|
-
msg.error,
|
|
2753
|
-
"Authentication failed"
|
|
2754
|
-
);
|
|
2755
|
-
throw new Error(errorMessage);
|
|
2756
|
-
}
|
|
2757
|
-
return msg.result;
|
|
2758
|
-
}),
|
|
2759
|
-
rxjs.tap((res) => {
|
|
2760
|
-
if (res?.response_type === "SUCCESS" /* Success */) {
|
|
2761
|
-
this.assertNotSuperseded(sentDuring);
|
|
2762
|
-
this.sessionLifetime = res.user_info?.attributes?.preferences?.lifetime ?? _TrueNasAuthenticator.DefaultSessionLifetime;
|
|
2763
|
-
this.authenticated$.next(true);
|
|
2764
|
-
}
|
|
2765
|
-
}),
|
|
2766
|
-
throwOnAuthenticationFailure(
|
|
2767
|
-
"OTP_AUTH_FAILED" /* OtpAuthFailed */,
|
|
2768
|
-
"TrueNAS authentication failed. Please verify your one-time passcode and try again."
|
|
2769
|
-
),
|
|
2770
|
-
rxjs.finalize(() => {
|
|
2771
|
-
this.endLogin(sentDuring, callerInitiated, answered);
|
|
2772
|
-
}),
|
|
2773
|
-
rxjs.take(1)
|
|
2774
|
-
);
|
|
2775
|
-
}
|
|
2776
|
-
/**
|
|
2777
|
-
* Re-authenticate with a token from a previous login's `reconnect_token`.
|
|
2778
|
-
*
|
|
2779
|
-
* This is what lets a second connection to the same appliance authenticate
|
|
2780
|
-
* without asking the user for a password again — middleware sessions are
|
|
2781
|
-
* per-connection, so a second socket has its own to establish.
|
|
2782
|
-
*
|
|
2783
|
-
* The token is single-use and short-lived. On v26+ a successful login mints
|
|
2784
|
-
* another on the response, so a caller keeping a session alive across
|
|
2785
|
-
* reconnects stores the newest each time; below v26 nothing is minted and
|
|
2786
|
-
* there is no chain to keep.
|
|
2787
|
-
*
|
|
2788
|
-
* Re-login is the caller's to drive. A token session is not covered by the
|
|
2789
|
-
* automatic reconnect this class does for password and api-key sessions,
|
|
2790
|
-
* which is deliberate — the token is single-use — but it means a dropped
|
|
2791
|
-
* socket needs the stored token spending explicitly. Middleware holds tokens
|
|
2792
|
-
* in memory, so a `middlewared` restart voids them, and that is a common
|
|
2793
|
-
* reason the socket dropped in the first place.
|
|
2794
|
-
*/
|
|
2795
|
-
loginWithToken(token) {
|
|
2796
|
-
const { sentDuring, callerInitiated } = this.beginLogin();
|
|
2797
|
-
let answered = false;
|
|
2798
|
-
const message = createJsonRpcMessage("auth.login_ex", [
|
|
2799
|
-
{
|
|
2800
|
-
mechanism: "TOKEN_PLAIN" /* Token */,
|
|
2801
|
-
token,
|
|
2802
|
-
...this.reconnectTokenOption()
|
|
2803
|
-
}
|
|
2804
|
-
]);
|
|
2805
|
-
this.authenticating$.next(true);
|
|
2806
|
-
this.connection.send(message);
|
|
2807
|
-
const messageId = message.id ?? "";
|
|
2808
|
-
return this.connection.messages().pipe(
|
|
2809
|
-
withId(messageId),
|
|
2810
|
-
rxjs.tap(() => {
|
|
2811
|
-
answered = true;
|
|
2812
|
-
}),
|
|
2813
|
-
rxjs.map((msg) => {
|
|
2814
|
-
if (msg.error) {
|
|
2815
|
-
const errorMessage = getApiErrorMessage(
|
|
2816
|
-
msg.error,
|
|
2817
|
-
"Authentication failed"
|
|
2818
|
-
);
|
|
2819
|
-
throw new Error(errorMessage);
|
|
2820
|
-
}
|
|
2821
|
-
return msg.result;
|
|
2822
|
-
}),
|
|
2823
|
-
// Password login lets non-`AUTH_ERR` answers through because it has to
|
|
2824
|
-
// hand `OTP_REQUIRED` back to the caller. Token login has no such case:
|
|
2825
|
-
// middleware answers `EXPIRED` for an account locked or expired between
|
|
2826
|
-
// minting and spending, and `DENIED` for a permission refusal, so letting
|
|
2827
|
-
// those reach `next` would report a failed login as a successful one.
|
|
2828
|
-
rxjs.map((res) => {
|
|
2829
|
-
if (res.response_type !== "SUCCESS" /* Success */) {
|
|
2830
|
-
throw new AuthError(
|
|
2831
|
-
"TOKEN_AUTH_FAILED" /* TokenAuthFailed */,
|
|
2832
|
-
`TrueNAS token authentication failed (${res.response_type}). The token may have expired or been used, or the account may no longer be permitted to log in.`
|
|
2833
|
-
);
|
|
2834
|
-
}
|
|
2835
|
-
return res;
|
|
2836
|
-
}),
|
|
2837
|
-
rxjs.tap((res) => {
|
|
2838
|
-
if (res.response_type === "SUCCESS" /* Success */) {
|
|
2839
|
-
this.assertNotSuperseded(sentDuring);
|
|
2840
|
-
this.sessionLifetime = res.user_info?.attributes?.preferences?.lifetime ?? _TrueNasAuthenticator.DefaultSessionLifetime;
|
|
2841
|
-
this.authenticated$.next(true);
|
|
2842
|
-
}
|
|
2843
|
-
}),
|
|
2844
|
-
rxjs.finalize(() => {
|
|
2845
|
-
this.endLogin(sentDuring, callerInitiated, answered);
|
|
2846
|
-
}),
|
|
2847
|
-
rxjs.take(1)
|
|
2848
|
-
);
|
|
2849
|
-
}
|
|
2850
|
-
/**
|
|
2851
|
-
* No reconnect token is requested here, though v26+ would mint one: an
|
|
2852
|
-
* api-key session already reconnects without a prompt, since the key is held
|
|
2853
|
-
* and replayed. The token exists for the credential that cannot be.
|
|
2854
|
-
*/
|
|
2855
|
-
loginWithApiKey(credentials) {
|
|
2856
|
-
const { sentDuring, callerInitiated } = this.beginLogin();
|
|
2857
|
-
let answered = false;
|
|
2858
|
-
const { username, key } = credentials;
|
|
2859
|
-
const message = createJsonRpcMessage("auth.login_ex", [
|
|
2860
|
-
{
|
|
2861
|
-
mechanism: "API_KEY_PLAIN" /* ApiKey */,
|
|
2862
|
-
username,
|
|
2863
|
-
api_key: key
|
|
2864
|
-
}
|
|
2865
|
-
]);
|
|
2866
|
-
this.authenticating$.next(true);
|
|
2867
|
-
this.connection.send(message);
|
|
2868
|
-
const messageId = message.id ?? "";
|
|
2869
|
-
return this.connection.messages().pipe(
|
|
2870
|
-
withId(messageId),
|
|
2871
|
-
rxjs.tap(() => {
|
|
2872
|
-
answered = true;
|
|
2873
|
-
}),
|
|
2874
|
-
rxjs.map((msg) => {
|
|
2875
|
-
if (msg.error) {
|
|
2876
|
-
const errorMessage = getApiErrorMessage(
|
|
2877
|
-
msg.error,
|
|
2878
|
-
"Authentication failed"
|
|
2879
|
-
);
|
|
2880
|
-
throw new Error(errorMessage);
|
|
2881
|
-
}
|
|
2882
|
-
return msg.result;
|
|
2883
|
-
}),
|
|
2884
|
-
throwOnAuthenticationFailure(
|
|
2885
|
-
"API_KEY_AUTH_FAILED" /* ApiKeyAuthFailed */,
|
|
2886
|
-
"TrueNAS authentication failed. Has the TrueNAS Connect API key been removed from your TrueNAS server?"
|
|
2887
|
-
),
|
|
2888
|
-
rxjs.tap((res) => {
|
|
2889
|
-
this.assertNotSuperseded(sentDuring);
|
|
2890
|
-
this.credentials = { username, password: "", key };
|
|
2891
|
-
this.sessionLifetime = res.user_info?.attributes?.preferences?.lifetime ?? _TrueNasAuthenticator.DefaultSessionLifetime;
|
|
2892
|
-
this.authenticated$.next(true);
|
|
2893
|
-
}),
|
|
2894
|
-
rxjs.finalize(() => {
|
|
2895
|
-
this.endLogin(sentDuring, callerInitiated, answered);
|
|
2896
|
-
}),
|
|
2897
|
-
rxjs.take(1)
|
|
2898
|
-
);
|
|
2899
|
-
}
|
|
2900
|
-
newApiKey(username) {
|
|
2901
|
-
const message = createJsonRpcMessage("api_key.create", [
|
|
2902
|
-
{ name: `tnc-${randomUUID()}`, username }
|
|
2903
|
-
]);
|
|
2904
|
-
this.connection.send(message);
|
|
2905
|
-
const messageId = message.id ?? "";
|
|
2906
|
-
return this.connection.messages().pipe(
|
|
2907
|
-
withId(messageId),
|
|
2908
|
-
rxjs.map((msg) => {
|
|
2909
|
-
if (msg.error) {
|
|
2910
|
-
const errorMessage = getApiErrorMessage(
|
|
2911
|
-
msg.error,
|
|
2912
|
-
"Failed to create API key"
|
|
2913
|
-
);
|
|
2914
|
-
throw new Error(errorMessage);
|
|
2915
|
-
}
|
|
2916
|
-
return msg.result;
|
|
2917
|
-
}),
|
|
2918
|
-
rxjs.take(1)
|
|
2919
|
-
);
|
|
2920
|
-
}
|
|
2921
|
-
logout() {
|
|
2922
|
-
this.credentials = { username: "", password: "", key: "" };
|
|
2923
|
-
this.sessionLifetime = _TrueNasAuthenticator.DefaultSessionLifetime;
|
|
2924
|
-
this.authEpoch += 1;
|
|
2925
|
-
this.authenticated$.next(false);
|
|
2926
|
-
const message = createJsonRpcMessage("auth.logout");
|
|
2927
|
-
this.connection.send(message);
|
|
2928
|
-
const messageId = message.id ?? "";
|
|
2929
|
-
return this.connection.messages().pipe(
|
|
2930
|
-
withId(messageId),
|
|
2931
|
-
rxjs.map((msg) => {
|
|
2932
|
-
if (msg.error) {
|
|
2933
|
-
return false;
|
|
2934
|
-
}
|
|
2935
|
-
return msg.result;
|
|
2936
|
-
}),
|
|
2937
|
-
rxjs.take(1)
|
|
2938
|
-
);
|
|
2939
|
-
}
|
|
2940
|
-
};
|
|
2941
|
-
|
|
2942
|
-
// src/logger.ts
|
|
2943
|
-
var consoleLogger = {
|
|
2944
|
-
trace: (message, ...args) => console.trace(message, ...args),
|
|
2945
|
-
debug: (message, ...args) => console.debug(message, ...args),
|
|
2946
|
-
info: (message, ...args) => console.info(message, ...args),
|
|
2947
|
-
warn: (message, ...args) => console.warn(message, ...args),
|
|
2948
|
-
error: (message, ...args) => console.error(message, ...args)
|
|
2949
|
-
};
|
|
2950
|
-
var noop = () => void 0;
|
|
2951
|
-
var noopLogger = {
|
|
2952
|
-
trace: noop,
|
|
2953
|
-
debug: noop,
|
|
2954
|
-
info: noop,
|
|
2955
|
-
warn: noop,
|
|
2956
|
-
error: noop
|
|
2957
|
-
};
|
|
2958
|
-
|
|
2959
|
-
// src/utils/truenas-connection.utils.ts
|
|
2960
|
-
var policyViolationCloseCode = 1008;
|
|
2961
|
-
function isHttpStatusError(reason) {
|
|
2962
|
-
return ["404", "502", "503"].some((code) => reason.includes(code));
|
|
2963
|
-
}
|
|
2964
|
-
function getHttpError(reason) {
|
|
2965
|
-
if (reason.includes("404")) {
|
|
2966
|
-
return "API endpoint not found - System may not support versioned API";
|
|
2967
|
-
}
|
|
2968
|
-
if (reason.includes("502")) {
|
|
2969
|
-
return "Bad Gateway - System may be starting up";
|
|
2970
|
-
}
|
|
2971
|
-
if (reason.includes("503")) {
|
|
2972
|
-
return "Service Unavailable - System may be overloaded";
|
|
2973
|
-
}
|
|
2974
|
-
return "";
|
|
2975
|
-
}
|
|
2976
|
-
function getWebSocketError(code) {
|
|
2977
|
-
switch (code) {
|
|
2978
|
-
case 1e3:
|
|
2979
|
-
return "Connection closed normally";
|
|
2980
|
-
case 1001:
|
|
2981
|
-
return "Server is shutting down or restarting";
|
|
2982
|
-
case 1002:
|
|
2983
|
-
return "Protocol error - Invalid WebSocket communication";
|
|
2984
|
-
case 1003:
|
|
2985
|
-
return "Unsupported data format received";
|
|
2986
|
-
case 1006:
|
|
2987
|
-
return "Connection lost unexpectedly - Check network connectivity";
|
|
2988
|
-
case 1007:
|
|
2989
|
-
return "Invalid data received from server";
|
|
2990
|
-
case 1008:
|
|
2991
|
-
return "Connection terminated due to policy violation";
|
|
2992
|
-
case 1009:
|
|
2993
|
-
return "Message size exceeded server limits";
|
|
2994
|
-
case 1011:
|
|
2995
|
-
return "Server encountered an internal error";
|
|
2996
|
-
case 1012:
|
|
2997
|
-
return "Service is restarting";
|
|
2998
|
-
case 1013:
|
|
2999
|
-
return "Server temporarily overloaded - Try again later";
|
|
3000
|
-
case 1015:
|
|
3001
|
-
return "TLS/Certificate error - Certificate may be expired";
|
|
3002
|
-
default:
|
|
3003
|
-
return "Network connection failed - Check IP address and connectivity";
|
|
3004
|
-
}
|
|
3005
|
-
}
|
|
3006
|
-
var TrueNasSocket = class {
|
|
3007
|
-
constructor(config) {
|
|
3008
|
-
this.config = config;
|
|
3009
|
-
this.socket = webSocket.webSocket(this.config);
|
|
3010
|
-
}
|
|
3011
|
-
messages() {
|
|
3012
|
-
return this.socket;
|
|
3013
|
-
}
|
|
3014
|
-
next(msg) {
|
|
3015
|
-
this.socket.next(msg);
|
|
3016
|
-
}
|
|
3017
|
-
complete() {
|
|
3018
|
-
this.socket.complete();
|
|
3019
|
-
}
|
|
3020
|
-
};
|
|
3021
|
-
|
|
3022
|
-
// src/types/transport.type.ts
|
|
3023
|
-
function httpScheme(protocol) {
|
|
3024
|
-
return protocol === "http:" ? "http:" : "https:";
|
|
3025
|
-
}
|
|
3026
|
-
function socketScheme(protocol) {
|
|
3027
|
-
return protocol === "http:" ? "ws:" : "wss:";
|
|
3028
|
-
}
|
|
3029
|
-
|
|
3030
|
-
// src/connection/truenas-connection.ts
|
|
3031
|
-
var tenSeconds = 10 * 1e3;
|
|
3032
|
-
var twentySeconds = 20 * 1e3;
|
|
3033
|
-
var TrueNasConnection = class {
|
|
3034
|
-
constructor(initialEnabled, hostnames, systemUuid, websocketPath, systemName, retryDelay = tenSeconds, maxRetry = 3, logger = noopLogger, protocol = "https:") {
|
|
3035
|
-
this.hostnames = hostnames;
|
|
3036
|
-
this.systemUuid = systemUuid;
|
|
3037
|
-
this.websocketPath = websocketPath;
|
|
3038
|
-
this.systemName = systemName;
|
|
3039
|
-
this.retryDelay = retryDelay;
|
|
3040
|
-
this.maxRetry = maxRetry;
|
|
3041
|
-
this.logger = logger;
|
|
3042
|
-
this.protocol = protocol;
|
|
3043
|
-
// compatibility properties
|
|
3044
|
-
this.opened = new rxjs.BehaviorSubject(false);
|
|
3045
|
-
this.closed = new rxjs.Subject();
|
|
3046
|
-
this.hostname = new rxjs.BehaviorSubject("");
|
|
3047
|
-
this.connectionAttempts = new rxjs.BehaviorSubject(0);
|
|
3048
|
-
this.lastErrorMessage = new rxjs.BehaviorSubject(null);
|
|
3049
|
-
/**
|
|
3050
|
-
* emits when the connection is manually closed.
|
|
3051
|
-
*/
|
|
3052
|
-
this.closeConnection = new rxjs.Subject();
|
|
3053
|
-
/**
|
|
3054
|
-
* the connection only establishes a socket while this gate is `true`. consumers
|
|
3055
|
-
* flip it via `setEnabled()` (the app maps `SystemState.Active -> true`).
|
|
3056
|
-
*/
|
|
3057
|
-
this.enabled$ = new rxjs.BehaviorSubject(false);
|
|
3058
|
-
/**
|
|
3059
|
-
* observable which emits the current gate value and only emits again when it changes.
|
|
3060
|
-
*/
|
|
3061
|
-
this.enabledChange$ = this.enabled$.pipe(rxjs.distinctUntilChanged());
|
|
3062
|
-
/**
|
|
3063
|
-
* observable that handles the entire connection lifecycle.
|
|
3064
|
-
*/
|
|
3065
|
-
this.connection$ = this.enabledChange$.pipe(
|
|
3066
|
-
rxjs.switchMap((enabled) => {
|
|
3067
|
-
if (enabled) {
|
|
3068
|
-
return this.connect().pipe(
|
|
3069
|
-
rxjs.map((conn) => makeActiveConnection(conn.ws, conn.hostname)),
|
|
3070
|
-
// A refusal becomes a value here rather than an error, so it never
|
|
3071
|
-
// reaches the `retry` below and nothing reconnects on its own.
|
|
3072
|
-
//
|
|
3073
|
-
// Handled at this depth on purpose: letting it out completes the
|
|
3074
|
-
// pipeline and unsubscribes `enabledChange$`, and `setEnabled` is the
|
|
3075
|
-
// documented way an app asks for another attempt once the network
|
|
3076
|
-
// changes. Not retrying is a statement about what this client does on
|
|
3077
|
-
// its own; it is not a reason to refuse the caller asking again.
|
|
3078
|
-
rxjs.catchError(
|
|
3079
|
-
(err) => isTerminalClose(err) ? rxjs.of(
|
|
3080
|
-
makeConnectionError(
|
|
3081
|
-
err.message,
|
|
3082
|
-
err.hostname,
|
|
3083
|
-
err.closeCode,
|
|
3084
|
-
err.closeReason
|
|
3085
|
-
)
|
|
3086
|
-
) : rxjs.throwError(() => err)
|
|
3087
|
-
)
|
|
3088
|
-
);
|
|
3089
|
-
}
|
|
3090
|
-
return rxjs.of(closedConnection);
|
|
3091
|
-
}),
|
|
3092
|
-
rxjs.switchMap((connection) => {
|
|
3093
|
-
if (connection.state !== "active") {
|
|
3094
|
-
return rxjs.of(connection);
|
|
3095
|
-
}
|
|
3096
|
-
const initMessage = createJsonRpcMessage("core.set_options", [
|
|
3097
|
-
{ legacy_jobs: false }
|
|
3098
|
-
]);
|
|
3099
|
-
connection.ws.next(initMessage);
|
|
3100
|
-
return connection.ws.messages().pipe(
|
|
3101
|
-
rxjs.filter((msg) => msg.id === initMessage.id),
|
|
3102
|
-
rxjs.take(1),
|
|
3103
|
-
rxjs.map(() => connection)
|
|
3104
|
-
);
|
|
3105
|
-
}),
|
|
3106
|
-
// in the event of an error, do two things:
|
|
3107
|
-
// 1. emit an errored connection downstream to inform consumers that
|
|
3108
|
-
// the connection is dead.
|
|
3109
|
-
// 2. re-throw an error so the downstream `retry` will re-subscribe.
|
|
3110
|
-
rxjs.catchError((err) => {
|
|
3111
|
-
this.logger.error("All connections failed - retrying", { message: err?.message, hostname: err?.hostname });
|
|
3112
|
-
return rxjs.concat(
|
|
3113
|
-
rxjs.of(
|
|
3114
|
-
makeConnectionError(
|
|
3115
|
-
err.message,
|
|
3116
|
-
err.hostname,
|
|
3117
|
-
err.closeCode,
|
|
3118
|
-
err.closeReason
|
|
3119
|
-
)
|
|
3120
|
-
),
|
|
3121
|
-
// since this error will immediately get caught by `retry` there's no reason to build a real error.
|
|
3122
|
-
rxjs.throwError(() => null)
|
|
3123
|
-
);
|
|
3124
|
-
}),
|
|
3125
|
-
rxjs.retry(),
|
|
3126
|
-
// start with a closed connection.
|
|
3127
|
-
rxjs.startWith(closedConnection),
|
|
3128
|
-
// prevent multiple subscriptions from re-evaluating the entire pipeline.
|
|
3129
|
-
rxjs.shareReplay({ bufferSize: 1, refCount: false }),
|
|
3130
|
-
rxjs.takeUntil(this.closeConnection)
|
|
3131
|
-
);
|
|
3132
|
-
/**
|
|
3133
|
-
* observable which is either an instance of the current `TrueNasSocket` used for the connection
|
|
3134
|
-
* or `null` if the connection is closed or errored for any reason.
|
|
3135
|
-
*/
|
|
3136
|
-
this.ws$ = this.connection$.pipe(
|
|
3137
|
-
rxjs.map((conn) => conn.state === "active" ? conn.ws : null)
|
|
3138
|
-
);
|
|
3139
|
-
/**
|
|
3140
|
-
* current hostname we used to build the URL for this connection.
|
|
3141
|
-
*/
|
|
3142
|
-
this.hostname$ = this.connection$.pipe(
|
|
3143
|
-
rxjs.map((conn) => conn.state === "active" ? conn.hostname : null)
|
|
3144
|
-
);
|
|
3145
|
-
/**
|
|
3146
|
-
* emits error messages from the connection pipeline. this is used to derive the
|
|
3147
|
-
* corresponding compatibility property.
|
|
3148
|
-
*/
|
|
3149
|
-
this.lastErrorMessage$ = this.connection$.pipe(
|
|
3150
|
-
rxjs.map((conn) => conn.state === "error" ? conn.message : null)
|
|
3151
|
-
);
|
|
3152
|
-
/**
|
|
3153
|
-
* emits when the connection state *changes*, so it'll never emit `true` twice
|
|
3154
|
-
* in a row nor `false` twice in a row.
|
|
3155
|
-
*/
|
|
3156
|
-
this.opened$ = this.connection$.pipe(
|
|
3157
|
-
rxjs.map((conn) => conn.state),
|
|
3158
|
-
rxjs.distinctUntilChanged(),
|
|
3159
|
-
rxjs.map((state) => state === "active")
|
|
3160
|
-
);
|
|
3161
|
-
/**
|
|
3162
|
-
* emits when the connection state goes from open to closed.
|
|
3163
|
-
*/
|
|
3164
|
-
this.closed$ = this.connection$.pipe(
|
|
3165
|
-
rxjs.map((conn) => conn.state),
|
|
3166
|
-
rxjs.distinctUntilChanged(),
|
|
3167
|
-
rxjs.filter((state) => state === "closed" || state === "error"),
|
|
3168
|
-
rxjs.map(() => {
|
|
3169
|
-
})
|
|
3170
|
-
);
|
|
3171
|
-
/**
|
|
3172
|
-
* whether to display a connection error to the user — the **live** signal.
|
|
3173
|
-
*
|
|
3174
|
-
* `true` only while `connection$` is currently a `ConnectionError`, meaning the entire race +
|
|
3175
|
-
* retry cycle has been exhausted for all hostnames right now; it flips back to `false` once a
|
|
3176
|
-
* connection is re-established. individual socket losses during a race are expected and not surfaced.
|
|
3177
|
-
*
|
|
3178
|
-
* NOTE: this is NOT the same as the `hasExhaustedRetries()` method, which is a **cumulative**
|
|
3179
|
-
* snapshot (see there). The two can disagree — prefer this observable for "is the connection
|
|
3180
|
-
* errored right now?".
|
|
3181
|
-
*/
|
|
3182
|
-
this.hasConnectionError$ = this.connection$.pipe(
|
|
3183
|
-
rxjs.map((conn) => conn.state === "error"),
|
|
3184
|
-
rxjs.takeUntil(this.closeConnection)
|
|
3185
|
-
);
|
|
3186
|
-
/**
|
|
3187
|
-
* observable which always emits messages from the current socket.
|
|
3188
|
-
*/
|
|
3189
|
-
this.messages$ = this.ws$.pipe(
|
|
3190
|
-
rxjs.filter((ws) => ws !== null),
|
|
3191
|
-
rxjs.switchMap((ws) => ws.messages().pipe(
|
|
3192
|
-
rxjs.catchError(() => rxjs.EMPTY)
|
|
3193
|
-
))
|
|
3194
|
-
);
|
|
3195
|
-
rxjs.combineLatest([
|
|
3196
|
-
rxjs.interval(twentySeconds),
|
|
3197
|
-
this.ws$
|
|
3198
|
-
]).pipe(
|
|
3199
|
-
rxjs.takeUntil(this.closeConnection)
|
|
3200
|
-
).subscribe(([, ws]) => {
|
|
3201
|
-
if (ws) {
|
|
3202
|
-
const pingMessage = createJsonRpcMessage("core.ping");
|
|
3203
|
-
ws.next(pingMessage);
|
|
3204
|
-
}
|
|
3205
|
-
});
|
|
3206
|
-
this.opened$.subscribe((val) => this.opened.next(val));
|
|
3207
|
-
this.closed$.subscribe(() => this.closed.next());
|
|
3208
|
-
this.hostname$.pipe(rxjs.filter(Boolean)).subscribe((name) => this.hostname.next(name));
|
|
3209
|
-
this.ws$.pipe(rxjs.filter(Boolean)).subscribe((ws) => this.ws = ws);
|
|
3210
|
-
this.lastErrorMessage$.subscribe((msg) => this.lastErrorMessage.next(msg));
|
|
3211
|
-
this.enabled$.next(initialEnabled);
|
|
3212
|
-
}
|
|
3213
|
-
/**
|
|
3214
|
-
* whether the connection has exhausted its retries — the **cumulative** snapshot, read
|
|
3215
|
-
* synchronously. (Formerly `hasConnectionError()`; renamed to disambiguate it from the
|
|
3216
|
-
* live `hasConnectionError$` observable, with which it can disagree.)
|
|
3217
|
-
*
|
|
3218
|
-
* `true` when the lifetime `connectionAttempts` count exceeds `hostnames.length * maxRetry`,
|
|
3219
|
-
* OR when an error message is currently set. Ported from the source (tncui) behavior.
|
|
3220
|
-
*/
|
|
3221
|
-
hasExhaustedRetries() {
|
|
3222
|
-
const attemptsExhausted = this.connectionAttempts.value > this.hostnames.length * this.maxRetry;
|
|
3223
|
-
const hasErrorMessage = this.lastErrorMessage.value !== null;
|
|
3224
|
-
return attemptsExhausted || hasErrorMessage;
|
|
3225
|
-
}
|
|
3226
|
-
/**
|
|
3227
|
-
* enables or disables the connection gate. the app calls this when its `SystemState`
|
|
3228
|
-
* changes (mapping `SystemState.Active -> true`, everything else -> `false`).
|
|
3229
|
-
*
|
|
3230
|
-
* This is also how a caller asks for another attempt after the appliance has
|
|
3231
|
-
* refused the client — nothing reconnects on its own from there. The gate is
|
|
3232
|
-
* `distinctUntilChanged`, so re-asserting `true` while it is already `true`
|
|
3233
|
-
* does nothing: the round trip through `false` is what asks again.
|
|
3234
|
-
*/
|
|
3235
|
-
setEnabled(enabled) {
|
|
3236
|
-
this.enabled$.next(enabled);
|
|
3237
|
-
}
|
|
3238
|
-
/**
|
|
3239
|
-
* compatibility method which just returns the public `messages$` observable.
|
|
3240
|
-
* this is used in a few places in the codebase that relied upon the old implementation.
|
|
3241
|
-
*/
|
|
3242
|
-
messages() {
|
|
3243
|
-
return this.messages$;
|
|
3244
|
-
}
|
|
3245
|
-
/**
|
|
3246
|
-
* sends a message over the current websocket OR queues it to send once
|
|
3247
|
-
* the next websocket is opened. messages sent via `send` will not be lost until after
|
|
3248
|
-
* the next `closed$` emission.
|
|
3249
|
-
*/
|
|
3250
|
-
send(message) {
|
|
3251
|
-
return this.ws$.pipe(
|
|
3252
|
-
rxjs.filter((ws) => ws !== null),
|
|
3253
|
-
rxjs.take(1)
|
|
3254
|
-
).subscribe((ws) => ws.next(message));
|
|
3255
|
-
}
|
|
3256
|
-
/**
|
|
3257
|
-
* manually closes this connection and prevents it from retrying/opening any more.
|
|
3258
|
-
*/
|
|
3259
|
-
close() {
|
|
3260
|
-
this.closeConnection.next();
|
|
3261
|
-
this.closeConnection.complete();
|
|
3262
|
-
}
|
|
3263
|
-
/**
|
|
3264
|
-
* helper method which creates an `Observable` which emits an `ActiveConnection`
|
|
3265
|
-
* after it establishes a connection to the given hostname. the observable will emit an
|
|
3266
|
-
* error if the connection is never established and will not complete until unsubscribed from or closed.
|
|
3267
|
-
*/
|
|
3268
|
-
createSocket(hostname) {
|
|
3269
|
-
const url = `${socketScheme(this.protocol)}//${hostname}${this.websocketPath}`;
|
|
3270
|
-
let hasOpened = false;
|
|
3271
|
-
return new rxjs.Observable((subscriber) => {
|
|
3272
|
-
const ws = new TrueNasSocket({
|
|
3273
|
-
url,
|
|
3274
|
-
openObserver: {
|
|
3275
|
-
next: () => {
|
|
3276
|
-
hasOpened = true;
|
|
3277
|
-
this.connectionAttempts.next(0);
|
|
3278
|
-
subscriber.next({ ws, hostname });
|
|
3279
|
-
}
|
|
3280
|
-
},
|
|
3281
|
-
closeObserver: {
|
|
3282
|
-
next: (event) => {
|
|
3283
|
-
const reason = event.reason || "";
|
|
3284
|
-
let errorMessage;
|
|
3285
|
-
if (isHttpStatusError(reason)) {
|
|
3286
|
-
errorMessage = getHttpError(reason);
|
|
3287
|
-
} else {
|
|
3288
|
-
errorMessage = getWebSocketError(event.code);
|
|
3289
|
-
}
|
|
3290
|
-
this.connectionAttempts.next(this.connectionAttempts.value + 1);
|
|
3291
|
-
subscriber.error(
|
|
3292
|
-
makeConnectionError(errorMessage, hostname, event.code, reason)
|
|
3293
|
-
);
|
|
3294
|
-
}
|
|
3295
|
-
}
|
|
3296
|
-
});
|
|
3297
|
-
const startupSub = ws.socket.subscribe({
|
|
3298
|
-
error: () => {
|
|
3299
|
-
}
|
|
3300
|
-
});
|
|
3301
|
-
return () => {
|
|
3302
|
-
startupSub.unsubscribe();
|
|
3303
|
-
ws.complete();
|
|
3304
|
-
};
|
|
3305
|
-
}).pipe(
|
|
3306
|
-
// retry logic:
|
|
3307
|
-
// * if a connection is not established in 10 seconds, consider that an error
|
|
3308
|
-
rxjs.timeout({ first: tenSeconds }),
|
|
3309
|
-
rxjs.retry({
|
|
3310
|
-
// * while still *establishing*: wait `retryDelay` before trying again, giving up
|
|
3311
|
-
// after `maxRetry` retries.
|
|
3312
|
-
count: this.maxRetry,
|
|
3313
|
-
// * we use a custom `delay` function here to ensure no retries are performed
|
|
3314
|
-
// once a socket is *opened*.
|
|
3315
|
-
// basically: a later death must propagate out rather than being retried
|
|
3316
|
-
// so it can be handled by the `connection$` observable.
|
|
3317
|
-
delay: (error) => {
|
|
3318
|
-
if (hasOpened) {
|
|
3319
|
-
return rxjs.throwError(() => error);
|
|
3320
|
-
}
|
|
3321
|
-
return rxjs.timer(this.retryDelay);
|
|
3322
|
-
}
|
|
3323
|
-
})
|
|
3324
|
-
);
|
|
3325
|
-
}
|
|
3326
|
-
/**
|
|
3327
|
-
* helper function which actually performs the parallel connection `race`.
|
|
3328
|
-
*/
|
|
3329
|
-
connect() {
|
|
3330
|
-
return rxjs.race(
|
|
3331
|
-
this.hostnames.map(this.createSocket.bind(this))
|
|
3332
|
-
).pipe(
|
|
3333
|
-
rxjs.tap((conn) => this.logger.debug(`TrueNas socket opened to ${conn.hostname}.`)),
|
|
3334
|
-
rxjs.takeUntil(this.closeConnection)
|
|
3335
|
-
);
|
|
3336
|
-
}
|
|
3337
|
-
};
|
|
3338
|
-
var makeActiveConnection = (ws, hostname) => ({
|
|
3339
|
-
ws,
|
|
3340
|
-
hostname,
|
|
3341
|
-
state: "active"
|
|
43
|
+
Object.defineProperty(exports, "TrueNasApiClientV2510", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunk6PF34AWT_cjs.TrueNasApiClientV2510; }
|
|
3342
46
|
});
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
47
|
+
Object.defineProperty(exports, "TrueNasApiClientV26", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return chunk6PF34AWT_cjs.TrueNasApiClientV26; }
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(exports, "TrueNasApiClientV27", {
|
|
52
|
+
enumerable: true,
|
|
53
|
+
get: function () { return chunk6PF34AWT_cjs.TrueNasApiClientV27; }
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "TrueNasAuthMechanism", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return chunk6PF34AWT_cjs.TrueNasAuthMechanism; }
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "UserRole", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () { return chunk6PF34AWT_cjs.UserRole; }
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(exports, "VersionCompatibility", {
|
|
64
|
+
enumerable: true,
|
|
65
|
+
get: function () { return chunk6PF34AWT_cjs.VersionCompatibility; }
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "VersionDiscovery", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () { return chunk6PF34AWT_cjs.VersionDiscovery; }
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(exports, "VersionDiscoveryError", {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () { return chunk6PF34AWT_cjs.VersionDiscoveryError; }
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(exports, "VersionDiscoveryNetworkError", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () { return chunk6PF34AWT_cjs.VersionDiscoveryNetworkError; }
|
|
78
|
+
});
|
|
79
|
+
Object.defineProperty(exports, "VersionDiscoveryTimeoutError", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
get: function () { return chunk6PF34AWT_cjs.VersionDiscoveryTimeoutError; }
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(exports, "VersionEndpointNotFoundError", {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: function () { return chunk6PF34AWT_cjs.VersionEndpointNotFoundError; }
|
|
86
|
+
});
|
|
87
|
+
Object.defineProperty(exports, "VersionTooNewError", {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () { return chunk6PF34AWT_cjs.VersionTooNewError; }
|
|
90
|
+
});
|
|
91
|
+
Object.defineProperty(exports, "VersionTooOldError", {
|
|
92
|
+
enumerable: true,
|
|
93
|
+
get: function () { return chunk6PF34AWT_cjs.VersionTooOldError; }
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(exports, "consoleLogger", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () { return chunk6PF34AWT_cjs.consoleLogger; }
|
|
98
|
+
});
|
|
99
|
+
Object.defineProperty(exports, "createTrueNasClient", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function () { return chunk6PF34AWT_cjs.createTrueNasClient; }
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(exports, "getApiErrorMessage", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () { return chunk6PF34AWT_cjs.getApiErrorMessage; }
|
|
106
|
+
});
|
|
107
|
+
Object.defineProperty(exports, "isJobFinished", {
|
|
108
|
+
enumerable: true,
|
|
109
|
+
get: function () { return chunk6PF34AWT_cjs.isJobFinished; }
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, "noopLogger", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function () { return chunk6PF34AWT_cjs.noopLogger; }
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(exports, "v25_10_0", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function () { return chunk6PF34AWT_cjs.v25_10_0_exports; }
|
|
118
|
+
});
|
|
119
|
+
Object.defineProperty(exports, "v25_10_1", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
get: function () { return chunk6PF34AWT_cjs.v25_10_1_exports; }
|
|
122
|
+
});
|
|
123
|
+
Object.defineProperty(exports, "v25_10_2", {
|
|
124
|
+
enumerable: true,
|
|
125
|
+
get: function () { return chunk6PF34AWT_cjs.v25_10_2_exports; }
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, "v25_10_3", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () { return chunk6PF34AWT_cjs.v25_10_3_exports; }
|
|
130
|
+
});
|
|
131
|
+
Object.defineProperty(exports, "v25_10_4", {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function () { return chunk6PF34AWT_cjs.v25_10_4_exports; }
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(exports, "v25_10_5", {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function () { return chunk6PF34AWT_cjs.v25_10_5_exports; }
|
|
138
|
+
});
|
|
139
|
+
Object.defineProperty(exports, "v26_0_0", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () { return chunk6PF34AWT_cjs.v26_0_0_exports; }
|
|
142
|
+
});
|
|
143
|
+
Object.defineProperty(exports, "v27_0_0", {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: function () { return chunk6PF34AWT_cjs.v27_0_0_exports; }
|
|
3350
146
|
});
|
|
3351
|
-
var isTerminalClose = (err) => err?.closeCode === policyViolationCloseCode;
|
|
3352
|
-
var closedConnection = { state: "closed" };
|
|
3353
|
-
|
|
3354
|
-
// src/client/truenas-api-client.ts
|
|
3355
|
-
var TrueNasApiClient = class {
|
|
3356
|
-
constructor(uuid, hostnames, version, enabled, systemName, logger = noopLogger, protocol = "https:") {
|
|
3357
|
-
this.uuid = uuid;
|
|
3358
|
-
this.hostnames = hostnames;
|
|
3359
|
-
this.version = version;
|
|
3360
|
-
this.enabled = enabled;
|
|
3361
|
-
this.systemName = systemName;
|
|
3362
|
-
this.logger = logger;
|
|
3363
|
-
this.protocol = protocol;
|
|
3364
|
-
this.connection = this.createConnection();
|
|
3365
|
-
this.authenticator = this.createAuthenticator();
|
|
3366
|
-
this.api = this.createApi();
|
|
3367
|
-
this.ops = this.createOperations();
|
|
3368
|
-
}
|
|
3369
|
-
/**
|
|
3370
|
-
* Get current connection status.
|
|
3371
|
-
* @returns true if WebSocket is connected
|
|
3372
|
-
*/
|
|
3373
|
-
get connected() {
|
|
3374
|
-
return this.connection.opened.getValue();
|
|
3375
|
-
}
|
|
3376
|
-
/**
|
|
3377
|
-
* Get current authentication status.
|
|
3378
|
-
* @returns true if authenticated with the system
|
|
3379
|
-
*/
|
|
3380
|
-
get authenticated() {
|
|
3381
|
-
return this.authenticator.authenticated$.getValue();
|
|
3382
|
-
}
|
|
3383
|
-
/**
|
|
3384
|
-
* Close the WebSocket connection.
|
|
3385
|
-
* Connection will automatically retry if retry is enabled.
|
|
3386
|
-
*/
|
|
3387
|
-
close() {
|
|
3388
|
-
this.connection.close();
|
|
3389
|
-
}
|
|
3390
|
-
/**
|
|
3391
|
-
* Factory method to create the WebSocket connection.
|
|
3392
|
-
* Override in subclasses to provide version-specific connection handling.
|
|
3393
|
-
*/
|
|
3394
|
-
createConnection() {
|
|
3395
|
-
const websocketPath = getWebSocketPath(this.version);
|
|
3396
|
-
return new TrueNasConnection(
|
|
3397
|
-
this.enabled,
|
|
3398
|
-
this.hostnames,
|
|
3399
|
-
this.uuid,
|
|
3400
|
-
websocketPath,
|
|
3401
|
-
this.systemName,
|
|
3402
|
-
void 0,
|
|
3403
|
-
// retryDelay (use default)
|
|
3404
|
-
void 0,
|
|
3405
|
-
// maxRetry (use default)
|
|
3406
|
-
this.logger,
|
|
3407
|
-
this.protocol
|
|
3408
|
-
);
|
|
3409
|
-
}
|
|
3410
|
-
/**
|
|
3411
|
-
* Factory method to create the API handler.
|
|
3412
|
-
* Override in subclasses to provide version-specific API implementations.
|
|
3413
|
-
*/
|
|
3414
|
-
createApi() {
|
|
3415
|
-
return new TrueNasApi(this.authenticator.authenticated$, this.connection);
|
|
3416
|
-
}
|
|
3417
|
-
/**
|
|
3418
|
-
* Factory method to create the authenticator.
|
|
3419
|
-
* Override in subclasses to provide version-specific authentication.
|
|
3420
|
-
*/
|
|
3421
|
-
createAuthenticator() {
|
|
3422
|
-
return new TrueNasAuthenticator(this.connection, this.version);
|
|
3423
|
-
}
|
|
3424
|
-
};
|
|
3425
|
-
|
|
3426
|
-
// src/types/app-query.type.ts
|
|
3427
|
-
var AppState = /* @__PURE__ */ ((AppState2) => {
|
|
3428
|
-
AppState2["Running"] = "RUNNING";
|
|
3429
|
-
AppState2["Stopped"] = "STOPPED";
|
|
3430
|
-
AppState2["Stopping"] = "STOPPING";
|
|
3431
|
-
AppState2["Deploying"] = "DEPLOYING";
|
|
3432
|
-
AppState2["Suspended"] = "SUSPENDED";
|
|
3433
|
-
AppState2["Suspending"] = "SUSPENDING";
|
|
3434
|
-
AppState2["Error"] = "ERROR";
|
|
3435
|
-
AppState2["Unknown"] = "UNKNOWN";
|
|
3436
|
-
return AppState2;
|
|
3437
|
-
})(AppState || {});
|
|
3438
|
-
|
|
3439
|
-
// src/utils/app-state.utils.ts
|
|
3440
|
-
function toAppState(state) {
|
|
3441
|
-
switch (state.toUpperCase()) {
|
|
3442
|
-
case "RUNNING":
|
|
3443
|
-
return "RUNNING" /* Running */;
|
|
3444
|
-
case "STOPPED":
|
|
3445
|
-
return "STOPPED" /* Stopped */;
|
|
3446
|
-
// `ABORTING` is v25.10 only: the instance is being forced down, which ends
|
|
3447
|
-
// at `STOPPED` and is what `Stopping` already means.
|
|
3448
|
-
case "STOPPING":
|
|
3449
|
-
case "ABORTING":
|
|
3450
|
-
return "STOPPING" /* Stopping */;
|
|
3451
|
-
// `STARTING` is v25.10 `virt.instance` only, and folding it into `Stopped`
|
|
3452
|
-
// told callers a container that is coming up is at rest — enough for a UI
|
|
3453
|
-
// to offer a Start button for it, or for a poll loop to give up. `Deploying`
|
|
3454
|
-
// is the only in-progress state `AppState` has.
|
|
3455
|
-
case "STARTING":
|
|
3456
|
-
case "DEPLOYING":
|
|
3457
|
-
return "DEPLOYING" /* Deploying */;
|
|
3458
|
-
// v25.10's freezer states are the same idea as v26's `SUSPENDED`: the
|
|
3459
|
-
// processes are paused, not exited. `FROZEN` is that pause completed, so it
|
|
3460
|
-
// and `SUSPENDED` are the same answer.
|
|
3461
|
-
case "SUSPENDED":
|
|
3462
|
-
case "FROZEN":
|
|
3463
|
-
return "SUSPENDED" /* Suspended */;
|
|
3464
|
-
// `FREEZING` is on the way there and not there yet. It used to answer
|
|
3465
|
-
// `Suspended`, defended by analogy with `STARTING` — but `STARTING` maps to
|
|
3466
|
-
// `Deploying`, which is itself an in-progress word, so the analogy ran the
|
|
3467
|
-
// wrong way. Answering `Suspended` tells a caller polling for "the memory
|
|
3468
|
-
// is quiesced" that it is, one poll before it is true: the same false
|
|
3469
|
-
// claim this mapping was rewritten to stop making, one state along.
|
|
3470
|
-
// `ABORTING` had `Stopping` to land on; the freeze path needed its own.
|
|
3471
|
-
case "FREEZING":
|
|
3472
|
-
return "SUSPENDING" /* Suspending */;
|
|
3473
|
-
// `THAWED` is the freezer lifted: the processes are scheduled again, so
|
|
3474
|
-
// this is `RUNNING` reported through the transition rather than a state a
|
|
3475
|
-
// caller should act on differently.
|
|
3476
|
-
case "THAWED":
|
|
3477
|
-
return "RUNNING" /* Running */;
|
|
3478
|
-
case "ERROR":
|
|
3479
|
-
return "ERROR" /* Error */;
|
|
3480
|
-
// `UNKNOWN` is middleware's own word for it, and anything unrecognised is
|
|
3481
|
-
// the same situation: a state this mapping has no word for. Neither is
|
|
3482
|
-
// evidence the container is stopped.
|
|
3483
|
-
case "UNKNOWN":
|
|
3484
|
-
return "UNKNOWN" /* Unknown */;
|
|
3485
|
-
default:
|
|
3486
|
-
return "UNKNOWN" /* Unknown */;
|
|
3487
|
-
}
|
|
3488
|
-
}
|
|
3489
|
-
|
|
3490
|
-
// src/utils/smb-status.utils.ts
|
|
3491
|
-
function toSmbStatusParams(request = {}) {
|
|
3492
|
-
return [
|
|
3493
|
-
request.infoLevel ?? "ALL",
|
|
3494
|
-
request.filters ?? [],
|
|
3495
|
-
request.options ?? {},
|
|
3496
|
-
request.statusOptions ?? {}
|
|
3497
|
-
];
|
|
3498
|
-
}
|
|
3499
|
-
|
|
3500
|
-
// src/client/truenas-api-client-v25-10.ts
|
|
3501
|
-
var TrueNasApiClientV2510 = class extends TrueNasApiClient {
|
|
3502
|
-
/**
|
|
3503
|
-
* Create v25.10-specific operation mappings
|
|
3504
|
-
*
|
|
3505
|
-
* virt.instance.* APIs return boolean (true) but emit job events via websocket.
|
|
3506
|
-
* We use callAndGetJobId to capture the job ID, then track the job.
|
|
3507
|
-
* All operations emit Job updates until the operation completes.
|
|
3508
|
-
*/
|
|
3509
|
-
createOperations() {
|
|
3510
|
-
return {
|
|
3511
|
-
// A polymorphic `.query`, so it goes through the verb rather than
|
|
3512
|
-
// `call`: the directory types the raw method's response as the five-way
|
|
3513
|
-
// union the server may return, and the verb is what fixes it to a list.
|
|
3514
|
-
containerQuery: () => this.api.query("virt.instance.query", [["type", "=", "CONTAINER"]]).pipe(rxjs.map((instances) => instances.map(toContainer))),
|
|
3515
|
-
containerStart: (id) => this.api.job("virt.instance.start", [id]),
|
|
3516
|
-
containerStop: (id, options) => this.api.job("virt.instance.stop", [id, options]),
|
|
3517
|
-
containerRestart: (id, options) => this.api.job("virt.instance.restart", [id, options]),
|
|
3518
|
-
// Already a job here — `virt.instance.delete` has been one since
|
|
3519
|
-
// v25.10.0 — so this needs no synthesis, only the id. It takes nothing
|
|
3520
|
-
// else: there is no `force` and no `recursive` on this version.
|
|
3521
|
-
//
|
|
3522
|
-
// Unsupported options are reported rather than dropped. `recursive`
|
|
3523
|
-
// destroys child datasets, snapshots and clones irrecoverably, so a
|
|
3524
|
-
// caller who asked for it and silently did not get it has been told
|
|
3525
|
-
// something false about what just happened to their data. Reporting is
|
|
3526
|
-
// all this layer can do — refusing outright would make `ops.containerDelete`
|
|
3527
|
-
// unusable on v25.10 for the ordinary case, which is the case that works.
|
|
3528
|
-
containerDelete: (id, options) => {
|
|
3529
|
-
const unsupported = ["force", "recursive"].filter(
|
|
3530
|
-
(key) => options?.[key]
|
|
3531
|
-
);
|
|
3532
|
-
if (unsupported.length > 0) {
|
|
3533
|
-
this.logger.warn(
|
|
3534
|
-
"containerDelete: v25.10 has no counterpart for these options and will delete without them",
|
|
3535
|
-
{ ignored: unsupported, id, method: "virt.instance.delete" }
|
|
3536
|
-
);
|
|
3537
|
-
}
|
|
3538
|
-
return this.api.job("virt.instance.delete", [id]);
|
|
3539
|
-
},
|
|
3540
|
-
// The private leg. See `PrivateSmbStatusCall` for why this is a cast and
|
|
3541
|
-
// not a directory lookup.
|
|
3542
|
-
//
|
|
3543
|
-
// v25.10 answers rather than refusing, for a caller with the authority.
|
|
3544
|
-
// Being private does not stop the method running: `ws_handler/rpc.py`
|
|
3545
|
-
// logs a warning for a private call over websocket and dispatches it
|
|
3546
|
-
// anyway — the `# FIXME: Eventually, prohibit this` above that branch is
|
|
3547
|
-
// still unresolved on master.
|
|
3548
|
-
//
|
|
3549
|
-
// It does decide who may run it. `smb.status` carries no `roles=` here,
|
|
3550
|
-
// and middleware role-registers a method only `if roles:`, so it is in no
|
|
3551
|
-
// role's allowlist and only the non-STIG full-admin wildcard reaches it.
|
|
3552
|
-
// That is documented on `OperationMappings.smbStatus`; this leg does not
|
|
3553
|
-
// pre-empt it. A caller without the authority gets middleware's `EACCES`,
|
|
3554
|
-
// which is the honest answer and the server's to give.
|
|
3555
|
-
//
|
|
3556
|
-
// The server-side warning is per dispatch, and a client count is exactly
|
|
3557
|
-
// the sort of thing a caller polls. Reported at debug rather than warn,
|
|
3558
|
-
// because nothing here is degraded or unhonoured — the request is served
|
|
3559
|
-
// in full — and left to the caller to weigh.
|
|
3560
|
-
//
|
|
3561
|
-
// Future tense, and for the same reason as `containerDelete` above: this
|
|
3562
|
-
// runs when the operation is built, and `api.call` is cold, so no request
|
|
3563
|
-
// has gone out yet and may never. One built observable subscribed twice
|
|
3564
|
-
// dispatches twice; this line is what will happen, not a record that it
|
|
3565
|
-
// did.
|
|
3566
|
-
smbStatus: (request) => {
|
|
3567
|
-
this.logger.debug(
|
|
3568
|
-
"smbStatus: smb.status is private on v25.10; each dispatch will log a warning server-side and needs a non-STIG full-admin session",
|
|
3569
|
-
{ method: "smb.status", infoLevel: request?.infoLevel ?? "ALL" }
|
|
3570
|
-
);
|
|
3571
|
-
return this.api.call(
|
|
3572
|
-
"smb.status",
|
|
3573
|
-
toSmbStatusParams(request)
|
|
3574
|
-
);
|
|
3575
|
-
}
|
|
3576
|
-
};
|
|
3577
|
-
}
|
|
3578
|
-
};
|
|
3579
|
-
function toContainer(instance) {
|
|
3580
|
-
return {
|
|
3581
|
-
id: instance.id,
|
|
3582
|
-
name: instance.name,
|
|
3583
|
-
status: toAppState(instance.status),
|
|
3584
|
-
autostart: instance.autostart,
|
|
3585
|
-
cpu: instance.cpu ?? void 0,
|
|
3586
|
-
memory: instance.memory ?? void 0,
|
|
3587
|
-
// The whole image object, not just its description: `Container.image`
|
|
3588
|
-
// declares only `description`, but the API returns `architecture`, `os`,
|
|
3589
|
-
// `release` and more, and callers were already receiving them. Narrowing
|
|
3590
|
-
// to the declared field would take data away to match a type that was
|
|
3591
|
-
// always an under-declaration — the same call as the v26 `description`
|
|
3592
|
-
// widening, decided the same way.
|
|
3593
|
-
image: instance.image.description === null ? void 0 : { ...instance.image, description: instance.image.description }
|
|
3594
|
-
};
|
|
3595
|
-
}
|
|
3596
|
-
var TrueNasApiClientV26 = class extends TrueNasApiClient {
|
|
3597
|
-
/**
|
|
3598
|
-
* Create v26-specific operation mappings
|
|
3599
|
-
*
|
|
3600
|
-
* Operations return Observable<Job | null>:
|
|
3601
|
-
* - Async operations emit Job updates until complete
|
|
3602
|
-
* - Sync operations emit null once
|
|
3603
|
-
*/
|
|
3604
|
-
createOperations() {
|
|
3605
|
-
return {
|
|
3606
|
-
// A polymorphic `.query`, so it goes through the verb rather than
|
|
3607
|
-
// `call`: the directory types the raw method's response as the five-way
|
|
3608
|
-
// union the server may return, and the verb is what fixes it to a list.
|
|
3609
|
-
containerQuery: () => this.api.query("container.query").pipe(
|
|
3610
|
-
rxjs.map((containers) => containers.map(toContainer2))
|
|
3611
|
-
),
|
|
3612
|
-
// container.start is synchronous in v26.0.0 - emit null
|
|
3613
|
-
containerStart: (id) => this.api.call("container.start", [parseInt(id, 10)]).pipe(rxjs.map(() => null)),
|
|
3614
|
-
// container.stop emits job updates
|
|
3615
|
-
containerStop: (id, options) => this.api.job("container.stop", [
|
|
3616
|
-
parseInt(id, 10),
|
|
3617
|
-
{
|
|
3618
|
-
force: options.force,
|
|
3619
|
-
force_after_timeout: options.force
|
|
3620
|
-
}
|
|
3621
|
-
]),
|
|
3622
|
-
// v26.0.0 doesn't have container.restart - chain stop + start
|
|
3623
|
-
// Emits Job updates during stop, then null when start completes
|
|
3624
|
-
containerRestart: (id, options) => {
|
|
3625
|
-
const numericId = parseInt(id, 10);
|
|
3626
|
-
return this.api.job("container.stop", [
|
|
3627
|
-
numericId,
|
|
3628
|
-
{
|
|
3629
|
-
force: options.force,
|
|
3630
|
-
force_after_timeout: options.force
|
|
3631
|
-
}
|
|
3632
|
-
]).pipe(
|
|
3633
|
-
// Collect all job updates to ensure stop fully completes
|
|
3634
|
-
rxjs.toArray(),
|
|
3635
|
-
// Re-emit job updates, then call start after stop is done
|
|
3636
|
-
rxjs.switchMap(
|
|
3637
|
-
(jobUpdates) => rxjs.concat(
|
|
3638
|
-
rxjs.from(jobUpdates),
|
|
3639
|
-
this.api.call("container.start", [numericId]).pipe(rxjs.map(() => null))
|
|
3640
|
-
)
|
|
3641
|
-
)
|
|
3642
|
-
);
|
|
3643
|
-
},
|
|
3644
|
-
// A job since v26.0.0 — middleware made deletion long-running (it stops
|
|
3645
|
-
// the container when asked, tears down the libvirt domain and destroys
|
|
3646
|
-
// the dataset), and the generated directory moved it out of `call`
|
|
3647
|
-
// accordingly. `api.job` is what tracks it; `api.call` would not compile.
|
|
3648
|
-
//
|
|
3649
|
-
// Options pass straight through when given: the unified
|
|
3650
|
-
// `ContainerDeleteOptions` is `force`/`recursive`, exactly what the
|
|
3651
|
-
// generated params take.
|
|
3652
|
-
//
|
|
3653
|
-
// When they are not given the argument is *omitted* rather than passed as
|
|
3654
|
-
// `undefined`. `JSON.stringify` renders a trailing `undefined` array
|
|
3655
|
-
// element as `null`, and middleware declares `options: ContainerDeleteOptions`
|
|
3656
|
-
// with a model default and no `| None` — so `[id, null]` is a validation
|
|
3657
|
-
// error rather than "use the defaults", which is the one thing a caller
|
|
3658
|
-
// passing nothing is asking for.
|
|
3659
|
-
containerDelete: (id, options) => this.api.job(
|
|
3660
|
-
"container.delete",
|
|
3661
|
-
options ? [parseInt(id, 10), options] : [parseInt(id, 10)]
|
|
3662
|
-
),
|
|
3663
|
-
// `smb.status` is public here and gated on `SHARING_SMB_READ`, so it is
|
|
3664
|
-
// an ordinary `call` read straight out of the generated directory — the
|
|
3665
|
-
// one leg of this operation that needs no assertion about the server.
|
|
3666
|
-
//
|
|
3667
|
-
// Not a query verb: middleware returns the same `list | dict | int`
|
|
3668
|
-
// polymorphism a `.query` does, but the generator did not mark the entry
|
|
3669
|
-
// with an `entity`, so `api.query` does not accept it and the union is
|
|
3670
|
-
// handed to the caller to narrow.
|
|
3671
|
-
smbStatus: (request) => this.api.call("smb.status", toSmbStatusParams(request))
|
|
3672
|
-
};
|
|
3673
|
-
}
|
|
3674
|
-
};
|
|
3675
|
-
function toContainer2(container) {
|
|
3676
|
-
const { description } = container;
|
|
3677
|
-
return {
|
|
3678
|
-
id: container.id.toString(),
|
|
3679
|
-
name: container.name,
|
|
3680
|
-
status: toAppState(container.status.state),
|
|
3681
|
-
// Optional in the generated entry, required by `Container`.
|
|
3682
|
-
autostart: container.autostart ?? false,
|
|
3683
|
-
description
|
|
3684
|
-
};
|
|
3685
|
-
}
|
|
3686
|
-
var TrueNasApiClientV27 = class extends TrueNasApiClient {
|
|
3687
|
-
/**
|
|
3688
|
-
* Create v27-specific operation mappings
|
|
3689
|
-
*
|
|
3690
|
-
* Operations return Observable<Job | null>:
|
|
3691
|
-
* - Async operations emit Job updates until complete
|
|
3692
|
-
* - Sync operations emit null once
|
|
3693
|
-
*/
|
|
3694
|
-
createOperations() {
|
|
3695
|
-
return {
|
|
3696
|
-
// A polymorphic `.query`, so it goes through the verb rather than
|
|
3697
|
-
// `call`: the directory types the raw method's response as the five-way
|
|
3698
|
-
// union the server may return, and the verb is what fixes it to a list.
|
|
3699
|
-
containerQuery: () => this.api.query("container.query").pipe(
|
|
3700
|
-
rxjs.map((containers) => containers.map(toContainer3))
|
|
3701
|
-
),
|
|
3702
|
-
// container.start is synchronous in v27 - emit null
|
|
3703
|
-
containerStart: (id) => this.api.call("container.start", [parseInt(id, 10)]).pipe(rxjs.map(() => null)),
|
|
3704
|
-
// container.stop emits job updates
|
|
3705
|
-
containerStop: (id, options) => this.api.job("container.stop", [
|
|
3706
|
-
parseInt(id, 10),
|
|
3707
|
-
{
|
|
3708
|
-
force: options.force,
|
|
3709
|
-
force_after_timeout: options.force
|
|
3710
|
-
}
|
|
3711
|
-
]),
|
|
3712
|
-
// v27 still has no container.restart - chain stop + start.
|
|
3713
|
-
// Emits Job updates during stop, then null when start completes.
|
|
3714
|
-
containerRestart: (id, options) => {
|
|
3715
|
-
const numericId = parseInt(id, 10);
|
|
3716
|
-
return this.api.job("container.stop", [
|
|
3717
|
-
numericId,
|
|
3718
|
-
{
|
|
3719
|
-
force: options.force,
|
|
3720
|
-
force_after_timeout: options.force
|
|
3721
|
-
}
|
|
3722
|
-
]).pipe(
|
|
3723
|
-
// Collect all job updates to ensure stop fully completes
|
|
3724
|
-
rxjs.toArray(),
|
|
3725
|
-
// Re-emit job updates, then call start after stop is done
|
|
3726
|
-
rxjs.switchMap(
|
|
3727
|
-
(jobUpdates) => rxjs.concat(
|
|
3728
|
-
rxjs.from(jobUpdates),
|
|
3729
|
-
this.api.call("container.start", [numericId]).pipe(rxjs.map(() => null))
|
|
3730
|
-
)
|
|
3731
|
-
)
|
|
3732
|
-
);
|
|
3733
|
-
},
|
|
3734
|
-
// A job since v26.0.0 — middleware made deletion long-running (it stops
|
|
3735
|
-
// the container when asked, tears down the libvirt domain and destroys
|
|
3736
|
-
// the dataset), and the generated directory moved it out of `call`
|
|
3737
|
-
// accordingly. `api.job` is what tracks it; `api.call` would not compile.
|
|
3738
|
-
//
|
|
3739
|
-
// Options pass straight through when given: the unified
|
|
3740
|
-
// `ContainerDeleteOptions` is `force`/`recursive`, exactly what the
|
|
3741
|
-
// generated params take.
|
|
3742
|
-
//
|
|
3743
|
-
// When they are not given the argument is *omitted* rather than passed as
|
|
3744
|
-
// `undefined`. `JSON.stringify` renders a trailing `undefined` array
|
|
3745
|
-
// element as `null`, and middleware declares `options: ContainerDeleteOptions`
|
|
3746
|
-
// with a model default and no `| None` — so `[id, null]` is a validation
|
|
3747
|
-
// error rather than "use the defaults", which is the one thing a caller
|
|
3748
|
-
// passing nothing is asking for.
|
|
3749
|
-
containerDelete: (id, options) => this.api.job(
|
|
3750
|
-
"container.delete",
|
|
3751
|
-
options ? [parseInt(id, 10), options] : [parseInt(id, 10)]
|
|
3752
|
-
),
|
|
3753
|
-
// `smb.status` is public here and gated on `SHARING_SMB_READ`, so it is
|
|
3754
|
-
// an ordinary `call` read straight out of the generated directory — the
|
|
3755
|
-
// one leg of this operation that needs no assertion about the server.
|
|
3756
|
-
//
|
|
3757
|
-
// Not a query verb: middleware returns the same `list | dict | int`
|
|
3758
|
-
// polymorphism a `.query` does, but the generator did not mark the entry
|
|
3759
|
-
// with an `entity`, so `api.query` does not accept it and the union is
|
|
3760
|
-
// handed to the caller to narrow.
|
|
3761
|
-
smbStatus: (request) => this.api.call("smb.status", toSmbStatusParams(request))
|
|
3762
|
-
};
|
|
3763
|
-
}
|
|
3764
|
-
};
|
|
3765
|
-
function toContainer3(container) {
|
|
3766
|
-
const { description } = container;
|
|
3767
|
-
return {
|
|
3768
|
-
id: container.id.toString(),
|
|
3769
|
-
name: container.name,
|
|
3770
|
-
status: toAppState(container.status.state),
|
|
3771
|
-
// Optional in the generated entry, required by `Container`.
|
|
3772
|
-
autostart: container.autostart ?? false,
|
|
3773
|
-
description
|
|
3774
|
-
};
|
|
3775
|
-
}
|
|
3776
|
-
|
|
3777
|
-
// src/errors/version-discovery.errors.ts
|
|
3778
|
-
var VersionDiscoveryError = class extends Error {
|
|
3779
|
-
constructor(message, hostname) {
|
|
3780
|
-
super(message);
|
|
3781
|
-
this.hostname = hostname;
|
|
3782
|
-
this.name = this.constructor.name;
|
|
3783
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
3784
|
-
}
|
|
3785
|
-
};
|
|
3786
|
-
var VersionTooOldError = class extends VersionDiscoveryError {
|
|
3787
|
-
constructor(hostname, availableVersions, minRequired = apiVersionConfig.MIN_SUPPORTED_VERSION) {
|
|
3788
|
-
super(
|
|
3789
|
-
`System API version is too old. Minimum supported: ${minRequired}. Available versions: ${availableVersions.join(
|
|
3790
|
-
", "
|
|
3791
|
-
)}`,
|
|
3792
|
-
hostname
|
|
3793
|
-
);
|
|
3794
|
-
this.availableVersions = availableVersions;
|
|
3795
|
-
this.minRequired = minRequired;
|
|
3796
|
-
}
|
|
3797
|
-
};
|
|
3798
|
-
var VersionTooNewError = class extends VersionDiscoveryError {
|
|
3799
|
-
constructor(hostname, availableVersions, maxSupported = apiVersionConfig.MAX_SUPPORTED_VERSION) {
|
|
3800
|
-
super(
|
|
3801
|
-
`System API version is too new. Maximum supported: ${maxSupported}. Available versions: ${availableVersions.join(
|
|
3802
|
-
", "
|
|
3803
|
-
)}`,
|
|
3804
|
-
hostname
|
|
3805
|
-
);
|
|
3806
|
-
this.availableVersions = availableVersions;
|
|
3807
|
-
this.maxSupported = maxSupported;
|
|
3808
|
-
}
|
|
3809
|
-
};
|
|
3810
|
-
var VersionEndpointNotFoundError = class extends VersionDiscoveryError {
|
|
3811
|
-
constructor(hostname, statusCode = 404) {
|
|
3812
|
-
super(
|
|
3813
|
-
`Version discovery endpoint not found: ${hostname} (HTTP ${String(
|
|
3814
|
-
statusCode
|
|
3815
|
-
)})`,
|
|
3816
|
-
hostname
|
|
3817
|
-
);
|
|
3818
|
-
this.statusCode = statusCode;
|
|
3819
|
-
}
|
|
3820
|
-
};
|
|
3821
|
-
var VersionDiscoveryTimeoutError = class extends VersionDiscoveryError {
|
|
3822
|
-
constructor(hostname, timeoutMs = 5e3) {
|
|
3823
|
-
super(
|
|
3824
|
-
`Cannot connect to system (timeout after ${String(
|
|
3825
|
-
timeoutMs
|
|
3826
|
-
)}ms): ${hostname}`,
|
|
3827
|
-
hostname
|
|
3828
|
-
);
|
|
3829
|
-
this.timeoutMs = timeoutMs;
|
|
3830
|
-
}
|
|
3831
|
-
};
|
|
3832
|
-
var VersionDiscoveryNetworkError = class extends VersionDiscoveryError {
|
|
3833
|
-
constructor(hostname, originalError) {
|
|
3834
|
-
super(
|
|
3835
|
-
`Network error connecting to ${hostname}: ${originalError.message}`,
|
|
3836
|
-
hostname
|
|
3837
|
-
);
|
|
3838
|
-
this.originalError = originalError;
|
|
3839
|
-
}
|
|
3840
|
-
};
|
|
3841
|
-
var NoCompatibleVersionsError = class extends VersionDiscoveryError {
|
|
3842
|
-
constructor(hostname, availableVersions, supportedRange = {
|
|
3843
|
-
min: apiVersionConfig.MIN_SUPPORTED_VERSION,
|
|
3844
|
-
max: apiVersionConfig.MAX_SUPPORTED_VERSION
|
|
3845
|
-
}) {
|
|
3846
|
-
super(
|
|
3847
|
-
`No compatible API versions available. Supported: ${supportedRange.min} to ${supportedRange.max}. Available: ${availableVersions.join(", ")}`,
|
|
3848
|
-
hostname
|
|
3849
|
-
);
|
|
3850
|
-
this.availableVersions = availableVersions;
|
|
3851
|
-
this.supportedRange = supportedRange;
|
|
3852
|
-
}
|
|
3853
|
-
};
|
|
3854
|
-
var InvalidVersionResponseError = class extends VersionDiscoveryError {
|
|
3855
|
-
constructor(hostname, reason) {
|
|
3856
|
-
super(`Invalid API response format from ${hostname}: ${reason}`, hostname);
|
|
3857
|
-
this.reason = reason;
|
|
3858
|
-
}
|
|
3859
|
-
};
|
|
3860
|
-
var discoveryTimeoutMs = 5e3;
|
|
3861
|
-
var probeTimeoutMs = 5e3;
|
|
3862
|
-
function corsIsEnforced() {
|
|
3863
|
-
const hasDocument = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
3864
|
-
const inWorker = typeof globalThis.WorkerGlobalScope !== "undefined";
|
|
3865
|
-
return hasDocument || inWorker;
|
|
3866
|
-
}
|
|
3867
|
-
function hasErrorName(error, expected) {
|
|
3868
|
-
return typeof error === "object" && error !== null && "name" in error && error.name === expected;
|
|
3869
|
-
}
|
|
3870
|
-
var VersionDiscovery = class {
|
|
3871
|
-
constructor(logger = noopLogger, protocol = "https:") {
|
|
3872
|
-
this.logger = logger;
|
|
3873
|
-
this.protocol = protocol;
|
|
3874
|
-
this.versionCache = /* @__PURE__ */ new Map();
|
|
3875
|
-
}
|
|
3876
|
-
versionsUrl(hostname) {
|
|
3877
|
-
return `${httpScheme(this.protocol)}//${hostname}/api/versions`;
|
|
3878
|
-
}
|
|
3879
|
-
/**
|
|
3880
|
-
* Whether the appliance answers at all, asked in a way CORS cannot block.
|
|
3881
|
-
*
|
|
3882
|
-
* A `no-cors` request yields a response the page may not read, but its
|
|
3883
|
-
* *arrival* is the whole answer here: something served it. That separates the
|
|
3884
|
-
* two failures `fetch` reports identically — a box that refused to share its
|
|
3885
|
-
* versions with this origin, and a box that is not there.
|
|
3886
|
-
*
|
|
3887
|
-
* `cannot-ask` where CORS is not enforced: nothing is blocking anything, so a
|
|
3888
|
-
* failed fetch already means unreachable and a probe would only repeat what
|
|
3889
|
-
* discovery just found. It is not a quieter way of saying "no".
|
|
3890
|
-
*/
|
|
3891
|
-
async probeReachable(hostname) {
|
|
3892
|
-
if (!corsIsEnforced()) return "cannot-ask";
|
|
3893
|
-
const url = this.versionsUrl(hostname);
|
|
3894
|
-
const controller = new AbortController();
|
|
3895
|
-
const timer2 = setTimeout(() => controller.abort(), probeTimeoutMs);
|
|
3896
|
-
try {
|
|
3897
|
-
await fetch(url, {
|
|
3898
|
-
mode: "no-cors",
|
|
3899
|
-
cache: "no-store",
|
|
3900
|
-
signal: controller.signal
|
|
3901
|
-
});
|
|
3902
|
-
this.logger.info("Reachability probe answered", { hostname, url });
|
|
3903
|
-
return "reachable";
|
|
3904
|
-
} catch (error) {
|
|
3905
|
-
this.logger.warn("Reachability probe got no answer", {
|
|
3906
|
-
hostname,
|
|
3907
|
-
url,
|
|
3908
|
-
error
|
|
3909
|
-
});
|
|
3910
|
-
return "silent";
|
|
3911
|
-
} finally {
|
|
3912
|
-
clearTimeout(timer2);
|
|
3913
|
-
}
|
|
3914
|
-
}
|
|
3915
|
-
/**
|
|
3916
|
-
* Discovers the API version for a given hostname.
|
|
3917
|
-
*
|
|
3918
|
-
* Makes a GET request to `{protocol}//{hostname}/api/versions` and returns the latest
|
|
3919
|
-
* compatible version. Results are cached per hostname; the cache entry is removed
|
|
3920
|
-
* on failure so the next call retries.
|
|
3921
|
-
*
|
|
3922
|
-
* @param hostname - The TrueNAS system hostname (e.g., "truenas.local")
|
|
3923
|
-
* @returns Observable that emits the selected ApiVersion
|
|
3924
|
-
* @throws VersionDiscoveryError subclasses for specific failure scenarios
|
|
3925
|
-
*/
|
|
3926
|
-
discoverVersion(hostname) {
|
|
3927
|
-
const cached = this.versionCache.get(hostname);
|
|
3928
|
-
if (cached) {
|
|
3929
|
-
this.logger.info("Version discovery cache hit", { hostname });
|
|
3930
|
-
return cached;
|
|
3931
|
-
}
|
|
3932
|
-
this.logger.info("Starting version discovery", {
|
|
3933
|
-
hostname,
|
|
3934
|
-
url: this.versionsUrl(hostname)
|
|
3935
|
-
});
|
|
3936
|
-
const discovery$ = rxjs.defer(() => rxjs.from(this.fetchVersions(hostname))).pipe(
|
|
3937
|
-
operators.map((versionStrings) => this.selectVersion(hostname, versionStrings)),
|
|
3938
|
-
operators.catchError((error) => {
|
|
3939
|
-
this.versionCache.delete(hostname);
|
|
3940
|
-
this.logger.warn("Version discovery failed", { hostname, error });
|
|
3941
|
-
return rxjs.throwError(() => this.classify(error, hostname));
|
|
3942
|
-
}),
|
|
3943
|
-
operators.shareReplay(1)
|
|
3944
|
-
);
|
|
3945
|
-
this.versionCache.set(hostname, discovery$);
|
|
3946
|
-
return discovery$;
|
|
3947
|
-
}
|
|
3948
|
-
/**
|
|
3949
|
-
* Clears the version cache for a specific hostname or all hostnames.
|
|
3950
|
-
*
|
|
3951
|
-
* @param hostname - Optional hostname to clear. If omitted, clears all cached versions.
|
|
3952
|
-
*/
|
|
3953
|
-
clearCache(hostname) {
|
|
3954
|
-
if (hostname) {
|
|
3955
|
-
this.versionCache.delete(hostname);
|
|
3956
|
-
} else {
|
|
3957
|
-
this.versionCache.clear();
|
|
3958
|
-
}
|
|
3959
|
-
}
|
|
3960
|
-
/**
|
|
3961
|
-
* Performs the `fetch` with a 5-second `AbortController` timeout and inspects the
|
|
3962
|
-
* *resolved* Response (fetch does not reject on non-2xx). Throws
|
|
3963
|
-
* `VersionEndpointNotFoundError` on 404 and `InvalidVersionResponseError` on any
|
|
3964
|
-
* other non-2xx or a body that is not an array of strings; lets `TypeError`
|
|
3965
|
-
* (network) and `AbortError` (timeout) bubble to `classify`.
|
|
3966
|
-
*
|
|
3967
|
-
* The element-type check matters: a reachable server returning an array of
|
|
3968
|
-
* non-strings (e.g. `[1, 2, 3]`) would otherwise reach `parseApiVersion`, whose
|
|
3969
|
-
* `.match()` throws a `TypeError` on a non-string — which `classify` would then
|
|
3970
|
-
* misfile as a network error. Validating here keeps it an `InvalidVersionResponseError`.
|
|
3971
|
-
*/
|
|
3972
|
-
async fetchVersions(hostname) {
|
|
3973
|
-
const url = this.versionsUrl(hostname);
|
|
3974
|
-
const controller = new AbortController();
|
|
3975
|
-
const timer2 = setTimeout(() => controller.abort(), discoveryTimeoutMs);
|
|
3976
|
-
try {
|
|
3977
|
-
const response = await fetch(url, { signal: controller.signal });
|
|
3978
|
-
if (response.status === 404) {
|
|
3979
|
-
throw new VersionEndpointNotFoundError(hostname);
|
|
3980
|
-
}
|
|
3981
|
-
if (!response.ok) {
|
|
3982
|
-
throw new InvalidVersionResponseError(
|
|
3983
|
-
hostname,
|
|
3984
|
-
`HTTP ${String(response.status)}`
|
|
3985
|
-
);
|
|
3986
|
-
}
|
|
3987
|
-
const body = await response.json();
|
|
3988
|
-
if (!Array.isArray(body) || !body.every((v) => typeof v === "string")) {
|
|
3989
|
-
throw new InvalidVersionResponseError(
|
|
3990
|
-
hostname,
|
|
3991
|
-
"Response was not an array of version strings"
|
|
3992
|
-
);
|
|
3993
|
-
}
|
|
3994
|
-
return body;
|
|
3995
|
-
} finally {
|
|
3996
|
-
clearTimeout(timer2);
|
|
3997
|
-
}
|
|
3998
|
-
}
|
|
3999
|
-
/**
|
|
4000
|
-
* Parses, filters, and selects the latest compatible version from the raw response
|
|
4001
|
-
* array. Throws the appropriate typed error when no valid/compatible version exists.
|
|
4002
|
-
*/
|
|
4003
|
-
selectVersion(hostname, versionStrings) {
|
|
4004
|
-
this.logger.info("Version discovery response received", {
|
|
4005
|
-
hostname,
|
|
4006
|
-
versionCount: versionStrings.length,
|
|
4007
|
-
versions: versionStrings
|
|
4008
|
-
});
|
|
4009
|
-
const parsedVersions = versionStrings.map(parseApiVersion).filter((v) => v !== null);
|
|
4010
|
-
if (parsedVersions.length === 0) {
|
|
4011
|
-
this.logger.warn("No valid versions in response", {
|
|
4012
|
-
hostname,
|
|
4013
|
-
versionStrings
|
|
4014
|
-
});
|
|
4015
|
-
throw new InvalidVersionResponseError(
|
|
4016
|
-
hostname,
|
|
4017
|
-
"No valid API versions found in response"
|
|
4018
|
-
);
|
|
4019
|
-
}
|
|
4020
|
-
const compatibleVersions = filterCompatibleVersions(parsedVersions);
|
|
4021
|
-
this.logger.info("Version compatibility check", {
|
|
4022
|
-
hostname,
|
|
4023
|
-
total: parsedVersions.length,
|
|
4024
|
-
compatible: compatibleVersions.length,
|
|
4025
|
-
supportedRange: {
|
|
4026
|
-
min: apiVersionConfig.MIN_SUPPORTED_VERSION,
|
|
4027
|
-
max: apiVersionConfig.MAX_SUPPORTED_VERSION
|
|
4028
|
-
}
|
|
4029
|
-
});
|
|
4030
|
-
if (compatibleVersions.length === 0) {
|
|
4031
|
-
const allTooOld = parsedVersions.every(
|
|
4032
|
-
(v) => checkVersionCompatibility(v) === "too-old" /* TooOld */
|
|
4033
|
-
);
|
|
4034
|
-
const allTooNew = parsedVersions.every(
|
|
4035
|
-
(v) => checkVersionCompatibility(v) === "too-new" /* TooNew */
|
|
4036
|
-
);
|
|
4037
|
-
const availableVersions = parsedVersions.map((v) => v.version);
|
|
4038
|
-
if (allTooOld) {
|
|
4039
|
-
this.logger.warn("All available versions too old", {
|
|
4040
|
-
hostname,
|
|
4041
|
-
availableVersions
|
|
4042
|
-
});
|
|
4043
|
-
throw new VersionTooOldError(hostname, availableVersions);
|
|
4044
|
-
} else if (allTooNew) {
|
|
4045
|
-
this.logger.warn("All available versions too new", {
|
|
4046
|
-
hostname,
|
|
4047
|
-
availableVersions
|
|
4048
|
-
});
|
|
4049
|
-
throw new VersionTooNewError(hostname, availableVersions);
|
|
4050
|
-
} else {
|
|
4051
|
-
this.logger.warn("No compatible versions found", {
|
|
4052
|
-
hostname,
|
|
4053
|
-
availableVersions
|
|
4054
|
-
});
|
|
4055
|
-
throw new NoCompatibleVersionsError(hostname, availableVersions);
|
|
4056
|
-
}
|
|
4057
|
-
}
|
|
4058
|
-
const sortedVersions = compatibleVersions.sort(
|
|
4059
|
-
(a, b) => compareVersions(b, a)
|
|
4060
|
-
);
|
|
4061
|
-
const selectedVersion = sortedVersions[0];
|
|
4062
|
-
this.logger.info("Version selected", {
|
|
4063
|
-
hostname,
|
|
4064
|
-
selected: selectedVersion.version,
|
|
4065
|
-
websocketPath: selectedVersion.websocketPath
|
|
4066
|
-
});
|
|
4067
|
-
return selectedVersion;
|
|
4068
|
-
}
|
|
4069
|
-
/**
|
|
4070
|
-
* Maps a raw failure to a typed {@link VersionDiscoveryError}. Errors thrown by
|
|
4071
|
-
* `fetchVersions`/`selectVersion` are already typed and pass through unchanged; a
|
|
4072
|
-
* `fetch` `TypeError` becomes {@link VersionDiscoveryNetworkError} (the CORS/network
|
|
4073
|
-
* sentinel), an `AbortError` becomes {@link VersionDiscoveryTimeoutError}, and any
|
|
4074
|
-
* other failure (e.g. an unparseable body's `SyntaxError`) becomes
|
|
4075
|
-
* {@link InvalidVersionResponseError}.
|
|
4076
|
-
*/
|
|
4077
|
-
classify(error, hostname) {
|
|
4078
|
-
if (error instanceof VersionDiscoveryError) {
|
|
4079
|
-
return error;
|
|
4080
|
-
}
|
|
4081
|
-
if (hasErrorName(error, "AbortError")) {
|
|
4082
|
-
this.logger.warn("Version discovery timeout", { hostname });
|
|
4083
|
-
return new VersionDiscoveryTimeoutError(hostname);
|
|
4084
|
-
}
|
|
4085
|
-
if (error instanceof TypeError) {
|
|
4086
|
-
this.logger.warn("Version discovery network error", {
|
|
4087
|
-
hostname,
|
|
4088
|
-
message: error.message
|
|
4089
|
-
});
|
|
4090
|
-
return new VersionDiscoveryNetworkError(hostname, error);
|
|
4091
|
-
}
|
|
4092
|
-
const reason = error instanceof Error ? error.message : "Unknown error";
|
|
4093
|
-
this.logger.warn("Version discovery failed with unknown error", {
|
|
4094
|
-
hostname,
|
|
4095
|
-
reason
|
|
4096
|
-
});
|
|
4097
|
-
return new InvalidVersionResponseError(
|
|
4098
|
-
hostname,
|
|
4099
|
-
`Versioned API not available. This system may be running an older TrueNAS version (requires v25.10.0+). ${reason}`
|
|
4100
|
-
);
|
|
4101
|
-
}
|
|
4102
|
-
};
|
|
4103
|
-
|
|
4104
|
-
// src/factory.ts
|
|
4105
|
-
async function createTrueNasClient(opts) {
|
|
4106
|
-
const { uuid, hostnames, systemName } = opts;
|
|
4107
|
-
const logger = opts.logger ?? noopLogger;
|
|
4108
|
-
if (!hostnames || hostnames.length === 0) {
|
|
4109
|
-
throw new Error(
|
|
4110
|
-
`Cannot create client for system ${uuid}: hostnames array is empty`
|
|
4111
|
-
);
|
|
4112
|
-
}
|
|
4113
|
-
logger.info("Creating versioned API client", {
|
|
4114
|
-
uuid: uuid.slice(0, 8),
|
|
4115
|
-
hostnames: hostnames.join(", "),
|
|
4116
|
-
systemName
|
|
4117
|
-
});
|
|
4118
|
-
if (opts.version !== void 0) {
|
|
4119
|
-
if (!SUPPORTED_API_VERSIONS.includes(opts.version)) {
|
|
4120
|
-
throw new Error(
|
|
4121
|
-
`Cannot create client for system ${uuid}: '${opts.version}' is not a version this package ships types for. Supported: ${SUPPORTED_API_VERSIONS.join(", ")}.`
|
|
4122
|
-
);
|
|
4123
|
-
}
|
|
4124
|
-
const known = parseApiVersion(opts.version);
|
|
4125
|
-
if (!known) {
|
|
4126
|
-
throw new Error(
|
|
4127
|
-
`Cannot create client for system ${uuid}: supported version '${opts.version}' failed to parse.`
|
|
4128
|
-
);
|
|
4129
|
-
}
|
|
4130
|
-
const compatibility = checkVersionCompatibility(known);
|
|
4131
|
-
if (compatibility === "too-new" /* TooNew */) {
|
|
4132
|
-
throw new VersionTooNewError(hostnames[0], [known.version]);
|
|
4133
|
-
}
|
|
4134
|
-
if (compatibility !== "compatible" /* Compatible */) {
|
|
4135
|
-
throw new Error(
|
|
4136
|
-
`Cannot create client for system ${uuid}: the supported version range is not usable (${apiVersionConfig.MIN_SUPPORTED_VERSION}..${apiVersionConfig.MAX_SUPPORTED_VERSION}).`
|
|
4137
|
-
);
|
|
4138
|
-
}
|
|
4139
|
-
logger.info("API version supplied by the caller, skipping discovery", {
|
|
4140
|
-
uuid: uuid.slice(0, 8),
|
|
4141
|
-
version: known.version,
|
|
4142
|
-
websocketPath: known.websocketPath
|
|
4143
|
-
});
|
|
4144
|
-
return instantiateClientForVersion(known, opts, logger);
|
|
4145
|
-
}
|
|
4146
|
-
const versionDiscovery = new VersionDiscovery(logger, opts.protocol);
|
|
4147
|
-
let version;
|
|
4148
|
-
try {
|
|
4149
|
-
const winner = await discoverVersionFromAnyHostname(
|
|
4150
|
-
hostnames,
|
|
4151
|
-
versionDiscovery
|
|
4152
|
-
);
|
|
4153
|
-
version = winner.version;
|
|
4154
|
-
logger.info("API version discovered, instantiating client", {
|
|
4155
|
-
uuid: uuid.slice(0, 8),
|
|
4156
|
-
// Which hostname answered is log context only. The client is built with
|
|
4157
|
-
// the full hostname list regardless — the websocket connection races all
|
|
4158
|
-
// of them anyway.
|
|
4159
|
-
hostname: winner.hostname,
|
|
4160
|
-
version: version.version,
|
|
4161
|
-
websocketPath: version.websocketPath
|
|
4162
|
-
});
|
|
4163
|
-
} catch (error) {
|
|
4164
|
-
const errorMessage = errorMessageOrDefault(error, "Unknown error");
|
|
4165
|
-
if (!(error instanceof VersionDiscoveryNetworkError)) {
|
|
4166
|
-
logger.error("Version discovery failed on every hostname", {
|
|
4167
|
-
uuid: uuid.slice(0, 8),
|
|
4168
|
-
hostnames: hostnames.join(", "),
|
|
4169
|
-
error: errorMessage,
|
|
4170
|
-
errorType: error instanceof Error ? error.constructor.name : typeof error
|
|
4171
|
-
});
|
|
4172
|
-
throw error;
|
|
4173
|
-
}
|
|
4174
|
-
const reachable = await probeAnyHostname(hostnames, versionDiscovery);
|
|
4175
|
-
if (reachable === "silent") {
|
|
4176
|
-
await sleep(unreachableRetryDelayMs);
|
|
4177
|
-
}
|
|
4178
|
-
try {
|
|
4179
|
-
const retryWinner = await discoverVersionFromAnyHostname(
|
|
4180
|
-
hostnames,
|
|
4181
|
-
versionDiscovery
|
|
4182
|
-
);
|
|
4183
|
-
logger.info("Version discovery succeeded on retry", {
|
|
4184
|
-
uuid: uuid.slice(0, 8),
|
|
4185
|
-
hostname: retryWinner.hostname,
|
|
4186
|
-
version: retryWinner.version.version,
|
|
4187
|
-
firstError: errorMessage
|
|
4188
|
-
});
|
|
4189
|
-
version = retryWinner.version;
|
|
4190
|
-
} catch (retryError) {
|
|
4191
|
-
if (!(retryError instanceof VersionDiscoveryNetworkError)) {
|
|
4192
|
-
throw retryError;
|
|
4193
|
-
}
|
|
4194
|
-
if (reachable !== "reachable") {
|
|
4195
|
-
logger.error(
|
|
4196
|
-
"Version discovery failed and the appliance did not answer a reachability probe; not assuming a version",
|
|
4197
|
-
{
|
|
4198
|
-
uuid: uuid.slice(0, 8),
|
|
4199
|
-
hostnames: hostnames.join(", "),
|
|
4200
|
-
probe: reachable === "silent" ? "no answer" : "not applicable",
|
|
4201
|
-
error: errorMessageOrDefault(retryError, "Unknown error")
|
|
4202
|
-
}
|
|
4203
|
-
);
|
|
4204
|
-
throw retryError;
|
|
4205
|
-
}
|
|
4206
|
-
const fallbackVersionString = apiVersionConfig.FALLBACK_VERSION;
|
|
4207
|
-
const fallbackVersion = parseApiVersion(fallbackVersionString);
|
|
4208
|
-
if (!fallbackVersion) {
|
|
4209
|
-
logger.error("Invalid fallback version configuration", {
|
|
4210
|
-
uuid: uuid.slice(0, 8),
|
|
4211
|
-
hostnames: hostnames.join(", "),
|
|
4212
|
-
fallbackVersion: fallbackVersionString
|
|
4213
|
-
});
|
|
4214
|
-
throw retryError;
|
|
4215
|
-
}
|
|
4216
|
-
logger.warn(
|
|
4217
|
-
"Appliance is reachable but version discovery is still blocked; falling back to assumed version",
|
|
4218
|
-
{
|
|
4219
|
-
uuid: uuid.slice(0, 8),
|
|
4220
|
-
hostnames: hostnames.join(", "),
|
|
4221
|
-
fallbackVersion: fallbackVersionString,
|
|
4222
|
-
originalError: errorMessage,
|
|
4223
|
-
warning: "The appliance answered a probe but not /api/versions, which is what v25.10.0 looks like from a browser. If it is newer than that, this client is now pinned to the wrong surface."
|
|
4224
|
-
}
|
|
4225
|
-
);
|
|
4226
|
-
version = fallbackVersion;
|
|
4227
|
-
}
|
|
4228
|
-
}
|
|
4229
|
-
return instantiateClientForVersion(version, opts, logger);
|
|
4230
|
-
}
|
|
4231
|
-
var unreachableRetryDelayMs = 2500;
|
|
4232
|
-
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
4233
|
-
async function probeAnyHostname(hostnames, versionDiscovery) {
|
|
4234
|
-
const probes = hostnames.map(
|
|
4235
|
-
(hostname) => versionDiscovery.probeReachable(hostname)
|
|
4236
|
-
);
|
|
4237
|
-
const remaining = new Set(probes);
|
|
4238
|
-
let sawSilence = false;
|
|
4239
|
-
while (remaining.size > 0) {
|
|
4240
|
-
const settled = await Promise.race(
|
|
4241
|
-
[...remaining].map((probe) => probe.then((result) => ({ probe, result })))
|
|
4242
|
-
);
|
|
4243
|
-
if (settled.result === "reachable") return "reachable";
|
|
4244
|
-
if (settled.result === "silent") sawSilence = true;
|
|
4245
|
-
remaining.delete(settled.probe);
|
|
4246
|
-
}
|
|
4247
|
-
return sawSilence ? "silent" : "cannot-ask";
|
|
4248
|
-
}
|
|
4249
|
-
async function discoverVersionFromAnyHostname(hostnames, versionDiscovery) {
|
|
4250
|
-
const attempts = hostnames.map(
|
|
4251
|
-
(hostname) => rxjs.firstValueFrom(versionDiscovery.discoverVersion(hostname)).then(
|
|
4252
|
-
(version) => ({ hostname, version })
|
|
4253
|
-
)
|
|
4254
|
-
);
|
|
4255
|
-
try {
|
|
4256
|
-
return await Promise.any(attempts);
|
|
4257
|
-
} catch (error) {
|
|
4258
|
-
const failures = error instanceof AggregateError ? error.errors : [error];
|
|
4259
|
-
throw selectRepresentativeFailure(failures);
|
|
4260
|
-
}
|
|
4261
|
-
}
|
|
4262
|
-
function selectRepresentativeFailure(failures) {
|
|
4263
|
-
const isVersionError = (error) => (
|
|
4264
|
-
// cases: valid response, but the given versions won't work for us
|
|
4265
|
-
error instanceof VersionTooOldError || error instanceof VersionTooNewError || error instanceof NoCompatibleVersionsError || error instanceof VersionEndpointNotFoundError
|
|
4266
|
-
);
|
|
4267
|
-
const isNetworkError = (error) => error instanceof VersionDiscoveryNetworkError;
|
|
4268
|
-
return failures.find(isVersionError) ?? failures.find(isNetworkError) ?? failures[0];
|
|
4269
|
-
}
|
|
4270
|
-
var CLIENT_BY_VERSION_KEY = {
|
|
4271
|
-
"25.10": TrueNasApiClientV2510,
|
|
4272
|
-
"26": TrueNasApiClientV26,
|
|
4273
|
-
"27": TrueNasApiClientV27
|
|
4274
|
-
};
|
|
4275
|
-
function clientVersionKey(version) {
|
|
4276
|
-
if (version.year <= legacyCutoffYear) {
|
|
4277
|
-
return `${version.year.toString()}.${version.minor.toString().padStart(2, "0")}`;
|
|
4278
|
-
}
|
|
4279
|
-
return version.year.toString();
|
|
4280
|
-
}
|
|
4281
|
-
function instantiateClientForVersion(version, opts, logger) {
|
|
4282
|
-
const { uuid, hostnames, enabled, systemName } = opts;
|
|
4283
|
-
const versionKey = clientVersionKey(version);
|
|
4284
|
-
const Client = CLIENT_BY_VERSION_KEY[versionKey];
|
|
4285
|
-
if (!Client) {
|
|
4286
|
-
logger.error("No client implementation for version", {
|
|
4287
|
-
uuid: uuid.slice(0, 8),
|
|
4288
|
-
version: version.version,
|
|
4289
|
-
versionKey
|
|
4290
|
-
});
|
|
4291
|
-
throw new Error(
|
|
4292
|
-
`No client implementation for API version ${version.version}. Version keys with a client: ${Object.keys(CLIENT_BY_VERSION_KEY).join(", ")}. Version key: ${versionKey}`
|
|
4293
|
-
);
|
|
4294
|
-
}
|
|
4295
|
-
logger.info(`Instantiating ${Client.name}`, {
|
|
4296
|
-
uuid: uuid.slice(0, 8),
|
|
4297
|
-
version: version.version,
|
|
4298
|
-
versionKey
|
|
4299
|
-
});
|
|
4300
|
-
return new Client(
|
|
4301
|
-
uuid,
|
|
4302
|
-
hostnames,
|
|
4303
|
-
version,
|
|
4304
|
-
enabled,
|
|
4305
|
-
systemName,
|
|
4306
|
-
logger,
|
|
4307
|
-
opts.protocol
|
|
4308
|
-
);
|
|
4309
|
-
}
|
|
4310
|
-
function errorMessageOrDefault(error, fallback) {
|
|
4311
|
-
if (error instanceof Error) {
|
|
4312
|
-
return error.message;
|
|
4313
|
-
}
|
|
4314
|
-
if (typeof error === "object" && error !== null && "message" in error && typeof error.message === "string") {
|
|
4315
|
-
return error.message;
|
|
4316
|
-
}
|
|
4317
|
-
return fallback;
|
|
4318
|
-
}
|
|
4319
|
-
|
|
4320
|
-
// src/enums/user-role.enum.ts
|
|
4321
|
-
var UserRole = /* @__PURE__ */ ((UserRole2) => {
|
|
4322
|
-
UserRole2["FullAdmin"] = "FULL_ADMIN";
|
|
4323
|
-
return UserRole2;
|
|
4324
|
-
})(UserRole || {});
|
|
4325
|
-
|
|
4326
|
-
exports.AppState = AppState;
|
|
4327
|
-
exports.AuthError = AuthError;
|
|
4328
|
-
exports.AuthErrorCode = AuthErrorCode;
|
|
4329
|
-
exports.InvalidVersionResponseError = InvalidVersionResponseError;
|
|
4330
|
-
exports.JobState = JobState;
|
|
4331
|
-
exports.NoCompatibleVersionsError = NoCompatibleVersionsError;
|
|
4332
|
-
exports.SUPPORTED_API_VERSIONS = SUPPORTED_API_VERSIONS;
|
|
4333
|
-
exports.TrueNasApiClient = TrueNasApiClient;
|
|
4334
|
-
exports.TrueNasApiClientV2510 = TrueNasApiClientV2510;
|
|
4335
|
-
exports.TrueNasApiClientV26 = TrueNasApiClientV26;
|
|
4336
|
-
exports.TrueNasApiClientV27 = TrueNasApiClientV27;
|
|
4337
|
-
exports.TrueNasAuthMechanism = TrueNasAuthMechanism;
|
|
4338
|
-
exports.UserRole = UserRole;
|
|
4339
|
-
exports.VersionCompatibility = VersionCompatibility;
|
|
4340
|
-
exports.VersionDiscovery = VersionDiscovery;
|
|
4341
|
-
exports.VersionDiscoveryError = VersionDiscoveryError;
|
|
4342
|
-
exports.VersionDiscoveryNetworkError = VersionDiscoveryNetworkError;
|
|
4343
|
-
exports.VersionDiscoveryTimeoutError = VersionDiscoveryTimeoutError;
|
|
4344
|
-
exports.VersionEndpointNotFoundError = VersionEndpointNotFoundError;
|
|
4345
|
-
exports.VersionTooNewError = VersionTooNewError;
|
|
4346
|
-
exports.VersionTooOldError = VersionTooOldError;
|
|
4347
|
-
exports.consoleLogger = consoleLogger;
|
|
4348
|
-
exports.createTrueNasClient = createTrueNasClient;
|
|
4349
|
-
exports.getApiErrorMessage = getApiErrorMessage;
|
|
4350
|
-
exports.isJobFinished = isJobFinished;
|
|
4351
|
-
exports.noopLogger = noopLogger;
|
|
4352
|
-
exports.v25_10_0 = v25_10_0_exports;
|
|
4353
|
-
exports.v25_10_1 = v25_10_1_exports;
|
|
4354
|
-
exports.v25_10_2 = v25_10_2_exports;
|
|
4355
|
-
exports.v25_10_3 = v25_10_3_exports;
|
|
4356
|
-
exports.v25_10_4 = v25_10_4_exports;
|
|
4357
|
-
exports.v25_10_5 = v25_10_5_exports;
|
|
4358
|
-
exports.v26_0_0 = v26_0_0_exports;
|
|
4359
|
-
exports.v27_0_0 = v27_0_0_exports;
|
|
4360
147
|
//# sourceMappingURL=index.cjs.map
|
|
4361
148
|
//# sourceMappingURL=index.cjs.map
|