@vates/types 1.12.1 → 1.14.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.
@@ -125,6 +125,7 @@ export interface Xapi {
125
125
  vgpuType?: XoVgpuType['id'];
126
126
  gpuGroup?: XoGpuGroup['id'];
127
127
  copyHostBiosStrings?: boolean;
128
+ hvmBootFirmware?: 'uefi' | 'bios';
128
129
  }, checkLimits?: boolean, creatorId?: XoUser['id'], opts?: {
129
130
  destroyAllVifs: boolean;
130
131
  }): Promise<XenApiVmWrapped>;
@@ -139,6 +140,10 @@ export interface Xapi {
139
140
  }): Promise<Readable & {
140
141
  length?: number;
141
142
  }>;
143
+ VDI_importContent(vdiRef: XenApiVdi['$ref'], stream: Readable, opts: {
144
+ cancelToken?: unknown;
145
+ format: SUPPORTED_VDI_FORMAT;
146
+ }): Promise<void>;
142
147
  VM_createCloudInitConfig(vmRef: XenApiVm['$ref'], cloudConfig: string, opts?: {
143
148
  networkConfig?: string;
144
149
  }): Promise<XoVdi['uuid']>;
@@ -1,5 +1,9 @@
1
1
  import type { AFTER_APPLY_GUIDANCE, ALLOCATION_ALGORITHM, BOND_MODE, Branded, CERTIFICATE_TYPE, CLS, CLUSTER_HOST_OPERATION, CLUSTER_OPERATION, CONSOLE_PROTOCOL, DOMAIN_TYPE, EVENT_OPERATION, HOST_ALLOWED_OPERATIONS, HOST_DISPLAY, HOST_NUMA_AFFINITY_POLICY, IP_CONFIGURATION_MODE, IPV6_CONFIGURATION_MODE, LATEST_SYNCED_UPDATES_APPLIED_STATE, NETWORK_DEFAULT_LOCKING_MODE, NETWORK_OPERATIONS, NETWORK_PURPOSE, ON_BOOT, ON_CRASH_BEHAVIOUR, ON_NORMAL_EXIT, ON_SOFTREBOOT_BEHAVIOR, OPAQUE_REF_NULL, PERSISTENCE_BACKEND, PGPU_DOM0_ACCESS, PIF_IGMP_STATUS, POOL_ALLOWED_OPERATIONS, PRIMARY_ADDRESS_TYPE, PVS_PROXY_STATUS, SDN_CONTROLLER_PROTOCOL, SR_HEALTH, SRIOV_CONFIGURATION_MODE, STORAGE_OPERATIONS, TASK_ALLOWED_OPERATIONS, TASK_STATUS_TYPE, TELEMETRY_FREQUENCY, TRISTATE_TYPE, TUNNEL_PROTOCOL, UPDATE_AFTER_APPLY_GUIDANCE, UPDATE_GUIDANCES, UPDATE_SYNC_FREQUENCY, VBD_MODE, VBD_OPERATIONS, VBD_TYPE, VDI_OPERATIONS, VDI_TYPE, VGPU_TYPE_IMPLEMENTATION, VIF_IPV4_CONFIGURATION_MODE, VIF_IPV6_CONFIGURATION_MODE, VIF_LOCKING_MODE, VIF_OPERATIONS, VM_APPLIANCE_OPERATION, VM_OPERATIONS, VM_POWER_STATE, VMPP_ARCHIVE_FREQUENCY, VMPP_ARCHIVE_TARGET_TYPE, VMPP_BACKUP_FREQUENCY, VMPP_BACKUP_TYPE, VMSS_FREQUENCY, VMSS_TYPE, VTPM_OPERATIONS, VUSB_OPERATIONS } from './common.mjs';
2
2
  import type { Xapi } from './lib/xen-orchestra-xapi.mjs';
3
+ type TagCallMethods = {
4
+ (method: 'add_tags', tag: string): Promise<void>;
5
+ (method: 'remove_tags', tag: string): Promise<void>;
6
+ };
3
7
  /**
4
8
  * Add properties injected by `xen-api`.
5
9
  * $ref property is also injected by XOLite, so she is not present here.
@@ -87,6 +91,7 @@ export interface XenApiEvent {
87
91
  /** @deprecated */
88
92
  timestamp?: string;
89
93
  }
94
+ type XenApiPoolCallMethods = TagCallMethods & {};
90
95
  export interface XenApiPool {
91
96
  $ref: Branded<'pool'>;
92
97
  allowed_operations: POOL_ALLOWED_OPERATIONS[];
@@ -149,7 +154,7 @@ export interface XenApiPool {
149
154
  /** @deprecated */
150
155
  wlb_verify_cert?: boolean;
151
156
  }
152
- export type XenApiPoolWrapped = WrapperXenApi<XenApiPool, 'pool'>;
157
+ export type XenApiPoolWrapped = WrapperXenApi<XenApiPool, 'pool', XenApiPoolCallMethods>;
153
158
  /** @deprecated */
154
159
  export interface XenApiPoolPatch {
155
160
  $ref: Branded<'pool_patch'>;
@@ -178,7 +183,7 @@ export interface XenApiPoolUpdate {
178
183
  vdi: XenApiVdi['$ref'];
179
184
  version?: string;
180
185
  }
181
- type XenApiVmCallMethods = {
186
+ type XenApiVmCallMethods = TagCallMethods & {
182
187
  (method: 'start', start_paused: boolean, force: boolean): Promise<void>;
183
188
  (method: 'clean_shutdown'): Promise<void>;
184
189
  (method: 'hard_shutdown'): Promise<void>;
@@ -398,6 +403,7 @@ export interface XenApiDrTask {
398
403
  introduced_SRs: XenApiSr['$ref'][];
399
404
  uuid: string;
400
405
  }
406
+ type XenApiHostCallMethods = TagCallMethods & {};
401
407
  export interface XenApiHost {
402
408
  $ref: Branded<'host'>;
403
409
  address: string;
@@ -474,7 +480,7 @@ export interface XenApiHost {
474
480
  uuid: string;
475
481
  virtual_hardware_platform_versions: number[];
476
482
  }
477
- export type XenApiHostWrapped = WrapperXenApi<XenApiHost, 'host'>;
483
+ export type XenApiHostWrapped = WrapperXenApi<XenApiHost, 'host', XenApiHostCallMethods>;
478
484
  export interface XenApiHostCrashdump {
479
485
  $ref: Branded<'host_crashdump'>;
480
486
  host: XenApiHost['$ref'];
@@ -524,6 +530,7 @@ export interface XenApiHostCpu {
524
530
  uuid: string;
525
531
  vendor: string;
526
532
  }
533
+ type XenApiNetworkCallMethods = TagCallMethods & {};
527
534
  export interface XenApiNetwork {
528
535
  $ref: Branded<'network'>;
529
536
  allowed_operations: NETWORK_OPERATIONS[];
@@ -543,7 +550,7 @@ export interface XenApiNetwork {
543
550
  uuid: string;
544
551
  VIFs: XenApiVif['$ref'][];
545
552
  }
546
- export interface XenApiNetworkWrapped extends WrapperXenApi<XenApiNetwork, 'network'> {
553
+ export interface XenApiNetworkWrapped extends WrapperXenApi<XenApiNetwork, 'network', XenApiNetworkCallMethods> {
547
554
  }
548
555
  export interface XenApiVif {
549
556
  $ref: Branded<'VIF'>;
@@ -685,6 +692,7 @@ export interface XenApiSm {
685
692
  version: string;
686
693
  }
687
694
  export type XenApiSmWrapped = WrapperXenApi<XenApiSm, 'SM'>;
695
+ type XenApiSrCallMethods = TagCallMethods & {};
688
696
  export interface XenApiSr {
689
697
  $ref: Branded<'SR'>;
690
698
  allowed_operations: STORAGE_OPERATIONS[];
@@ -709,7 +717,7 @@ export interface XenApiSr {
709
717
  VDIs: XenApiVdi['$ref'][];
710
718
  virtual_allocation: number;
711
719
  }
712
- export type XenApiSrWrapped = WrapperXenApi<XenApiSr, 'SR'>;
720
+ export type XenApiSrWrapped = WrapperXenApi<XenApiSr, 'SR', XenApiSrCallMethods>;
713
721
  export interface XenApiSrStat {
714
722
  $ref: Branded<'sr_stat'>;
715
723
  clustered?: boolean;
@@ -731,6 +739,7 @@ export interface XenApiLvhd {
731
739
  $ref: Branded<'LVHD'>;
732
740
  uuid: string;
733
741
  }
742
+ type XenApiVdiCallMethods = TagCallMethods & {};
734
743
  export interface XenApiVdi {
735
744
  $ref: Branded<'VDI'>;
736
745
  allow_caching: boolean;
@@ -767,7 +776,7 @@ export interface XenApiVdi {
767
776
  virtual_size: number;
768
777
  xenstore_data: Record<string, string>;
769
778
  }
770
- export type XenApiVdiWrapped = WrapperXenApi<XenApiVdi, 'VDI'>;
779
+ export type XenApiVdiWrapped = WrapperXenApi<XenApiVdi, 'VDI', XenApiVdiCallMethods>;
771
780
  export interface XenApiVbd {
772
781
  $ref: Branded<'VBD'>;
773
782
  allowed_operations: VBD_OPERATIONS[];
@@ -817,6 +826,7 @@ export interface XenApiPbd {
817
826
  SR: XenApiSr['$ref'];
818
827
  uuid: string;
819
828
  }
829
+ export type XenApiPbdWrapped = WrapperXenApi<XenApiPbd, 'PBD'>;
820
830
  /** @deprecated */
821
831
  export interface XenApiCrashdump {
822
832
  $ref: Branded<'crashdump'>;
@@ -1151,5 +1161,5 @@ export interface XenApiObserver {
1151
1161
  uuid?: string;
1152
1162
  }
1153
1163
  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;
1154
- export type WrappedXenApiRecord = XenApiHostWrapped | XenApiNetworkWrapped | XenApiPifWrapped | XenApiPoolWrapped | XenApiSrWrapped | XenApiVbdWrapped | XenApiVdiWrapped | XenApiVgpuWrapped | XenApiVifWrapped | XenApiVmWrapped | XenApiVtpmWrapped | XenApiPciWrapped | XenApiGpuGroupWrapped | XenApiPgpuWrapped | XenApiVgpuTypeWrapped;
1164
+ export type WrappedXenApiRecord = XenApiHostWrapped | XenApiNetworkWrapped | XenApiPbdWrapped | XenApiPifWrapped | XenApiPoolWrapped | XenApiSrWrapped | XenApiVbdWrapped | XenApiVdiWrapped | XenApiVgpuWrapped | XenApiVifWrapped | XenApiVmWrapped | XenApiVtpmWrapped | XenApiPciWrapped | XenApiGpuGroupWrapped | XenApiPgpuWrapped | XenApiVgpuTypeWrapped;
1155
1165
  export {};
package/dist/xo.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { Branded, DOMAIN_TYPE, HOST_ALLOWED_OPERATIONS, HOST_POWER_STATE, IP_CONFIGURATION_MODE, IPV6_CONFIGURATION_MODE, NETWORK_OPERATIONS, PGPU_DOM0_ACCESS, 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
  import type * as CMType from './lib/complex-matcher.mjs';
3
+ import type { XenApiHost, XenApiPool } from './xen-api.mjs';
3
4
  type BaseXapiXo = {
4
5
  $pool: XoPool['id'];
5
6
  /**
@@ -113,6 +114,50 @@ export type XoBackupLog = BaseXoLog & {
113
114
  export type XoRestoreLog = BaseXoLog & {
114
115
  message: 'restore';
115
116
  };
117
+ export type XoVmBackupArchive = {
118
+ id: Branded<'vm-backup-archive'>;
119
+ type: 'xo-vm-backup';
120
+ backupRepository: XoBackupRepository['id'];
121
+ disks: {
122
+ id: string;
123
+ name: string;
124
+ uuid: XoVdiSnapshot['uuid'];
125
+ }[];
126
+ isImmutable?: boolean;
127
+ jobId: XoVmBackupJob['id'];
128
+ mode: XoVmBackupJob['mode'];
129
+ scheduleId: XoSchedule['id'];
130
+ size: number;
131
+ timestamp: number;
132
+ vm: {
133
+ uuid: XoVm['uuid'];
134
+ name_description: string;
135
+ name_label: string;
136
+ };
137
+ differencingVhds?: number;
138
+ dynamicVhds?: number;
139
+ withMemory: boolean;
140
+ };
141
+ type XoMetadataBackupArchive = {
142
+ id: Branded<'metadata-backup-archive'>;
143
+ backupRepository: XoBackupRepository['id'];
144
+ jobId: XoVmBackupJob['id'];
145
+ jobName: XoVmBackupJob['name'];
146
+ scheduleId: XoSchedule['id'];
147
+ scheduleName: XoSchedule['name'];
148
+ timestamp: number;
149
+ };
150
+ export type XoConfigBackupArchive = XoMetadataBackupArchive & {
151
+ id: Branded<'config-backup-archive'>;
152
+ data: string;
153
+ type: 'xo-config-backup';
154
+ };
155
+ export type XoPoolBackupArchive = XoMetadataBackupArchive & {
156
+ id: Branded<'pool-backup-archive'>;
157
+ pool: XenApiPool;
158
+ poolMaster: XenApiHost;
159
+ type: 'xo-pool-metadata-backup';
160
+ };
116
161
  export type XoBackupRepository = {
117
162
  benchmarks?: {
118
163
  readRate: number;
@@ -248,7 +293,30 @@ export type XoNetwork = BaseXapiXo & {
248
293
  type: 'network';
249
294
  };
250
295
  export type XoPbd = BaseXapiXo & {
296
+ attached: boolean;
297
+ device_config: {
298
+ device: string;
299
+ } | {
300
+ location: string;
301
+ } | {
302
+ path: string;
303
+ location: string;
304
+ legacy_mode: string;
305
+ } | {
306
+ provisioning: string;
307
+ redundancy: string;
308
+ 'group-name': string;
309
+ } | {
310
+ server: string;
311
+ serverpath: string;
312
+ } | {
313
+ type: string;
314
+ location: string;
315
+ } | Record<string, string>;
316
+ host: XoHost['id'];
251
317
  id: Branded<'PBD'>;
318
+ otherConfig: Record<string, string>;
319
+ SR: XoSr['id'];
252
320
  type: 'PBD';
253
321
  };
254
322
  export type XoPci = BaseXapiXo & {
@@ -482,7 +550,7 @@ export type XoSr = BaseXapiXo & {
482
550
  $PBDs: XoPbd['id'][];
483
551
  $container: XoPool['id'] | XoHost['id'];
484
552
  VDIs: AnyXoVdi['id'][];
485
- allocationStrategy: 'thin' | 'thick' | 'unknown';
553
+ allocationStrategy?: 'thin' | 'thick' | 'unknown';
486
554
  content_type: string;
487
555
  current_operations: Record<string, STORAGE_OPERATIONS>;
488
556
  id: Branded<'SR'>;
@@ -679,12 +747,13 @@ export type XoVtpm = BaseXapiXo & {
679
747
  id: Branded<'VTPM'>;
680
748
  type: 'VTPM';
681
749
  };
682
- export type XapiXoRecord = XoAlarm | XoGpuGroup | XoHost | XoMessage | XoNetwork | XoPci | XoPgpu | XoPif | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVgpuType | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm | XoSm;
683
- export type NonXapiXoRecord = AnyXoJob | AnyXoLog | XoGroup | XoProxy | XoBackupRepository | XoSchedule | XoServer | XoTask | XoUser;
750
+ export type XapiXoRecord = XoAlarm | XoGpuGroup | XoHost | XoMessage | XoNetwork | XoPbd | XoPci | XoPgpu | XoPif | XoPool | XoSr | XoVbd | XoVdi | XoVdiSnapshot | XoVdiUnmanaged | XoVgpu | XoVgpuType | XoVif | XoVm | XoVmController | XoVmSnapshot | XoVmTemplate | XoVtpm | XoSm;
751
+ export type NonXapiXoRecord = AnyXoBackupArchive | AnyXoJob | AnyXoLog | XoGroup | XoProxy | XoGroup | XoProxy | XoJob | XoBackupRepository | XoSchedule | XoServer | XoTask | XoUser;
684
752
  export type XoRecord = XapiXoRecord | NonXapiXoRecord;
685
753
  export type AnyXoVm = XoVm | XoVmSnapshot | XoVmTemplate | XoVmController;
686
754
  export type AnyXoVdi = XoVdi | XoVdiSnapshot | XoVdiUnmanaged;
687
755
  export type AnyXoJob = XoJob | AnyXoBackupJob;
688
756
  export type AnyXoBackupJob = XoVmBackupJob | XoMetadataBackupJob | XoMirrorBackupJob;
689
757
  export type AnyXoLog = XoBackupLog | XoRestoreLog;
758
+ export type AnyXoBackupArchive = XoVmBackupArchive | XoConfigBackupArchive | XoPoolBackupArchive;
690
759
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vates/types",
3
3
  "private": false,
4
- "version": "1.12.1",
4
+ "version": "1.14.0",
5
5
  "main": "./dist/index.mjs",
6
6
  "exports": {
7
7
  ".": {