@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/src/apis/SecretsApi.ts
CHANGED
|
@@ -17,6 +17,9 @@ import * as runtime from '../runtime';
|
|
|
17
17
|
import type {
|
|
18
18
|
BulkImportResponse,
|
|
19
19
|
CreateSecretRequest,
|
|
20
|
+
RevealAllSecretsResponse,
|
|
21
|
+
RotateSecretRequest,
|
|
22
|
+
RotateSecretResponse,
|
|
20
23
|
SecretMetadataResponse,
|
|
21
24
|
} from '../models/index';
|
|
22
25
|
import {
|
|
@@ -24,6 +27,12 @@ import {
|
|
|
24
27
|
BulkImportResponseToJSON,
|
|
25
28
|
CreateSecretRequestFromJSON,
|
|
26
29
|
CreateSecretRequestToJSON,
|
|
30
|
+
RevealAllSecretsResponseFromJSON,
|
|
31
|
+
RevealAllSecretsResponseToJSON,
|
|
32
|
+
RotateSecretRequestFromJSON,
|
|
33
|
+
RotateSecretRequestToJSON,
|
|
34
|
+
RotateSecretResponseFromJSON,
|
|
35
|
+
RotateSecretResponseToJSON,
|
|
27
36
|
SecretMetadataResponseFromJSON,
|
|
28
37
|
SecretMetadataResponseToJSON,
|
|
29
38
|
} from '../models/index';
|
|
@@ -57,6 +66,17 @@ export interface ListSecretsRequest {
|
|
|
57
66
|
scope?: string;
|
|
58
67
|
}
|
|
59
68
|
|
|
69
|
+
export interface RevealAllSecretsRequest {
|
|
70
|
+
environment: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface RotateSecretOperationRequest {
|
|
74
|
+
name: string;
|
|
75
|
+
rotateSecretRequest: RotateSecretRequest;
|
|
76
|
+
environment?: string;
|
|
77
|
+
scope?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
60
80
|
/**
|
|
61
81
|
*
|
|
62
82
|
*/
|
|
@@ -379,4 +399,135 @@ export class SecretsApi extends runtime.BaseAPI {
|
|
|
379
399
|
return await response.value();
|
|
380
400
|
}
|
|
381
401
|
|
|
402
|
+
/**
|
|
403
|
+
* Creates request options for revealAllSecrets without sending the request
|
|
404
|
+
*/
|
|
405
|
+
async revealAllSecretsRequestOpts(requestParameters: RevealAllSecretsRequest): Promise<runtime.RequestOpts> {
|
|
406
|
+
if (requestParameters['environment'] == null) {
|
|
407
|
+
throw new runtime.RequiredError(
|
|
408
|
+
'environment',
|
|
409
|
+
'Required parameter "environment" was null or undefined when calling revealAllSecrets().'
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
const queryParameters: any = {};
|
|
414
|
+
|
|
415
|
+
if (requestParameters['environment'] != null) {
|
|
416
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
420
|
+
|
|
421
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
422
|
+
const token = this.configuration.accessToken;
|
|
423
|
+
const tokenString = await token("bearer_auth", []);
|
|
424
|
+
|
|
425
|
+
if (tokenString) {
|
|
426
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
let urlPath = `/api/v1/secrets/reveal-all`;
|
|
431
|
+
|
|
432
|
+
return {
|
|
433
|
+
path: urlPath,
|
|
434
|
+
method: 'GET',
|
|
435
|
+
headers: headerParameters,
|
|
436
|
+
query: queryParameters,
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Used by `zlayer run` to build the child-process env in a single round-trip. # Errors Returns `ApiError::Forbidden` if the caller is not admin, `ApiError::NotFound` if the environment is unknown, and `ApiError::Internal` for storage failures.
|
|
442
|
+
* Reveal every secret in an environment at once (admin only).
|
|
443
|
+
*/
|
|
444
|
+
async revealAllSecretsRaw(requestParameters: RevealAllSecretsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RevealAllSecretsResponse>> {
|
|
445
|
+
const requestOptions = await this.revealAllSecretsRequestOpts(requestParameters);
|
|
446
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
447
|
+
|
|
448
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RevealAllSecretsResponseFromJSON(jsonValue));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Used by `zlayer run` to build the child-process env in a single round-trip. # Errors Returns `ApiError::Forbidden` if the caller is not admin, `ApiError::NotFound` if the environment is unknown, and `ApiError::Internal` for storage failures.
|
|
453
|
+
* Reveal every secret in an environment at once (admin only).
|
|
454
|
+
*/
|
|
455
|
+
async revealAllSecrets(requestParameters: RevealAllSecretsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RevealAllSecretsResponse> {
|
|
456
|
+
const response = await this.revealAllSecretsRaw(requestParameters, initOverrides);
|
|
457
|
+
return await response.value();
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Creates request options for rotateSecret without sending the request
|
|
462
|
+
*/
|
|
463
|
+
async rotateSecretRequestOpts(requestParameters: RotateSecretOperationRequest): Promise<runtime.RequestOpts> {
|
|
464
|
+
if (requestParameters['name'] == null) {
|
|
465
|
+
throw new runtime.RequiredError(
|
|
466
|
+
'name',
|
|
467
|
+
'Required parameter "name" was null or undefined when calling rotateSecret().'
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
if (requestParameters['rotateSecretRequest'] == null) {
|
|
472
|
+
throw new runtime.RequiredError(
|
|
473
|
+
'rotateSecretRequest',
|
|
474
|
+
'Required parameter "rotateSecretRequest" was null or undefined when calling rotateSecret().'
|
|
475
|
+
);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const queryParameters: any = {};
|
|
479
|
+
|
|
480
|
+
if (requestParameters['environment'] != null) {
|
|
481
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
if (requestParameters['scope'] != null) {
|
|
485
|
+
queryParameters['scope'] = requestParameters['scope'];
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
489
|
+
|
|
490
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
491
|
+
|
|
492
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
493
|
+
const token = this.configuration.accessToken;
|
|
494
|
+
const tokenString = await token("bearer_auth", []);
|
|
495
|
+
|
|
496
|
+
if (tokenString) {
|
|
497
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
let urlPath = `/api/v1/secrets/{name}/rotate`;
|
|
502
|
+
urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
|
|
503
|
+
|
|
504
|
+
return {
|
|
505
|
+
path: urlPath,
|
|
506
|
+
method: 'POST',
|
|
507
|
+
headers: headerParameters,
|
|
508
|
+
query: queryParameters,
|
|
509
|
+
body: RotateSecretRequestToJSON(requestParameters['rotateSecretRequest']),
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Admin-only in v1. Mutually exclusive scope query like the other endpoints. # Errors Returns `ApiError::BadRequest` for empty names or conflicting scope params, `ApiError::Forbidden` for non-admin callers, `ApiError::NotFound` when the secret or environment is unknown, and `ApiError::Internal` for storage failures.
|
|
515
|
+
* Rotate a secret — overwrite with a new value and return the version before+after.
|
|
516
|
+
*/
|
|
517
|
+
async rotateSecretRaw(requestParameters: RotateSecretOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RotateSecretResponse>> {
|
|
518
|
+
const requestOptions = await this.rotateSecretRequestOpts(requestParameters);
|
|
519
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
520
|
+
|
|
521
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RotateSecretResponseFromJSON(jsonValue));
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Admin-only in v1. Mutually exclusive scope query like the other endpoints. # Errors Returns `ApiError::BadRequest` for empty names or conflicting scope params, `ApiError::Forbidden` for non-admin callers, `ApiError::NotFound` when the secret or environment is unknown, and `ApiError::Internal` for storage failures.
|
|
526
|
+
* Rotate a secret — overwrite with a new value and return the version before+after.
|
|
527
|
+
*/
|
|
528
|
+
async rotateSecret(requestParameters: RotateSecretOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RotateSecretResponse> {
|
|
529
|
+
const response = await this.rotateSecretRaw(requestParameters, initOverrides);
|
|
530
|
+
return await response.value();
|
|
531
|
+
}
|
|
532
|
+
|
|
382
533
|
}
|
package/src/apis/VolumesApi.ts
CHANGED
|
@@ -15,23 +15,91 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
-
|
|
18
|
+
CreateVolumeRequest,
|
|
19
|
+
VolumeInfo,
|
|
19
20
|
} from '../models/index';
|
|
20
21
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
CreateVolumeRequestFromJSON,
|
|
23
|
+
CreateVolumeRequestToJSON,
|
|
24
|
+
VolumeInfoFromJSON,
|
|
25
|
+
VolumeInfoToJSON,
|
|
23
26
|
} from '../models/index';
|
|
24
27
|
|
|
28
|
+
export interface CreateVolumeOperationRequest {
|
|
29
|
+
createVolumeRequest: CreateVolumeRequest;
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
export interface DeleteVolumeRequest {
|
|
26
33
|
name: string;
|
|
27
34
|
force: boolean;
|
|
28
35
|
}
|
|
29
36
|
|
|
37
|
+
export interface GetVolumeRequest {
|
|
38
|
+
name: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
30
41
|
/**
|
|
31
42
|
*
|
|
32
43
|
*/
|
|
33
44
|
export class VolumesApi extends runtime.BaseAPI {
|
|
34
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Creates request options for createVolume without sending the request
|
|
48
|
+
*/
|
|
49
|
+
async createVolumeRequestOpts(requestParameters: CreateVolumeOperationRequest): Promise<runtime.RequestOpts> {
|
|
50
|
+
if (requestParameters['createVolumeRequest'] == null) {
|
|
51
|
+
throw new runtime.RequiredError(
|
|
52
|
+
'createVolumeRequest',
|
|
53
|
+
'Required parameter "createVolumeRequest" was null or undefined when calling createVolume().'
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const queryParameters: any = {};
|
|
58
|
+
|
|
59
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
60
|
+
|
|
61
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
62
|
+
|
|
63
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
64
|
+
const token = this.configuration.accessToken;
|
|
65
|
+
const tokenString = await token("bearer_auth", []);
|
|
66
|
+
|
|
67
|
+
if (tokenString) {
|
|
68
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let urlPath = `/api/v1/volumes`;
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
path: urlPath,
|
|
76
|
+
method: 'POST',
|
|
77
|
+
headers: headerParameters,
|
|
78
|
+
query: queryParameters,
|
|
79
|
+
body: CreateVolumeRequestToJSON(requestParameters['createVolumeRequest']),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Creates `state.volume_dir/{name}` on disk and writes a `.metadata.json` sidecar capturing labels, size, tier, and the creation timestamp. # Errors - 400 Bad Request — invalid name, size, or tier. - 403 Forbidden — caller lacks the `operator` role. - 409 Conflict — a volume with this name already exists. - 500 Internal — filesystem errors.
|
|
85
|
+
* Create a new named volume.
|
|
86
|
+
*/
|
|
87
|
+
async createVolumeRaw(requestParameters: CreateVolumeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VolumeInfo>> {
|
|
88
|
+
const requestOptions = await this.createVolumeRequestOpts(requestParameters);
|
|
89
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
90
|
+
|
|
91
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VolumeInfoFromJSON(jsonValue));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Creates `state.volume_dir/{name}` on disk and writes a `.metadata.json` sidecar capturing labels, size, tier, and the creation timestamp. # Errors - 400 Bad Request — invalid name, size, or tier. - 403 Forbidden — caller lacks the `operator` role. - 409 Conflict — a volume with this name already exists. - 500 Internal — filesystem errors.
|
|
96
|
+
* Create a new named volume.
|
|
97
|
+
*/
|
|
98
|
+
async createVolume(requestParameters: CreateVolumeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VolumeInfo> {
|
|
99
|
+
const response = await this.createVolumeRaw(requestParameters, initOverrides);
|
|
100
|
+
return await response.value();
|
|
101
|
+
}
|
|
102
|
+
|
|
35
103
|
/**
|
|
36
104
|
* Creates request options for deleteVolume without sending the request
|
|
37
105
|
*/
|
|
@@ -79,7 +147,7 @@ export class VolumesApi extends runtime.BaseAPI {
|
|
|
79
147
|
}
|
|
80
148
|
|
|
81
149
|
/**
|
|
82
|
-
*
|
|
150
|
+
* By default, refuses to remove a volume that is non-empty OR that any container currently reports mounting. `?force=true` overrides both checks. # Errors - 404 Not Found — no such volume. - 409 Conflict — non-empty or in-use without `?force=true`. - 403 Forbidden — caller lacks the `operator` role.
|
|
83
151
|
* Delete a volume by name.
|
|
84
152
|
*/
|
|
85
153
|
async deleteVolumeRaw(requestParameters: DeleteVolumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -90,13 +158,68 @@ export class VolumesApi extends runtime.BaseAPI {
|
|
|
90
158
|
}
|
|
91
159
|
|
|
92
160
|
/**
|
|
93
|
-
*
|
|
161
|
+
* By default, refuses to remove a volume that is non-empty OR that any container currently reports mounting. `?force=true` overrides both checks. # Errors - 404 Not Found — no such volume. - 409 Conflict — non-empty or in-use without `?force=true`. - 403 Forbidden — caller lacks the `operator` role.
|
|
94
162
|
* Delete a volume by name.
|
|
95
163
|
*/
|
|
96
164
|
async deleteVolume(requestParameters: DeleteVolumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
97
165
|
await this.deleteVolumeRaw(requestParameters, initOverrides);
|
|
98
166
|
}
|
|
99
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Creates request options for getVolume without sending the request
|
|
170
|
+
*/
|
|
171
|
+
async getVolumeRequestOpts(requestParameters: GetVolumeRequest): Promise<runtime.RequestOpts> {
|
|
172
|
+
if (requestParameters['name'] == null) {
|
|
173
|
+
throw new runtime.RequiredError(
|
|
174
|
+
'name',
|
|
175
|
+
'Required parameter "name" was null or undefined when calling getVolume().'
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const queryParameters: any = {};
|
|
180
|
+
|
|
181
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
182
|
+
|
|
183
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
184
|
+
const token = this.configuration.accessToken;
|
|
185
|
+
const tokenString = await token("bearer_auth", []);
|
|
186
|
+
|
|
187
|
+
if (tokenString) {
|
|
188
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
let urlPath = `/api/v1/volumes/{name}`;
|
|
193
|
+
urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
|
|
194
|
+
|
|
195
|
+
return {
|
|
196
|
+
path: urlPath,
|
|
197
|
+
method: 'GET',
|
|
198
|
+
headers: headerParameters,
|
|
199
|
+
query: queryParameters,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Reads the sidecar when present, synthesizes defaults for legacy volumes, and populates `in_use_by` when a [`VolumeUsageSource`] is wired. # Errors - 404 Not Found — no such volume. - 500 Internal — filesystem or parse errors.
|
|
205
|
+
* Inspect a single volume by name.
|
|
206
|
+
*/
|
|
207
|
+
async getVolumeRaw(requestParameters: GetVolumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VolumeInfo>> {
|
|
208
|
+
const requestOptions = await this.getVolumeRequestOpts(requestParameters);
|
|
209
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
210
|
+
|
|
211
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VolumeInfoFromJSON(jsonValue));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Reads the sidecar when present, synthesizes defaults for legacy volumes, and populates `in_use_by` when a [`VolumeUsageSource`] is wired. # Errors - 404 Not Found — no such volume. - 500 Internal — filesystem or parse errors.
|
|
216
|
+
* Inspect a single volume by name.
|
|
217
|
+
*/
|
|
218
|
+
async getVolume(requestParameters: GetVolumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VolumeInfo> {
|
|
219
|
+
const response = await this.getVolumeRaw(requestParameters, initOverrides);
|
|
220
|
+
return await response.value();
|
|
221
|
+
}
|
|
222
|
+
|
|
100
223
|
/**
|
|
101
224
|
* Creates request options for listVolumes without sending the request
|
|
102
225
|
*/
|
|
@@ -125,21 +248,21 @@ export class VolumesApi extends runtime.BaseAPI {
|
|
|
125
248
|
}
|
|
126
249
|
|
|
127
250
|
/**
|
|
128
|
-
* Enumerates subdirectories under the volume base directory and returns
|
|
251
|
+
* Enumerates subdirectories under the volume base directory, reads each sidecar when present, and returns a [`VolumeInfo`] for each entry (including `in_use_by` when a [`VolumeUsageSource`] is wired). # Errors Returns an error if the volume directory cannot be read.
|
|
129
252
|
* List all volumes on disk.
|
|
130
253
|
*/
|
|
131
|
-
async listVolumesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<
|
|
254
|
+
async listVolumesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<VolumeInfo>>> {
|
|
132
255
|
const requestOptions = await this.listVolumesRequestOpts();
|
|
133
256
|
const response = await this.request(requestOptions, initOverrides);
|
|
134
257
|
|
|
135
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(
|
|
258
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(VolumeInfoFromJSON));
|
|
136
259
|
}
|
|
137
260
|
|
|
138
261
|
/**
|
|
139
|
-
* Enumerates subdirectories under the volume base directory and returns
|
|
262
|
+
* Enumerates subdirectories under the volume base directory, reads each sidecar when present, and returns a [`VolumeInfo`] for each entry (including `in_use_by` when a [`VolumeUsageSource`] is wired). # Errors Returns an error if the volume directory cannot be read.
|
|
140
263
|
* List all volumes on disk.
|
|
141
264
|
*/
|
|
142
|
-
async listVolumes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<
|
|
265
|
+
async listVolumes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<VolumeInfo>> {
|
|
143
266
|
const response = await this.listVolumesRaw(initOverrides);
|
|
144
267
|
return await response.value();
|
|
145
268
|
}
|
package/src/apis/index.ts
CHANGED
|
@@ -4,11 +4,13 @@ export * from './AuditApi';
|
|
|
4
4
|
export * from './AuthenticationApi';
|
|
5
5
|
export * from './BuildApi';
|
|
6
6
|
export * from './ClusterApi';
|
|
7
|
+
export * from './ContainerNetworksApi';
|
|
7
8
|
export * from './ContainersApi';
|
|
8
9
|
export * from './CredentialsApi';
|
|
9
10
|
export * from './CronApi';
|
|
10
11
|
export * from './DeploymentsApi';
|
|
11
12
|
export * from './EnvironmentsApi';
|
|
13
|
+
export * from './EventsApi';
|
|
12
14
|
export * from './GroupsApi';
|
|
13
15
|
export * from './HealthApi';
|
|
14
16
|
export * from './ImagesApi';
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
* A user-defined bridge or overlay network that containers can attach to.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface BridgeNetwork
|
|
28
|
+
*/
|
|
29
|
+
export interface BridgeNetwork {
|
|
30
|
+
/**
|
|
31
|
+
* Creation timestamp (UTC, RFC 3339).
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof BridgeNetwork
|
|
34
|
+
*/
|
|
35
|
+
createdAt: Date;
|
|
36
|
+
/**
|
|
37
|
+
* Driver backing the network (bridge vs. overlay).
|
|
38
|
+
* @type {BridgeNetworkDriver}
|
|
39
|
+
* @memberof BridgeNetwork
|
|
40
|
+
*/
|
|
41
|
+
driver?: BridgeNetworkDriver;
|
|
42
|
+
/**
|
|
43
|
+
* Opaque server-generated identifier (UUID v4).
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof BridgeNetwork
|
|
46
|
+
*/
|
|
47
|
+
id: string;
|
|
48
|
+
/**
|
|
49
|
+
* If true, containers attached to this network cannot reach the outside
|
|
50
|
+
* world — only other containers on the same network.
|
|
51
|
+
* @type {boolean}
|
|
52
|
+
* @memberof BridgeNetwork
|
|
53
|
+
*/
|
|
54
|
+
internal?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Arbitrary key/value labels for filtering and grouping.
|
|
57
|
+
* @type {{ [key: string]: string; }}
|
|
58
|
+
* @memberof BridgeNetwork
|
|
59
|
+
*/
|
|
60
|
+
labels?: { [key: string]: string; };
|
|
61
|
+
/**
|
|
62
|
+
* Human-readable, unique name (must match `^[a-z0-9][a-z0-9_-]{0,63}$`).
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof BridgeNetwork
|
|
65
|
+
*/
|
|
66
|
+
name: string;
|
|
67
|
+
/**
|
|
68
|
+
* IPv4/IPv6 subnet in CIDR notation (e.g. `"10.240.0.0/24"`).
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof BridgeNetwork
|
|
71
|
+
*/
|
|
72
|
+
subnet?: string | null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Check if a given object implements the BridgeNetwork interface.
|
|
79
|
+
*/
|
|
80
|
+
export function instanceOfBridgeNetwork(value: object): value is BridgeNetwork {
|
|
81
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
82
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
83
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function BridgeNetworkFromJSON(json: any): BridgeNetwork {
|
|
88
|
+
return BridgeNetworkFromJSONTyped(json, false);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function BridgeNetworkFromJSONTyped(json: any, ignoreDiscriminator: boolean): BridgeNetwork {
|
|
92
|
+
if (json == null) {
|
|
93
|
+
return json;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'createdAt': (new Date(json['created_at'])),
|
|
98
|
+
'driver': json['driver'] == null ? undefined : BridgeNetworkDriverFromJSON(json['driver']),
|
|
99
|
+
'id': json['id'],
|
|
100
|
+
'internal': json['internal'] == null ? undefined : json['internal'],
|
|
101
|
+
'labels': json['labels'] == null ? undefined : json['labels'],
|
|
102
|
+
'name': json['name'],
|
|
103
|
+
'subnet': json['subnet'] == null ? undefined : json['subnet'],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function BridgeNetworkToJSON(json: any): BridgeNetwork {
|
|
108
|
+
return BridgeNetworkToJSONTyped(json, false);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function BridgeNetworkToJSONTyped(value?: BridgeNetwork | null, ignoreDiscriminator: boolean = false): any {
|
|
112
|
+
if (value == null) {
|
|
113
|
+
return value;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
|
|
118
|
+
'created_at': value['createdAt'].toISOString(),
|
|
119
|
+
'driver': BridgeNetworkDriverToJSON(value['driver']),
|
|
120
|
+
'id': value['id'],
|
|
121
|
+
'internal': value['internal'],
|
|
122
|
+
'labels': value['labels'],
|
|
123
|
+
'name': value['name'],
|
|
124
|
+
'subnet': value['subnet'],
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
* A container attached to a [`BridgeNetwork`].
|
|
18
|
+
* @export
|
|
19
|
+
* @interface BridgeNetworkAttachment
|
|
20
|
+
*/
|
|
21
|
+
export interface BridgeNetworkAttachment {
|
|
22
|
+
/**
|
|
23
|
+
* DNS aliases the container can be reached by on this network.
|
|
24
|
+
* @type {Array<string>}
|
|
25
|
+
* @memberof BridgeNetworkAttachment
|
|
26
|
+
*/
|
|
27
|
+
aliases?: Array<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Runtime-provided container id.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof BridgeNetworkAttachment
|
|
32
|
+
*/
|
|
33
|
+
containerId: string;
|
|
34
|
+
/**
|
|
35
|
+
* Container name, if known.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof BridgeNetworkAttachment
|
|
38
|
+
*/
|
|
39
|
+
containerName?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Assigned IPv4 address on the network (if any).
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof BridgeNetworkAttachment
|
|
44
|
+
*/
|
|
45
|
+
ipv4?: string | null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the BridgeNetworkAttachment interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfBridgeNetworkAttachment(value: object): value is BridgeNetworkAttachment {
|
|
52
|
+
if (!('containerId' in value) || value['containerId'] === undefined) return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function BridgeNetworkAttachmentFromJSON(json: any): BridgeNetworkAttachment {
|
|
57
|
+
return BridgeNetworkAttachmentFromJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function BridgeNetworkAttachmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): BridgeNetworkAttachment {
|
|
61
|
+
if (json == null) {
|
|
62
|
+
return json;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
|
|
66
|
+
'aliases': json['aliases'] == null ? undefined : json['aliases'],
|
|
67
|
+
'containerId': json['container_id'],
|
|
68
|
+
'containerName': json['container_name'] == null ? undefined : json['container_name'],
|
|
69
|
+
'ipv4': json['ipv4'] == null ? undefined : json['ipv4'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function BridgeNetworkAttachmentToJSON(json: any): BridgeNetworkAttachment {
|
|
74
|
+
return BridgeNetworkAttachmentToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function BridgeNetworkAttachmentToJSONTyped(value?: BridgeNetworkAttachment | null, ignoreDiscriminator: boolean = false): any {
|
|
78
|
+
if (value == null) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'aliases': value['aliases'],
|
|
85
|
+
'container_id': value['containerId'],
|
|
86
|
+
'container_name': value['containerName'],
|
|
87
|
+
'ipv4': value['ipv4'],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|