@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,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* ZLayer API
|
|
6
|
+
* Container orchestration API for ZLayer
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.EventsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
class EventsApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Creates request options for streamEvents without sending the request
|
|
33
|
+
*/
|
|
34
|
+
streamEventsRequestOpts(requestParameters) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const queryParameters = {};
|
|
37
|
+
if (requestParameters['follow'] != null) {
|
|
38
|
+
queryParameters['follow'] = requestParameters['follow'];
|
|
39
|
+
}
|
|
40
|
+
if (requestParameters['label'] != null) {
|
|
41
|
+
queryParameters['label'] = requestParameters['label'];
|
|
42
|
+
}
|
|
43
|
+
const headerParameters = {};
|
|
44
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
45
|
+
const token = this.configuration.accessToken;
|
|
46
|
+
const tokenString = yield token("bearer_auth", []);
|
|
47
|
+
if (tokenString) {
|
|
48
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
let urlPath = `/api/v1/events`;
|
|
52
|
+
return {
|
|
53
|
+
path: urlPath,
|
|
54
|
+
method: 'GET',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* # Errors Returns `400` if a `label` query parameter is malformed, `401` if the caller is not authenticated.
|
|
62
|
+
* Stream container lifecycle events as Server-Sent Events.
|
|
63
|
+
*/
|
|
64
|
+
streamEventsRaw(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const requestOptions = yield this.streamEventsRequestOpts(requestParameters);
|
|
67
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
68
|
+
return new runtime.VoidApiResponse(response);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* # Errors Returns `400` if a `label` query parameter is malformed, `401` if the caller is not authenticated.
|
|
73
|
+
* Stream container lifecycle events as Server-Sent Events.
|
|
74
|
+
*/
|
|
75
|
+
streamEvents() {
|
|
76
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
77
|
+
yield this.streamEventsRaw(requestParameters, initOverrides);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.EventsApi = EventsApi;
|
|
@@ -18,6 +18,10 @@ export interface ListPermissionsRequest {
|
|
|
18
18
|
user?: string | null;
|
|
19
19
|
group?: string | null;
|
|
20
20
|
}
|
|
21
|
+
export interface ListPermissionsByResourceRequest {
|
|
22
|
+
kind: string;
|
|
23
|
+
id?: string | null;
|
|
24
|
+
}
|
|
21
25
|
export interface RevokePermissionRequest {
|
|
22
26
|
id: string;
|
|
23
27
|
}
|
|
@@ -53,6 +57,20 @@ export declare class PermissionsApi extends runtime.BaseAPI {
|
|
|
53
57
|
* List permissions for a subject (user or group).
|
|
54
58
|
*/
|
|
55
59
|
listPermissions(requestParameters?: ListPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StoredPermission>>;
|
|
60
|
+
/**
|
|
61
|
+
* Creates request options for listPermissionsByResource without sending the request
|
|
62
|
+
*/
|
|
63
|
+
listPermissionsByResourceRequestOpts(requestParameters: ListPermissionsByResourceRequest): Promise<runtime.RequestOpts>;
|
|
64
|
+
/**
|
|
65
|
+
* When `id` is supplied, returns exact-resource grants; when omitted, returns wildcard grants for the given `kind`. # Errors Returns [`ApiError::Internal`] on store failure.
|
|
66
|
+
* List permissions granted on a specific resource.
|
|
67
|
+
*/
|
|
68
|
+
listPermissionsByResourceRaw(requestParameters: ListPermissionsByResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StoredPermission>>>;
|
|
69
|
+
/**
|
|
70
|
+
* When `id` is supplied, returns exact-resource grants; when omitted, returns wildcard grants for the given `kind`. # Errors Returns [`ApiError::Internal`] on store failure.
|
|
71
|
+
* List permissions granted on a specific resource.
|
|
72
|
+
*/
|
|
73
|
+
listPermissionsByResource(requestParameters: ListPermissionsByResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StoredPermission>>;
|
|
56
74
|
/**
|
|
57
75
|
* Creates request options for revokePermission without sending the request
|
|
58
76
|
*/
|
|
@@ -114,6 +114,52 @@ class PermissionsApi extends runtime.BaseAPI {
|
|
|
114
114
|
return yield response.value();
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Creates request options for listPermissionsByResource without sending the request
|
|
119
|
+
*/
|
|
120
|
+
listPermissionsByResourceRequestOpts(requestParameters) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
if (requestParameters['kind'] == null) {
|
|
123
|
+
throw new runtime.RequiredError('kind', 'Required parameter "kind" was null or undefined when calling listPermissionsByResource().');
|
|
124
|
+
}
|
|
125
|
+
const queryParameters = {};
|
|
126
|
+
if (requestParameters['kind'] != null) {
|
|
127
|
+
queryParameters['kind'] = requestParameters['kind'];
|
|
128
|
+
}
|
|
129
|
+
if (requestParameters['id'] != null) {
|
|
130
|
+
queryParameters['id'] = requestParameters['id'];
|
|
131
|
+
}
|
|
132
|
+
const headerParameters = {};
|
|
133
|
+
let urlPath = `/api/v1/permissions/by-resource`;
|
|
134
|
+
return {
|
|
135
|
+
path: urlPath,
|
|
136
|
+
method: 'GET',
|
|
137
|
+
headers: headerParameters,
|
|
138
|
+
query: queryParameters,
|
|
139
|
+
};
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* When `id` is supplied, returns exact-resource grants; when omitted, returns wildcard grants for the given `kind`. # Errors Returns [`ApiError::Internal`] on store failure.
|
|
144
|
+
* List permissions granted on a specific resource.
|
|
145
|
+
*/
|
|
146
|
+
listPermissionsByResourceRaw(requestParameters, initOverrides) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
const requestOptions = yield this.listPermissionsByResourceRequestOpts(requestParameters);
|
|
149
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
150
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.StoredPermissionFromJSON));
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* When `id` is supplied, returns exact-resource grants; when omitted, returns wildcard grants for the given `kind`. # Errors Returns [`ApiError::Internal`] on store failure.
|
|
155
|
+
* List permissions granted on a specific resource.
|
|
156
|
+
*/
|
|
157
|
+
listPermissionsByResource(requestParameters, initOverrides) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const response = yield this.listPermissionsByResourceRaw(requestParameters, initOverrides);
|
|
160
|
+
return yield response.value();
|
|
161
|
+
});
|
|
162
|
+
}
|
|
117
163
|
/**
|
|
118
164
|
* Creates request options for revokePermission without sending the request
|
|
119
165
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BulkImportResponse, CreateSecretRequest, SecretMetadataResponse } from '../models/index';
|
|
13
|
+
import type { BulkImportResponse, CreateSecretRequest, RevealAllSecretsResponse, RotateSecretRequest, RotateSecretResponse, SecretMetadataResponse } from '../models/index';
|
|
14
14
|
export interface BulkImportSecretsRequest {
|
|
15
15
|
environment: string;
|
|
16
16
|
body: string;
|
|
@@ -35,6 +35,15 @@ export interface ListSecretsRequest {
|
|
|
35
35
|
environment?: string;
|
|
36
36
|
scope?: string;
|
|
37
37
|
}
|
|
38
|
+
export interface RevealAllSecretsRequest {
|
|
39
|
+
environment: string;
|
|
40
|
+
}
|
|
41
|
+
export interface RotateSecretOperationRequest {
|
|
42
|
+
name: string;
|
|
43
|
+
rotateSecretRequest: RotateSecretRequest;
|
|
44
|
+
environment?: string;
|
|
45
|
+
scope?: string;
|
|
46
|
+
}
|
|
38
47
|
/**
|
|
39
48
|
*
|
|
40
49
|
*/
|
|
@@ -109,4 +118,32 @@ export declare class SecretsApi extends runtime.BaseAPI {
|
|
|
109
118
|
* List secrets in a scope.
|
|
110
119
|
*/
|
|
111
120
|
listSecrets(requestParameters?: ListSecretsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SecretMetadataResponse>>;
|
|
121
|
+
/**
|
|
122
|
+
* Creates request options for revealAllSecrets without sending the request
|
|
123
|
+
*/
|
|
124
|
+
revealAllSecretsRequestOpts(requestParameters: RevealAllSecretsRequest): Promise<runtime.RequestOpts>;
|
|
125
|
+
/**
|
|
126
|
+
* 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.
|
|
127
|
+
* Reveal every secret in an environment at once (admin only).
|
|
128
|
+
*/
|
|
129
|
+
revealAllSecretsRaw(requestParameters: RevealAllSecretsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RevealAllSecretsResponse>>;
|
|
130
|
+
/**
|
|
131
|
+
* 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.
|
|
132
|
+
* Reveal every secret in an environment at once (admin only).
|
|
133
|
+
*/
|
|
134
|
+
revealAllSecrets(requestParameters: RevealAllSecretsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RevealAllSecretsResponse>;
|
|
135
|
+
/**
|
|
136
|
+
* Creates request options for rotateSecret without sending the request
|
|
137
|
+
*/
|
|
138
|
+
rotateSecretRequestOpts(requestParameters: RotateSecretOperationRequest): Promise<runtime.RequestOpts>;
|
|
139
|
+
/**
|
|
140
|
+
* 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.
|
|
141
|
+
* Rotate a secret — overwrite with a new value and return the version before+after.
|
|
142
|
+
*/
|
|
143
|
+
rotateSecretRaw(requestParameters: RotateSecretOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RotateSecretResponse>>;
|
|
144
|
+
/**
|
|
145
|
+
* 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.
|
|
146
|
+
* Rotate a secret — overwrite with a new value and return the version before+after.
|
|
147
|
+
*/
|
|
148
|
+
rotateSecret(requestParameters: RotateSecretOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RotateSecretResponse>;
|
|
112
149
|
}
|
package/dist/apis/SecretsApi.js
CHANGED
|
@@ -299,5 +299,114 @@ class SecretsApi extends runtime.BaseAPI {
|
|
|
299
299
|
return yield response.value();
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* Creates request options for revealAllSecrets without sending the request
|
|
304
|
+
*/
|
|
305
|
+
revealAllSecretsRequestOpts(requestParameters) {
|
|
306
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
+
if (requestParameters['environment'] == null) {
|
|
308
|
+
throw new runtime.RequiredError('environment', 'Required parameter "environment" was null or undefined when calling revealAllSecrets().');
|
|
309
|
+
}
|
|
310
|
+
const queryParameters = {};
|
|
311
|
+
if (requestParameters['environment'] != null) {
|
|
312
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
313
|
+
}
|
|
314
|
+
const headerParameters = {};
|
|
315
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
316
|
+
const token = this.configuration.accessToken;
|
|
317
|
+
const tokenString = yield token("bearer_auth", []);
|
|
318
|
+
if (tokenString) {
|
|
319
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
let urlPath = `/api/v1/secrets/reveal-all`;
|
|
323
|
+
return {
|
|
324
|
+
path: urlPath,
|
|
325
|
+
method: 'GET',
|
|
326
|
+
headers: headerParameters,
|
|
327
|
+
query: queryParameters,
|
|
328
|
+
};
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* 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.
|
|
333
|
+
* Reveal every secret in an environment at once (admin only).
|
|
334
|
+
*/
|
|
335
|
+
revealAllSecretsRaw(requestParameters, initOverrides) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
337
|
+
const requestOptions = yield this.revealAllSecretsRequestOpts(requestParameters);
|
|
338
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
339
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RevealAllSecretsResponseFromJSON)(jsonValue));
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* 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.
|
|
344
|
+
* Reveal every secret in an environment at once (admin only).
|
|
345
|
+
*/
|
|
346
|
+
revealAllSecrets(requestParameters, initOverrides) {
|
|
347
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
348
|
+
const response = yield this.revealAllSecretsRaw(requestParameters, initOverrides);
|
|
349
|
+
return yield response.value();
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Creates request options for rotateSecret without sending the request
|
|
354
|
+
*/
|
|
355
|
+
rotateSecretRequestOpts(requestParameters) {
|
|
356
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
357
|
+
if (requestParameters['name'] == null) {
|
|
358
|
+
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling rotateSecret().');
|
|
359
|
+
}
|
|
360
|
+
if (requestParameters['rotateSecretRequest'] == null) {
|
|
361
|
+
throw new runtime.RequiredError('rotateSecretRequest', 'Required parameter "rotateSecretRequest" was null or undefined when calling rotateSecret().');
|
|
362
|
+
}
|
|
363
|
+
const queryParameters = {};
|
|
364
|
+
if (requestParameters['environment'] != null) {
|
|
365
|
+
queryParameters['environment'] = requestParameters['environment'];
|
|
366
|
+
}
|
|
367
|
+
if (requestParameters['scope'] != null) {
|
|
368
|
+
queryParameters['scope'] = requestParameters['scope'];
|
|
369
|
+
}
|
|
370
|
+
const headerParameters = {};
|
|
371
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
372
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
373
|
+
const token = this.configuration.accessToken;
|
|
374
|
+
const tokenString = yield token("bearer_auth", []);
|
|
375
|
+
if (tokenString) {
|
|
376
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
let urlPath = `/api/v1/secrets/{name}/rotate`;
|
|
380
|
+
urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
|
|
381
|
+
return {
|
|
382
|
+
path: urlPath,
|
|
383
|
+
method: 'POST',
|
|
384
|
+
headers: headerParameters,
|
|
385
|
+
query: queryParameters,
|
|
386
|
+
body: (0, index_1.RotateSecretRequestToJSON)(requestParameters['rotateSecretRequest']),
|
|
387
|
+
};
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* 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.
|
|
392
|
+
* Rotate a secret — overwrite with a new value and return the version before+after.
|
|
393
|
+
*/
|
|
394
|
+
rotateSecretRaw(requestParameters, initOverrides) {
|
|
395
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
396
|
+
const requestOptions = yield this.rotateSecretRequestOpts(requestParameters);
|
|
397
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
398
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RotateSecretResponseFromJSON)(jsonValue));
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* 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.
|
|
403
|
+
* Rotate a secret — overwrite with a new value and return the version before+after.
|
|
404
|
+
*/
|
|
405
|
+
rotateSecret(requestParameters, initOverrides) {
|
|
406
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
407
|
+
const response = yield this.rotateSecretRaw(requestParameters, initOverrides);
|
|
408
|
+
return yield response.value();
|
|
409
|
+
});
|
|
410
|
+
}
|
|
302
411
|
}
|
|
303
412
|
exports.SecretsApi = SecretsApi;
|
|
@@ -10,41 +10,75 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
13
|
+
import type { CreateVolumeRequest, VolumeInfo } from '../models/index';
|
|
14
|
+
export interface CreateVolumeOperationRequest {
|
|
15
|
+
createVolumeRequest: CreateVolumeRequest;
|
|
16
|
+
}
|
|
14
17
|
export interface DeleteVolumeRequest {
|
|
15
18
|
name: string;
|
|
16
19
|
force: boolean;
|
|
17
20
|
}
|
|
21
|
+
export interface GetVolumeRequest {
|
|
22
|
+
name: string;
|
|
23
|
+
}
|
|
18
24
|
/**
|
|
19
25
|
*
|
|
20
26
|
*/
|
|
21
27
|
export declare class VolumesApi extends runtime.BaseAPI {
|
|
28
|
+
/**
|
|
29
|
+
* Creates request options for createVolume without sending the request
|
|
30
|
+
*/
|
|
31
|
+
createVolumeRequestOpts(requestParameters: CreateVolumeOperationRequest): Promise<runtime.RequestOpts>;
|
|
32
|
+
/**
|
|
33
|
+
* 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.
|
|
34
|
+
* Create a new named volume.
|
|
35
|
+
*/
|
|
36
|
+
createVolumeRaw(requestParameters: CreateVolumeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VolumeInfo>>;
|
|
37
|
+
/**
|
|
38
|
+
* 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.
|
|
39
|
+
* Create a new named volume.
|
|
40
|
+
*/
|
|
41
|
+
createVolume(requestParameters: CreateVolumeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VolumeInfo>;
|
|
22
42
|
/**
|
|
23
43
|
* Creates request options for deleteVolume without sending the request
|
|
24
44
|
*/
|
|
25
45
|
deleteVolumeRequestOpts(requestParameters: DeleteVolumeRequest): Promise<runtime.RequestOpts>;
|
|
26
46
|
/**
|
|
27
|
-
*
|
|
47
|
+
* 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.
|
|
28
48
|
* Delete a volume by name.
|
|
29
49
|
*/
|
|
30
50
|
deleteVolumeRaw(requestParameters: DeleteVolumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
31
51
|
/**
|
|
32
|
-
*
|
|
52
|
+
* 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.
|
|
33
53
|
* Delete a volume by name.
|
|
34
54
|
*/
|
|
35
55
|
deleteVolume(requestParameters: DeleteVolumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Creates request options for getVolume without sending the request
|
|
58
|
+
*/
|
|
59
|
+
getVolumeRequestOpts(requestParameters: GetVolumeRequest): Promise<runtime.RequestOpts>;
|
|
60
|
+
/**
|
|
61
|
+
* 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.
|
|
62
|
+
* Inspect a single volume by name.
|
|
63
|
+
*/
|
|
64
|
+
getVolumeRaw(requestParameters: GetVolumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VolumeInfo>>;
|
|
65
|
+
/**
|
|
66
|
+
* 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.
|
|
67
|
+
* Inspect a single volume by name.
|
|
68
|
+
*/
|
|
69
|
+
getVolume(requestParameters: GetVolumeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VolumeInfo>;
|
|
36
70
|
/**
|
|
37
71
|
* Creates request options for listVolumes without sending the request
|
|
38
72
|
*/
|
|
39
73
|
listVolumesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
40
74
|
/**
|
|
41
|
-
* Enumerates subdirectories under the volume base directory and returns
|
|
75
|
+
* 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.
|
|
42
76
|
* List all volumes on disk.
|
|
43
77
|
*/
|
|
44
|
-
listVolumesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<
|
|
78
|
+
listVolumesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<VolumeInfo>>>;
|
|
45
79
|
/**
|
|
46
|
-
* Enumerates subdirectories under the volume base directory and returns
|
|
80
|
+
* 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.
|
|
47
81
|
* List all volumes on disk.
|
|
48
82
|
*/
|
|
49
|
-
listVolumes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<
|
|
83
|
+
listVolumes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<VolumeInfo>>;
|
|
50
84
|
}
|
package/dist/apis/VolumesApi.js
CHANGED
|
@@ -29,6 +29,55 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class VolumesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates request options for createVolume without sending the request
|
|
34
|
+
*/
|
|
35
|
+
createVolumeRequestOpts(requestParameters) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['createVolumeRequest'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('createVolumeRequest', 'Required parameter "createVolumeRequest" was null or undefined when calling createVolume().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44
|
+
const token = this.configuration.accessToken;
|
|
45
|
+
const tokenString = yield token("bearer_auth", []);
|
|
46
|
+
if (tokenString) {
|
|
47
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
let urlPath = `/api/v1/volumes`;
|
|
51
|
+
return {
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
body: (0, index_1.CreateVolumeRequestToJSON)(requestParameters['createVolumeRequest']),
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 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.
|
|
62
|
+
* Create a new named volume.
|
|
63
|
+
*/
|
|
64
|
+
createVolumeRaw(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const requestOptions = yield this.createVolumeRequestOpts(requestParameters);
|
|
67
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
68
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.VolumeInfoFromJSON)(jsonValue));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 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.
|
|
73
|
+
* Create a new named volume.
|
|
74
|
+
*/
|
|
75
|
+
createVolume(requestParameters, initOverrides) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const response = yield this.createVolumeRaw(requestParameters, initOverrides);
|
|
78
|
+
return yield response.value();
|
|
79
|
+
});
|
|
80
|
+
}
|
|
32
81
|
/**
|
|
33
82
|
* Creates request options for deleteVolume without sending the request
|
|
34
83
|
*/
|
|
@@ -63,7 +112,7 @@ class VolumesApi extends runtime.BaseAPI {
|
|
|
63
112
|
});
|
|
64
113
|
}
|
|
65
114
|
/**
|
|
66
|
-
*
|
|
115
|
+
* 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.
|
|
67
116
|
* Delete a volume by name.
|
|
68
117
|
*/
|
|
69
118
|
deleteVolumeRaw(requestParameters, initOverrides) {
|
|
@@ -74,7 +123,7 @@ class VolumesApi extends runtime.BaseAPI {
|
|
|
74
123
|
});
|
|
75
124
|
}
|
|
76
125
|
/**
|
|
77
|
-
*
|
|
126
|
+
* 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.
|
|
78
127
|
* Delete a volume by name.
|
|
79
128
|
*/
|
|
80
129
|
deleteVolume(requestParameters, initOverrides) {
|
|
@@ -82,6 +131,54 @@ class VolumesApi extends runtime.BaseAPI {
|
|
|
82
131
|
yield this.deleteVolumeRaw(requestParameters, initOverrides);
|
|
83
132
|
});
|
|
84
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Creates request options for getVolume without sending the request
|
|
136
|
+
*/
|
|
137
|
+
getVolumeRequestOpts(requestParameters) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
if (requestParameters['name'] == null) {
|
|
140
|
+
throw new runtime.RequiredError('name', 'Required parameter "name" was null or undefined when calling getVolume().');
|
|
141
|
+
}
|
|
142
|
+
const queryParameters = {};
|
|
143
|
+
const headerParameters = {};
|
|
144
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
145
|
+
const token = this.configuration.accessToken;
|
|
146
|
+
const tokenString = yield token("bearer_auth", []);
|
|
147
|
+
if (tokenString) {
|
|
148
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
let urlPath = `/api/v1/volumes/{name}`;
|
|
152
|
+
urlPath = urlPath.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters['name'])));
|
|
153
|
+
return {
|
|
154
|
+
path: urlPath,
|
|
155
|
+
method: 'GET',
|
|
156
|
+
headers: headerParameters,
|
|
157
|
+
query: queryParameters,
|
|
158
|
+
};
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* 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.
|
|
163
|
+
* Inspect a single volume by name.
|
|
164
|
+
*/
|
|
165
|
+
getVolumeRaw(requestParameters, initOverrides) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
const requestOptions = yield this.getVolumeRequestOpts(requestParameters);
|
|
168
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
169
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.VolumeInfoFromJSON)(jsonValue));
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* 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.
|
|
174
|
+
* Inspect a single volume by name.
|
|
175
|
+
*/
|
|
176
|
+
getVolume(requestParameters, initOverrides) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
const response = yield this.getVolumeRaw(requestParameters, initOverrides);
|
|
179
|
+
return yield response.value();
|
|
180
|
+
});
|
|
181
|
+
}
|
|
85
182
|
/**
|
|
86
183
|
* Creates request options for listVolumes without sending the request
|
|
87
184
|
*/
|
|
@@ -106,18 +203,18 @@ class VolumesApi extends runtime.BaseAPI {
|
|
|
106
203
|
});
|
|
107
204
|
}
|
|
108
205
|
/**
|
|
109
|
-
* Enumerates subdirectories under the volume base directory and returns
|
|
206
|
+
* 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.
|
|
110
207
|
* List all volumes on disk.
|
|
111
208
|
*/
|
|
112
209
|
listVolumesRaw(initOverrides) {
|
|
113
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
211
|
const requestOptions = yield this.listVolumesRequestOpts();
|
|
115
212
|
const response = yield this.request(requestOptions, initOverrides);
|
|
116
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.
|
|
213
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.VolumeInfoFromJSON));
|
|
117
214
|
});
|
|
118
215
|
}
|
|
119
216
|
/**
|
|
120
|
-
* Enumerates subdirectories under the volume base directory and returns
|
|
217
|
+
* 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.
|
|
121
218
|
* List all volumes on disk.
|
|
122
219
|
*/
|
|
123
220
|
listVolumes(initOverrides) {
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -2,11 +2,13 @@ export * from './AuditApi';
|
|
|
2
2
|
export * from './AuthenticationApi';
|
|
3
3
|
export * from './BuildApi';
|
|
4
4
|
export * from './ClusterApi';
|
|
5
|
+
export * from './ContainerNetworksApi';
|
|
5
6
|
export * from './ContainersApi';
|
|
6
7
|
export * from './CredentialsApi';
|
|
7
8
|
export * from './CronApi';
|
|
8
9
|
export * from './DeploymentsApi';
|
|
9
10
|
export * from './EnvironmentsApi';
|
|
11
|
+
export * from './EventsApi';
|
|
10
12
|
export * from './GroupsApi';
|
|
11
13
|
export * from './HealthApi';
|
|
12
14
|
export * from './ImagesApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -20,11 +20,13 @@ __exportStar(require("./AuditApi"), exports);
|
|
|
20
20
|
__exportStar(require("./AuthenticationApi"), exports);
|
|
21
21
|
__exportStar(require("./BuildApi"), exports);
|
|
22
22
|
__exportStar(require("./ClusterApi"), exports);
|
|
23
|
+
__exportStar(require("./ContainerNetworksApi"), exports);
|
|
23
24
|
__exportStar(require("./ContainersApi"), exports);
|
|
24
25
|
__exportStar(require("./CredentialsApi"), exports);
|
|
25
26
|
__exportStar(require("./CronApi"), exports);
|
|
26
27
|
__exportStar(require("./DeploymentsApi"), exports);
|
|
27
28
|
__exportStar(require("./EnvironmentsApi"), exports);
|
|
29
|
+
__exportStar(require("./EventsApi"), exports);
|
|
28
30
|
__exportStar(require("./GroupsApi"), exports);
|
|
29
31
|
__exportStar(require("./HealthApi"), exports);
|
|
30
32
|
__exportStar(require("./ImagesApi"), exports);
|