@vates/types 1.1.1 → 1.3.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.
@@ -176,6 +176,10 @@ export interface XenApiPoolUpdate {
176
176
  }
177
177
  type XenApiVmCallMethods = {
178
178
  (method: 'start', start_paused: boolean, force: boolean): Promise<void>;
179
+ (method: 'clean_shutdown'): Promise<void>;
180
+ (method: 'hard_shutdown'): Promise<void>;
181
+ (method: 'clean_reboot'): Promise<void>;
182
+ (method: 'hard_reboot'): Promise<void>;
179
183
  };
180
184
  export interface XenApiVm {
181
185
  $ref: Branded<'VM'>;
package/dist/xo.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Branded, DOMAIN_TYPE, HOST_ALLOWED_OPERATIONS, HOST_POWER_STATE, STORAGE_OPERATIONS, VDI_OPERATIONS, VDI_TYPE, VM_OPERATIONS, VM_POWER_STATE } from './common.mjs';
1
+ import type { Branded, DOMAIN_TYPE, HOST_ALLOWED_OPERATIONS, HOST_POWER_STATE, NETWORK_OPERATIONS, POOL_ALLOWED_OPERATIONS, 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
  /**
@@ -91,9 +91,22 @@ type BaseXoVm = BaseXapiXo & {
91
91
  version: null | string;
92
92
  };
93
93
  };
94
+ export type XoAlarm = Omit<XoMessage, '$object' | 'body'> & {
95
+ body: {
96
+ value: string;
97
+ name: string;
98
+ };
99
+ object: {
100
+ type: XapiXoRecord['type'] | 'unknown';
101
+ uuid: XapiXoRecord['uuid'];
102
+ href?: string;
103
+ };
104
+ };
94
105
  export type XoGroup = {
95
106
  id: Branded<'group'>;
96
107
  name: string;
108
+ provider?: string;
109
+ providerGroupId?: string;
97
110
  users: XoUser['id'][];
98
111
  };
99
112
  export type XoHost = BaseXapiXo & {
@@ -180,6 +193,31 @@ export type XoHostPatch = BaseXapiXo & {
180
193
  id: Branded<'host_patch'>;
181
194
  type: 'host_patch';
182
195
  };
196
+ export type XoMessage = BaseXapiXo & {
197
+ $object: XapiXoRecord['id'];
198
+ body: string;
199
+ id: Branded<'message'>;
200
+ name: string;
201
+ time: number;
202
+ type: 'message';
203
+ };
204
+ export type XoNetwork = BaseXapiXo & {
205
+ MTU: number;
206
+ PIFs: XoPif['id'][];
207
+ VIFs: XoVif['id'][];
208
+ automatic: boolean;
209
+ bridge: string;
210
+ current_operations: Record<string, NETWORK_OPERATIONS>;
211
+ defaultIsLocked: boolean;
212
+ id: Branded<'network'>;
213
+ insecureNbd?: boolean;
214
+ name_description: string;
215
+ name_label: string;
216
+ nbd?: boolean;
217
+ other_config: Record<string, string>;
218
+ tags: string[];
219
+ type: 'network';
220
+ };
183
221
  export type XoPbd = BaseXapiXo & {
184
222
  id: Branded<'PBD'>;
185
223
  type: 'PBD';
@@ -197,8 +235,40 @@ export type XoPif = BaseXapiXo & {
197
235
  type: 'PIF';
198
236
  };
199
237
  export type XoPool = BaseXapiXo & {
238
+ auto_poweron: boolean;
239
+ cpus: {
240
+ cores?: number;
241
+ sockets?: number;
242
+ };
243
+ crashDumpSr?: XoSr['id'];
244
+ current_operations: Record<string, POOL_ALLOWED_OPERATIONS>;
245
+ defaultSr?: XoSr['id'];
246
+ HA_enabled: boolean;
247
+ haSrs: XoSr['id'][];
200
248
  id: Branded<'pool'>;
249
+ master: XoHost['id'];
250
+ migrationCompression?: boolean;
251
+ name_description: string;
252
+ name_label: string;
253
+ otherConfig: Record<string, string>;
254
+ platform_version: string;
255
+ suspendSr?: XoSr['id'];
256
+ tags: string[];
201
257
  type: 'pool';
258
+ vtpmSupported: boolean;
259
+ xosanPackInstallationTime: number | null;
260
+ zstdSupported: boolean;
261
+ };
262
+ export type XoJob = {
263
+ id: Branded<'job'>;
264
+ };
265
+ export type XoSchedule = {
266
+ cron: string;
267
+ enable: boolean;
268
+ id: Branded<'schedule'>;
269
+ jobId: XoJob['id'];
270
+ name?: string;
271
+ timezone?: string;
202
272
  };
203
273
  export type XoServer = {
204
274
  allowUnauthorized: boolean;
@@ -241,9 +311,9 @@ export type XoUser = {
241
311
  email: string;
242
312
  groups: XoGroup['id'][];
243
313
  id: Branded<'user'>;
244
- name: string;
314
+ name?: string;
245
315
  permission: string;
246
- pw_hash: string;
316
+ pw_hash?: string;
247
317
  preferences: Record<string, string>;
248
318
  };
249
319
  export type XoVbd = BaseXapiXo & {
@@ -293,7 +363,22 @@ export type XoVgpu = BaseXapiXo & {
293
363
  type: 'VGPU';
294
364
  };
295
365
  export type XoVif = BaseXapiXo & {
366
+ $VM: XoVm['id'];
367
+ $network: XoNetwork['id'];
368
+ allowedIpv4Addresses: string[];
369
+ allowedIpv6Addresses: string[];
370
+ attached: boolean;
371
+ device: string;
296
372
  id: Branded<'VIF'>;
373
+ lockingMode: VIF_LOCKING_MODE;
374
+ MAC: string;
375
+ MTU: number;
376
+ other_config: Record<string, string>;
377
+ /**
378
+ * In kB/s
379
+ */
380
+ rateLimit?: number;
381
+ txChecksumming: boolean;
297
382
  type: 'VIF';
298
383
  };
299
384
  export type XoVm = BaseXoVm & {
@@ -331,7 +416,7 @@ export type XoVtpm = BaseXapiXo & {
331
416
  id: Branded<'VTPM'>;
332
417
  type: 'VTPM';
333
418
  };
334
- export type XapiXoRecord = XoHost | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm;
335
- export type NonXapiXoRecord = XoGroup | XoServer | XoUser;
419
+ export type XapiXoRecord = XoAlarm | XoHost | XoMessage | XoNetwork | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm;
420
+ export type NonXapiXoRecord = XoGroup | XoJob | XoSchedule | XoServer | XoUser;
336
421
  export type XoRecord = XapiXoRecord | NonXapiXoRecord;
337
422
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vates/types",
3
3
  "private": false,
4
- "version": "1.1.1",
4
+ "version": "1.3.0",
5
5
  "main": "./dist/index.mjs",
6
6
  "exports": {
7
7
  ".": {