@vates/types 1.10.0 → 1.11.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/lib/vates-task.d.mts +17 -4
- package/dist/xo.d.mts +28 -1
- package/package.json +1 -1
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { Branded } from '../common.mjs';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export interface VatesTask {
|
|
3
|
+
_abortController: AbortController;
|
|
4
|
+
_onProgress(data?: unknown): void;
|
|
5
|
+
id: Branded<'vates-task'>;
|
|
6
|
+
status: 'failure' | 'pending' | 'success';
|
|
7
|
+
abort(reason?: unknown): void;
|
|
8
|
+
failure(error?: unknown): void;
|
|
9
|
+
info(message: string, data: unknown): void;
|
|
10
|
+
run<T>(fn: () => T | (() => Promise<T>)): Promise<T>;
|
|
11
|
+
runInside<T>(fn: () => T | (() => Promise<T>)): Promise<T>;
|
|
12
|
+
set(name: string, value: unknown): void;
|
|
13
|
+
start(): void;
|
|
14
|
+
success(result?: unknown): void;
|
|
15
|
+
warning(message: string, data: unknown): void;
|
|
16
|
+
wrap<T>(fn: () => T | (() => Promise<T>)): Promise<T>;
|
|
17
|
+
wrapInside<T>(fn: () => T | (() => Promise<T>)): Promise<T>;
|
|
18
|
+
}
|
package/dist/xo.d.mts
CHANGED
|
@@ -447,6 +447,33 @@ export type XoSm = BaseXapiXo & {
|
|
|
447
447
|
supported_image_formats: string[];
|
|
448
448
|
type: 'SM';
|
|
449
449
|
};
|
|
450
|
+
export type XoTask = {
|
|
451
|
+
abortionRequestedAt?: number;
|
|
452
|
+
end?: number;
|
|
453
|
+
id: Branded<'task'>;
|
|
454
|
+
infos?: {
|
|
455
|
+
data: unknown;
|
|
456
|
+
message: string;
|
|
457
|
+
}[];
|
|
458
|
+
properties: {
|
|
459
|
+
method?: string;
|
|
460
|
+
name?: string;
|
|
461
|
+
objectId?: string;
|
|
462
|
+
params?: Record<string, unknown>;
|
|
463
|
+
type?: string;
|
|
464
|
+
userId?: string;
|
|
465
|
+
[key: string]: unknown | undefined;
|
|
466
|
+
};
|
|
467
|
+
result: Record<string, unknown>;
|
|
468
|
+
start: number;
|
|
469
|
+
status: 'failure' | 'interrupted' | 'pending' | 'success';
|
|
470
|
+
tasks?: XoTask[];
|
|
471
|
+
updatedAt?: number;
|
|
472
|
+
warning?: {
|
|
473
|
+
data: unknown;
|
|
474
|
+
message: string;
|
|
475
|
+
}[];
|
|
476
|
+
};
|
|
450
477
|
export type XoUser = {
|
|
451
478
|
authProviders?: Record<string, string>;
|
|
452
479
|
email: string;
|
|
@@ -574,7 +601,7 @@ export type XoVtpm = BaseXapiXo & {
|
|
|
574
601
|
type: 'VTPM';
|
|
575
602
|
};
|
|
576
603
|
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;
|
|
577
|
-
export type NonXapiXoRecord = XoGroup | XoProxy | XoJob | XoBackupRepository | XoSchedule | XoServer | XoUser;
|
|
604
|
+
export type NonXapiXoRecord = XoGroup | XoProxy | XoJob | XoBackupRepository | XoSchedule | XoServer | XoTask | XoUser;
|
|
578
605
|
export type XoRecord = XapiXoRecord | NonXapiXoRecord;
|
|
579
606
|
export type AnyXoVm = XoVm | XoVmSnapshot | XoVmTemplate | XoVmController;
|
|
580
607
|
export type AnyXoVdi = XoVdi | XoVdiSnapshot | XoVdiUnmanaged;
|