@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,123 @@
1
+ /**
2
+ * ZLayer API
3
+ * Container orchestration API for ZLayer
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { BridgeNetwork, BridgeNetworkDetails, ConnectBridgeNetworkRequest, CreateBridgeNetworkRequest, DisconnectBridgeNetworkRequest } from '../models/index';
14
+ export interface ConnectContainerNetworkRequest {
15
+ idOrName: string;
16
+ connectBridgeNetworkRequest: ConnectBridgeNetworkRequest;
17
+ }
18
+ export interface CreateContainerNetworkRequest {
19
+ createBridgeNetworkRequest: CreateBridgeNetworkRequest;
20
+ }
21
+ export interface DeleteContainerNetworkRequest {
22
+ idOrName: string;
23
+ force?: boolean;
24
+ }
25
+ export interface DisconnectContainerNetworkRequest {
26
+ idOrName: string;
27
+ disconnectBridgeNetworkRequest: DisconnectBridgeNetworkRequest;
28
+ }
29
+ export interface GetContainerNetworkRequest {
30
+ idOrName: string;
31
+ }
32
+ export interface ListContainerNetworksRequest {
33
+ label?: string | null;
34
+ }
35
+ /**
36
+ *
37
+ */
38
+ export declare class ContainerNetworksApi extends runtime.BaseAPI {
39
+ /**
40
+ * Creates request options for connectContainerNetwork without sending the request
41
+ */
42
+ connectContainerNetworkRequestOpts(requestParameters: ConnectContainerNetworkRequest): Promise<runtime.RequestOpts>;
43
+ /**
44
+ * # Errors - [`ApiError::BadRequest`] for an empty `container_id` or invalid `ipv4_address`. - [`ApiError::NotFound`] when no network matches `id_or_name`.
45
+ * Attach a container to a network.
46
+ */
47
+ connectContainerNetworkRaw(requestParameters: ConnectContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
48
+ /**
49
+ * # Errors - [`ApiError::BadRequest`] for an empty `container_id` or invalid `ipv4_address`. - [`ApiError::NotFound`] when no network matches `id_or_name`.
50
+ * Attach a container to a network.
51
+ */
52
+ connectContainerNetwork(requestParameters: ConnectContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
53
+ /**
54
+ * Creates request options for createContainerNetwork without sending the request
55
+ */
56
+ createContainerNetworkRequestOpts(requestParameters: CreateContainerNetworkRequest): Promise<runtime.RequestOpts>;
57
+ /**
58
+ * # Errors - [`ApiError::BadRequest`] if the network name or subnet is malformed. - [`ApiError::Conflict`] if a network with the same name already exists. - [`ApiError::Forbidden`] / [`ApiError::Unauthorized`] from the auth layer.
59
+ * Create a new bridge or overlay network.
60
+ */
61
+ createContainerNetworkRaw(requestParameters: CreateContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BridgeNetwork>>;
62
+ /**
63
+ * # Errors - [`ApiError::BadRequest`] if the network name or subnet is malformed. - [`ApiError::Conflict`] if a network with the same name already exists. - [`ApiError::Forbidden`] / [`ApiError::Unauthorized`] from the auth layer.
64
+ * Create a new bridge or overlay network.
65
+ */
66
+ createContainerNetwork(requestParameters: CreateContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BridgeNetwork>;
67
+ /**
68
+ * Creates request options for deleteContainerNetwork without sending the request
69
+ */
70
+ deleteContainerNetworkRequestOpts(requestParameters: DeleteContainerNetworkRequest): Promise<runtime.RequestOpts>;
71
+ /**
72
+ * # Errors - [`ApiError::NotFound`] when no network matches `id_or_name`. - [`ApiError::Conflict`] when the network still has attachments and `force` is false. - Auth errors propagated from the `operator` role check.
73
+ * Delete a bridge network. Refuses if the network still has attachments unless `?force=true` is set.
74
+ */
75
+ deleteContainerNetworkRaw(requestParameters: DeleteContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
76
+ /**
77
+ * # Errors - [`ApiError::NotFound`] when no network matches `id_or_name`. - [`ApiError::Conflict`] when the network still has attachments and `force` is false. - Auth errors propagated from the `operator` role check.
78
+ * Delete a bridge network. Refuses if the network still has attachments unless `?force=true` is set.
79
+ */
80
+ deleteContainerNetwork(requestParameters: DeleteContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
81
+ /**
82
+ * Creates request options for disconnectContainerNetwork without sending the request
83
+ */
84
+ disconnectContainerNetworkRequestOpts(requestParameters: DisconnectContainerNetworkRequest): Promise<runtime.RequestOpts>;
85
+ /**
86
+ * # Errors - [`ApiError::BadRequest`] when `container_id` is empty. - [`ApiError::NotFound`] when the network or the container-on-network pair is not known (unless `force` was passed).
87
+ * Detach a container from a network.
88
+ */
89
+ disconnectContainerNetworkRaw(requestParameters: DisconnectContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
90
+ /**
91
+ * # Errors - [`ApiError::BadRequest`] when `container_id` is empty. - [`ApiError::NotFound`] when the network or the container-on-network pair is not known (unless `force` was passed).
92
+ * Detach a container from a network.
93
+ */
94
+ disconnectContainerNetwork(requestParameters: DisconnectContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
95
+ /**
96
+ * Creates request options for getContainerNetwork without sending the request
97
+ */
98
+ getContainerNetworkRequestOpts(requestParameters: GetContainerNetworkRequest): Promise<runtime.RequestOpts>;
99
+ /**
100
+ * # Errors [`ApiError::NotFound`] when no network matches `id_or_name`.
101
+ * Inspect a single bridge network by id or by name.
102
+ */
103
+ getContainerNetworkRaw(requestParameters: GetContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BridgeNetworkDetails>>;
104
+ /**
105
+ * # Errors [`ApiError::NotFound`] when no network matches `id_or_name`.
106
+ * Inspect a single bridge network by id or by name.
107
+ */
108
+ getContainerNetwork(requestParameters: GetContainerNetworkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BridgeNetworkDetails>;
109
+ /**
110
+ * Creates request options for listContainerNetworks without sending the request
111
+ */
112
+ listContainerNetworksRequestOpts(requestParameters: ListContainerNetworksRequest): Promise<runtime.RequestOpts>;
113
+ /**
114
+ * # Errors [`ApiError::BadRequest`] when the `label` query param is not in `key=value` form.
115
+ * List all bridge networks, optionally filtered by label.
116
+ */
117
+ listContainerNetworksRaw(requestParameters: ListContainerNetworksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<BridgeNetwork>>>;
118
+ /**
119
+ * # Errors [`ApiError::BadRequest`] when the `label` query param is not in `key=value` form.
120
+ * List all bridge networks, optionally filtered by label.
121
+ */
122
+ listContainerNetworks(requestParameters?: ListContainerNetworksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<BridgeNetwork>>;
123
+ }
@@ -0,0 +1,331 @@
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.ContainerNetworksApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class ContainerNetworksApi extends runtime.BaseAPI {
32
+ /**
33
+ * Creates request options for connectContainerNetwork without sending the request
34
+ */
35
+ connectContainerNetworkRequestOpts(requestParameters) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['idOrName'] == null) {
38
+ throw new runtime.RequiredError('idOrName', 'Required parameter "idOrName" was null or undefined when calling connectContainerNetwork().');
39
+ }
40
+ if (requestParameters['connectBridgeNetworkRequest'] == null) {
41
+ throw new runtime.RequiredError('connectBridgeNetworkRequest', 'Required parameter "connectBridgeNetworkRequest" was null or undefined when calling connectContainerNetwork().');
42
+ }
43
+ const queryParameters = {};
44
+ const headerParameters = {};
45
+ headerParameters['Content-Type'] = 'application/json';
46
+ if (this.configuration && this.configuration.accessToken) {
47
+ const token = this.configuration.accessToken;
48
+ const tokenString = yield token("bearer_auth", []);
49
+ if (tokenString) {
50
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
51
+ }
52
+ }
53
+ let urlPath = `/api/v1/container-networks/{id_or_name}/connect`;
54
+ urlPath = urlPath.replace(`{${"id_or_name"}}`, encodeURIComponent(String(requestParameters['idOrName'])));
55
+ return {
56
+ path: urlPath,
57
+ method: 'POST',
58
+ headers: headerParameters,
59
+ query: queryParameters,
60
+ body: (0, index_1.ConnectBridgeNetworkRequestToJSON)(requestParameters['connectBridgeNetworkRequest']),
61
+ };
62
+ });
63
+ }
64
+ /**
65
+ * # Errors - [`ApiError::BadRequest`] for an empty `container_id` or invalid `ipv4_address`. - [`ApiError::NotFound`] when no network matches `id_or_name`.
66
+ * Attach a container to a network.
67
+ */
68
+ connectContainerNetworkRaw(requestParameters, initOverrides) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ const requestOptions = yield this.connectContainerNetworkRequestOpts(requestParameters);
71
+ const response = yield this.request(requestOptions, initOverrides);
72
+ return new runtime.VoidApiResponse(response);
73
+ });
74
+ }
75
+ /**
76
+ * # Errors - [`ApiError::BadRequest`] for an empty `container_id` or invalid `ipv4_address`. - [`ApiError::NotFound`] when no network matches `id_or_name`.
77
+ * Attach a container to a network.
78
+ */
79
+ connectContainerNetwork(requestParameters, initOverrides) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ yield this.connectContainerNetworkRaw(requestParameters, initOverrides);
82
+ });
83
+ }
84
+ /**
85
+ * Creates request options for createContainerNetwork without sending the request
86
+ */
87
+ createContainerNetworkRequestOpts(requestParameters) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ if (requestParameters['createBridgeNetworkRequest'] == null) {
90
+ throw new runtime.RequiredError('createBridgeNetworkRequest', 'Required parameter "createBridgeNetworkRequest" was null or undefined when calling createContainerNetwork().');
91
+ }
92
+ const queryParameters = {};
93
+ const headerParameters = {};
94
+ headerParameters['Content-Type'] = 'application/json';
95
+ if (this.configuration && this.configuration.accessToken) {
96
+ const token = this.configuration.accessToken;
97
+ const tokenString = yield token("bearer_auth", []);
98
+ if (tokenString) {
99
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
100
+ }
101
+ }
102
+ let urlPath = `/api/v1/container-networks`;
103
+ return {
104
+ path: urlPath,
105
+ method: 'POST',
106
+ headers: headerParameters,
107
+ query: queryParameters,
108
+ body: (0, index_1.CreateBridgeNetworkRequestToJSON)(requestParameters['createBridgeNetworkRequest']),
109
+ };
110
+ });
111
+ }
112
+ /**
113
+ * # Errors - [`ApiError::BadRequest`] if the network name or subnet is malformed. - [`ApiError::Conflict`] if a network with the same name already exists. - [`ApiError::Forbidden`] / [`ApiError::Unauthorized`] from the auth layer.
114
+ * Create a new bridge or overlay network.
115
+ */
116
+ createContainerNetworkRaw(requestParameters, initOverrides) {
117
+ return __awaiter(this, void 0, void 0, function* () {
118
+ const requestOptions = yield this.createContainerNetworkRequestOpts(requestParameters);
119
+ const response = yield this.request(requestOptions, initOverrides);
120
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BridgeNetworkFromJSON)(jsonValue));
121
+ });
122
+ }
123
+ /**
124
+ * # Errors - [`ApiError::BadRequest`] if the network name or subnet is malformed. - [`ApiError::Conflict`] if a network with the same name already exists. - [`ApiError::Forbidden`] / [`ApiError::Unauthorized`] from the auth layer.
125
+ * Create a new bridge or overlay network.
126
+ */
127
+ createContainerNetwork(requestParameters, initOverrides) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const response = yield this.createContainerNetworkRaw(requestParameters, initOverrides);
130
+ return yield response.value();
131
+ });
132
+ }
133
+ /**
134
+ * Creates request options for deleteContainerNetwork without sending the request
135
+ */
136
+ deleteContainerNetworkRequestOpts(requestParameters) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ if (requestParameters['idOrName'] == null) {
139
+ throw new runtime.RequiredError('idOrName', 'Required parameter "idOrName" was null or undefined when calling deleteContainerNetwork().');
140
+ }
141
+ const queryParameters = {};
142
+ if (requestParameters['force'] != null) {
143
+ queryParameters['force'] = requestParameters['force'];
144
+ }
145
+ const headerParameters = {};
146
+ if (this.configuration && this.configuration.accessToken) {
147
+ const token = this.configuration.accessToken;
148
+ const tokenString = yield token("bearer_auth", []);
149
+ if (tokenString) {
150
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
151
+ }
152
+ }
153
+ let urlPath = `/api/v1/container-networks/{id_or_name}`;
154
+ urlPath = urlPath.replace(`{${"id_or_name"}}`, encodeURIComponent(String(requestParameters['idOrName'])));
155
+ return {
156
+ path: urlPath,
157
+ method: 'DELETE',
158
+ headers: headerParameters,
159
+ query: queryParameters,
160
+ };
161
+ });
162
+ }
163
+ /**
164
+ * # Errors - [`ApiError::NotFound`] when no network matches `id_or_name`. - [`ApiError::Conflict`] when the network still has attachments and `force` is false. - Auth errors propagated from the `operator` role check.
165
+ * Delete a bridge network. Refuses if the network still has attachments unless `?force=true` is set.
166
+ */
167
+ deleteContainerNetworkRaw(requestParameters, initOverrides) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ const requestOptions = yield this.deleteContainerNetworkRequestOpts(requestParameters);
170
+ const response = yield this.request(requestOptions, initOverrides);
171
+ return new runtime.VoidApiResponse(response);
172
+ });
173
+ }
174
+ /**
175
+ * # Errors - [`ApiError::NotFound`] when no network matches `id_or_name`. - [`ApiError::Conflict`] when the network still has attachments and `force` is false. - Auth errors propagated from the `operator` role check.
176
+ * Delete a bridge network. Refuses if the network still has attachments unless `?force=true` is set.
177
+ */
178
+ deleteContainerNetwork(requestParameters, initOverrides) {
179
+ return __awaiter(this, void 0, void 0, function* () {
180
+ yield this.deleteContainerNetworkRaw(requestParameters, initOverrides);
181
+ });
182
+ }
183
+ /**
184
+ * Creates request options for disconnectContainerNetwork without sending the request
185
+ */
186
+ disconnectContainerNetworkRequestOpts(requestParameters) {
187
+ return __awaiter(this, void 0, void 0, function* () {
188
+ if (requestParameters['idOrName'] == null) {
189
+ throw new runtime.RequiredError('idOrName', 'Required parameter "idOrName" was null or undefined when calling disconnectContainerNetwork().');
190
+ }
191
+ if (requestParameters['disconnectBridgeNetworkRequest'] == null) {
192
+ throw new runtime.RequiredError('disconnectBridgeNetworkRequest', 'Required parameter "disconnectBridgeNetworkRequest" was null or undefined when calling disconnectContainerNetwork().');
193
+ }
194
+ const queryParameters = {};
195
+ const headerParameters = {};
196
+ headerParameters['Content-Type'] = 'application/json';
197
+ if (this.configuration && this.configuration.accessToken) {
198
+ const token = this.configuration.accessToken;
199
+ const tokenString = yield token("bearer_auth", []);
200
+ if (tokenString) {
201
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
202
+ }
203
+ }
204
+ let urlPath = `/api/v1/container-networks/{id_or_name}/disconnect`;
205
+ urlPath = urlPath.replace(`{${"id_or_name"}}`, encodeURIComponent(String(requestParameters['idOrName'])));
206
+ return {
207
+ path: urlPath,
208
+ method: 'POST',
209
+ headers: headerParameters,
210
+ query: queryParameters,
211
+ body: (0, index_1.DisconnectBridgeNetworkRequestToJSON)(requestParameters['disconnectBridgeNetworkRequest']),
212
+ };
213
+ });
214
+ }
215
+ /**
216
+ * # Errors - [`ApiError::BadRequest`] when `container_id` is empty. - [`ApiError::NotFound`] when the network or the container-on-network pair is not known (unless `force` was passed).
217
+ * Detach a container from a network.
218
+ */
219
+ disconnectContainerNetworkRaw(requestParameters, initOverrides) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ const requestOptions = yield this.disconnectContainerNetworkRequestOpts(requestParameters);
222
+ const response = yield this.request(requestOptions, initOverrides);
223
+ return new runtime.VoidApiResponse(response);
224
+ });
225
+ }
226
+ /**
227
+ * # Errors - [`ApiError::BadRequest`] when `container_id` is empty. - [`ApiError::NotFound`] when the network or the container-on-network pair is not known (unless `force` was passed).
228
+ * Detach a container from a network.
229
+ */
230
+ disconnectContainerNetwork(requestParameters, initOverrides) {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ yield this.disconnectContainerNetworkRaw(requestParameters, initOverrides);
233
+ });
234
+ }
235
+ /**
236
+ * Creates request options for getContainerNetwork without sending the request
237
+ */
238
+ getContainerNetworkRequestOpts(requestParameters) {
239
+ return __awaiter(this, void 0, void 0, function* () {
240
+ if (requestParameters['idOrName'] == null) {
241
+ throw new runtime.RequiredError('idOrName', 'Required parameter "idOrName" was null or undefined when calling getContainerNetwork().');
242
+ }
243
+ const queryParameters = {};
244
+ const headerParameters = {};
245
+ if (this.configuration && this.configuration.accessToken) {
246
+ const token = this.configuration.accessToken;
247
+ const tokenString = yield token("bearer_auth", []);
248
+ if (tokenString) {
249
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
250
+ }
251
+ }
252
+ let urlPath = `/api/v1/container-networks/{id_or_name}`;
253
+ urlPath = urlPath.replace(`{${"id_or_name"}}`, encodeURIComponent(String(requestParameters['idOrName'])));
254
+ return {
255
+ path: urlPath,
256
+ method: 'GET',
257
+ headers: headerParameters,
258
+ query: queryParameters,
259
+ };
260
+ });
261
+ }
262
+ /**
263
+ * # Errors [`ApiError::NotFound`] when no network matches `id_or_name`.
264
+ * Inspect a single bridge network by id or by name.
265
+ */
266
+ getContainerNetworkRaw(requestParameters, initOverrides) {
267
+ return __awaiter(this, void 0, void 0, function* () {
268
+ const requestOptions = yield this.getContainerNetworkRequestOpts(requestParameters);
269
+ const response = yield this.request(requestOptions, initOverrides);
270
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BridgeNetworkDetailsFromJSON)(jsonValue));
271
+ });
272
+ }
273
+ /**
274
+ * # Errors [`ApiError::NotFound`] when no network matches `id_or_name`.
275
+ * Inspect a single bridge network by id or by name.
276
+ */
277
+ getContainerNetwork(requestParameters, initOverrides) {
278
+ return __awaiter(this, void 0, void 0, function* () {
279
+ const response = yield this.getContainerNetworkRaw(requestParameters, initOverrides);
280
+ return yield response.value();
281
+ });
282
+ }
283
+ /**
284
+ * Creates request options for listContainerNetworks without sending the request
285
+ */
286
+ listContainerNetworksRequestOpts(requestParameters) {
287
+ return __awaiter(this, void 0, void 0, function* () {
288
+ const queryParameters = {};
289
+ if (requestParameters['label'] != null) {
290
+ queryParameters['label'] = requestParameters['label'];
291
+ }
292
+ const headerParameters = {};
293
+ if (this.configuration && this.configuration.accessToken) {
294
+ const token = this.configuration.accessToken;
295
+ const tokenString = yield token("bearer_auth", []);
296
+ if (tokenString) {
297
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
298
+ }
299
+ }
300
+ let urlPath = `/api/v1/container-networks`;
301
+ return {
302
+ path: urlPath,
303
+ method: 'GET',
304
+ headers: headerParameters,
305
+ query: queryParameters,
306
+ };
307
+ });
308
+ }
309
+ /**
310
+ * # Errors [`ApiError::BadRequest`] when the `label` query param is not in `key=value` form.
311
+ * List all bridge networks, optionally filtered by label.
312
+ */
313
+ listContainerNetworksRaw(requestParameters, initOverrides) {
314
+ return __awaiter(this, void 0, void 0, function* () {
315
+ const requestOptions = yield this.listContainerNetworksRequestOpts(requestParameters);
316
+ const response = yield this.request(requestOptions, initOverrides);
317
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.BridgeNetworkFromJSON));
318
+ });
319
+ }
320
+ /**
321
+ * # Errors [`ApiError::BadRequest`] when the `label` query param is not in `key=value` form.
322
+ * List all bridge networks, optionally filtered by label.
323
+ */
324
+ listContainerNetworks() {
325
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
326
+ const response = yield this.listContainerNetworksRaw(requestParameters, initOverrides);
327
+ return yield response.value();
328
+ });
329
+ }
330
+ }
331
+ exports.ContainerNetworksApi = ContainerNetworksApi;
@@ -20,6 +20,7 @@ export interface DeleteContainerRequest {
20
20
  export interface ExecInContainerRequest {
21
21
  id: string;
22
22
  containerExecRequest: ContainerExecRequest;
23
+ stream?: boolean;
23
24
  }
24
25
  export interface GetContainerRequest {
25
26
  id: string;
@@ -31,6 +32,8 @@ export interface GetContainerLogsRequest {
31
32
  }
32
33
  export interface GetContainerStatsRequest {
33
34
  id: string;
35
+ stream?: boolean;
36
+ interval?: number | null;
34
37
  }
35
38
  export interface KillContainerOperationRequest {
36
39
  id: string;
@@ -90,12 +93,12 @@ export declare class ContainersApi extends runtime.BaseAPI {
90
93
  */
91
94
  execInContainerRequestOpts(requestParameters: ExecInContainerRequest): Promise<runtime.RequestOpts>;
92
95
  /**
93
- * # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
96
+ * When `stream=true` is passed as a query parameter, this endpoint upgrades to a Server-Sent Events stream emitting: - `event: stdout\\ndata: <line>\\n\\n` for each stdout line - `event: stderr\\ndata: <line>\\n\\n` for each stderr line - `event: exit\\ndata: {\"exit_code\": N}\\n\\n` as the final event # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
94
97
  * Execute a command in a running container.
95
98
  */
96
99
  execInContainerRaw(requestParameters: ExecInContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ContainerExecResponse>>;
97
100
  /**
98
- * # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
101
+ * When `stream=true` is passed as a query parameter, this endpoint upgrades to a Server-Sent Events stream emitting: - `event: stdout\\ndata: <line>\\n\\n` for each stdout line - `event: stderr\\ndata: <line>\\n\\n` for each stderr line - `event: exit\\ndata: {\"exit_code\": N}\\n\\n` as the final event # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
99
102
  * Execute a command in a running container.
100
103
  */
101
104
  execInContainer(requestParameters: ExecInContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContainerExecResponse>;
@@ -132,12 +135,12 @@ export declare class ContainersApi extends runtime.BaseAPI {
132
135
  */
133
136
  getContainerStatsRequestOpts(requestParameters: GetContainerStatsRequest): Promise<runtime.RequestOpts>;
134
137
  /**
135
- * Returns CPU and memory usage statistics for the specified container. # Errors Returns an error if the container is not found or stats retrieval fails.
138
+ * Returns CPU and memory usage statistics for the specified container. By default this is a one-shot JSON response. When the query string contains `stream=true`, the handler switches to Server-Sent Events and emits one `ContainerStatsResponse` sample every `interval` seconds (default 2, clamped to `[1, 60]`). The stream ends with a final `event: close` when the container exits or the runtime reports an unrecoverable error. # Errors Returns an error if the container is not found or stats retrieval fails.
136
139
  * Get container resource statistics.
137
140
  */
138
141
  getContainerStatsRaw(requestParameters: GetContainerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ContainerStatsResponse>>;
139
142
  /**
140
- * Returns CPU and memory usage statistics for the specified container. # Errors Returns an error if the container is not found or stats retrieval fails.
143
+ * Returns CPU and memory usage statistics for the specified container. By default this is a one-shot JSON response. When the query string contains `stream=true`, the handler switches to Server-Sent Events and emits one `ContainerStatsResponse` sample every `interval` seconds (default 2, clamped to `[1, 60]`). The stream ends with a final `event: close` when the container exits or the runtime reports an unrecoverable error. # Errors Returns an error if the container is not found or stats retrieval fails.
141
144
  * Get container resource statistics.
142
145
  */
143
146
  getContainerStats(requestParameters: GetContainerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContainerStatsResponse>;
@@ -137,6 +137,9 @@ class ContainersApi extends runtime.BaseAPI {
137
137
  throw new runtime.RequiredError('containerExecRequest', 'Required parameter "containerExecRequest" was null or undefined when calling execInContainer().');
138
138
  }
139
139
  const queryParameters = {};
140
+ if (requestParameters['stream'] != null) {
141
+ queryParameters['stream'] = requestParameters['stream'];
142
+ }
140
143
  const headerParameters = {};
141
144
  headerParameters['Content-Type'] = 'application/json';
142
145
  if (this.configuration && this.configuration.accessToken) {
@@ -158,7 +161,7 @@ class ContainersApi extends runtime.BaseAPI {
158
161
  });
159
162
  }
160
163
  /**
161
- * # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
164
+ * When `stream=true` is passed as a query parameter, this endpoint upgrades to a Server-Sent Events stream emitting: - `event: stdout\\ndata: <line>\\n\\n` for each stdout line - `event: stderr\\ndata: <line>\\n\\n` for each stderr line - `event: exit\\ndata: {\"exit_code\": N}\\n\\n` as the final event # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
162
165
  * Execute a command in a running container.
163
166
  */
164
167
  execInContainerRaw(requestParameters, initOverrides) {
@@ -169,7 +172,7 @@ class ContainersApi extends runtime.BaseAPI {
169
172
  });
170
173
  }
171
174
  /**
172
- * # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
175
+ * When `stream=true` is passed as a query parameter, this endpoint upgrades to a Server-Sent Events stream emitting: - `event: stdout\\ndata: <line>\\n\\n` for each stdout line - `event: stderr\\ndata: <line>\\n\\n` for each stderr line - `event: exit\\ndata: {\"exit_code\": N}\\n\\n` as the final event # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
173
176
  * Execute a command in a running container.
174
177
  */
175
178
  execInContainer(requestParameters, initOverrides) {
@@ -294,6 +297,12 @@ class ContainersApi extends runtime.BaseAPI {
294
297
  throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getContainerStats().');
295
298
  }
296
299
  const queryParameters = {};
300
+ if (requestParameters['stream'] != null) {
301
+ queryParameters['stream'] = requestParameters['stream'];
302
+ }
303
+ if (requestParameters['interval'] != null) {
304
+ queryParameters['interval'] = requestParameters['interval'];
305
+ }
297
306
  const headerParameters = {};
298
307
  if (this.configuration && this.configuration.accessToken) {
299
308
  const token = this.configuration.accessToken;
@@ -313,7 +322,7 @@ class ContainersApi extends runtime.BaseAPI {
313
322
  });
314
323
  }
315
324
  /**
316
- * Returns CPU and memory usage statistics for the specified container. # Errors Returns an error if the container is not found or stats retrieval fails.
325
+ * Returns CPU and memory usage statistics for the specified container. By default this is a one-shot JSON response. When the query string contains `stream=true`, the handler switches to Server-Sent Events and emits one `ContainerStatsResponse` sample every `interval` seconds (default 2, clamped to `[1, 60]`). The stream ends with a final `event: close` when the container exits or the runtime reports an unrecoverable error. # Errors Returns an error if the container is not found or stats retrieval fails.
317
326
  * Get container resource statistics.
318
327
  */
319
328
  getContainerStatsRaw(requestParameters, initOverrides) {
@@ -324,7 +333,7 @@ class ContainersApi extends runtime.BaseAPI {
324
333
  });
325
334
  }
326
335
  /**
327
- * Returns CPU and memory usage statistics for the specified container. # Errors Returns an error if the container is not found or stats retrieval fails.
336
+ * Returns CPU and memory usage statistics for the specified container. By default this is a one-shot JSON response. When the query string contains `stream=true`, the handler switches to Server-Sent Events and emits one `ContainerStatsResponse` sample every `interval` seconds (default 2, clamped to `[1, 60]`). The stream ends with a final `event: close` when the container exits or the runtime reports an unrecoverable error. # Errors Returns an error if the container is not found or stats retrieval fails.
328
337
  * Get container resource statistics.
329
338
  */
330
339
  getContainerStats(requestParameters, initOverrides) {
@@ -0,0 +1,35 @@
1
+ /**
2
+ * ZLayer API
3
+ * Container orchestration API for ZLayer
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ export interface StreamEventsRequest {
14
+ follow?: boolean;
15
+ label?: Array<string>;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class EventsApi extends runtime.BaseAPI {
21
+ /**
22
+ * Creates request options for streamEvents without sending the request
23
+ */
24
+ streamEventsRequestOpts(requestParameters: StreamEventsRequest): Promise<runtime.RequestOpts>;
25
+ /**
26
+ * # Errors Returns `400` if a `label` query parameter is malformed, `401` if the caller is not authenticated.
27
+ * Stream container lifecycle events as Server-Sent Events.
28
+ */
29
+ streamEventsRaw(requestParameters: StreamEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
30
+ /**
31
+ * # Errors Returns `400` if a `label` query parameter is malformed, `401` if the caller is not authenticated.
32
+ * Stream container lifecycle events as Server-Sent Events.
33
+ */
34
+ streamEvents(requestParameters?: StreamEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
35
+ }