@vates/types 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common.d.mts +510 -0
- package/dist/common.mjs +441 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +3 -0
- package/dist/xen-api.d.mts +1164 -0
- package/dist/xen-api.mjs +1 -0
- package/dist/xo.d.mts +166 -0
- package/dist/xo.mjs +2 -0
- package/package.json +44 -0
- package/tsconfig.json +12 -0
package/dist/xen-api.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/xo.d.mts
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { Branded, DOMAIN_TYPE, VM_OPERATIONS, VM_POWER_STATE } from './common.mjs';
|
|
2
|
+
type BaseXoVm = {
|
|
3
|
+
$VBDs: XoVbd['id'][];
|
|
4
|
+
$VGPUs: XoVgpu['id'][];
|
|
5
|
+
$container: XoPool['id'] | XoHost['id'];
|
|
6
|
+
$pool: XoPool['id'];
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated use $pool instead
|
|
9
|
+
*/
|
|
10
|
+
$poolId: XoPool['id'];
|
|
11
|
+
_xapiRef: string;
|
|
12
|
+
CPUs: {
|
|
13
|
+
max: number;
|
|
14
|
+
number: number;
|
|
15
|
+
};
|
|
16
|
+
PV_args?: string;
|
|
17
|
+
VGPUs: XoVgpu['id'][];
|
|
18
|
+
VIFs: XoVif['id'][];
|
|
19
|
+
VTPMs: XoVtpm['id'][];
|
|
20
|
+
addresses: Record<string, string>;
|
|
21
|
+
affinityHost?: XoHost['id'];
|
|
22
|
+
attachedPcis?: string[];
|
|
23
|
+
auto_poweron: boolean;
|
|
24
|
+
bios_strings: Record<string, string>;
|
|
25
|
+
blockedOperations: Record<VM_OPERATIONS, string>;
|
|
26
|
+
boot: Record<string, string>;
|
|
27
|
+
coresPerSocket?: number;
|
|
28
|
+
cpuCap?: number | null;
|
|
29
|
+
cpuMask?: (number | null)[];
|
|
30
|
+
cpuWeight?: number | null;
|
|
31
|
+
creation: Record<string, string>;
|
|
32
|
+
current_operations: Record<string, VM_OPERATIONS>;
|
|
33
|
+
docker?: {
|
|
34
|
+
containers?: string[];
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
info?: string;
|
|
37
|
+
process?: string;
|
|
38
|
+
version?: string;
|
|
39
|
+
};
|
|
40
|
+
expNestedHvm: boolean;
|
|
41
|
+
hasVendorDevice: boolean;
|
|
42
|
+
high_availability: string;
|
|
43
|
+
installTime?: number | null;
|
|
44
|
+
isFirmwareSupported: boolean;
|
|
45
|
+
memory: {
|
|
46
|
+
dynamic: number[];
|
|
47
|
+
size: number;
|
|
48
|
+
static: number[];
|
|
49
|
+
usage?: number;
|
|
50
|
+
};
|
|
51
|
+
mainIpAddress?: string;
|
|
52
|
+
managementAgentDetected?: boolean;
|
|
53
|
+
name_description: string;
|
|
54
|
+
name_label: string;
|
|
55
|
+
needsVtpm: boolean;
|
|
56
|
+
nicType?: string;
|
|
57
|
+
notes?: string;
|
|
58
|
+
os_version: Record<string, string> | null;
|
|
59
|
+
other: Record<string, string>;
|
|
60
|
+
parent?: XoVm['id'];
|
|
61
|
+
power_state: VM_POWER_STATE;
|
|
62
|
+
pvDriversDetected?: boolean;
|
|
63
|
+
pvDriversUpToDate?: boolean;
|
|
64
|
+
pvDriversVersion?: string;
|
|
65
|
+
resourceSet?: string;
|
|
66
|
+
secureBoot: boolean;
|
|
67
|
+
snapshots: XoVmSnapshot['id'][];
|
|
68
|
+
startDelay: number;
|
|
69
|
+
startTime?: number | null;
|
|
70
|
+
suspendSr?: XoSr['id'];
|
|
71
|
+
tags: string[];
|
|
72
|
+
vga?: string;
|
|
73
|
+
videoram?: number;
|
|
74
|
+
viridian: boolean;
|
|
75
|
+
virtualizationMode: DOMAIN_TYPE;
|
|
76
|
+
xenStoreData: Record<string, string>;
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated use pvDriversVersion instead
|
|
79
|
+
*/
|
|
80
|
+
xentools?: false | {
|
|
81
|
+
major: null | number;
|
|
82
|
+
minor: null | number;
|
|
83
|
+
version: null | string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export type XoGroup = {
|
|
87
|
+
id: Branded<'group'>;
|
|
88
|
+
name: string;
|
|
89
|
+
users: XoUser['id'][];
|
|
90
|
+
};
|
|
91
|
+
export type XoHost = {
|
|
92
|
+
id: Branded<'host'>;
|
|
93
|
+
type: 'host';
|
|
94
|
+
};
|
|
95
|
+
export type XoPool = {
|
|
96
|
+
id: Branded<'pool'>;
|
|
97
|
+
type: 'pool';
|
|
98
|
+
};
|
|
99
|
+
export type XoSr = {
|
|
100
|
+
id: Branded<'SR'>;
|
|
101
|
+
type: 'SR';
|
|
102
|
+
};
|
|
103
|
+
export type XoUser = {
|
|
104
|
+
authProviders?: Record<string, string>;
|
|
105
|
+
email: string;
|
|
106
|
+
groups: XoGroup['id'][];
|
|
107
|
+
id: Branded<'user'>;
|
|
108
|
+
name: string;
|
|
109
|
+
permission: string;
|
|
110
|
+
pw_hash: string;
|
|
111
|
+
preferences: Record<string, string>;
|
|
112
|
+
};
|
|
113
|
+
export type XoVbd = {
|
|
114
|
+
id: Branded<'VBD'>;
|
|
115
|
+
type: 'VBD';
|
|
116
|
+
};
|
|
117
|
+
export type XoVdi = {
|
|
118
|
+
id: Branded<'VDI'>;
|
|
119
|
+
type: 'VDI';
|
|
120
|
+
};
|
|
121
|
+
export type XoVgpu = {
|
|
122
|
+
id: Branded<'VGPU'>;
|
|
123
|
+
type: 'VGPU';
|
|
124
|
+
};
|
|
125
|
+
export type XoVif = {
|
|
126
|
+
id: Branded<'VIF'>;
|
|
127
|
+
type: 'VIF';
|
|
128
|
+
};
|
|
129
|
+
export type XoVm = BaseXoVm & {
|
|
130
|
+
id: Branded<'VM'>;
|
|
131
|
+
type: 'VM';
|
|
132
|
+
};
|
|
133
|
+
export type XoVmController = BaseXoVm & {
|
|
134
|
+
id: Branded<'VM-controller'>;
|
|
135
|
+
type: 'VM-controller';
|
|
136
|
+
};
|
|
137
|
+
export type XoVmSnapshot = BaseXoVm & {
|
|
138
|
+
$snapshot_of: XoVm['id'];
|
|
139
|
+
id: Branded<'VM-snapshot'>;
|
|
140
|
+
snapshot_time: number;
|
|
141
|
+
suspendVdi?: XoVdi['id'];
|
|
142
|
+
type: 'VM-snapshot';
|
|
143
|
+
};
|
|
144
|
+
export type XoVmTemplate = BaseXoVm & {
|
|
145
|
+
id: Branded<'VM-template'>;
|
|
146
|
+
isDefaultTemplate: boolean;
|
|
147
|
+
template_info: {
|
|
148
|
+
arch?: string;
|
|
149
|
+
disks: {
|
|
150
|
+
bootable: true;
|
|
151
|
+
size: number;
|
|
152
|
+
SR: string;
|
|
153
|
+
type: string;
|
|
154
|
+
}[];
|
|
155
|
+
install_methods: string[];
|
|
156
|
+
install_repository?: string;
|
|
157
|
+
};
|
|
158
|
+
type: 'VM-template';
|
|
159
|
+
};
|
|
160
|
+
export type XoVtpm = {
|
|
161
|
+
id: Branded<'VTPM'>;
|
|
162
|
+
type: 'VTPM';
|
|
163
|
+
};
|
|
164
|
+
export type XapiXoRecord = XoHost | XoPool | XoSr | XoVbd | XoVdi | XoVgpu | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVtpm;
|
|
165
|
+
export type XoRecord = XapiXoRecord | XoGroup | XoUser;
|
|
166
|
+
export {};
|
package/dist/xo.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vates/types",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"main": "./dist/index.mjs",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"default": "./dist/index.mjs",
|
|
9
|
+
"types": "./dist/index.d.mts"
|
|
10
|
+
},
|
|
11
|
+
"./xo": "./dist/xo.d.mts",
|
|
12
|
+
"./xen-api": "./dist/xen-api.d.mts",
|
|
13
|
+
"./common": {
|
|
14
|
+
"default": "./dist/common.mjs",
|
|
15
|
+
"types": "./dist/common.d.mts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@eslint/js": "^9.19.0",
|
|
21
|
+
"typescript": "~5.6.3",
|
|
22
|
+
"typescript-eslint": "^8.23.0"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc",
|
|
26
|
+
"prepublishOnly": "yarn run build",
|
|
27
|
+
"postversion": "npm publish --access public"
|
|
28
|
+
},
|
|
29
|
+
"license": "AGPL-3.0-or-later",
|
|
30
|
+
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@vates/types",
|
|
31
|
+
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
|
|
32
|
+
"repository": {
|
|
33
|
+
"directory": "@vates/types",
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/vatesfr/xen-orchestra.git"
|
|
36
|
+
},
|
|
37
|
+
"author": {
|
|
38
|
+
"name": "Vates SAS",
|
|
39
|
+
"url": "https://vates.fr"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18.18"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/tsconfig.json
ADDED