@phala/cloud 0.2.5 → 0.2.8
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/apps/check_app_cvms_is_allowed.d.ts +164 -0
- package/dist/actions/apps/check_app_is_allowed.d.ts +109 -0
- package/dist/actions/apps/get_app_device_allowlist.d.ts +2 -2
- package/dist/actions/blockchains/abi/dstack_app.d.ts +30 -0
- package/dist/actions/blockchains/check_compose_hash_allowed.d.ts +43 -0
- package/dist/actions/blockchains/check_on_chain_prerequisites.d.ts +59 -0
- package/dist/actions/cvms/check_cvm_is_allowed.d.ts +145 -0
- package/dist/actions/cvms/commit_cvm_provision.d.ts +19 -0
- package/dist/actions/cvms/commit_cvm_update.d.ts +100 -0
- package/dist/actions/cvms/confirm_cvm_patch.d.ts +92 -0
- package/dist/actions/cvms/patch_cvm.d.ts +447 -0
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +8 -0
- package/dist/actions/index.d.ts +8 -0
- package/dist/client.d.ts +5 -0
- package/dist/index.js +717 -191
- package/dist/index.mjs +689 -191
- package/dist/types/app_info_v20260121.d.ts +90 -6
- package/dist/types/cvm_info_v20260121.d.ts +60 -4
- package/dist/utils/error_codes.d.ts +48 -0
- package/dist/utils/errors.d.ts +9 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/verify-webhook.d.ts +35 -0
- package/dist/webhook.d.ts +11 -0
- package/dist/webhook.js +68 -0
- package/dist/webhook.mjs +40 -0
- package/package.json +7 -2
|
@@ -357,6 +357,7 @@ export declare const ProvisionCvmComposeFileUpdateResultSchema: z.ZodObject<{
|
|
|
357
357
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
358
358
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
359
359
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
360
|
+
compose_hash_registered: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
360
361
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
361
362
|
app_id: z.ZodNullable<z.ZodString>;
|
|
362
363
|
device_id: z.ZodNullable<z.ZodString>;
|
|
@@ -402,6 +403,7 @@ export declare const ProvisionCvmComposeFileUpdateResultSchema: z.ZodObject<{
|
|
|
402
403
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
403
404
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
404
405
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
406
|
+
compose_hash_registered: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
405
407
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
406
408
|
app_id: z.ZodNullable<z.ZodString>;
|
|
407
409
|
device_id: z.ZodNullable<z.ZodString>;
|
|
@@ -447,6 +449,7 @@ export declare const ProvisionCvmComposeFileUpdateResultSchema: z.ZodObject<{
|
|
|
447
449
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
448
450
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
449
451
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
452
|
+
compose_hash_registered: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
450
453
|
}, z.ZodTypeAny, "passthrough">>;
|
|
451
454
|
export declare const ProvisionCvmComposeFileUpdateSchema: z.ZodObject<{
|
|
452
455
|
app_id: z.ZodNullable<z.ZodString>;
|
|
@@ -493,6 +496,7 @@ export declare const ProvisionCvmComposeFileUpdateSchema: z.ZodObject<{
|
|
|
493
496
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
494
497
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
495
498
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
499
|
+
compose_hash_registered: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
496
500
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
497
501
|
app_id: z.ZodNullable<z.ZodString>;
|
|
498
502
|
device_id: z.ZodNullable<z.ZodString>;
|
|
@@ -538,6 +542,7 @@ export declare const ProvisionCvmComposeFileUpdateSchema: z.ZodObject<{
|
|
|
538
542
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
539
543
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
540
544
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
545
|
+
compose_hash_registered: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
541
546
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
542
547
|
app_id: z.ZodNullable<z.ZodString>;
|
|
543
548
|
device_id: z.ZodNullable<z.ZodString>;
|
|
@@ -583,6 +588,7 @@ export declare const ProvisionCvmComposeFileUpdateSchema: z.ZodObject<{
|
|
|
583
588
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
584
589
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
585
590
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
591
|
+
compose_hash_registered: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
586
592
|
}, z.ZodTypeAny, "passthrough">>;
|
|
587
593
|
export type ProvisionCvmComposeFileUpdateRequest = z.input<typeof ProvisionCvmComposeFileUpdateRequestSchema>;
|
|
588
594
|
export type ProvisionCvmComposeFileUpdateResult = z.infer<typeof ProvisionCvmComposeFileUpdateResultSchema>;
|
|
@@ -663,6 +669,7 @@ declare const provisionCvmComposeFileUpdate: {
|
|
|
663
669
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
664
670
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
665
671
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
672
|
+
compose_hash_registered: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
666
673
|
}, z.ZodTypeAny, "passthrough">>;
|
|
667
674
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: {
|
|
668
675
|
app_compose: {
|
|
@@ -785,6 +792,7 @@ declare const provisionCvmComposeFileUpdate: {
|
|
|
785
792
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
786
793
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
787
794
|
}, z.ZodTypeAny, "passthrough">>>>;
|
|
795
|
+
compose_hash_registered: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
788
796
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
789
797
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: {
|
|
790
798
|
app_compose: {
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export { removeDevice, safeRemoveDevice, type RemoveDeviceParameters, type Remov
|
|
|
9
9
|
export { setAllowAnyDevice, safeSetAllowAnyDevice, type SetAllowAnyDeviceParameters, type SetAllowAnyDeviceReturnType, SetAllowAnyDeviceSchema, type SetAllowAnyDevice, type SetAllowAnyDeviceRequest, type SafeSetAllowAnyDeviceResult, } from "./blockchains/set_allow_any_device";
|
|
10
10
|
export { getAllowedDevices, safeGetAllowedDevices, GetAllowedDevicesSchema, type GetAllowedDevices, type GetAllowedDevicesRequest, type SafeGetAllowedDevicesResult, } from "./blockchains/get_allowed_devices";
|
|
11
11
|
export { checkDeviceAllowed, safeCheckDeviceAllowed, type CheckDeviceAllowedRequest, } from "./blockchains/check_device_allowed";
|
|
12
|
+
export { checkComposeHashAllowed, safeCheckComposeHashAllowed, type CheckComposeHashAllowedRequest, } from "./blockchains/check_compose_hash_allowed";
|
|
13
|
+
export { checkOnChainPrerequisites, safeCheckOnChainPrerequisites, type CheckOnChainPrerequisitesRequest, type OnChainPrerequisites, } from "./blockchains/check_on_chain_prerequisites";
|
|
12
14
|
export { dstackAppAbi } from "./blockchains/abi/dstack_app";
|
|
13
15
|
export { getCvmComposeFile, safeGetCvmComposeFile, type GetCvmComposeFileResult, GetCvmComposeFileRequestSchema, type GetCvmComposeFileRequest, } from "./cvms/get_cvm_compose_file";
|
|
14
16
|
export { provisionCvmComposeFileUpdate, safeProvisionCvmComposeFileUpdate, ProvisionCvmComposeFileUpdateRequestSchema, type ProvisionCvmComposeFileUpdateRequest, ProvisionCvmComposeFileUpdateResultSchema, type ProvisionCvmComposeFileUpdateResult, } from "./cvms/provision_cvm_compose_file_update";
|
|
@@ -39,6 +41,9 @@ export { getCvmState, safeGetCvmState, CvmStateSchema, GetCvmStateRequestSchema,
|
|
|
39
41
|
export { watchCvmState, WatchCvmStateRequestSchema, type WatchCvmStateRequest, type WatchCvmStateOptions, type SSEEvent, WatchAbortedError, MaxRetriesExceededError, } from "./cvms/watch_cvm_state";
|
|
40
42
|
export { getCvmAttestation, safeGetCvmAttestation, CvmAttestationSchema, GetCvmAttestationRequestSchema, CertificateSubjectSchema, CertificateIssuerSchema, CertificateSchema, EventLogSchema, TcbInfoSchema, type GetCvmAttestationRequest, type CvmAttestation, } from "./cvms/get_cvm_attestation";
|
|
41
43
|
export { getCvmDockerCompose, safeGetCvmDockerCompose, GetCvmDockerComposeRequestSchema, type GetCvmDockerComposeRequest, } from "./cvms/get_cvm_docker_compose";
|
|
44
|
+
export { patchCvm, safePatchCvm, PatchCvmRequestSchema, PatchCvmResultSchema, type PatchCvmRequest, type PatchCvmResult, type PatchCvmAccepted, type PatchCvmHashRequired, } from "./cvms/patch_cvm";
|
|
45
|
+
export { confirmCvmPatch, safeConfirmCvmPatch, ConfirmCvmPatchRequestSchema, type ConfirmCvmPatchRequest, type ConfirmCvmPatchResult, } from "./cvms/confirm_cvm_patch";
|
|
46
|
+
export { commitCvmUpdate, safeCommitCvmUpdate, CommitCvmUpdateRequestSchema, type CommitCvmUpdateRequest, type CommitCvmUpdateResult, } from "./cvms/commit_cvm_update";
|
|
42
47
|
export { updateCvmResources, safeUpdateCvmResources, UpdateCvmResourcesRequestSchema, type UpdateCvmResourcesRequest, } from "./cvms/update_cvm_resources";
|
|
43
48
|
export { updateCvmVisibility, safeUpdateCvmVisibility, UpdateCvmVisibilityRequestSchema, type UpdateCvmVisibilityRequest, } from "./cvms/update_cvm_visibility";
|
|
44
49
|
export { refreshCvmInstanceId, safeRefreshCvmInstanceId, InstanceIdRefreshResultSchema, RefreshCvmInstanceIdRequestSchema, type InstanceIdRefreshResult, type RefreshCvmInstanceIdRequest, } from "./cvms/refresh_cvm_instance_id";
|
|
@@ -55,6 +60,9 @@ export { importGithubProfileSshKeys, safeImportGithubProfileSshKeys, ImportGithu
|
|
|
55
60
|
export { createSshKey, safeCreateSshKey, CreateSshKeyRequestSchema, type CreateSshKeyRequest, } from "./ssh_keys/create_ssh_key";
|
|
56
61
|
export { deleteSshKey, safeDeleteSshKey, DeleteSshKeyRequestSchema, type DeleteSshKeyRequest, } from "./ssh_keys/delete_ssh_key";
|
|
57
62
|
export { syncGithubSshKeys, safeSyncGithubSshKeys, SyncGithubSshKeysResponseSchema, type SyncGithubSshKeysResponse, } from "./ssh_keys/sync_github_ssh_keys";
|
|
63
|
+
export { checkCvmIsAllowed, safeCheckCvmIsAllowed, IsAllowedResultSchema, CheckCvmIsAllowedRequestSchema, type IsAllowedResult, type CheckCvmIsAllowedRequest, } from "./cvms/check_cvm_is_allowed";
|
|
64
|
+
export { checkAppIsAllowed, safeCheckAppIsAllowed, CheckAppIsAllowedRequestSchema, type CheckAppIsAllowedRequest, } from "./apps/check_app_is_allowed";
|
|
65
|
+
export { checkAppCvmsIsAllowed, safeCheckAppCvmsIsAllowed, AppCvmsBatchIsAllowedResponseSchema, CheckAppCvmsIsAllowedRequestSchema, type AppCvmsBatchIsAllowedResponse, type CheckAppCvmsIsAllowedRequest, } from "./apps/check_app_cvms_is_allowed";
|
|
58
66
|
export { getAppList, safeGetAppList, GetAppListRequestSchema, type GetAppListRequest, } from "./apps/get_app_list";
|
|
59
67
|
export { getAppInfo, safeGetAppInfo, GetAppInfoRequestSchema, type GetAppInfoRequest, } from "./apps/get_app_info";
|
|
60
68
|
export { getAppCvms, safeGetAppCvms, GetAppCvmsRequestSchema, type GetAppCvmsRequest, } from "./apps/get_app_cvms";
|
package/dist/client.d.ts
CHANGED
|
@@ -87,6 +87,11 @@ export declare class Client<V extends ApiVersion = DefaultApiVersion> {
|
|
|
87
87
|
* Perform GET request (throws PhalaCloudError on error)
|
|
88
88
|
*/
|
|
89
89
|
get<T = unknown>(request: FetchRequest, options?: Omit<FetchOptions, "method">): Promise<T>;
|
|
90
|
+
/**
|
|
91
|
+
* Build request options, stripping Content-Type when body is FormData
|
|
92
|
+
* so the browser/runtime sets the correct multipart boundary automatically.
|
|
93
|
+
*/
|
|
94
|
+
private buildRequestOptions;
|
|
90
95
|
/**
|
|
91
96
|
* Perform POST request (throws PhalaCloudError on error)
|
|
92
97
|
*/
|