@phala/cloud 0.0.1 → 0.0.2

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.
Files changed (66) hide show
  1. package/dist/actions/add_compose_hash.d.ts +62 -0
  2. package/dist/actions/add_compose_hash.d.ts.map +1 -0
  3. package/dist/actions/commit_cvm_compose_file_update.d.ts +143 -0
  4. package/dist/actions/commit_cvm_compose_file_update.d.ts.map +1 -0
  5. package/dist/actions/commit_cvm_provision.d.ts +209 -0
  6. package/dist/actions/commit_cvm_provision.d.ts.map +1 -0
  7. package/dist/actions/deploy_app_auth.d.ts +156 -0
  8. package/dist/actions/deploy_app_auth.d.ts.map +1 -0
  9. package/dist/actions/get_app_env_encrypt_pubkey.d.ts +30 -0
  10. package/dist/actions/get_app_env_encrypt_pubkey.d.ts.map +1 -0
  11. package/dist/actions/get_available_nodes.d.ts +572 -0
  12. package/dist/actions/get_available_nodes.d.ts.map +1 -0
  13. package/dist/actions/get_current_user.d.ts +92 -0
  14. package/dist/actions/get_current_user.d.ts.map +1 -0
  15. package/dist/actions/get_cvm_compose_file.d.ts +190 -0
  16. package/dist/actions/get_cvm_compose_file.d.ts.map +1 -0
  17. package/dist/actions/get_cvm_info.d.ts +292 -0
  18. package/dist/actions/get_cvm_info.d.ts.map +1 -0
  19. package/dist/actions/get_cvm_list.d.ts +392 -0
  20. package/dist/actions/get_cvm_list.d.ts.map +1 -0
  21. package/dist/actions/get_kms_info.d.ts +34 -0
  22. package/dist/actions/get_kms_info.d.ts.map +1 -0
  23. package/dist/actions/get_kms_list.d.ts +82 -0
  24. package/dist/actions/get_kms_list.d.ts.map +1 -0
  25. package/dist/actions/index.d.ts +15 -0
  26. package/dist/actions/index.d.ts.map +1 -0
  27. package/dist/actions/provision_cvm.d.ts +228 -0
  28. package/dist/actions/provision_cvm.d.ts.map +1 -0
  29. package/dist/actions/provision_cvm_compose_file_update.d.ts +313 -0
  30. package/dist/actions/provision_cvm_compose_file_update.d.ts.map +1 -0
  31. package/dist/client.d.ts +80 -0
  32. package/dist/client.d.ts.map +1 -0
  33. package/dist/index.d.ts +8 -2978
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/index.js +5 -2
  36. package/dist/index.js.map +1 -0
  37. package/dist/index.mjs +5 -2
  38. package/dist/index.mjs.map +1 -0
  39. package/dist/types/client.d.ts +126 -0
  40. package/dist/types/client.d.ts.map +1 -0
  41. package/dist/types/common.d.ts +17 -0
  42. package/dist/types/common.d.ts.map +1 -0
  43. package/dist/types/cvm_info.d.ts +325 -0
  44. package/dist/types/cvm_info.d.ts.map +1 -0
  45. package/dist/types/index.d.ts +2 -0
  46. package/dist/types/index.d.ts.map +1 -0
  47. package/dist/types/kms_info.d.ts +28 -0
  48. package/dist/types/kms_info.d.ts.map +1 -0
  49. package/dist/utils/as-hex.d.ts +17 -0
  50. package/dist/utils/as-hex.d.ts.map +1 -0
  51. package/dist/utils/client-factories.d.ts +44 -0
  52. package/dist/utils/client-factories.d.ts.map +1 -0
  53. package/dist/utils/get_compose_hash.d.ts +15 -0
  54. package/dist/utils/get_compose_hash.d.ts.map +1 -0
  55. package/dist/utils/get_error_message.d.ts +3 -0
  56. package/dist/utils/get_error_message.d.ts.map +1 -0
  57. package/dist/utils/index.d.ts +9 -0
  58. package/dist/utils/index.d.ts.map +1 -0
  59. package/dist/utils/network.d.ts +101 -0
  60. package/dist/utils/network.d.ts.map +1 -0
  61. package/dist/utils/transaction.d.ts +81 -0
  62. package/dist/utils/transaction.d.ts.map +1 -0
  63. package/dist/utils/validate-parameters.d.ts +20 -0
  64. package/dist/utils/validate-parameters.d.ts.map +1 -0
  65. package/package.json +10 -4
  66. package/dist/index.d.mts +0 -2978
@@ -0,0 +1,190 @@
1
+ import { z } from "zod";
2
+ import { type Client, type SafeResult } from "../client";
3
+ import { ActionParameters, ActionReturnType } from "../types/common";
4
+ /**
5
+ * Get CVM compose file configuration
6
+ *
7
+ * Retrieves the current Docker Compose file configuration and metadata for a specified CVM.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * import { createClient, getCvmComposeFile } from '@phala/cloud'
12
+ *
13
+ * const client = createClient({ apiKey: 'your-api-key' })
14
+ * const composeFile = await getCvmComposeFile(client, { id: 'cvm-123' })
15
+ * // Output: { compose_content: '...', version: '...', last_modified: '...' }
16
+ * ```
17
+ *
18
+ * ## Returns
19
+ *
20
+ * `GetCvmComposeFileResult | unknown`
21
+ *
22
+ * The CVM compose file configuration including compose_content and metadata. Return type depends on schema parameter.
23
+ *
24
+ * ## Parameters
25
+ *
26
+ * ### request (required)
27
+ * - **Type:** `GetCvmComposeFileRequest`
28
+ *
29
+ * Request parameters containing the CVM identifier. Can be one of:
30
+ * - id: The CVM ID
31
+ * - uuid: The CVM UUID
32
+ * - appId: The App ID (40 chars)
33
+ * - instanceId: The Instance ID (40 chars)
34
+ *
35
+ * ### parameters (optional)
36
+ * - **Type:** `GetCvmComposeFileParameters`
37
+ *
38
+ * Optional behavior parameters for schema validation.
39
+ *
40
+ * ```typescript
41
+ * // Use default schema
42
+ * const result = await getCvmComposeFile(client, { id: 'cvm-123' })
43
+ *
44
+ * // Return raw data without validation
45
+ * const raw = await getCvmComposeFile(client, { id: 'cvm-123' }, { schema: false })
46
+ *
47
+ * // Use custom schema
48
+ * const customSchema = z.object({ compose_content: z.string() })
49
+ * const custom = await getCvmComposeFile(client, { id: 'cvm-123' }, { schema: customSchema })
50
+ * ```
51
+ *
52
+ * ## Safe Version
53
+ *
54
+ * Use `safeGetCvmComposeFile` for error handling without exceptions:
55
+ *
56
+ * ```typescript
57
+ * import { safeGetCvmComposeFile } from '@phala/cloud'
58
+ *
59
+ * const result = await safeGetCvmComposeFile(client, { id: 'cvm-123' })
60
+ * if (result.success) {
61
+ * console.log(result.data.compose_content)
62
+ * } else {
63
+ * if ("isRequestError" in result.error) {
64
+ * console.error(`HTTP ${result.error.status}: ${result.error.message}`)
65
+ * } else {
66
+ * console.error(`Validation error: ${result.error.issues}`)
67
+ * }
68
+ * }
69
+ * ```
70
+ */
71
+ export declare const GetCvmComposeFileResultSchema: z.ZodObject<{
72
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
73
+ docker_compose_file: z.ZodString;
74
+ features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
75
+ name: z.ZodOptional<z.ZodString>;
76
+ manifest_version: z.ZodOptional<z.ZodNumber>;
77
+ kms_enabled: z.ZodOptional<z.ZodBoolean>;
78
+ public_logs: z.ZodOptional<z.ZodBoolean>;
79
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
80
+ tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
81
+ pre_launch_script: z.ZodOptional<z.ZodString>;
82
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
83
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
84
+ docker_compose_file: z.ZodString;
85
+ features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
86
+ name: z.ZodOptional<z.ZodString>;
87
+ manifest_version: z.ZodOptional<z.ZodNumber>;
88
+ kms_enabled: z.ZodOptional<z.ZodBoolean>;
89
+ public_logs: z.ZodOptional<z.ZodBoolean>;
90
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
91
+ tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
92
+ pre_launch_script: z.ZodOptional<z.ZodString>;
93
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
94
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
95
+ docker_compose_file: z.ZodString;
96
+ features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
97
+ name: z.ZodOptional<z.ZodString>;
98
+ manifest_version: z.ZodOptional<z.ZodNumber>;
99
+ kms_enabled: z.ZodOptional<z.ZodBoolean>;
100
+ public_logs: z.ZodOptional<z.ZodBoolean>;
101
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
102
+ tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
103
+ pre_launch_script: z.ZodOptional<z.ZodString>;
104
+ }, z.ZodTypeAny, "passthrough">>;
105
+ export declare const CvmComposeFileSchema: z.ZodObject<{
106
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
107
+ docker_compose_file: z.ZodString;
108
+ features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
109
+ name: z.ZodOptional<z.ZodString>;
110
+ manifest_version: z.ZodOptional<z.ZodNumber>;
111
+ kms_enabled: z.ZodOptional<z.ZodBoolean>;
112
+ public_logs: z.ZodOptional<z.ZodBoolean>;
113
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
114
+ tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
115
+ pre_launch_script: z.ZodOptional<z.ZodString>;
116
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
117
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
118
+ docker_compose_file: z.ZodString;
119
+ features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
120
+ name: z.ZodOptional<z.ZodString>;
121
+ manifest_version: z.ZodOptional<z.ZodNumber>;
122
+ kms_enabled: z.ZodOptional<z.ZodBoolean>;
123
+ public_logs: z.ZodOptional<z.ZodBoolean>;
124
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
125
+ tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
126
+ pre_launch_script: z.ZodOptional<z.ZodString>;
127
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
128
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
129
+ docker_compose_file: z.ZodString;
130
+ features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
131
+ name: z.ZodOptional<z.ZodString>;
132
+ manifest_version: z.ZodOptional<z.ZodNumber>;
133
+ kms_enabled: z.ZodOptional<z.ZodBoolean>;
134
+ public_logs: z.ZodOptional<z.ZodBoolean>;
135
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
136
+ tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
137
+ pre_launch_script: z.ZodOptional<z.ZodString>;
138
+ }, z.ZodTypeAny, "passthrough">>;
139
+ export type CvmComposeFile = z.infer<typeof CvmComposeFileSchema>;
140
+ export type GetCvmComposeFileResult = z.infer<typeof GetCvmComposeFileResultSchema>;
141
+ export declare const GetCvmComposeFileRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
142
+ id: z.ZodOptional<z.ZodString>;
143
+ uuid: z.ZodOptional<z.ZodString>;
144
+ app_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
145
+ instance_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ id?: string | undefined;
148
+ app_id?: string | undefined;
149
+ instance_id?: string | undefined;
150
+ uuid?: string | undefined;
151
+ }, {
152
+ id?: string | undefined;
153
+ app_id?: string | undefined;
154
+ instance_id?: string | undefined;
155
+ uuid?: string | undefined;
156
+ }>, {
157
+ id?: string | undefined;
158
+ app_id?: string | undefined;
159
+ instance_id?: string | undefined;
160
+ uuid?: string | undefined;
161
+ }, {
162
+ id?: string | undefined;
163
+ app_id?: string | undefined;
164
+ instance_id?: string | undefined;
165
+ uuid?: string | undefined;
166
+ }>, {
167
+ cvmId: string | undefined;
168
+ _raw: {
169
+ id?: string | undefined;
170
+ app_id?: string | undefined;
171
+ instance_id?: string | undefined;
172
+ uuid?: string | undefined;
173
+ };
174
+ }, {
175
+ id?: string | undefined;
176
+ app_id?: string | undefined;
177
+ instance_id?: string | undefined;
178
+ uuid?: string | undefined;
179
+ }>;
180
+ export type GetCvmComposeFileRequest = {
181
+ id?: string;
182
+ uuid?: string;
183
+ app_id?: string;
184
+ instance_id?: string;
185
+ };
186
+ export type GetCvmComposeFileParameters<T = undefined> = ActionParameters<T>;
187
+ export type GetCvmComposeFileReturnType<T = undefined> = ActionReturnType<GetCvmComposeFileResult, T>;
188
+ export declare function getCvmComposeFile<T extends z.ZodSchema | false | undefined = undefined>(client: Client, request: GetCvmComposeFileRequest, parameters?: GetCvmComposeFileParameters<T>): Promise<GetCvmComposeFileReturnType<T>>;
189
+ export declare function safeGetCvmComposeFile<T extends z.ZodSchema | false | undefined = undefined>(client: Client, request: GetCvmComposeFileRequest, parameters?: GetCvmComposeFileParameters<T>): Promise<SafeResult<GetCvmComposeFileReturnType<T>>>;
190
+ //# sourceMappingURL=get_cvm_compose_file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get_cvm_compose_file.d.ts","sourceRoot":"","sources":["../../src/actions/get_cvm_compose_file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAa1B,CAAC;AAGjB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAgC,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BtC,CAAC;AAEN,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,2BAA2B,CAAC,CAAC,GAAG,SAAS,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAE7E,MAAM,MAAM,2BAA2B,CAAC,CAAC,GAAG,SAAS,IAAI,gBAAgB,CACvE,uBAAuB,EACvB,CAAC,CACF,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,EAC3F,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,EACjC,UAAU,CAAC,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAC1C,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAWzC;AAED,wBAAsB,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,EAC/F,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,EACjC,UAAU,CAAC,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAC1C,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAiBrD"}
@@ -0,0 +1,292 @@
1
+ import { z } from "zod";
2
+ import { type Client, type SafeResult } from "../client";
3
+ import { ActionParameters, ActionReturnType } from "../types/common";
4
+ export declare const GetCvmInfoSchema: z.ZodObject<{
5
+ hosted: z.ZodOptional<z.ZodObject<{
6
+ id: z.ZodString;
7
+ name: z.ZodString;
8
+ status: z.ZodString;
9
+ uptime: z.ZodString;
10
+ app_url: z.ZodNullable<z.ZodString>;
11
+ app_id: z.ZodString;
12
+ instance_id: z.ZodNullable<z.ZodString>;
13
+ configuration: z.ZodOptional<z.ZodAny>;
14
+ exited_at: z.ZodNullable<z.ZodString>;
15
+ boot_progress: z.ZodNullable<z.ZodString>;
16
+ boot_error: z.ZodNullable<z.ZodString>;
17
+ shutdown_progress: z.ZodNullable<z.ZodString>;
18
+ image_version: z.ZodNullable<z.ZodString>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ status: string;
21
+ name: string;
22
+ id: string;
23
+ app_id: string;
24
+ instance_id: string | null;
25
+ app_url: string | null;
26
+ uptime: string;
27
+ exited_at: string | null;
28
+ boot_progress: string | null;
29
+ boot_error: string | null;
30
+ shutdown_progress: string | null;
31
+ image_version: string | null;
32
+ configuration?: any;
33
+ }, {
34
+ status: string;
35
+ name: string;
36
+ id: string;
37
+ app_id: string;
38
+ instance_id: string | null;
39
+ app_url: string | null;
40
+ uptime: string;
41
+ exited_at: string | null;
42
+ boot_progress: string | null;
43
+ boot_error: string | null;
44
+ shutdown_progress: string | null;
45
+ image_version: string | null;
46
+ configuration?: any;
47
+ }>>;
48
+ name: z.ZodOptional<z.ZodString>;
49
+ managed_user: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{
50
+ id: z.ZodNumber;
51
+ username: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ id: number;
54
+ username: string;
55
+ }, {
56
+ id: number;
57
+ username: string;
58
+ }>>>>;
59
+ node: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{
60
+ id: z.ZodNumber;
61
+ name: z.ZodString;
62
+ region_identifier: z.ZodOptional<z.ZodString>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ name: string;
65
+ id: number;
66
+ region_identifier?: string | undefined;
67
+ }, {
68
+ name: string;
69
+ id: number;
70
+ region_identifier?: string | undefined;
71
+ }>>>>;
72
+ listed: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
73
+ status: z.ZodOptional<z.ZodString>;
74
+ in_progress: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
75
+ dapp_dashboard_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ syslog_endpoint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
77
+ allow_upgrade: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
78
+ project_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ project_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ billing_period: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
+ kms_info: z.ZodOptional<z.ZodNullable<z.ZodObject<{
82
+ id: z.ZodString;
83
+ slug: z.ZodString;
84
+ url: z.ZodString;
85
+ version: z.ZodString;
86
+ chain_id: z.ZodOptional<z.ZodNumber>;
87
+ kms_contract_address: z.ZodOptional<z.ZodString>;
88
+ gateway_app_id: z.ZodOptional<z.ZodString>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ version: string;
91
+ id: string;
92
+ slug: string;
93
+ url: string;
94
+ chain_id?: number | undefined;
95
+ kms_contract_address?: string | undefined;
96
+ gateway_app_id?: string | undefined;
97
+ }, {
98
+ version: string;
99
+ id: string;
100
+ slug: string;
101
+ url: string;
102
+ chain_id?: number | undefined;
103
+ kms_contract_address?: string | undefined;
104
+ gateway_app_id?: string | undefined;
105
+ }>>>;
106
+ vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
107
+ memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
108
+ disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
109
+ gateway_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
+ public_urls: z.ZodOptional<z.ZodArray<z.ZodObject<{
111
+ app: z.ZodString;
112
+ instance: z.ZodString;
113
+ }, "strip", z.ZodTypeAny, {
114
+ app: string;
115
+ instance: string;
116
+ }, {
117
+ app: string;
118
+ instance: string;
119
+ }>, "many">>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ status?: string | undefined;
122
+ name?: string | undefined;
123
+ listed?: boolean | undefined;
124
+ vcpu?: number | null | undefined;
125
+ memory?: number | null | undefined;
126
+ disk_size?: number | null | undefined;
127
+ kms_info?: {
128
+ version: string;
129
+ id: string;
130
+ slug: string;
131
+ url: string;
132
+ chain_id?: number | undefined;
133
+ kms_contract_address?: string | undefined;
134
+ gateway_app_id?: string | undefined;
135
+ } | null | undefined;
136
+ hosted?: {
137
+ status: string;
138
+ name: string;
139
+ id: string;
140
+ app_id: string;
141
+ instance_id: string | null;
142
+ app_url: string | null;
143
+ uptime: string;
144
+ exited_at: string | null;
145
+ boot_progress: string | null;
146
+ boot_error: string | null;
147
+ shutdown_progress: string | null;
148
+ image_version: string | null;
149
+ configuration?: any;
150
+ } | undefined;
151
+ managed_user?: {
152
+ id: number;
153
+ username: string;
154
+ } | null | undefined;
155
+ node?: {
156
+ name: string;
157
+ id: number;
158
+ region_identifier?: string | undefined;
159
+ } | null | undefined;
160
+ in_progress?: boolean | undefined;
161
+ dapp_dashboard_url?: string | null | undefined;
162
+ syslog_endpoint?: string | null | undefined;
163
+ allow_upgrade?: boolean | undefined;
164
+ project_id?: string | null | undefined;
165
+ project_type?: string | null | undefined;
166
+ billing_period?: string | null | undefined;
167
+ gateway_domain?: string | null | undefined;
168
+ public_urls?: {
169
+ app: string;
170
+ instance: string;
171
+ }[] | undefined;
172
+ }, {
173
+ status?: string | undefined;
174
+ name?: string | undefined;
175
+ listed?: boolean | undefined;
176
+ vcpu?: number | null | undefined;
177
+ memory?: number | null | undefined;
178
+ disk_size?: number | null | undefined;
179
+ kms_info?: {
180
+ version: string;
181
+ id: string;
182
+ slug: string;
183
+ url: string;
184
+ chain_id?: number | undefined;
185
+ kms_contract_address?: string | undefined;
186
+ gateway_app_id?: string | undefined;
187
+ } | null | undefined;
188
+ hosted?: {
189
+ status: string;
190
+ name: string;
191
+ id: string;
192
+ app_id: string;
193
+ instance_id: string | null;
194
+ app_url: string | null;
195
+ uptime: string;
196
+ exited_at: string | null;
197
+ boot_progress: string | null;
198
+ boot_error: string | null;
199
+ shutdown_progress: string | null;
200
+ image_version: string | null;
201
+ configuration?: any;
202
+ } | undefined;
203
+ managed_user?: {
204
+ id: number;
205
+ username: string;
206
+ } | null | undefined;
207
+ node?: {
208
+ name: string;
209
+ id: number;
210
+ region_identifier?: string | undefined;
211
+ } | null | undefined;
212
+ in_progress?: boolean | undefined;
213
+ dapp_dashboard_url?: string | null | undefined;
214
+ syslog_endpoint?: string | null | undefined;
215
+ allow_upgrade?: boolean | undefined;
216
+ project_id?: string | null | undefined;
217
+ project_type?: string | null | undefined;
218
+ billing_period?: string | null | undefined;
219
+ gateway_domain?: string | null | undefined;
220
+ public_urls?: {
221
+ app: string;
222
+ instance: string;
223
+ }[] | undefined;
224
+ }>;
225
+ export type GetCvmInfoResponse = z.infer<typeof GetCvmInfoSchema>;
226
+ export declare const GetCvmInfoRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
227
+ id: z.ZodOptional<z.ZodString>;
228
+ uuid: z.ZodOptional<z.ZodString>;
229
+ app_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
230
+ instance_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
231
+ }, "strip", z.ZodTypeAny, {
232
+ id?: string | undefined;
233
+ app_id?: string | undefined;
234
+ instance_id?: string | undefined;
235
+ uuid?: string | undefined;
236
+ }, {
237
+ id?: string | undefined;
238
+ app_id?: string | undefined;
239
+ instance_id?: string | undefined;
240
+ uuid?: string | undefined;
241
+ }>, {
242
+ id?: string | undefined;
243
+ app_id?: string | undefined;
244
+ instance_id?: string | undefined;
245
+ uuid?: string | undefined;
246
+ }, {
247
+ id?: string | undefined;
248
+ app_id?: string | undefined;
249
+ instance_id?: string | undefined;
250
+ uuid?: string | undefined;
251
+ }>, {
252
+ cvmId: string | undefined;
253
+ _raw: {
254
+ id?: string | undefined;
255
+ app_id?: string | undefined;
256
+ instance_id?: string | undefined;
257
+ uuid?: string | undefined;
258
+ };
259
+ }, {
260
+ id?: string | undefined;
261
+ app_id?: string | undefined;
262
+ instance_id?: string | undefined;
263
+ uuid?: string | undefined;
264
+ }>;
265
+ export type GetCvmInfoRequest = {
266
+ id?: string;
267
+ uuid?: string;
268
+ app_id?: string;
269
+ instance_id?: string;
270
+ };
271
+ export type GetCvmInfoParameters<T = undefined> = ActionParameters<T>;
272
+ export type GetCvmInfoReturnType<T = undefined> = ActionReturnType<GetCvmInfoResponse, T>;
273
+ /**
274
+ * Get information about a specific CVM
275
+ *
276
+ * @param client - The API client
277
+ * @param request - Request parameters
278
+ * @param request.cvmId - ID of the CVM to get information for
279
+ * @param parameters - Optional behavior parameters
280
+ * @returns CVM information
281
+ *
282
+ * @example
283
+ * ```typescript
284
+ * const info = await getCvmInfo(client, { cvmId: "cvm-123" })
285
+ * ```
286
+ */
287
+ export declare function getCvmInfo<T extends z.ZodSchema | false | undefined = undefined>(client: Client, request: GetCvmInfoRequest, parameters?: GetCvmInfoParameters<T>): Promise<GetCvmInfoReturnType<T>>;
288
+ /**
289
+ * Safe version of getCvmInfo that returns a Result type instead of throwing
290
+ */
291
+ export declare function safeGetCvmInfo<T extends z.ZodSchema | false | undefined = undefined>(client: Client, request: GetCvmInfoRequest, parameters?: GetCvmInfoParameters<T>): Promise<SafeResult<GetCvmInfoReturnType<T>>>;
292
+ //# sourceMappingURL=get_cvm_info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get_cvm_info.d.ts","sourceRoot":"","sources":["../../src/actions/get_cvm_info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGrE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgB,CAAC;AAE9C,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAElE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B/B,CAAC;AAEN,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,SAAS,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEtE,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,SAAS,IAAI,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC;AAE1F;;;;;;;;;;;;;GAaG;AACH,wBAAsB,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,EACpF,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,UAAU,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GACnC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAYlC;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,EACxF,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,UAAU,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,GACnC,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAwB9C"}