@zlayer/api-client 0.10.86
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/.openapi-generator/FILES +387 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +434 -0
- package/dist/apis/AuditApi.d.ts +39 -0
- package/dist/apis/AuditApi.js +85 -0
- package/dist/apis/AuthenticationApi.d.ts +107 -0
- package/dist/apis/AuthenticationApi.js +265 -0
- package/dist/apis/BuildApi.d.ts +126 -0
- package/dist/apis/BuildApi.js +353 -0
- package/dist/apis/ClusterApi.d.ts +83 -0
- package/dist/apis/ClusterApi.js +209 -0
- package/dist/apis/ContainersApi.d.ts +228 -0
- package/dist/apis/ContainersApi.js +635 -0
- package/dist/apis/CredentialsApi.d.ts +114 -0
- package/dist/apis/CredentialsApi.js +313 -0
- package/dist/apis/CronApi.d.ts +100 -0
- package/dist/apis/CronApi.js +269 -0
- package/dist/apis/DeploymentsApi.d.ts +83 -0
- package/dist/apis/DeploymentsApi.js +221 -0
- package/dist/apis/EnvironmentsApi.d.ts +104 -0
- package/dist/apis/EnvironmentsApi.js +277 -0
- package/dist/apis/GroupsApi.d.ts +137 -0
- package/dist/apis/GroupsApi.js +328 -0
- package/dist/apis/HealthApi.d.ts +42 -0
- package/dist/apis/HealthApi.js +103 -0
- package/dist/apis/ImagesApi.d.ts +98 -0
- package/dist/apis/ImagesApi.js +268 -0
- package/dist/apis/InternalApi.d.ts +52 -0
- package/dist/apis/InternalApi.js +116 -0
- package/dist/apis/JobsApi.d.ts +88 -0
- package/dist/apis/JobsApi.js +230 -0
- package/dist/apis/NetworksApi.d.ts +101 -0
- package/dist/apis/NetworksApi.js +289 -0
- package/dist/apis/NodesApi.d.ts +81 -0
- package/dist/apis/NodesApi.js +222 -0
- package/dist/apis/NotifiersApi.d.ts +118 -0
- package/dist/apis/NotifiersApi.js +322 -0
- package/dist/apis/OverlayApi.d.ts +74 -0
- package/dist/apis/OverlayApi.js +181 -0
- package/dist/apis/PermissionsApi.d.ts +70 -0
- package/dist/apis/PermissionsApi.js +158 -0
- package/dist/apis/ProjectsApi.d.ts +171 -0
- package/dist/apis/ProjectsApi.js +473 -0
- package/dist/apis/ProxyApi.d.ts +74 -0
- package/dist/apis/ProxyApi.js +209 -0
- package/dist/apis/SecretsApi.d.ts +112 -0
- package/dist/apis/SecretsApi.js +303 -0
- package/dist/apis/ServicesApi.d.ts +93 -0
- package/dist/apis/ServicesApi.js +256 -0
- package/dist/apis/StorageApi.d.ts +32 -0
- package/dist/apis/StorageApi.js +77 -0
- package/dist/apis/SyncsApi.d.ts +100 -0
- package/dist/apis/SyncsApi.js +269 -0
- package/dist/apis/TasksApi.d.ts +120 -0
- package/dist/apis/TasksApi.js +320 -0
- package/dist/apis/TunnelsApi.d.ts +117 -0
- package/dist/apis/TunnelsApi.js +319 -0
- package/dist/apis/UsersApi.d.ts +119 -0
- package/dist/apis/UsersApi.js +284 -0
- package/dist/apis/VariablesApi.d.ts +104 -0
- package/dist/apis/VariablesApi.js +277 -0
- package/dist/apis/VolumesApi.d.ts +50 -0
- package/dist/apis/VolumesApi.js +130 -0
- package/dist/apis/WebhooksApi.d.ts +71 -0
- package/dist/apis/WebhooksApi.js +179 -0
- package/dist/apis/WorkflowsApi.d.ts +117 -0
- package/dist/apis/WorkflowsApi.js +317 -0
- package/dist/apis/index.d.ts +32 -0
- package/dist/apis/index.js +50 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/AddMemberRequest.d.ts +32 -0
- package/dist/models/AddMemberRequest.js +50 -0
- package/dist/models/AuditEntry.d.ts +83 -0
- package/dist/models/AuditEntry.js +74 -0
- package/dist/models/BackendGroupInfo.d.ts +57 -0
- package/dist/models/BackendGroupInfo.js +67 -0
- package/dist/models/BackendInfo.d.ts +50 -0
- package/dist/models/BackendInfo.js +62 -0
- package/dist/models/BackendsResponse.d.ts +39 -0
- package/dist/models/BackendsResponse.js +55 -0
- package/dist/models/BootstrapRequest.d.ts +44 -0
- package/dist/models/BootstrapRequest.js +56 -0
- package/dist/models/BuildKind.d.ts +27 -0
- package/dist/models/BuildKind.js +53 -0
- package/dist/models/BuildRequest.d.ts +64 -0
- package/dist/models/BuildRequest.js +58 -0
- package/dist/models/BuildRequestWithContext.d.ts +70 -0
- package/dist/models/BuildRequestWithContext.js +62 -0
- package/dist/models/BuildStateEnum.d.ts +27 -0
- package/dist/models/BuildStateEnum.js +53 -0
- package/dist/models/BuildStatus.d.ts +63 -0
- package/dist/models/BuildStatus.js +65 -0
- package/dist/models/BulkImportResponse.d.ts +44 -0
- package/dist/models/BulkImportResponse.js +58 -0
- package/dist/models/CertInfo.d.ts +56 -0
- package/dist/models/CertInfo.js +60 -0
- package/dist/models/ClusterJoinRequest.d.ts +99 -0
- package/dist/models/ClusterJoinRequest.js +81 -0
- package/dist/models/ClusterJoinResponse.d.ts +57 -0
- package/dist/models/ClusterJoinResponse.js +67 -0
- package/dist/models/ClusterNodeSummary.d.ts +110 -0
- package/dist/models/ClusterNodeSummary.js +102 -0
- package/dist/models/ClusterPeer.d.ts +68 -0
- package/dist/models/ClusterPeer.js +74 -0
- package/dist/models/ContainerExecRequest.d.ts +32 -0
- package/dist/models/ContainerExecRequest.js +50 -0
- package/dist/models/ContainerExecResponse.d.ts +44 -0
- package/dist/models/ContainerExecResponse.js +58 -0
- package/dist/models/ContainerInfo.d.ts +70 -0
- package/dist/models/ContainerInfo.js +70 -0
- package/dist/models/ContainerResourceLimits.d.ts +38 -0
- package/dist/models/ContainerResourceLimits.js +50 -0
- package/dist/models/ContainerStatsResponse.d.ts +56 -0
- package/dist/models/ContainerStatsResponse.js +66 -0
- package/dist/models/ContainerWaitResponse.d.ts +38 -0
- package/dist/models/ContainerWaitResponse.js +54 -0
- package/dist/models/CreateContainerRequest.d.ts +86 -0
- package/dist/models/CreateContainerRequest.js +68 -0
- package/dist/models/CreateDeploymentRequest.d.ts +32 -0
- package/dist/models/CreateDeploymentRequest.js +50 -0
- package/dist/models/CreateEnvironmentRequest.d.ts +44 -0
- package/dist/models/CreateEnvironmentRequest.js +54 -0
- package/dist/models/CreateGitCredentialRequest.d.ts +45 -0
- package/dist/models/CreateGitCredentialRequest.js +59 -0
- package/dist/models/CreateGroupRequest.d.ts +38 -0
- package/dist/models/CreateGroupRequest.js +52 -0
- package/dist/models/CreateNodeTunnelRequest.d.ts +62 -0
- package/dist/models/CreateNodeTunnelRequest.js +68 -0
- package/dist/models/CreateNodeTunnelResponse.d.ts +68 -0
- package/dist/models/CreateNodeTunnelResponse.js +74 -0
- package/dist/models/CreateNotifierRequest.d.ts +46 -0
- package/dist/models/CreateNotifierRequest.js +60 -0
- package/dist/models/CreateProjectRequest.d.ts +100 -0
- package/dist/models/CreateProjectRequest.js +73 -0
- package/dist/models/CreateRegistryCredentialRequest.d.ts +51 -0
- package/dist/models/CreateRegistryCredentialRequest.js +63 -0
- package/dist/models/CreateSecretRequest.d.ts +48 -0
- package/dist/models/CreateSecretRequest.js +56 -0
- package/dist/models/CreateSyncRequest.d.ts +57 -0
- package/dist/models/CreateSyncRequest.js +60 -0
- package/dist/models/CreateTaskRequest.d.ts +51 -0
- package/dist/models/CreateTaskRequest.js +61 -0
- package/dist/models/CreateTunnelRequest.d.ts +44 -0
- package/dist/models/CreateTunnelRequest.js +54 -0
- package/dist/models/CreateTunnelResponse.d.ts +62 -0
- package/dist/models/CreateTunnelResponse.js +70 -0
- package/dist/models/CreateUserRequest.d.ts +51 -0
- package/dist/models/CreateUserRequest.js +61 -0
- package/dist/models/CreateVariableRequest.d.ts +45 -0
- package/dist/models/CreateVariableRequest.js +56 -0
- package/dist/models/CreateWorkflowRequest.d.ts +45 -0
- package/dist/models/CreateWorkflowRequest.js +57 -0
- package/dist/models/CronJobResponse.d.ts +56 -0
- package/dist/models/CronJobResponse.js +62 -0
- package/dist/models/CronStatusResponse.d.ts +44 -0
- package/dist/models/CronStatusResponse.js +58 -0
- package/dist/models/CsrfResponse.d.ts +32 -0
- package/dist/models/CsrfResponse.js +50 -0
- package/dist/models/DeploymentDetails.d.ts +63 -0
- package/dist/models/DeploymentDetails.js +71 -0
- package/dist/models/DeploymentSummary.d.ts +50 -0
- package/dist/models/DeploymentSummary.js +62 -0
- package/dist/models/DnsStatusResponse.d.ts +62 -0
- package/dist/models/DnsStatusResponse.js +64 -0
- package/dist/models/ForceLeaderRequest.d.ts +32 -0
- package/dist/models/ForceLeaderRequest.js +50 -0
- package/dist/models/ForceLeaderResponse.d.ts +50 -0
- package/dist/models/ForceLeaderResponse.js +62 -0
- package/dist/models/GitCredentialKindSchema.d.ts +25 -0
- package/dist/models/GitCredentialKindSchema.js +51 -0
- package/dist/models/GitCredentialResponse.d.ts +45 -0
- package/dist/models/GitCredentialResponse.js +59 -0
- package/dist/models/GpuInfoSummary.d.ts +44 -0
- package/dist/models/GpuInfoSummary.js +58 -0
- package/dist/models/GpuUtilizationReport.d.ts +62 -0
- package/dist/models/GpuUtilizationReport.js +66 -0
- package/dist/models/GrantPermissionRequest.d.ts +58 -0
- package/dist/models/GrantPermissionRequest.js +66 -0
- package/dist/models/GroupMembersResponse.d.ts +38 -0
- package/dist/models/GroupMembersResponse.js +54 -0
- package/dist/models/HealthResponse.d.ts +50 -0
- package/dist/models/HealthResponse.js +58 -0
- package/dist/models/HeartbeatRequest.d.ts +57 -0
- package/dist/models/HeartbeatRequest.js +65 -0
- package/dist/models/ImageInfoDto.d.ts +45 -0
- package/dist/models/ImageInfoDto.js +54 -0
- package/dist/models/InternalScaleRequest.d.ts +38 -0
- package/dist/models/InternalScaleRequest.js +54 -0
- package/dist/models/InternalScaleResponse.d.ts +50 -0
- package/dist/models/InternalScaleResponse.js +60 -0
- package/dist/models/IpAllocationResponse.d.ts +62 -0
- package/dist/models/IpAllocationResponse.js +68 -0
- package/dist/models/JobExecutionResponse.d.ts +86 -0
- package/dist/models/JobExecutionResponse.js +74 -0
- package/dist/models/JoinTokenResponse.d.ts +62 -0
- package/dist/models/JoinTokenResponse.js +70 -0
- package/dist/models/KillContainerRequest.d.ts +34 -0
- package/dist/models/KillContainerRequest.js +48 -0
- package/dist/models/LinkDeploymentRequest.d.ts +32 -0
- package/dist/models/LinkDeploymentRequest.js +50 -0
- package/dist/models/LoginRequest.d.ts +38 -0
- package/dist/models/LoginRequest.js +54 -0
- package/dist/models/LoginResponse.d.ts +39 -0
- package/dist/models/LoginResponse.js +55 -0
- package/dist/models/NetworkSummary.d.ts +56 -0
- package/dist/models/NetworkSummary.js +64 -0
- package/dist/models/NodeDetails.d.ts +89 -0
- package/dist/models/NodeDetails.js +87 -0
- package/dist/models/NodeResourceInfo.d.ts +62 -0
- package/dist/models/NodeResourceInfo.js +70 -0
- package/dist/models/NodeSummary.d.ts +64 -0
- package/dist/models/NodeSummary.js +70 -0
- package/dist/models/NotifierConfig.d.ts +25 -0
- package/dist/models/NotifierConfig.js +71 -0
- package/dist/models/NotifierConfigOneOf.d.ts +45 -0
- package/dist/models/NotifierConfigOneOf.js +61 -0
- package/dist/models/NotifierConfigOneOf1.d.ts +45 -0
- package/dist/models/NotifierConfigOneOf1.js +61 -0
- package/dist/models/NotifierConfigOneOf2.d.ts +59 -0
- package/dist/models/NotifierConfigOneOf2.js +65 -0
- package/dist/models/NotifierConfigOneOf3.d.ts +75 -0
- package/dist/models/NotifierConfigOneOf3.js +81 -0
- package/dist/models/NotifierKind.d.ts +27 -0
- package/dist/models/NotifierKind.js +53 -0
- package/dist/models/OverlayStatusResponse.d.ts +80 -0
- package/dist/models/OverlayStatusResponse.js +82 -0
- package/dist/models/PeerInfo.d.ts +68 -0
- package/dist/models/PeerInfo.js +68 -0
- package/dist/models/PeerListResponse.d.ts +45 -0
- package/dist/models/PeerListResponse.js +59 -0
- package/dist/models/PermissionLevel.d.ts +28 -0
- package/dist/models/PermissionLevel.js +54 -0
- package/dist/models/ProjectPullResponse.d.ts +56 -0
- package/dist/models/ProjectPullResponse.js +66 -0
- package/dist/models/PruneResultDto.d.ts +38 -0
- package/dist/models/PruneResultDto.js +54 -0
- package/dist/models/PullImageRequest.d.ts +39 -0
- package/dist/models/PullImageRequest.js +52 -0
- package/dist/models/PullImageResponse.d.ts +46 -0
- package/dist/models/PullImageResponse.js +54 -0
- package/dist/models/RegisteredServiceInfo.d.ts +62 -0
- package/dist/models/RegisteredServiceInfo.js +70 -0
- package/dist/models/RegistryAuthTypeSchema.d.ts +25 -0
- package/dist/models/RegistryAuthTypeSchema.js +51 -0
- package/dist/models/RegistryCredentialResponse.d.ts +51 -0
- package/dist/models/RegistryCredentialResponse.js +63 -0
- package/dist/models/ReplicationInfo.d.ts +50 -0
- package/dist/models/ReplicationInfo.js +60 -0
- package/dist/models/RestartContainerRequest.d.ts +34 -0
- package/dist/models/RestartContainerRequest.js +48 -0
- package/dist/models/RouteInfo.d.ts +80 -0
- package/dist/models/RouteInfo.js +80 -0
- package/dist/models/RoutesResponse.d.ts +39 -0
- package/dist/models/RoutesResponse.js +55 -0
- package/dist/models/ScaleRequest.d.ts +32 -0
- package/dist/models/ScaleRequest.js +50 -0
- package/dist/models/SecretMetadataResponse.d.ts +58 -0
- package/dist/models/SecretMetadataResponse.js +64 -0
- package/dist/models/ServiceDetails.d.ts +70 -0
- package/dist/models/ServiceDetails.js +76 -0
- package/dist/models/ServiceEndpoint.d.ts +50 -0
- package/dist/models/ServiceEndpoint.js +60 -0
- package/dist/models/ServiceHealthInfo.d.ts +56 -0
- package/dist/models/ServiceHealthInfo.js +66 -0
- package/dist/models/ServiceMetrics.d.ts +44 -0
- package/dist/models/ServiceMetrics.js +56 -0
- package/dist/models/ServiceSummary.d.ts +63 -0
- package/dist/models/ServiceSummary.js +71 -0
- package/dist/models/SetPasswordRequest.d.ts +39 -0
- package/dist/models/SetPasswordRequest.js +52 -0
- package/dist/models/StepResult.d.ts +44 -0
- package/dist/models/StepResult.js +56 -0
- package/dist/models/StopContainerRequest.d.ts +34 -0
- package/dist/models/StopContainerRequest.js +48 -0
- package/dist/models/StorageStatusResponse.d.ts +33 -0
- package/dist/models/StorageStatusResponse.js +51 -0
- package/dist/models/StoredEnvironment.d.ts +66 -0
- package/dist/models/StoredEnvironment.js +66 -0
- package/dist/models/StoredNotifier.d.ts +71 -0
- package/dist/models/StoredNotifier.js +76 -0
- package/dist/models/StoredPermission.d.ts +72 -0
- package/dist/models/StoredPermission.js +74 -0
- package/dist/models/StoredProject.d.ts +132 -0
- package/dist/models/StoredProject.js +87 -0
- package/dist/models/StoredSync.d.ts +86 -0
- package/dist/models/StoredSync.js +74 -0
- package/dist/models/StoredTask.d.ts +72 -0
- package/dist/models/StoredTask.js +73 -0
- package/dist/models/StoredUserGroup.d.ts +56 -0
- package/dist/models/StoredUserGroup.js +64 -0
- package/dist/models/StoredVariable.d.ts +68 -0
- package/dist/models/StoredVariable.js +68 -0
- package/dist/models/StoredWorkflow.d.ts +64 -0
- package/dist/models/StoredWorkflow.js +69 -0
- package/dist/models/StreamBackendInfo.d.ts +32 -0
- package/dist/models/StreamBackendInfo.js +50 -0
- package/dist/models/StreamInfo.d.ts +57 -0
- package/dist/models/StreamInfo.js +67 -0
- package/dist/models/StreamsResponse.d.ts +51 -0
- package/dist/models/StreamsResponse.js +63 -0
- package/dist/models/SubjectKind.d.ts +25 -0
- package/dist/models/SubjectKind.js +51 -0
- package/dist/models/SuccessResponse.d.ts +32 -0
- package/dist/models/SuccessResponse.js +50 -0
- package/dist/models/SyncApplyResponse.d.ts +52 -0
- package/dist/models/SyncApplyResponse.js +57 -0
- package/dist/models/SyncDiffResponse.d.ts +45 -0
- package/dist/models/SyncDiffResponse.js +59 -0
- package/dist/models/SyncResourceResponse.d.ts +44 -0
- package/dist/models/SyncResourceResponse.js +58 -0
- package/dist/models/SyncResourceResult.d.ts +57 -0
- package/dist/models/SyncResourceResult.js +64 -0
- package/dist/models/TagImageRequest.d.ts +40 -0
- package/dist/models/TagImageRequest.js +54 -0
- package/dist/models/TaskKind.d.ts +24 -0
- package/dist/models/TaskKind.js +50 -0
- package/dist/models/TaskRun.d.ts +68 -0
- package/dist/models/TaskRun.js +70 -0
- package/dist/models/TemplateInfo.d.ts +44 -0
- package/dist/models/TemplateInfo.js +58 -0
- package/dist/models/TestNotifierResponse.d.ts +38 -0
- package/dist/models/TestNotifierResponse.js +54 -0
- package/dist/models/TlsResponse.d.ts +51 -0
- package/dist/models/TlsResponse.js +61 -0
- package/dist/models/TokenRequest.d.ts +38 -0
- package/dist/models/TokenRequest.js +54 -0
- package/dist/models/TokenResponse.d.ts +44 -0
- package/dist/models/TokenResponse.js +58 -0
- package/dist/models/TriggerBuildResponse.d.ts +38 -0
- package/dist/models/TriggerBuildResponse.js +54 -0
- package/dist/models/TriggerCronResponse.d.ts +38 -0
- package/dist/models/TriggerCronResponse.js +54 -0
- package/dist/models/TriggerJobResponse.d.ts +38 -0
- package/dist/models/TriggerJobResponse.js +54 -0
- package/dist/models/TunnelStatus.d.ts +87 -0
- package/dist/models/TunnelStatus.js +83 -0
- package/dist/models/TunnelSummary.d.ts +68 -0
- package/dist/models/TunnelSummary.js +72 -0
- package/dist/models/UpdateEnvironmentRequest.d.ts +38 -0
- package/dist/models/UpdateEnvironmentRequest.js +50 -0
- package/dist/models/UpdateGroupRequest.d.ts +38 -0
- package/dist/models/UpdateGroupRequest.js +50 -0
- package/dist/models/UpdateLabelsRequest.d.ts +40 -0
- package/dist/models/UpdateLabelsRequest.js +54 -0
- package/dist/models/UpdateLabelsResponse.d.ts +34 -0
- package/dist/models/UpdateLabelsResponse.js +50 -0
- package/dist/models/UpdateNotifierRequest.d.ts +45 -0
- package/dist/models/UpdateNotifierRequest.js +53 -0
- package/dist/models/UpdateProjectRequest.d.ts +100 -0
- package/dist/models/UpdateProjectRequest.js +71 -0
- package/dist/models/UpdateUserRequest.d.ts +46 -0
- package/dist/models/UpdateUserRequest.js +53 -0
- package/dist/models/UpdateVariableRequest.d.ts +38 -0
- package/dist/models/UpdateVariableRequest.js +50 -0
- package/dist/models/UserRole.d.ts +26 -0
- package/dist/models/UserRole.js +52 -0
- package/dist/models/UserView.d.ts +62 -0
- package/dist/models/UserView.js +68 -0
- package/dist/models/VolumeMount.d.ts +44 -0
- package/dist/models/VolumeMount.js +56 -0
- package/dist/models/VolumeSummary.d.ts +44 -0
- package/dist/models/VolumeSummary.js +56 -0
- package/dist/models/WebhookInfoResponse.d.ts +38 -0
- package/dist/models/WebhookInfoResponse.js +54 -0
- package/dist/models/WebhookResponse.d.ts +38 -0
- package/dist/models/WebhookResponse.js +54 -0
- package/dist/models/WorkflowAction.d.ts +25 -0
- package/dist/models/WorkflowAction.js +71 -0
- package/dist/models/WorkflowActionOneOf.d.ts +45 -0
- package/dist/models/WorkflowActionOneOf.js +61 -0
- package/dist/models/WorkflowActionOneOf1.d.ts +45 -0
- package/dist/models/WorkflowActionOneOf1.js +61 -0
- package/dist/models/WorkflowActionOneOf2.d.ts +45 -0
- package/dist/models/WorkflowActionOneOf2.js +61 -0
- package/dist/models/WorkflowActionOneOf3.d.ts +45 -0
- package/dist/models/WorkflowActionOneOf3.js +61 -0
- package/dist/models/WorkflowRun.d.ts +64 -0
- package/dist/models/WorkflowRun.js +70 -0
- package/dist/models/WorkflowRunStatus.d.ts +27 -0
- package/dist/models/WorkflowRunStatus.js +53 -0
- package/dist/models/WorkflowStep.d.ts +45 -0
- package/dist/models/WorkflowStep.js +57 -0
- package/dist/models/index.d.ts +156 -0
- package/dist/models/index.js +174 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +365 -0
- package/docs/AddMemberRequest.md +35 -0
- package/docs/AuditApi.md +89 -0
- package/docs/AuditEntry.md +51 -0
- package/docs/AuthenticationApi.md +395 -0
- package/docs/BackendGroupInfo.md +43 -0
- package/docs/BackendInfo.md +41 -0
- package/docs/BackendsResponse.md +37 -0
- package/docs/BootstrapRequest.md +39 -0
- package/docs/BuildApi.md +495 -0
- package/docs/BuildKind.md +33 -0
- package/docs/BuildRequest.md +45 -0
- package/docs/BuildRequestWithContext.md +47 -0
- package/docs/BuildStateEnum.md +33 -0
- package/docs/BuildStatus.md +45 -0
- package/docs/BulkImportResponse.md +39 -0
- package/docs/CertInfo.md +43 -0
- package/docs/ClusterApi.md +288 -0
- package/docs/ClusterJoinRequest.md +57 -0
- package/docs/ClusterJoinResponse.md +43 -0
- package/docs/ClusterNodeSummary.md +61 -0
- package/docs/ClusterPeer.md +47 -0
- package/docs/ContainerExecRequest.md +35 -0
- package/docs/ContainerExecResponse.md +39 -0
- package/docs/ContainerInfo.md +47 -0
- package/docs/ContainerResourceLimits.md +37 -0
- package/docs/ContainerStatsResponse.md +43 -0
- package/docs/ContainerWaitResponse.md +37 -0
- package/docs/ContainersApi.md +928 -0
- package/docs/CreateContainerRequest.md +51 -0
- package/docs/CreateDeploymentRequest.md +35 -0
- package/docs/CreateEnvironmentRequest.md +39 -0
- package/docs/CreateGitCredentialRequest.md +39 -0
- package/docs/CreateGroupRequest.md +37 -0
- package/docs/CreateNodeTunnelRequest.md +45 -0
- package/docs/CreateNodeTunnelResponse.md +47 -0
- package/docs/CreateNotifierRequest.md +39 -0
- package/docs/CreateProjectRequest.md +57 -0
- package/docs/CreateRegistryCredentialRequest.md +41 -0
- package/docs/CreateSecretRequest.md +39 -0
- package/docs/CreateSyncRequest.md +43 -0
- package/docs/CreateTaskRequest.md +41 -0
- package/docs/CreateTunnelRequest.md +39 -0
- package/docs/CreateTunnelResponse.md +45 -0
- package/docs/CreateUserRequest.md +41 -0
- package/docs/CreateVariableRequest.md +39 -0
- package/docs/CreateWorkflowRequest.md +39 -0
- package/docs/CredentialsApi.md +434 -0
- package/docs/CronApi.md +369 -0
- package/docs/CronJobResponse.md +43 -0
- package/docs/CronStatusResponse.md +39 -0
- package/docs/CsrfResponse.md +34 -0
- package/docs/DeploymentDetails.md +45 -0
- package/docs/DeploymentSummary.md +41 -0
- package/docs/DeploymentsApi.md +295 -0
- package/docs/DnsStatusResponse.md +45 -0
- package/docs/EnvironmentsApi.md +383 -0
- package/docs/ForceLeaderRequest.md +35 -0
- package/docs/ForceLeaderResponse.md +41 -0
- package/docs/GitCredentialKindSchema.md +33 -0
- package/docs/GitCredentialResponse.md +39 -0
- package/docs/GpuInfoSummary.md +39 -0
- package/docs/GpuUtilizationReport.md +45 -0
- package/docs/GrantPermissionRequest.md +43 -0
- package/docs/GroupMembersResponse.md +37 -0
- package/docs/GroupsApi.md +497 -0
- package/docs/HealthApi.md +125 -0
- package/docs/HealthResponse.md +41 -0
- package/docs/HeartbeatRequest.md +43 -0
- package/docs/ImageInfoDto.md +39 -0
- package/docs/ImagesApi.md +372 -0
- package/docs/InternalApi.md +149 -0
- package/docs/InternalScaleRequest.md +37 -0
- package/docs/InternalScaleResponse.md +41 -0
- package/docs/IpAllocationResponse.md +45 -0
- package/docs/JobExecutionResponse.md +53 -0
- package/docs/JobsApi.md +311 -0
- package/docs/JoinTokenResponse.md +45 -0
- package/docs/KillContainerRequest.md +35 -0
- package/docs/LinkDeploymentRequest.md +35 -0
- package/docs/LoginRequest.md +36 -0
- package/docs/LoginResponse.md +37 -0
- package/docs/NetworkSummary.md +43 -0
- package/docs/NetworksApi.md +377 -0
- package/docs/NodeDetails.md +53 -0
- package/docs/NodeResourceInfo.md +45 -0
- package/docs/NodeSummary.md +45 -0
- package/docs/NodesApi.md +292 -0
- package/docs/NotifierConfig.md +55 -0
- package/docs/NotifierConfigOneOf.md +37 -0
- package/docs/NotifierConfigOneOf1.md +37 -0
- package/docs/NotifierConfigOneOf2.md +41 -0
- package/docs/NotifierConfigOneOf3.md +47 -0
- package/docs/NotifierKind.md +33 -0
- package/docs/NotifiersApi.md +446 -0
- package/docs/OverlayApi.md +251 -0
- package/docs/OverlayStatusResponse.md +51 -0
- package/docs/PeerInfo.md +47 -0
- package/docs/PeerListResponse.md +39 -0
- package/docs/PermissionLevel.md +33 -0
- package/docs/PermissionsApi.md +220 -0
- package/docs/ProjectPullResponse.md +43 -0
- package/docs/ProjectsApi.md +676 -0
- package/docs/ProxyApi.md +268 -0
- package/docs/PruneResultDto.md +37 -0
- package/docs/PullImageRequest.md +37 -0
- package/docs/PullImageResponse.md +39 -0
- package/docs/RegisteredServiceInfo.md +45 -0
- package/docs/RegistryAuthTypeSchema.md +33 -0
- package/docs/RegistryCredentialResponse.md +41 -0
- package/docs/ReplicationInfo.md +41 -0
- package/docs/RestartContainerRequest.md +35 -0
- package/docs/RouteInfo.md +51 -0
- package/docs/RoutesResponse.md +37 -0
- package/docs/ScaleRequest.md +35 -0
- package/docs/SecretMetadataResponse.md +43 -0
- package/docs/SecretsApi.md +411 -0
- package/docs/ServiceDetails.md +47 -0
- package/docs/ServiceEndpoint.md +41 -0
- package/docs/ServiceHealthInfo.md +43 -0
- package/docs/ServiceMetrics.md +39 -0
- package/docs/ServiceSummary.md +45 -0
- package/docs/ServicesApi.md +326 -0
- package/docs/SetPasswordRequest.md +37 -0
- package/docs/StepResult.md +39 -0
- package/docs/StopContainerRequest.md +35 -0
- package/docs/StorageApi.md +73 -0
- package/docs/StorageStatusResponse.md +35 -0
- package/docs/StoredEnvironment.md +45 -0
- package/docs/StoredNotifier.md +47 -0
- package/docs/StoredPermission.md +47 -0
- package/docs/StoredProject.md +65 -0
- package/docs/StoredSync.md +51 -0
- package/docs/StoredTask.md +47 -0
- package/docs/StoredUserGroup.md +43 -0
- package/docs/StoredVariable.md +45 -0
- package/docs/StoredWorkflow.md +45 -0
- package/docs/StreamBackendInfo.md +35 -0
- package/docs/StreamInfo.md +43 -0
- package/docs/StreamsResponse.md +41 -0
- package/docs/SubjectKind.md +33 -0
- package/docs/SuccessResponse.md +35 -0
- package/docs/SyncApplyResponse.md +39 -0
- package/docs/SyncDiffResponse.md +39 -0
- package/docs/SyncResourceResponse.md +39 -0
- package/docs/SyncResourceResult.md +43 -0
- package/docs/SyncsApi.md +365 -0
- package/docs/TagImageRequest.md +37 -0
- package/docs/TaskKind.md +33 -0
- package/docs/TaskRun.md +47 -0
- package/docs/TasksApi.md +450 -0
- package/docs/TemplateInfo.md +39 -0
- package/docs/TestNotifierResponse.md +37 -0
- package/docs/TlsResponse.md +41 -0
- package/docs/TokenRequest.md +37 -0
- package/docs/TokenResponse.md +39 -0
- package/docs/TriggerBuildResponse.md +37 -0
- package/docs/TriggerCronResponse.md +37 -0
- package/docs/TriggerJobResponse.md +37 -0
- package/docs/TunnelStatus.md +53 -0
- package/docs/TunnelSummary.md +47 -0
- package/docs/TunnelsApi.md +445 -0
- package/docs/UpdateEnvironmentRequest.md +37 -0
- package/docs/UpdateGroupRequest.md +37 -0
- package/docs/UpdateLabelsRequest.md +37 -0
- package/docs/UpdateLabelsResponse.md +35 -0
- package/docs/UpdateNotifierRequest.md +39 -0
- package/docs/UpdateProjectRequest.md +57 -0
- package/docs/UpdateUserRequest.md +39 -0
- package/docs/UpdateVariableRequest.md +37 -0
- package/docs/UserRole.md +33 -0
- package/docs/UserView.md +45 -0
- package/docs/UsersApi.md +427 -0
- package/docs/VariablesApi.md +382 -0
- package/docs/VolumeMount.md +39 -0
- package/docs/VolumeSummary.md +39 -0
- package/docs/VolumesApi.md +152 -0
- package/docs/WebhookInfoResponse.md +37 -0
- package/docs/WebhookResponse.md +37 -0
- package/docs/WebhooksApi.md +233 -0
- package/docs/WorkflowAction.md +41 -0
- package/docs/WorkflowActionOneOf.md +37 -0
- package/docs/WorkflowActionOneOf1.md +37 -0
- package/docs/WorkflowActionOneOf2.md +37 -0
- package/docs/WorkflowActionOneOf3.md +37 -0
- package/docs/WorkflowRun.md +45 -0
- package/docs/WorkflowRunStatus.md +33 -0
- package/docs/WorkflowStep.md +39 -0
- package/docs/WorkflowsApi.md +441 -0
- package/package.json +19 -0
- package/src/apis/AuditApi.ts +97 -0
- package/src/apis/AuthenticationApi.ts +319 -0
- package/src/apis/BuildApi.ts +411 -0
- package/src/apis/ClusterApi.ts +258 -0
- package/src/apis/ContainersApi.ts +813 -0
- package/src/apis/CredentialsApi.ts +371 -0
- package/src/apis/CronApi.ts +319 -0
- package/src/apis/DeploymentsApi.ts +261 -0
- package/src/apis/EnvironmentsApi.ts +339 -0
- package/src/apis/GroupsApi.ts +414 -0
- package/src/apis/HealthApi.ts +104 -0
- package/src/apis/ImagesApi.ts +320 -0
- package/src/apis/InternalApi.ts +137 -0
- package/src/apis/JobsApi.ts +278 -0
- package/src/apis/NetworksApi.ts +337 -0
- package/src/apis/NodesApi.ts +265 -0
- package/src/apis/NotifiersApi.ts +393 -0
- package/src/apis/OverlayApi.ts +195 -0
- package/src/apis/PermissionsApi.ts +188 -0
- package/src/apis/ProjectsApi.ts +591 -0
- package/src/apis/ProxyApi.ts +227 -0
- package/src/apis/SecretsApi.ts +382 -0
- package/src/apis/ServicesApi.ts +329 -0
- package/src/apis/StorageApi.ts +77 -0
- package/src/apis/SyncsApi.ts +323 -0
- package/src/apis/TasksApi.ts +387 -0
- package/src/apis/TunnelsApi.ts +394 -0
- package/src/apis/UsersApi.ts +355 -0
- package/src/apis/VariablesApi.ts +339 -0
- package/src/apis/VolumesApi.ts +147 -0
- package/src/apis/WebhooksApi.ts +222 -0
- package/src/apis/WorkflowsApi.ts +379 -0
- package/src/apis/index.ts +34 -0
- package/src/index.ts +5 -0
- package/src/models/AddMemberRequest.ts +66 -0
- package/src/models/AuditEntry.ts +137 -0
- package/src/models/BackendGroupInfo.ts +110 -0
- package/src/models/BackendInfo.ts +93 -0
- package/src/models/BackendsResponse.ts +83 -0
- package/src/models/BootstrapRequest.ts +83 -0
- package/src/models/BuildKind.ts +55 -0
- package/src/models/BuildRequest.ts +105 -0
- package/src/models/BuildRequestWithContext.ts +114 -0
- package/src/models/BuildStateEnum.ts +55 -0
- package/src/models/BuildStatus.ts +118 -0
- package/src/models/BulkImportResponse.ts +84 -0
- package/src/models/CertInfo.ts +99 -0
- package/src/models/ClusterJoinRequest.ts +166 -0
- package/src/models/ClusterJoinResponse.ts +110 -0
- package/src/models/ClusterNodeSummary.ts +183 -0
- package/src/models/ClusterPeer.ts +120 -0
- package/src/models/ContainerExecRequest.ts +66 -0
- package/src/models/ContainerExecResponse.ts +84 -0
- package/src/models/ContainerInfo.ts +118 -0
- package/src/models/ContainerResourceLimits.ts +73 -0
- package/src/models/ContainerStatsResponse.ts +102 -0
- package/src/models/ContainerWaitResponse.ts +75 -0
- package/src/models/CreateContainerRequest.ts +145 -0
- package/src/models/CreateDeploymentRequest.ts +66 -0
- package/src/models/CreateEnvironmentRequest.ts +82 -0
- package/src/models/CreateGitCredentialRequest.ts +94 -0
- package/src/models/CreateGroupRequest.ts +74 -0
- package/src/models/CreateNodeTunnelRequest.ts +110 -0
- package/src/models/CreateNodeTunnelResponse.ts +120 -0
- package/src/models/CreateNotifierRequest.ts +101 -0
- package/src/models/CreateProjectRequest.ts +165 -0
- package/src/models/CreateRegistryCredentialRequest.ts +103 -0
- package/src/models/CreateSecretRequest.ts +87 -0
- package/src/models/CreateSyncRequest.ts +100 -0
- package/src/models/CreateTaskRequest.ts +102 -0
- package/src/models/CreateTunnelRequest.ts +82 -0
- package/src/models/CreateTunnelResponse.ts +111 -0
- package/src/models/CreateUserRequest.ts +102 -0
- package/src/models/CreateVariableRequest.ts +84 -0
- package/src/models/CreateWorkflowRequest.ts +91 -0
- package/src/models/CronJobResponse.ts +100 -0
- package/src/models/CronStatusResponse.ts +84 -0
- package/src/models/CsrfResponse.ts +66 -0
- package/src/models/DeploymentDetails.ts +119 -0
- package/src/models/DeploymentSummary.ts +93 -0
- package/src/models/DnsStatusResponse.ts +108 -0
- package/src/models/ForceLeaderRequest.ts +66 -0
- package/src/models/ForceLeaderResponse.ts +93 -0
- package/src/models/GitCredentialKindSchema.ts +53 -0
- package/src/models/GitCredentialResponse.ts +94 -0
- package/src/models/GpuInfoSummary.ts +84 -0
- package/src/models/GpuUtilizationReport.ts +109 -0
- package/src/models/GrantPermissionRequest.ts +118 -0
- package/src/models/GroupMembersResponse.ts +75 -0
- package/src/models/HealthResponse.ts +91 -0
- package/src/models/HeartbeatRequest.ts +109 -0
- package/src/models/ImageInfoDto.ts +83 -0
- package/src/models/InternalScaleRequest.ts +75 -0
- package/src/models/InternalScaleResponse.ts +92 -0
- package/src/models/IpAllocationResponse.ts +110 -0
- package/src/models/JobExecutionResponse.ts +141 -0
- package/src/models/JoinTokenResponse.ts +111 -0
- package/src/models/KillContainerRequest.ts +67 -0
- package/src/models/LinkDeploymentRequest.ts +66 -0
- package/src/models/LoginRequest.ts +75 -0
- package/src/models/LoginResponse.ts +83 -0
- package/src/models/NetworkSummary.ts +101 -0
- package/src/models/NodeDetails.ts +155 -0
- package/src/models/NodeResourceInfo.ts +111 -0
- package/src/models/NodeSummary.ts +111 -0
- package/src/models/NotifierConfig.ts +102 -0
- package/src/models/NotifierConfigOneOf.ts +85 -0
- package/src/models/NotifierConfigOneOf1.ts +85 -0
- package/src/models/NotifierConfigOneOf2.ts +101 -0
- package/src/models/NotifierConfigOneOf3.ts +130 -0
- package/src/models/NotifierKind.ts +55 -0
- package/src/models/OverlayStatusResponse.ts +138 -0
- package/src/models/PeerInfo.ts +117 -0
- package/src/models/PeerListResponse.ts +92 -0
- package/src/models/PermissionLevel.ts +56 -0
- package/src/models/ProjectPullResponse.ts +102 -0
- package/src/models/PruneResultDto.ts +75 -0
- package/src/models/PullImageRequest.ts +75 -0
- package/src/models/PullImageResponse.ts +84 -0
- package/src/models/RegisteredServiceInfo.ts +111 -0
- package/src/models/RegistryAuthTypeSchema.ts +53 -0
- package/src/models/RegistryCredentialResponse.ts +103 -0
- package/src/models/ReplicationInfo.ts +92 -0
- package/src/models/RestartContainerRequest.ts +67 -0
- package/src/models/RouteInfo.ts +137 -0
- package/src/models/RoutesResponse.ts +83 -0
- package/src/models/ScaleRequest.ts +66 -0
- package/src/models/SecretMetadataResponse.ts +103 -0
- package/src/models/ServiceDetails.ts +135 -0
- package/src/models/ServiceEndpoint.ts +92 -0
- package/src/models/ServiceHealthInfo.ts +102 -0
- package/src/models/ServiceMetrics.ts +83 -0
- package/src/models/ServiceSummary.ts +119 -0
- package/src/models/SetPasswordRequest.ts +75 -0
- package/src/models/StepResult.ts +83 -0
- package/src/models/StopContainerRequest.ts +67 -0
- package/src/models/StorageStatusResponse.ts +74 -0
- package/src/models/StoredEnvironment.ts +113 -0
- package/src/models/StoredNotifier.ts +138 -0
- package/src/models/StoredPermission.ts +138 -0
- package/src/models/StoredProject.ts +208 -0
- package/src/models/StoredSync.ts +140 -0
- package/src/models/StoredTask.ts +132 -0
- package/src/models/StoredUserGroup.ts +101 -0
- package/src/models/StoredVariable.ts +116 -0
- package/src/models/StoredWorkflow.ts +119 -0
- package/src/models/StreamBackendInfo.ts +66 -0
- package/src/models/StreamInfo.ts +110 -0
- package/src/models/StreamsResponse.ts +101 -0
- package/src/models/SubjectKind.ts +53 -0
- package/src/models/SuccessResponse.ts +66 -0
- package/src/models/SyncApplyResponse.ts +98 -0
- package/src/models/SyncDiffResponse.ts +92 -0
- package/src/models/SyncResourceResponse.ts +84 -0
- package/src/models/SyncResourceResult.ts +102 -0
- package/src/models/TagImageRequest.ts +77 -0
- package/src/models/TaskKind.ts +52 -0
- package/src/models/TaskRun.ts +118 -0
- package/src/models/TemplateInfo.ts +84 -0
- package/src/models/TestNotifierResponse.ts +75 -0
- package/src/models/TlsResponse.ts +100 -0
- package/src/models/TokenRequest.ts +75 -0
- package/src/models/TokenResponse.ts +84 -0
- package/src/models/TriggerBuildResponse.ts +75 -0
- package/src/models/TriggerCronResponse.ts +75 -0
- package/src/models/TriggerJobResponse.ts +75 -0
- package/src/models/TunnelStatus.ts +153 -0
- package/src/models/TunnelSummary.ts +119 -0
- package/src/models/UpdateEnvironmentRequest.ts +73 -0
- package/src/models/UpdateGroupRequest.ts +73 -0
- package/src/models/UpdateLabelsRequest.ts +75 -0
- package/src/models/UpdateLabelsResponse.ts +66 -0
- package/src/models/UpdateNotifierRequest.ts +89 -0
- package/src/models/UpdateProjectRequest.ts +164 -0
- package/src/models/UpdateUserRequest.ts +92 -0
- package/src/models/UpdateVariableRequest.ts +73 -0
- package/src/models/UserRole.ts +54 -0
- package/src/models/UserView.ts +110 -0
- package/src/models/VolumeMount.ts +83 -0
- package/src/models/VolumeSummary.ts +83 -0
- package/src/models/WebhookInfoResponse.ts +75 -0
- package/src/models/WebhookResponse.ts +75 -0
- package/src/models/WorkflowAction.ts +102 -0
- package/src/models/WorkflowActionOneOf.ts +85 -0
- package/src/models/WorkflowActionOneOf1.ts +85 -0
- package/src/models/WorkflowActionOneOf2.ts +85 -0
- package/src/models/WorkflowActionOneOf3.ts +85 -0
- package/src/models/WorkflowRun.ts +127 -0
- package/src/models/WorkflowRunStatus.ts +55 -0
- package/src/models/WorkflowStep.ts +91 -0
- package/src/models/index.ts +158 -0
- package/src/runtime.ts +450 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,928 @@
|
|
|
1
|
+
# ContainersApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createContainer**](ContainersApi.md#createcontaineroperation) | **POST** /api/v1/containers | Create and start a container. |
|
|
8
|
+
| [**deleteContainer**](ContainersApi.md#deletecontainer) | **DELETE** /api/v1/containers/{id} | Stop and remove a container. |
|
|
9
|
+
| [**execInContainer**](ContainersApi.md#execincontainer) | **POST** /api/v1/containers/{id}/exec | Execute a command in a running container. |
|
|
10
|
+
| [**getContainer**](ContainersApi.md#getcontainer) | **GET** /api/v1/containers/{id} | Get details for a specific container. |
|
|
11
|
+
| [**getContainerLogs**](ContainersApi.md#getcontainerlogs) | **GET** /api/v1/containers/{id}/logs | Get container logs. |
|
|
12
|
+
| [**getContainerStats**](ContainersApi.md#getcontainerstats) | **GET** /api/v1/containers/{id}/stats | Get container resource statistics. |
|
|
13
|
+
| [**killContainer**](ContainersApi.md#killcontaineroperation) | **POST** /api/v1/containers/{id}/kill | Send a signal to a running container. |
|
|
14
|
+
| [**listContainers**](ContainersApi.md#listcontainers) | **GET** /api/v1/containers | List standalone containers. |
|
|
15
|
+
| [**restartContainer**](ContainersApi.md#restartcontaineroperation) | **POST** /api/v1/containers/{id}/restart | Restart a container: stop then start. |
|
|
16
|
+
| [**startContainer**](ContainersApi.md#startcontainer) | **POST** /api/v1/containers/{id}/start | Start a previously-created container. |
|
|
17
|
+
| [**stopContainer**](ContainersApi.md#stopcontaineroperation) | **POST** /api/v1/containers/{id}/stop | Stop a running container. |
|
|
18
|
+
| [**waitContainer**](ContainersApi.md#waitcontainer) | **GET** /api/v1/containers/{id}/wait | Wait for a container to exit and return its exit code. |
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## createContainer
|
|
23
|
+
|
|
24
|
+
> ContainerInfo createContainer(createContainerRequest)
|
|
25
|
+
|
|
26
|
+
Create and start a container.
|
|
27
|
+
|
|
28
|
+
Pulls the image if needed, creates the container, and starts it. Returns the container info including its assigned ID. # Errors Returns an error if image pull fails, container creation fails, or the user lacks the operator role.
|
|
29
|
+
|
|
30
|
+
### Example
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import {
|
|
34
|
+
Configuration,
|
|
35
|
+
ContainersApi,
|
|
36
|
+
} from '@zlayer/client';
|
|
37
|
+
import type { CreateContainerOperationRequest } from '@zlayer/client';
|
|
38
|
+
|
|
39
|
+
async function example() {
|
|
40
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
41
|
+
const config = new Configuration({
|
|
42
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
43
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
44
|
+
});
|
|
45
|
+
const api = new ContainersApi(config);
|
|
46
|
+
|
|
47
|
+
const body = {
|
|
48
|
+
// CreateContainerRequest
|
|
49
|
+
createContainerRequest: ...,
|
|
50
|
+
} satisfies CreateContainerOperationRequest;
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
const data = await api.createContainer(body);
|
|
54
|
+
console.log(data);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
console.error(error);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Run the test
|
|
61
|
+
example().catch(console.error);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
| Name | Type | Description | Notes |
|
|
68
|
+
|------------- | ------------- | ------------- | -------------|
|
|
69
|
+
| **createContainerRequest** | [CreateContainerRequest](CreateContainerRequest.md) | | |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
[**ContainerInfo**](ContainerInfo.md)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: `application/json`
|
|
82
|
+
- **Accept**: `application/json`
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### HTTP response details
|
|
86
|
+
| Status code | Description | Response headers |
|
|
87
|
+
|-------------|-------------|------------------|
|
|
88
|
+
| **201** | Container created and started | - |
|
|
89
|
+
| **400** | Invalid request | - |
|
|
90
|
+
| **401** | Unauthorized | - |
|
|
91
|
+
| **403** | Forbidden - operator role required | - |
|
|
92
|
+
| **500** | Internal error | - |
|
|
93
|
+
|
|
94
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## deleteContainer
|
|
98
|
+
|
|
99
|
+
> deleteContainer(id)
|
|
100
|
+
|
|
101
|
+
Stop and remove a container.
|
|
102
|
+
|
|
103
|
+
Sends a stop signal (with a 30-second timeout), then removes the container. # Errors Returns an error if the container is not found, stop/remove fails, or the user lacks the operator role.
|
|
104
|
+
|
|
105
|
+
### Example
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
import {
|
|
109
|
+
Configuration,
|
|
110
|
+
ContainersApi,
|
|
111
|
+
} from '@zlayer/client';
|
|
112
|
+
import type { DeleteContainerRequest } from '@zlayer/client';
|
|
113
|
+
|
|
114
|
+
async function example() {
|
|
115
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
116
|
+
const config = new Configuration({
|
|
117
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
118
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
119
|
+
});
|
|
120
|
+
const api = new ContainersApi(config);
|
|
121
|
+
|
|
122
|
+
const body = {
|
|
123
|
+
// string | Container identifier
|
|
124
|
+
id: id_example,
|
|
125
|
+
} satisfies DeleteContainerRequest;
|
|
126
|
+
|
|
127
|
+
try {
|
|
128
|
+
const data = await api.deleteContainer(body);
|
|
129
|
+
console.log(data);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
console.error(error);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Run the test
|
|
136
|
+
example().catch(console.error);
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Parameters
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
| Name | Type | Description | Notes |
|
|
143
|
+
|------------- | ------------- | ------------- | -------------|
|
|
144
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
145
|
+
|
|
146
|
+
### Return type
|
|
147
|
+
|
|
148
|
+
`void` (Empty response body)
|
|
149
|
+
|
|
150
|
+
### Authorization
|
|
151
|
+
|
|
152
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
153
|
+
|
|
154
|
+
### HTTP request headers
|
|
155
|
+
|
|
156
|
+
- **Content-Type**: Not defined
|
|
157
|
+
- **Accept**: Not defined
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
### HTTP response details
|
|
161
|
+
| Status code | Description | Response headers |
|
|
162
|
+
|-------------|-------------|------------------|
|
|
163
|
+
| **204** | Container stopped and removed | - |
|
|
164
|
+
| **401** | Unauthorized | - |
|
|
165
|
+
| **403** | Forbidden - operator role required | - |
|
|
166
|
+
| **404** | Container not found | - |
|
|
167
|
+
|
|
168
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
## execInContainer
|
|
172
|
+
|
|
173
|
+
> ContainerExecResponse execInContainer(id, containerExecRequest)
|
|
174
|
+
|
|
175
|
+
Execute a command in a running container.
|
|
176
|
+
|
|
177
|
+
# Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
|
|
178
|
+
|
|
179
|
+
### Example
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
import {
|
|
183
|
+
Configuration,
|
|
184
|
+
ContainersApi,
|
|
185
|
+
} from '@zlayer/client';
|
|
186
|
+
import type { ExecInContainerRequest } from '@zlayer/client';
|
|
187
|
+
|
|
188
|
+
async function example() {
|
|
189
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
190
|
+
const config = new Configuration({
|
|
191
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
192
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
193
|
+
});
|
|
194
|
+
const api = new ContainersApi(config);
|
|
195
|
+
|
|
196
|
+
const body = {
|
|
197
|
+
// string | Container identifier
|
|
198
|
+
id: id_example,
|
|
199
|
+
// ContainerExecRequest
|
|
200
|
+
containerExecRequest: ...,
|
|
201
|
+
} satisfies ExecInContainerRequest;
|
|
202
|
+
|
|
203
|
+
try {
|
|
204
|
+
const data = await api.execInContainer(body);
|
|
205
|
+
console.log(data);
|
|
206
|
+
} catch (error) {
|
|
207
|
+
console.error(error);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// Run the test
|
|
212
|
+
example().catch(console.error);
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameters
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
| Name | Type | Description | Notes |
|
|
219
|
+
|------------- | ------------- | ------------- | -------------|
|
|
220
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
221
|
+
| **containerExecRequest** | [ContainerExecRequest](ContainerExecRequest.md) | | |
|
|
222
|
+
|
|
223
|
+
### Return type
|
|
224
|
+
|
|
225
|
+
[**ContainerExecResponse**](ContainerExecResponse.md)
|
|
226
|
+
|
|
227
|
+
### Authorization
|
|
228
|
+
|
|
229
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
230
|
+
|
|
231
|
+
### HTTP request headers
|
|
232
|
+
|
|
233
|
+
- **Content-Type**: `application/json`
|
|
234
|
+
- **Accept**: `application/json`
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### HTTP response details
|
|
238
|
+
| Status code | Description | Response headers |
|
|
239
|
+
|-------------|-------------|------------------|
|
|
240
|
+
| **200** | Command executed | - |
|
|
241
|
+
| **400** | Invalid request | - |
|
|
242
|
+
| **401** | Unauthorized | - |
|
|
243
|
+
| **403** | Forbidden - operator role required | - |
|
|
244
|
+
| **404** | Container not found | - |
|
|
245
|
+
|
|
246
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
## getContainer
|
|
250
|
+
|
|
251
|
+
> ContainerInfo getContainer(id)
|
|
252
|
+
|
|
253
|
+
Get details for a specific container.
|
|
254
|
+
|
|
255
|
+
# Errors Returns an error if the container is not found or the user is not authenticated.
|
|
256
|
+
|
|
257
|
+
### Example
|
|
258
|
+
|
|
259
|
+
```ts
|
|
260
|
+
import {
|
|
261
|
+
Configuration,
|
|
262
|
+
ContainersApi,
|
|
263
|
+
} from '@zlayer/client';
|
|
264
|
+
import type { GetContainerRequest } from '@zlayer/client';
|
|
265
|
+
|
|
266
|
+
async function example() {
|
|
267
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
268
|
+
const config = new Configuration({
|
|
269
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
270
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
271
|
+
});
|
|
272
|
+
const api = new ContainersApi(config);
|
|
273
|
+
|
|
274
|
+
const body = {
|
|
275
|
+
// string | Container identifier
|
|
276
|
+
id: id_example,
|
|
277
|
+
} satisfies GetContainerRequest;
|
|
278
|
+
|
|
279
|
+
try {
|
|
280
|
+
const data = await api.getContainer(body);
|
|
281
|
+
console.log(data);
|
|
282
|
+
} catch (error) {
|
|
283
|
+
console.error(error);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// Run the test
|
|
288
|
+
example().catch(console.error);
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
### Parameters
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
| Name | Type | Description | Notes |
|
|
295
|
+
|------------- | ------------- | ------------- | -------------|
|
|
296
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
297
|
+
|
|
298
|
+
### Return type
|
|
299
|
+
|
|
300
|
+
[**ContainerInfo**](ContainerInfo.md)
|
|
301
|
+
|
|
302
|
+
### Authorization
|
|
303
|
+
|
|
304
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
305
|
+
|
|
306
|
+
### HTTP request headers
|
|
307
|
+
|
|
308
|
+
- **Content-Type**: Not defined
|
|
309
|
+
- **Accept**: `application/json`
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
### HTTP response details
|
|
313
|
+
| Status code | Description | Response headers |
|
|
314
|
+
|-------------|-------------|------------------|
|
|
315
|
+
| **200** | Container details | - |
|
|
316
|
+
| **401** | Unauthorized | - |
|
|
317
|
+
| **404** | Container not found | - |
|
|
318
|
+
|
|
319
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
## getContainerLogs
|
|
323
|
+
|
|
324
|
+
> string getContainerLogs(id, tail, follow)
|
|
325
|
+
|
|
326
|
+
Get container logs.
|
|
327
|
+
|
|
328
|
+
Returns the last N lines of container logs as plain text, or streams logs as Server-Sent Events when `follow=true`. # Errors Returns an error if the container is not found or log retrieval fails.
|
|
329
|
+
|
|
330
|
+
### Example
|
|
331
|
+
|
|
332
|
+
```ts
|
|
333
|
+
import {
|
|
334
|
+
Configuration,
|
|
335
|
+
ContainersApi,
|
|
336
|
+
} from '@zlayer/client';
|
|
337
|
+
import type { GetContainerLogsRequest } from '@zlayer/client';
|
|
338
|
+
|
|
339
|
+
async function example() {
|
|
340
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
341
|
+
const config = new Configuration({
|
|
342
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
343
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
344
|
+
});
|
|
345
|
+
const api = new ContainersApi(config);
|
|
346
|
+
|
|
347
|
+
const body = {
|
|
348
|
+
// string | Container identifier
|
|
349
|
+
id: id_example,
|
|
350
|
+
// number | Number of tail lines to return (optional)
|
|
351
|
+
tail: 56,
|
|
352
|
+
// boolean | Follow logs (SSE stream) (optional)
|
|
353
|
+
follow: true,
|
|
354
|
+
} satisfies GetContainerLogsRequest;
|
|
355
|
+
|
|
356
|
+
try {
|
|
357
|
+
const data = await api.getContainerLogs(body);
|
|
358
|
+
console.log(data);
|
|
359
|
+
} catch (error) {
|
|
360
|
+
console.error(error);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// Run the test
|
|
365
|
+
example().catch(console.error);
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Parameters
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
| Name | Type | Description | Notes |
|
|
372
|
+
|------------- | ------------- | ------------- | -------------|
|
|
373
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
374
|
+
| **tail** | `number` | Number of tail lines to return | [Optional] [Defaults to `undefined`] |
|
|
375
|
+
| **follow** | `boolean` | Follow logs (SSE stream) | [Optional] [Defaults to `undefined`] |
|
|
376
|
+
|
|
377
|
+
### Return type
|
|
378
|
+
|
|
379
|
+
**string**
|
|
380
|
+
|
|
381
|
+
### Authorization
|
|
382
|
+
|
|
383
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
384
|
+
|
|
385
|
+
### HTTP request headers
|
|
386
|
+
|
|
387
|
+
- **Content-Type**: Not defined
|
|
388
|
+
- **Accept**: `text/plain`
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
### HTTP response details
|
|
392
|
+
| Status code | Description | Response headers |
|
|
393
|
+
|-------------|-------------|------------------|
|
|
394
|
+
| **200** | Container logs (plain text or SSE stream) | - |
|
|
395
|
+
| **401** | Unauthorized | - |
|
|
396
|
+
| **404** | Container not found | - |
|
|
397
|
+
|
|
398
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
## getContainerStats
|
|
402
|
+
|
|
403
|
+
> ContainerStatsResponse getContainerStats(id)
|
|
404
|
+
|
|
405
|
+
Get container resource statistics.
|
|
406
|
+
|
|
407
|
+
Returns CPU and memory usage statistics for the specified container. # Errors Returns an error if the container is not found or stats retrieval fails.
|
|
408
|
+
|
|
409
|
+
### Example
|
|
410
|
+
|
|
411
|
+
```ts
|
|
412
|
+
import {
|
|
413
|
+
Configuration,
|
|
414
|
+
ContainersApi,
|
|
415
|
+
} from '@zlayer/client';
|
|
416
|
+
import type { GetContainerStatsRequest } from '@zlayer/client';
|
|
417
|
+
|
|
418
|
+
async function example() {
|
|
419
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
420
|
+
const config = new Configuration({
|
|
421
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
422
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
423
|
+
});
|
|
424
|
+
const api = new ContainersApi(config);
|
|
425
|
+
|
|
426
|
+
const body = {
|
|
427
|
+
// string | Container identifier
|
|
428
|
+
id: id_example,
|
|
429
|
+
} satisfies GetContainerStatsRequest;
|
|
430
|
+
|
|
431
|
+
try {
|
|
432
|
+
const data = await api.getContainerStats(body);
|
|
433
|
+
console.log(data);
|
|
434
|
+
} catch (error) {
|
|
435
|
+
console.error(error);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// Run the test
|
|
440
|
+
example().catch(console.error);
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
### Parameters
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
| Name | Type | Description | Notes |
|
|
447
|
+
|------------- | ------------- | ------------- | -------------|
|
|
448
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
449
|
+
|
|
450
|
+
### Return type
|
|
451
|
+
|
|
452
|
+
[**ContainerStatsResponse**](ContainerStatsResponse.md)
|
|
453
|
+
|
|
454
|
+
### Authorization
|
|
455
|
+
|
|
456
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
457
|
+
|
|
458
|
+
### HTTP request headers
|
|
459
|
+
|
|
460
|
+
- **Content-Type**: Not defined
|
|
461
|
+
- **Accept**: `application/json`
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
### HTTP response details
|
|
465
|
+
| Status code | Description | Response headers |
|
|
466
|
+
|-------------|-------------|------------------|
|
|
467
|
+
| **200** | Container statistics | - |
|
|
468
|
+
| **401** | Unauthorized | - |
|
|
469
|
+
| **404** | Container not found | - |
|
|
470
|
+
|
|
471
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
## killContainer
|
|
475
|
+
|
|
476
|
+
> killContainer(id, killContainerRequest)
|
|
477
|
+
|
|
478
|
+
Send a signal to a running container.
|
|
479
|
+
|
|
480
|
+
Mirrors Docker-compat `POST /containers/{id}/kill`. When the request body\'s `signal` field is omitted, the runtime sends `SIGKILL`. Accepted signals are `SIGKILL`, `SIGTERM`, `SIGINT`, `SIGHUP`, `SIGUSR1`, `SIGUSR2` (with or without the `SIG` prefix); any other value is rejected with `400`. # Errors Returns `400` for unknown signals, `404` if the container is not found, `403` if the caller lacks the `operator` role, `501` if the runtime does not support `kill_container`, and `500` for other runtime errors.
|
|
481
|
+
|
|
482
|
+
### Example
|
|
483
|
+
|
|
484
|
+
```ts
|
|
485
|
+
import {
|
|
486
|
+
Configuration,
|
|
487
|
+
ContainersApi,
|
|
488
|
+
} from '@zlayer/client';
|
|
489
|
+
import type { KillContainerOperationRequest } from '@zlayer/client';
|
|
490
|
+
|
|
491
|
+
async function example() {
|
|
492
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
493
|
+
const config = new Configuration({
|
|
494
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
495
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
496
|
+
});
|
|
497
|
+
const api = new ContainersApi(config);
|
|
498
|
+
|
|
499
|
+
const body = {
|
|
500
|
+
// string | Container identifier
|
|
501
|
+
id: id_example,
|
|
502
|
+
// KillContainerRequest
|
|
503
|
+
killContainerRequest: ...,
|
|
504
|
+
} satisfies KillContainerOperationRequest;
|
|
505
|
+
|
|
506
|
+
try {
|
|
507
|
+
const data = await api.killContainer(body);
|
|
508
|
+
console.log(data);
|
|
509
|
+
} catch (error) {
|
|
510
|
+
console.error(error);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// Run the test
|
|
515
|
+
example().catch(console.error);
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### Parameters
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
| Name | Type | Description | Notes |
|
|
522
|
+
|------------- | ------------- | ------------- | -------------|
|
|
523
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
524
|
+
| **killContainerRequest** | [KillContainerRequest](KillContainerRequest.md) | | |
|
|
525
|
+
|
|
526
|
+
### Return type
|
|
527
|
+
|
|
528
|
+
`void` (Empty response body)
|
|
529
|
+
|
|
530
|
+
### Authorization
|
|
531
|
+
|
|
532
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
533
|
+
|
|
534
|
+
### HTTP request headers
|
|
535
|
+
|
|
536
|
+
- **Content-Type**: `application/json`
|
|
537
|
+
- **Accept**: Not defined
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
### HTTP response details
|
|
541
|
+
| Status code | Description | Response headers |
|
|
542
|
+
|-------------|-------------|------------------|
|
|
543
|
+
| **204** | Signal delivered | - |
|
|
544
|
+
| **400** | Invalid signal | - |
|
|
545
|
+
| **401** | Unauthorized | - |
|
|
546
|
+
| **403** | Forbidden - operator role required | - |
|
|
547
|
+
| **404** | Container not found | - |
|
|
548
|
+
| **500** | Internal error | - |
|
|
549
|
+
| **501** | Runtime does not support kill | - |
|
|
550
|
+
|
|
551
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
## listContainers
|
|
555
|
+
|
|
556
|
+
> Array<ContainerInfo> listContainers(label)
|
|
557
|
+
|
|
558
|
+
List standalone containers.
|
|
559
|
+
|
|
560
|
+
Returns all containers managed through this API. Optionally filter by label using the `label` query parameter in `key=value` format. # Errors Returns an error if the user is not authenticated.
|
|
561
|
+
|
|
562
|
+
### Example
|
|
563
|
+
|
|
564
|
+
```ts
|
|
565
|
+
import {
|
|
566
|
+
Configuration,
|
|
567
|
+
ContainersApi,
|
|
568
|
+
} from '@zlayer/client';
|
|
569
|
+
import type { ListContainersRequest } from '@zlayer/client';
|
|
570
|
+
|
|
571
|
+
async function example() {
|
|
572
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
573
|
+
const config = new Configuration({
|
|
574
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
575
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
576
|
+
});
|
|
577
|
+
const api = new ContainersApi(config);
|
|
578
|
+
|
|
579
|
+
const body = {
|
|
580
|
+
// string | Filter by label (key=value format) (optional)
|
|
581
|
+
label: label_example,
|
|
582
|
+
} satisfies ListContainersRequest;
|
|
583
|
+
|
|
584
|
+
try {
|
|
585
|
+
const data = await api.listContainers(body);
|
|
586
|
+
console.log(data);
|
|
587
|
+
} catch (error) {
|
|
588
|
+
console.error(error);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// Run the test
|
|
593
|
+
example().catch(console.error);
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### Parameters
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
| Name | Type | Description | Notes |
|
|
600
|
+
|------------- | ------------- | ------------- | -------------|
|
|
601
|
+
| **label** | `string` | Filter by label (key=value format) | [Optional] [Defaults to `undefined`] |
|
|
602
|
+
|
|
603
|
+
### Return type
|
|
604
|
+
|
|
605
|
+
[**Array<ContainerInfo>**](ContainerInfo.md)
|
|
606
|
+
|
|
607
|
+
### Authorization
|
|
608
|
+
|
|
609
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
610
|
+
|
|
611
|
+
### HTTP request headers
|
|
612
|
+
|
|
613
|
+
- **Content-Type**: Not defined
|
|
614
|
+
- **Accept**: `application/json`
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
### HTTP response details
|
|
618
|
+
| Status code | Description | Response headers |
|
|
619
|
+
|-------------|-------------|------------------|
|
|
620
|
+
| **200** | List of containers | - |
|
|
621
|
+
| **401** | Unauthorized | - |
|
|
622
|
+
|
|
623
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
## restartContainer
|
|
627
|
+
|
|
628
|
+
> restartContainer(id, restartContainerRequest)
|
|
629
|
+
|
|
630
|
+
Restart a container: stop then start.
|
|
631
|
+
|
|
632
|
+
Composes `stop_container(timeout)` followed by `start_container`. Errors during the stop phase are ignored (the container may already be stopped); errors during the start phase are surfaced. # Errors Returns an error if the container is not found, the start phase fails, or the user lacks the operator role.
|
|
633
|
+
|
|
634
|
+
### Example
|
|
635
|
+
|
|
636
|
+
```ts
|
|
637
|
+
import {
|
|
638
|
+
Configuration,
|
|
639
|
+
ContainersApi,
|
|
640
|
+
} from '@zlayer/client';
|
|
641
|
+
import type { RestartContainerOperationRequest } from '@zlayer/client';
|
|
642
|
+
|
|
643
|
+
async function example() {
|
|
644
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
645
|
+
const config = new Configuration({
|
|
646
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
647
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
648
|
+
});
|
|
649
|
+
const api = new ContainersApi(config);
|
|
650
|
+
|
|
651
|
+
const body = {
|
|
652
|
+
// string | Container identifier
|
|
653
|
+
id: id_example,
|
|
654
|
+
// RestartContainerRequest
|
|
655
|
+
restartContainerRequest: ...,
|
|
656
|
+
} satisfies RestartContainerOperationRequest;
|
|
657
|
+
|
|
658
|
+
try {
|
|
659
|
+
const data = await api.restartContainer(body);
|
|
660
|
+
console.log(data);
|
|
661
|
+
} catch (error) {
|
|
662
|
+
console.error(error);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
// Run the test
|
|
667
|
+
example().catch(console.error);
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
### Parameters
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
| Name | Type | Description | Notes |
|
|
674
|
+
|------------- | ------------- | ------------- | -------------|
|
|
675
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
676
|
+
| **restartContainerRequest** | [RestartContainerRequest](RestartContainerRequest.md) | | |
|
|
677
|
+
|
|
678
|
+
### Return type
|
|
679
|
+
|
|
680
|
+
`void` (Empty response body)
|
|
681
|
+
|
|
682
|
+
### Authorization
|
|
683
|
+
|
|
684
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
685
|
+
|
|
686
|
+
### HTTP request headers
|
|
687
|
+
|
|
688
|
+
- **Content-Type**: `application/json`
|
|
689
|
+
- **Accept**: Not defined
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
### HTTP response details
|
|
693
|
+
| Status code | Description | Response headers |
|
|
694
|
+
|-------------|-------------|------------------|
|
|
695
|
+
| **204** | Container restarted | - |
|
|
696
|
+
| **401** | Unauthorized | - |
|
|
697
|
+
| **403** | Forbidden - operator role required | - |
|
|
698
|
+
| **404** | Container not found | - |
|
|
699
|
+
| **500** | Internal error | - |
|
|
700
|
+
|
|
701
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
## startContainer
|
|
705
|
+
|
|
706
|
+
> startContainer(id)
|
|
707
|
+
|
|
708
|
+
Start a previously-created container.
|
|
709
|
+
|
|
710
|
+
Useful for re-starting a container that was stopped via `POST /api/v1/containers/{id}/stop` without being removed. # Errors Returns an error if the container is not found, start fails, or the user lacks the operator role.
|
|
711
|
+
|
|
712
|
+
### Example
|
|
713
|
+
|
|
714
|
+
```ts
|
|
715
|
+
import {
|
|
716
|
+
Configuration,
|
|
717
|
+
ContainersApi,
|
|
718
|
+
} from '@zlayer/client';
|
|
719
|
+
import type { StartContainerRequest } from '@zlayer/client';
|
|
720
|
+
|
|
721
|
+
async function example() {
|
|
722
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
723
|
+
const config = new Configuration({
|
|
724
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
725
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
726
|
+
});
|
|
727
|
+
const api = new ContainersApi(config);
|
|
728
|
+
|
|
729
|
+
const body = {
|
|
730
|
+
// string | Container identifier
|
|
731
|
+
id: id_example,
|
|
732
|
+
} satisfies StartContainerRequest;
|
|
733
|
+
|
|
734
|
+
try {
|
|
735
|
+
const data = await api.startContainer(body);
|
|
736
|
+
console.log(data);
|
|
737
|
+
} catch (error) {
|
|
738
|
+
console.error(error);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// Run the test
|
|
743
|
+
example().catch(console.error);
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
### Parameters
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
| Name | Type | Description | Notes |
|
|
750
|
+
|------------- | ------------- | ------------- | -------------|
|
|
751
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
752
|
+
|
|
753
|
+
### Return type
|
|
754
|
+
|
|
755
|
+
`void` (Empty response body)
|
|
756
|
+
|
|
757
|
+
### Authorization
|
|
758
|
+
|
|
759
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
760
|
+
|
|
761
|
+
### HTTP request headers
|
|
762
|
+
|
|
763
|
+
- **Content-Type**: Not defined
|
|
764
|
+
- **Accept**: Not defined
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
### HTTP response details
|
|
768
|
+
| Status code | Description | Response headers |
|
|
769
|
+
|-------------|-------------|------------------|
|
|
770
|
+
| **204** | Container started | - |
|
|
771
|
+
| **401** | Unauthorized | - |
|
|
772
|
+
| **403** | Forbidden - operator role required | - |
|
|
773
|
+
| **404** | Container not found | - |
|
|
774
|
+
| **500** | Internal error | - |
|
|
775
|
+
|
|
776
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
## stopContainer
|
|
780
|
+
|
|
781
|
+
> stopContainer(id, stopContainerRequest)
|
|
782
|
+
|
|
783
|
+
Stop a running container.
|
|
784
|
+
|
|
785
|
+
Sends the runtime\'s graceful stop signal and waits up to `timeout` seconds before force-killing. The container is **not** removed; use `DELETE /api/v1/containers/{id}` to stop-and-remove. Idempotent: calling stop on an already-stopped container is not an error. # Errors Returns an error if the container is not found, stop fails, or the user lacks the operator role.
|
|
786
|
+
|
|
787
|
+
### Example
|
|
788
|
+
|
|
789
|
+
```ts
|
|
790
|
+
import {
|
|
791
|
+
Configuration,
|
|
792
|
+
ContainersApi,
|
|
793
|
+
} from '@zlayer/client';
|
|
794
|
+
import type { StopContainerOperationRequest } from '@zlayer/client';
|
|
795
|
+
|
|
796
|
+
async function example() {
|
|
797
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
798
|
+
const config = new Configuration({
|
|
799
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
800
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
801
|
+
});
|
|
802
|
+
const api = new ContainersApi(config);
|
|
803
|
+
|
|
804
|
+
const body = {
|
|
805
|
+
// string | Container identifier
|
|
806
|
+
id: id_example,
|
|
807
|
+
// StopContainerRequest
|
|
808
|
+
stopContainerRequest: ...,
|
|
809
|
+
} satisfies StopContainerOperationRequest;
|
|
810
|
+
|
|
811
|
+
try {
|
|
812
|
+
const data = await api.stopContainer(body);
|
|
813
|
+
console.log(data);
|
|
814
|
+
} catch (error) {
|
|
815
|
+
console.error(error);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
// Run the test
|
|
820
|
+
example().catch(console.error);
|
|
821
|
+
```
|
|
822
|
+
|
|
823
|
+
### Parameters
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
| Name | Type | Description | Notes |
|
|
827
|
+
|------------- | ------------- | ------------- | -------------|
|
|
828
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
829
|
+
| **stopContainerRequest** | [StopContainerRequest](StopContainerRequest.md) | | |
|
|
830
|
+
|
|
831
|
+
### Return type
|
|
832
|
+
|
|
833
|
+
`void` (Empty response body)
|
|
834
|
+
|
|
835
|
+
### Authorization
|
|
836
|
+
|
|
837
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
838
|
+
|
|
839
|
+
### HTTP request headers
|
|
840
|
+
|
|
841
|
+
- **Content-Type**: `application/json`
|
|
842
|
+
- **Accept**: Not defined
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
### HTTP response details
|
|
846
|
+
| Status code | Description | Response headers |
|
|
847
|
+
|-------------|-------------|------------------|
|
|
848
|
+
| **204** | Container stopped | - |
|
|
849
|
+
| **401** | Unauthorized | - |
|
|
850
|
+
| **403** | Forbidden - operator role required | - |
|
|
851
|
+
| **404** | Container not found | - |
|
|
852
|
+
| **500** | Internal error | - |
|
|
853
|
+
|
|
854
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
## waitContainer
|
|
858
|
+
|
|
859
|
+
> ContainerWaitResponse waitContainer(id)
|
|
860
|
+
|
|
861
|
+
Wait for a container to exit and return its exit code.
|
|
862
|
+
|
|
863
|
+
This endpoint blocks until the container exits. Useful for CI runners that need to wait for a build/test container to complete. # Errors Returns an error if the container is not found or the wait fails.
|
|
864
|
+
|
|
865
|
+
### Example
|
|
866
|
+
|
|
867
|
+
```ts
|
|
868
|
+
import {
|
|
869
|
+
Configuration,
|
|
870
|
+
ContainersApi,
|
|
871
|
+
} from '@zlayer/client';
|
|
872
|
+
import type { WaitContainerRequest } from '@zlayer/client';
|
|
873
|
+
|
|
874
|
+
async function example() {
|
|
875
|
+
console.log("🚀 Testing @zlayer/client SDK...");
|
|
876
|
+
const config = new Configuration({
|
|
877
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
878
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
879
|
+
});
|
|
880
|
+
const api = new ContainersApi(config);
|
|
881
|
+
|
|
882
|
+
const body = {
|
|
883
|
+
// string | Container identifier
|
|
884
|
+
id: id_example,
|
|
885
|
+
} satisfies WaitContainerRequest;
|
|
886
|
+
|
|
887
|
+
try {
|
|
888
|
+
const data = await api.waitContainer(body);
|
|
889
|
+
console.log(data);
|
|
890
|
+
} catch (error) {
|
|
891
|
+
console.error(error);
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
// Run the test
|
|
896
|
+
example().catch(console.error);
|
|
897
|
+
```
|
|
898
|
+
|
|
899
|
+
### Parameters
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
| Name | Type | Description | Notes |
|
|
903
|
+
|------------- | ------------- | ------------- | -------------|
|
|
904
|
+
| **id** | `string` | Container identifier | [Defaults to `undefined`] |
|
|
905
|
+
|
|
906
|
+
### Return type
|
|
907
|
+
|
|
908
|
+
[**ContainerWaitResponse**](ContainerWaitResponse.md)
|
|
909
|
+
|
|
910
|
+
### Authorization
|
|
911
|
+
|
|
912
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
913
|
+
|
|
914
|
+
### HTTP request headers
|
|
915
|
+
|
|
916
|
+
- **Content-Type**: Not defined
|
|
917
|
+
- **Accept**: `application/json`
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
### HTTP response details
|
|
921
|
+
| Status code | Description | Response headers |
|
|
922
|
+
|-------------|-------------|------------------|
|
|
923
|
+
| **200** | Container exited | - |
|
|
924
|
+
| **401** | Unauthorized | - |
|
|
925
|
+
| **404** | Container not found | - |
|
|
926
|
+
|
|
927
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
928
|
+
|