@phala/cloud 0.3.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.
Files changed (112) hide show
  1. package/README.md +20 -0
  2. package/dist/actions/api_tokens/revoke_current_api_token.d.ts +47 -0
  3. package/dist/actions/apps/app_launch_token.d.ts +121 -0
  4. package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +17 -311
  5. package/dist/actions/apps/check_app_is_allowed.d.ts +20 -32
  6. package/dist/actions/apps/create_app_instance.d.ts +43 -63
  7. package/dist/actions/apps/get_app_attestation.d.ts +116 -772
  8. package/dist/actions/apps/get_app_cvms.d.ts +1 -5
  9. package/dist/actions/apps/get_app_device_allowlist.d.ts +26 -272
  10. package/dist/actions/apps/get_app_filter_options.d.ts +8 -24
  11. package/dist/actions/apps/get_app_info.d.ts +1 -5
  12. package/dist/actions/apps/get_app_list.d.ts +2 -26
  13. package/dist/actions/apps/get_app_revision_detail.d.ts +1 -9
  14. package/dist/actions/apps/get_app_revisions.d.ts +1 -9
  15. package/dist/actions/blockchains/add_compose_hash.d.ts +1 -13
  16. package/dist/actions/blockchains/add_device.d.ts +1 -13
  17. package/dist/actions/blockchains/deploy_app_auth.d.ts +3 -95
  18. package/dist/actions/blockchains/get_allowed_devices.d.ts +2 -12
  19. package/dist/actions/blockchains/remove_device.d.ts +1 -13
  20. package/dist/actions/blockchains/set_allow_any_device.d.ts +1 -13
  21. package/dist/actions/cvms/check_cvm_is_allowed.d.ts +13 -138
  22. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +9 -45
  23. package/dist/actions/cvms/commit_cvm_provision.d.ts +32 -416
  24. package/dist/actions/cvms/commit_cvm_update.d.ts +70 -41
  25. package/dist/actions/cvms/confirm_cvm_patch.d.ts +62 -35
  26. package/dist/actions/cvms/cvm_annotations.d.ts +152 -0
  27. package/dist/actions/cvms/delete_cvm.d.ts +8 -14
  28. package/dist/actions/cvms/get_available_os_images.d.ts +70 -111
  29. package/dist/actions/cvms/get_cvm_attestation.d.ts +34 -392
  30. package/dist/actions/cvms/get_cvm_compose_file.d.ts +426 -512
  31. package/dist/actions/cvms/get_cvm_containers_stats.d.ts +25 -91
  32. package/dist/actions/cvms/get_cvm_docker_compose.d.ts +8 -14
  33. package/dist/actions/cvms/get_cvm_info.d.ts +6 -12
  34. package/dist/actions/cvms/get_cvm_init_scripts.d.ts +87 -0
  35. package/dist/actions/cvms/get_cvm_list.d.ts +9 -17
  36. package/dist/actions/cvms/get_cvm_network.d.ts +18 -50
  37. package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +8 -14
  38. package/dist/actions/cvms/get_cvm_state.d.ts +11 -37
  39. package/dist/actions/cvms/get_cvm_stats.d.ts +23 -149
  40. package/dist/actions/cvms/get_cvm_status_batch.d.ts +97 -64
  41. package/dist/actions/cvms/get_cvm_user_config.d.ts +13 -24
  42. package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +9 -27
  43. package/dist/actions/cvms/patch_cvm.d.ts +666 -287
  44. package/dist/actions/cvms/provision_cvm.d.ts +339 -725
  45. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +584 -777
  46. package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +74 -131
  47. package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +77 -297
  48. package/dist/actions/cvms/replicate_cvm.d.ts +7 -21
  49. package/dist/actions/cvms/restart_cvm.d.ts +3 -18
  50. package/dist/actions/cvms/shutdown_cvm.d.ts +6 -12
  51. package/dist/actions/cvms/start_cvm.d.ts +6 -12
  52. package/dist/actions/cvms/stop_cvm.d.ts +6 -12
  53. package/dist/actions/cvms/update_cvm_envs.d.ts +144 -195
  54. package/dist/actions/cvms/update_cvm_resources.d.ts +93 -37
  55. package/dist/actions/cvms/update_cvm_visibility.d.ts +90 -130
  56. package/dist/actions/cvms/update_docker_compose.d.ts +143 -187
  57. package/dist/actions/cvms/update_os_image.d.ts +55 -28
  58. package/dist/actions/cvms/update_prelaunch_script.d.ts +143 -187
  59. package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +126 -185
  60. package/dist/actions/cvms/watch_cvm_state.d.ts +5 -15
  61. package/dist/actions/get_available_nodes.d.ts +201 -823
  62. package/dist/actions/get_cvm_create_resources.d.ts +150 -2150
  63. package/dist/actions/index.d.ts +14 -4
  64. package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +11 -23
  65. package/dist/actions/kms/get_kms_contract.d.ts +57 -0
  66. package/dist/actions/kms/get_kms_info.d.ts +3 -7
  67. package/dist/actions/kms/get_kms_list.d.ts +43 -82
  68. package/dist/actions/kms/get_kms_onchain_detail.d.ts +72 -616
  69. package/dist/actions/kms/list_kms_contract_nodes.d.ts +66 -0
  70. package/dist/actions/kms/list_kms_contracts.d.ts +98 -0
  71. package/dist/actions/kms/next_app_ids.d.ts +5 -25
  72. package/dist/actions/list-instance-types.d.ts +77 -257
  73. package/dist/actions/os_images/get_os_images.d.ts +38 -152
  74. package/dist/actions/ssh_keys/create_ssh_key.d.ts +11 -17
  75. package/dist/actions/ssh_keys/delete_ssh_key.d.ts +3 -7
  76. package/dist/actions/ssh_keys/get_cvm_ssh_keys.d.ts +113 -0
  77. package/dist/actions/ssh_keys/import_github_profile.d.ts +7 -21
  78. package/dist/actions/ssh_keys/list_ssh_keys.d.ts +2 -50
  79. package/dist/actions/ssh_keys/sync_github_ssh_keys.d.ts +8 -20
  80. package/dist/actions/ssh_keys/update_cvm_ssh_keys.d.ts +140 -0
  81. package/dist/actions/workspaces/get_workspace.d.ts +32 -24
  82. package/dist/actions/workspaces/get_workspace_nodes.d.ts +56 -182
  83. package/dist/actions/workspaces/get_workspace_quotas.d.ts +107 -1021
  84. package/dist/actions/workspaces/list_workspaces.d.ts +69 -245
  85. package/dist/client.d.ts +27 -5
  86. package/dist/create-client.d.ts +1820 -1
  87. package/dist/credentials/current_user_v20251028.d.ts +1 -17
  88. package/dist/credentials/current_user_v20260121.d.ts +22 -227
  89. package/dist/index.d.ts +1 -2
  90. package/dist/index.js +5454 -4389
  91. package/dist/index.mjs +5396 -4395
  92. package/dist/types/app_compose.d.ts +116 -184
  93. package/dist/types/app_info_v20251028.d.ts +29 -1030
  94. package/dist/types/app_info_v20260121.d.ts +686 -6832
  95. package/dist/types/app_revision.d.ts +15 -371
  96. package/dist/types/client.d.ts +18 -2
  97. package/dist/types/common.d.ts +6 -0
  98. package/dist/types/cvm_id.d.ts +12 -57
  99. package/dist/types/cvm_info.d.ts +33 -460
  100. package/dist/types/cvm_info_v20251028.d.ts +102 -800
  101. package/dist/types/cvm_info_v20260121.d.ts +411 -2347
  102. package/dist/types/kms_contract.d.ts +34 -0
  103. package/dist/types/kms_info.d.ts +34 -60
  104. package/dist/types/version-mappings.d.ts +6 -6
  105. package/dist/utils/define-action.d.ts +4 -4
  106. package/dist/utils/error_codes.d.ts +1 -0
  107. package/dist/utils/errors.d.ts +34 -37
  108. package/dist/utils/get_compose_hash.d.ts +59 -4
  109. package/dist/utils/get_mr_config_id.d.ts +146 -0
  110. package/dist/utils/index.d.ts +3 -2
  111. package/dist/utils/placement-request.d.ts +3 -0
  112. package/package.json +4 -4
@@ -6,35 +6,13 @@ export declare const OSImagePublicSchema: z.ZodObject<{
6
6
  os_image_hash: z.ZodNullable<z.ZodString>;
7
7
  is_dev: z.ZodBoolean;
8
8
  requires_gpu: z.ZodBoolean;
9
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
10
- name: z.ZodString;
11
- slug: z.ZodString;
12
- version: z.ZodString;
13
- os_image_hash: z.ZodNullable<z.ZodString>;
14
- is_dev: z.ZodBoolean;
15
- requires_gpu: z.ZodBoolean;
16
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
17
- name: z.ZodString;
18
- slug: z.ZodString;
19
- version: z.ZodString;
20
- os_image_hash: z.ZodNullable<z.ZodString>;
21
- is_dev: z.ZodBoolean;
22
- requires_gpu: z.ZodBoolean;
23
- }, z.ZodTypeAny, "passthrough">>;
9
+ }, z.core.$loose>;
24
10
  export type OSImagePublic = z.infer<typeof OSImagePublicSchema>;
25
11
  export declare const GetOsImagesRequestSchema: z.ZodObject<{
26
12
  page: z.ZodOptional<z.ZodNumber>;
27
13
  page_size: z.ZodOptional<z.ZodNumber>;
28
14
  is_dev: z.ZodOptional<z.ZodBoolean>;
29
- }, "strict", z.ZodTypeAny, {
30
- page?: number | undefined;
31
- page_size?: number | undefined;
32
- is_dev?: boolean | undefined;
33
- }, {
34
- page?: number | undefined;
35
- page_size?: number | undefined;
36
- is_dev?: boolean | undefined;
37
- }>;
15
+ }, z.core.$strict>;
38
16
  export type GetOsImagesRequest = z.infer<typeof GetOsImagesRequestSchema>;
39
17
  export declare const GetOsImagesResponseSchema: z.ZodObject<{
40
18
  items: z.ZodArray<z.ZodObject<{
@@ -44,121 +22,41 @@ export declare const GetOsImagesResponseSchema: z.ZodObject<{
44
22
  os_image_hash: z.ZodNullable<z.ZodString>;
45
23
  is_dev: z.ZodBoolean;
46
24
  requires_gpu: z.ZodBoolean;
47
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
48
- name: z.ZodString;
49
- slug: z.ZodString;
50
- version: z.ZodString;
51
- os_image_hash: z.ZodNullable<z.ZodString>;
52
- is_dev: z.ZodBoolean;
53
- requires_gpu: z.ZodBoolean;
54
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
55
- name: z.ZodString;
56
- slug: z.ZodString;
57
- version: z.ZodString;
58
- os_image_hash: z.ZodNullable<z.ZodString>;
59
- is_dev: z.ZodBoolean;
60
- requires_gpu: z.ZodBoolean;
61
- }, z.ZodTypeAny, "passthrough">>, "many">;
62
- total: z.ZodNumber;
63
- page: z.ZodNumber;
64
- page_size: z.ZodNumber;
65
- pages: z.ZodNumber;
66
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
67
- items: z.ZodArray<z.ZodObject<{
68
- name: z.ZodString;
69
- slug: z.ZodString;
70
- version: z.ZodString;
71
- os_image_hash: z.ZodNullable<z.ZodString>;
72
- is_dev: z.ZodBoolean;
73
- requires_gpu: z.ZodBoolean;
74
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
75
- name: z.ZodString;
76
- slug: z.ZodString;
77
- version: z.ZodString;
78
- os_image_hash: z.ZodNullable<z.ZodString>;
79
- is_dev: z.ZodBoolean;
80
- requires_gpu: z.ZodBoolean;
81
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
82
- name: z.ZodString;
83
- slug: z.ZodString;
84
- version: z.ZodString;
85
- os_image_hash: z.ZodNullable<z.ZodString>;
86
- is_dev: z.ZodBoolean;
87
- requires_gpu: z.ZodBoolean;
88
- }, z.ZodTypeAny, "passthrough">>, "many">;
89
- total: z.ZodNumber;
90
- page: z.ZodNumber;
91
- page_size: z.ZodNumber;
92
- pages: z.ZodNumber;
93
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
94
- items: z.ZodArray<z.ZodObject<{
95
- name: z.ZodString;
96
- slug: z.ZodString;
97
- version: z.ZodString;
98
- os_image_hash: z.ZodNullable<z.ZodString>;
99
- is_dev: z.ZodBoolean;
100
- requires_gpu: z.ZodBoolean;
101
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
102
- name: z.ZodString;
103
- slug: z.ZodString;
104
- version: z.ZodString;
105
- os_image_hash: z.ZodNullable<z.ZodString>;
106
- is_dev: z.ZodBoolean;
107
- requires_gpu: z.ZodBoolean;
108
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
109
- name: z.ZodString;
110
- slug: z.ZodString;
111
- version: z.ZodString;
112
- os_image_hash: z.ZodNullable<z.ZodString>;
113
- is_dev: z.ZodBoolean;
114
- requires_gpu: z.ZodBoolean;
115
- }, z.ZodTypeAny, "passthrough">>, "many">;
25
+ }, z.core.$loose>>;
116
26
  total: z.ZodNumber;
117
27
  page: z.ZodNumber;
118
28
  page_size: z.ZodNumber;
119
29
  pages: z.ZodNumber;
120
- }, z.ZodTypeAny, "passthrough">>;
30
+ }, z.core.$loose>;
121
31
  export type GetOsImagesResponse = z.infer<typeof GetOsImagesResponseSchema>;
122
32
  declare const getOsImages: {
123
33
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: {
124
34
  page?: number | undefined;
125
35
  page_size?: number | undefined;
126
36
  is_dev?: boolean | undefined;
127
- } | undefined): Promise<z.objectOutputType<{
128
- items: z.ZodArray<z.ZodObject<{
129
- name: z.ZodString;
130
- slug: z.ZodString;
131
- version: z.ZodString;
132
- os_image_hash: z.ZodNullable<z.ZodString>;
133
- is_dev: z.ZodBoolean;
134
- requires_gpu: z.ZodBoolean;
135
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
136
- name: z.ZodString;
137
- slug: z.ZodString;
138
- version: z.ZodString;
139
- os_image_hash: z.ZodNullable<z.ZodString>;
140
- is_dev: z.ZodBoolean;
141
- requires_gpu: z.ZodBoolean;
142
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
143
- name: z.ZodString;
144
- slug: z.ZodString;
145
- version: z.ZodString;
146
- os_image_hash: z.ZodNullable<z.ZodString>;
147
- is_dev: z.ZodBoolean;
148
- requires_gpu: z.ZodBoolean;
149
- }, z.ZodTypeAny, "passthrough">>, "many">;
150
- total: z.ZodNumber;
151
- page: z.ZodNumber;
152
- page_size: z.ZodNumber;
153
- pages: z.ZodNumber;
154
- }, z.ZodTypeAny, "passthrough">>;
37
+ } | undefined): Promise<{
38
+ [x: string]: unknown;
39
+ items: {
40
+ [x: string]: unknown;
41
+ name: string;
42
+ slug: string;
43
+ version: string;
44
+ os_image_hash: string | null;
45
+ is_dev: boolean;
46
+ requires_gpu: boolean;
47
+ }[];
48
+ total: number;
49
+ page: number;
50
+ page_size: number;
51
+ pages: number;
52
+ }>;
155
53
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: {
156
54
  page?: number | undefined;
157
55
  page_size?: number | undefined;
158
56
  is_dev?: boolean | undefined;
159
57
  } | undefined, parameters?: {
160
58
  schema: T;
161
- } | undefined): Promise<z.TypeOf<T>>;
59
+ } | undefined): Promise<z.core.output<T>>;
162
60
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: {
163
61
  page?: number | undefined;
164
62
  page_size?: number | undefined;
@@ -171,41 +69,29 @@ declare const getOsImages: {
171
69
  page?: number | undefined;
172
70
  page_size?: number | undefined;
173
71
  is_dev?: boolean | undefined;
174
- } | undefined): Promise<import("../..").SafeResult<z.objectOutputType<{
175
- items: z.ZodArray<z.ZodObject<{
176
- name: z.ZodString;
177
- slug: z.ZodString;
178
- version: z.ZodString;
179
- os_image_hash: z.ZodNullable<z.ZodString>;
180
- is_dev: z.ZodBoolean;
181
- requires_gpu: z.ZodBoolean;
182
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
183
- name: z.ZodString;
184
- slug: z.ZodString;
185
- version: z.ZodString;
186
- os_image_hash: z.ZodNullable<z.ZodString>;
187
- is_dev: z.ZodBoolean;
188
- requires_gpu: z.ZodBoolean;
189
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
190
- name: z.ZodString;
191
- slug: z.ZodString;
192
- version: z.ZodString;
193
- os_image_hash: z.ZodNullable<z.ZodString>;
194
- is_dev: z.ZodBoolean;
195
- requires_gpu: z.ZodBoolean;
196
- }, z.ZodTypeAny, "passthrough">>, "many">;
197
- total: z.ZodNumber;
198
- page: z.ZodNumber;
199
- page_size: z.ZodNumber;
200
- pages: z.ZodNumber;
201
- }, z.ZodTypeAny, "passthrough">>>;
72
+ } | undefined): Promise<import("../..").SafeResult<{
73
+ [x: string]: unknown;
74
+ items: {
75
+ [x: string]: unknown;
76
+ name: string;
77
+ slug: string;
78
+ version: string;
79
+ os_image_hash: string | null;
80
+ is_dev: boolean;
81
+ requires_gpu: boolean;
82
+ }[];
83
+ total: number;
84
+ page: number;
85
+ page_size: number;
86
+ pages: number;
87
+ }>>;
202
88
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: {
203
89
  page?: number | undefined;
204
90
  page_size?: number | undefined;
205
91
  is_dev?: boolean | undefined;
206
92
  } | undefined, parameters?: {
207
93
  schema: T;
208
- } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
94
+ } | undefined): Promise<import("../..").SafeResult<z.core.output<T>>>;
209
95
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: {
210
96
  page?: number | undefined;
211
97
  page_size?: number | undefined;
@@ -2,13 +2,7 @@ import { z } from "zod";
2
2
  export declare const CreateSshKeyRequestSchema: z.ZodObject<{
3
3
  name: z.ZodString;
4
4
  public_key: z.ZodString;
5
- }, "strip", z.ZodTypeAny, {
6
- name: string;
7
- public_key: string;
8
- }, {
9
- name: string;
10
- public_key: string;
11
- }>;
5
+ }, z.core.$strip>;
12
6
  export type CreateSshKeyRequest = z.infer<typeof CreateSshKeyRequestSchema>;
13
7
  /**
14
8
  * Create a new SSH key for the current user
@@ -47,15 +41,15 @@ declare const createSshKey: {
47
41
  name: string;
48
42
  public_key: string;
49
43
  }): Promise<{
50
- name: string;
51
44
  id: string;
52
- source: string;
53
- created_at: string;
54
45
  user_id: string;
55
- updated_at: string;
46
+ name: string;
56
47
  public_key: string;
57
48
  fingerprint: string;
58
49
  key_type: string;
50
+ source: string;
51
+ created_at: string;
52
+ updated_at: string;
59
53
  key_metadata?: Record<string, unknown> | null | undefined;
60
54
  last_synced_at?: string | null | undefined;
61
55
  }>;
@@ -64,7 +58,7 @@ declare const createSshKey: {
64
58
  public_key: string;
65
59
  }, parameters: {
66
60
  schema: T;
67
- }): Promise<z.TypeOf<T>>;
61
+ }): Promise<z.core.output<T>>;
68
62
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
69
63
  name: string;
70
64
  public_key: string;
@@ -76,15 +70,15 @@ declare const createSshKey: {
76
70
  name: string;
77
71
  public_key: string;
78
72
  }): Promise<import("../..").SafeResult<{
79
- name: string;
80
73
  id: string;
81
- source: string;
82
- created_at: string;
83
74
  user_id: string;
84
- updated_at: string;
75
+ name: string;
85
76
  public_key: string;
86
77
  fingerprint: string;
87
78
  key_type: string;
79
+ source: string;
80
+ created_at: string;
81
+ updated_at: string;
88
82
  key_metadata?: Record<string, unknown> | null | undefined;
89
83
  last_synced_at?: string | null | undefined;
90
84
  }>>;
@@ -93,7 +87,7 @@ declare const createSshKey: {
93
87
  public_key: string;
94
88
  }, parameters: {
95
89
  schema: T;
96
- }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
90
+ }): Promise<import("../..").SafeResult<z.core.output<T>>>;
97
91
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
98
92
  name: string;
99
93
  public_key: string;
@@ -1,11 +1,7 @@
1
1
  import { z } from "zod";
2
2
  export declare const DeleteSshKeyRequestSchema: z.ZodObject<{
3
3
  keyId: z.ZodString;
4
- }, "strip", z.ZodTypeAny, {
5
- keyId: string;
6
- }, {
7
- keyId: string;
8
- }>;
4
+ }, z.core.$strip>;
9
5
  export type DeleteSshKeyRequest = z.infer<typeof DeleteSshKeyRequestSchema>;
10
6
  /**
11
7
  * Delete an SSH key
@@ -41,7 +37,7 @@ declare const deleteSshKey: {
41
37
  keyId: string;
42
38
  }, parameters: {
43
39
  schema: T;
44
- }): Promise<z.TypeOf<T>>;
40
+ }): Promise<z.core.output<T>>;
45
41
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
46
42
  keyId: string;
47
43
  }, parameters: {
@@ -55,7 +51,7 @@ declare const deleteSshKey: {
55
51
  keyId: string;
56
52
  }, parameters: {
57
53
  schema: T;
58
- }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
54
+ }): Promise<import("../..").SafeResult<z.core.output<T>>>;
59
55
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
60
56
  keyId: string;
61
57
  }, parameters: {
@@ -0,0 +1,113 @@
1
+ import { z } from "zod";
2
+ import { type CvmIdInput } from "../../types/cvm_id";
3
+ export declare const CvmSshKeySchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ owner_user_id: z.ZodString;
6
+ owner_username: z.ZodString;
7
+ added_by_user_id: z.ZodString;
8
+ name: z.ZodString;
9
+ public_key: z.ZodString;
10
+ fingerprint: z.ZodString;
11
+ key_type: z.ZodString;
12
+ }, z.core.$strip>;
13
+ export type CvmSshKey = z.infer<typeof CvmSshKeySchema>;
14
+ export declare const CvmSshKeysResponseSchema: z.ZodObject<{
15
+ keys: z.ZodArray<z.ZodObject<{
16
+ id: z.ZodString;
17
+ owner_user_id: z.ZodString;
18
+ owner_username: z.ZodString;
19
+ added_by_user_id: z.ZodString;
20
+ name: z.ZodString;
21
+ public_key: z.ZodString;
22
+ fingerprint: z.ZodString;
23
+ key_type: z.ZodString;
24
+ }, z.core.$strip>>;
25
+ restart_required: z.ZodBoolean;
26
+ }, z.core.$strip>;
27
+ export type CvmSshKeysResponse = z.infer<typeof CvmSshKeysResponseSchema>;
28
+ export declare const GetCvmSshKeysRequestSchema: z.ZodPipe<z.ZodObject<{
29
+ id: z.ZodOptional<z.ZodString>;
30
+ uuid: z.ZodOptional<z.ZodString>;
31
+ app_id: z.ZodOptional<z.ZodString>;
32
+ instance_id: z.ZodOptional<z.ZodString>;
33
+ name: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strip>, z.ZodTransform<{
35
+ cvmId: string;
36
+ }, {
37
+ id?: string | undefined;
38
+ uuid?: string | undefined;
39
+ app_id?: string | undefined;
40
+ instance_id?: string | undefined;
41
+ name?: string | undefined;
42
+ }>>;
43
+ export type GetCvmSshKeysRequest = CvmIdInput;
44
+ /**
45
+ * List the SSH keys a CVM is configured to authorize.
46
+ *
47
+ * This is the stored set. It reaches the guest at the next power-on; read
48
+ * `getCvmUserConfig` for what the running VM actually has.
49
+ *
50
+ * @example
51
+ * ```typescript
52
+ * import { createClient, getCvmSshKeys } from '@phala/cloud'
53
+ *
54
+ * const client = createClient({ apiKey: 'your-api-key' })
55
+ * const result = await getCvmSshKeys(client, { id: 'app_123' })
56
+ * for (const key of result.keys) {
57
+ * console.log(key.owner_username, key.fingerprint)
58
+ * }
59
+ * ```
60
+ *
61
+ * ## Safe Version
62
+ *
63
+ * ```typescript
64
+ * const result = await safeGetCvmSshKeys(client, { id: 'app_123' })
65
+ * if (result.success) {
66
+ * console.log(result.data.restart_required)
67
+ * } else {
68
+ * console.error(result.error.message)
69
+ * }
70
+ * ```
71
+ */
72
+ declare const getCvmSshKeys: {
73
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<{
74
+ keys: {
75
+ id: string;
76
+ owner_user_id: string;
77
+ owner_username: string;
78
+ added_by_user_id: string;
79
+ name: string;
80
+ public_key: string;
81
+ fingerprint: string;
82
+ key_type: string;
83
+ }[];
84
+ restart_required: boolean;
85
+ }>;
86
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
87
+ schema: T;
88
+ }): Promise<z.core.output<T>>;
89
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
90
+ schema: false;
91
+ }): Promise<unknown>;
92
+ }, safeGetCvmSshKeys: {
93
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<{
94
+ keys: {
95
+ id: string;
96
+ owner_user_id: string;
97
+ owner_username: string;
98
+ added_by_user_id: string;
99
+ name: string;
100
+ public_key: string;
101
+ fingerprint: string;
102
+ key_type: string;
103
+ }[];
104
+ restart_required: boolean;
105
+ }>>;
106
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
107
+ schema: T;
108
+ }): Promise<import("../..").SafeResult<z.core.output<T>>>;
109
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
110
+ schema: false;
111
+ }): Promise<import("../..").SafeResult<unknown>>;
112
+ };
113
+ export { getCvmSshKeys, safeGetCvmSshKeys };
@@ -1,28 +1,14 @@
1
1
  import { z } from "zod";
2
2
  export declare const ImportGithubProfileRequestSchema: z.ZodObject<{
3
3
  github_username: z.ZodString;
4
- }, "strip", z.ZodTypeAny, {
5
- github_username: string;
6
- }, {
7
- github_username: string;
8
- }>;
4
+ }, z.core.$strip>;
9
5
  export type ImportGithubProfileRequest = z.infer<typeof ImportGithubProfileRequestSchema>;
10
6
  export declare const ImportGithubProfileResponseSchema: z.ZodObject<{
11
7
  github_username: z.ZodString;
12
8
  keys_added: z.ZodNumber;
13
9
  keys_skipped: z.ZodNumber;
14
- errors: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
15
- }, "strip", z.ZodTypeAny, {
16
- errors: string[];
17
- github_username: string;
18
- keys_added: number;
19
- keys_skipped: number;
20
- }, {
21
- github_username: string;
22
- keys_added: number;
23
- keys_skipped: number;
24
- errors?: string[] | undefined;
25
- }>;
10
+ errors: z.ZodDefault<z.ZodArray<z.ZodString>>;
11
+ }, z.core.$strip>;
26
12
  export type ImportGithubProfileResponse = z.infer<typeof ImportGithubProfileResponseSchema>;
27
13
  /**
28
14
  * Import SSH keys from a GitHub user's public profile
@@ -55,16 +41,16 @@ declare const importGithubProfileSshKeys: {
55
41
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
56
42
  github_username: string;
57
43
  }): Promise<{
58
- errors: string[];
59
44
  github_username: string;
60
45
  keys_added: number;
61
46
  keys_skipped: number;
47
+ errors: string[];
62
48
  }>;
63
49
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
64
50
  github_username: string;
65
51
  }, parameters: {
66
52
  schema: T;
67
- }): Promise<z.TypeOf<T>>;
53
+ }): Promise<z.core.output<T>>;
68
54
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
69
55
  github_username: string;
70
56
  }, parameters: {
@@ -74,16 +60,16 @@ declare const importGithubProfileSshKeys: {
74
60
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
75
61
  github_username: string;
76
62
  }): Promise<import("../..").SafeResult<{
77
- errors: string[];
78
63
  github_username: string;
79
64
  keys_added: number;
80
65
  keys_skipped: number;
66
+ errors: string[];
81
67
  }>>;
82
68
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
83
69
  github_username: string;
84
70
  }, parameters: {
85
71
  schema: T;
86
- }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
72
+ }): Promise<import("../..").SafeResult<z.core.output<T>>>;
87
73
  (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
88
74
  github_username: string;
89
75
  }, parameters: {
@@ -13,31 +13,7 @@ export declare const SshKeySchema: z.ZodObject<{
13
13
  last_synced_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
14
  created_at: z.ZodString;
15
15
  updated_at: z.ZodString;
16
- }, "strip", z.ZodTypeAny, {
17
- name: string;
18
- id: string;
19
- source: string;
20
- created_at: string;
21
- user_id: string;
22
- updated_at: string;
23
- public_key: string;
24
- fingerprint: string;
25
- key_type: string;
26
- key_metadata?: Record<string, unknown> | null | undefined;
27
- last_synced_at?: string | null | undefined;
28
- }, {
29
- name: string;
30
- id: string;
31
- source: string;
32
- created_at: string;
33
- user_id: string;
34
- updated_at: string;
35
- public_key: string;
36
- fingerprint: string;
37
- key_type: string;
38
- key_metadata?: Record<string, unknown> | null | undefined;
39
- last_synced_at?: string | null | undefined;
40
- }>;
16
+ }, z.core.$strip>;
41
17
  export type SshKey = z.infer<typeof SshKeySchema>;
42
18
  export declare const ListSshKeysResponseSchema: z.ZodArray<z.ZodObject<{
43
19
  id: z.ZodString;
@@ -51,31 +27,7 @@ export declare const ListSshKeysResponseSchema: z.ZodArray<z.ZodObject<{
51
27
  last_synced_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
28
  created_at: z.ZodString;
53
29
  updated_at: z.ZodString;
54
- }, "strip", z.ZodTypeAny, {
55
- name: string;
56
- id: string;
57
- source: string;
58
- created_at: string;
59
- user_id: string;
60
- updated_at: string;
61
- public_key: string;
62
- fingerprint: string;
63
- key_type: string;
64
- key_metadata?: Record<string, unknown> | null | undefined;
65
- last_synced_at?: string | null | undefined;
66
- }, {
67
- name: string;
68
- id: string;
69
- source: string;
70
- created_at: string;
71
- user_id: string;
72
- updated_at: string;
73
- public_key: string;
74
- fingerprint: string;
75
- key_type: string;
76
- key_metadata?: Record<string, unknown> | null | undefined;
77
- last_synced_at?: string | null | undefined;
78
- }>, "many">;
30
+ }, z.core.$strip>>;
79
31
  export type ListSshKeysResponse = z.infer<typeof ListSshKeysResponseSchema>;
80
32
  /**
81
33
  * List SSH keys for the current user
@@ -4,20 +4,8 @@ export declare const SyncGithubSshKeysResponseSchema: z.ZodObject<{
4
4
  keys_added: z.ZodNumber;
5
5
  keys_updated: z.ZodNumber;
6
6
  keys_removed: z.ZodNumber;
7
- errors: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8
- }, "strip", z.ZodTypeAny, {
9
- errors: string[];
10
- keys_added: number;
11
- synced_count: number;
12
- keys_updated: number;
13
- keys_removed: number;
14
- }, {
15
- keys_added: number;
16
- synced_count: number;
17
- keys_updated: number;
18
- keys_removed: number;
19
- errors?: string[] | undefined;
20
- }>;
7
+ errors: z.ZodDefault<z.ZodArray<z.ZodString>>;
8
+ }, z.core.$strip>;
21
9
  export type SyncGithubSshKeysResponse = z.infer<typeof SyncGithubSshKeysResponseSchema>;
22
10
  /**
23
11
  * Sync SSH keys from the user's linked GitHub account
@@ -52,13 +40,13 @@ declare const syncGithubSshKeys: {
52
40
  }): Promise<unknown>;
53
41
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, parameters: {
54
42
  schema: T;
55
- }): Promise<z.TypeOf<T>>;
43
+ }): Promise<z.core.output<T>>;
56
44
  (client: import("../..").BaseClient<import("../..").ApiVersion>): Promise<{
57
- errors: string[];
58
- keys_added: number;
59
45
  synced_count: number;
46
+ keys_added: number;
60
47
  keys_updated: number;
61
48
  keys_removed: number;
49
+ errors: string[];
62
50
  }>;
63
51
  }, safeSyncGithubSshKeys: {
64
52
  (client: import("../..").BaseClient<import("../..").ApiVersion>, parameters: {
@@ -66,13 +54,13 @@ declare const syncGithubSshKeys: {
66
54
  }): Promise<import("../..").SafeResult<unknown>>;
67
55
  <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, parameters: {
68
56
  schema: T;
69
- }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
57
+ }): Promise<import("../..").SafeResult<z.core.output<T>>>;
70
58
  (client: import("../..").BaseClient<import("../..").ApiVersion>): Promise<import("../..").SafeResult<{
71
- errors: string[];
72
- keys_added: number;
73
59
  synced_count: number;
60
+ keys_added: number;
74
61
  keys_updated: number;
75
62
  keys_removed: number;
63
+ errors: string[];
76
64
  }>>;
77
65
  };
78
66
  export { syncGithubSshKeys, safeSyncGithubSshKeys };