@vates/types 1.3.0 → 1.4.1

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.
@@ -9,9 +9,16 @@ type WrapperXenApi<T, Type extends string, Fn = {
9
9
  $call: Fn;
10
10
  $callAsync: Fn;
11
11
  $type: Type;
12
+ $snapshot(params: {
13
+ cancelToken?: unknown;
14
+ ignoredVdisTag?: string;
15
+ name_label?: string;
16
+ unplugVusbs?: boolean;
17
+ }): Promise<XenApiVm['$ref']>;
12
18
  $xapi: {
13
19
  call: <ReturnType>(...args: unknown[]) => Promise<ReturnType>;
14
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]>;
15
22
  };
16
23
  };
17
24
  export interface XenApiSession {
@@ -616,6 +623,7 @@ export interface XenApiPif {
616
623
  VLAN_slave_of: XenApiVlan['$ref'][];
617
624
  VLAN: number;
618
625
  }
626
+ export type XenApiPifWrapped = WrapperXenApi<XenApiPif, 'PIF'>;
619
627
  export interface XenApiPifMetrics {
620
628
  $ref: Branded<'PIF_metrics'>;
621
629
  carrier: boolean;
@@ -1134,5 +1142,5 @@ export interface XenApiObserver {
1134
1142
  uuid?: string;
1135
1143
  }
1136
1144
  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;
1137
- export type WrappedXenApiRecord = XenApiHostWrapped | XenApiPoolWrapped | XenApiSrWrapped | XenApiVbdWrapped | XenApiVdiWrapped | XenApiVgpuWrapped | XenApiVifWrapped | XenApiVmWrapped | XenApiVtpmWrapped;
1145
+ export type WrappedXenApiRecord = XenApiHostWrapped | XenApiPifWrapped | XenApiPoolWrapped | XenApiSrWrapped | XenApiVbdWrapped | XenApiVdiWrapped | XenApiVgpuWrapped | XenApiVifWrapped | XenApiVmWrapped | XenApiVtpmWrapped;
1138
1146
  export {};
package/dist/xo.d.mts CHANGED
@@ -1,4 +1,4 @@
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';
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';
2
2
  type BaseXapiXo = {
3
3
  $pool: XoPool['id'];
4
4
  /**
@@ -231,8 +231,33 @@ export type XoPgpu = BaseXapiXo & {
231
231
  type: 'PGPU';
232
232
  };
233
233
  export type XoPif = BaseXapiXo & {
234
+ $host: XoHost['id'];
235
+ $network: XoNetwork['id'];
236
+ attached: boolean;
237
+ bondMaster?: XoPif['id'];
238
+ bondSalves?: XoPif['id'][];
239
+ carrier: boolean;
240
+ device: string;
241
+ deviceName?: string;
242
+ disallowUnplug: boolean;
243
+ dns: string;
244
+ gateway: string;
234
245
  id: Branded<'PIF'>;
246
+ ip: string;
247
+ ipv6: string[];
248
+ ipv6Mode: IPV6_CONFIGURATION_MODE;
249
+ isBondMaster: boolean;
250
+ isBondSlave: boolean;
251
+ mac: string;
252
+ management: boolean;
253
+ mode: IP_CONFIGURATION_MODE;
254
+ mtu: number;
255
+ netmask: string;
256
+ physical: boolean;
257
+ primaryAddressType: PRIMARY_ADDRESS_TYPE;
258
+ speed?: number;
235
259
  type: 'PIF';
260
+ vlan: number;
236
261
  };
237
262
  export type XoPool = BaseXapiXo & {
238
263
  auto_poweron: boolean;
@@ -384,6 +409,13 @@ export type XoVif = BaseXapiXo & {
384
409
  export type XoVm = BaseXoVm & {
385
410
  id: Branded<'VM'>;
386
411
  type: 'VM';
412
+ vulnerabilities: {
413
+ xsa468: boolean | {
414
+ reason: string;
415
+ driver?: string;
416
+ version?: string;
417
+ };
418
+ };
387
419
  };
388
420
  export type XoVmController = BaseXoVm & {
389
421
  id: Branded<'VM-controller'>;
@@ -416,7 +448,7 @@ export type XoVtpm = BaseXapiXo & {
416
448
  id: Branded<'VTPM'>;
417
449
  type: 'VTPM';
418
450
  };
419
- export type XapiXoRecord = XoAlarm | XoHost | XoMessage | XoNetwork | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm;
451
+ export type XapiXoRecord = XoAlarm | XoHost | XoMessage | XoNetwork | XoPif | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm;
420
452
  export type NonXapiXoRecord = XoGroup | XoJob | XoSchedule | XoServer | XoUser;
421
453
  export type XoRecord = XapiXoRecord | NonXapiXoRecord;
422
454
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vates/types",
3
3
  "private": false,
4
- "version": "1.3.0",
4
+ "version": "1.4.1",
5
5
  "main": "./dist/index.mjs",
6
6
  "exports": {
7
7
  ".": {