@phala/cloud 0.4.0 → 0.5.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/README.md +20 -0
- package/dist/actions/api_tokens/revoke_current_api_token.d.ts +47 -0
- package/dist/actions/apps/app_launch_token.d.ts +121 -0
- package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +17 -311
- package/dist/actions/apps/check_app_is_allowed.d.ts +20 -32
- package/dist/actions/apps/create_app_instance.d.ts +43 -63
- package/dist/actions/apps/get_app_attestation.d.ts +113 -779
- package/dist/actions/apps/get_app_cvms.d.ts +1 -5
- package/dist/actions/apps/get_app_device_allowlist.d.ts +26 -272
- package/dist/actions/apps/get_app_filter_options.d.ts +8 -24
- package/dist/actions/apps/get_app_info.d.ts +1 -5
- package/dist/actions/apps/get_app_list.d.ts +2 -26
- package/dist/actions/apps/get_app_revision_detail.d.ts +1 -9
- package/dist/actions/apps/get_app_revisions.d.ts +1 -9
- package/dist/actions/blockchains/add_compose_hash.d.ts +1 -13
- package/dist/actions/blockchains/add_device.d.ts +1 -13
- package/dist/actions/blockchains/deploy_app_auth.d.ts +3 -95
- package/dist/actions/blockchains/get_allowed_devices.d.ts +2 -12
- package/dist/actions/blockchains/remove_device.d.ts +1 -13
- package/dist/actions/blockchains/set_allow_any_device.d.ts +1 -13
- package/dist/actions/cvms/check_cvm_is_allowed.d.ts +13 -138
- package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +9 -45
- package/dist/actions/cvms/commit_cvm_provision.d.ts +32 -422
- package/dist/actions/cvms/commit_cvm_update.d.ts +70 -41
- package/dist/actions/cvms/confirm_cvm_patch.d.ts +62 -35
- package/dist/actions/cvms/cvm_annotations.d.ts +152 -0
- package/dist/actions/cvms/delete_cvm.d.ts +8 -14
- package/dist/actions/cvms/get_available_os_images.d.ts +70 -111
- package/dist/actions/cvms/get_cvm_attestation.d.ts +34 -392
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +384 -614
- package/dist/actions/cvms/get_cvm_containers_stats.d.ts +25 -91
- package/dist/actions/cvms/get_cvm_docker_compose.d.ts +8 -14
- package/dist/actions/cvms/get_cvm_info.d.ts +6 -12
- package/dist/actions/cvms/get_cvm_init_scripts.d.ts +87 -0
- package/dist/actions/cvms/get_cvm_list.d.ts +7 -13
- package/dist/actions/cvms/get_cvm_network.d.ts +18 -50
- package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +8 -14
- package/dist/actions/cvms/get_cvm_state.d.ts +11 -37
- package/dist/actions/cvms/get_cvm_stats.d.ts +23 -149
- package/dist/actions/cvms/get_cvm_status_batch.d.ts +19 -209
- package/dist/actions/cvms/get_cvm_user_config.d.ts +13 -24
- package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +9 -27
- package/dist/actions/cvms/patch_cvm.d.ts +658 -295
- package/dist/actions/cvms/provision_cvm.d.ts +326 -1561
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +550 -953
- package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +74 -131
- package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +77 -297
- package/dist/actions/cvms/replicate_cvm.d.ts +7 -21
- package/dist/actions/cvms/restart_cvm.d.ts +3 -18
- package/dist/actions/cvms/shutdown_cvm.d.ts +6 -12
- package/dist/actions/cvms/start_cvm.d.ts +6 -12
- package/dist/actions/cvms/stop_cvm.d.ts +6 -12
- package/dist/actions/cvms/update_cvm_envs.d.ts +136 -203
- package/dist/actions/cvms/update_cvm_resources.d.ts +82 -48
- package/dist/actions/cvms/update_cvm_visibility.d.ts +90 -132
- package/dist/actions/cvms/update_docker_compose.d.ts +127 -202
- package/dist/actions/cvms/update_os_image.d.ts +55 -28
- package/dist/actions/cvms/update_prelaunch_script.d.ts +127 -202
- package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +118 -193
- package/dist/actions/cvms/watch_cvm_state.d.ts +5 -15
- package/dist/actions/get_available_nodes.d.ts +186 -1067
- package/dist/actions/get_cvm_create_resources.d.ts +138 -2489
- package/dist/actions/index.d.ts +8 -2
- package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +11 -23
- package/dist/actions/kms/get_kms_contract.d.ts +25 -27
- package/dist/actions/kms/get_kms_info.d.ts +3 -7
- package/dist/actions/kms/get_kms_list.d.ts +34 -88
- package/dist/actions/kms/get_kms_onchain_detail.d.ts +66 -664
- package/dist/actions/kms/list_kms_contract_nodes.d.ts +21 -53
- package/dist/actions/kms/list_kms_contracts.d.ts +33 -87
- package/dist/actions/kms/next_app_ids.d.ts +5 -25
- package/dist/actions/list-instance-types.d.ts +77 -257
- package/dist/actions/os_images/get_os_images.d.ts +38 -152
- package/dist/actions/ssh_keys/create_ssh_key.d.ts +11 -17
- package/dist/actions/ssh_keys/delete_ssh_key.d.ts +3 -7
- package/dist/actions/ssh_keys/get_cvm_ssh_keys.d.ts +113 -0
- package/dist/actions/ssh_keys/import_github_profile.d.ts +7 -21
- package/dist/actions/ssh_keys/list_ssh_keys.d.ts +2 -50
- package/dist/actions/ssh_keys/sync_github_ssh_keys.d.ts +8 -20
- package/dist/actions/ssh_keys/update_cvm_ssh_keys.d.ts +140 -0
- package/dist/actions/workspaces/get_workspace.d.ts +32 -28
- package/dist/actions/workspaces/get_workspace_nodes.d.ts +34 -321
- package/dist/actions/workspaces/get_workspace_quotas.d.ts +107 -1021
- package/dist/actions/workspaces/list_workspaces.d.ts +67 -369
- package/dist/client.d.ts +23 -4
- package/dist/create-client.d.ts +1772 -1
- package/dist/credentials/current_user_v20251028.d.ts +1 -17
- package/dist/credentials/current_user_v20260121.d.ts +22 -227
- package/dist/index.d.ts +0 -1
- package/dist/index.js +5010 -4265
- package/dist/index.mjs +4892 -4192
- package/dist/types/app_compose.d.ts +108 -221
- package/dist/types/app_info_v20251028.d.ts +22 -1067
- package/dist/types/app_info_v20260121.d.ts +430 -8900
- package/dist/types/app_revision.d.ts +15 -371
- package/dist/types/client.d.ts +16 -0
- package/dist/types/common.d.ts +6 -0
- package/dist/types/cvm_id.d.ts +12 -57
- package/dist/types/cvm_info.d.ts +33 -460
- package/dist/types/cvm_info_v20251028.d.ts +99 -820
- package/dist/types/cvm_info_v20260121.d.ts +247 -3160
- package/dist/types/kms_contract.d.ts +2 -32
- package/dist/types/kms_info.d.ts +34 -68
- package/dist/utils/define-action.d.ts +4 -4
- package/dist/utils/errors.d.ts +4 -36
- package/dist/utils/get_compose_hash.d.ts +36 -5
- package/dist/utils/get_mr_config_id.d.ts +94 -3
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/placement-request.d.ts +3 -0
- package/package.json +4 -4
|
@@ -33,68 +33,97 @@ import { z } from "zod";
|
|
|
33
33
|
* }
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
export declare const CommitCvmUpdateRequestSchema: z.
|
|
36
|
+
export declare const CommitCvmUpdateRequestSchema: z.ZodObject<{
|
|
37
37
|
id: z.ZodOptional<z.ZodString>;
|
|
38
38
|
uuid: z.ZodOptional<z.ZodString>;
|
|
39
39
|
app_id: z.ZodOptional<z.ZodString>;
|
|
40
40
|
instance_id: z.ZodOptional<z.ZodString>;
|
|
41
|
-
name: z.ZodOptional<z.
|
|
42
|
-
} & {
|
|
41
|
+
name: z.ZodOptional<z.ZodString>;
|
|
43
42
|
token: z.ZodString;
|
|
44
43
|
composeHash: z.ZodString;
|
|
45
44
|
transactionHash: z.ZodString;
|
|
46
|
-
},
|
|
47
|
-
composeHash: string;
|
|
48
|
-
transactionHash: string;
|
|
49
|
-
token: string;
|
|
50
|
-
name?: string | undefined;
|
|
51
|
-
id?: string | undefined;
|
|
52
|
-
uuid?: string | undefined;
|
|
53
|
-
app_id?: string | undefined;
|
|
54
|
-
instance_id?: string | undefined;
|
|
55
|
-
}, {
|
|
56
|
-
composeHash: string;
|
|
57
|
-
transactionHash: string;
|
|
58
|
-
token: string;
|
|
59
|
-
name?: string | undefined;
|
|
60
|
-
id?: string | undefined;
|
|
61
|
-
uuid?: string | undefined;
|
|
62
|
-
app_id?: string | undefined;
|
|
63
|
-
instance_id?: string | undefined;
|
|
64
|
-
}>, any, any>;
|
|
45
|
+
}, z.core.$strip>;
|
|
65
46
|
export type CommitCvmUpdateRequest = z.input<typeof CommitCvmUpdateRequestSchema>;
|
|
66
47
|
declare const CommitCvmUpdateResultSchema: z.ZodObject<{
|
|
67
48
|
correlationId: z.ZodString;
|
|
68
49
|
status: z.ZodString;
|
|
69
|
-
},
|
|
70
|
-
status: string;
|
|
71
|
-
correlationId: string;
|
|
72
|
-
}, {
|
|
73
|
-
status: string;
|
|
74
|
-
correlationId: string;
|
|
75
|
-
}>;
|
|
50
|
+
}, z.core.$strip>;
|
|
76
51
|
export type CommitCvmUpdateResult = z.infer<typeof CommitCvmUpdateResultSchema>;
|
|
77
52
|
declare const commitCvmUpdate: {
|
|
78
|
-
(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
79
|
-
|
|
53
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
54
|
+
token: string;
|
|
55
|
+
composeHash: string;
|
|
56
|
+
transactionHash: string;
|
|
57
|
+
id?: string | undefined;
|
|
58
|
+
uuid?: string | undefined;
|
|
59
|
+
app_id?: string | undefined;
|
|
60
|
+
instance_id?: string | undefined;
|
|
61
|
+
name?: string | undefined;
|
|
62
|
+
}): Promise<{
|
|
80
63
|
correlationId: string;
|
|
64
|
+
status: string;
|
|
81
65
|
}>;
|
|
82
|
-
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
66
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
67
|
+
token: string;
|
|
68
|
+
composeHash: string;
|
|
69
|
+
transactionHash: string;
|
|
70
|
+
id?: string | undefined;
|
|
71
|
+
uuid?: string | undefined;
|
|
72
|
+
app_id?: string | undefined;
|
|
73
|
+
instance_id?: string | undefined;
|
|
74
|
+
name?: string | undefined;
|
|
75
|
+
}, parameters: {
|
|
83
76
|
schema: T;
|
|
84
|
-
}
|
|
85
|
-
(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
77
|
+
}): Promise<z.core.output<T>>;
|
|
78
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
79
|
+
token: string;
|
|
80
|
+
composeHash: string;
|
|
81
|
+
transactionHash: string;
|
|
82
|
+
id?: string | undefined;
|
|
83
|
+
uuid?: string | undefined;
|
|
84
|
+
app_id?: string | undefined;
|
|
85
|
+
instance_id?: string | undefined;
|
|
86
|
+
name?: string | undefined;
|
|
87
|
+
}, parameters: {
|
|
86
88
|
schema: false;
|
|
87
|
-
}
|
|
89
|
+
}): Promise<unknown>;
|
|
88
90
|
}, safeCommitCvmUpdate: {
|
|
89
|
-
(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
90
|
-
|
|
91
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
92
|
+
token: string;
|
|
93
|
+
composeHash: string;
|
|
94
|
+
transactionHash: string;
|
|
95
|
+
id?: string | undefined;
|
|
96
|
+
uuid?: string | undefined;
|
|
97
|
+
app_id?: string | undefined;
|
|
98
|
+
instance_id?: string | undefined;
|
|
99
|
+
name?: string | undefined;
|
|
100
|
+
}): Promise<import("../..").SafeResult<{
|
|
91
101
|
correlationId: string;
|
|
102
|
+
status: string;
|
|
92
103
|
}>>;
|
|
93
|
-
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
104
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
105
|
+
token: string;
|
|
106
|
+
composeHash: string;
|
|
107
|
+
transactionHash: string;
|
|
108
|
+
id?: string | undefined;
|
|
109
|
+
uuid?: string | undefined;
|
|
110
|
+
app_id?: string | undefined;
|
|
111
|
+
instance_id?: string | undefined;
|
|
112
|
+
name?: string | undefined;
|
|
113
|
+
}, parameters: {
|
|
94
114
|
schema: T;
|
|
95
|
-
}
|
|
96
|
-
(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
115
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
116
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
117
|
+
token: string;
|
|
118
|
+
composeHash: string;
|
|
119
|
+
transactionHash: string;
|
|
120
|
+
id?: string | undefined;
|
|
121
|
+
uuid?: string | undefined;
|
|
122
|
+
app_id?: string | undefined;
|
|
123
|
+
instance_id?: string | undefined;
|
|
124
|
+
name?: string | undefined;
|
|
125
|
+
}, parameters: {
|
|
97
126
|
schema: false;
|
|
98
|
-
}
|
|
127
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
99
128
|
};
|
|
100
129
|
export { commitCvmUpdate, safeCommitCvmUpdate };
|
|
@@ -33,60 +33,87 @@ import { z } from "zod";
|
|
|
33
33
|
* }
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
|
-
export declare const ConfirmCvmPatchRequestSchema: z.
|
|
36
|
+
export declare const ConfirmCvmPatchRequestSchema: z.ZodObject<{
|
|
37
37
|
id: z.ZodOptional<z.ZodString>;
|
|
38
38
|
uuid: z.ZodOptional<z.ZodString>;
|
|
39
39
|
app_id: z.ZodOptional<z.ZodString>;
|
|
40
40
|
instance_id: z.ZodOptional<z.ZodString>;
|
|
41
|
-
name: z.ZodOptional<z.
|
|
42
|
-
} & {
|
|
41
|
+
name: z.ZodOptional<z.ZodString>;
|
|
43
42
|
composeHash: z.ZodString;
|
|
44
43
|
transactionHash: z.ZodString;
|
|
45
|
-
},
|
|
46
|
-
composeHash: string;
|
|
47
|
-
transactionHash: string;
|
|
48
|
-
name?: string | undefined;
|
|
49
|
-
id?: string | undefined;
|
|
50
|
-
uuid?: string | undefined;
|
|
51
|
-
app_id?: string | undefined;
|
|
52
|
-
instance_id?: string | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
composeHash: string;
|
|
55
|
-
transactionHash: string;
|
|
56
|
-
name?: string | undefined;
|
|
57
|
-
id?: string | undefined;
|
|
58
|
-
uuid?: string | undefined;
|
|
59
|
-
app_id?: string | undefined;
|
|
60
|
-
instance_id?: string | undefined;
|
|
61
|
-
}>, any, any>;
|
|
44
|
+
}, z.core.$strip>;
|
|
62
45
|
export type ConfirmCvmPatchRequest = z.input<typeof ConfirmCvmPatchRequestSchema>;
|
|
63
46
|
declare const ConfirmCvmPatchResultSchema: z.ZodObject<{
|
|
64
47
|
correlationId: z.ZodString;
|
|
65
|
-
},
|
|
66
|
-
correlationId: string;
|
|
67
|
-
}, {
|
|
68
|
-
correlationId: string;
|
|
69
|
-
}>;
|
|
48
|
+
}, z.core.$strip>;
|
|
70
49
|
export type ConfirmCvmPatchResult = z.infer<typeof ConfirmCvmPatchResultSchema>;
|
|
71
50
|
declare const confirmCvmPatch: {
|
|
72
|
-
(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
51
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
52
|
+
composeHash: string;
|
|
53
|
+
transactionHash: string;
|
|
54
|
+
id?: string | undefined;
|
|
55
|
+
uuid?: string | undefined;
|
|
56
|
+
app_id?: string | undefined;
|
|
57
|
+
instance_id?: string | undefined;
|
|
58
|
+
name?: string | undefined;
|
|
59
|
+
}): Promise<{
|
|
73
60
|
correlationId: string;
|
|
74
61
|
}>;
|
|
75
|
-
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
62
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
63
|
+
composeHash: string;
|
|
64
|
+
transactionHash: string;
|
|
65
|
+
id?: string | undefined;
|
|
66
|
+
uuid?: string | undefined;
|
|
67
|
+
app_id?: string | undefined;
|
|
68
|
+
instance_id?: string | undefined;
|
|
69
|
+
name?: string | undefined;
|
|
70
|
+
}, parameters: {
|
|
76
71
|
schema: T;
|
|
77
|
-
}
|
|
78
|
-
(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
72
|
+
}): Promise<z.core.output<T>>;
|
|
73
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
74
|
+
composeHash: string;
|
|
75
|
+
transactionHash: string;
|
|
76
|
+
id?: string | undefined;
|
|
77
|
+
uuid?: string | undefined;
|
|
78
|
+
app_id?: string | undefined;
|
|
79
|
+
instance_id?: string | undefined;
|
|
80
|
+
name?: string | undefined;
|
|
81
|
+
}, parameters: {
|
|
79
82
|
schema: false;
|
|
80
|
-
}
|
|
83
|
+
}): Promise<unknown>;
|
|
81
84
|
}, safeConfirmCvmPatch: {
|
|
82
|
-
(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
85
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
86
|
+
composeHash: string;
|
|
87
|
+
transactionHash: string;
|
|
88
|
+
id?: string | undefined;
|
|
89
|
+
uuid?: string | undefined;
|
|
90
|
+
app_id?: string | undefined;
|
|
91
|
+
instance_id?: string | undefined;
|
|
92
|
+
name?: string | undefined;
|
|
93
|
+
}): Promise<import("../..").SafeResult<{
|
|
83
94
|
correlationId: string;
|
|
84
95
|
}>>;
|
|
85
|
-
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
96
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
97
|
+
composeHash: string;
|
|
98
|
+
transactionHash: string;
|
|
99
|
+
id?: string | undefined;
|
|
100
|
+
uuid?: string | undefined;
|
|
101
|
+
app_id?: string | undefined;
|
|
102
|
+
instance_id?: string | undefined;
|
|
103
|
+
name?: string | undefined;
|
|
104
|
+
}, parameters: {
|
|
86
105
|
schema: T;
|
|
87
|
-
}
|
|
88
|
-
(client: import("../..").BaseClient<import("../..").ApiVersion>, params
|
|
106
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
107
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
108
|
+
composeHash: string;
|
|
109
|
+
transactionHash: string;
|
|
110
|
+
id?: string | undefined;
|
|
111
|
+
uuid?: string | undefined;
|
|
112
|
+
app_id?: string | undefined;
|
|
113
|
+
instance_id?: string | undefined;
|
|
114
|
+
name?: string | undefined;
|
|
115
|
+
}, parameters: {
|
|
89
116
|
schema: false;
|
|
90
|
-
}
|
|
117
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
91
118
|
};
|
|
92
119
|
export { confirmCvmPatch, safeConfirmCvmPatch };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type CvmIdInput } from "../../types/cvm_id";
|
|
3
|
+
/**
|
|
4
|
+
* CVM annotations: opaque key/value metadata for host-side tooling, stored by
|
|
5
|
+
* the node's dstack VMM (>= 0.6.1). Not passed to the guest, not measured and
|
|
6
|
+
* not part of the compose hash, so attestation does not cover them; do not rely
|
|
7
|
+
* on them for security. Phala Cloud keeps no copy: a replica starts without
|
|
8
|
+
* annotations. Needs the `cvm_annotations` feature flag.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CvmAnnotationsSchema: z.ZodObject<{
|
|
11
|
+
annotations: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type CvmAnnotations = z.infer<typeof CvmAnnotationsSchema>;
|
|
14
|
+
export declare const GetCvmAnnotationsRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
15
|
+
id: z.ZodOptional<z.ZodString>;
|
|
16
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
17
|
+
app_id: z.ZodOptional<z.ZodString>;
|
|
18
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
19
|
+
name: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
21
|
+
cvmId: string;
|
|
22
|
+
}, {
|
|
23
|
+
id?: string | undefined;
|
|
24
|
+
uuid?: string | undefined;
|
|
25
|
+
app_id?: string | undefined;
|
|
26
|
+
instance_id?: string | undefined;
|
|
27
|
+
name?: string | undefined;
|
|
28
|
+
}>>;
|
|
29
|
+
export type GetCvmAnnotationsRequest = CvmIdInput;
|
|
30
|
+
/**
|
|
31
|
+
* Get the annotations the node's VMM stores for a CVM
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* import { createClient, getCvmAnnotations } from '@phala/cloud'
|
|
36
|
+
*
|
|
37
|
+
* const client = createClient()
|
|
38
|
+
* const { annotations } = await getCvmAnnotations(client, { id: 'my-cvm' })
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare const getCvmAnnotations: {
|
|
42
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<{
|
|
43
|
+
annotations: Record<string, string>;
|
|
44
|
+
}>;
|
|
45
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
46
|
+
schema: T;
|
|
47
|
+
}): Promise<z.core.output<T>>;
|
|
48
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
49
|
+
schema: false;
|
|
50
|
+
}): Promise<unknown>;
|
|
51
|
+
}, safeGetCvmAnnotations: {
|
|
52
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<{
|
|
53
|
+
annotations: Record<string, string>;
|
|
54
|
+
}>>;
|
|
55
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
56
|
+
schema: T;
|
|
57
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
58
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
59
|
+
schema: false;
|
|
60
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
61
|
+
};
|
|
62
|
+
export declare const UpdateCvmAnnotationsRequestSchema: z.ZodObject<{
|
|
63
|
+
id: z.ZodOptional<z.ZodString>;
|
|
64
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
65
|
+
app_id: z.ZodOptional<z.ZodString>;
|
|
66
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
67
|
+
name: z.ZodOptional<z.ZodString>;
|
|
68
|
+
annotations: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
export type UpdateCvmAnnotationsRequest = z.input<typeof UpdateCvmAnnotationsRequestSchema>;
|
|
71
|
+
/**
|
|
72
|
+
* Replace every annotation of a CVM; an empty object clears them
|
|
73
|
+
*
|
|
74
|
+
* The VMM applies the change at once, without a restart. Host tools that read
|
|
75
|
+
* annotations only when QEMU launches see the new values after the CVM restarts.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* import { createClient, getCvmAnnotations, updateCvmAnnotations } from '@phala/cloud'
|
|
80
|
+
*
|
|
81
|
+
* const client = createClient()
|
|
82
|
+
* const { annotations } = await getCvmAnnotations(client, { id: 'my-cvm' })
|
|
83
|
+
* await updateCvmAnnotations(client, {
|
|
84
|
+
* id: 'my-cvm',
|
|
85
|
+
* annotations: { ...annotations, memory_tier: 'fast' },
|
|
86
|
+
* })
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
declare const updateCvmAnnotations: {
|
|
90
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
91
|
+
annotations: Record<string, string>;
|
|
92
|
+
id?: string | undefined;
|
|
93
|
+
uuid?: string | undefined;
|
|
94
|
+
app_id?: string | undefined;
|
|
95
|
+
instance_id?: string | undefined;
|
|
96
|
+
name?: string | undefined;
|
|
97
|
+
}): Promise<{
|
|
98
|
+
annotations: Record<string, string>;
|
|
99
|
+
}>;
|
|
100
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
101
|
+
annotations: Record<string, string>;
|
|
102
|
+
id?: string | undefined;
|
|
103
|
+
uuid?: string | undefined;
|
|
104
|
+
app_id?: string | undefined;
|
|
105
|
+
instance_id?: string | undefined;
|
|
106
|
+
name?: string | undefined;
|
|
107
|
+
}, parameters: {
|
|
108
|
+
schema: T;
|
|
109
|
+
}): Promise<z.core.output<T>>;
|
|
110
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
111
|
+
annotations: Record<string, string>;
|
|
112
|
+
id?: string | undefined;
|
|
113
|
+
uuid?: string | undefined;
|
|
114
|
+
app_id?: string | undefined;
|
|
115
|
+
instance_id?: string | undefined;
|
|
116
|
+
name?: string | undefined;
|
|
117
|
+
}, parameters: {
|
|
118
|
+
schema: false;
|
|
119
|
+
}): Promise<unknown>;
|
|
120
|
+
}, safeUpdateCvmAnnotations: {
|
|
121
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
122
|
+
annotations: Record<string, string>;
|
|
123
|
+
id?: string | undefined;
|
|
124
|
+
uuid?: string | undefined;
|
|
125
|
+
app_id?: string | undefined;
|
|
126
|
+
instance_id?: string | undefined;
|
|
127
|
+
name?: string | undefined;
|
|
128
|
+
}): Promise<import("../..").SafeResult<{
|
|
129
|
+
annotations: Record<string, string>;
|
|
130
|
+
}>>;
|
|
131
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
132
|
+
annotations: Record<string, string>;
|
|
133
|
+
id?: string | undefined;
|
|
134
|
+
uuid?: string | undefined;
|
|
135
|
+
app_id?: string | undefined;
|
|
136
|
+
instance_id?: string | undefined;
|
|
137
|
+
name?: string | undefined;
|
|
138
|
+
}, parameters: {
|
|
139
|
+
schema: T;
|
|
140
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
141
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
142
|
+
annotations: Record<string, string>;
|
|
143
|
+
id?: string | undefined;
|
|
144
|
+
uuid?: string | undefined;
|
|
145
|
+
app_id?: string | undefined;
|
|
146
|
+
instance_id?: string | undefined;
|
|
147
|
+
name?: string | undefined;
|
|
148
|
+
}, parameters: {
|
|
149
|
+
schema: false;
|
|
150
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
151
|
+
};
|
|
152
|
+
export { getCvmAnnotations, safeGetCvmAnnotations, updateCvmAnnotations, safeUpdateCvmAnnotations };
|
|
@@ -28,33 +28,27 @@ import { type CvmIdInput } from "../../types/cvm_id";
|
|
|
28
28
|
* }
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
export declare const DeleteCvmRequestSchema: z.
|
|
31
|
+
export declare const DeleteCvmRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
32
32
|
id: z.ZodOptional<z.ZodString>;
|
|
33
33
|
uuid: z.ZodOptional<z.ZodString>;
|
|
34
34
|
app_id: z.ZodOptional<z.ZodString>;
|
|
35
35
|
instance_id: z.ZodOptional<z.ZodString>;
|
|
36
|
-
name: z.ZodOptional<z.
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
id?: string | undefined;
|
|
40
|
-
uuid?: string | undefined;
|
|
41
|
-
app_id?: string | undefined;
|
|
42
|
-
instance_id?: string | undefined;
|
|
36
|
+
name: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
38
|
+
cvmId: string;
|
|
43
39
|
}, {
|
|
44
|
-
name?: string | undefined;
|
|
45
40
|
id?: string | undefined;
|
|
46
41
|
uuid?: string | undefined;
|
|
47
42
|
app_id?: string | undefined;
|
|
48
43
|
instance_id?: string | undefined;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, any>;
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
}>>;
|
|
52
46
|
export type DeleteCvmRequest = CvmIdInput;
|
|
53
47
|
declare const deleteCvm: {
|
|
54
48
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<void>;
|
|
55
49
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
56
50
|
schema: T;
|
|
57
|
-
}): Promise<z.
|
|
51
|
+
}): Promise<z.core.output<T>>;
|
|
58
52
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
59
53
|
schema: false;
|
|
60
54
|
}): Promise<unknown>;
|
|
@@ -62,7 +56,7 @@ declare const deleteCvm: {
|
|
|
62
56
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<void>>;
|
|
63
57
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
64
58
|
schema: T;
|
|
65
|
-
}): Promise<import("../..").SafeResult<z.
|
|
59
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
66
60
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
67
61
|
schema: false;
|
|
68
62
|
}): Promise<import("../..").SafeResult<unknown>>;
|