@vates/types 1.8.0 → 1.10.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.
@@ -1,7 +1,7 @@
1
1
  import { WrappedXenApiRecord, XenApiHost, XenApiNetworkWrapped, XenApiRecord, XenApiSr, XenApiTask, XenApiVdi, XenApiVm, XenApiVmWrapped } from '../xen-api.mjs';
2
2
  import type { Readable } from 'node:stream';
3
3
  import type { XoGpuGroup, XoVgpuType, XoHost, XoNetwork, XoPif, XoSr, XoUser, XoVdi, XoVm, XoVmTemplate } from '../xo.mjs';
4
- type XcpPatches = {
4
+ export type XcpPatches = {
5
5
  changelog?: {
6
6
  author: string;
7
7
  date: number;
@@ -15,7 +15,7 @@ type XcpPatches = {
15
15
  url: string;
16
16
  version: string;
17
17
  };
18
- type XsPatches = {
18
+ export type XsPatches = {
19
19
  conflicts?: string[];
20
20
  date: string;
21
21
  description: string;
@@ -64,6 +64,9 @@ export interface Xapi {
64
64
  VM_import(stream: Readable, srRef?: XenApiSr['$ref'], onVmCreation?: null | ((vm: XenApiVm) => unknown)): Promise<XenApiVm['$ref']>;
65
65
  createVm(templateUuid: XoVmTemplate['uuid'], metadataVm: {
66
66
  affinityHost?: XoHost['id'];
67
+ autoPoweron?: boolean;
68
+ memory?: number;
69
+ name_description?: string;
67
70
  name_label: string;
68
71
  nameLabel?: string;
69
72
  clone?: boolean;
@@ -124,5 +127,5 @@ export interface Xapi {
124
127
  }): Promise<{
125
128
  body: Readable;
126
129
  }>;
130
+ isHyperThreadingEnabled(hostId: XoHost['id']): Promise<boolean | null>;
127
131
  }
128
- export {};
@@ -791,7 +791,7 @@ export interface XenApiVbd {
791
791
  unpluggable: boolean;
792
792
  userdevice: string;
793
793
  uuid: string;
794
- VDI: XenApiVdi['$ref'];
794
+ VDI: XenApiVdi['$ref'] | OPAQUE_REF_NULL;
795
795
  VM: XenApiVm['$ref'];
796
796
  }
797
797
  export type XenApiVbdWrapped = WrapperXenApi<XenApiVbd, 'VBD'>;
package/dist/xo.d.mts CHANGED
@@ -93,7 +93,7 @@ type BaseXoVm = BaseXapiXo & {
93
93
  };
94
94
  export type XoAlarm = Omit<XoMessage, '$object' | 'body'> & {
95
95
  body: {
96
- value: string;
96
+ value?: string;
97
97
  name: string;
98
98
  };
99
99
  object: {
@@ -466,7 +466,7 @@ export type XoVbd = BaseXapiXo & {
466
466
  position: string;
467
467
  read_only: boolean;
468
468
  type: 'VBD';
469
- VDI: AnyXoVdi['id'];
469
+ VDI?: XoVdi['id'] | XoVdiSnapshot['id'];
470
470
  VM: AnyXoVm['id'];
471
471
  };
472
472
  type BaseXoVdi = BaseXapiXo & {
@@ -496,9 +496,13 @@ export type XoVdiSnapshot = BaseXoVdi & {
496
496
  $snapshot_of?: XoVdi['id'];
497
497
  type: 'VDI-snapshot';
498
498
  };
499
- export type XoVdiUnmanaged = BaseXoVdi & {
499
+ export type XoVdiUnmanaged = Omit<BaseXoVdi, '$VBDs'> & {
500
500
  id: Branded<'VDI-unmanaged'>;
501
501
  type: 'VDI-unmanaged';
502
+ /**
503
+ * Unmanaged VDI have no VBDs
504
+ */
505
+ $VBDs: never[];
502
506
  };
503
507
  export type XoVgpu = BaseXapiXo & {
504
508
  id: Branded<'VGPU'>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vates/types",
3
3
  "private": false,
4
- "version": "1.8.0",
4
+ "version": "1.10.0",
5
5
  "main": "./dist/index.mjs",
6
6
  "exports": {
7
7
  ".": {