@phala/cloud 0.0.10 → 0.0.11

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/index.mjs CHANGED
@@ -1980,8 +1980,11 @@ async function safeAddComposeHash(request, parameters) {
1980
1980
  }
1981
1981
 
1982
1982
  // src/actions/get_cvm_compose_file.ts
1983
+ import { z as z11 } from "zod";
1984
+
1985
+ // src/types/app_compose.ts
1983
1986
  import { z as z10 } from "zod";
1984
- var GetCvmComposeFileResultSchema = z10.object({
1987
+ var LooseAppComposeSchema = z10.object({
1985
1988
  allowed_envs: z10.array(z10.string()).optional(),
1986
1989
  docker_compose_file: z10.string(),
1987
1990
  features: z10.array(z10.string()).optional(),
@@ -1993,14 +1996,16 @@ var GetCvmComposeFileResultSchema = z10.object({
1993
1996
  tproxy_enabled: z10.boolean().optional(),
1994
1997
  pre_launch_script: z10.string().optional()
1995
1998
  }).passthrough();
1996
- var GetCvmComposeFileRequestSchema = z10.object({
1997
- id: z10.string().optional(),
1998
- uuid: z10.string().regex(/^[0-9a-f]{8}[-]?[0-9a-f]{4}[-]?4[0-9a-f]{3}[-]?[89ab][0-9a-f]{3}[-]?[0-9a-f]{12}$/i).optional(),
1999
- app_id: z10.string().refine(
1999
+
2000
+ // src/actions/get_cvm_compose_file.ts
2001
+ var GetCvmComposeFileRequestSchema = z11.object({
2002
+ id: z11.string().optional(),
2003
+ uuid: z11.string().regex(/^[0-9a-f]{8}[-]?[0-9a-f]{4}[-]?4[0-9a-f]{3}[-]?[89ab][0-9a-f]{3}[-]?[0-9a-f]{12}$/i).optional(),
2004
+ app_id: z11.string().refine(
2000
2005
  (val) => !val.startsWith("app_") && val.length === 40,
2001
2006
  "app_id should be 40 characters without prefix"
2002
2007
  ).transform((val) => val.startsWith("app_") ? val : `app_${val}`).optional(),
2003
- instance_id: z10.string().refine(
2008
+ instance_id: z11.string().refine(
2004
2009
  (val) => !val.startsWith("instance_") && val.length === 40,
2005
2010
  "instance_id should be 40 characters without prefix"
2006
2011
  ).transform((val) => val.startsWith("instance_") ? val : `instance_${val}`).optional()
@@ -2017,7 +2022,7 @@ async function getCvmComposeFile(client, request, parameters) {
2017
2022
  if (parameters?.schema === false) {
2018
2023
  return response;
2019
2024
  }
2020
- const schema = parameters?.schema || GetCvmComposeFileResultSchema;
2025
+ const schema = parameters?.schema || LooseAppComposeSchema;
2021
2026
  return schema.parse(response);
2022
2027
  }
2023
2028
  async function safeGetCvmComposeFile(client, request, parameters) {
@@ -2032,44 +2037,38 @@ async function safeGetCvmComposeFile(client, request, parameters) {
2032
2037
  if (parameters?.schema === false) {
2033
2038
  return { success: true, data: httpResult.data };
2034
2039
  }
2035
- const schema = parameters?.schema || GetCvmComposeFileResultSchema;
2040
+ const schema = parameters?.schema || LooseAppComposeSchema;
2036
2041
  return schema.safeParse(httpResult.data);
2037
2042
  }
2038
2043
 
2039
2044
  // src/actions/provision_cvm_compose_file_update.ts
2040
- import { z as z11 } from "zod";
2041
- var ProvisionCvmComposeFileUpdateRequestSchema = z11.object({
2042
- id: z11.string().optional(),
2043
- uuid: z11.string().regex(/^[0-9a-f]{8}[-]?[0-9a-f]{4}[-]?4[0-9a-f]{3}[-]?[89ab][0-9a-f]{3}[-]?[0-9a-f]{12}$/i).optional(),
2044
- app_id: z11.string().refine(
2045
+ import { z as z12 } from "zod";
2046
+ var ProvisionCvmComposeFileUpdateRequestSchema = z12.object({
2047
+ id: z12.string().optional(),
2048
+ uuid: z12.string().regex(/^[0-9a-f]{8}[-]?[0-9a-f]{4}[-]?4[0-9a-f]{3}[-]?[89ab][0-9a-f]{3}[-]?[0-9a-f]{12}$/i).optional(),
2049
+ app_id: z12.string().refine(
2045
2050
  (val) => !val.startsWith("app_") && val.length === 40,
2046
2051
  "app_id should be 40 characters without prefix"
2047
2052
  ).transform((val) => val.startsWith("app_") ? val : `app_${val}`).optional(),
2048
- instance_id: z11.string().refine(
2053
+ instance_id: z12.string().refine(
2049
2054
  (val) => !val.startsWith("instance_") && val.length === 40,
2050
2055
  "instance_id should be 40 characters without prefix"
2051
2056
  ).transform((val) => val.startsWith("instance_") ? val : `instance_${val}`).optional(),
2052
- app_compose: z11.object({
2053
- allowed_envs: z11.array(z11.string()).optional(),
2054
- docker_compose_file: z11.string().min(1, "Docker compose file is required"),
2055
- name: z11.string(),
2056
- kms_enabled: z11.boolean().optional(),
2057
- public_logs: z11.boolean().optional(),
2058
- public_sysinfo: z11.boolean().optional(),
2059
- pre_launch_script: z11.string().optional()
2060
- })
2057
+ app_compose: LooseAppComposeSchema,
2058
+ update_env_vars: z12.boolean().optional().nullable()
2061
2059
  }).refine(
2062
2060
  (data) => !!(data.id || data.uuid || data.app_id || data.instance_id),
2063
2061
  "One of id, uuid, app_id, or instance_id must be provided"
2064
2062
  ).transform((data) => ({
2065
2063
  cvmId: data.id || data.uuid || data.app_id || data.instance_id,
2066
2064
  request: data.app_compose,
2065
+ update_env_vars: data.update_env_vars,
2067
2066
  _raw: data
2068
2067
  }));
2069
- var ProvisionCvmComposeFileUpdateResultSchema = z11.object({
2070
- app_id: z11.string().nullable(),
2071
- device_id: z11.string().nullable(),
2072
- compose_hash: z11.string(),
2068
+ var ProvisionCvmComposeFileUpdateResultSchema = z12.object({
2069
+ app_id: z12.string().nullable(),
2070
+ device_id: z12.string().nullable(),
2071
+ compose_hash: z12.string(),
2073
2072
  kms_info: KmsInfoSchema.nullable().optional()
2074
2073
  }).passthrough();
2075
2074
  async function provisionCvmComposeFileUpdate(client, request, parameters) {
@@ -2104,21 +2103,22 @@ async function safeProvisionCvmComposeFileUpdate(client, request, parameters) {
2104
2103
  }
2105
2104
 
2106
2105
  // src/actions/commit_cvm_compose_file_update.ts
2107
- import { z as z12 } from "zod";
2108
- var CommitCvmComposeFileUpdateRequestSchema = z12.object({
2109
- id: z12.string().optional(),
2110
- uuid: z12.string().regex(/^[0-9a-f]{8}[-]?[0-9a-f]{4}[-]?4[0-9a-f]{3}[-]?[89ab][0-9a-f]{3}[-]?[0-9a-f]{12}$/i).optional(),
2111
- app_id: z12.string().refine(
2106
+ import { z as z13 } from "zod";
2107
+ var CommitCvmComposeFileUpdateRequestSchema = z13.object({
2108
+ id: z13.string().optional(),
2109
+ uuid: z13.string().regex(/^[0-9a-f]{8}[-]?[0-9a-f]{4}[-]?4[0-9a-f]{3}[-]?[89ab][0-9a-f]{3}[-]?[0-9a-f]{12}$/i).optional(),
2110
+ app_id: z13.string().refine(
2112
2111
  (val) => !val.startsWith("app_") && val.length === 40,
2113
2112
  "app_id should be 40 characters without prefix"
2114
2113
  ).transform((val) => val.startsWith("app_") ? val : `app_${val}`).optional(),
2115
- instance_id: z12.string().refine(
2114
+ instance_id: z13.string().refine(
2116
2115
  (val) => !val.startsWith("instance_") && val.length === 40,
2117
2116
  "instance_id should be 40 characters without prefix"
2118
2117
  ).transform((val) => val.startsWith("instance_") ? val : `instance_${val}`).optional(),
2119
- compose_hash: z12.string().min(1, "Compose hash is required"),
2120
- encrypted_env: z12.string().optional(),
2121
- env_keys: z12.array(z12.string()).optional()
2118
+ compose_hash: z13.string().min(1, "Compose hash is required"),
2119
+ encrypted_env: z13.string().optional(),
2120
+ env_keys: z13.array(z13.string()).optional(),
2121
+ update_env_vars: z13.boolean().optional().nullable()
2122
2122
  }).refine(
2123
2123
  (data) => !!(data.id || data.uuid || data.app_id || data.instance_id),
2124
2124
  "One of id, uuid, app_id, or instance_id must be provided"
@@ -2127,9 +2127,10 @@ var CommitCvmComposeFileUpdateRequestSchema = z12.object({
2127
2127
  compose_hash: data.compose_hash,
2128
2128
  encrypted_env: data.encrypted_env,
2129
2129
  env_keys: data.env_keys,
2130
+ update_env_vars: !!data.update_env_vars,
2130
2131
  _raw: data
2131
2132
  }));
2132
- var CommitCvmComposeFileUpdateSchema = z12.any().transform(() => void 0);
2133
+ var CommitCvmComposeFileUpdateSchema = z13.any().transform(() => void 0);
2133
2134
  async function commitCvmComposeFileUpdate(client, request, parameters) {
2134
2135
  const validatedRequest = CommitCvmComposeFileUpdateRequestSchema.parse(request);
2135
2136
  const response = await client.patch(`/cvms/${validatedRequest.cvmId}/compose_file`, {
@@ -2164,17 +2165,17 @@ async function safeCommitCvmComposeFileUpdate(client, request, parameters) {
2164
2165
  }
2165
2166
 
2166
2167
  // src/actions/get_app_env_encrypt_pubkey.ts
2167
- import { z as z13 } from "zod";
2168
- var GetAppEnvEncryptPubKeyRequestSchema = z13.object({
2169
- kms: z13.string().min(1, "KMS ID or slug is required"),
2170
- app_id: z13.string().refine(
2168
+ import { z as z14 } from "zod";
2169
+ var GetAppEnvEncryptPubKeyRequestSchema = z14.object({
2170
+ kms: z14.string().min(1, "KMS ID or slug is required"),
2171
+ app_id: z14.string().refine(
2171
2172
  (val) => val.length === 40 || val.startsWith("0x") && val.length === 42,
2172
2173
  "App ID must be exactly 40 characters or 42 characters with 0x prefix"
2173
2174
  )
2174
2175
  }).strict();
2175
- var GetAppEnvEncryptPubKeySchema = z13.object({
2176
- public_key: z13.string(),
2177
- signature: z13.string()
2176
+ var GetAppEnvEncryptPubKeySchema = z14.object({
2177
+ public_key: z14.string(),
2178
+ signature: z14.string()
2178
2179
  }).strict();
2179
2180
  var getAppEnvEncryptPubKey = async (client, payload, parameters) => {
2180
2181
  const validatedRequest = GetAppEnvEncryptPubKeyRequestSchema.parse(payload);
@@ -2211,15 +2212,15 @@ var safeGetAppEnvEncryptPubKey = async (client, payload, parameters) => {
2211
2212
  };
2212
2213
 
2213
2214
  // src/actions/get_cvm_info.ts
2214
- import { z as z14 } from "zod";
2215
- var GetCvmInfoRequestSchema = z14.object({
2216
- id: z14.string().optional(),
2217
- uuid: z14.string().regex(/^[0-9a-f]{8}[-]?[0-9a-f]{4}[-]?4[0-9a-f]{3}[-]?[89ab][0-9a-f]{3}[-]?[0-9a-f]{12}$/i).optional(),
2218
- app_id: z14.string().refine(
2215
+ import { z as z15 } from "zod";
2216
+ var GetCvmInfoRequestSchema = z15.object({
2217
+ id: z15.string().optional(),
2218
+ uuid: z15.string().regex(/^[0-9a-f]{8}[-]?[0-9a-f]{4}[-]?4[0-9a-f]{3}[-]?[89ab][0-9a-f]{3}[-]?[0-9a-f]{12}$/i).optional(),
2219
+ app_id: z15.string().refine(
2219
2220
  (val) => !val.startsWith("app_") && val.length === 40,
2220
2221
  "app_id should be 40 characters without prefix"
2221
2222
  ).transform((val) => val.startsWith("app_") ? val : `app_${val}`).optional(),
2222
- instance_id: z14.string().refine(
2223
+ instance_id: z15.string().refine(
2223
2224
  (val) => !val.startsWith("instance_") && val.length === 40,
2224
2225
  "instance_id should be 40 characters without prefix"
2225
2226
  ).transform((val) => val.startsWith("instance_") ? val : `instance_${val}`).optional()
@@ -2265,18 +2266,18 @@ async function safeGetCvmInfo(client, request, parameters) {
2265
2266
  }
2266
2267
 
2267
2268
  // src/actions/get_cvm_list.ts
2268
- import { z as z15 } from "zod";
2269
- var GetCvmListRequestSchema = z15.object({
2270
- page: z15.number().int().min(1).optional(),
2271
- page_size: z15.number().int().min(1).optional(),
2272
- node_id: z15.number().int().min(1).optional()
2269
+ import { z as z16 } from "zod";
2270
+ var GetCvmListRequestSchema = z16.object({
2271
+ page: z16.number().int().min(1).optional(),
2272
+ page_size: z16.number().int().min(1).optional(),
2273
+ node_id: z16.number().int().min(1).optional()
2273
2274
  }).strict();
2274
- var GetCvmListSchema = z15.object({
2275
- items: z15.array(CvmInfoSchema),
2276
- total: z15.number(),
2277
- page: z15.number(),
2278
- page_size: z15.number(),
2279
- pages: z15.number()
2275
+ var GetCvmListSchema = z16.object({
2276
+ items: z16.array(CvmInfoSchema),
2277
+ total: z16.number(),
2278
+ page: z16.number(),
2279
+ page_size: z16.number(),
2280
+ pages: z16.number()
2280
2281
  }).strict();
2281
2282
  async function getCvmList(client, request, parameters) {
2282
2283
  const validatedRequest = GetCvmListRequestSchema.parse(request ?? {});
@@ -2313,9 +2314,9 @@ async function safeGetCvmList(client, request, parameters) {
2313
2314
  }
2314
2315
 
2315
2316
  // src/actions/get_kms_info.ts
2316
- import { z as z16 } from "zod";
2317
- var GetKmsInfoRequestSchema = z16.object({
2318
- kms_id: z16.string().min(1, "KMS ID is required")
2317
+ import { z as z17 } from "zod";
2318
+ var GetKmsInfoRequestSchema = z17.object({
2319
+ kms_id: z17.string().min(1, "KMS ID is required")
2319
2320
  });
2320
2321
  async function getKmsInfo(client, request, parameters) {
2321
2322
  const validatedRequest = GetKmsInfoRequestSchema.parse(request);
@@ -2349,18 +2350,18 @@ async function safeGetKmsInfo(client, request, parameters) {
2349
2350
  }
2350
2351
 
2351
2352
  // src/actions/get_kms_list.ts
2352
- import { z as z17 } from "zod";
2353
- var GetKmsListRequestSchema = z17.object({
2354
- page: z17.number().int().min(1).optional(),
2355
- page_size: z17.number().int().min(1).optional(),
2356
- is_onchain: z17.boolean().optional()
2353
+ import { z as z18 } from "zod";
2354
+ var GetKmsListRequestSchema = z18.object({
2355
+ page: z18.number().int().min(1).optional(),
2356
+ page_size: z18.number().int().min(1).optional(),
2357
+ is_onchain: z18.boolean().optional()
2357
2358
  }).strict();
2358
- var GetKmsListSchema = z17.object({
2359
- items: z17.array(KmsInfoSchema),
2360
- total: z17.number(),
2361
- page: z17.number(),
2362
- page_size: z17.number(),
2363
- pages: z17.number()
2359
+ var GetKmsListSchema = z18.object({
2360
+ items: z18.array(KmsInfoSchema),
2361
+ total: z18.number(),
2362
+ page: z18.number(),
2363
+ page_size: z18.number(),
2364
+ pages: z18.number()
2364
2365
  }).strict();
2365
2366
  async function getKmsList(client, request, parameters) {
2366
2367
  const validatedRequest = GetKmsListRequestSchema.parse(request ?? {});
@@ -2396,6 +2397,148 @@ async function safeGetKmsList(client, request, parameters) {
2396
2397
  return validationResult;
2397
2398
  }
2398
2399
 
2400
+ // src/actions/workspaces/list_workspaces.ts
2401
+ import { z as z19 } from "zod";
2402
+ var WorkspaceResponseSchema = z19.object({
2403
+ id: z19.string(),
2404
+ name: z19.string(),
2405
+ slug: z19.string().nullable(),
2406
+ tier: z19.string(),
2407
+ role: z19.string(),
2408
+ created_at: z19.string()
2409
+ }).passthrough();
2410
+ var PaginationMetadataSchema = z19.object({
2411
+ has_more: z19.boolean(),
2412
+ next_cursor: z19.string().nullable(),
2413
+ total: z19.number().nullable()
2414
+ }).passthrough();
2415
+ var ListWorkspacesSchema = z19.object({
2416
+ data: z19.array(WorkspaceResponseSchema),
2417
+ pagination: PaginationMetadataSchema
2418
+ }).passthrough();
2419
+ async function listWorkspaces(client, parameters) {
2420
+ validateActionParameters(parameters);
2421
+ const queryParams = new URLSearchParams();
2422
+ if (parameters?.cursor) queryParams.append("cursor", parameters.cursor);
2423
+ if (parameters?.limit) queryParams.append("limit", parameters.limit.toString());
2424
+ const url = queryParams.toString() ? `/workspaces?${queryParams.toString()}` : "/workspaces";
2425
+ const response = await client.get(url);
2426
+ if (parameters?.schema === false) {
2427
+ return response;
2428
+ }
2429
+ const schema = parameters?.schema || ListWorkspacesSchema;
2430
+ return schema.parse(response);
2431
+ }
2432
+ async function safeListWorkspaces(client, parameters) {
2433
+ const parameterValidationError = safeValidateActionParameters(parameters);
2434
+ if (parameterValidationError) {
2435
+ return parameterValidationError;
2436
+ }
2437
+ const queryParams = new URLSearchParams();
2438
+ if (parameters?.cursor) queryParams.append("cursor", parameters.cursor);
2439
+ if (parameters?.limit) queryParams.append("limit", parameters.limit.toString());
2440
+ const url = queryParams.toString() ? `/workspaces?${queryParams.toString()}` : "/workspaces";
2441
+ const httpResult = await client.safeGet(url);
2442
+ if (!httpResult.success) {
2443
+ return httpResult;
2444
+ }
2445
+ if (parameters?.schema === false) {
2446
+ return { success: true, data: httpResult.data };
2447
+ }
2448
+ const schema = parameters?.schema || ListWorkspacesSchema;
2449
+ return schema.safeParse(httpResult.data);
2450
+ }
2451
+
2452
+ // src/actions/workspaces/get_workspace.ts
2453
+ async function getWorkspace(client, teamSlug, parameters) {
2454
+ validateActionParameters(parameters);
2455
+ const response = await client.get(`/workspaces/${teamSlug}`);
2456
+ if (parameters?.schema === false) {
2457
+ return response;
2458
+ }
2459
+ const schema = parameters?.schema || WorkspaceResponseSchema;
2460
+ return schema.parse(response);
2461
+ }
2462
+ async function safeGetWorkspace(client, teamSlug, parameters) {
2463
+ const parameterValidationError = safeValidateActionParameters(parameters);
2464
+ if (parameterValidationError) {
2465
+ return parameterValidationError;
2466
+ }
2467
+ const httpResult = await client.safeGet(`/workspaces/${teamSlug}`);
2468
+ if (!httpResult.success) {
2469
+ return httpResult;
2470
+ }
2471
+ if (parameters?.schema === false) {
2472
+ return { success: true, data: httpResult.data };
2473
+ }
2474
+ const schema = parameters?.schema || WorkspaceResponseSchema;
2475
+ return schema.safeParse(httpResult.data);
2476
+ }
2477
+
2478
+ // src/actions/list-instance-types.ts
2479
+ import { z as z20 } from "zod";
2480
+ var ListInstanceTypesRequestSchema = z20.object({
2481
+ page: z20.number().int().min(1).optional().default(1),
2482
+ page_size: z20.number().int().min(1).max(1e3).optional().default(100)
2483
+ }).strict();
2484
+ var InstanceTypeSchema = z20.object({
2485
+ id: z20.string(),
2486
+ name: z20.string(),
2487
+ description: z20.string(),
2488
+ vcpu: z20.number(),
2489
+ memory_mb: z20.number(),
2490
+ hourly_rate: z20.string(),
2491
+ requires_gpu: z20.boolean(),
2492
+ public: z20.boolean(),
2493
+ enabled: z20.boolean()
2494
+ }).passthrough();
2495
+ var PaginatedInstanceTypesSchema = z20.object({
2496
+ items: z20.array(InstanceTypeSchema),
2497
+ total: z20.number(),
2498
+ page: z20.number(),
2499
+ page_size: z20.number(),
2500
+ pages: z20.number()
2501
+ }).strict();
2502
+ async function listInstanceTypes(client, request, parameters) {
2503
+ const validatedRequest = ListInstanceTypesRequestSchema.parse(request ?? {});
2504
+ validateActionParameters(parameters);
2505
+ const queryParams = new URLSearchParams();
2506
+ queryParams.append("page", validatedRequest.page.toString());
2507
+ queryParams.append("page_size", validatedRequest.page_size.toString());
2508
+ const response = await client.get(`/api/instance-types?${queryParams.toString()}`);
2509
+ if (parameters?.schema === false) {
2510
+ return response;
2511
+ }
2512
+ const schema = parameters?.schema || PaginatedInstanceTypesSchema;
2513
+ return schema.parse(response);
2514
+ }
2515
+ async function safeListInstanceTypes(client, request, parameters) {
2516
+ const requestValidation = ListInstanceTypesRequestSchema.safeParse(request ?? {});
2517
+ if (!requestValidation.success) {
2518
+ return requestValidation;
2519
+ }
2520
+ const parameterValidationError = safeValidateActionParameters(parameters);
2521
+ if (parameterValidationError) {
2522
+ return parameterValidationError;
2523
+ }
2524
+ const queryParams = new URLSearchParams();
2525
+ queryParams.append("page", requestValidation.data.page.toString());
2526
+ queryParams.append("page_size", requestValidation.data.page_size.toString());
2527
+ const httpResult = await client.safeGet(`/api/instance-types?${queryParams.toString()}`);
2528
+ if (!httpResult.success) {
2529
+ return httpResult;
2530
+ }
2531
+ if (parameters?.schema === false) {
2532
+ return {
2533
+ success: true,
2534
+ data: httpResult.data
2535
+ };
2536
+ }
2537
+ const schema = parameters?.schema || PaginatedInstanceTypesSchema;
2538
+ const validationResult = schema.safeParse(httpResult.data);
2539
+ return validationResult;
2540
+ }
2541
+
2399
2542
  // src/parse_dotenv.ts
2400
2543
  var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
2401
2544
  function parseEnv(input) {
@@ -2449,12 +2592,15 @@ export {
2449
2592
  DeployAppAuthRequestSchema,
2450
2593
  DeployAppAuthSchema,
2451
2594
  GetAppEnvEncryptPubKeySchema,
2452
- GetCvmComposeFileResultSchema,
2453
2595
  GetCvmListSchema,
2454
2596
  GetKmsListSchema,
2597
+ InstanceTypeSchema,
2455
2598
  KmsInfoSchema,
2599
+ ListWorkspacesSchema,
2456
2600
  ManagedUserSchema,
2457
2601
  NetworkError,
2602
+ PaginatedInstanceTypesSchema,
2603
+ PaginationMetadataSchema,
2458
2604
  ProvisionCvmComposeFileUpdateRequestSchema,
2459
2605
  ProvisionCvmComposeFileUpdateResultSchema,
2460
2606
  ProvisionCvmRequestSchema,
@@ -2464,6 +2610,7 @@ export {
2464
2610
  TransactionError,
2465
2611
  VmInfoSchema,
2466
2612
  WalletError,
2613
+ WorkspaceResponseSchema,
2467
2614
  addComposeHash,
2468
2615
  addNetwork,
2469
2616
  asHex,
@@ -2494,6 +2641,9 @@ export {
2494
2641
  getErrorMessage,
2495
2642
  getKmsInfo,
2496
2643
  getKmsList,
2644
+ getWorkspace,
2645
+ listInstanceTypes,
2646
+ listWorkspaces,
2497
2647
  parseEnv,
2498
2648
  parseEnvVars,
2499
2649
  provisionCvm,
@@ -2510,6 +2660,9 @@ export {
2510
2660
  safeGetCvmList,
2511
2661
  safeGetKmsInfo,
2512
2662
  safeGetKmsList,
2663
+ safeGetWorkspace,
2664
+ safeListInstanceTypes,
2665
+ safeListWorkspaces,
2513
2666
  safeProvisionCvm,
2514
2667
  safeProvisionCvmComposeFileUpdate,
2515
2668
  safeValidateActionParameters,
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ export declare const LooseAppComposeSchema: z.ZodObject<{
3
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4
+ docker_compose_file: z.ZodString;
5
+ features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6
+ name: z.ZodOptional<z.ZodString>;
7
+ manifest_version: z.ZodOptional<z.ZodNumber>;
8
+ kms_enabled: z.ZodOptional<z.ZodBoolean>;
9
+ public_logs: z.ZodOptional<z.ZodBoolean>;
10
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
11
+ tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
12
+ pre_launch_script: z.ZodOptional<z.ZodString>;
13
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15
+ docker_compose_file: z.ZodString;
16
+ features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
17
+ name: z.ZodOptional<z.ZodString>;
18
+ manifest_version: z.ZodOptional<z.ZodNumber>;
19
+ kms_enabled: z.ZodOptional<z.ZodBoolean>;
20
+ public_logs: z.ZodOptional<z.ZodBoolean>;
21
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
22
+ tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
23
+ pre_launch_script: z.ZodOptional<z.ZodString>;
24
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
25
+ allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
26
+ docker_compose_file: z.ZodString;
27
+ features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
28
+ name: z.ZodOptional<z.ZodString>;
29
+ manifest_version: z.ZodOptional<z.ZodNumber>;
30
+ kms_enabled: z.ZodOptional<z.ZodBoolean>;
31
+ public_logs: z.ZodOptional<z.ZodBoolean>;
32
+ public_sysinfo: z.ZodOptional<z.ZodBoolean>;
33
+ tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
34
+ pre_launch_script: z.ZodOptional<z.ZodString>;
35
+ }, z.ZodTypeAny, "passthrough">>;
36
+ export type LooseAppCompose = z.infer<typeof LooseAppComposeSchema>;
37
+ //# sourceMappingURL=app_compose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app_compose.d.ts","sourceRoot":"","sources":["../../src/types/app_compose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAalB,CAAC;AAEjB,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phala/cloud",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "TypeScript SDK for Phala Cloud API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",