@phala/cloud
Version:
TypeScript SDK for Phala Cloud API
496 lines • 17.8 kB
TypeScript
import { z } from "zod";
import { type KmsInfo } from "./kms_info";
export declare const VmInfoSchema: z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
status: z.ZodString;
uptime: z.ZodString;
app_url: z.ZodNullable<z.ZodString>;
app_id: z.ZodString;
instance_id: z.ZodNullable<z.ZodString>;
configuration: z.ZodOptional<z.ZodAny>;
exited_at: z.ZodNullable<z.ZodString>;
boot_progress: z.ZodNullable<z.ZodString>;
boot_error: z.ZodNullable<z.ZodString>;
shutdown_progress: z.ZodNullable<z.ZodString>;
image_version: z.ZodNullable<z.ZodString>;
}, "strip", z.ZodTypeAny, {
status: string;
id: string;
name: string;
uptime: string;
app_url: string | null;
app_id: string;
instance_id: string | null;
exited_at: string | null;
boot_progress: string | null;
boot_error: string | null;
shutdown_progress: string | null;
image_version: string | null;
configuration?: any;
}, {
status: string;
id: string;
name: string;
uptime: string;
app_url: string | null;
app_id: string;
instance_id: string | null;
exited_at: string | null;
boot_progress: string | null;
boot_error: string | null;
shutdown_progress: string | null;
image_version: string | null;
configuration?: any;
}>;
export declare const ManagedUserSchema: z.ZodObject<{
id: z.ZodNumber;
username: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: number;
username: string;
}, {
id: number;
username: string;
}>;
export declare const CvmNodeSchema: z.ZodObject<{
id: z.ZodNumber;
name: z.ZodString;
region_identifier: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: number;
name: string;
region_identifier?: string | undefined;
}, {
id: number;
name: string;
region_identifier?: string | undefined;
}>;
export declare const CvmNetworkUrlsSchema: z.ZodObject<{
app: z.ZodString;
instance: z.ZodString;
}, "strip", z.ZodTypeAny, {
app: string;
instance: string;
}, {
app: string;
instance: string;
}>;
export declare const CvmInfoSchema: z.ZodObject<{
hosted: z.ZodOptional<z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
status: z.ZodString;
uptime: z.ZodString;
app_url: z.ZodNullable<z.ZodString>;
app_id: z.ZodString;
instance_id: z.ZodNullable<z.ZodString>;
configuration: z.ZodOptional<z.ZodAny>;
exited_at: z.ZodNullable<z.ZodString>;
boot_progress: z.ZodNullable<z.ZodString>;
boot_error: z.ZodNullable<z.ZodString>;
shutdown_progress: z.ZodNullable<z.ZodString>;
image_version: z.ZodNullable<z.ZodString>;
}, "strip", z.ZodTypeAny, {
status: string;
id: string;
name: string;
uptime: string;
app_url: string | null;
app_id: string;
instance_id: string | null;
exited_at: string | null;
boot_progress: string | null;
boot_error: string | null;
shutdown_progress: string | null;
image_version: string | null;
configuration?: any;
}, {
status: string;
id: string;
name: string;
uptime: string;
app_url: string | null;
app_id: string;
instance_id: string | null;
exited_at: string | null;
boot_progress: string | null;
boot_error: string | null;
shutdown_progress: string | null;
image_version: string | null;
configuration?: any;
}>>;
name: z.ZodOptional<z.ZodString>;
managed_user: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{
id: z.ZodNumber;
username: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: number;
username: string;
}, {
id: number;
username: string;
}>>>>;
node: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{
id: z.ZodNumber;
name: z.ZodString;
region_identifier: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: number;
name: string;
region_identifier?: string | undefined;
}, {
id: number;
name: string;
region_identifier?: string | undefined;
}>>>>;
listed: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
status: z.ZodOptional<z.ZodString>;
in_progress: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
dapp_dashboard_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
syslog_endpoint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
allow_upgrade: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
project_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
project_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
billing_period: z.ZodOptional<z.ZodNullable<z.ZodString>>;
kms_info: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodObject<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough">>>>;
vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
gateway_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
public_urls: z.ZodOptional<z.ZodArray<z.ZodObject<{
app: z.ZodString;
instance: z.ZodString;
}, "strip", z.ZodTypeAny, {
app: string;
instance: string;
}, {
app: string;
instance: string;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
status?: string | undefined;
name?: string | undefined;
hosted?: {
status: string;
id: string;
name: string;
uptime: string;
app_url: string | null;
app_id: string;
instance_id: string | null;
exited_at: string | null;
boot_progress: string | null;
boot_error: string | null;
shutdown_progress: string | null;
image_version: string | null;
configuration?: any;
} | undefined;
managed_user?: {
id: number;
username: string;
} | null | undefined;
node?: {
id: number;
name: string;
region_identifier?: string | undefined;
} | null | undefined;
listed?: boolean | undefined;
in_progress?: boolean | undefined;
dapp_dashboard_url?: string | null | undefined;
syslog_endpoint?: string | null | undefined;
allow_upgrade?: boolean | undefined;
project_id?: string | null | undefined;
project_type?: string | null | undefined;
billing_period?: string | null | undefined;
kms_info?: z.objectOutputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough"> | null | undefined;
vcpu?: number | null | undefined;
memory?: number | null | undefined;
disk_size?: number | null | undefined;
gateway_domain?: string | null | undefined;
public_urls?: {
app: string;
instance: string;
}[] | undefined;
}, {
status?: string | undefined;
name?: string | undefined;
hosted?: {
status: string;
id: string;
name: string;
uptime: string;
app_url: string | null;
app_id: string;
instance_id: string | null;
exited_at: string | null;
boot_progress: string | null;
boot_error: string | null;
shutdown_progress: string | null;
image_version: string | null;
configuration?: any;
} | undefined;
managed_user?: {
id: number;
username: string;
} | null | undefined;
node?: {
id: number;
name: string;
region_identifier?: string | undefined;
} | null | undefined;
listed?: boolean | undefined;
in_progress?: boolean | undefined;
dapp_dashboard_url?: string | null | undefined;
syslog_endpoint?: string | null | undefined;
allow_upgrade?: boolean | undefined;
project_id?: string | null | undefined;
project_type?: string | null | undefined;
billing_period?: string | null | undefined;
kms_info?: z.objectInputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough"> | null | undefined;
vcpu?: number | null | undefined;
memory?: number | null | undefined;
disk_size?: number | null | undefined;
gateway_domain?: string | null | undefined;
public_urls?: {
app: string;
instance: string;
}[] | undefined;
}>;
export type CvmInfo = z.infer<typeof CvmInfoSchema>;
export declare const CvmLegacyDetailSchema: z.ZodObject<{
id: z.ZodNumber;
name: z.ZodString;
status: z.ZodString;
in_progress: z.ZodBoolean;
teepod_id: z.ZodNullable<z.ZodNumber>;
teepod: z.ZodObject<{
id: z.ZodNumber;
name: z.ZodString;
region_identifier: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id: number;
name: string;
region_identifier?: string | undefined;
}, {
id: number;
name: string;
region_identifier?: string | undefined;
}>;
app_id: z.ZodString;
vm_uuid: z.ZodNullable<z.ZodString>;
instance_id: z.ZodNullable<z.ZodString>;
vcpu: z.ZodNullable<z.ZodNumber>;
memory: z.ZodNullable<z.ZodNumber>;
disk_size: z.ZodNullable<z.ZodNumber>;
base_image: z.ZodString;
encrypted_env_pubkey: z.ZodNullable<z.ZodString>;
listed: z.ZodBoolean;
project_id: z.ZodNullable<z.ZodString>;
project_type: z.ZodNullable<z.ZodString>;
public_sysinfo: z.ZodBoolean;
public_logs: z.ZodBoolean;
dapp_dashboard_url: z.ZodNullable<z.ZodString>;
syslog_endpoint: z.ZodNullable<z.ZodString>;
kms_info: z.ZodNullable<z.ZodEffects<z.ZodObject<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough">>>;
contract_address: z.ZodNullable<z.ZodString>;
deployer_address: z.ZodNullable<z.ZodString>;
scheduled_delete_at: z.ZodNullable<z.ZodString>;
public_urls: z.ZodArray<z.ZodObject<{
app: z.ZodString;
instance: z.ZodString;
}, "strip", z.ZodTypeAny, {
app: string;
instance: string;
}, {
app: string;
instance: string;
}>, "many">;
gateway_domain: z.ZodNullable<z.ZodString>;
}, "strip", z.ZodTypeAny, {
status: string;
id: number;
name: string;
app_id: string;
instance_id: string | null;
listed: boolean;
in_progress: boolean;
dapp_dashboard_url: string | null;
syslog_endpoint: string | null;
project_id: string | null;
project_type: string | null;
kms_info: z.objectOutputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough"> | null;
vcpu: number | null;
memory: number | null;
disk_size: number | null;
gateway_domain: string | null;
public_urls: {
app: string;
instance: string;
}[];
teepod_id: number | null;
teepod: {
id: number;
name: string;
region_identifier?: string | undefined;
};
vm_uuid: string | null;
base_image: string;
encrypted_env_pubkey: string | null;
public_sysinfo: boolean;
public_logs: boolean;
contract_address: string | null;
deployer_address: string | null;
scheduled_delete_at: string | null;
}, {
status: string;
id: number;
name: string;
app_id: string;
instance_id: string | null;
listed: boolean;
in_progress: boolean;
dapp_dashboard_url: string | null;
syslog_endpoint: string | null;
project_id: string | null;
project_type: string | null;
kms_info: z.objectInputType<{
id: z.ZodString;
slug: z.ZodNullable<z.ZodString>;
url: z.ZodString;
version: z.ZodString;
chain_id: z.ZodNullable<z.ZodNumber>;
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
}, z.ZodTypeAny, "passthrough"> | null;
vcpu: number | null;
memory: number | null;
disk_size: number | null;
gateway_domain: string | null;
public_urls: {
app: string;
instance: string;
}[];
teepod_id: number | null;
teepod: {
id: number;
name: string;
region_identifier?: string | undefined;
};
vm_uuid: string | null;
base_image: string;
encrypted_env_pubkey: string | null;
public_sysinfo: boolean;
public_logs: boolean;
contract_address: string | null;
deployer_address: string | null;
scheduled_delete_at: string | null;
}>;
export type CvmLegacyDetail = z.infer<typeof CvmLegacyDetailSchema> & {
kms_info: KmsInfo;
};
//# sourceMappingURL=cvm_info.d.ts.map