@vates/types 1.7.0 → 1.8.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 CHANGED
@@ -1,3 +1,4 @@
1
+ import type { XoHost } from './xo.mjs';
1
2
  declare const __brand: unique symbol;
2
3
  export type Branded<TBrand extends string, TType = string> = TType & {
3
4
  [__brand]: TBrand;
@@ -593,4 +594,7 @@ export type XapiVmStatsRaw = {
593
594
  vbdAvgquSz?: RecordStatValues;
594
595
  };
595
596
  export type XapiVmStats = XapiStatsResponse<XapiVmStatsRaw>;
597
+ export type XapiPoolStats = Record<XoHost['id'], XapiHostStats | {
598
+ error: Record<string, unknown>;
599
+ }>;
596
600
  export {};
@@ -1,4 +1,4 @@
1
- import { WrappedXenApiRecord, XenApiNetworkWrapped, XenApiRecord, XenApiSr, XenApiVdi, XenApiVm, XenApiVmWrapped } from '../xen-api.mjs';
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
4
  type XcpPatches = {
@@ -56,9 +56,9 @@ export interface Xapi {
56
56
  /**
57
57
  * if startOnly is true and the VM is not halted, throw VM_BAD_POWER_STATE
58
58
  * otherwise, unpause/resume the VM
59
- *
60
- * @default false
61
- */
59
+ *
60
+ * @default false
61
+ */
62
62
  startOnly?: boolean;
63
63
  }): Promise<void>;
64
64
  VM_import(stream: Readable, srRef?: XenApiSr['$ref'], onVmCreation?: null | ((vm: XenApiVm) => unknown)): Promise<XenApiVm['$ref']>;
@@ -117,5 +117,12 @@ export interface Xapi {
117
117
  bypassBlockedOperation?: boolean;
118
118
  forceDeleteDefaultTemplate?: boolean;
119
119
  }): Promise<void>;
120
+ getResource(pathname: string, params?: {
121
+ host?: XenApiHost;
122
+ query?: Record<string, unknown>;
123
+ task?: boolean | XenApiTask['$ref'];
124
+ }): Promise<{
125
+ body: Readable;
126
+ }>;
120
127
  }
121
128
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vates/types",
3
3
  "private": false,
4
- "version": "1.7.0",
4
+ "version": "1.8.0",
5
5
  "main": "./dist/index.mjs",
6
6
  "exports": {
7
7
  ".": {