@zlayer/api-client 0.10.86 → 0.10.88
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 +58 -1
- package/README.md +48 -6
- package/dist/apis/AuthenticationApi.d.ts +43 -1
- package/dist/apis/AuthenticationApi.js +112 -0
- package/dist/apis/ContainerNetworksApi.d.ts +123 -0
- package/dist/apis/ContainerNetworksApi.js +331 -0
- package/dist/apis/ContainersApi.d.ts +7 -4
- package/dist/apis/ContainersApi.js +13 -4
- package/dist/apis/EventsApi.d.ts +35 -0
- package/dist/apis/EventsApi.js +81 -0
- package/dist/apis/PermissionsApi.d.ts +18 -0
- package/dist/apis/PermissionsApi.js +46 -0
- package/dist/apis/SecretsApi.d.ts +38 -1
- package/dist/apis/SecretsApi.js +109 -0
- package/dist/apis/VolumesApi.d.ts +41 -7
- package/dist/apis/VolumesApi.js +102 -5
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/models/BridgeNetwork.d.ts +72 -0
- package/dist/models/BridgeNetwork.js +67 -0
- package/dist/models/BridgeNetworkAttachment.d.ts +50 -0
- package/dist/models/BridgeNetworkAttachment.js +56 -0
- package/dist/models/BridgeNetworkDetails.d.ts +79 -0
- package/dist/models/BridgeNetworkDetails.js +72 -0
- package/dist/models/BridgeNetworkDriver.d.ts +25 -0
- package/dist/models/BridgeNetworkDriver.js +51 -0
- package/dist/models/ConnectBridgeNetworkRequest.d.ts +45 -0
- package/dist/models/ConnectBridgeNetworkRequest.js +54 -0
- package/dist/models/ContainerEvent.d.ts +82 -0
- package/dist/models/ContainerEvent.js +67 -0
- package/dist/models/ContainerEventKind.d.ts +27 -0
- package/dist/models/ContainerEventKind.js +53 -0
- package/dist/models/ContainerHealthInfo.d.ts +53 -0
- package/dist/models/ContainerHealthInfo.js +54 -0
- package/dist/models/ContainerInfo.d.ts +40 -0
- package/dist/models/ContainerInfo.js +13 -0
- package/dist/models/ContainerRestartKind.d.ts +27 -0
- package/dist/models/ContainerRestartKind.js +53 -0
- package/dist/models/ContainerRestartPolicy.d.ts +53 -0
- package/dist/models/ContainerRestartPolicy.js +55 -0
- package/dist/models/ContainerWaitResponse.d.ts +30 -2
- package/dist/models/ContainerWaitResponse.js +6 -0
- package/dist/models/CreateBridgeNetworkRequest.d.ts +60 -0
- package/dist/models/CreateBridgeNetworkRequest.js +59 -0
- package/dist/models/CreateContainerRequest.d.ts +77 -0
- package/dist/models/CreateContainerRequest.js +23 -0
- package/dist/models/CreateVolumeRequest.d.ts +54 -0
- package/dist/models/CreateVolumeRequest.js +56 -0
- package/dist/models/DisconnectBridgeNetworkRequest.d.ts +38 -0
- package/dist/models/DisconnectBridgeNetworkRequest.js +52 -0
- package/dist/models/HealthCheckRequest.d.ts +94 -0
- package/dist/models/HealthCheckRequest.js +66 -0
- package/dist/models/NetworkAttachmentInfo.d.ts +49 -0
- package/dist/models/NetworkAttachmentInfo.js +54 -0
- package/dist/models/NetworkAttachmentRequest.d.ts +51 -0
- package/dist/models/NetworkAttachmentRequest.js +54 -0
- package/dist/models/OidcCallbackResponse.d.ts +47 -0
- package/dist/models/OidcCallbackResponse.js +59 -0
- package/dist/models/OidcProviderPublic.d.ts +39 -0
- package/dist/models/OidcProviderPublic.js +54 -0
- package/dist/models/PortMapping.d.ts +55 -0
- package/dist/models/PortMapping.js +57 -0
- package/dist/models/PortProtocol.d.ts +25 -0
- package/dist/models/PortProtocol.js +51 -0
- package/dist/models/PullImageRequest.d.ts +18 -0
- package/dist/models/PullImageRequest.js +5 -0
- package/dist/models/RegistryAuth.d.ts +52 -0
- package/dist/models/RegistryAuth.js +57 -0
- package/dist/models/RegistryAuthType.d.ts +25 -0
- package/dist/models/RegistryAuthType.js +51 -0
- package/dist/models/RevealAllSecretsResponse.d.ts +41 -0
- package/dist/models/RevealAllSecretsResponse.js +54 -0
- package/dist/models/RotateSecretRequest.d.ts +32 -0
- package/dist/models/RotateSecretRequest.js +50 -0
- package/dist/models/RotateSecretResponse.d.ts +46 -0
- package/dist/models/RotateSecretResponse.js +56 -0
- package/dist/models/VolumeInfo.d.ts +70 -0
- package/dist/models/VolumeInfo.js +64 -0
- package/dist/models/VolumeMount.d.ts +16 -3
- package/dist/models/VolumeMount.js +4 -3
- package/dist/models/VolumeMountType.d.ts +30 -0
- package/dist/models/VolumeMountType.js +56 -0
- package/dist/models/VolumeSummary.d.ts +7 -4
- package/dist/models/index.d.ts +27 -0
- package/dist/models/index.js +27 -0
- package/docs/AddMemberRequest.md +1 -1
- package/docs/AuditApi.md +3 -3
- package/docs/AuditEntry.md +1 -1
- package/docs/AuthenticationApi.md +212 -18
- package/docs/BackendGroupInfo.md +1 -1
- package/docs/BackendInfo.md +1 -1
- package/docs/BackendsResponse.md +1 -1
- package/docs/BootstrapRequest.md +1 -1
- package/docs/BridgeNetwork.md +47 -0
- package/docs/BridgeNetworkAttachment.md +41 -0
- package/docs/BridgeNetworkDetails.md +49 -0
- package/docs/BridgeNetworkDriver.md +33 -0
- package/docs/BuildApi.md +21 -21
- package/docs/BuildKind.md +1 -1
- package/docs/BuildRequest.md +1 -1
- package/docs/BuildRequestWithContext.md +1 -1
- package/docs/BuildStateEnum.md +1 -1
- package/docs/BuildStatus.md +1 -1
- package/docs/BulkImportResponse.md +1 -1
- package/docs/CertInfo.md +1 -1
- package/docs/ClusterApi.md +12 -12
- package/docs/ClusterJoinRequest.md +1 -1
- package/docs/ClusterJoinResponse.md +1 -1
- package/docs/ClusterNodeSummary.md +1 -1
- package/docs/ClusterPeer.md +1 -1
- package/docs/ConnectBridgeNetworkRequest.md +39 -0
- package/docs/ContainerEvent.md +47 -0
- package/docs/ContainerEventKind.md +33 -0
- package/docs/ContainerExecRequest.md +1 -1
- package/docs/ContainerExecResponse.md +1 -1
- package/docs/ContainerHealthInfo.md +39 -0
- package/docs/ContainerInfo.md +11 -1
- package/docs/ContainerNetworksApi.md +466 -0
- package/docs/ContainerResourceLimits.md +1 -1
- package/docs/ContainerRestartKind.md +33 -0
- package/docs/ContainerRestartPolicy.md +39 -0
- package/docs/ContainerStatsResponse.md +1 -1
- package/docs/ContainerWaitResponse.md +8 -2
- package/docs/ContainersApi.md +51 -42
- package/docs/CreateBridgeNetworkRequest.md +43 -0
- package/docs/CreateContainerRequest.md +19 -1
- package/docs/CreateDeploymentRequest.md +1 -1
- package/docs/CreateEnvironmentRequest.md +1 -1
- package/docs/CreateGitCredentialRequest.md +1 -1
- package/docs/CreateGroupRequest.md +1 -1
- package/docs/CreateNodeTunnelRequest.md +1 -1
- package/docs/CreateNodeTunnelResponse.md +1 -1
- package/docs/CreateNotifierRequest.md +1 -1
- package/docs/CreateProjectRequest.md +1 -1
- package/docs/CreateRegistryCredentialRequest.md +1 -1
- package/docs/CreateSecretRequest.md +1 -1
- package/docs/CreateSyncRequest.md +1 -1
- package/docs/CreateTaskRequest.md +1 -1
- package/docs/CreateTunnelRequest.md +1 -1
- package/docs/CreateTunnelResponse.md +1 -1
- package/docs/CreateUserRequest.md +1 -1
- package/docs/CreateVariableRequest.md +1 -1
- package/docs/CreateVolumeRequest.md +41 -0
- package/docs/CreateWorkflowRequest.md +1 -1
- package/docs/CredentialsApi.md +18 -18
- package/docs/CronApi.md +15 -15
- package/docs/CronJobResponse.md +1 -1
- package/docs/CronStatusResponse.md +1 -1
- package/docs/CsrfResponse.md +1 -1
- package/docs/DeploymentDetails.md +1 -1
- package/docs/DeploymentSummary.md +1 -1
- package/docs/DeploymentsApi.md +12 -12
- package/docs/DisconnectBridgeNetworkRequest.md +37 -0
- package/docs/DnsStatusResponse.md +1 -1
- package/docs/EnvironmentsApi.md +15 -15
- package/docs/EventsApi.md +85 -0
- package/docs/ForceLeaderRequest.md +1 -1
- package/docs/ForceLeaderResponse.md +1 -1
- package/docs/GitCredentialKindSchema.md +1 -1
- package/docs/GitCredentialResponse.md +1 -1
- package/docs/GpuInfoSummary.md +1 -1
- package/docs/GpuUtilizationReport.md +1 -1
- package/docs/GrantPermissionRequest.md +1 -1
- package/docs/GroupMembersResponse.md +1 -1
- package/docs/GroupsApi.md +21 -21
- package/docs/HealthApi.md +6 -6
- package/docs/HealthCheckRequest.md +51 -0
- package/docs/HealthResponse.md +1 -1
- package/docs/HeartbeatRequest.md +1 -1
- package/docs/ImageInfoDto.md +1 -1
- package/docs/ImagesApi.md +15 -15
- package/docs/InternalApi.md +6 -6
- package/docs/InternalScaleRequest.md +1 -1
- package/docs/InternalScaleResponse.md +1 -1
- package/docs/IpAllocationResponse.md +1 -1
- package/docs/JobExecutionResponse.md +1 -1
- package/docs/JobsApi.md +12 -12
- package/docs/JoinTokenResponse.md +1 -1
- package/docs/KillContainerRequest.md +1 -1
- package/docs/LinkDeploymentRequest.md +1 -1
- package/docs/LoginRequest.md +1 -1
- package/docs/LoginResponse.md +1 -1
- package/docs/NetworkAttachmentInfo.md +39 -0
- package/docs/NetworkAttachmentRequest.md +39 -0
- package/docs/NetworkSummary.md +1 -1
- package/docs/NetworksApi.md +15 -15
- package/docs/NodeDetails.md +1 -1
- package/docs/NodeResourceInfo.md +1 -1
- package/docs/NodeSummary.md +1 -1
- package/docs/NodesApi.md +12 -12
- package/docs/NotifierConfig.md +1 -1
- package/docs/NotifierConfigOneOf.md +1 -1
- package/docs/NotifierConfigOneOf1.md +1 -1
- package/docs/NotifierConfigOneOf2.md +1 -1
- package/docs/NotifierConfigOneOf3.md +1 -1
- package/docs/NotifierKind.md +1 -1
- package/docs/NotifiersApi.md +18 -18
- package/docs/OidcCallbackResponse.md +39 -0
- package/docs/OidcProviderPublic.md +37 -0
- package/docs/OverlayApi.md +12 -12
- package/docs/OverlayStatusResponse.md +1 -1
- package/docs/PeerInfo.md +1 -1
- package/docs/PeerListResponse.md +1 -1
- package/docs/PermissionLevel.md +1 -1
- package/docs/PermissionsApi.md +80 -9
- package/docs/PortMapping.md +41 -0
- package/docs/PortProtocol.md +33 -0
- package/docs/ProjectPullResponse.md +1 -1
- package/docs/ProjectsApi.md +27 -27
- package/docs/ProxyApi.md +12 -12
- package/docs/PruneResultDto.md +1 -1
- package/docs/PullImageRequest.md +5 -1
- package/docs/PullImageResponse.md +1 -1
- package/docs/RegisteredServiceInfo.md +1 -1
- package/docs/RegistryAuth.md +39 -0
- package/docs/RegistryAuthType.md +33 -0
- package/docs/RegistryAuthTypeSchema.md +1 -1
- package/docs/RegistryCredentialResponse.md +1 -1
- package/docs/ReplicationInfo.md +1 -1
- package/docs/RestartContainerRequest.md +1 -1
- package/docs/RevealAllSecretsResponse.md +37 -0
- package/docs/RotateSecretRequest.md +35 -0
- package/docs/RotateSecretResponse.md +39 -0
- package/docs/RouteInfo.md +1 -1
- package/docs/RoutesResponse.md +1 -1
- package/docs/ScaleRequest.md +1 -1
- package/docs/SecretMetadataResponse.md +1 -1
- package/docs/SecretsApi.md +175 -15
- package/docs/ServiceDetails.md +1 -1
- package/docs/ServiceEndpoint.md +1 -1
- package/docs/ServiceHealthInfo.md +1 -1
- package/docs/ServiceMetrics.md +1 -1
- package/docs/ServiceSummary.md +1 -1
- package/docs/ServicesApi.md +12 -12
- package/docs/SetPasswordRequest.md +1 -1
- package/docs/StepResult.md +1 -1
- package/docs/StopContainerRequest.md +1 -1
- package/docs/StorageApi.md +3 -3
- package/docs/StorageStatusResponse.md +1 -1
- package/docs/StoredEnvironment.md +1 -1
- package/docs/StoredNotifier.md +1 -1
- package/docs/StoredPermission.md +1 -1
- package/docs/StoredProject.md +1 -1
- package/docs/StoredSync.md +1 -1
- package/docs/StoredTask.md +1 -1
- package/docs/StoredUserGroup.md +1 -1
- package/docs/StoredVariable.md +1 -1
- package/docs/StoredWorkflow.md +1 -1
- package/docs/StreamBackendInfo.md +1 -1
- package/docs/StreamInfo.md +1 -1
- package/docs/StreamsResponse.md +1 -1
- package/docs/SubjectKind.md +1 -1
- package/docs/SuccessResponse.md +1 -1
- package/docs/SyncApplyResponse.md +1 -1
- package/docs/SyncDiffResponse.md +1 -1
- package/docs/SyncResourceResponse.md +1 -1
- package/docs/SyncResourceResult.md +1 -1
- package/docs/SyncsApi.md +15 -15
- package/docs/TagImageRequest.md +1 -1
- package/docs/TaskKind.md +1 -1
- package/docs/TaskRun.md +1 -1
- package/docs/TasksApi.md +18 -18
- package/docs/TemplateInfo.md +1 -1
- package/docs/TestNotifierResponse.md +1 -1
- package/docs/TlsResponse.md +1 -1
- package/docs/TokenRequest.md +1 -1
- package/docs/TokenResponse.md +1 -1
- package/docs/TriggerBuildResponse.md +1 -1
- package/docs/TriggerCronResponse.md +1 -1
- package/docs/TriggerJobResponse.md +1 -1
- package/docs/TunnelStatus.md +1 -1
- package/docs/TunnelSummary.md +1 -1
- package/docs/TunnelsApi.md +18 -18
- package/docs/UpdateEnvironmentRequest.md +1 -1
- package/docs/UpdateGroupRequest.md +1 -1
- package/docs/UpdateLabelsRequest.md +1 -1
- package/docs/UpdateLabelsResponse.md +1 -1
- package/docs/UpdateNotifierRequest.md +1 -1
- package/docs/UpdateProjectRequest.md +1 -1
- package/docs/UpdateUserRequest.md +1 -1
- package/docs/UpdateVariableRequest.md +1 -1
- package/docs/UserRole.md +1 -1
- package/docs/UserView.md +1 -1
- package/docs/UsersApi.md +18 -18
- package/docs/VariablesApi.md +15 -15
- package/docs/VolumeInfo.md +45 -0
- package/docs/VolumeMount.md +4 -2
- package/docs/VolumeMountType.md +33 -0
- package/docs/VolumeSummary.md +2 -2
- package/docs/VolumesApi.md +163 -13
- package/docs/WebhookInfoResponse.md +1 -1
- package/docs/WebhookResponse.md +1 -1
- package/docs/WebhooksApi.md +9 -9
- package/docs/WorkflowAction.md +1 -1
- package/docs/WorkflowActionOneOf.md +1 -1
- package/docs/WorkflowActionOneOf1.md +1 -1
- package/docs/WorkflowActionOneOf2.md +1 -1
- package/docs/WorkflowActionOneOf3.md +1 -1
- package/docs/WorkflowRun.md +1 -1
- package/docs/WorkflowRunStatus.md +1 -1
- package/docs/WorkflowStep.md +1 -1
- package/docs/WorkflowsApi.md +18 -18
- package/package.json +1 -1
- package/src/apis/AuthenticationApi.ts +140 -0
- package/src/apis/ContainerNetworksApi.ts +418 -0
- package/src/apis/ContainersApi.ts +19 -4
- package/src/apis/EventsApi.ts +82 -0
- package/src/apis/PermissionsApi.ts +59 -0
- package/src/apis/SecretsApi.ts +151 -0
- package/src/apis/VolumesApi.ts +133 -10
- package/src/apis/index.ts +2 -0
- package/src/models/BridgeNetwork.ts +127 -0
- package/src/models/BridgeNetworkAttachment.ts +90 -0
- package/src/models/BridgeNetworkDetails.ts +143 -0
- package/src/models/BridgeNetworkDriver.ts +53 -0
- package/src/models/ConnectBridgeNetworkRequest.ts +83 -0
- package/src/models/ContainerEvent.ts +137 -0
- package/src/models/ContainerEventKind.ts +55 -0
- package/src/models/ContainerHealthInfo.ts +91 -0
- package/src/models/ContainerInfo.ts +69 -0
- package/src/models/ContainerRestartKind.ts +55 -0
- package/src/models/ContainerRestartPolicy.ts +100 -0
- package/src/models/ContainerWaitResponse.ts +36 -2
- package/src/models/CreateBridgeNetworkRequest.ts +109 -0
- package/src/models/CreateContainerRequest.ts +125 -0
- package/src/models/CreateVolumeRequest.ts +92 -0
- package/src/models/DisconnectBridgeNetworkRequest.ts +74 -0
- package/src/models/HealthCheckRequest.ts +144 -0
- package/src/models/NetworkAttachmentInfo.ts +87 -0
- package/src/models/NetworkAttachmentRequest.ts +89 -0
- package/src/models/OidcCallbackResponse.ts +94 -0
- package/src/models/OidcProviderPublic.ts +76 -0
- package/src/models/PortMapping.ts +104 -0
- package/src/models/PortProtocol.ts +53 -0
- package/src/models/PullImageRequest.ts +29 -0
- package/src/models/RegistryAuth.ts +100 -0
- package/src/models/RegistryAuthType.ts +53 -0
- package/src/models/RevealAllSecretsResponse.ts +76 -0
- package/src/models/RotateSecretRequest.ts +66 -0
- package/src/models/RotateSecretResponse.ts +85 -0
- package/src/models/VolumeInfo.ts +114 -0
- package/src/models/VolumeMount.ts +28 -5
- package/src/models/VolumeMountType.ts +58 -0
- package/src/models/VolumeSummary.ts +7 -4
- package/src/models/index.ts +27 -0
package/docs/ContainerInfo.md
CHANGED
|
@@ -8,26 +8,36 @@ Container information returned by the API
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`createdAt` | string
|
|
11
|
+
`exitCode` | number
|
|
12
|
+
`health` | [ContainerHealthInfo](ContainerHealthInfo.md)
|
|
11
13
|
`id` | string
|
|
12
14
|
`image` | string
|
|
15
|
+
`ipv4` | string
|
|
13
16
|
`labels` | { [key: string]: string; }
|
|
14
17
|
`name` | string
|
|
18
|
+
`networks` | [Array<NetworkAttachmentInfo>](NetworkAttachmentInfo.md)
|
|
15
19
|
`pid` | number
|
|
20
|
+
`ports` | [Array<PortMapping>](PortMapping.md)
|
|
16
21
|
`state` | string
|
|
17
22
|
|
|
18
23
|
## Example
|
|
19
24
|
|
|
20
25
|
```typescript
|
|
21
|
-
import type { ContainerInfo } from '@zlayer/client'
|
|
26
|
+
import type { ContainerInfo } from '@zlayer/api-client'
|
|
22
27
|
|
|
23
28
|
// TODO: Update the object below with actual values
|
|
24
29
|
const example = {
|
|
25
30
|
"createdAt": null,
|
|
31
|
+
"exitCode": null,
|
|
32
|
+
"health": null,
|
|
26
33
|
"id": null,
|
|
27
34
|
"image": null,
|
|
35
|
+
"ipv4": null,
|
|
28
36
|
"labels": null,
|
|
29
37
|
"name": null,
|
|
38
|
+
"networks": null,
|
|
30
39
|
"pid": null,
|
|
40
|
+
"ports": null,
|
|
31
41
|
"state": null,
|
|
32
42
|
} satisfies ContainerInfo
|
|
33
43
|
|
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
# ContainerNetworksApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**connectContainerNetwork**](ContainerNetworksApi.md#connectcontainernetwork) | **POST** /api/v1/container-networks/{id_or_name}/connect | Attach a container to a network. |
|
|
8
|
+
| [**createContainerNetwork**](ContainerNetworksApi.md#createcontainernetwork) | **POST** /api/v1/container-networks | Create a new bridge or overlay network. |
|
|
9
|
+
| [**deleteContainerNetwork**](ContainerNetworksApi.md#deletecontainernetwork) | **DELETE** /api/v1/container-networks/{id_or_name} | Delete a bridge network. Refuses if the network still has attachments unless `?force=true` is set. |
|
|
10
|
+
| [**disconnectContainerNetwork**](ContainerNetworksApi.md#disconnectcontainernetwork) | **POST** /api/v1/container-networks/{id_or_name}/disconnect | Detach a container from a network. |
|
|
11
|
+
| [**getContainerNetwork**](ContainerNetworksApi.md#getcontainernetwork) | **GET** /api/v1/container-networks/{id_or_name} | Inspect a single bridge network by id or by name. |
|
|
12
|
+
| [**listContainerNetworks**](ContainerNetworksApi.md#listcontainernetworks) | **GET** /api/v1/container-networks | List all bridge networks, optionally filtered by label. |
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## connectContainerNetwork
|
|
17
|
+
|
|
18
|
+
> connectContainerNetwork(idOrName, connectBridgeNetworkRequest)
|
|
19
|
+
|
|
20
|
+
Attach a container to a network.
|
|
21
|
+
|
|
22
|
+
# Errors - [`ApiError::BadRequest`] for an empty `container_id` or invalid `ipv4_address`. - [`ApiError::NotFound`] when no network matches `id_or_name`.
|
|
23
|
+
|
|
24
|
+
### Example
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import {
|
|
28
|
+
Configuration,
|
|
29
|
+
ContainerNetworksApi,
|
|
30
|
+
} from '@zlayer/api-client';
|
|
31
|
+
import type { ConnectContainerNetworkRequest } from '@zlayer/api-client';
|
|
32
|
+
|
|
33
|
+
async function example() {
|
|
34
|
+
console.log("🚀 Testing @zlayer/api-client SDK...");
|
|
35
|
+
const config = new Configuration({
|
|
36
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
37
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
38
|
+
});
|
|
39
|
+
const api = new ContainerNetworksApi(config);
|
|
40
|
+
|
|
41
|
+
const body = {
|
|
42
|
+
// string | Network id or name
|
|
43
|
+
idOrName: idOrName_example,
|
|
44
|
+
// ConnectBridgeNetworkRequest
|
|
45
|
+
connectBridgeNetworkRequest: ...,
|
|
46
|
+
} satisfies ConnectContainerNetworkRequest;
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
const data = await api.connectContainerNetwork(body);
|
|
50
|
+
console.log(data);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
console.error(error);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Run the test
|
|
57
|
+
example().catch(console.error);
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Parameters
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
| Name | Type | Description | Notes |
|
|
64
|
+
|------------- | ------------- | ------------- | -------------|
|
|
65
|
+
| **idOrName** | `string` | Network id or name | [Defaults to `undefined`] |
|
|
66
|
+
| **connectBridgeNetworkRequest** | [ConnectBridgeNetworkRequest](ConnectBridgeNetworkRequest.md) | | |
|
|
67
|
+
|
|
68
|
+
### Return type
|
|
69
|
+
|
|
70
|
+
`void` (Empty response body)
|
|
71
|
+
|
|
72
|
+
### Authorization
|
|
73
|
+
|
|
74
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
75
|
+
|
|
76
|
+
### HTTP request headers
|
|
77
|
+
|
|
78
|
+
- **Content-Type**: `application/json`
|
|
79
|
+
- **Accept**: Not defined
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### HTTP response details
|
|
83
|
+
| Status code | Description | Response headers |
|
|
84
|
+
|-------------|-------------|------------------|
|
|
85
|
+
| **204** | Container connected | - |
|
|
86
|
+
| **400** | Invalid request (e.g. bad ipv4_address) | - |
|
|
87
|
+
| **401** | Unauthorized | - |
|
|
88
|
+
| **404** | Network not found | - |
|
|
89
|
+
|
|
90
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## createContainerNetwork
|
|
94
|
+
|
|
95
|
+
> BridgeNetwork createContainerNetwork(createBridgeNetworkRequest)
|
|
96
|
+
|
|
97
|
+
Create a new bridge or overlay network.
|
|
98
|
+
|
|
99
|
+
# Errors - [`ApiError::BadRequest`] if the network name or subnet is malformed. - [`ApiError::Conflict`] if a network with the same name already exists. - [`ApiError::Forbidden`] / [`ApiError::Unauthorized`] from the auth layer.
|
|
100
|
+
|
|
101
|
+
### Example
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
import {
|
|
105
|
+
Configuration,
|
|
106
|
+
ContainerNetworksApi,
|
|
107
|
+
} from '@zlayer/api-client';
|
|
108
|
+
import type { CreateContainerNetworkRequest } from '@zlayer/api-client';
|
|
109
|
+
|
|
110
|
+
async function example() {
|
|
111
|
+
console.log("🚀 Testing @zlayer/api-client SDK...");
|
|
112
|
+
const config = new Configuration({
|
|
113
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
114
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
115
|
+
});
|
|
116
|
+
const api = new ContainerNetworksApi(config);
|
|
117
|
+
|
|
118
|
+
const body = {
|
|
119
|
+
// CreateBridgeNetworkRequest
|
|
120
|
+
createBridgeNetworkRequest: ...,
|
|
121
|
+
} satisfies CreateContainerNetworkRequest;
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
const data = await api.createContainerNetwork(body);
|
|
125
|
+
console.log(data);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.error(error);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Run the test
|
|
132
|
+
example().catch(console.error);
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Parameters
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
| Name | Type | Description | Notes |
|
|
139
|
+
|------------- | ------------- | ------------- | -------------|
|
|
140
|
+
| **createBridgeNetworkRequest** | [CreateBridgeNetworkRequest](CreateBridgeNetworkRequest.md) | | |
|
|
141
|
+
|
|
142
|
+
### Return type
|
|
143
|
+
|
|
144
|
+
[**BridgeNetwork**](BridgeNetwork.md)
|
|
145
|
+
|
|
146
|
+
### Authorization
|
|
147
|
+
|
|
148
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
149
|
+
|
|
150
|
+
### HTTP request headers
|
|
151
|
+
|
|
152
|
+
- **Content-Type**: `application/json`
|
|
153
|
+
- **Accept**: `application/json`
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### HTTP response details
|
|
157
|
+
| Status code | Description | Response headers |
|
|
158
|
+
|-------------|-------------|------------------|
|
|
159
|
+
| **201** | Network created | - |
|
|
160
|
+
| **400** | Invalid request | - |
|
|
161
|
+
| **401** | Unauthorized | - |
|
|
162
|
+
| **403** | Forbidden | - |
|
|
163
|
+
| **409** | Network with that name already exists | - |
|
|
164
|
+
|
|
165
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## deleteContainerNetwork
|
|
169
|
+
|
|
170
|
+
> deleteContainerNetwork(idOrName, force)
|
|
171
|
+
|
|
172
|
+
Delete a bridge network. Refuses if the network still has attachments unless `?force=true` is set.
|
|
173
|
+
|
|
174
|
+
# Errors - [`ApiError::NotFound`] when no network matches `id_or_name`. - [`ApiError::Conflict`] when the network still has attachments and `force` is false. - Auth errors propagated from the `operator` role check.
|
|
175
|
+
|
|
176
|
+
### Example
|
|
177
|
+
|
|
178
|
+
```ts
|
|
179
|
+
import {
|
|
180
|
+
Configuration,
|
|
181
|
+
ContainerNetworksApi,
|
|
182
|
+
} from '@zlayer/api-client';
|
|
183
|
+
import type { DeleteContainerNetworkRequest } from '@zlayer/api-client';
|
|
184
|
+
|
|
185
|
+
async function example() {
|
|
186
|
+
console.log("🚀 Testing @zlayer/api-client SDK...");
|
|
187
|
+
const config = new Configuration({
|
|
188
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
189
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
190
|
+
});
|
|
191
|
+
const api = new ContainerNetworksApi(config);
|
|
192
|
+
|
|
193
|
+
const body = {
|
|
194
|
+
// string | Network id or name
|
|
195
|
+
idOrName: idOrName_example,
|
|
196
|
+
// boolean | If true, delete even if the network still has attachments. (optional)
|
|
197
|
+
force: true,
|
|
198
|
+
} satisfies DeleteContainerNetworkRequest;
|
|
199
|
+
|
|
200
|
+
try {
|
|
201
|
+
const data = await api.deleteContainerNetwork(body);
|
|
202
|
+
console.log(data);
|
|
203
|
+
} catch (error) {
|
|
204
|
+
console.error(error);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Run the test
|
|
209
|
+
example().catch(console.error);
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Parameters
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
| Name | Type | Description | Notes |
|
|
216
|
+
|------------- | ------------- | ------------- | -------------|
|
|
217
|
+
| **idOrName** | `string` | Network id or name | [Defaults to `undefined`] |
|
|
218
|
+
| **force** | `boolean` | If true, delete even if the network still has attachments. | [Optional] [Defaults to `undefined`] |
|
|
219
|
+
|
|
220
|
+
### Return type
|
|
221
|
+
|
|
222
|
+
`void` (Empty response body)
|
|
223
|
+
|
|
224
|
+
### Authorization
|
|
225
|
+
|
|
226
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
227
|
+
|
|
228
|
+
### HTTP request headers
|
|
229
|
+
|
|
230
|
+
- **Content-Type**: Not defined
|
|
231
|
+
- **Accept**: Not defined
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
### HTTP response details
|
|
235
|
+
| Status code | Description | Response headers |
|
|
236
|
+
|-------------|-------------|------------------|
|
|
237
|
+
| **204** | Network deleted | - |
|
|
238
|
+
| **401** | Unauthorized | - |
|
|
239
|
+
| **403** | Forbidden | - |
|
|
240
|
+
| **404** | Network not found | - |
|
|
241
|
+
| **409** | Network still has attachments (use ?force=true) | - |
|
|
242
|
+
|
|
243
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
## disconnectContainerNetwork
|
|
247
|
+
|
|
248
|
+
> disconnectContainerNetwork(idOrName, disconnectBridgeNetworkRequest)
|
|
249
|
+
|
|
250
|
+
Detach a container from a network.
|
|
251
|
+
|
|
252
|
+
# Errors - [`ApiError::BadRequest`] when `container_id` is empty. - [`ApiError::NotFound`] when the network or the container-on-network pair is not known (unless `force` was passed).
|
|
253
|
+
|
|
254
|
+
### Example
|
|
255
|
+
|
|
256
|
+
```ts
|
|
257
|
+
import {
|
|
258
|
+
Configuration,
|
|
259
|
+
ContainerNetworksApi,
|
|
260
|
+
} from '@zlayer/api-client';
|
|
261
|
+
import type { DisconnectContainerNetworkRequest } from '@zlayer/api-client';
|
|
262
|
+
|
|
263
|
+
async function example() {
|
|
264
|
+
console.log("🚀 Testing @zlayer/api-client SDK...");
|
|
265
|
+
const config = new Configuration({
|
|
266
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
267
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
268
|
+
});
|
|
269
|
+
const api = new ContainerNetworksApi(config);
|
|
270
|
+
|
|
271
|
+
const body = {
|
|
272
|
+
// string | Network id or name
|
|
273
|
+
idOrName: idOrName_example,
|
|
274
|
+
// DisconnectBridgeNetworkRequest
|
|
275
|
+
disconnectBridgeNetworkRequest: ...,
|
|
276
|
+
} satisfies DisconnectContainerNetworkRequest;
|
|
277
|
+
|
|
278
|
+
try {
|
|
279
|
+
const data = await api.disconnectContainerNetwork(body);
|
|
280
|
+
console.log(data);
|
|
281
|
+
} catch (error) {
|
|
282
|
+
console.error(error);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// Run the test
|
|
287
|
+
example().catch(console.error);
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Parameters
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
| Name | Type | Description | Notes |
|
|
294
|
+
|------------- | ------------- | ------------- | -------------|
|
|
295
|
+
| **idOrName** | `string` | Network id or name | [Defaults to `undefined`] |
|
|
296
|
+
| **disconnectBridgeNetworkRequest** | [DisconnectBridgeNetworkRequest](DisconnectBridgeNetworkRequest.md) | | |
|
|
297
|
+
|
|
298
|
+
### Return type
|
|
299
|
+
|
|
300
|
+
`void` (Empty response body)
|
|
301
|
+
|
|
302
|
+
### Authorization
|
|
303
|
+
|
|
304
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
305
|
+
|
|
306
|
+
### HTTP request headers
|
|
307
|
+
|
|
308
|
+
- **Content-Type**: `application/json`
|
|
309
|
+
- **Accept**: Not defined
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
### HTTP response details
|
|
313
|
+
| Status code | Description | Response headers |
|
|
314
|
+
|-------------|-------------|------------------|
|
|
315
|
+
| **204** | Container disconnected | - |
|
|
316
|
+
| **401** | Unauthorized | - |
|
|
317
|
+
| **404** | Network or 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
|
+
## getContainerNetwork
|
|
323
|
+
|
|
324
|
+
> BridgeNetworkDetails getContainerNetwork(idOrName)
|
|
325
|
+
|
|
326
|
+
Inspect a single bridge network by id or by name.
|
|
327
|
+
|
|
328
|
+
# Errors [`ApiError::NotFound`] when no network matches `id_or_name`.
|
|
329
|
+
|
|
330
|
+
### Example
|
|
331
|
+
|
|
332
|
+
```ts
|
|
333
|
+
import {
|
|
334
|
+
Configuration,
|
|
335
|
+
ContainerNetworksApi,
|
|
336
|
+
} from '@zlayer/api-client';
|
|
337
|
+
import type { GetContainerNetworkRequest } from '@zlayer/api-client';
|
|
338
|
+
|
|
339
|
+
async function example() {
|
|
340
|
+
console.log("🚀 Testing @zlayer/api-client SDK...");
|
|
341
|
+
const config = new Configuration({
|
|
342
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
343
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
344
|
+
});
|
|
345
|
+
const api = new ContainerNetworksApi(config);
|
|
346
|
+
|
|
347
|
+
const body = {
|
|
348
|
+
// string | Network id or name
|
|
349
|
+
idOrName: idOrName_example,
|
|
350
|
+
} satisfies GetContainerNetworkRequest;
|
|
351
|
+
|
|
352
|
+
try {
|
|
353
|
+
const data = await api.getContainerNetwork(body);
|
|
354
|
+
console.log(data);
|
|
355
|
+
} catch (error) {
|
|
356
|
+
console.error(error);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// Run the test
|
|
361
|
+
example().catch(console.error);
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Parameters
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
| Name | Type | Description | Notes |
|
|
368
|
+
|------------- | ------------- | ------------- | -------------|
|
|
369
|
+
| **idOrName** | `string` | Network id or name | [Defaults to `undefined`] |
|
|
370
|
+
|
|
371
|
+
### Return type
|
|
372
|
+
|
|
373
|
+
[**BridgeNetworkDetails**](BridgeNetworkDetails.md)
|
|
374
|
+
|
|
375
|
+
### Authorization
|
|
376
|
+
|
|
377
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
378
|
+
|
|
379
|
+
### HTTP request headers
|
|
380
|
+
|
|
381
|
+
- **Content-Type**: Not defined
|
|
382
|
+
- **Accept**: `application/json`
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
### HTTP response details
|
|
386
|
+
| Status code | Description | Response headers |
|
|
387
|
+
|-------------|-------------|------------------|
|
|
388
|
+
| **200** | Network details | - |
|
|
389
|
+
| **401** | Unauthorized | - |
|
|
390
|
+
| **404** | Network not found | - |
|
|
391
|
+
|
|
392
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
## listContainerNetworks
|
|
396
|
+
|
|
397
|
+
> Array<BridgeNetwork> listContainerNetworks(label)
|
|
398
|
+
|
|
399
|
+
List all bridge networks, optionally filtered by label.
|
|
400
|
+
|
|
401
|
+
# Errors [`ApiError::BadRequest`] when the `label` query param is not in `key=value` form.
|
|
402
|
+
|
|
403
|
+
### Example
|
|
404
|
+
|
|
405
|
+
```ts
|
|
406
|
+
import {
|
|
407
|
+
Configuration,
|
|
408
|
+
ContainerNetworksApi,
|
|
409
|
+
} from '@zlayer/api-client';
|
|
410
|
+
import type { ListContainerNetworksRequest } from '@zlayer/api-client';
|
|
411
|
+
|
|
412
|
+
async function example() {
|
|
413
|
+
console.log("🚀 Testing @zlayer/api-client SDK...");
|
|
414
|
+
const config = new Configuration({
|
|
415
|
+
// Configure HTTP bearer authorization: bearer_auth
|
|
416
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
417
|
+
});
|
|
418
|
+
const api = new ContainerNetworksApi(config);
|
|
419
|
+
|
|
420
|
+
const body = {
|
|
421
|
+
// string | Optional label filter in `key=value` form. Only networks whose labels contain a matching pair are returned. (optional)
|
|
422
|
+
label: label_example,
|
|
423
|
+
} satisfies ListContainerNetworksRequest;
|
|
424
|
+
|
|
425
|
+
try {
|
|
426
|
+
const data = await api.listContainerNetworks(body);
|
|
427
|
+
console.log(data);
|
|
428
|
+
} catch (error) {
|
|
429
|
+
console.error(error);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// Run the test
|
|
434
|
+
example().catch(console.error);
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Parameters
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
| Name | Type | Description | Notes |
|
|
441
|
+
|------------- | ------------- | ------------- | -------------|
|
|
442
|
+
| **label** | `string` | Optional label filter in `key=value` form. Only networks whose labels contain a matching pair are returned. | [Optional] [Defaults to `undefined`] |
|
|
443
|
+
|
|
444
|
+
### Return type
|
|
445
|
+
|
|
446
|
+
[**Array<BridgeNetwork>**](BridgeNetwork.md)
|
|
447
|
+
|
|
448
|
+
### Authorization
|
|
449
|
+
|
|
450
|
+
[bearer_auth](../README.md#bearer_auth)
|
|
451
|
+
|
|
452
|
+
### HTTP request headers
|
|
453
|
+
|
|
454
|
+
- **Content-Type**: Not defined
|
|
455
|
+
- **Accept**: `application/json`
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
### HTTP response details
|
|
459
|
+
| Status code | Description | Response headers |
|
|
460
|
+
|-------------|-------------|------------------|
|
|
461
|
+
| **200** | List of bridge networks | - |
|
|
462
|
+
| **400** | Invalid label filter | - |
|
|
463
|
+
| **401** | Unauthorized | - |
|
|
464
|
+
|
|
465
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
466
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# ContainerRestartKind
|
|
3
|
+
|
|
4
|
+
Which flavor of container restart policy to apply.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ContainerRestartKind } from '@zlayer/api-client'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies ContainerRestartKind
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as ContainerRestartKind
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# ContainerRestartPolicy
|
|
3
|
+
|
|
4
|
+
Container-runtime-level restart policy. Maps onto Docker\'s `HostConfig.RestartPolicy`. Distinct from [`PanicPolicy`], which governs what `ZLayer` does in response to an application panic (it does not set a Docker restart policy).
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`delay` | string
|
|
11
|
+
`kind` | [ContainerRestartKind](ContainerRestartKind.md)
|
|
12
|
+
`maxAttempts` | number
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { ContainerRestartPolicy } from '@zlayer/api-client'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"delay": null,
|
|
22
|
+
"kind": null,
|
|
23
|
+
"maxAttempts": null,
|
|
24
|
+
} satisfies ContainerRestartPolicy
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as ContainerRestartPolicy
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
|
|
2
2
|
# ContainerWaitResponse
|
|
3
3
|
|
|
4
|
-
Wait response with container exit code
|
|
4
|
+
Wait response with container exit code plus optional classification fields (added in §3.12 of the SDK-fixes spec). The three optional fields (`reason`, `signal`, `finished_at`) are additive — clients that only read `exit_code` keep working unchanged.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`exitCode` | number
|
|
11
|
+
`finishedAt` | string
|
|
11
12
|
`id` | string
|
|
13
|
+
`reason` | string
|
|
14
|
+
`signal` | string
|
|
12
15
|
|
|
13
16
|
## Example
|
|
14
17
|
|
|
15
18
|
```typescript
|
|
16
|
-
import type { ContainerWaitResponse } from '@zlayer/client'
|
|
19
|
+
import type { ContainerWaitResponse } from '@zlayer/api-client'
|
|
17
20
|
|
|
18
21
|
// TODO: Update the object below with actual values
|
|
19
22
|
const example = {
|
|
20
23
|
"exitCode": null,
|
|
24
|
+
"finishedAt": null,
|
|
21
25
|
"id": null,
|
|
26
|
+
"reason": null,
|
|
27
|
+
"signal": null,
|
|
22
28
|
} satisfies ContainerWaitResponse
|
|
23
29
|
|
|
24
30
|
console.log(example)
|