@phala/cloud 0.2.1-beta.3 → 0.2.1-beta.4
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/actions/cvms/update_cvm_envs.d.ts +512 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/create-client.d.ts +15 -0
- package/dist/index.js +334 -235
- package/dist/index.mjs +330 -235
- package/dist/types/cvm_id.d.ts +20 -3
- package/package.json +1 -1
package/dist/types/cvm_id.d.ts
CHANGED
|
@@ -63,12 +63,29 @@ export declare const CvmIdBaseSchema: z.ZodEffects<z.ZodObject<{
|
|
|
63
63
|
}>, any, any>;
|
|
64
64
|
/**
|
|
65
65
|
* CVM ID Schema - supports multiple identifier formats
|
|
66
|
-
* Automatically
|
|
66
|
+
* Automatically detects and normalizes any CVM ID format
|
|
67
|
+
*
|
|
68
|
+
* Process:
|
|
69
|
+
* 1. Extract raw value from any field (priority: id > uuid > app_id > instance_id)
|
|
70
|
+
* 2. Auto-detect format using regex patterns
|
|
71
|
+
* 3. Apply appropriate normalization:
|
|
72
|
+
* - UUID (with or without dashes) → remove dashes
|
|
73
|
+
* - 40-char hex string → add 'app_' prefix
|
|
74
|
+
* - Already prefixed or custom → use as-is
|
|
67
75
|
*
|
|
68
76
|
* @example
|
|
69
77
|
* ```typescript
|
|
70
|
-
*
|
|
71
|
-
*
|
|
78
|
+
* // All these work regardless of which field is used:
|
|
79
|
+
* CvmIdSchema.parse({ id: "550e8400-e29b-41d4-a716-446655440000" });
|
|
80
|
+
* CvmIdSchema.parse({ uuid: "550e8400-e29b-41d4-a716-446655440000" });
|
|
81
|
+
* // → { cvmId: "550e8400e29b41d4a716446655440000" }
|
|
82
|
+
*
|
|
83
|
+
* CvmIdSchema.parse({ id: "50b0e827cc6c53f4010b57e588a18c5ef9388cc1" });
|
|
84
|
+
* CvmIdSchema.parse({ app_id: "50b0e827cc6c53f4010b57e588a18c5ef9388cc1" });
|
|
85
|
+
* // → { cvmId: "app_50b0e827cc6c53f4010b57e588a18c5ef9388cc1" }
|
|
86
|
+
*
|
|
87
|
+
* CvmIdSchema.parse({ id: "app_50b0e827cc6c53f4010b57e588a18c5ef9388cc1" });
|
|
88
|
+
* // → { cvmId: "app_50b0e827cc6c53f4010b57e588a18c5ef9388cc1" }
|
|
72
89
|
* ```
|
|
73
90
|
*/
|
|
74
91
|
export declare const CvmIdSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|