@zlayer/api-client 0.10.86

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 (771) hide show
  1. package/.openapi-generator/FILES +387 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +434 -0
  5. package/dist/apis/AuditApi.d.ts +39 -0
  6. package/dist/apis/AuditApi.js +85 -0
  7. package/dist/apis/AuthenticationApi.d.ts +107 -0
  8. package/dist/apis/AuthenticationApi.js +265 -0
  9. package/dist/apis/BuildApi.d.ts +126 -0
  10. package/dist/apis/BuildApi.js +353 -0
  11. package/dist/apis/ClusterApi.d.ts +83 -0
  12. package/dist/apis/ClusterApi.js +209 -0
  13. package/dist/apis/ContainersApi.d.ts +228 -0
  14. package/dist/apis/ContainersApi.js +635 -0
  15. package/dist/apis/CredentialsApi.d.ts +114 -0
  16. package/dist/apis/CredentialsApi.js +313 -0
  17. package/dist/apis/CronApi.d.ts +100 -0
  18. package/dist/apis/CronApi.js +269 -0
  19. package/dist/apis/DeploymentsApi.d.ts +83 -0
  20. package/dist/apis/DeploymentsApi.js +221 -0
  21. package/dist/apis/EnvironmentsApi.d.ts +104 -0
  22. package/dist/apis/EnvironmentsApi.js +277 -0
  23. package/dist/apis/GroupsApi.d.ts +137 -0
  24. package/dist/apis/GroupsApi.js +328 -0
  25. package/dist/apis/HealthApi.d.ts +42 -0
  26. package/dist/apis/HealthApi.js +103 -0
  27. package/dist/apis/ImagesApi.d.ts +98 -0
  28. package/dist/apis/ImagesApi.js +268 -0
  29. package/dist/apis/InternalApi.d.ts +52 -0
  30. package/dist/apis/InternalApi.js +116 -0
  31. package/dist/apis/JobsApi.d.ts +88 -0
  32. package/dist/apis/JobsApi.js +230 -0
  33. package/dist/apis/NetworksApi.d.ts +101 -0
  34. package/dist/apis/NetworksApi.js +289 -0
  35. package/dist/apis/NodesApi.d.ts +81 -0
  36. package/dist/apis/NodesApi.js +222 -0
  37. package/dist/apis/NotifiersApi.d.ts +118 -0
  38. package/dist/apis/NotifiersApi.js +322 -0
  39. package/dist/apis/OverlayApi.d.ts +74 -0
  40. package/dist/apis/OverlayApi.js +181 -0
  41. package/dist/apis/PermissionsApi.d.ts +70 -0
  42. package/dist/apis/PermissionsApi.js +158 -0
  43. package/dist/apis/ProjectsApi.d.ts +171 -0
  44. package/dist/apis/ProjectsApi.js +473 -0
  45. package/dist/apis/ProxyApi.d.ts +74 -0
  46. package/dist/apis/ProxyApi.js +209 -0
  47. package/dist/apis/SecretsApi.d.ts +112 -0
  48. package/dist/apis/SecretsApi.js +303 -0
  49. package/dist/apis/ServicesApi.d.ts +93 -0
  50. package/dist/apis/ServicesApi.js +256 -0
  51. package/dist/apis/StorageApi.d.ts +32 -0
  52. package/dist/apis/StorageApi.js +77 -0
  53. package/dist/apis/SyncsApi.d.ts +100 -0
  54. package/dist/apis/SyncsApi.js +269 -0
  55. package/dist/apis/TasksApi.d.ts +120 -0
  56. package/dist/apis/TasksApi.js +320 -0
  57. package/dist/apis/TunnelsApi.d.ts +117 -0
  58. package/dist/apis/TunnelsApi.js +319 -0
  59. package/dist/apis/UsersApi.d.ts +119 -0
  60. package/dist/apis/UsersApi.js +284 -0
  61. package/dist/apis/VariablesApi.d.ts +104 -0
  62. package/dist/apis/VariablesApi.js +277 -0
  63. package/dist/apis/VolumesApi.d.ts +50 -0
  64. package/dist/apis/VolumesApi.js +130 -0
  65. package/dist/apis/WebhooksApi.d.ts +71 -0
  66. package/dist/apis/WebhooksApi.js +179 -0
  67. package/dist/apis/WorkflowsApi.d.ts +117 -0
  68. package/dist/apis/WorkflowsApi.js +317 -0
  69. package/dist/apis/index.d.ts +32 -0
  70. package/dist/apis/index.js +50 -0
  71. package/dist/index.d.ts +3 -0
  72. package/dist/index.js +21 -0
  73. package/dist/models/AddMemberRequest.d.ts +32 -0
  74. package/dist/models/AddMemberRequest.js +50 -0
  75. package/dist/models/AuditEntry.d.ts +83 -0
  76. package/dist/models/AuditEntry.js +74 -0
  77. package/dist/models/BackendGroupInfo.d.ts +57 -0
  78. package/dist/models/BackendGroupInfo.js +67 -0
  79. package/dist/models/BackendInfo.d.ts +50 -0
  80. package/dist/models/BackendInfo.js +62 -0
  81. package/dist/models/BackendsResponse.d.ts +39 -0
  82. package/dist/models/BackendsResponse.js +55 -0
  83. package/dist/models/BootstrapRequest.d.ts +44 -0
  84. package/dist/models/BootstrapRequest.js +56 -0
  85. package/dist/models/BuildKind.d.ts +27 -0
  86. package/dist/models/BuildKind.js +53 -0
  87. package/dist/models/BuildRequest.d.ts +64 -0
  88. package/dist/models/BuildRequest.js +58 -0
  89. package/dist/models/BuildRequestWithContext.d.ts +70 -0
  90. package/dist/models/BuildRequestWithContext.js +62 -0
  91. package/dist/models/BuildStateEnum.d.ts +27 -0
  92. package/dist/models/BuildStateEnum.js +53 -0
  93. package/dist/models/BuildStatus.d.ts +63 -0
  94. package/dist/models/BuildStatus.js +65 -0
  95. package/dist/models/BulkImportResponse.d.ts +44 -0
  96. package/dist/models/BulkImportResponse.js +58 -0
  97. package/dist/models/CertInfo.d.ts +56 -0
  98. package/dist/models/CertInfo.js +60 -0
  99. package/dist/models/ClusterJoinRequest.d.ts +99 -0
  100. package/dist/models/ClusterJoinRequest.js +81 -0
  101. package/dist/models/ClusterJoinResponse.d.ts +57 -0
  102. package/dist/models/ClusterJoinResponse.js +67 -0
  103. package/dist/models/ClusterNodeSummary.d.ts +110 -0
  104. package/dist/models/ClusterNodeSummary.js +102 -0
  105. package/dist/models/ClusterPeer.d.ts +68 -0
  106. package/dist/models/ClusterPeer.js +74 -0
  107. package/dist/models/ContainerExecRequest.d.ts +32 -0
  108. package/dist/models/ContainerExecRequest.js +50 -0
  109. package/dist/models/ContainerExecResponse.d.ts +44 -0
  110. package/dist/models/ContainerExecResponse.js +58 -0
  111. package/dist/models/ContainerInfo.d.ts +70 -0
  112. package/dist/models/ContainerInfo.js +70 -0
  113. package/dist/models/ContainerResourceLimits.d.ts +38 -0
  114. package/dist/models/ContainerResourceLimits.js +50 -0
  115. package/dist/models/ContainerStatsResponse.d.ts +56 -0
  116. package/dist/models/ContainerStatsResponse.js +66 -0
  117. package/dist/models/ContainerWaitResponse.d.ts +38 -0
  118. package/dist/models/ContainerWaitResponse.js +54 -0
  119. package/dist/models/CreateContainerRequest.d.ts +86 -0
  120. package/dist/models/CreateContainerRequest.js +68 -0
  121. package/dist/models/CreateDeploymentRequest.d.ts +32 -0
  122. package/dist/models/CreateDeploymentRequest.js +50 -0
  123. package/dist/models/CreateEnvironmentRequest.d.ts +44 -0
  124. package/dist/models/CreateEnvironmentRequest.js +54 -0
  125. package/dist/models/CreateGitCredentialRequest.d.ts +45 -0
  126. package/dist/models/CreateGitCredentialRequest.js +59 -0
  127. package/dist/models/CreateGroupRequest.d.ts +38 -0
  128. package/dist/models/CreateGroupRequest.js +52 -0
  129. package/dist/models/CreateNodeTunnelRequest.d.ts +62 -0
  130. package/dist/models/CreateNodeTunnelRequest.js +68 -0
  131. package/dist/models/CreateNodeTunnelResponse.d.ts +68 -0
  132. package/dist/models/CreateNodeTunnelResponse.js +74 -0
  133. package/dist/models/CreateNotifierRequest.d.ts +46 -0
  134. package/dist/models/CreateNotifierRequest.js +60 -0
  135. package/dist/models/CreateProjectRequest.d.ts +100 -0
  136. package/dist/models/CreateProjectRequest.js +73 -0
  137. package/dist/models/CreateRegistryCredentialRequest.d.ts +51 -0
  138. package/dist/models/CreateRegistryCredentialRequest.js +63 -0
  139. package/dist/models/CreateSecretRequest.d.ts +48 -0
  140. package/dist/models/CreateSecretRequest.js +56 -0
  141. package/dist/models/CreateSyncRequest.d.ts +57 -0
  142. package/dist/models/CreateSyncRequest.js +60 -0
  143. package/dist/models/CreateTaskRequest.d.ts +51 -0
  144. package/dist/models/CreateTaskRequest.js +61 -0
  145. package/dist/models/CreateTunnelRequest.d.ts +44 -0
  146. package/dist/models/CreateTunnelRequest.js +54 -0
  147. package/dist/models/CreateTunnelResponse.d.ts +62 -0
  148. package/dist/models/CreateTunnelResponse.js +70 -0
  149. package/dist/models/CreateUserRequest.d.ts +51 -0
  150. package/dist/models/CreateUserRequest.js +61 -0
  151. package/dist/models/CreateVariableRequest.d.ts +45 -0
  152. package/dist/models/CreateVariableRequest.js +56 -0
  153. package/dist/models/CreateWorkflowRequest.d.ts +45 -0
  154. package/dist/models/CreateWorkflowRequest.js +57 -0
  155. package/dist/models/CronJobResponse.d.ts +56 -0
  156. package/dist/models/CronJobResponse.js +62 -0
  157. package/dist/models/CronStatusResponse.d.ts +44 -0
  158. package/dist/models/CronStatusResponse.js +58 -0
  159. package/dist/models/CsrfResponse.d.ts +32 -0
  160. package/dist/models/CsrfResponse.js +50 -0
  161. package/dist/models/DeploymentDetails.d.ts +63 -0
  162. package/dist/models/DeploymentDetails.js +71 -0
  163. package/dist/models/DeploymentSummary.d.ts +50 -0
  164. package/dist/models/DeploymentSummary.js +62 -0
  165. package/dist/models/DnsStatusResponse.d.ts +62 -0
  166. package/dist/models/DnsStatusResponse.js +64 -0
  167. package/dist/models/ForceLeaderRequest.d.ts +32 -0
  168. package/dist/models/ForceLeaderRequest.js +50 -0
  169. package/dist/models/ForceLeaderResponse.d.ts +50 -0
  170. package/dist/models/ForceLeaderResponse.js +62 -0
  171. package/dist/models/GitCredentialKindSchema.d.ts +25 -0
  172. package/dist/models/GitCredentialKindSchema.js +51 -0
  173. package/dist/models/GitCredentialResponse.d.ts +45 -0
  174. package/dist/models/GitCredentialResponse.js +59 -0
  175. package/dist/models/GpuInfoSummary.d.ts +44 -0
  176. package/dist/models/GpuInfoSummary.js +58 -0
  177. package/dist/models/GpuUtilizationReport.d.ts +62 -0
  178. package/dist/models/GpuUtilizationReport.js +66 -0
  179. package/dist/models/GrantPermissionRequest.d.ts +58 -0
  180. package/dist/models/GrantPermissionRequest.js +66 -0
  181. package/dist/models/GroupMembersResponse.d.ts +38 -0
  182. package/dist/models/GroupMembersResponse.js +54 -0
  183. package/dist/models/HealthResponse.d.ts +50 -0
  184. package/dist/models/HealthResponse.js +58 -0
  185. package/dist/models/HeartbeatRequest.d.ts +57 -0
  186. package/dist/models/HeartbeatRequest.js +65 -0
  187. package/dist/models/ImageInfoDto.d.ts +45 -0
  188. package/dist/models/ImageInfoDto.js +54 -0
  189. package/dist/models/InternalScaleRequest.d.ts +38 -0
  190. package/dist/models/InternalScaleRequest.js +54 -0
  191. package/dist/models/InternalScaleResponse.d.ts +50 -0
  192. package/dist/models/InternalScaleResponse.js +60 -0
  193. package/dist/models/IpAllocationResponse.d.ts +62 -0
  194. package/dist/models/IpAllocationResponse.js +68 -0
  195. package/dist/models/JobExecutionResponse.d.ts +86 -0
  196. package/dist/models/JobExecutionResponse.js +74 -0
  197. package/dist/models/JoinTokenResponse.d.ts +62 -0
  198. package/dist/models/JoinTokenResponse.js +70 -0
  199. package/dist/models/KillContainerRequest.d.ts +34 -0
  200. package/dist/models/KillContainerRequest.js +48 -0
  201. package/dist/models/LinkDeploymentRequest.d.ts +32 -0
  202. package/dist/models/LinkDeploymentRequest.js +50 -0
  203. package/dist/models/LoginRequest.d.ts +38 -0
  204. package/dist/models/LoginRequest.js +54 -0
  205. package/dist/models/LoginResponse.d.ts +39 -0
  206. package/dist/models/LoginResponse.js +55 -0
  207. package/dist/models/NetworkSummary.d.ts +56 -0
  208. package/dist/models/NetworkSummary.js +64 -0
  209. package/dist/models/NodeDetails.d.ts +89 -0
  210. package/dist/models/NodeDetails.js +87 -0
  211. package/dist/models/NodeResourceInfo.d.ts +62 -0
  212. package/dist/models/NodeResourceInfo.js +70 -0
  213. package/dist/models/NodeSummary.d.ts +64 -0
  214. package/dist/models/NodeSummary.js +70 -0
  215. package/dist/models/NotifierConfig.d.ts +25 -0
  216. package/dist/models/NotifierConfig.js +71 -0
  217. package/dist/models/NotifierConfigOneOf.d.ts +45 -0
  218. package/dist/models/NotifierConfigOneOf.js +61 -0
  219. package/dist/models/NotifierConfigOneOf1.d.ts +45 -0
  220. package/dist/models/NotifierConfigOneOf1.js +61 -0
  221. package/dist/models/NotifierConfigOneOf2.d.ts +59 -0
  222. package/dist/models/NotifierConfigOneOf2.js +65 -0
  223. package/dist/models/NotifierConfigOneOf3.d.ts +75 -0
  224. package/dist/models/NotifierConfigOneOf3.js +81 -0
  225. package/dist/models/NotifierKind.d.ts +27 -0
  226. package/dist/models/NotifierKind.js +53 -0
  227. package/dist/models/OverlayStatusResponse.d.ts +80 -0
  228. package/dist/models/OverlayStatusResponse.js +82 -0
  229. package/dist/models/PeerInfo.d.ts +68 -0
  230. package/dist/models/PeerInfo.js +68 -0
  231. package/dist/models/PeerListResponse.d.ts +45 -0
  232. package/dist/models/PeerListResponse.js +59 -0
  233. package/dist/models/PermissionLevel.d.ts +28 -0
  234. package/dist/models/PermissionLevel.js +54 -0
  235. package/dist/models/ProjectPullResponse.d.ts +56 -0
  236. package/dist/models/ProjectPullResponse.js +66 -0
  237. package/dist/models/PruneResultDto.d.ts +38 -0
  238. package/dist/models/PruneResultDto.js +54 -0
  239. package/dist/models/PullImageRequest.d.ts +39 -0
  240. package/dist/models/PullImageRequest.js +52 -0
  241. package/dist/models/PullImageResponse.d.ts +46 -0
  242. package/dist/models/PullImageResponse.js +54 -0
  243. package/dist/models/RegisteredServiceInfo.d.ts +62 -0
  244. package/dist/models/RegisteredServiceInfo.js +70 -0
  245. package/dist/models/RegistryAuthTypeSchema.d.ts +25 -0
  246. package/dist/models/RegistryAuthTypeSchema.js +51 -0
  247. package/dist/models/RegistryCredentialResponse.d.ts +51 -0
  248. package/dist/models/RegistryCredentialResponse.js +63 -0
  249. package/dist/models/ReplicationInfo.d.ts +50 -0
  250. package/dist/models/ReplicationInfo.js +60 -0
  251. package/dist/models/RestartContainerRequest.d.ts +34 -0
  252. package/dist/models/RestartContainerRequest.js +48 -0
  253. package/dist/models/RouteInfo.d.ts +80 -0
  254. package/dist/models/RouteInfo.js +80 -0
  255. package/dist/models/RoutesResponse.d.ts +39 -0
  256. package/dist/models/RoutesResponse.js +55 -0
  257. package/dist/models/ScaleRequest.d.ts +32 -0
  258. package/dist/models/ScaleRequest.js +50 -0
  259. package/dist/models/SecretMetadataResponse.d.ts +58 -0
  260. package/dist/models/SecretMetadataResponse.js +64 -0
  261. package/dist/models/ServiceDetails.d.ts +70 -0
  262. package/dist/models/ServiceDetails.js +76 -0
  263. package/dist/models/ServiceEndpoint.d.ts +50 -0
  264. package/dist/models/ServiceEndpoint.js +60 -0
  265. package/dist/models/ServiceHealthInfo.d.ts +56 -0
  266. package/dist/models/ServiceHealthInfo.js +66 -0
  267. package/dist/models/ServiceMetrics.d.ts +44 -0
  268. package/dist/models/ServiceMetrics.js +56 -0
  269. package/dist/models/ServiceSummary.d.ts +63 -0
  270. package/dist/models/ServiceSummary.js +71 -0
  271. package/dist/models/SetPasswordRequest.d.ts +39 -0
  272. package/dist/models/SetPasswordRequest.js +52 -0
  273. package/dist/models/StepResult.d.ts +44 -0
  274. package/dist/models/StepResult.js +56 -0
  275. package/dist/models/StopContainerRequest.d.ts +34 -0
  276. package/dist/models/StopContainerRequest.js +48 -0
  277. package/dist/models/StorageStatusResponse.d.ts +33 -0
  278. package/dist/models/StorageStatusResponse.js +51 -0
  279. package/dist/models/StoredEnvironment.d.ts +66 -0
  280. package/dist/models/StoredEnvironment.js +66 -0
  281. package/dist/models/StoredNotifier.d.ts +71 -0
  282. package/dist/models/StoredNotifier.js +76 -0
  283. package/dist/models/StoredPermission.d.ts +72 -0
  284. package/dist/models/StoredPermission.js +74 -0
  285. package/dist/models/StoredProject.d.ts +132 -0
  286. package/dist/models/StoredProject.js +87 -0
  287. package/dist/models/StoredSync.d.ts +86 -0
  288. package/dist/models/StoredSync.js +74 -0
  289. package/dist/models/StoredTask.d.ts +72 -0
  290. package/dist/models/StoredTask.js +73 -0
  291. package/dist/models/StoredUserGroup.d.ts +56 -0
  292. package/dist/models/StoredUserGroup.js +64 -0
  293. package/dist/models/StoredVariable.d.ts +68 -0
  294. package/dist/models/StoredVariable.js +68 -0
  295. package/dist/models/StoredWorkflow.d.ts +64 -0
  296. package/dist/models/StoredWorkflow.js +69 -0
  297. package/dist/models/StreamBackendInfo.d.ts +32 -0
  298. package/dist/models/StreamBackendInfo.js +50 -0
  299. package/dist/models/StreamInfo.d.ts +57 -0
  300. package/dist/models/StreamInfo.js +67 -0
  301. package/dist/models/StreamsResponse.d.ts +51 -0
  302. package/dist/models/StreamsResponse.js +63 -0
  303. package/dist/models/SubjectKind.d.ts +25 -0
  304. package/dist/models/SubjectKind.js +51 -0
  305. package/dist/models/SuccessResponse.d.ts +32 -0
  306. package/dist/models/SuccessResponse.js +50 -0
  307. package/dist/models/SyncApplyResponse.d.ts +52 -0
  308. package/dist/models/SyncApplyResponse.js +57 -0
  309. package/dist/models/SyncDiffResponse.d.ts +45 -0
  310. package/dist/models/SyncDiffResponse.js +59 -0
  311. package/dist/models/SyncResourceResponse.d.ts +44 -0
  312. package/dist/models/SyncResourceResponse.js +58 -0
  313. package/dist/models/SyncResourceResult.d.ts +57 -0
  314. package/dist/models/SyncResourceResult.js +64 -0
  315. package/dist/models/TagImageRequest.d.ts +40 -0
  316. package/dist/models/TagImageRequest.js +54 -0
  317. package/dist/models/TaskKind.d.ts +24 -0
  318. package/dist/models/TaskKind.js +50 -0
  319. package/dist/models/TaskRun.d.ts +68 -0
  320. package/dist/models/TaskRun.js +70 -0
  321. package/dist/models/TemplateInfo.d.ts +44 -0
  322. package/dist/models/TemplateInfo.js +58 -0
  323. package/dist/models/TestNotifierResponse.d.ts +38 -0
  324. package/dist/models/TestNotifierResponse.js +54 -0
  325. package/dist/models/TlsResponse.d.ts +51 -0
  326. package/dist/models/TlsResponse.js +61 -0
  327. package/dist/models/TokenRequest.d.ts +38 -0
  328. package/dist/models/TokenRequest.js +54 -0
  329. package/dist/models/TokenResponse.d.ts +44 -0
  330. package/dist/models/TokenResponse.js +58 -0
  331. package/dist/models/TriggerBuildResponse.d.ts +38 -0
  332. package/dist/models/TriggerBuildResponse.js +54 -0
  333. package/dist/models/TriggerCronResponse.d.ts +38 -0
  334. package/dist/models/TriggerCronResponse.js +54 -0
  335. package/dist/models/TriggerJobResponse.d.ts +38 -0
  336. package/dist/models/TriggerJobResponse.js +54 -0
  337. package/dist/models/TunnelStatus.d.ts +87 -0
  338. package/dist/models/TunnelStatus.js +83 -0
  339. package/dist/models/TunnelSummary.d.ts +68 -0
  340. package/dist/models/TunnelSummary.js +72 -0
  341. package/dist/models/UpdateEnvironmentRequest.d.ts +38 -0
  342. package/dist/models/UpdateEnvironmentRequest.js +50 -0
  343. package/dist/models/UpdateGroupRequest.d.ts +38 -0
  344. package/dist/models/UpdateGroupRequest.js +50 -0
  345. package/dist/models/UpdateLabelsRequest.d.ts +40 -0
  346. package/dist/models/UpdateLabelsRequest.js +54 -0
  347. package/dist/models/UpdateLabelsResponse.d.ts +34 -0
  348. package/dist/models/UpdateLabelsResponse.js +50 -0
  349. package/dist/models/UpdateNotifierRequest.d.ts +45 -0
  350. package/dist/models/UpdateNotifierRequest.js +53 -0
  351. package/dist/models/UpdateProjectRequest.d.ts +100 -0
  352. package/dist/models/UpdateProjectRequest.js +71 -0
  353. package/dist/models/UpdateUserRequest.d.ts +46 -0
  354. package/dist/models/UpdateUserRequest.js +53 -0
  355. package/dist/models/UpdateVariableRequest.d.ts +38 -0
  356. package/dist/models/UpdateVariableRequest.js +50 -0
  357. package/dist/models/UserRole.d.ts +26 -0
  358. package/dist/models/UserRole.js +52 -0
  359. package/dist/models/UserView.d.ts +62 -0
  360. package/dist/models/UserView.js +68 -0
  361. package/dist/models/VolumeMount.d.ts +44 -0
  362. package/dist/models/VolumeMount.js +56 -0
  363. package/dist/models/VolumeSummary.d.ts +44 -0
  364. package/dist/models/VolumeSummary.js +56 -0
  365. package/dist/models/WebhookInfoResponse.d.ts +38 -0
  366. package/dist/models/WebhookInfoResponse.js +54 -0
  367. package/dist/models/WebhookResponse.d.ts +38 -0
  368. package/dist/models/WebhookResponse.js +54 -0
  369. package/dist/models/WorkflowAction.d.ts +25 -0
  370. package/dist/models/WorkflowAction.js +71 -0
  371. package/dist/models/WorkflowActionOneOf.d.ts +45 -0
  372. package/dist/models/WorkflowActionOneOf.js +61 -0
  373. package/dist/models/WorkflowActionOneOf1.d.ts +45 -0
  374. package/dist/models/WorkflowActionOneOf1.js +61 -0
  375. package/dist/models/WorkflowActionOneOf2.d.ts +45 -0
  376. package/dist/models/WorkflowActionOneOf2.js +61 -0
  377. package/dist/models/WorkflowActionOneOf3.d.ts +45 -0
  378. package/dist/models/WorkflowActionOneOf3.js +61 -0
  379. package/dist/models/WorkflowRun.d.ts +64 -0
  380. package/dist/models/WorkflowRun.js +70 -0
  381. package/dist/models/WorkflowRunStatus.d.ts +27 -0
  382. package/dist/models/WorkflowRunStatus.js +53 -0
  383. package/dist/models/WorkflowStep.d.ts +45 -0
  384. package/dist/models/WorkflowStep.js +57 -0
  385. package/dist/models/index.d.ts +156 -0
  386. package/dist/models/index.js +174 -0
  387. package/dist/runtime.d.ts +184 -0
  388. package/dist/runtime.js +365 -0
  389. package/docs/AddMemberRequest.md +35 -0
  390. package/docs/AuditApi.md +89 -0
  391. package/docs/AuditEntry.md +51 -0
  392. package/docs/AuthenticationApi.md +395 -0
  393. package/docs/BackendGroupInfo.md +43 -0
  394. package/docs/BackendInfo.md +41 -0
  395. package/docs/BackendsResponse.md +37 -0
  396. package/docs/BootstrapRequest.md +39 -0
  397. package/docs/BuildApi.md +495 -0
  398. package/docs/BuildKind.md +33 -0
  399. package/docs/BuildRequest.md +45 -0
  400. package/docs/BuildRequestWithContext.md +47 -0
  401. package/docs/BuildStateEnum.md +33 -0
  402. package/docs/BuildStatus.md +45 -0
  403. package/docs/BulkImportResponse.md +39 -0
  404. package/docs/CertInfo.md +43 -0
  405. package/docs/ClusterApi.md +288 -0
  406. package/docs/ClusterJoinRequest.md +57 -0
  407. package/docs/ClusterJoinResponse.md +43 -0
  408. package/docs/ClusterNodeSummary.md +61 -0
  409. package/docs/ClusterPeer.md +47 -0
  410. package/docs/ContainerExecRequest.md +35 -0
  411. package/docs/ContainerExecResponse.md +39 -0
  412. package/docs/ContainerInfo.md +47 -0
  413. package/docs/ContainerResourceLimits.md +37 -0
  414. package/docs/ContainerStatsResponse.md +43 -0
  415. package/docs/ContainerWaitResponse.md +37 -0
  416. package/docs/ContainersApi.md +928 -0
  417. package/docs/CreateContainerRequest.md +51 -0
  418. package/docs/CreateDeploymentRequest.md +35 -0
  419. package/docs/CreateEnvironmentRequest.md +39 -0
  420. package/docs/CreateGitCredentialRequest.md +39 -0
  421. package/docs/CreateGroupRequest.md +37 -0
  422. package/docs/CreateNodeTunnelRequest.md +45 -0
  423. package/docs/CreateNodeTunnelResponse.md +47 -0
  424. package/docs/CreateNotifierRequest.md +39 -0
  425. package/docs/CreateProjectRequest.md +57 -0
  426. package/docs/CreateRegistryCredentialRequest.md +41 -0
  427. package/docs/CreateSecretRequest.md +39 -0
  428. package/docs/CreateSyncRequest.md +43 -0
  429. package/docs/CreateTaskRequest.md +41 -0
  430. package/docs/CreateTunnelRequest.md +39 -0
  431. package/docs/CreateTunnelResponse.md +45 -0
  432. package/docs/CreateUserRequest.md +41 -0
  433. package/docs/CreateVariableRequest.md +39 -0
  434. package/docs/CreateWorkflowRequest.md +39 -0
  435. package/docs/CredentialsApi.md +434 -0
  436. package/docs/CronApi.md +369 -0
  437. package/docs/CronJobResponse.md +43 -0
  438. package/docs/CronStatusResponse.md +39 -0
  439. package/docs/CsrfResponse.md +34 -0
  440. package/docs/DeploymentDetails.md +45 -0
  441. package/docs/DeploymentSummary.md +41 -0
  442. package/docs/DeploymentsApi.md +295 -0
  443. package/docs/DnsStatusResponse.md +45 -0
  444. package/docs/EnvironmentsApi.md +383 -0
  445. package/docs/ForceLeaderRequest.md +35 -0
  446. package/docs/ForceLeaderResponse.md +41 -0
  447. package/docs/GitCredentialKindSchema.md +33 -0
  448. package/docs/GitCredentialResponse.md +39 -0
  449. package/docs/GpuInfoSummary.md +39 -0
  450. package/docs/GpuUtilizationReport.md +45 -0
  451. package/docs/GrantPermissionRequest.md +43 -0
  452. package/docs/GroupMembersResponse.md +37 -0
  453. package/docs/GroupsApi.md +497 -0
  454. package/docs/HealthApi.md +125 -0
  455. package/docs/HealthResponse.md +41 -0
  456. package/docs/HeartbeatRequest.md +43 -0
  457. package/docs/ImageInfoDto.md +39 -0
  458. package/docs/ImagesApi.md +372 -0
  459. package/docs/InternalApi.md +149 -0
  460. package/docs/InternalScaleRequest.md +37 -0
  461. package/docs/InternalScaleResponse.md +41 -0
  462. package/docs/IpAllocationResponse.md +45 -0
  463. package/docs/JobExecutionResponse.md +53 -0
  464. package/docs/JobsApi.md +311 -0
  465. package/docs/JoinTokenResponse.md +45 -0
  466. package/docs/KillContainerRequest.md +35 -0
  467. package/docs/LinkDeploymentRequest.md +35 -0
  468. package/docs/LoginRequest.md +36 -0
  469. package/docs/LoginResponse.md +37 -0
  470. package/docs/NetworkSummary.md +43 -0
  471. package/docs/NetworksApi.md +377 -0
  472. package/docs/NodeDetails.md +53 -0
  473. package/docs/NodeResourceInfo.md +45 -0
  474. package/docs/NodeSummary.md +45 -0
  475. package/docs/NodesApi.md +292 -0
  476. package/docs/NotifierConfig.md +55 -0
  477. package/docs/NotifierConfigOneOf.md +37 -0
  478. package/docs/NotifierConfigOneOf1.md +37 -0
  479. package/docs/NotifierConfigOneOf2.md +41 -0
  480. package/docs/NotifierConfigOneOf3.md +47 -0
  481. package/docs/NotifierKind.md +33 -0
  482. package/docs/NotifiersApi.md +446 -0
  483. package/docs/OverlayApi.md +251 -0
  484. package/docs/OverlayStatusResponse.md +51 -0
  485. package/docs/PeerInfo.md +47 -0
  486. package/docs/PeerListResponse.md +39 -0
  487. package/docs/PermissionLevel.md +33 -0
  488. package/docs/PermissionsApi.md +220 -0
  489. package/docs/ProjectPullResponse.md +43 -0
  490. package/docs/ProjectsApi.md +676 -0
  491. package/docs/ProxyApi.md +268 -0
  492. package/docs/PruneResultDto.md +37 -0
  493. package/docs/PullImageRequest.md +37 -0
  494. package/docs/PullImageResponse.md +39 -0
  495. package/docs/RegisteredServiceInfo.md +45 -0
  496. package/docs/RegistryAuthTypeSchema.md +33 -0
  497. package/docs/RegistryCredentialResponse.md +41 -0
  498. package/docs/ReplicationInfo.md +41 -0
  499. package/docs/RestartContainerRequest.md +35 -0
  500. package/docs/RouteInfo.md +51 -0
  501. package/docs/RoutesResponse.md +37 -0
  502. package/docs/ScaleRequest.md +35 -0
  503. package/docs/SecretMetadataResponse.md +43 -0
  504. package/docs/SecretsApi.md +411 -0
  505. package/docs/ServiceDetails.md +47 -0
  506. package/docs/ServiceEndpoint.md +41 -0
  507. package/docs/ServiceHealthInfo.md +43 -0
  508. package/docs/ServiceMetrics.md +39 -0
  509. package/docs/ServiceSummary.md +45 -0
  510. package/docs/ServicesApi.md +326 -0
  511. package/docs/SetPasswordRequest.md +37 -0
  512. package/docs/StepResult.md +39 -0
  513. package/docs/StopContainerRequest.md +35 -0
  514. package/docs/StorageApi.md +73 -0
  515. package/docs/StorageStatusResponse.md +35 -0
  516. package/docs/StoredEnvironment.md +45 -0
  517. package/docs/StoredNotifier.md +47 -0
  518. package/docs/StoredPermission.md +47 -0
  519. package/docs/StoredProject.md +65 -0
  520. package/docs/StoredSync.md +51 -0
  521. package/docs/StoredTask.md +47 -0
  522. package/docs/StoredUserGroup.md +43 -0
  523. package/docs/StoredVariable.md +45 -0
  524. package/docs/StoredWorkflow.md +45 -0
  525. package/docs/StreamBackendInfo.md +35 -0
  526. package/docs/StreamInfo.md +43 -0
  527. package/docs/StreamsResponse.md +41 -0
  528. package/docs/SubjectKind.md +33 -0
  529. package/docs/SuccessResponse.md +35 -0
  530. package/docs/SyncApplyResponse.md +39 -0
  531. package/docs/SyncDiffResponse.md +39 -0
  532. package/docs/SyncResourceResponse.md +39 -0
  533. package/docs/SyncResourceResult.md +43 -0
  534. package/docs/SyncsApi.md +365 -0
  535. package/docs/TagImageRequest.md +37 -0
  536. package/docs/TaskKind.md +33 -0
  537. package/docs/TaskRun.md +47 -0
  538. package/docs/TasksApi.md +450 -0
  539. package/docs/TemplateInfo.md +39 -0
  540. package/docs/TestNotifierResponse.md +37 -0
  541. package/docs/TlsResponse.md +41 -0
  542. package/docs/TokenRequest.md +37 -0
  543. package/docs/TokenResponse.md +39 -0
  544. package/docs/TriggerBuildResponse.md +37 -0
  545. package/docs/TriggerCronResponse.md +37 -0
  546. package/docs/TriggerJobResponse.md +37 -0
  547. package/docs/TunnelStatus.md +53 -0
  548. package/docs/TunnelSummary.md +47 -0
  549. package/docs/TunnelsApi.md +445 -0
  550. package/docs/UpdateEnvironmentRequest.md +37 -0
  551. package/docs/UpdateGroupRequest.md +37 -0
  552. package/docs/UpdateLabelsRequest.md +37 -0
  553. package/docs/UpdateLabelsResponse.md +35 -0
  554. package/docs/UpdateNotifierRequest.md +39 -0
  555. package/docs/UpdateProjectRequest.md +57 -0
  556. package/docs/UpdateUserRequest.md +39 -0
  557. package/docs/UpdateVariableRequest.md +37 -0
  558. package/docs/UserRole.md +33 -0
  559. package/docs/UserView.md +45 -0
  560. package/docs/UsersApi.md +427 -0
  561. package/docs/VariablesApi.md +382 -0
  562. package/docs/VolumeMount.md +39 -0
  563. package/docs/VolumeSummary.md +39 -0
  564. package/docs/VolumesApi.md +152 -0
  565. package/docs/WebhookInfoResponse.md +37 -0
  566. package/docs/WebhookResponse.md +37 -0
  567. package/docs/WebhooksApi.md +233 -0
  568. package/docs/WorkflowAction.md +41 -0
  569. package/docs/WorkflowActionOneOf.md +37 -0
  570. package/docs/WorkflowActionOneOf1.md +37 -0
  571. package/docs/WorkflowActionOneOf2.md +37 -0
  572. package/docs/WorkflowActionOneOf3.md +37 -0
  573. package/docs/WorkflowRun.md +45 -0
  574. package/docs/WorkflowRunStatus.md +33 -0
  575. package/docs/WorkflowStep.md +39 -0
  576. package/docs/WorkflowsApi.md +441 -0
  577. package/package.json +19 -0
  578. package/src/apis/AuditApi.ts +97 -0
  579. package/src/apis/AuthenticationApi.ts +319 -0
  580. package/src/apis/BuildApi.ts +411 -0
  581. package/src/apis/ClusterApi.ts +258 -0
  582. package/src/apis/ContainersApi.ts +813 -0
  583. package/src/apis/CredentialsApi.ts +371 -0
  584. package/src/apis/CronApi.ts +319 -0
  585. package/src/apis/DeploymentsApi.ts +261 -0
  586. package/src/apis/EnvironmentsApi.ts +339 -0
  587. package/src/apis/GroupsApi.ts +414 -0
  588. package/src/apis/HealthApi.ts +104 -0
  589. package/src/apis/ImagesApi.ts +320 -0
  590. package/src/apis/InternalApi.ts +137 -0
  591. package/src/apis/JobsApi.ts +278 -0
  592. package/src/apis/NetworksApi.ts +337 -0
  593. package/src/apis/NodesApi.ts +265 -0
  594. package/src/apis/NotifiersApi.ts +393 -0
  595. package/src/apis/OverlayApi.ts +195 -0
  596. package/src/apis/PermissionsApi.ts +188 -0
  597. package/src/apis/ProjectsApi.ts +591 -0
  598. package/src/apis/ProxyApi.ts +227 -0
  599. package/src/apis/SecretsApi.ts +382 -0
  600. package/src/apis/ServicesApi.ts +329 -0
  601. package/src/apis/StorageApi.ts +77 -0
  602. package/src/apis/SyncsApi.ts +323 -0
  603. package/src/apis/TasksApi.ts +387 -0
  604. package/src/apis/TunnelsApi.ts +394 -0
  605. package/src/apis/UsersApi.ts +355 -0
  606. package/src/apis/VariablesApi.ts +339 -0
  607. package/src/apis/VolumesApi.ts +147 -0
  608. package/src/apis/WebhooksApi.ts +222 -0
  609. package/src/apis/WorkflowsApi.ts +379 -0
  610. package/src/apis/index.ts +34 -0
  611. package/src/index.ts +5 -0
  612. package/src/models/AddMemberRequest.ts +66 -0
  613. package/src/models/AuditEntry.ts +137 -0
  614. package/src/models/BackendGroupInfo.ts +110 -0
  615. package/src/models/BackendInfo.ts +93 -0
  616. package/src/models/BackendsResponse.ts +83 -0
  617. package/src/models/BootstrapRequest.ts +83 -0
  618. package/src/models/BuildKind.ts +55 -0
  619. package/src/models/BuildRequest.ts +105 -0
  620. package/src/models/BuildRequestWithContext.ts +114 -0
  621. package/src/models/BuildStateEnum.ts +55 -0
  622. package/src/models/BuildStatus.ts +118 -0
  623. package/src/models/BulkImportResponse.ts +84 -0
  624. package/src/models/CertInfo.ts +99 -0
  625. package/src/models/ClusterJoinRequest.ts +166 -0
  626. package/src/models/ClusterJoinResponse.ts +110 -0
  627. package/src/models/ClusterNodeSummary.ts +183 -0
  628. package/src/models/ClusterPeer.ts +120 -0
  629. package/src/models/ContainerExecRequest.ts +66 -0
  630. package/src/models/ContainerExecResponse.ts +84 -0
  631. package/src/models/ContainerInfo.ts +118 -0
  632. package/src/models/ContainerResourceLimits.ts +73 -0
  633. package/src/models/ContainerStatsResponse.ts +102 -0
  634. package/src/models/ContainerWaitResponse.ts +75 -0
  635. package/src/models/CreateContainerRequest.ts +145 -0
  636. package/src/models/CreateDeploymentRequest.ts +66 -0
  637. package/src/models/CreateEnvironmentRequest.ts +82 -0
  638. package/src/models/CreateGitCredentialRequest.ts +94 -0
  639. package/src/models/CreateGroupRequest.ts +74 -0
  640. package/src/models/CreateNodeTunnelRequest.ts +110 -0
  641. package/src/models/CreateNodeTunnelResponse.ts +120 -0
  642. package/src/models/CreateNotifierRequest.ts +101 -0
  643. package/src/models/CreateProjectRequest.ts +165 -0
  644. package/src/models/CreateRegistryCredentialRequest.ts +103 -0
  645. package/src/models/CreateSecretRequest.ts +87 -0
  646. package/src/models/CreateSyncRequest.ts +100 -0
  647. package/src/models/CreateTaskRequest.ts +102 -0
  648. package/src/models/CreateTunnelRequest.ts +82 -0
  649. package/src/models/CreateTunnelResponse.ts +111 -0
  650. package/src/models/CreateUserRequest.ts +102 -0
  651. package/src/models/CreateVariableRequest.ts +84 -0
  652. package/src/models/CreateWorkflowRequest.ts +91 -0
  653. package/src/models/CronJobResponse.ts +100 -0
  654. package/src/models/CronStatusResponse.ts +84 -0
  655. package/src/models/CsrfResponse.ts +66 -0
  656. package/src/models/DeploymentDetails.ts +119 -0
  657. package/src/models/DeploymentSummary.ts +93 -0
  658. package/src/models/DnsStatusResponse.ts +108 -0
  659. package/src/models/ForceLeaderRequest.ts +66 -0
  660. package/src/models/ForceLeaderResponse.ts +93 -0
  661. package/src/models/GitCredentialKindSchema.ts +53 -0
  662. package/src/models/GitCredentialResponse.ts +94 -0
  663. package/src/models/GpuInfoSummary.ts +84 -0
  664. package/src/models/GpuUtilizationReport.ts +109 -0
  665. package/src/models/GrantPermissionRequest.ts +118 -0
  666. package/src/models/GroupMembersResponse.ts +75 -0
  667. package/src/models/HealthResponse.ts +91 -0
  668. package/src/models/HeartbeatRequest.ts +109 -0
  669. package/src/models/ImageInfoDto.ts +83 -0
  670. package/src/models/InternalScaleRequest.ts +75 -0
  671. package/src/models/InternalScaleResponse.ts +92 -0
  672. package/src/models/IpAllocationResponse.ts +110 -0
  673. package/src/models/JobExecutionResponse.ts +141 -0
  674. package/src/models/JoinTokenResponse.ts +111 -0
  675. package/src/models/KillContainerRequest.ts +67 -0
  676. package/src/models/LinkDeploymentRequest.ts +66 -0
  677. package/src/models/LoginRequest.ts +75 -0
  678. package/src/models/LoginResponse.ts +83 -0
  679. package/src/models/NetworkSummary.ts +101 -0
  680. package/src/models/NodeDetails.ts +155 -0
  681. package/src/models/NodeResourceInfo.ts +111 -0
  682. package/src/models/NodeSummary.ts +111 -0
  683. package/src/models/NotifierConfig.ts +102 -0
  684. package/src/models/NotifierConfigOneOf.ts +85 -0
  685. package/src/models/NotifierConfigOneOf1.ts +85 -0
  686. package/src/models/NotifierConfigOneOf2.ts +101 -0
  687. package/src/models/NotifierConfigOneOf3.ts +130 -0
  688. package/src/models/NotifierKind.ts +55 -0
  689. package/src/models/OverlayStatusResponse.ts +138 -0
  690. package/src/models/PeerInfo.ts +117 -0
  691. package/src/models/PeerListResponse.ts +92 -0
  692. package/src/models/PermissionLevel.ts +56 -0
  693. package/src/models/ProjectPullResponse.ts +102 -0
  694. package/src/models/PruneResultDto.ts +75 -0
  695. package/src/models/PullImageRequest.ts +75 -0
  696. package/src/models/PullImageResponse.ts +84 -0
  697. package/src/models/RegisteredServiceInfo.ts +111 -0
  698. package/src/models/RegistryAuthTypeSchema.ts +53 -0
  699. package/src/models/RegistryCredentialResponse.ts +103 -0
  700. package/src/models/ReplicationInfo.ts +92 -0
  701. package/src/models/RestartContainerRequest.ts +67 -0
  702. package/src/models/RouteInfo.ts +137 -0
  703. package/src/models/RoutesResponse.ts +83 -0
  704. package/src/models/ScaleRequest.ts +66 -0
  705. package/src/models/SecretMetadataResponse.ts +103 -0
  706. package/src/models/ServiceDetails.ts +135 -0
  707. package/src/models/ServiceEndpoint.ts +92 -0
  708. package/src/models/ServiceHealthInfo.ts +102 -0
  709. package/src/models/ServiceMetrics.ts +83 -0
  710. package/src/models/ServiceSummary.ts +119 -0
  711. package/src/models/SetPasswordRequest.ts +75 -0
  712. package/src/models/StepResult.ts +83 -0
  713. package/src/models/StopContainerRequest.ts +67 -0
  714. package/src/models/StorageStatusResponse.ts +74 -0
  715. package/src/models/StoredEnvironment.ts +113 -0
  716. package/src/models/StoredNotifier.ts +138 -0
  717. package/src/models/StoredPermission.ts +138 -0
  718. package/src/models/StoredProject.ts +208 -0
  719. package/src/models/StoredSync.ts +140 -0
  720. package/src/models/StoredTask.ts +132 -0
  721. package/src/models/StoredUserGroup.ts +101 -0
  722. package/src/models/StoredVariable.ts +116 -0
  723. package/src/models/StoredWorkflow.ts +119 -0
  724. package/src/models/StreamBackendInfo.ts +66 -0
  725. package/src/models/StreamInfo.ts +110 -0
  726. package/src/models/StreamsResponse.ts +101 -0
  727. package/src/models/SubjectKind.ts +53 -0
  728. package/src/models/SuccessResponse.ts +66 -0
  729. package/src/models/SyncApplyResponse.ts +98 -0
  730. package/src/models/SyncDiffResponse.ts +92 -0
  731. package/src/models/SyncResourceResponse.ts +84 -0
  732. package/src/models/SyncResourceResult.ts +102 -0
  733. package/src/models/TagImageRequest.ts +77 -0
  734. package/src/models/TaskKind.ts +52 -0
  735. package/src/models/TaskRun.ts +118 -0
  736. package/src/models/TemplateInfo.ts +84 -0
  737. package/src/models/TestNotifierResponse.ts +75 -0
  738. package/src/models/TlsResponse.ts +100 -0
  739. package/src/models/TokenRequest.ts +75 -0
  740. package/src/models/TokenResponse.ts +84 -0
  741. package/src/models/TriggerBuildResponse.ts +75 -0
  742. package/src/models/TriggerCronResponse.ts +75 -0
  743. package/src/models/TriggerJobResponse.ts +75 -0
  744. package/src/models/TunnelStatus.ts +153 -0
  745. package/src/models/TunnelSummary.ts +119 -0
  746. package/src/models/UpdateEnvironmentRequest.ts +73 -0
  747. package/src/models/UpdateGroupRequest.ts +73 -0
  748. package/src/models/UpdateLabelsRequest.ts +75 -0
  749. package/src/models/UpdateLabelsResponse.ts +66 -0
  750. package/src/models/UpdateNotifierRequest.ts +89 -0
  751. package/src/models/UpdateProjectRequest.ts +164 -0
  752. package/src/models/UpdateUserRequest.ts +92 -0
  753. package/src/models/UpdateVariableRequest.ts +73 -0
  754. package/src/models/UserRole.ts +54 -0
  755. package/src/models/UserView.ts +110 -0
  756. package/src/models/VolumeMount.ts +83 -0
  757. package/src/models/VolumeSummary.ts +83 -0
  758. package/src/models/WebhookInfoResponse.ts +75 -0
  759. package/src/models/WebhookResponse.ts +75 -0
  760. package/src/models/WorkflowAction.ts +102 -0
  761. package/src/models/WorkflowActionOneOf.ts +85 -0
  762. package/src/models/WorkflowActionOneOf1.ts +85 -0
  763. package/src/models/WorkflowActionOneOf2.ts +85 -0
  764. package/src/models/WorkflowActionOneOf3.ts +85 -0
  765. package/src/models/WorkflowRun.ts +127 -0
  766. package/src/models/WorkflowRunStatus.ts +55 -0
  767. package/src/models/WorkflowStep.ts +91 -0
  768. package/src/models/index.ts +158 -0
  769. package/src/runtime.ts +450 -0
  770. package/tsconfig.esm.json +7 -0
  771. package/tsconfig.json +16 -0
@@ -0,0 +1,813 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * ZLayer API
5
+ * Container orchestration API for ZLayer
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ContainerExecRequest,
19
+ ContainerExecResponse,
20
+ ContainerInfo,
21
+ ContainerStatsResponse,
22
+ ContainerWaitResponse,
23
+ CreateContainerRequest,
24
+ KillContainerRequest,
25
+ RestartContainerRequest,
26
+ StopContainerRequest,
27
+ } from '../models/index';
28
+ import {
29
+ ContainerExecRequestFromJSON,
30
+ ContainerExecRequestToJSON,
31
+ ContainerExecResponseFromJSON,
32
+ ContainerExecResponseToJSON,
33
+ ContainerInfoFromJSON,
34
+ ContainerInfoToJSON,
35
+ ContainerStatsResponseFromJSON,
36
+ ContainerStatsResponseToJSON,
37
+ ContainerWaitResponseFromJSON,
38
+ ContainerWaitResponseToJSON,
39
+ CreateContainerRequestFromJSON,
40
+ CreateContainerRequestToJSON,
41
+ KillContainerRequestFromJSON,
42
+ KillContainerRequestToJSON,
43
+ RestartContainerRequestFromJSON,
44
+ RestartContainerRequestToJSON,
45
+ StopContainerRequestFromJSON,
46
+ StopContainerRequestToJSON,
47
+ } from '../models/index';
48
+
49
+ export interface CreateContainerOperationRequest {
50
+ createContainerRequest: CreateContainerRequest;
51
+ }
52
+
53
+ export interface DeleteContainerRequest {
54
+ id: string;
55
+ }
56
+
57
+ export interface ExecInContainerRequest {
58
+ id: string;
59
+ containerExecRequest: ContainerExecRequest;
60
+ }
61
+
62
+ export interface GetContainerRequest {
63
+ id: string;
64
+ }
65
+
66
+ export interface GetContainerLogsRequest {
67
+ id: string;
68
+ tail?: number;
69
+ follow?: boolean;
70
+ }
71
+
72
+ export interface GetContainerStatsRequest {
73
+ id: string;
74
+ }
75
+
76
+ export interface KillContainerOperationRequest {
77
+ id: string;
78
+ killContainerRequest: KillContainerRequest;
79
+ }
80
+
81
+ export interface ListContainersRequest {
82
+ label?: string | null;
83
+ }
84
+
85
+ export interface RestartContainerOperationRequest {
86
+ id: string;
87
+ restartContainerRequest: RestartContainerRequest;
88
+ }
89
+
90
+ export interface StartContainerRequest {
91
+ id: string;
92
+ }
93
+
94
+ export interface StopContainerOperationRequest {
95
+ id: string;
96
+ stopContainerRequest: StopContainerRequest;
97
+ }
98
+
99
+ export interface WaitContainerRequest {
100
+ id: string;
101
+ }
102
+
103
+ /**
104
+ *
105
+ */
106
+ export class ContainersApi extends runtime.BaseAPI {
107
+
108
+ /**
109
+ * Creates request options for createContainer without sending the request
110
+ */
111
+ async createContainerRequestOpts(requestParameters: CreateContainerOperationRequest): Promise<runtime.RequestOpts> {
112
+ if (requestParameters['createContainerRequest'] == null) {
113
+ throw new runtime.RequiredError(
114
+ 'createContainerRequest',
115
+ 'Required parameter "createContainerRequest" was null or undefined when calling createContainer().'
116
+ );
117
+ }
118
+
119
+ const queryParameters: any = {};
120
+
121
+ const headerParameters: runtime.HTTPHeaders = {};
122
+
123
+ headerParameters['Content-Type'] = 'application/json';
124
+
125
+ if (this.configuration && this.configuration.accessToken) {
126
+ const token = this.configuration.accessToken;
127
+ const tokenString = await token("bearer_auth", []);
128
+
129
+ if (tokenString) {
130
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
131
+ }
132
+ }
133
+
134
+ let urlPath = `/api/v1/containers`;
135
+
136
+ return {
137
+ path: urlPath,
138
+ method: 'POST',
139
+ headers: headerParameters,
140
+ query: queryParameters,
141
+ body: CreateContainerRequestToJSON(requestParameters['createContainerRequest']),
142
+ };
143
+ }
144
+
145
+ /**
146
+ * Pulls the image if needed, creates the container, and starts it. Returns the container info including its assigned ID. # Errors Returns an error if image pull fails, container creation fails, or the user lacks the operator role.
147
+ * Create and start a container.
148
+ */
149
+ async createContainerRaw(requestParameters: CreateContainerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ContainerInfo>> {
150
+ const requestOptions = await this.createContainerRequestOpts(requestParameters);
151
+ const response = await this.request(requestOptions, initOverrides);
152
+
153
+ return new runtime.JSONApiResponse(response, (jsonValue) => ContainerInfoFromJSON(jsonValue));
154
+ }
155
+
156
+ /**
157
+ * Pulls the image if needed, creates the container, and starts it. Returns the container info including its assigned ID. # Errors Returns an error if image pull fails, container creation fails, or the user lacks the operator role.
158
+ * Create and start a container.
159
+ */
160
+ async createContainer(requestParameters: CreateContainerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContainerInfo> {
161
+ const response = await this.createContainerRaw(requestParameters, initOverrides);
162
+ return await response.value();
163
+ }
164
+
165
+ /**
166
+ * Creates request options for deleteContainer without sending the request
167
+ */
168
+ async deleteContainerRequestOpts(requestParameters: DeleteContainerRequest): Promise<runtime.RequestOpts> {
169
+ if (requestParameters['id'] == null) {
170
+ throw new runtime.RequiredError(
171
+ 'id',
172
+ 'Required parameter "id" was null or undefined when calling deleteContainer().'
173
+ );
174
+ }
175
+
176
+ const queryParameters: any = {};
177
+
178
+ const headerParameters: runtime.HTTPHeaders = {};
179
+
180
+ if (this.configuration && this.configuration.accessToken) {
181
+ const token = this.configuration.accessToken;
182
+ const tokenString = await token("bearer_auth", []);
183
+
184
+ if (tokenString) {
185
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
186
+ }
187
+ }
188
+
189
+ let urlPath = `/api/v1/containers/{id}`;
190
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
191
+
192
+ return {
193
+ path: urlPath,
194
+ method: 'DELETE',
195
+ headers: headerParameters,
196
+ query: queryParameters,
197
+ };
198
+ }
199
+
200
+ /**
201
+ * Sends a stop signal (with a 30-second timeout), then removes the container. # Errors Returns an error if the container is not found, stop/remove fails, or the user lacks the operator role.
202
+ * Stop and remove a container.
203
+ */
204
+ async deleteContainerRaw(requestParameters: DeleteContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
205
+ const requestOptions = await this.deleteContainerRequestOpts(requestParameters);
206
+ const response = await this.request(requestOptions, initOverrides);
207
+
208
+ return new runtime.VoidApiResponse(response);
209
+ }
210
+
211
+ /**
212
+ * Sends a stop signal (with a 30-second timeout), then removes the container. # Errors Returns an error if the container is not found, stop/remove fails, or the user lacks the operator role.
213
+ * Stop and remove a container.
214
+ */
215
+ async deleteContainer(requestParameters: DeleteContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
216
+ await this.deleteContainerRaw(requestParameters, initOverrides);
217
+ }
218
+
219
+ /**
220
+ * Creates request options for execInContainer without sending the request
221
+ */
222
+ async execInContainerRequestOpts(requestParameters: ExecInContainerRequest): Promise<runtime.RequestOpts> {
223
+ if (requestParameters['id'] == null) {
224
+ throw new runtime.RequiredError(
225
+ 'id',
226
+ 'Required parameter "id" was null or undefined when calling execInContainer().'
227
+ );
228
+ }
229
+
230
+ if (requestParameters['containerExecRequest'] == null) {
231
+ throw new runtime.RequiredError(
232
+ 'containerExecRequest',
233
+ 'Required parameter "containerExecRequest" was null or undefined when calling execInContainer().'
234
+ );
235
+ }
236
+
237
+ const queryParameters: any = {};
238
+
239
+ const headerParameters: runtime.HTTPHeaders = {};
240
+
241
+ headerParameters['Content-Type'] = 'application/json';
242
+
243
+ if (this.configuration && this.configuration.accessToken) {
244
+ const token = this.configuration.accessToken;
245
+ const tokenString = await token("bearer_auth", []);
246
+
247
+ if (tokenString) {
248
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
249
+ }
250
+ }
251
+
252
+ let urlPath = `/api/v1/containers/{id}/exec`;
253
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
254
+
255
+ return {
256
+ path: urlPath,
257
+ method: 'POST',
258
+ headers: headerParameters,
259
+ query: queryParameters,
260
+ body: ContainerExecRequestToJSON(requestParameters['containerExecRequest']),
261
+ };
262
+ }
263
+
264
+ /**
265
+ * # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
266
+ * Execute a command in a running container.
267
+ */
268
+ async execInContainerRaw(requestParameters: ExecInContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ContainerExecResponse>> {
269
+ const requestOptions = await this.execInContainerRequestOpts(requestParameters);
270
+ const response = await this.request(requestOptions, initOverrides);
271
+
272
+ return new runtime.JSONApiResponse(response, (jsonValue) => ContainerExecResponseFromJSON(jsonValue));
273
+ }
274
+
275
+ /**
276
+ * # Errors Returns an error if the container is not found, the command is invalid, execution fails, or the user lacks the operator role.
277
+ * Execute a command in a running container.
278
+ */
279
+ async execInContainer(requestParameters: ExecInContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContainerExecResponse> {
280
+ const response = await this.execInContainerRaw(requestParameters, initOverrides);
281
+ return await response.value();
282
+ }
283
+
284
+ /**
285
+ * Creates request options for getContainer without sending the request
286
+ */
287
+ async getContainerRequestOpts(requestParameters: GetContainerRequest): Promise<runtime.RequestOpts> {
288
+ if (requestParameters['id'] == null) {
289
+ throw new runtime.RequiredError(
290
+ 'id',
291
+ 'Required parameter "id" was null or undefined when calling getContainer().'
292
+ );
293
+ }
294
+
295
+ const queryParameters: any = {};
296
+
297
+ const headerParameters: runtime.HTTPHeaders = {};
298
+
299
+ if (this.configuration && this.configuration.accessToken) {
300
+ const token = this.configuration.accessToken;
301
+ const tokenString = await token("bearer_auth", []);
302
+
303
+ if (tokenString) {
304
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
305
+ }
306
+ }
307
+
308
+ let urlPath = `/api/v1/containers/{id}`;
309
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
310
+
311
+ return {
312
+ path: urlPath,
313
+ method: 'GET',
314
+ headers: headerParameters,
315
+ query: queryParameters,
316
+ };
317
+ }
318
+
319
+ /**
320
+ * # Errors Returns an error if the container is not found or the user is not authenticated.
321
+ * Get details for a specific container.
322
+ */
323
+ async getContainerRaw(requestParameters: GetContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ContainerInfo>> {
324
+ const requestOptions = await this.getContainerRequestOpts(requestParameters);
325
+ const response = await this.request(requestOptions, initOverrides);
326
+
327
+ return new runtime.JSONApiResponse(response, (jsonValue) => ContainerInfoFromJSON(jsonValue));
328
+ }
329
+
330
+ /**
331
+ * # Errors Returns an error if the container is not found or the user is not authenticated.
332
+ * Get details for a specific container.
333
+ */
334
+ async getContainer(requestParameters: GetContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContainerInfo> {
335
+ const response = await this.getContainerRaw(requestParameters, initOverrides);
336
+ return await response.value();
337
+ }
338
+
339
+ /**
340
+ * Creates request options for getContainerLogs without sending the request
341
+ */
342
+ async getContainerLogsRequestOpts(requestParameters: GetContainerLogsRequest): Promise<runtime.RequestOpts> {
343
+ if (requestParameters['id'] == null) {
344
+ throw new runtime.RequiredError(
345
+ 'id',
346
+ 'Required parameter "id" was null or undefined when calling getContainerLogs().'
347
+ );
348
+ }
349
+
350
+ const queryParameters: any = {};
351
+
352
+ if (requestParameters['tail'] != null) {
353
+ queryParameters['tail'] = requestParameters['tail'];
354
+ }
355
+
356
+ if (requestParameters['follow'] != null) {
357
+ queryParameters['follow'] = requestParameters['follow'];
358
+ }
359
+
360
+ const headerParameters: runtime.HTTPHeaders = {};
361
+
362
+ if (this.configuration && this.configuration.accessToken) {
363
+ const token = this.configuration.accessToken;
364
+ const tokenString = await token("bearer_auth", []);
365
+
366
+ if (tokenString) {
367
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
368
+ }
369
+ }
370
+
371
+ let urlPath = `/api/v1/containers/{id}/logs`;
372
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
373
+
374
+ return {
375
+ path: urlPath,
376
+ method: 'GET',
377
+ headers: headerParameters,
378
+ query: queryParameters,
379
+ };
380
+ }
381
+
382
+ /**
383
+ * Returns the last N lines of container logs as plain text, or streams logs as Server-Sent Events when `follow=true`. # Errors Returns an error if the container is not found or log retrieval fails.
384
+ * Get container logs.
385
+ */
386
+ async getContainerLogsRaw(requestParameters: GetContainerLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
387
+ const requestOptions = await this.getContainerLogsRequestOpts(requestParameters);
388
+ const response = await this.request(requestOptions, initOverrides);
389
+
390
+ if (this.isJsonMime(response.headers.get('content-type'))) {
391
+ return new runtime.JSONApiResponse<string>(response);
392
+ } else {
393
+ return new runtime.TextApiResponse(response) as any;
394
+ }
395
+ }
396
+
397
+ /**
398
+ * Returns the last N lines of container logs as plain text, or streams logs as Server-Sent Events when `follow=true`. # Errors Returns an error if the container is not found or log retrieval fails.
399
+ * Get container logs.
400
+ */
401
+ async getContainerLogs(requestParameters: GetContainerLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
402
+ const response = await this.getContainerLogsRaw(requestParameters, initOverrides);
403
+ return await response.value();
404
+ }
405
+
406
+ /**
407
+ * Creates request options for getContainerStats without sending the request
408
+ */
409
+ async getContainerStatsRequestOpts(requestParameters: GetContainerStatsRequest): Promise<runtime.RequestOpts> {
410
+ if (requestParameters['id'] == null) {
411
+ throw new runtime.RequiredError(
412
+ 'id',
413
+ 'Required parameter "id" was null or undefined when calling getContainerStats().'
414
+ );
415
+ }
416
+
417
+ const queryParameters: any = {};
418
+
419
+ const headerParameters: runtime.HTTPHeaders = {};
420
+
421
+ if (this.configuration && this.configuration.accessToken) {
422
+ const token = this.configuration.accessToken;
423
+ const tokenString = await token("bearer_auth", []);
424
+
425
+ if (tokenString) {
426
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
427
+ }
428
+ }
429
+
430
+ let urlPath = `/api/v1/containers/{id}/stats`;
431
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
432
+
433
+ return {
434
+ path: urlPath,
435
+ method: 'GET',
436
+ headers: headerParameters,
437
+ query: queryParameters,
438
+ };
439
+ }
440
+
441
+ /**
442
+ * Returns CPU and memory usage statistics for the specified container. # Errors Returns an error if the container is not found or stats retrieval fails.
443
+ * Get container resource statistics.
444
+ */
445
+ async getContainerStatsRaw(requestParameters: GetContainerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ContainerStatsResponse>> {
446
+ const requestOptions = await this.getContainerStatsRequestOpts(requestParameters);
447
+ const response = await this.request(requestOptions, initOverrides);
448
+
449
+ return new runtime.JSONApiResponse(response, (jsonValue) => ContainerStatsResponseFromJSON(jsonValue));
450
+ }
451
+
452
+ /**
453
+ * Returns CPU and memory usage statistics for the specified container. # Errors Returns an error if the container is not found or stats retrieval fails.
454
+ * Get container resource statistics.
455
+ */
456
+ async getContainerStats(requestParameters: GetContainerStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContainerStatsResponse> {
457
+ const response = await this.getContainerStatsRaw(requestParameters, initOverrides);
458
+ return await response.value();
459
+ }
460
+
461
+ /**
462
+ * Creates request options for killContainer without sending the request
463
+ */
464
+ async killContainerRequestOpts(requestParameters: KillContainerOperationRequest): Promise<runtime.RequestOpts> {
465
+ if (requestParameters['id'] == null) {
466
+ throw new runtime.RequiredError(
467
+ 'id',
468
+ 'Required parameter "id" was null or undefined when calling killContainer().'
469
+ );
470
+ }
471
+
472
+ if (requestParameters['killContainerRequest'] == null) {
473
+ throw new runtime.RequiredError(
474
+ 'killContainerRequest',
475
+ 'Required parameter "killContainerRequest" was null or undefined when calling killContainer().'
476
+ );
477
+ }
478
+
479
+ const queryParameters: any = {};
480
+
481
+ const headerParameters: runtime.HTTPHeaders = {};
482
+
483
+ headerParameters['Content-Type'] = 'application/json';
484
+
485
+ if (this.configuration && this.configuration.accessToken) {
486
+ const token = this.configuration.accessToken;
487
+ const tokenString = await token("bearer_auth", []);
488
+
489
+ if (tokenString) {
490
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
491
+ }
492
+ }
493
+
494
+ let urlPath = `/api/v1/containers/{id}/kill`;
495
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
496
+
497
+ return {
498
+ path: urlPath,
499
+ method: 'POST',
500
+ headers: headerParameters,
501
+ query: queryParameters,
502
+ body: KillContainerRequestToJSON(requestParameters['killContainerRequest']),
503
+ };
504
+ }
505
+
506
+ /**
507
+ * Mirrors Docker-compat `POST /containers/{id}/kill`. When the request body\'s `signal` field is omitted, the runtime sends `SIGKILL`. Accepted signals are `SIGKILL`, `SIGTERM`, `SIGINT`, `SIGHUP`, `SIGUSR1`, `SIGUSR2` (with or without the `SIG` prefix); any other value is rejected with `400`. # Errors Returns `400` for unknown signals, `404` if the container is not found, `403` if the caller lacks the `operator` role, `501` if the runtime does not support `kill_container`, and `500` for other runtime errors.
508
+ * Send a signal to a running container.
509
+ */
510
+ async killContainerRaw(requestParameters: KillContainerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
511
+ const requestOptions = await this.killContainerRequestOpts(requestParameters);
512
+ const response = await this.request(requestOptions, initOverrides);
513
+
514
+ return new runtime.VoidApiResponse(response);
515
+ }
516
+
517
+ /**
518
+ * Mirrors Docker-compat `POST /containers/{id}/kill`. When the request body\'s `signal` field is omitted, the runtime sends `SIGKILL`. Accepted signals are `SIGKILL`, `SIGTERM`, `SIGINT`, `SIGHUP`, `SIGUSR1`, `SIGUSR2` (with or without the `SIG` prefix); any other value is rejected with `400`. # Errors Returns `400` for unknown signals, `404` if the container is not found, `403` if the caller lacks the `operator` role, `501` if the runtime does not support `kill_container`, and `500` for other runtime errors.
519
+ * Send a signal to a running container.
520
+ */
521
+ async killContainer(requestParameters: KillContainerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
522
+ await this.killContainerRaw(requestParameters, initOverrides);
523
+ }
524
+
525
+ /**
526
+ * Creates request options for listContainers without sending the request
527
+ */
528
+ async listContainersRequestOpts(requestParameters: ListContainersRequest): Promise<runtime.RequestOpts> {
529
+ const queryParameters: any = {};
530
+
531
+ if (requestParameters['label'] != null) {
532
+ queryParameters['label'] = requestParameters['label'];
533
+ }
534
+
535
+ const headerParameters: runtime.HTTPHeaders = {};
536
+
537
+ if (this.configuration && this.configuration.accessToken) {
538
+ const token = this.configuration.accessToken;
539
+ const tokenString = await token("bearer_auth", []);
540
+
541
+ if (tokenString) {
542
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
543
+ }
544
+ }
545
+
546
+ let urlPath = `/api/v1/containers`;
547
+
548
+ return {
549
+ path: urlPath,
550
+ method: 'GET',
551
+ headers: headerParameters,
552
+ query: queryParameters,
553
+ };
554
+ }
555
+
556
+ /**
557
+ * Returns all containers managed through this API. Optionally filter by label using the `label` query parameter in `key=value` format. # Errors Returns an error if the user is not authenticated.
558
+ * List standalone containers.
559
+ */
560
+ async listContainersRaw(requestParameters: ListContainersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ContainerInfo>>> {
561
+ const requestOptions = await this.listContainersRequestOpts(requestParameters);
562
+ const response = await this.request(requestOptions, initOverrides);
563
+
564
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ContainerInfoFromJSON));
565
+ }
566
+
567
+ /**
568
+ * Returns all containers managed through this API. Optionally filter by label using the `label` query parameter in `key=value` format. # Errors Returns an error if the user is not authenticated.
569
+ * List standalone containers.
570
+ */
571
+ async listContainers(requestParameters: ListContainersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ContainerInfo>> {
572
+ const response = await this.listContainersRaw(requestParameters, initOverrides);
573
+ return await response.value();
574
+ }
575
+
576
+ /**
577
+ * Creates request options for restartContainer without sending the request
578
+ */
579
+ async restartContainerRequestOpts(requestParameters: RestartContainerOperationRequest): Promise<runtime.RequestOpts> {
580
+ if (requestParameters['id'] == null) {
581
+ throw new runtime.RequiredError(
582
+ 'id',
583
+ 'Required parameter "id" was null or undefined when calling restartContainer().'
584
+ );
585
+ }
586
+
587
+ if (requestParameters['restartContainerRequest'] == null) {
588
+ throw new runtime.RequiredError(
589
+ 'restartContainerRequest',
590
+ 'Required parameter "restartContainerRequest" was null or undefined when calling restartContainer().'
591
+ );
592
+ }
593
+
594
+ const queryParameters: any = {};
595
+
596
+ const headerParameters: runtime.HTTPHeaders = {};
597
+
598
+ headerParameters['Content-Type'] = 'application/json';
599
+
600
+ if (this.configuration && this.configuration.accessToken) {
601
+ const token = this.configuration.accessToken;
602
+ const tokenString = await token("bearer_auth", []);
603
+
604
+ if (tokenString) {
605
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
606
+ }
607
+ }
608
+
609
+ let urlPath = `/api/v1/containers/{id}/restart`;
610
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
611
+
612
+ return {
613
+ path: urlPath,
614
+ method: 'POST',
615
+ headers: headerParameters,
616
+ query: queryParameters,
617
+ body: RestartContainerRequestToJSON(requestParameters['restartContainerRequest']),
618
+ };
619
+ }
620
+
621
+ /**
622
+ * Composes `stop_container(timeout)` followed by `start_container`. Errors during the stop phase are ignored (the container may already be stopped); errors during the start phase are surfaced. # Errors Returns an error if the container is not found, the start phase fails, or the user lacks the operator role.
623
+ * Restart a container: stop then start.
624
+ */
625
+ async restartContainerRaw(requestParameters: RestartContainerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
626
+ const requestOptions = await this.restartContainerRequestOpts(requestParameters);
627
+ const response = await this.request(requestOptions, initOverrides);
628
+
629
+ return new runtime.VoidApiResponse(response);
630
+ }
631
+
632
+ /**
633
+ * Composes `stop_container(timeout)` followed by `start_container`. Errors during the stop phase are ignored (the container may already be stopped); errors during the start phase are surfaced. # Errors Returns an error if the container is not found, the start phase fails, or the user lacks the operator role.
634
+ * Restart a container: stop then start.
635
+ */
636
+ async restartContainer(requestParameters: RestartContainerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
637
+ await this.restartContainerRaw(requestParameters, initOverrides);
638
+ }
639
+
640
+ /**
641
+ * Creates request options for startContainer without sending the request
642
+ */
643
+ async startContainerRequestOpts(requestParameters: StartContainerRequest): Promise<runtime.RequestOpts> {
644
+ if (requestParameters['id'] == null) {
645
+ throw new runtime.RequiredError(
646
+ 'id',
647
+ 'Required parameter "id" was null or undefined when calling startContainer().'
648
+ );
649
+ }
650
+
651
+ const queryParameters: any = {};
652
+
653
+ const headerParameters: runtime.HTTPHeaders = {};
654
+
655
+ if (this.configuration && this.configuration.accessToken) {
656
+ const token = this.configuration.accessToken;
657
+ const tokenString = await token("bearer_auth", []);
658
+
659
+ if (tokenString) {
660
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
661
+ }
662
+ }
663
+
664
+ let urlPath = `/api/v1/containers/{id}/start`;
665
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
666
+
667
+ return {
668
+ path: urlPath,
669
+ method: 'POST',
670
+ headers: headerParameters,
671
+ query: queryParameters,
672
+ };
673
+ }
674
+
675
+ /**
676
+ * Useful for re-starting a container that was stopped via `POST /api/v1/containers/{id}/stop` without being removed. # Errors Returns an error if the container is not found, start fails, or the user lacks the operator role.
677
+ * Start a previously-created container.
678
+ */
679
+ async startContainerRaw(requestParameters: StartContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
680
+ const requestOptions = await this.startContainerRequestOpts(requestParameters);
681
+ const response = await this.request(requestOptions, initOverrides);
682
+
683
+ return new runtime.VoidApiResponse(response);
684
+ }
685
+
686
+ /**
687
+ * Useful for re-starting a container that was stopped via `POST /api/v1/containers/{id}/stop` without being removed. # Errors Returns an error if the container is not found, start fails, or the user lacks the operator role.
688
+ * Start a previously-created container.
689
+ */
690
+ async startContainer(requestParameters: StartContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
691
+ await this.startContainerRaw(requestParameters, initOverrides);
692
+ }
693
+
694
+ /**
695
+ * Creates request options for stopContainer without sending the request
696
+ */
697
+ async stopContainerRequestOpts(requestParameters: StopContainerOperationRequest): Promise<runtime.RequestOpts> {
698
+ if (requestParameters['id'] == null) {
699
+ throw new runtime.RequiredError(
700
+ 'id',
701
+ 'Required parameter "id" was null or undefined when calling stopContainer().'
702
+ );
703
+ }
704
+
705
+ if (requestParameters['stopContainerRequest'] == null) {
706
+ throw new runtime.RequiredError(
707
+ 'stopContainerRequest',
708
+ 'Required parameter "stopContainerRequest" was null or undefined when calling stopContainer().'
709
+ );
710
+ }
711
+
712
+ const queryParameters: any = {};
713
+
714
+ const headerParameters: runtime.HTTPHeaders = {};
715
+
716
+ headerParameters['Content-Type'] = 'application/json';
717
+
718
+ if (this.configuration && this.configuration.accessToken) {
719
+ const token = this.configuration.accessToken;
720
+ const tokenString = await token("bearer_auth", []);
721
+
722
+ if (tokenString) {
723
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
724
+ }
725
+ }
726
+
727
+ let urlPath = `/api/v1/containers/{id}/stop`;
728
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
729
+
730
+ return {
731
+ path: urlPath,
732
+ method: 'POST',
733
+ headers: headerParameters,
734
+ query: queryParameters,
735
+ body: StopContainerRequestToJSON(requestParameters['stopContainerRequest']),
736
+ };
737
+ }
738
+
739
+ /**
740
+ * Sends the runtime\'s graceful stop signal and waits up to `timeout` seconds before force-killing. The container is **not** removed; use `DELETE /api/v1/containers/{id}` to stop-and-remove. Idempotent: calling stop on an already-stopped container is not an error. # Errors Returns an error if the container is not found, stop fails, or the user lacks the operator role.
741
+ * Stop a running container.
742
+ */
743
+ async stopContainerRaw(requestParameters: StopContainerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
744
+ const requestOptions = await this.stopContainerRequestOpts(requestParameters);
745
+ const response = await this.request(requestOptions, initOverrides);
746
+
747
+ return new runtime.VoidApiResponse(response);
748
+ }
749
+
750
+ /**
751
+ * Sends the runtime\'s graceful stop signal and waits up to `timeout` seconds before force-killing. The container is **not** removed; use `DELETE /api/v1/containers/{id}` to stop-and-remove. Idempotent: calling stop on an already-stopped container is not an error. # Errors Returns an error if the container is not found, stop fails, or the user lacks the operator role.
752
+ * Stop a running container.
753
+ */
754
+ async stopContainer(requestParameters: StopContainerOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
755
+ await this.stopContainerRaw(requestParameters, initOverrides);
756
+ }
757
+
758
+ /**
759
+ * Creates request options for waitContainer without sending the request
760
+ */
761
+ async waitContainerRequestOpts(requestParameters: WaitContainerRequest): Promise<runtime.RequestOpts> {
762
+ if (requestParameters['id'] == null) {
763
+ throw new runtime.RequiredError(
764
+ 'id',
765
+ 'Required parameter "id" was null or undefined when calling waitContainer().'
766
+ );
767
+ }
768
+
769
+ const queryParameters: any = {};
770
+
771
+ const headerParameters: runtime.HTTPHeaders = {};
772
+
773
+ if (this.configuration && this.configuration.accessToken) {
774
+ const token = this.configuration.accessToken;
775
+ const tokenString = await token("bearer_auth", []);
776
+
777
+ if (tokenString) {
778
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
779
+ }
780
+ }
781
+
782
+ let urlPath = `/api/v1/containers/{id}/wait`;
783
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
784
+
785
+ return {
786
+ path: urlPath,
787
+ method: 'GET',
788
+ headers: headerParameters,
789
+ query: queryParameters,
790
+ };
791
+ }
792
+
793
+ /**
794
+ * This endpoint blocks until the container exits. Useful for CI runners that need to wait for a build/test container to complete. # Errors Returns an error if the container is not found or the wait fails.
795
+ * Wait for a container to exit and return its exit code.
796
+ */
797
+ async waitContainerRaw(requestParameters: WaitContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ContainerWaitResponse>> {
798
+ const requestOptions = await this.waitContainerRequestOpts(requestParameters);
799
+ const response = await this.request(requestOptions, initOverrides);
800
+
801
+ return new runtime.JSONApiResponse(response, (jsonValue) => ContainerWaitResponseFromJSON(jsonValue));
802
+ }
803
+
804
+ /**
805
+ * This endpoint blocks until the container exits. Useful for CI runners that need to wait for a build/test container to complete. # Errors Returns an error if the container is not found or the wait fails.
806
+ * Wait for a container to exit and return its exit code.
807
+ */
808
+ async waitContainer(requestParameters: WaitContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContainerWaitResponse> {
809
+ const response = await this.waitContainerRaw(requestParameters, initOverrides);
810
+ return await response.value();
811
+ }
812
+
813
+ }