@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
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { BridgeNetworkDriver } from './BridgeNetworkDriver';
|
|
17
|
+
import {
|
|
18
|
+
BridgeNetworkDriverFromJSON,
|
|
19
|
+
BridgeNetworkDriverFromJSONTyped,
|
|
20
|
+
BridgeNetworkDriverToJSON,
|
|
21
|
+
BridgeNetworkDriverToJSONTyped,
|
|
22
|
+
} from './BridgeNetworkDriver';
|
|
23
|
+
import type { BridgeNetworkAttachment } from './BridgeNetworkAttachment';
|
|
24
|
+
import {
|
|
25
|
+
BridgeNetworkAttachmentFromJSON,
|
|
26
|
+
BridgeNetworkAttachmentFromJSONTyped,
|
|
27
|
+
BridgeNetworkAttachmentToJSON,
|
|
28
|
+
BridgeNetworkAttachmentToJSONTyped,
|
|
29
|
+
} from './BridgeNetworkAttachment';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Response body for `GET /api/v1/container-networks/{id_or_name}`.
|
|
33
|
+
* @export
|
|
34
|
+
* @interface BridgeNetworkDetails
|
|
35
|
+
*/
|
|
36
|
+
export interface BridgeNetworkDetails {
|
|
37
|
+
/**
|
|
38
|
+
* Creation timestamp (UTC, RFC 3339).
|
|
39
|
+
* @type {Date}
|
|
40
|
+
* @memberof BridgeNetworkDetails
|
|
41
|
+
*/
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
/**
|
|
44
|
+
* Driver backing the network (bridge vs. overlay).
|
|
45
|
+
* @type {BridgeNetworkDriver}
|
|
46
|
+
* @memberof BridgeNetworkDetails
|
|
47
|
+
*/
|
|
48
|
+
driver?: BridgeNetworkDriver;
|
|
49
|
+
/**
|
|
50
|
+
* Opaque server-generated identifier (UUID v4).
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof BridgeNetworkDetails
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* If true, containers attached to this network cannot reach the outside
|
|
57
|
+
* world — only other containers on the same network.
|
|
58
|
+
* @type {boolean}
|
|
59
|
+
* @memberof BridgeNetworkDetails
|
|
60
|
+
*/
|
|
61
|
+
internal?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Arbitrary key/value labels for filtering and grouping.
|
|
64
|
+
* @type {{ [key: string]: string; }}
|
|
65
|
+
* @memberof BridgeNetworkDetails
|
|
66
|
+
*/
|
|
67
|
+
labels?: { [key: string]: string; };
|
|
68
|
+
/**
|
|
69
|
+
* Human-readable, unique name (must match `^[a-z0-9][a-z0-9_-]{0,63}$`).
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @memberof BridgeNetworkDetails
|
|
72
|
+
*/
|
|
73
|
+
name: string;
|
|
74
|
+
/**
|
|
75
|
+
* IPv4/IPv6 subnet in CIDR notation (e.g. `"10.240.0.0/24"`).
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof BridgeNetworkDetails
|
|
78
|
+
*/
|
|
79
|
+
subnet?: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* Containers currently attached to the network.
|
|
82
|
+
* @type {Array<BridgeNetworkAttachment>}
|
|
83
|
+
* @memberof BridgeNetworkDetails
|
|
84
|
+
*/
|
|
85
|
+
attachedContainers: Array<BridgeNetworkAttachment>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Check if a given object implements the BridgeNetworkDetails interface.
|
|
92
|
+
*/
|
|
93
|
+
export function instanceOfBridgeNetworkDetails(value: object): value is BridgeNetworkDetails {
|
|
94
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
95
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
96
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
97
|
+
if (!('attachedContainers' in value) || value['attachedContainers'] === undefined) return false;
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function BridgeNetworkDetailsFromJSON(json: any): BridgeNetworkDetails {
|
|
102
|
+
return BridgeNetworkDetailsFromJSONTyped(json, false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function BridgeNetworkDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): BridgeNetworkDetails {
|
|
106
|
+
if (json == null) {
|
|
107
|
+
return json;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'createdAt': (new Date(json['created_at'])),
|
|
112
|
+
'driver': json['driver'] == null ? undefined : BridgeNetworkDriverFromJSON(json['driver']),
|
|
113
|
+
'id': json['id'],
|
|
114
|
+
'internal': json['internal'] == null ? undefined : json['internal'],
|
|
115
|
+
'labels': json['labels'] == null ? undefined : json['labels'],
|
|
116
|
+
'name': json['name'],
|
|
117
|
+
'subnet': json['subnet'] == null ? undefined : json['subnet'],
|
|
118
|
+
'attachedContainers': ((json['attached_containers'] as Array<any>).map(BridgeNetworkAttachmentFromJSON)),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function BridgeNetworkDetailsToJSON(json: any): BridgeNetworkDetails {
|
|
123
|
+
return BridgeNetworkDetailsToJSONTyped(json, false);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function BridgeNetworkDetailsToJSONTyped(value?: BridgeNetworkDetails | null, ignoreDiscriminator: boolean = false): any {
|
|
127
|
+
if (value == null) {
|
|
128
|
+
return value;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
|
|
133
|
+
'created_at': value['createdAt'].toISOString(),
|
|
134
|
+
'driver': BridgeNetworkDriverToJSON(value['driver']),
|
|
135
|
+
'id': value['id'],
|
|
136
|
+
'internal': value['internal'],
|
|
137
|
+
'labels': value['labels'],
|
|
138
|
+
'name': value['name'],
|
|
139
|
+
'subnet': value['subnet'],
|
|
140
|
+
'attached_containers': ((value['attachedContainers'] as Array<any>).map(BridgeNetworkAttachmentToJSON)),
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Backing driver for a [`BridgeNetwork`].
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const BridgeNetworkDriver = {
|
|
21
|
+
Bridge: 'bridge',
|
|
22
|
+
Overlay: 'overlay'
|
|
23
|
+
} as const;
|
|
24
|
+
export type BridgeNetworkDriver = typeof BridgeNetworkDriver[keyof typeof BridgeNetworkDriver];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfBridgeNetworkDriver(value: any): boolean {
|
|
28
|
+
for (const key in BridgeNetworkDriver) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(BridgeNetworkDriver, key)) {
|
|
30
|
+
if (BridgeNetworkDriver[key as keyof typeof BridgeNetworkDriver] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function BridgeNetworkDriverFromJSON(json: any): BridgeNetworkDriver {
|
|
39
|
+
return BridgeNetworkDriverFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function BridgeNetworkDriverFromJSONTyped(json: any, ignoreDiscriminator: boolean): BridgeNetworkDriver {
|
|
43
|
+
return json as BridgeNetworkDriver;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function BridgeNetworkDriverToJSON(value?: BridgeNetworkDriver | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function BridgeNetworkDriverToJSONTyped(value: any, ignoreDiscriminator: boolean): BridgeNetworkDriver {
|
|
51
|
+
return value as BridgeNetworkDriver;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Body for `POST /api/v1/container-networks/{id_or_name}/connect`.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ConnectBridgeNetworkRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface ConnectBridgeNetworkRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Optional DNS aliases on this network.
|
|
24
|
+
* @type {Array<string>}
|
|
25
|
+
* @memberof ConnectBridgeNetworkRequest
|
|
26
|
+
*/
|
|
27
|
+
aliases?: Array<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Container id to attach.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ConnectBridgeNetworkRequest
|
|
32
|
+
*/
|
|
33
|
+
containerId: string;
|
|
34
|
+
/**
|
|
35
|
+
* Optional static IPv4 to pin this container to. Validated as
|
|
36
|
+
* [`Ipv4Addr`].
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof ConnectBridgeNetworkRequest
|
|
39
|
+
*/
|
|
40
|
+
ipv4Address?: string | null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ConnectBridgeNetworkRequest interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfConnectBridgeNetworkRequest(value: object): value is ConnectBridgeNetworkRequest {
|
|
47
|
+
if (!('containerId' in value) || value['containerId'] === undefined) return false;
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ConnectBridgeNetworkRequestFromJSON(json: any): ConnectBridgeNetworkRequest {
|
|
52
|
+
return ConnectBridgeNetworkRequestFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ConnectBridgeNetworkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConnectBridgeNetworkRequest {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
|
|
61
|
+
'aliases': json['aliases'] == null ? undefined : json['aliases'],
|
|
62
|
+
'containerId': json['container_id'],
|
|
63
|
+
'ipv4Address': json['ipv4_address'] == null ? undefined : json['ipv4_address'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function ConnectBridgeNetworkRequestToJSON(json: any): ConnectBridgeNetworkRequest {
|
|
68
|
+
return ConnectBridgeNetworkRequestToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function ConnectBridgeNetworkRequestToJSONTyped(value?: ConnectBridgeNetworkRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
72
|
+
if (value == null) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'aliases': value['aliases'],
|
|
79
|
+
'container_id': value['containerId'],
|
|
80
|
+
'ipv4_address': value['ipv4Address'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ContainerEventKind } from './ContainerEventKind';
|
|
17
|
+
import {
|
|
18
|
+
ContainerEventKindFromJSON,
|
|
19
|
+
ContainerEventKindFromJSONTyped,
|
|
20
|
+
ContainerEventKindToJSON,
|
|
21
|
+
ContainerEventKindToJSONTyped,
|
|
22
|
+
} from './ContainerEventKind';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A container lifecycle event published on the bus.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ContainerEvent
|
|
28
|
+
*/
|
|
29
|
+
export interface ContainerEvent {
|
|
30
|
+
/**
|
|
31
|
+
* Wall-clock time the event was emitted.
|
|
32
|
+
*
|
|
33
|
+
* Serialized as an RFC 3339 string on the wire. Typed as
|
|
34
|
+
* [`chrono::DateTime<Utc>`] in-process for ergonomic manipulation;
|
|
35
|
+
* the `#[schema(value_type = String, format = DateTime)]` attribute
|
|
36
|
+
* teaches `utoipa` to render a proper string schema in the `OpenAPI`
|
|
37
|
+
* output.
|
|
38
|
+
* @type {Date}
|
|
39
|
+
* @memberof ContainerEvent
|
|
40
|
+
*/
|
|
41
|
+
at: Date;
|
|
42
|
+
/**
|
|
43
|
+
* Exit code, when known. Populated for `Die` events where a wait has
|
|
44
|
+
* already resolved; otherwise `None`.
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof ContainerEvent
|
|
47
|
+
*/
|
|
48
|
+
exitCode?: number | null;
|
|
49
|
+
/**
|
|
50
|
+
* Container identifier (the API's id string, not the raw runtime id).
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof ContainerEvent
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* What kind of transition this event represents.
|
|
57
|
+
* @type {ContainerEventKind}
|
|
58
|
+
* @memberof ContainerEvent
|
|
59
|
+
*/
|
|
60
|
+
kind: ContainerEventKind;
|
|
61
|
+
/**
|
|
62
|
+
* Labels on the container at the time of the event. Used by subscribers
|
|
63
|
+
* to filter via the `label=k=v` query param (AND semantics).
|
|
64
|
+
* @type {{ [key: string]: string; }}
|
|
65
|
+
* @memberof ContainerEvent
|
|
66
|
+
*/
|
|
67
|
+
labels?: { [key: string]: string; };
|
|
68
|
+
/**
|
|
69
|
+
* Free-form human-readable reason. For `Die`, may indicate "stopped",
|
|
70
|
+
* "killed", "oom-killed"; for `Oom`, the OOM detail; for `Health`, may
|
|
71
|
+
* echo the probe failure message.
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof ContainerEvent
|
|
74
|
+
*/
|
|
75
|
+
reason?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* Health status, only populated for `Health` events (e.g. "healthy",
|
|
78
|
+
* "unhealthy", "starting").
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof ContainerEvent
|
|
81
|
+
*/
|
|
82
|
+
status?: string | null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Check if a given object implements the ContainerEvent interface.
|
|
89
|
+
*/
|
|
90
|
+
export function instanceOfContainerEvent(value: object): value is ContainerEvent {
|
|
91
|
+
if (!('at' in value) || value['at'] === undefined) return false;
|
|
92
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
93
|
+
if (!('kind' in value) || value['kind'] === undefined) return false;
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function ContainerEventFromJSON(json: any): ContainerEvent {
|
|
98
|
+
return ContainerEventFromJSONTyped(json, false);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function ContainerEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerEvent {
|
|
102
|
+
if (json == null) {
|
|
103
|
+
return json;
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
|
|
107
|
+
'at': (new Date(json['at'])),
|
|
108
|
+
'exitCode': json['exit_code'] == null ? undefined : json['exit_code'],
|
|
109
|
+
'id': json['id'],
|
|
110
|
+
'kind': ContainerEventKindFromJSON(json['kind']),
|
|
111
|
+
'labels': json['labels'] == null ? undefined : json['labels'],
|
|
112
|
+
'reason': json['reason'] == null ? undefined : json['reason'],
|
|
113
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function ContainerEventToJSON(json: any): ContainerEvent {
|
|
118
|
+
return ContainerEventToJSONTyped(json, false);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function ContainerEventToJSONTyped(value?: ContainerEvent | null, ignoreDiscriminator: boolean = false): any {
|
|
122
|
+
if (value == null) {
|
|
123
|
+
return value;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
|
|
128
|
+
'at': value['at'].toISOString(),
|
|
129
|
+
'exit_code': value['exitCode'],
|
|
130
|
+
'id': value['id'],
|
|
131
|
+
'kind': ContainerEventKindToJSON(value['kind']),
|
|
132
|
+
'labels': value['labels'],
|
|
133
|
+
'reason': value['reason'],
|
|
134
|
+
'status': value['status'],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Kind of container lifecycle event.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const ContainerEventKind = {
|
|
21
|
+
Start: 'start',
|
|
22
|
+
Die: 'die',
|
|
23
|
+
Oom: 'oom',
|
|
24
|
+
Health: 'health'
|
|
25
|
+
} as const;
|
|
26
|
+
export type ContainerEventKind = typeof ContainerEventKind[keyof typeof ContainerEventKind];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfContainerEventKind(value: any): boolean {
|
|
30
|
+
for (const key in ContainerEventKind) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(ContainerEventKind, key)) {
|
|
32
|
+
if (ContainerEventKind[key as keyof typeof ContainerEventKind] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function ContainerEventKindFromJSON(json: any): ContainerEventKind {
|
|
41
|
+
return ContainerEventKindFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ContainerEventKindFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerEventKind {
|
|
45
|
+
return json as ContainerEventKind;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function ContainerEventKindToJSON(value?: ContainerEventKind | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ContainerEventKindToJSONTyped(value: any, ignoreDiscriminator: boolean): ContainerEventKind {
|
|
53
|
+
return value as ContainerEventKind;
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* ZLayer API
|
|
5
|
+
* Container orchestration API for ZLayer
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Runtime-native health snapshot on [`ContainerInfo::health`].
|
|
18
|
+
*
|
|
19
|
+
* Sourced from bollard's `ContainerState.health` for Docker-backed
|
|
20
|
+
* containers. The internal `HealthMonitor` in
|
|
21
|
+
* `crates/zlayer-agent/src/health.rs` drives service-level health events
|
|
22
|
+
* against user-configured health specs; for standalone containers the API
|
|
23
|
+
* reports the runtime-native status instead so images with a baked-in
|
|
24
|
+
* `HEALTHCHECK` still surface correctly.
|
|
25
|
+
* @export
|
|
26
|
+
* @interface ContainerHealthInfo
|
|
27
|
+
*/
|
|
28
|
+
export interface ContainerHealthInfo {
|
|
29
|
+
/**
|
|
30
|
+
* Consecutive failing probe count, when the runtime tracks it.
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof ContainerHealthInfo
|
|
33
|
+
*/
|
|
34
|
+
failingStreak?: number | null;
|
|
35
|
+
/**
|
|
36
|
+
* Output from the most recent failing probe, when available.
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof ContainerHealthInfo
|
|
39
|
+
*/
|
|
40
|
+
lastOutput?: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* One of `"none"`, `"starting"`, `"healthy"`, `"unhealthy"` (Docker
|
|
43
|
+
* `HealthStatusEnum`). Empty / missing upstream values normalise to
|
|
44
|
+
* `"none"`.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ContainerHealthInfo
|
|
47
|
+
*/
|
|
48
|
+
status: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the ContainerHealthInfo interface.
|
|
53
|
+
*/
|
|
54
|
+
export function instanceOfContainerHealthInfo(value: object): value is ContainerHealthInfo {
|
|
55
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ContainerHealthInfoFromJSON(json: any): ContainerHealthInfo {
|
|
60
|
+
return ContainerHealthInfoFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ContainerHealthInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerHealthInfo {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'failingStreak': json['failing_streak'] == null ? undefined : json['failing_streak'],
|
|
70
|
+
'lastOutput': json['last_output'] == null ? undefined : json['last_output'],
|
|
71
|
+
'status': json['status'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function ContainerHealthInfoToJSON(json: any): ContainerHealthInfo {
|
|
76
|
+
return ContainerHealthInfoToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function ContainerHealthInfoToJSONTyped(value?: ContainerHealthInfo | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'failing_streak': value['failingStreak'],
|
|
87
|
+
'last_output': value['lastOutput'],
|
|
88
|
+
'status': value['status'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -13,6 +13,28 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ContainerHealthInfo } from './ContainerHealthInfo';
|
|
17
|
+
import {
|
|
18
|
+
ContainerHealthInfoFromJSON,
|
|
19
|
+
ContainerHealthInfoFromJSONTyped,
|
|
20
|
+
ContainerHealthInfoToJSON,
|
|
21
|
+
ContainerHealthInfoToJSONTyped,
|
|
22
|
+
} from './ContainerHealthInfo';
|
|
23
|
+
import type { PortMapping } from './PortMapping';
|
|
24
|
+
import {
|
|
25
|
+
PortMappingFromJSON,
|
|
26
|
+
PortMappingFromJSONTyped,
|
|
27
|
+
PortMappingToJSON,
|
|
28
|
+
PortMappingToJSONTyped,
|
|
29
|
+
} from './PortMapping';
|
|
30
|
+
import type { NetworkAttachmentInfo } from './NetworkAttachmentInfo';
|
|
31
|
+
import {
|
|
32
|
+
NetworkAttachmentInfoFromJSON,
|
|
33
|
+
NetworkAttachmentInfoFromJSONTyped,
|
|
34
|
+
NetworkAttachmentInfoToJSON,
|
|
35
|
+
NetworkAttachmentInfoToJSONTyped,
|
|
36
|
+
} from './NetworkAttachmentInfo';
|
|
37
|
+
|
|
16
38
|
/**
|
|
17
39
|
* Container information returned by the API
|
|
18
40
|
* @export
|
|
@@ -25,6 +47,21 @@ export interface ContainerInfo {
|
|
|
25
47
|
* @memberof ContainerInfo
|
|
26
48
|
*/
|
|
27
49
|
createdAt: string;
|
|
50
|
+
/**
|
|
51
|
+
* Most-recent exit code. `None` for containers still running and for
|
|
52
|
+
* containers that have never exited.
|
|
53
|
+
* @type {number}
|
|
54
|
+
* @memberof ContainerInfo
|
|
55
|
+
*/
|
|
56
|
+
exitCode?: number | null;
|
|
57
|
+
/**
|
|
58
|
+
* Runtime-native health status, when the container image declares a
|
|
59
|
+
* `HEALTHCHECK` (or equivalent). `None` when the runtime doesn't track
|
|
60
|
+
* health for this container.
|
|
61
|
+
* @type {ContainerHealthInfo}
|
|
62
|
+
* @memberof ContainerInfo
|
|
63
|
+
*/
|
|
64
|
+
health?: ContainerHealthInfo | null;
|
|
28
65
|
/**
|
|
29
66
|
* Container identifier
|
|
30
67
|
* @type {string}
|
|
@@ -37,6 +74,13 @@ export interface ContainerInfo {
|
|
|
37
74
|
* @memberof ContainerInfo
|
|
38
75
|
*/
|
|
39
76
|
image: string;
|
|
77
|
+
/**
|
|
78
|
+
* Primary IPv4 address (first non-empty IP across attached networks).
|
|
79
|
+
* Docker's `bridge` network is preferred when present.
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof ContainerInfo
|
|
82
|
+
*/
|
|
83
|
+
ipv4?: string | null;
|
|
40
84
|
/**
|
|
41
85
|
* Labels
|
|
42
86
|
* @type {{ [key: string]: string; }}
|
|
@@ -49,12 +93,27 @@ export interface ContainerInfo {
|
|
|
49
93
|
* @memberof ContainerInfo
|
|
50
94
|
*/
|
|
51
95
|
name?: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* Networks this container is attached to, with per-network aliases
|
|
98
|
+
* and IPv4. Empty when the runtime doesn't surface network detail.
|
|
99
|
+
* @type {Array<NetworkAttachmentInfo>}
|
|
100
|
+
* @memberof ContainerInfo
|
|
101
|
+
*/
|
|
102
|
+
networks?: Array<NetworkAttachmentInfo>;
|
|
52
103
|
/**
|
|
53
104
|
* Process ID (if running)
|
|
54
105
|
* @type {number}
|
|
55
106
|
* @memberof ContainerInfo
|
|
56
107
|
*/
|
|
57
108
|
pid?: number | null;
|
|
109
|
+
/**
|
|
110
|
+
* Published port mappings (container → host). Populated from the
|
|
111
|
+
* runtime's inspect response; empty when the runtime doesn't expose
|
|
112
|
+
* port-level detail or the container has no published ports.
|
|
113
|
+
* @type {Array<PortMapping>}
|
|
114
|
+
* @memberof ContainerInfo
|
|
115
|
+
*/
|
|
116
|
+
ports?: Array<PortMapping>;
|
|
58
117
|
/**
|
|
59
118
|
* Container state (pending, running, exited, failed)
|
|
60
119
|
* @type {string}
|
|
@@ -86,11 +145,16 @@ export function ContainerInfoFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
86
145
|
return {
|
|
87
146
|
|
|
88
147
|
'createdAt': json['created_at'],
|
|
148
|
+
'exitCode': json['exit_code'] == null ? undefined : json['exit_code'],
|
|
149
|
+
'health': json['health'] == null ? undefined : ContainerHealthInfoFromJSON(json['health']),
|
|
89
150
|
'id': json['id'],
|
|
90
151
|
'image': json['image'],
|
|
152
|
+
'ipv4': json['ipv4'] == null ? undefined : json['ipv4'],
|
|
91
153
|
'labels': json['labels'],
|
|
92
154
|
'name': json['name'] == null ? undefined : json['name'],
|
|
155
|
+
'networks': json['networks'] == null ? undefined : ((json['networks'] as Array<any>).map(NetworkAttachmentInfoFromJSON)),
|
|
93
156
|
'pid': json['pid'] == null ? undefined : json['pid'],
|
|
157
|
+
'ports': json['ports'] == null ? undefined : ((json['ports'] as Array<any>).map(PortMappingFromJSON)),
|
|
94
158
|
'state': json['state'],
|
|
95
159
|
};
|
|
96
160
|
}
|
|
@@ -107,11 +171,16 @@ export function ContainerInfoToJSONTyped(value?: ContainerInfo | null, ignoreDis
|
|
|
107
171
|
return {
|
|
108
172
|
|
|
109
173
|
'created_at': value['createdAt'],
|
|
174
|
+
'exit_code': value['exitCode'],
|
|
175
|
+
'health': ContainerHealthInfoToJSON(value['health']),
|
|
110
176
|
'id': value['id'],
|
|
111
177
|
'image': value['image'],
|
|
178
|
+
'ipv4': value['ipv4'],
|
|
112
179
|
'labels': value['labels'],
|
|
113
180
|
'name': value['name'],
|
|
181
|
+
'networks': value['networks'] == null ? undefined : ((value['networks'] as Array<any>).map(NetworkAttachmentInfoToJSON)),
|
|
114
182
|
'pid': value['pid'],
|
|
183
|
+
'ports': value['ports'] == null ? undefined : ((value['ports'] as Array<any>).map(PortMappingToJSON)),
|
|
115
184
|
'state': value['state'],
|
|
116
185
|
};
|
|
117
186
|
}
|