@vates/types 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common.d.mts +40 -14
- package/dist/common.mjs +1 -0
- package/dist/lib/xen-orchestra-xapi.d.mts +50 -0
- package/dist/lib/xen-orchestra-xapi.mjs +1 -0
- package/dist/xen-api.d.mts +11 -6
- package/dist/xo.d.mts +124 -14
- package/package.json +5 -1
package/dist/common.d.mts
CHANGED
|
@@ -517,6 +517,12 @@ export declare const OPAQUE_REF: {
|
|
|
517
517
|
readonly EMPTY: "OpaqueRef:NULL";
|
|
518
518
|
};
|
|
519
519
|
export type OPAQUE_REF_NULL = (typeof OPAQUE_REF)['EMPTY'];
|
|
520
|
+
export declare const BACKUP_TYPE: {
|
|
521
|
+
readonly backup: "backup";
|
|
522
|
+
readonly metadata: "metadataBackup";
|
|
523
|
+
readonly mirror: "mirrorBackup";
|
|
524
|
+
};
|
|
525
|
+
export type BACKUP_TYPE = (typeof BACKUP_TYPE)[keyof typeof BACKUP_TYPE];
|
|
520
526
|
type XapiStatsResponse<T> = {
|
|
521
527
|
endTimestamp: number;
|
|
522
528
|
interval: number;
|
|
@@ -524,43 +530,63 @@ type XapiStatsResponse<T> = {
|
|
|
524
530
|
};
|
|
525
531
|
export type XapiStatsGranularity = 'seconds' | 'minutes' | 'hours' | 'days';
|
|
526
532
|
export type XapiHostStats = XapiStatsResponse<{
|
|
527
|
-
cpus
|
|
528
|
-
ioThroughput
|
|
533
|
+
cpus?: Record<string, number[]>;
|
|
534
|
+
ioThroughput?: {
|
|
529
535
|
r: Record<string, number[]>;
|
|
530
536
|
w: Record<string, number[]>;
|
|
531
537
|
};
|
|
532
|
-
iops
|
|
538
|
+
iops?: {
|
|
533
539
|
r: Record<string, number[]>;
|
|
534
540
|
w: Record<string, number[]>;
|
|
535
541
|
};
|
|
536
|
-
iowait
|
|
537
|
-
latency
|
|
542
|
+
iowait?: Record<string, number[]>;
|
|
543
|
+
latency?: {
|
|
538
544
|
r: Record<string, number[]>;
|
|
539
545
|
w: Record<string, number[]>;
|
|
540
546
|
};
|
|
541
|
-
load
|
|
542
|
-
memory
|
|
543
|
-
memoryFree
|
|
544
|
-
pifs
|
|
547
|
+
load?: number[];
|
|
548
|
+
memory?: number[];
|
|
549
|
+
memoryFree?: number[];
|
|
550
|
+
pifs?: {
|
|
545
551
|
rx: Record<string, number[]>;
|
|
546
552
|
tx: Record<string, number[]>;
|
|
547
553
|
};
|
|
548
554
|
}>;
|
|
549
555
|
export type XapiVmStats = XapiStatsResponse<{
|
|
550
|
-
cpus
|
|
551
|
-
|
|
556
|
+
cpus?: Record<string, number[]>;
|
|
557
|
+
cpuUsage?: number[];
|
|
558
|
+
runstateFullrun?: number[];
|
|
559
|
+
runstateFullContention?: number[];
|
|
560
|
+
runstatePartialRun?: number[];
|
|
561
|
+
runstatePartialContention?: number[];
|
|
562
|
+
runstateConcurrencyHazard?: number[];
|
|
563
|
+
runstateBlocked?: number[];
|
|
564
|
+
iops?: {
|
|
552
565
|
r: Record<string, number[]>;
|
|
553
566
|
w: Record<string, number[]>;
|
|
554
567
|
};
|
|
555
|
-
memory
|
|
568
|
+
memory?: number[];
|
|
556
569
|
memoryFree?: number[];
|
|
557
|
-
|
|
570
|
+
memoryTarget?: number[];
|
|
571
|
+
vifs?: {
|
|
572
|
+
rx: Record<string, number[]>;
|
|
573
|
+
tx: Record<string, number[]>;
|
|
574
|
+
};
|
|
575
|
+
vifErrors?: {
|
|
558
576
|
rx: Record<string, number[]>;
|
|
559
577
|
tx: Record<string, number[]>;
|
|
560
578
|
};
|
|
561
|
-
xvds
|
|
579
|
+
xvds?: {
|
|
580
|
+
w?: Record<string, number[]>;
|
|
581
|
+
r?: Record<string, number[]>;
|
|
582
|
+
total?: Record<string, number[]>;
|
|
583
|
+
};
|
|
584
|
+
vbdLatency?: {
|
|
562
585
|
w: Record<string, number[]>;
|
|
563
586
|
r: Record<string, number[]>;
|
|
564
587
|
};
|
|
588
|
+
vbdIowait?: Record<string, number[]>;
|
|
589
|
+
vbdInflight?: Record<string, number[]>;
|
|
590
|
+
vbdAvgquSz?: Record<string, number[]>;
|
|
565
591
|
}>;
|
|
566
592
|
export {};
|
package/dist/common.mjs
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { WrappedXenApiRecord, XenApiNetworkWrapped, XenApiRecord } from '../xen-api.mjs';
|
|
2
|
+
import type { XoHost, XoNetwork, XoPif } from '../xo.mjs';
|
|
3
|
+
type XcpPatches = {
|
|
4
|
+
changelog?: {
|
|
5
|
+
author: string;
|
|
6
|
+
date: number;
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
description: string;
|
|
10
|
+
license: string;
|
|
11
|
+
name: string;
|
|
12
|
+
release: string;
|
|
13
|
+
size: number;
|
|
14
|
+
url: string;
|
|
15
|
+
version: string;
|
|
16
|
+
};
|
|
17
|
+
type XsPatches = {
|
|
18
|
+
conflicts?: string[];
|
|
19
|
+
date: string;
|
|
20
|
+
description: string;
|
|
21
|
+
documentationUrl?: string;
|
|
22
|
+
guidances: string;
|
|
23
|
+
name: string;
|
|
24
|
+
id?: string;
|
|
25
|
+
paid?: boolean;
|
|
26
|
+
requirements?: string[];
|
|
27
|
+
upgrade?: boolean;
|
|
28
|
+
url?: string;
|
|
29
|
+
uuid?: string;
|
|
30
|
+
};
|
|
31
|
+
export interface Xapi {
|
|
32
|
+
call: <ReturnType>(...args: unknown[]) => Promise<ReturnType>;
|
|
33
|
+
callAsync: <ReturnType>(...args: unknown[]) => Promise<ReturnType>;
|
|
34
|
+
getField<T extends XenApiRecord, K extends keyof T>(type: Extract<WrappedXenApiRecord, T>['$type'], ref: T['$ref'], field: K): Promise<T[K]>;
|
|
35
|
+
createNetwork(params: {
|
|
36
|
+
name: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
mtu?: number;
|
|
39
|
+
} | {
|
|
40
|
+
name: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
pifId: XoPif['id'];
|
|
43
|
+
mtu?: number;
|
|
44
|
+
vlan: number;
|
|
45
|
+
}): Promise<XenApiNetworkWrapped>;
|
|
46
|
+
deleteNetwork(id: XoNetwork['id']): Promise<void>;
|
|
47
|
+
listMissingPatches(host: XoHost['id']): Promise<XcpPatches[] | XsPatches[]>;
|
|
48
|
+
pool_emergencyShutdown(): Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/xen-api.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AFTER_APPLY_GUIDANCE, ALLOCATION_ALGORITHM, BOND_MODE, Branded, CERTIFICATE_TYPE, CLS, CLUSTER_HOST_OPERATION, CLUSTER_OPERATION, CONSOLE_PROTOCOL, DOMAIN_TYPE, EVENT_OPERATION, HOST_ALLOWED_OPERATIONS, HOST_DISPLAY, HOST_NUMA_AFFINITY_POLICY, IP_CONFIGURATION_MODE, IPV6_CONFIGURATION_MODE, LATEST_SYNCED_UPDATES_APPLIED_STATE, NETWORK_DEFAULT_LOCKING_MODE, NETWORK_OPERATIONS, NETWORK_PURPOSE, ON_BOOT, ON_CRASH_BEHAVIOUR, ON_NORMAL_EXIT, ON_SOFTREBOOT_BEHAVIOR, OPAQUE_REF_NULL, PERSISTENCE_BACKEND, PGPU_DOM0_ACCESS, PIF_IGMP_STATUS, POOL_ALLOWED_OPERATIONS, PRIMARY_ADDRESS_TYPE, PVS_PROXY_STATUS, SDN_CONTROLLER_PROTOCOL, SR_HEALTH, SRIOV_CONFIGURATION_MODE, STORAGE_OPERATIONS, TASK_ALLOWED_OPERATIONS, TASK_STATUS_TYPE, TELEMETRY_FREQUENCY, TRISTATE_TYPE, TUNNEL_PROTOCOL, UPDATE_AFTER_APPLY_GUIDANCE, UPDATE_GUIDANCES, UPDATE_SYNC_FREQUENCY, VBD_MODE, VBD_OPERATIONS, VBD_TYPE, VDI_OPERATIONS, VDI_TYPE, VGPU_TYPE_IMPLEMENTATION, VIF_IPV4_CONFIGURATION_MODE, VIF_IPV6_CONFIGURATION_MODE, VIF_LOCKING_MODE, VIF_OPERATIONS, VM_APPLIANCE_OPERATION, VM_OPERATIONS, VM_POWER_STATE, VMPP_ARCHIVE_FREQUENCY, VMPP_ARCHIVE_TARGET_TYPE, VMPP_BACKUP_FREQUENCY, VMPP_BACKUP_TYPE, VMSS_FREQUENCY, VMSS_TYPE, VTPM_OPERATIONS, VUSB_OPERATIONS } from './common.mjs';
|
|
2
|
+
import type { Xapi } from './lib/xen-orchestra-xapi.mjs';
|
|
2
3
|
/**
|
|
3
4
|
* Add properties injected by `xen-api`.
|
|
4
5
|
* $ref property is also injected by XOLite, so she is not present here.
|
|
@@ -15,11 +16,7 @@ type WrapperXenApi<T, Type extends string, Fn = {
|
|
|
15
16
|
name_label?: string;
|
|
16
17
|
unplugVusbs?: boolean;
|
|
17
18
|
}): Promise<XenApiVm['$ref']>;
|
|
18
|
-
$xapi:
|
|
19
|
-
call: <ReturnType>(...args: unknown[]) => Promise<ReturnType>;
|
|
20
|
-
callAsync: <ReturnType>(...args: unknown[]) => Promise<ReturnType>;
|
|
21
|
-
getField<T extends XenApiRecord, K extends keyof T>(type: Type, ref: T['$ref'], field: K): Promise<T[K]>;
|
|
22
|
-
};
|
|
19
|
+
$xapi: Xapi;
|
|
23
20
|
};
|
|
24
21
|
export interface XenApiSession {
|
|
25
22
|
$ref: Branded<'session'>;
|
|
@@ -187,6 +184,8 @@ type XenApiVmCallMethods = {
|
|
|
187
184
|
(method: 'hard_shutdown'): Promise<void>;
|
|
188
185
|
(method: 'clean_reboot'): Promise<void>;
|
|
189
186
|
(method: 'hard_reboot'): Promise<void>;
|
|
187
|
+
(method: 'record_data_source', dataSource: string): Promise<void>;
|
|
188
|
+
(method: 'forget_data_source_archives', dataSource: string): Promise<void>;
|
|
190
189
|
};
|
|
191
190
|
export interface XenApiVm {
|
|
192
191
|
$ref: Branded<'VM'>;
|
|
@@ -542,6 +541,8 @@ export interface XenApiNetwork {
|
|
|
542
541
|
uuid: string;
|
|
543
542
|
VIFs: XenApiVif['$ref'][];
|
|
544
543
|
}
|
|
544
|
+
export interface XenApiNetworkWrapped extends WrapperXenApi<XenApiNetwork, 'network'> {
|
|
545
|
+
}
|
|
545
546
|
export interface XenApiVif {
|
|
546
547
|
$ref: Branded<'VIF'>;
|
|
547
548
|
allowed_operations: VIF_OPERATIONS[];
|
|
@@ -916,6 +917,7 @@ export interface XenApiPci {
|
|
|
916
917
|
uuid: string;
|
|
917
918
|
vendor_name: string;
|
|
918
919
|
}
|
|
920
|
+
export type XenApiPciWrapped = WrapperXenApi<XenApiPci, 'PCI'>;
|
|
919
921
|
export interface XenApiPgpu {
|
|
920
922
|
$ref: Branded<'PGPU'>;
|
|
921
923
|
compatibility_metadata?: Record<string, string>;
|
|
@@ -931,6 +933,7 @@ export interface XenApiPgpu {
|
|
|
931
933
|
supported_VGPU_types: XenApiVgpuType['$ref'][];
|
|
932
934
|
uuid: string;
|
|
933
935
|
}
|
|
936
|
+
export type XenApiPgpuWrapped = WrapperXenApi<XenApiPgpu, 'PGPU'>;
|
|
934
937
|
export interface XenApiGpuGroup {
|
|
935
938
|
$ref: Branded<'GPU_group'>;
|
|
936
939
|
allocation_algorithm: ALLOCATION_ALGORITHM;
|
|
@@ -944,6 +947,7 @@ export interface XenApiGpuGroup {
|
|
|
944
947
|
uuid: string;
|
|
945
948
|
VGPUs: XenApiVgpu['$ref'][];
|
|
946
949
|
}
|
|
950
|
+
export type XenApiGpuGroupWrapped = WrapperXenApi<XenApiGpuGroup, 'gpuGroup'>;
|
|
947
951
|
export interface XenApiVgpu {
|
|
948
952
|
$ref: Branded<'VGPU'>;
|
|
949
953
|
compatibility_metadata?: Record<string, string>;
|
|
@@ -979,6 +983,7 @@ export interface XenApiVgpuType {
|
|
|
979
983
|
vendor_name: string;
|
|
980
984
|
VGPUs: XenApiVgpu['$ref'][];
|
|
981
985
|
}
|
|
986
|
+
export type XenApiVgpuTypeWrapped = WrapperXenApi<XenApiVgpuType, 'vgpuType'>;
|
|
982
987
|
export interface XenApiPvsSite {
|
|
983
988
|
$ref: Branded<'PVS_site'>;
|
|
984
989
|
cache_storage?: XenApiPvsCacheStorage['$ref'][];
|
|
@@ -1142,5 +1147,5 @@ export interface XenApiObserver {
|
|
|
1142
1147
|
uuid?: string;
|
|
1143
1148
|
}
|
|
1144
1149
|
export type XenApiRecord = XenApiSession | XenApiAuth | XenApiSubject | XenApiRole | XenApiTask | XenApiEvent | XenApiPool | XenApiPoolPatch | XenApiPoolUpdate | XenApiVm | XenApiVmMetrics | XenApiVmGuestMetrics | XenApiVmpp | XenApiVmss | XenApiVmAppliance | XenApiDrTask | XenApiHost | XenApiHostCrashdump | XenApiHostPatch | XenApiHostMetrics | XenApiHostCpu | XenApiNetwork | XenApiVif | XenApiVifMetrics | XenApiPif | XenApiPifMetrics | XenApiBond | XenApiVlan | XenApiSm | XenApiSr | XenApiSrStat | XenApiProbeResult | XenApiLvhd | XenApiVdi | XenApiVbd | XenApiVbdMetrics | XenApiPbd | XenApiCrashdump | XenApiVtpm | XenApiConsole | XenApiUser | XenApiDataSource | XenApiBlob | XenApiMessage | XenApiSecret | XenApiTunnel | XenApiNetworkSriov | XenApiPci | XenApiPgpu | XenApiGpuGroup | XenApiVgpu | XenApiVgpuType | XenApiPvsSite | XenApiPvsServer | XenApiPvsProxy | XenApiPvsCacheStorage | XenApiFeature | XenApiSdnController | XenApiVdiNbdServerInfo | XenApiPusb | XenApiUsbGroup | XenApiVusb | XenApiCluster | XenApiClusterHost | XenApiCertificate | XenApiRepository | XenApiObserver;
|
|
1145
|
-
export type WrappedXenApiRecord = XenApiHostWrapped | XenApiPifWrapped | XenApiPoolWrapped | XenApiSrWrapped | XenApiVbdWrapped | XenApiVdiWrapped | XenApiVgpuWrapped | XenApiVifWrapped | XenApiVmWrapped | XenApiVtpmWrapped;
|
|
1150
|
+
export type WrappedXenApiRecord = XenApiHostWrapped | XenApiNetworkWrapped | XenApiPifWrapped | XenApiPoolWrapped | XenApiSrWrapped | XenApiVbdWrapped | XenApiVdiWrapped | XenApiVgpuWrapped | XenApiVifWrapped | XenApiVmWrapped | XenApiVtpmWrapped | XenApiPciWrapped | XenApiGpuGroupWrapped | XenApiPgpuWrapped | XenApiVgpuTypeWrapped;
|
|
1146
1151
|
export {};
|
package/dist/xo.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Branded, DOMAIN_TYPE, HOST_ALLOWED_OPERATIONS, HOST_POWER_STATE, IP_CONFIGURATION_MODE, IPV6_CONFIGURATION_MODE, NETWORK_OPERATIONS, POOL_ALLOWED_OPERATIONS, PRIMARY_ADDRESS_TYPE, STORAGE_OPERATIONS, VDI_OPERATIONS, VDI_TYPE, VIF_LOCKING_MODE, VM_OPERATIONS, VM_POWER_STATE } from './common.mjs';
|
|
1
|
+
import type { BACKUP_TYPE, Branded, DOMAIN_TYPE, HOST_ALLOWED_OPERATIONS, HOST_POWER_STATE, IP_CONFIGURATION_MODE, IPV6_CONFIGURATION_MODE, NETWORK_OPERATIONS, PGPU_DOM0_ACCESS, POOL_ALLOWED_OPERATIONS, PRIMARY_ADDRESS_TYPE, STORAGE_OPERATIONS, VDI_OPERATIONS, VDI_TYPE, VIF_LOCKING_MODE, VM_OPERATIONS, VM_POWER_STATE } from './common.mjs';
|
|
2
2
|
type BaseXapiXo = {
|
|
3
3
|
$pool: XoPool['id'];
|
|
4
4
|
/**
|
|
@@ -48,7 +48,7 @@ type BaseXoVm = BaseXapiXo & {
|
|
|
48
48
|
isNestedVirtEnabled: boolean;
|
|
49
49
|
hasVendorDevice: boolean;
|
|
50
50
|
high_availability: string;
|
|
51
|
-
installTime?: number;
|
|
51
|
+
installTime?: number | null;
|
|
52
52
|
isFirmwareSupported: boolean;
|
|
53
53
|
memory: {
|
|
54
54
|
dynamic: number[];
|
|
@@ -74,7 +74,7 @@ type BaseXoVm = BaseXapiXo & {
|
|
|
74
74
|
secureBoot: boolean;
|
|
75
75
|
snapshots: XoVmSnapshot['id'][];
|
|
76
76
|
startDelay: number;
|
|
77
|
-
startTime?: number;
|
|
77
|
+
startTime?: number | null;
|
|
78
78
|
suspendSr?: XoSr['id'];
|
|
79
79
|
tags: string[];
|
|
80
80
|
vga?: string;
|
|
@@ -102,6 +102,24 @@ export type XoAlarm = Omit<XoMessage, '$object' | 'body'> & {
|
|
|
102
102
|
href?: string;
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
|
+
export type XoBackupRepository = {
|
|
106
|
+
benchmarks?: {
|
|
107
|
+
readRate: number;
|
|
108
|
+
timestamp: number;
|
|
109
|
+
writeRate: number;
|
|
110
|
+
}[];
|
|
111
|
+
enabled: boolean;
|
|
112
|
+
error?: Record<string, unknown>;
|
|
113
|
+
id: Branded<'backup-repository'>;
|
|
114
|
+
name: string;
|
|
115
|
+
options?: string;
|
|
116
|
+
proxy?: XoProxy['id'];
|
|
117
|
+
url: string;
|
|
118
|
+
};
|
|
119
|
+
export type XoGpuGroup = BaseXapiXo & {
|
|
120
|
+
id: Branded<'gpu-group'>;
|
|
121
|
+
type: 'gpuGroup';
|
|
122
|
+
};
|
|
105
123
|
export type XoGroup = {
|
|
106
124
|
id: Branded<'group'>;
|
|
107
125
|
name: string;
|
|
@@ -223,12 +241,30 @@ export type XoPbd = BaseXapiXo & {
|
|
|
223
241
|
type: 'PBD';
|
|
224
242
|
};
|
|
225
243
|
export type XoPci = BaseXapiXo & {
|
|
244
|
+
$host?: XoHost['id'];
|
|
245
|
+
class_name: string;
|
|
246
|
+
device_name: string;
|
|
226
247
|
id: Branded<'PCI'>;
|
|
248
|
+
pci_id: string;
|
|
227
249
|
type: 'PCI';
|
|
228
250
|
};
|
|
229
251
|
export type XoPgpu = BaseXapiXo & {
|
|
252
|
+
$host: XoHost['id'];
|
|
253
|
+
$vgpus: XoVgpu['id'][];
|
|
254
|
+
dom0Access: PGPU_DOM0_ACCESS;
|
|
255
|
+
enabledVgpuTypes: XoVgpuType['id'][];
|
|
256
|
+
gpuGroup?: XoGpuGroup['id'];
|
|
257
|
+
host: XoHost['id'];
|
|
230
258
|
id: Branded<'PGPU'>;
|
|
259
|
+
isSystemDisplayDevice: boolean;
|
|
260
|
+
pci?: XoPci['id'];
|
|
261
|
+
/**
|
|
262
|
+
* @deprecated
|
|
263
|
+
*/
|
|
264
|
+
supportedVgpuMaxCapcities?: never;
|
|
265
|
+
supportedVgpuTypes: XoVgpuType['id'][];
|
|
231
266
|
type: 'PGPU';
|
|
267
|
+
vgpus: XoVgpu['id'][];
|
|
232
268
|
};
|
|
233
269
|
export type XoPif = BaseXapiXo & {
|
|
234
270
|
$host: XoHost['id'];
|
|
@@ -284,14 +320,80 @@ export type XoPool = BaseXapiXo & {
|
|
|
284
320
|
xosanPackInstallationTime: number | null;
|
|
285
321
|
zstdSupported: boolean;
|
|
286
322
|
};
|
|
287
|
-
export type
|
|
323
|
+
export type XoProxy = {
|
|
324
|
+
id: Branded<'proxy'>;
|
|
325
|
+
};
|
|
326
|
+
type BaseXoJob = {
|
|
288
327
|
id: Branded<'job'>;
|
|
289
328
|
};
|
|
329
|
+
export type XoBackupJob = BaseXoJob & {
|
|
330
|
+
compression?: 'native' | 'zstd' | '';
|
|
331
|
+
proxy?: XoProxy['id'];
|
|
332
|
+
mode: 'full' | 'delta';
|
|
333
|
+
name?: string;
|
|
334
|
+
remotes?: {
|
|
335
|
+
id: XoBackupRepository['id'] | {
|
|
336
|
+
__or: XoBackupRepository['id'][];
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
vms?: {
|
|
340
|
+
id: XoVm['id'] | {
|
|
341
|
+
__or: XoVm['id'][];
|
|
342
|
+
} | Record<string, unknown>;
|
|
343
|
+
};
|
|
344
|
+
srs: {
|
|
345
|
+
id: XoSr['id'] | {
|
|
346
|
+
__or: XoSr['id'][];
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
type: BACKUP_TYPE;
|
|
350
|
+
settings: {
|
|
351
|
+
'': {
|
|
352
|
+
cbtDestroySnapshotData?: boolean;
|
|
353
|
+
concurrency?: number;
|
|
354
|
+
longTermRetention?: {
|
|
355
|
+
daily?: {
|
|
356
|
+
retention: number;
|
|
357
|
+
settings: Record<string, unknown>;
|
|
358
|
+
};
|
|
359
|
+
weekly?: {
|
|
360
|
+
retention: number;
|
|
361
|
+
settings: Record<string, unknown>;
|
|
362
|
+
};
|
|
363
|
+
monthly?: {
|
|
364
|
+
retention: number;
|
|
365
|
+
settings: Record<string, unknown>;
|
|
366
|
+
};
|
|
367
|
+
yearly?: {
|
|
368
|
+
retention: number;
|
|
369
|
+
settings: Record<string, unknown>;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
maxExportRate?: number;
|
|
373
|
+
nbdConcurrency?: number;
|
|
374
|
+
nRetriesVmBackupFailures?: number;
|
|
375
|
+
preferNbd?: boolean;
|
|
376
|
+
timezone?: string;
|
|
377
|
+
[key: string]: unknown;
|
|
378
|
+
};
|
|
379
|
+
[key: XoSchedule['id']]: {
|
|
380
|
+
exportRetention?: number;
|
|
381
|
+
healthCheckSr?: XoSr['id'];
|
|
382
|
+
healthCheckVmsWithTags?: string[];
|
|
383
|
+
fullInterval?: number;
|
|
384
|
+
copyRetention?: number;
|
|
385
|
+
snapshotRetention?: number;
|
|
386
|
+
cbtDestroySnapshotData?: boolean;
|
|
387
|
+
[key: string]: unknown;
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
export type XoJob = BaseXoJob & {};
|
|
290
392
|
export type XoSchedule = {
|
|
291
393
|
cron: string;
|
|
292
|
-
|
|
394
|
+
enabled: boolean;
|
|
293
395
|
id: Branded<'schedule'>;
|
|
294
|
-
jobId: XoJob['id'];
|
|
396
|
+
jobId: (XoJob | XoBackupJob)['id'];
|
|
295
397
|
name?: string;
|
|
296
398
|
timezone?: string;
|
|
297
399
|
};
|
|
@@ -303,6 +405,7 @@ export type XoServer = {
|
|
|
303
405
|
httpProxy?: string;
|
|
304
406
|
id: Branded<'server'>;
|
|
305
407
|
label?: string;
|
|
408
|
+
master?: XoHost['id'];
|
|
306
409
|
poolId?: XoPool['id'];
|
|
307
410
|
poolNameDescription?: string;
|
|
308
411
|
poolNameLabel?: string;
|
|
@@ -313,7 +416,7 @@ export type XoServer = {
|
|
|
313
416
|
export type XoSr = BaseXapiXo & {
|
|
314
417
|
$PBDs: XoPbd['id'][];
|
|
315
418
|
$container: XoPool['id'] | XoHost['id'];
|
|
316
|
-
VDIs:
|
|
419
|
+
VDIs: AnyXoVdi['id'][];
|
|
317
420
|
allocationStrategy: 'thin' | 'thick' | 'unknown';
|
|
318
421
|
content_type: string;
|
|
319
422
|
current_operations: Record<string, STORAGE_OPERATIONS>;
|
|
@@ -322,9 +425,9 @@ export type XoSr = BaseXapiXo & {
|
|
|
322
425
|
name_description: string;
|
|
323
426
|
name_label: string;
|
|
324
427
|
other_config: Record<string, string>;
|
|
325
|
-
physical_usage: number
|
|
428
|
+
physical_usage: number;
|
|
326
429
|
shared: boolean;
|
|
327
|
-
size: number
|
|
430
|
+
size: number;
|
|
328
431
|
sm_config: Record<string, string>;
|
|
329
432
|
SR_type: string;
|
|
330
433
|
tags: string[];
|
|
@@ -350,8 +453,8 @@ export type XoVbd = BaseXapiXo & {
|
|
|
350
453
|
position: string;
|
|
351
454
|
read_only: boolean;
|
|
352
455
|
type: 'VBD';
|
|
353
|
-
VDI:
|
|
354
|
-
VM:
|
|
456
|
+
VDI: AnyXoVdi['id'];
|
|
457
|
+
VM: AnyXoVm['id'];
|
|
355
458
|
};
|
|
356
459
|
type BaseXoVdi = BaseXapiXo & {
|
|
357
460
|
$SR: XoSr['id'];
|
|
@@ -385,7 +488,11 @@ export type XoVdiUnmanaged = BaseXoVdi & {
|
|
|
385
488
|
};
|
|
386
489
|
export type XoVgpu = BaseXapiXo & {
|
|
387
490
|
id: Branded<'VGPU'>;
|
|
388
|
-
type: '
|
|
491
|
+
type: 'vgpu';
|
|
492
|
+
};
|
|
493
|
+
export type XoVgpuType = BaseXapiXo & {
|
|
494
|
+
id: Branded<'vgpu-type'>;
|
|
495
|
+
type: 'vgpuType';
|
|
389
496
|
};
|
|
390
497
|
export type XoVif = BaseXapiXo & {
|
|
391
498
|
$VM: XoVm['id'];
|
|
@@ -448,7 +555,10 @@ export type XoVtpm = BaseXapiXo & {
|
|
|
448
555
|
id: Branded<'VTPM'>;
|
|
449
556
|
type: 'VTPM';
|
|
450
557
|
};
|
|
451
|
-
export type XapiXoRecord = XoAlarm | XoHost | XoMessage | XoNetwork | XoPif | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm;
|
|
452
|
-
export type NonXapiXoRecord = XoGroup | XoJob | XoSchedule | XoServer | XoUser;
|
|
558
|
+
export type XapiXoRecord = XoAlarm | XoGpuGroup | XoHost | XoMessage | XoNetwork | XoPci | XoPgpu | XoPif | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVgpuType | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm;
|
|
559
|
+
export type NonXapiXoRecord = XoGroup | XoProxy | XoJob | XoBackupRepository | XoSchedule | XoServer | XoUser;
|
|
453
560
|
export type XoRecord = XapiXoRecord | NonXapiXoRecord;
|
|
561
|
+
export type AnyXoVm = XoVm | XoVmSnapshot | XoVmTemplate | XoVmController;
|
|
562
|
+
export type AnyXoVdi = XoVdi | XoVdiSnapshot | XoVdiUnmanaged;
|
|
563
|
+
export type AnyXoJob = XoJob | XoBackupJob;
|
|
454
564
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vates/types",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"./lib/vates/*": {
|
|
18
18
|
"default": "./dist/lib/vates-*.mjs",
|
|
19
19
|
"type": "./dist/lib/vates-*.d.mts"
|
|
20
|
+
},
|
|
21
|
+
"./lib/xen-orchestra/*": {
|
|
22
|
+
"default": "./dist/lib/xen-orchestra-*.mjs",
|
|
23
|
+
"type": "./dist/lib/xen-orchestra-*.d.mts"
|
|
20
24
|
}
|
|
21
25
|
},
|
|
22
26
|
"type": "module",
|