@zlayer/api-client 0.10.86 → 0.11.7
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,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
|
+
* Which flavor of container restart policy to apply.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const ContainerRestartKind = {
|
|
21
|
+
No: 'no',
|
|
22
|
+
Always: 'always',
|
|
23
|
+
UnlessStopped: 'unless_stopped',
|
|
24
|
+
OnFailure: 'on_failure'
|
|
25
|
+
} as const;
|
|
26
|
+
export type ContainerRestartKind = typeof ContainerRestartKind[keyof typeof ContainerRestartKind];
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export function instanceOfContainerRestartKind(value: any): boolean {
|
|
30
|
+
for (const key in ContainerRestartKind) {
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(ContainerRestartKind, key)) {
|
|
32
|
+
if (ContainerRestartKind[key as keyof typeof ContainerRestartKind] === value) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function ContainerRestartKindFromJSON(json: any): ContainerRestartKind {
|
|
41
|
+
return ContainerRestartKindFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function ContainerRestartKindFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerRestartKind {
|
|
45
|
+
return json as ContainerRestartKind;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function ContainerRestartKindToJSON(value?: ContainerRestartKind | null): any {
|
|
49
|
+
return value as any;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ContainerRestartKindToJSONTyped(value: any, ignoreDiscriminator: boolean): ContainerRestartKind {
|
|
53
|
+
return value as ContainerRestartKind;
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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 { ContainerRestartKind } from './ContainerRestartKind';
|
|
17
|
+
import {
|
|
18
|
+
ContainerRestartKindFromJSON,
|
|
19
|
+
ContainerRestartKindFromJSONTyped,
|
|
20
|
+
ContainerRestartKindToJSON,
|
|
21
|
+
ContainerRestartKindToJSONTyped,
|
|
22
|
+
} from './ContainerRestartKind';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Container-runtime-level restart policy.
|
|
26
|
+
*
|
|
27
|
+
* Maps onto Docker's `HostConfig.RestartPolicy`. Distinct from
|
|
28
|
+
* [`PanicPolicy`], which governs what `ZLayer` does in response to an
|
|
29
|
+
* application panic (it does not set a Docker restart policy).
|
|
30
|
+
* @export
|
|
31
|
+
* @interface ContainerRestartPolicy
|
|
32
|
+
*/
|
|
33
|
+
export interface ContainerRestartPolicy {
|
|
34
|
+
/**
|
|
35
|
+
* Humantime-formatted delay between restarts (e.g. `"500ms"`,
|
|
36
|
+
* `"2s"`). Accepted for forward-compatibility but currently ignored
|
|
37
|
+
* by the Docker backend: bollard's `RestartPolicy` has no per-kind
|
|
38
|
+
* delay field. When set, the runtime emits a warning.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ContainerRestartPolicy
|
|
41
|
+
*/
|
|
42
|
+
delay?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Which restart policy to apply.
|
|
45
|
+
* @type {ContainerRestartKind}
|
|
46
|
+
* @memberof ContainerRestartPolicy
|
|
47
|
+
*/
|
|
48
|
+
kind: ContainerRestartKind;
|
|
49
|
+
/**
|
|
50
|
+
* For `on_failure` only: maximum number of restart attempts before
|
|
51
|
+
* giving up. Ignored by other kinds. `None` means "retry forever".
|
|
52
|
+
* @type {number}
|
|
53
|
+
* @memberof ContainerRestartPolicy
|
|
54
|
+
*/
|
|
55
|
+
maxAttempts?: number | null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ContainerRestartPolicy interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfContainerRestartPolicy(value: object): value is ContainerRestartPolicy {
|
|
64
|
+
if (!('kind' in value) || value['kind'] === undefined) return false;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ContainerRestartPolicyFromJSON(json: any): ContainerRestartPolicy {
|
|
69
|
+
return ContainerRestartPolicyFromJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function ContainerRestartPolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContainerRestartPolicy {
|
|
73
|
+
if (json == null) {
|
|
74
|
+
return json;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'delay': json['delay'] == null ? undefined : json['delay'],
|
|
79
|
+
'kind': ContainerRestartKindFromJSON(json['kind']),
|
|
80
|
+
'maxAttempts': json['max_attempts'] == null ? undefined : json['max_attempts'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function ContainerRestartPolicyToJSON(json: any): ContainerRestartPolicy {
|
|
85
|
+
return ContainerRestartPolicyToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function ContainerRestartPolicyToJSONTyped(value?: ContainerRestartPolicy | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'delay': value['delay'],
|
|
96
|
+
'kind': ContainerRestartKindToJSON(value['kind']),
|
|
97
|
+
'max_attempts': value['maxAttempts'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -14,23 +14,51 @@
|
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
|
-
* Wait response with container exit code
|
|
17
|
+
* Wait response with container exit code plus optional classification
|
|
18
|
+
* fields (added in §3.12 of the SDK-fixes spec).
|
|
19
|
+
*
|
|
20
|
+
* The three optional fields (`reason`, `signal`, `finished_at`) are
|
|
21
|
+
* additive — clients that only read `exit_code` keep working unchanged.
|
|
18
22
|
* @export
|
|
19
23
|
* @interface ContainerWaitResponse
|
|
20
24
|
*/
|
|
21
25
|
export interface ContainerWaitResponse {
|
|
22
26
|
/**
|
|
23
|
-
* Exit code (0 = success)
|
|
27
|
+
* Exit code (0 = success). When the container was killed by signal
|
|
28
|
+
* `N`, this is typically `128 + N`.
|
|
24
29
|
* @type {number}
|
|
25
30
|
* @memberof ContainerWaitResponse
|
|
26
31
|
*/
|
|
27
32
|
exitCode: number;
|
|
33
|
+
/**
|
|
34
|
+
* RFC3339 timestamp of when the container exited, if reported by
|
|
35
|
+
* the runtime.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ContainerWaitResponse
|
|
38
|
+
*/
|
|
39
|
+
finishedAt?: string | null;
|
|
28
40
|
/**
|
|
29
41
|
* Container identifier
|
|
30
42
|
* @type {string}
|
|
31
43
|
* @memberof ContainerWaitResponse
|
|
32
44
|
*/
|
|
33
45
|
id: string;
|
|
46
|
+
/**
|
|
47
|
+
* Classification of the exit. One of `"exited"`, `"signal"`,
|
|
48
|
+
* `"oom_killed"`, or `"runtime_error"`. Absent when the runtime
|
|
49
|
+
* didn't classify the exit.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ContainerWaitResponse
|
|
52
|
+
*/
|
|
53
|
+
reason?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Signal name when `reason == "signal"`, e.g. `"SIGKILL"`. Absent
|
|
56
|
+
* when the runtime couldn't determine it (or the exit wasn't a
|
|
57
|
+
* signal death).
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof ContainerWaitResponse
|
|
60
|
+
*/
|
|
61
|
+
signal?: string | null;
|
|
34
62
|
}
|
|
35
63
|
|
|
36
64
|
/**
|
|
@@ -53,7 +81,10 @@ export function ContainerWaitResponseFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
53
81
|
return {
|
|
54
82
|
|
|
55
83
|
'exitCode': json['exit_code'],
|
|
84
|
+
'finishedAt': json['finished_at'] == null ? undefined : json['finished_at'],
|
|
56
85
|
'id': json['id'],
|
|
86
|
+
'reason': json['reason'] == null ? undefined : json['reason'],
|
|
87
|
+
'signal': json['signal'] == null ? undefined : json['signal'],
|
|
57
88
|
};
|
|
58
89
|
}
|
|
59
90
|
|
|
@@ -69,7 +100,10 @@ export function ContainerWaitResponseToJSONTyped(value?: ContainerWaitResponse |
|
|
|
69
100
|
return {
|
|
70
101
|
|
|
71
102
|
'exit_code': value['exitCode'],
|
|
103
|
+
'finished_at': value['finishedAt'],
|
|
72
104
|
'id': value['id'],
|
|
105
|
+
'reason': value['reason'],
|
|
106
|
+
'signal': value['signal'],
|
|
73
107
|
};
|
|
74
108
|
}
|
|
75
109
|
|
|
@@ -0,0 +1,109 @@
|
|
|
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
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Body for `POST /api/v1/container-networks`.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CreateBridgeNetworkRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateBridgeNetworkRequest {
|
|
30
|
+
/**
|
|
31
|
+
* Driver, defaults to `bridge`.
|
|
32
|
+
* @type {BridgeNetworkDriver}
|
|
33
|
+
* @memberof CreateBridgeNetworkRequest
|
|
34
|
+
*/
|
|
35
|
+
driver?: BridgeNetworkDriver | null;
|
|
36
|
+
/**
|
|
37
|
+
* Internal-only (no egress) network.
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof CreateBridgeNetworkRequest
|
|
40
|
+
*/
|
|
41
|
+
internal?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Arbitrary labels.
|
|
44
|
+
* @type {{ [key: string]: string; }}
|
|
45
|
+
* @memberof CreateBridgeNetworkRequest
|
|
46
|
+
*/
|
|
47
|
+
labels?: { [key: string]: string; };
|
|
48
|
+
/**
|
|
49
|
+
* Network name (must match `^[a-z0-9][a-z0-9_-]{0,63}$`).
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof CreateBridgeNetworkRequest
|
|
52
|
+
*/
|
|
53
|
+
name: string;
|
|
54
|
+
/**
|
|
55
|
+
* Subnet CIDR (e.g. `"10.240.0.0/24"`). Validated as
|
|
56
|
+
* [`ipnetwork::IpNetwork`].
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof CreateBridgeNetworkRequest
|
|
59
|
+
*/
|
|
60
|
+
subnet?: string | null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Check if a given object implements the CreateBridgeNetworkRequest interface.
|
|
67
|
+
*/
|
|
68
|
+
export function instanceOfCreateBridgeNetworkRequest(value: object): value is CreateBridgeNetworkRequest {
|
|
69
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function CreateBridgeNetworkRequestFromJSON(json: any): CreateBridgeNetworkRequest {
|
|
74
|
+
return CreateBridgeNetworkRequestFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function CreateBridgeNetworkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateBridgeNetworkRequest {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'driver': json['driver'] == null ? undefined : BridgeNetworkDriverFromJSON(json['driver']),
|
|
84
|
+
'internal': json['internal'] == null ? undefined : json['internal'],
|
|
85
|
+
'labels': json['labels'] == null ? undefined : json['labels'],
|
|
86
|
+
'name': json['name'],
|
|
87
|
+
'subnet': json['subnet'] == null ? undefined : json['subnet'],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function CreateBridgeNetworkRequestToJSON(json: any): CreateBridgeNetworkRequest {
|
|
92
|
+
return CreateBridgeNetworkRequestToJSONTyped(json, false);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function CreateBridgeNetworkRequestToJSONTyped(value?: CreateBridgeNetworkRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
96
|
+
if (value == null) {
|
|
97
|
+
return value;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return {
|
|
101
|
+
|
|
102
|
+
'driver': BridgeNetworkDriverToJSON(value['driver']),
|
|
103
|
+
'internal': value['internal'],
|
|
104
|
+
'labels': value['labels'],
|
|
105
|
+
'name': value['name'],
|
|
106
|
+
'subnet': value['subnet'],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
@@ -13,6 +13,20 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ContainerRestartPolicy } from './ContainerRestartPolicy';
|
|
17
|
+
import {
|
|
18
|
+
ContainerRestartPolicyFromJSON,
|
|
19
|
+
ContainerRestartPolicyFromJSONTyped,
|
|
20
|
+
ContainerRestartPolicyToJSON,
|
|
21
|
+
ContainerRestartPolicyToJSONTyped,
|
|
22
|
+
} from './ContainerRestartPolicy';
|
|
23
|
+
import type { NetworkAttachmentRequest } from './NetworkAttachmentRequest';
|
|
24
|
+
import {
|
|
25
|
+
NetworkAttachmentRequestFromJSON,
|
|
26
|
+
NetworkAttachmentRequestFromJSONTyped,
|
|
27
|
+
NetworkAttachmentRequestToJSON,
|
|
28
|
+
NetworkAttachmentRequestToJSONTyped,
|
|
29
|
+
} from './NetworkAttachmentRequest';
|
|
16
30
|
import type { VolumeMount } from './VolumeMount';
|
|
17
31
|
import {
|
|
18
32
|
VolumeMountFromJSON,
|
|
@@ -20,6 +34,20 @@ import {
|
|
|
20
34
|
VolumeMountToJSON,
|
|
21
35
|
VolumeMountToJSONTyped,
|
|
22
36
|
} from './VolumeMount';
|
|
37
|
+
import type { HealthCheckRequest } from './HealthCheckRequest';
|
|
38
|
+
import {
|
|
39
|
+
HealthCheckRequestFromJSON,
|
|
40
|
+
HealthCheckRequestFromJSONTyped,
|
|
41
|
+
HealthCheckRequestToJSON,
|
|
42
|
+
HealthCheckRequestToJSONTyped,
|
|
43
|
+
} from './HealthCheckRequest';
|
|
44
|
+
import type { PortMapping } from './PortMapping';
|
|
45
|
+
import {
|
|
46
|
+
PortMappingFromJSON,
|
|
47
|
+
PortMappingFromJSONTyped,
|
|
48
|
+
PortMappingToJSON,
|
|
49
|
+
PortMappingToJSONTyped,
|
|
50
|
+
} from './PortMapping';
|
|
23
51
|
import type { ContainerResourceLimits } from './ContainerResourceLimits';
|
|
24
52
|
import {
|
|
25
53
|
ContainerResourceLimitsFromJSON,
|
|
@@ -27,6 +55,13 @@ import {
|
|
|
27
55
|
ContainerResourceLimitsToJSON,
|
|
28
56
|
ContainerResourceLimitsToJSONTyped,
|
|
29
57
|
} from './ContainerResourceLimits';
|
|
58
|
+
import type { RegistryAuth } from './RegistryAuth';
|
|
59
|
+
import {
|
|
60
|
+
RegistryAuthFromJSON,
|
|
61
|
+
RegistryAuthFromJSONTyped,
|
|
62
|
+
RegistryAuthToJSON,
|
|
63
|
+
RegistryAuthToJSONTyped,
|
|
64
|
+
} from './RegistryAuth';
|
|
30
65
|
|
|
31
66
|
/**
|
|
32
67
|
* Request to create and start a container
|
|
@@ -40,12 +75,41 @@ export interface CreateContainerRequest {
|
|
|
40
75
|
* @memberof CreateContainerRequest
|
|
41
76
|
*/
|
|
42
77
|
command?: Array<string> | null;
|
|
78
|
+
/**
|
|
79
|
+
* Additional DNS servers (maps to Docker's `--dns`). Each entry must be
|
|
80
|
+
* a plausible IPv4 or IPv6 address.
|
|
81
|
+
* @type {Array<string>}
|
|
82
|
+
* @memberof CreateContainerRequest
|
|
83
|
+
*/
|
|
84
|
+
dns?: Array<string>;
|
|
43
85
|
/**
|
|
44
86
|
* Environment variables
|
|
45
87
|
* @type {{ [key: string]: string; }}
|
|
46
88
|
* @memberof CreateContainerRequest
|
|
47
89
|
*/
|
|
48
90
|
env?: { [key: string]: string; };
|
|
91
|
+
/**
|
|
92
|
+
* Extra `hostname:ip` entries appended to `/etc/hosts` (maps to Docker's
|
|
93
|
+
* `--add-host`). The special literal `host-gateway` is accepted as the
|
|
94
|
+
* `ip` half.
|
|
95
|
+
* @type {Array<string>}
|
|
96
|
+
* @memberof CreateContainerRequest
|
|
97
|
+
*/
|
|
98
|
+
extraHosts?: Array<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Optional health check. When omitted, the daemon installs a no-op
|
|
101
|
+
* placeholder (`HealthCheck::Tcp { port: 0 }`) matching the current
|
|
102
|
+
* default; the health monitor treats `port == 0` as "skip".
|
|
103
|
+
* @type {HealthCheckRequest}
|
|
104
|
+
* @memberof CreateContainerRequest
|
|
105
|
+
*/
|
|
106
|
+
healthCheck?: HealthCheckRequest | null;
|
|
107
|
+
/**
|
|
108
|
+
* Optional container hostname (maps to Docker's `--hostname`).
|
|
109
|
+
* @type {string}
|
|
110
|
+
* @memberof CreateContainerRequest
|
|
111
|
+
*/
|
|
112
|
+
hostname?: string | null;
|
|
49
113
|
/**
|
|
50
114
|
* OCI image reference (e.g., "nginx:latest", "ubuntu:22.04")
|
|
51
115
|
* @type {string}
|
|
@@ -64,18 +128,61 @@ export interface CreateContainerRequest {
|
|
|
64
128
|
* @memberof CreateContainerRequest
|
|
65
129
|
*/
|
|
66
130
|
name?: string | null;
|
|
131
|
+
/**
|
|
132
|
+
* User-defined bridge/overlay networks to attach the newly-created
|
|
133
|
+
* container to. Each entry references a network by id or name and is
|
|
134
|
+
* attached after the container is successfully started. If any
|
|
135
|
+
* attachment fails, the partially-started container is rolled back
|
|
136
|
+
* (stopped + removed) and the request is failed.
|
|
137
|
+
* @type {Array<NetworkAttachmentRequest>}
|
|
138
|
+
* @memberof CreateContainerRequest
|
|
139
|
+
*/
|
|
140
|
+
networks?: Array<NetworkAttachmentRequest>;
|
|
141
|
+
/**
|
|
142
|
+
* Published ports (Docker's `-p host:container/proto`). When omitted,
|
|
143
|
+
* the container is created without any host port publishing.
|
|
144
|
+
* @type {Array<PortMapping>}
|
|
145
|
+
* @memberof CreateContainerRequest
|
|
146
|
+
*/
|
|
147
|
+
ports?: Array<PortMapping>;
|
|
67
148
|
/**
|
|
68
149
|
* Image pull policy: "always", "`if_not_present`", or "never"
|
|
69
150
|
* @type {string}
|
|
70
151
|
* @memberof CreateContainerRequest
|
|
71
152
|
*/
|
|
72
153
|
pullPolicy?: string | null;
|
|
154
|
+
/**
|
|
155
|
+
* Inline Docker/OCI registry credentials used for this pull only. Not
|
|
156
|
+
* persisted, never logged, never echoed back on a response. When both
|
|
157
|
+
* `registry_credential_id` and `registry_auth` are set, this field
|
|
158
|
+
* takes precedence.
|
|
159
|
+
* @type {RegistryAuth}
|
|
160
|
+
* @memberof CreateContainerRequest
|
|
161
|
+
*/
|
|
162
|
+
registryAuth?: RegistryAuth | null;
|
|
163
|
+
/**
|
|
164
|
+
* Id of a persisted registry credential (from
|
|
165
|
+
* `POST /api/v1/credentials/registry`) to use when pulling the image.
|
|
166
|
+
* Ignored when [`Self::registry_auth`] is also supplied (inline auth
|
|
167
|
+
* wins). Requires the daemon to be configured with a credential store
|
|
168
|
+
* — otherwise the request is rejected with `400`.
|
|
169
|
+
* @type {string}
|
|
170
|
+
* @memberof CreateContainerRequest
|
|
171
|
+
*/
|
|
172
|
+
registryCredentialId?: string | null;
|
|
73
173
|
/**
|
|
74
174
|
* Resource limits (CPU, memory)
|
|
75
175
|
* @type {ContainerResourceLimits}
|
|
76
176
|
* @memberof CreateContainerRequest
|
|
77
177
|
*/
|
|
78
178
|
resources?: ContainerResourceLimits | null;
|
|
179
|
+
/**
|
|
180
|
+
* Container restart policy (Docker-style). When omitted, the runtime
|
|
181
|
+
* applies no explicit restart policy (Docker default: `"no"`).
|
|
182
|
+
* @type {ContainerRestartPolicy}
|
|
183
|
+
* @memberof CreateContainerRequest
|
|
184
|
+
*/
|
|
185
|
+
restartPolicy?: ContainerRestartPolicy | null;
|
|
79
186
|
/**
|
|
80
187
|
* Volume mounts
|
|
81
188
|
* @type {Array<VolumeMount>}
|
|
@@ -109,12 +216,21 @@ export function CreateContainerRequestFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
109
216
|
return {
|
|
110
217
|
|
|
111
218
|
'command': json['command'] == null ? undefined : json['command'],
|
|
219
|
+
'dns': json['dns'] == null ? undefined : json['dns'],
|
|
112
220
|
'env': json['env'] == null ? undefined : json['env'],
|
|
221
|
+
'extraHosts': json['extra_hosts'] == null ? undefined : json['extra_hosts'],
|
|
222
|
+
'healthCheck': json['health_check'] == null ? undefined : HealthCheckRequestFromJSON(json['health_check']),
|
|
223
|
+
'hostname': json['hostname'] == null ? undefined : json['hostname'],
|
|
113
224
|
'image': json['image'],
|
|
114
225
|
'labels': json['labels'] == null ? undefined : json['labels'],
|
|
115
226
|
'name': json['name'] == null ? undefined : json['name'],
|
|
227
|
+
'networks': json['networks'] == null ? undefined : ((json['networks'] as Array<any>).map(NetworkAttachmentRequestFromJSON)),
|
|
228
|
+
'ports': json['ports'] == null ? undefined : ((json['ports'] as Array<any>).map(PortMappingFromJSON)),
|
|
116
229
|
'pullPolicy': json['pull_policy'] == null ? undefined : json['pull_policy'],
|
|
230
|
+
'registryAuth': json['registry_auth'] == null ? undefined : RegistryAuthFromJSON(json['registry_auth']),
|
|
231
|
+
'registryCredentialId': json['registry_credential_id'] == null ? undefined : json['registry_credential_id'],
|
|
117
232
|
'resources': json['resources'] == null ? undefined : ContainerResourceLimitsFromJSON(json['resources']),
|
|
233
|
+
'restartPolicy': json['restart_policy'] == null ? undefined : ContainerRestartPolicyFromJSON(json['restart_policy']),
|
|
118
234
|
'volumes': json['volumes'] == null ? undefined : ((json['volumes'] as Array<any>).map(VolumeMountFromJSON)),
|
|
119
235
|
'workDir': json['work_dir'] == null ? undefined : json['work_dir'],
|
|
120
236
|
};
|
|
@@ -132,12 +248,21 @@ export function CreateContainerRequestToJSONTyped(value?: CreateContainerRequest
|
|
|
132
248
|
return {
|
|
133
249
|
|
|
134
250
|
'command': value['command'],
|
|
251
|
+
'dns': value['dns'],
|
|
135
252
|
'env': value['env'],
|
|
253
|
+
'extra_hosts': value['extraHosts'],
|
|
254
|
+
'health_check': HealthCheckRequestToJSON(value['healthCheck']),
|
|
255
|
+
'hostname': value['hostname'],
|
|
136
256
|
'image': value['image'],
|
|
137
257
|
'labels': value['labels'],
|
|
138
258
|
'name': value['name'],
|
|
259
|
+
'networks': value['networks'] == null ? undefined : ((value['networks'] as Array<any>).map(NetworkAttachmentRequestToJSON)),
|
|
260
|
+
'ports': value['ports'] == null ? undefined : ((value['ports'] as Array<any>).map(PortMappingToJSON)),
|
|
139
261
|
'pull_policy': value['pullPolicy'],
|
|
262
|
+
'registry_auth': RegistryAuthToJSON(value['registryAuth']),
|
|
263
|
+
'registry_credential_id': value['registryCredentialId'],
|
|
140
264
|
'resources': ContainerResourceLimitsToJSON(value['resources']),
|
|
265
|
+
'restart_policy': ContainerRestartPolicyToJSON(value['restartPolicy']),
|
|
141
266
|
'volumes': value['volumes'] == null ? undefined : ((value['volumes'] as Array<any>).map(VolumeMountToJSON)),
|
|
142
267
|
'work_dir': value['workDir'],
|
|
143
268
|
};
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
* Request body for `POST /api/v1/volumes`.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CreateVolumeRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateVolumeRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Optional labels to attach to the volume.
|
|
24
|
+
* @type {{ [key: string]: string; }}
|
|
25
|
+
* @memberof CreateVolumeRequest
|
|
26
|
+
*/
|
|
27
|
+
labels?: { [key: string]: string; };
|
|
28
|
+
/**
|
|
29
|
+
* Volume name. Required. Must match `^[a-z0-9][a-z0-9_-]{0,63}$`.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateVolumeRequest
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Optional size hint (humansize format: `"512Mi"`, `"10Gi"`).
|
|
36
|
+
* Recorded in the sidecar for display and future quota enforcement.
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof CreateVolumeRequest
|
|
39
|
+
*/
|
|
40
|
+
size?: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Optional storage tier. Accepts `"local"` (default), `"cached"`,
|
|
43
|
+
* `"network"`, matching `zlayer_spec::StorageTier`.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateVolumeRequest
|
|
46
|
+
*/
|
|
47
|
+
tier?: string | null;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the CreateVolumeRequest interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfCreateVolumeRequest(value: object): value is CreateVolumeRequest {
|
|
54
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function CreateVolumeRequestFromJSON(json: any): CreateVolumeRequest {
|
|
59
|
+
return CreateVolumeRequestFromJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function CreateVolumeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateVolumeRequest {
|
|
63
|
+
if (json == null) {
|
|
64
|
+
return json;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
|
|
68
|
+
'labels': json['labels'] == null ? undefined : json['labels'],
|
|
69
|
+
'name': json['name'],
|
|
70
|
+
'size': json['size'] == null ? undefined : json['size'],
|
|
71
|
+
'tier': json['tier'] == null ? undefined : json['tier'],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function CreateVolumeRequestToJSON(json: any): CreateVolumeRequest {
|
|
76
|
+
return CreateVolumeRequestToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function CreateVolumeRequestToJSONTyped(value?: CreateVolumeRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'labels': value['labels'],
|
|
87
|
+
'name': value['name'],
|
|
88
|
+
'size': value['size'],
|
|
89
|
+
'tier': value['tier'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|