@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.
Files changed (345) hide show
  1. package/.openapi-generator/FILES +58 -1
  2. package/README.md +48 -6
  3. package/dist/apis/AuthenticationApi.d.ts +43 -1
  4. package/dist/apis/AuthenticationApi.js +112 -0
  5. package/dist/apis/ContainerNetworksApi.d.ts +123 -0
  6. package/dist/apis/ContainerNetworksApi.js +331 -0
  7. package/dist/apis/ContainersApi.d.ts +7 -4
  8. package/dist/apis/ContainersApi.js +13 -4
  9. package/dist/apis/EventsApi.d.ts +35 -0
  10. package/dist/apis/EventsApi.js +81 -0
  11. package/dist/apis/PermissionsApi.d.ts +18 -0
  12. package/dist/apis/PermissionsApi.js +46 -0
  13. package/dist/apis/SecretsApi.d.ts +38 -1
  14. package/dist/apis/SecretsApi.js +109 -0
  15. package/dist/apis/VolumesApi.d.ts +41 -7
  16. package/dist/apis/VolumesApi.js +102 -5
  17. package/dist/apis/index.d.ts +2 -0
  18. package/dist/apis/index.js +2 -0
  19. package/dist/models/BridgeNetwork.d.ts +72 -0
  20. package/dist/models/BridgeNetwork.js +67 -0
  21. package/dist/models/BridgeNetworkAttachment.d.ts +50 -0
  22. package/dist/models/BridgeNetworkAttachment.js +56 -0
  23. package/dist/models/BridgeNetworkDetails.d.ts +79 -0
  24. package/dist/models/BridgeNetworkDetails.js +72 -0
  25. package/dist/models/BridgeNetworkDriver.d.ts +25 -0
  26. package/dist/models/BridgeNetworkDriver.js +51 -0
  27. package/dist/models/ConnectBridgeNetworkRequest.d.ts +45 -0
  28. package/dist/models/ConnectBridgeNetworkRequest.js +54 -0
  29. package/dist/models/ContainerEvent.d.ts +82 -0
  30. package/dist/models/ContainerEvent.js +67 -0
  31. package/dist/models/ContainerEventKind.d.ts +27 -0
  32. package/dist/models/ContainerEventKind.js +53 -0
  33. package/dist/models/ContainerHealthInfo.d.ts +53 -0
  34. package/dist/models/ContainerHealthInfo.js +54 -0
  35. package/dist/models/ContainerInfo.d.ts +40 -0
  36. package/dist/models/ContainerInfo.js +13 -0
  37. package/dist/models/ContainerRestartKind.d.ts +27 -0
  38. package/dist/models/ContainerRestartKind.js +53 -0
  39. package/dist/models/ContainerRestartPolicy.d.ts +53 -0
  40. package/dist/models/ContainerRestartPolicy.js +55 -0
  41. package/dist/models/ContainerWaitResponse.d.ts +30 -2
  42. package/dist/models/ContainerWaitResponse.js +6 -0
  43. package/dist/models/CreateBridgeNetworkRequest.d.ts +60 -0
  44. package/dist/models/CreateBridgeNetworkRequest.js +59 -0
  45. package/dist/models/CreateContainerRequest.d.ts +77 -0
  46. package/dist/models/CreateContainerRequest.js +23 -0
  47. package/dist/models/CreateVolumeRequest.d.ts +54 -0
  48. package/dist/models/CreateVolumeRequest.js +56 -0
  49. package/dist/models/DisconnectBridgeNetworkRequest.d.ts +38 -0
  50. package/dist/models/DisconnectBridgeNetworkRequest.js +52 -0
  51. package/dist/models/HealthCheckRequest.d.ts +94 -0
  52. package/dist/models/HealthCheckRequest.js +66 -0
  53. package/dist/models/NetworkAttachmentInfo.d.ts +49 -0
  54. package/dist/models/NetworkAttachmentInfo.js +54 -0
  55. package/dist/models/NetworkAttachmentRequest.d.ts +51 -0
  56. package/dist/models/NetworkAttachmentRequest.js +54 -0
  57. package/dist/models/OidcCallbackResponse.d.ts +47 -0
  58. package/dist/models/OidcCallbackResponse.js +59 -0
  59. package/dist/models/OidcProviderPublic.d.ts +39 -0
  60. package/dist/models/OidcProviderPublic.js +54 -0
  61. package/dist/models/PortMapping.d.ts +55 -0
  62. package/dist/models/PortMapping.js +57 -0
  63. package/dist/models/PortProtocol.d.ts +25 -0
  64. package/dist/models/PortProtocol.js +51 -0
  65. package/dist/models/PullImageRequest.d.ts +18 -0
  66. package/dist/models/PullImageRequest.js +5 -0
  67. package/dist/models/RegistryAuth.d.ts +52 -0
  68. package/dist/models/RegistryAuth.js +57 -0
  69. package/dist/models/RegistryAuthType.d.ts +25 -0
  70. package/dist/models/RegistryAuthType.js +51 -0
  71. package/dist/models/RevealAllSecretsResponse.d.ts +41 -0
  72. package/dist/models/RevealAllSecretsResponse.js +54 -0
  73. package/dist/models/RotateSecretRequest.d.ts +32 -0
  74. package/dist/models/RotateSecretRequest.js +50 -0
  75. package/dist/models/RotateSecretResponse.d.ts +46 -0
  76. package/dist/models/RotateSecretResponse.js +56 -0
  77. package/dist/models/VolumeInfo.d.ts +70 -0
  78. package/dist/models/VolumeInfo.js +64 -0
  79. package/dist/models/VolumeMount.d.ts +16 -3
  80. package/dist/models/VolumeMount.js +4 -3
  81. package/dist/models/VolumeMountType.d.ts +30 -0
  82. package/dist/models/VolumeMountType.js +56 -0
  83. package/dist/models/VolumeSummary.d.ts +7 -4
  84. package/dist/models/index.d.ts +27 -0
  85. package/dist/models/index.js +27 -0
  86. package/docs/AddMemberRequest.md +1 -1
  87. package/docs/AuditApi.md +3 -3
  88. package/docs/AuditEntry.md +1 -1
  89. package/docs/AuthenticationApi.md +212 -18
  90. package/docs/BackendGroupInfo.md +1 -1
  91. package/docs/BackendInfo.md +1 -1
  92. package/docs/BackendsResponse.md +1 -1
  93. package/docs/BootstrapRequest.md +1 -1
  94. package/docs/BridgeNetwork.md +47 -0
  95. package/docs/BridgeNetworkAttachment.md +41 -0
  96. package/docs/BridgeNetworkDetails.md +49 -0
  97. package/docs/BridgeNetworkDriver.md +33 -0
  98. package/docs/BuildApi.md +21 -21
  99. package/docs/BuildKind.md +1 -1
  100. package/docs/BuildRequest.md +1 -1
  101. package/docs/BuildRequestWithContext.md +1 -1
  102. package/docs/BuildStateEnum.md +1 -1
  103. package/docs/BuildStatus.md +1 -1
  104. package/docs/BulkImportResponse.md +1 -1
  105. package/docs/CertInfo.md +1 -1
  106. package/docs/ClusterApi.md +12 -12
  107. package/docs/ClusterJoinRequest.md +1 -1
  108. package/docs/ClusterJoinResponse.md +1 -1
  109. package/docs/ClusterNodeSummary.md +1 -1
  110. package/docs/ClusterPeer.md +1 -1
  111. package/docs/ConnectBridgeNetworkRequest.md +39 -0
  112. package/docs/ContainerEvent.md +47 -0
  113. package/docs/ContainerEventKind.md +33 -0
  114. package/docs/ContainerExecRequest.md +1 -1
  115. package/docs/ContainerExecResponse.md +1 -1
  116. package/docs/ContainerHealthInfo.md +39 -0
  117. package/docs/ContainerInfo.md +11 -1
  118. package/docs/ContainerNetworksApi.md +466 -0
  119. package/docs/ContainerResourceLimits.md +1 -1
  120. package/docs/ContainerRestartKind.md +33 -0
  121. package/docs/ContainerRestartPolicy.md +39 -0
  122. package/docs/ContainerStatsResponse.md +1 -1
  123. package/docs/ContainerWaitResponse.md +8 -2
  124. package/docs/ContainersApi.md +51 -42
  125. package/docs/CreateBridgeNetworkRequest.md +43 -0
  126. package/docs/CreateContainerRequest.md +19 -1
  127. package/docs/CreateDeploymentRequest.md +1 -1
  128. package/docs/CreateEnvironmentRequest.md +1 -1
  129. package/docs/CreateGitCredentialRequest.md +1 -1
  130. package/docs/CreateGroupRequest.md +1 -1
  131. package/docs/CreateNodeTunnelRequest.md +1 -1
  132. package/docs/CreateNodeTunnelResponse.md +1 -1
  133. package/docs/CreateNotifierRequest.md +1 -1
  134. package/docs/CreateProjectRequest.md +1 -1
  135. package/docs/CreateRegistryCredentialRequest.md +1 -1
  136. package/docs/CreateSecretRequest.md +1 -1
  137. package/docs/CreateSyncRequest.md +1 -1
  138. package/docs/CreateTaskRequest.md +1 -1
  139. package/docs/CreateTunnelRequest.md +1 -1
  140. package/docs/CreateTunnelResponse.md +1 -1
  141. package/docs/CreateUserRequest.md +1 -1
  142. package/docs/CreateVariableRequest.md +1 -1
  143. package/docs/CreateVolumeRequest.md +41 -0
  144. package/docs/CreateWorkflowRequest.md +1 -1
  145. package/docs/CredentialsApi.md +18 -18
  146. package/docs/CronApi.md +15 -15
  147. package/docs/CronJobResponse.md +1 -1
  148. package/docs/CronStatusResponse.md +1 -1
  149. package/docs/CsrfResponse.md +1 -1
  150. package/docs/DeploymentDetails.md +1 -1
  151. package/docs/DeploymentSummary.md +1 -1
  152. package/docs/DeploymentsApi.md +12 -12
  153. package/docs/DisconnectBridgeNetworkRequest.md +37 -0
  154. package/docs/DnsStatusResponse.md +1 -1
  155. package/docs/EnvironmentsApi.md +15 -15
  156. package/docs/EventsApi.md +85 -0
  157. package/docs/ForceLeaderRequest.md +1 -1
  158. package/docs/ForceLeaderResponse.md +1 -1
  159. package/docs/GitCredentialKindSchema.md +1 -1
  160. package/docs/GitCredentialResponse.md +1 -1
  161. package/docs/GpuInfoSummary.md +1 -1
  162. package/docs/GpuUtilizationReport.md +1 -1
  163. package/docs/GrantPermissionRequest.md +1 -1
  164. package/docs/GroupMembersResponse.md +1 -1
  165. package/docs/GroupsApi.md +21 -21
  166. package/docs/HealthApi.md +6 -6
  167. package/docs/HealthCheckRequest.md +51 -0
  168. package/docs/HealthResponse.md +1 -1
  169. package/docs/HeartbeatRequest.md +1 -1
  170. package/docs/ImageInfoDto.md +1 -1
  171. package/docs/ImagesApi.md +15 -15
  172. package/docs/InternalApi.md +6 -6
  173. package/docs/InternalScaleRequest.md +1 -1
  174. package/docs/InternalScaleResponse.md +1 -1
  175. package/docs/IpAllocationResponse.md +1 -1
  176. package/docs/JobExecutionResponse.md +1 -1
  177. package/docs/JobsApi.md +12 -12
  178. package/docs/JoinTokenResponse.md +1 -1
  179. package/docs/KillContainerRequest.md +1 -1
  180. package/docs/LinkDeploymentRequest.md +1 -1
  181. package/docs/LoginRequest.md +1 -1
  182. package/docs/LoginResponse.md +1 -1
  183. package/docs/NetworkAttachmentInfo.md +39 -0
  184. package/docs/NetworkAttachmentRequest.md +39 -0
  185. package/docs/NetworkSummary.md +1 -1
  186. package/docs/NetworksApi.md +15 -15
  187. package/docs/NodeDetails.md +1 -1
  188. package/docs/NodeResourceInfo.md +1 -1
  189. package/docs/NodeSummary.md +1 -1
  190. package/docs/NodesApi.md +12 -12
  191. package/docs/NotifierConfig.md +1 -1
  192. package/docs/NotifierConfigOneOf.md +1 -1
  193. package/docs/NotifierConfigOneOf1.md +1 -1
  194. package/docs/NotifierConfigOneOf2.md +1 -1
  195. package/docs/NotifierConfigOneOf3.md +1 -1
  196. package/docs/NotifierKind.md +1 -1
  197. package/docs/NotifiersApi.md +18 -18
  198. package/docs/OidcCallbackResponse.md +39 -0
  199. package/docs/OidcProviderPublic.md +37 -0
  200. package/docs/OverlayApi.md +12 -12
  201. package/docs/OverlayStatusResponse.md +1 -1
  202. package/docs/PeerInfo.md +1 -1
  203. package/docs/PeerListResponse.md +1 -1
  204. package/docs/PermissionLevel.md +1 -1
  205. package/docs/PermissionsApi.md +80 -9
  206. package/docs/PortMapping.md +41 -0
  207. package/docs/PortProtocol.md +33 -0
  208. package/docs/ProjectPullResponse.md +1 -1
  209. package/docs/ProjectsApi.md +27 -27
  210. package/docs/ProxyApi.md +12 -12
  211. package/docs/PruneResultDto.md +1 -1
  212. package/docs/PullImageRequest.md +5 -1
  213. package/docs/PullImageResponse.md +1 -1
  214. package/docs/RegisteredServiceInfo.md +1 -1
  215. package/docs/RegistryAuth.md +39 -0
  216. package/docs/RegistryAuthType.md +33 -0
  217. package/docs/RegistryAuthTypeSchema.md +1 -1
  218. package/docs/RegistryCredentialResponse.md +1 -1
  219. package/docs/ReplicationInfo.md +1 -1
  220. package/docs/RestartContainerRequest.md +1 -1
  221. package/docs/RevealAllSecretsResponse.md +37 -0
  222. package/docs/RotateSecretRequest.md +35 -0
  223. package/docs/RotateSecretResponse.md +39 -0
  224. package/docs/RouteInfo.md +1 -1
  225. package/docs/RoutesResponse.md +1 -1
  226. package/docs/ScaleRequest.md +1 -1
  227. package/docs/SecretMetadataResponse.md +1 -1
  228. package/docs/SecretsApi.md +175 -15
  229. package/docs/ServiceDetails.md +1 -1
  230. package/docs/ServiceEndpoint.md +1 -1
  231. package/docs/ServiceHealthInfo.md +1 -1
  232. package/docs/ServiceMetrics.md +1 -1
  233. package/docs/ServiceSummary.md +1 -1
  234. package/docs/ServicesApi.md +12 -12
  235. package/docs/SetPasswordRequest.md +1 -1
  236. package/docs/StepResult.md +1 -1
  237. package/docs/StopContainerRequest.md +1 -1
  238. package/docs/StorageApi.md +3 -3
  239. package/docs/StorageStatusResponse.md +1 -1
  240. package/docs/StoredEnvironment.md +1 -1
  241. package/docs/StoredNotifier.md +1 -1
  242. package/docs/StoredPermission.md +1 -1
  243. package/docs/StoredProject.md +1 -1
  244. package/docs/StoredSync.md +1 -1
  245. package/docs/StoredTask.md +1 -1
  246. package/docs/StoredUserGroup.md +1 -1
  247. package/docs/StoredVariable.md +1 -1
  248. package/docs/StoredWorkflow.md +1 -1
  249. package/docs/StreamBackendInfo.md +1 -1
  250. package/docs/StreamInfo.md +1 -1
  251. package/docs/StreamsResponse.md +1 -1
  252. package/docs/SubjectKind.md +1 -1
  253. package/docs/SuccessResponse.md +1 -1
  254. package/docs/SyncApplyResponse.md +1 -1
  255. package/docs/SyncDiffResponse.md +1 -1
  256. package/docs/SyncResourceResponse.md +1 -1
  257. package/docs/SyncResourceResult.md +1 -1
  258. package/docs/SyncsApi.md +15 -15
  259. package/docs/TagImageRequest.md +1 -1
  260. package/docs/TaskKind.md +1 -1
  261. package/docs/TaskRun.md +1 -1
  262. package/docs/TasksApi.md +18 -18
  263. package/docs/TemplateInfo.md +1 -1
  264. package/docs/TestNotifierResponse.md +1 -1
  265. package/docs/TlsResponse.md +1 -1
  266. package/docs/TokenRequest.md +1 -1
  267. package/docs/TokenResponse.md +1 -1
  268. package/docs/TriggerBuildResponse.md +1 -1
  269. package/docs/TriggerCronResponse.md +1 -1
  270. package/docs/TriggerJobResponse.md +1 -1
  271. package/docs/TunnelStatus.md +1 -1
  272. package/docs/TunnelSummary.md +1 -1
  273. package/docs/TunnelsApi.md +18 -18
  274. package/docs/UpdateEnvironmentRequest.md +1 -1
  275. package/docs/UpdateGroupRequest.md +1 -1
  276. package/docs/UpdateLabelsRequest.md +1 -1
  277. package/docs/UpdateLabelsResponse.md +1 -1
  278. package/docs/UpdateNotifierRequest.md +1 -1
  279. package/docs/UpdateProjectRequest.md +1 -1
  280. package/docs/UpdateUserRequest.md +1 -1
  281. package/docs/UpdateVariableRequest.md +1 -1
  282. package/docs/UserRole.md +1 -1
  283. package/docs/UserView.md +1 -1
  284. package/docs/UsersApi.md +18 -18
  285. package/docs/VariablesApi.md +15 -15
  286. package/docs/VolumeInfo.md +45 -0
  287. package/docs/VolumeMount.md +4 -2
  288. package/docs/VolumeMountType.md +33 -0
  289. package/docs/VolumeSummary.md +2 -2
  290. package/docs/VolumesApi.md +163 -13
  291. package/docs/WebhookInfoResponse.md +1 -1
  292. package/docs/WebhookResponse.md +1 -1
  293. package/docs/WebhooksApi.md +9 -9
  294. package/docs/WorkflowAction.md +1 -1
  295. package/docs/WorkflowActionOneOf.md +1 -1
  296. package/docs/WorkflowActionOneOf1.md +1 -1
  297. package/docs/WorkflowActionOneOf2.md +1 -1
  298. package/docs/WorkflowActionOneOf3.md +1 -1
  299. package/docs/WorkflowRun.md +1 -1
  300. package/docs/WorkflowRunStatus.md +1 -1
  301. package/docs/WorkflowStep.md +1 -1
  302. package/docs/WorkflowsApi.md +18 -18
  303. package/package.json +1 -1
  304. package/src/apis/AuthenticationApi.ts +140 -0
  305. package/src/apis/ContainerNetworksApi.ts +418 -0
  306. package/src/apis/ContainersApi.ts +19 -4
  307. package/src/apis/EventsApi.ts +82 -0
  308. package/src/apis/PermissionsApi.ts +59 -0
  309. package/src/apis/SecretsApi.ts +151 -0
  310. package/src/apis/VolumesApi.ts +133 -10
  311. package/src/apis/index.ts +2 -0
  312. package/src/models/BridgeNetwork.ts +127 -0
  313. package/src/models/BridgeNetworkAttachment.ts +90 -0
  314. package/src/models/BridgeNetworkDetails.ts +143 -0
  315. package/src/models/BridgeNetworkDriver.ts +53 -0
  316. package/src/models/ConnectBridgeNetworkRequest.ts +83 -0
  317. package/src/models/ContainerEvent.ts +137 -0
  318. package/src/models/ContainerEventKind.ts +55 -0
  319. package/src/models/ContainerHealthInfo.ts +91 -0
  320. package/src/models/ContainerInfo.ts +69 -0
  321. package/src/models/ContainerRestartKind.ts +55 -0
  322. package/src/models/ContainerRestartPolicy.ts +100 -0
  323. package/src/models/ContainerWaitResponse.ts +36 -2
  324. package/src/models/CreateBridgeNetworkRequest.ts +109 -0
  325. package/src/models/CreateContainerRequest.ts +125 -0
  326. package/src/models/CreateVolumeRequest.ts +92 -0
  327. package/src/models/DisconnectBridgeNetworkRequest.ts +74 -0
  328. package/src/models/HealthCheckRequest.ts +144 -0
  329. package/src/models/NetworkAttachmentInfo.ts +87 -0
  330. package/src/models/NetworkAttachmentRequest.ts +89 -0
  331. package/src/models/OidcCallbackResponse.ts +94 -0
  332. package/src/models/OidcProviderPublic.ts +76 -0
  333. package/src/models/PortMapping.ts +104 -0
  334. package/src/models/PortProtocol.ts +53 -0
  335. package/src/models/PullImageRequest.ts +29 -0
  336. package/src/models/RegistryAuth.ts +100 -0
  337. package/src/models/RegistryAuthType.ts +53 -0
  338. package/src/models/RevealAllSecretsResponse.ts +76 -0
  339. package/src/models/RotateSecretRequest.ts +66 -0
  340. package/src/models/RotateSecretResponse.ts +85 -0
  341. package/src/models/VolumeInfo.ts +114 -0
  342. package/src/models/VolumeMount.ts +28 -5
  343. package/src/models/VolumeMountType.ts +58 -0
  344. package/src/models/VolumeSummary.ts +7 -4
  345. 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
  }
@@ -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 { VolumeSummary } from '../models/index';
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
- * Removes a volume directory from disk. By default, only empty volumes can be deleted. Use `?force=true` to remove non-empty volumes. # Errors Returns an error if the volume is not found or cannot be removed.
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
- * Removes a volume directory from disk. By default, only empty volumes can be deleted. Use `?force=true` to remove non-empty volumes. # Errors Returns an error if the volume is not found or cannot be removed.
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 metadata for each one. # Errors Returns an error if the volume directory cannot be read.
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<VolumeSummary>>>;
78
+ listVolumesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<VolumeInfo>>>;
45
79
  /**
46
- * Enumerates subdirectories under the volume base directory and returns metadata for each one. # Errors Returns an error if the volume directory cannot be read.
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<VolumeSummary>>;
83
+ listVolumes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<VolumeInfo>>;
50
84
  }
@@ -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
- * Removes a volume directory from disk. By default, only empty volumes can be deleted. Use `?force=true` to remove non-empty volumes. # Errors Returns an error if the volume is not found or cannot be removed.
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
- * Removes a volume directory from disk. By default, only empty volumes can be deleted. Use `?force=true` to remove non-empty volumes. # Errors Returns an error if the volume is not found or cannot be removed.
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 metadata for each one. # Errors Returns an error if the volume directory cannot be read.
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.VolumeSummaryFromJSON));
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 metadata for each one. # Errors Returns an error if the volume directory cannot be read.
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) {
@@ -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';
@@ -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);