@stack-spot/portal-network 0.1.0

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 (186) hide show
  1. package/.generate-api.failed.json +1 -0
  2. package/dist/api/account.d.ts +2368 -0
  3. package/dist/api/account.d.ts.map +1 -0
  4. package/dist/api/account.js +1521 -0
  5. package/dist/api/account.js.map +1 -0
  6. package/dist/api/ai.d.ts +1432 -0
  7. package/dist/api/ai.d.ts.map +1 -0
  8. package/dist/api/ai.js +1342 -0
  9. package/dist/api/ai.js.map +1 -0
  10. package/dist/api/apiRuntime.d.ts +922 -0
  11. package/dist/api/apiRuntime.d.ts.map +1 -0
  12. package/dist/api/apiRuntime.js +599 -0
  13. package/dist/api/apiRuntime.js.map +1 -0
  14. package/dist/api/cloudAccount.d.ts +473 -0
  15. package/dist/api/cloudAccount.d.ts.map +1 -0
  16. package/dist/api/cloudAccount.js +300 -0
  17. package/dist/api/cloudAccount.js.map +1 -0
  18. package/dist/api/cloudServices.d.ts +1233 -0
  19. package/dist/api/cloudServices.d.ts.map +1 -0
  20. package/dist/api/cloudServices.js +715 -0
  21. package/dist/api/cloudServices.js.map +1 -0
  22. package/dist/api/insights.d.ts +123 -0
  23. package/dist/api/insights.d.ts.map +1 -0
  24. package/dist/api/insights.js +112 -0
  25. package/dist/api/insights.js.map +1 -0
  26. package/dist/api/plugin.d.ts +368 -0
  27. package/dist/api/plugin.d.ts.map +1 -0
  28. package/dist/api/plugin.js +218 -0
  29. package/dist/api/plugin.js.map +1 -0
  30. package/dist/api/serviceCatalog.d.ts +737 -0
  31. package/dist/api/serviceCatalog.d.ts.map +1 -0
  32. package/dist/api/serviceCatalog.js +611 -0
  33. package/dist/api/serviceCatalog.js.map +1 -0
  34. package/dist/api/workflows.d.ts +366 -0
  35. package/dist/api/workflows.d.ts.map +1 -0
  36. package/dist/api/workflows.js +175 -0
  37. package/dist/api/workflows.js.map +1 -0
  38. package/dist/api/workspace.js +1476 -0
  39. package/dist/api/workspace.js.map +1 -0
  40. package/dist/api/workspaceManager.d.ts +1121 -0
  41. package/dist/api/workspaceManager.d.ts.map +1 -0
  42. package/dist/api/workspaceManager.js +357 -0
  43. package/dist/api/workspaceManager.js.map +1 -0
  44. package/dist/api/workspaceSearchEngine.d.ts +93 -0
  45. package/dist/api/workspaceSearchEngine.d.ts.map +1 -0
  46. package/dist/api/workspaceSearchEngine.js +55 -0
  47. package/dist/api/workspaceSearchEngine.js.map +1 -0
  48. package/dist/apis.json +129 -0
  49. package/dist/client/account.d.ts +46 -0
  50. package/dist/client/account.d.ts.map +1 -0
  51. package/dist/client/account.js +104 -0
  52. package/dist/client/account.js.map +1 -0
  53. package/dist/error/CanceledError.d.ts +5 -0
  54. package/dist/error/CanceledError.d.ts.map +1 -0
  55. package/dist/error/CanceledError.js +7 -0
  56. package/dist/error/CanceledError.js.map +1 -0
  57. package/dist/error/DefaultAPIError.d.ts +9 -0
  58. package/dist/error/DefaultAPIError.d.ts.map +1 -0
  59. package/dist/error/DefaultAPIError.js +58 -0
  60. package/dist/error/DefaultAPIError.js.map +1 -0
  61. package/dist/error/StackspotAPIError.d.ts +19 -0
  62. package/dist/error/StackspotAPIError.d.ts.map +1 -0
  63. package/dist/error/StackspotAPIError.js +39 -0
  64. package/dist/error/StackspotAPIError.js.map +1 -0
  65. package/dist/error/dictionary/account.d.ts +55 -0
  66. package/dist/error/dictionary/account.d.ts.map +1 -0
  67. package/dist/error/dictionary/account.js +55 -0
  68. package/dist/error/dictionary/account.js.map +1 -0
  69. package/dist/error/dictionary/action.d.ts +163 -0
  70. package/dist/error/dictionary/action.d.ts.map +1 -0
  71. package/dist/error/dictionary/action.js +163 -0
  72. package/dist/error/dictionary/action.js.map +1 -0
  73. package/dist/error/dictionary/base.d.ts +21 -0
  74. package/dist/error/dictionary/base.d.ts.map +1 -0
  75. package/dist/error/dictionary/base.js +21 -0
  76. package/dist/error/dictionary/base.js.map +1 -0
  77. package/dist/error/dictionary/cnt-fields.d.ts +13 -0
  78. package/dist/error/dictionary/cnt-fields.d.ts.map +1 -0
  79. package/dist/error/dictionary/cnt-fields.js +13 -0
  80. package/dist/error/dictionary/cnt-fields.js.map +1 -0
  81. package/dist/error/dictionary/cnt.d.ts +79 -0
  82. package/dist/error/dictionary/cnt.d.ts.map +1 -0
  83. package/dist/error/dictionary/cnt.js +79 -0
  84. package/dist/error/dictionary/cnt.js.map +1 -0
  85. package/dist/error/dictionary/rte.d.ts +23 -0
  86. package/dist/error/dictionary/rte.d.ts.map +1 -0
  87. package/dist/error/dictionary/rte.js +23 -0
  88. package/dist/error/dictionary/rte.js.map +1 -0
  89. package/dist/error/dictionary/rtm.d.ts +9 -0
  90. package/dist/error/dictionary/rtm.d.ts.map +1 -0
  91. package/dist/error/dictionary/rtm.js +9 -0
  92. package/dist/error/dictionary/rtm.js.map +1 -0
  93. package/dist/error/dictionary/workspace-fields.d.ts +9 -0
  94. package/dist/error/dictionary/workspace-fields.d.ts.map +1 -0
  95. package/dist/error/dictionary/workspace-fields.js +9 -0
  96. package/dist/error/dictionary/workspace-fields.js.map +1 -0
  97. package/dist/error/dictionary/workspace.d.ts +99 -0
  98. package/dist/error/dictionary/workspace.d.ts.map +1 -0
  99. package/dist/error/dictionary/workspace.js +99 -0
  100. package/dist/error/dictionary/workspace.js.map +1 -0
  101. package/dist/index.d.ts +6 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +6 -0
  104. package/dist/index.js.map +1 -0
  105. package/dist/network/AutoMutation.d.ts +10 -0
  106. package/dist/network/AutoMutation.d.ts.map +1 -0
  107. package/dist/network/AutoMutation.js +20 -0
  108. package/dist/network/AutoMutation.js.map +1 -0
  109. package/dist/network/AutoOperation.d.ts +19 -0
  110. package/dist/network/AutoOperation.d.ts.map +1 -0
  111. package/dist/network/AutoOperation.js +99 -0
  112. package/dist/network/AutoOperation.js.map +1 -0
  113. package/dist/network/AutoQuery.d.ts +19 -0
  114. package/dist/network/AutoQuery.d.ts.map +1 -0
  115. package/dist/network/AutoQuery.js +70 -0
  116. package/dist/network/AutoQuery.js.map +1 -0
  117. package/dist/network/ManualMutation.d.ts +11 -0
  118. package/dist/network/ManualMutation.d.ts.map +1 -0
  119. package/dist/network/ManualMutation.js +32 -0
  120. package/dist/network/ManualMutation.js.map +1 -0
  121. package/dist/network/ManualOperation.d.ts +13 -0
  122. package/dist/network/ManualOperation.d.ts.map +1 -0
  123. package/dist/network/ManualOperation.js +53 -0
  124. package/dist/network/ManualOperation.js.map +1 -0
  125. package/dist/network/ManualQuery.d.ts +20 -0
  126. package/dist/network/ManualQuery.d.ts.map +1 -0
  127. package/dist/network/ManualQuery.js +77 -0
  128. package/dist/network/ManualQuery.js.map +1 -0
  129. package/dist/network/NetworkClient.d.ts +20 -0
  130. package/dist/network/NetworkClient.d.ts.map +1 -0
  131. package/dist/network/NetworkClient.js +85 -0
  132. package/dist/network/NetworkClient.js.map +1 -0
  133. package/dist/network/ReactQueryNetworkClient.d.ts +16 -0
  134. package/dist/network/ReactQueryNetworkClient.d.ts.map +1 -0
  135. package/dist/network/ReactQueryNetworkClient.js +125 -0
  136. package/dist/network/ReactQueryNetworkClient.js.map +1 -0
  137. package/dist/network/react-query-client.d.ts +3 -0
  138. package/dist/network/react-query-client.d.ts.map +1 -0
  139. package/dist/network/react-query-client.js +3 -0
  140. package/dist/network/react-query-client.js.map +1 -0
  141. package/dist/network/types.d.ts +55 -0
  142. package/dist/network/types.d.ts.map +1 -0
  143. package/dist/network/types.js +2 -0
  144. package/dist/network/types.js.map +1 -0
  145. package/package.json +56 -0
  146. package/readme.md +1 -0
  147. package/scripts/generate-apis.ts +134 -0
  148. package/src/api/account.ts +4793 -0
  149. package/src/api/ai.ts +3121 -0
  150. package/src/api/apiRuntime.ts +2029 -0
  151. package/src/api/cloudAccount.ts +1133 -0
  152. package/src/api/cloudServices.ts +2872 -0
  153. package/src/api/insights.ts +264 -0
  154. package/src/api/plugin.ts +685 -0
  155. package/src/api/serviceCatalog.ts +2908 -0
  156. package/src/api/workflows.ts +709 -0
  157. package/src/api/workspace.ts +5178 -0
  158. package/src/api/workspaceManager.ts +1516 -0
  159. package/src/api/workspaceSearchEngine.ts +153 -0
  160. package/src/apis.json +129 -0
  161. package/src/client/account.ts +52 -0
  162. package/src/error/CanceledError.ts +7 -0
  163. package/src/error/DefaultAPIError.ts +51 -0
  164. package/src/error/StackspotAPIError.ts +31 -0
  165. package/src/error/dictionary/account.ts +56 -0
  166. package/src/error/dictionary/action.ts +206 -0
  167. package/src/error/dictionary/base.ts +22 -0
  168. package/src/error/dictionary/cnt-fields.ts +14 -0
  169. package/src/error/dictionary/cnt.ts +80 -0
  170. package/src/error/dictionary/rte.ts +24 -0
  171. package/src/error/dictionary/rtm.ts +10 -0
  172. package/src/error/dictionary/workspace-fields.ts +10 -0
  173. package/src/error/dictionary/workspace.ts +100 -0
  174. package/src/index.ts +5 -0
  175. package/src/network/AutoMutation.ts +25 -0
  176. package/src/network/AutoOperation.ts +88 -0
  177. package/src/network/AutoQuery.ts +80 -0
  178. package/src/network/ManualMutation.ts +41 -0
  179. package/src/network/ManualOperation.ts +55 -0
  180. package/src/network/ManualQuery.ts +93 -0
  181. package/src/network/NetworkClient.ts +93 -0
  182. package/src/network/ReactQueryNetworkClient.ts +154 -0
  183. package/src/network/react-query-client.ts +3 -0
  184. package/src/network/types.ts +82 -0
  185. package/tsconfig.build.json +4 -0
  186. package/tsconfig.json +10 -0
@@ -0,0 +1,2029 @@
1
+ /**
2
+ * Runtime Manager API
3
+ * v1.0.0
4
+ * DO NOT MODIFY - This file has been generated using oazapfts.
5
+ * See https://www.npmjs.com/package/oazapfts
6
+ */
7
+ import * as Oazapfts from "@oazapfts/runtime";
8
+ import * as QS from "@oazapfts/runtime/query";
9
+ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
+ headers: {},
11
+ baseUrl: "https://runtime-manager.dev.stackspot.com",
12
+ };
13
+ const oazapfts = Oazapfts.runtime(defaults);
14
+ export const servers = {
15
+ generatedServerUrl: "https://runtime-manager.dev.stackspot.com"
16
+ };
17
+ export type TaskDataS3BackendResponse = {
18
+ bucket: string;
19
+ region: string;
20
+ key: string;
21
+ };
22
+ export type TaskIacDataResponsePlugin = {
23
+ pluginAppliedAlias: string;
24
+ name: string;
25
+ inputs: {
26
+ [key: string]: object;
27
+ };
28
+ };
29
+ export type TaskIacDataResponseConnector = {
30
+ connector: string;
31
+ alias: string;
32
+ "type": string;
33
+ pluginName: string;
34
+ attributes: {
35
+ [key: string]: object;
36
+ };
37
+ writeToFile: boolean;
38
+ };
39
+ export type TaskIacDataResponse = {
40
+ schemaVersion: string;
41
+ runId: string;
42
+ runTaskId: string;
43
+ realm: string;
44
+ iacBackend: TaskDataS3BackendResponse;
45
+ workspaceName: string;
46
+ plugin: TaskIacDataResponsePlugin;
47
+ connectors: TaskIacDataResponseConnector[];
48
+ metadata?: {
49
+ [key: string]: object;
50
+ };
51
+ runEnvironment: string[];
52
+ };
53
+ export type ValidationDetails = {
54
+ code: string;
55
+ field?: string;
56
+ details?: string;
57
+ values?: string[];
58
+ };
59
+ export type ErrorResponse = {
60
+ code: "RTM_ACCESS_TOKEN_NOT_RECEIVED_FROM_IDM" | "RTM_EVENTS_NOT_SENT" | "RTM_BAD_REQUEST_ERROR" | "RTM_MANDATORY_PARAM_NOT_INFORMED" | "RTM_MANDATORY_ATTR_NOT_INFORMED" | "RTM_ATTR_INVALID" | "RTM_ATTR_INVALID_FORMAT" | "RTM_ATTR_INVALID_EVALUATED_FROM_VALIDATIONS_LENGTH" | "RTM_ATTR_INVALID_EVALUATED_FROM_VALIDATIONS_EMAIL" | "RTM_ATTR_INVALID_EVALUATED_FROM_VALIDATIONS_PATTERN" | "RTM_UNABLE_TO_PARSE_REQUEST" | "RTM_CANNOT_DESTROY" | "RTM_ALREADY_DESTROYED" | "RTM_CONNECTION_INTERFACE_IN_USE" | "RTM_CANNOT_IDENTIFY_USER" | "RTM_TASK_TYPE_NOT_CORRECT" | "RTM_GENERIC_BUSINESS_ERROR" | "RTM_TASK_NOT_READY_TO_RUN" | "RTM_TASK_NOT_RUNNING" | "RTM_DEPLOYMENT_WITHOUT_INFRA_OR_APP_ID" | "RTM_CREATING_CONN_INTERFACE_ERROR" | "RTM_CREATING_CONN_INTERFACE_MISSING_ATTRIBUTES" | "RTM_IMPERSONATE_TOKEN_ERROR" | "RTM_UNEXPECTED_RUNTIME_ENVIRONMENT_CONFIG" | "RTM_RUN_WITH_NO_TASKS_ERROR" | "RTM_TASK_TYPE_NOT_SUPPORTED" | "RTM_SELF_HOSTED_BACKEND_NOT_CONFIGURED" | "RTM_DEPENDENCIES_HAS_CYCLE" | "RTM_UNAVAILABLE_DESTROY_PROCESS" | "RTM_DEPLOYMENT_WITH_INFRA_AND_APP" | "RTM_DEPLOYMENT_JUST_ONE_RUN_NOT_FINISHED" | "RTM_GENERIC_CONFLICT_ERROR" | "RTM_DEPLOYMENT_APP_ALREADY_RUNNING_CONFLICT_ERROR" | "RTM_DEPLOYMENT_INFRA_ALREADY_RUNNING_CONFLICT_ERROR" | "RTM_DEPLOYMENT_TAG_ALREADY_EXISTS" | "RTM_NOT_FOUND" | "RTM_PROVIDER_NOT_FOUND" | "RTM_STATE_NOT_FOUND" | "RTM_ENVIRONMENT_NOT_FOUND_ERROR" | "RTM_DEPLOYMENT_NOT_FOUND_ERROR" | "RTM_PLUGIN_DEPLOYMENT_NOT_FOUND_ERROR" | "RTM_WORKSPACE_NOT_FOUND" | "RTM_APPLICATION_NOT_FOUND" | "RTM_INFRA_LINK_NOT_FOUND" | "RTM_RUN_NOT_FOUND" | "RTM_RUN_TASK_NOT_FOUND" | "RTM_CONNECTION_INTERFACE_NOT_FOUND" | "RTM_PLUGIN_MANIFESTO_NOT_FOUND" | "RTM_PLUGIN_DATA_NOT_FOUND" | "RTM_DEPLOYMENT_TAG_NOT_FOUND" | "RTM_RUN_WITH_TOO_MANY_PLUGINS" | "RTM_TOO_MANY_RUNS" | "RTM_FORBIDDEN" | "RTM_MISSING_ACCOUNT" | "RTM_MISSING_AUTHENTICATION" | "RTM_WORKSPACE_API_FORBIDDEN" | "RTM_WORKSPACE_API_UNHANDLED_ERROR" | "RTM_WORKSPACE_API_UNPROCESSABLE_ENTITY" | "RTM_WORKSPACE_API_INTERNAL_ERROR" | "RTM_WORKSPACE_API_BAD_GATEWAY" | "RTM_CONTENT_API_FORBIDDEN" | "RTM_CONTENT_API_UNHANDLED_ERROR" | "RTM_CONTENT_API_INTERNAL_ERROR" | "RTM_CLOUD_SERVICES_API_FORBIDDEN" | "RTM_CLOUD_SERVICES_API_UNHANDLED_ERROR" | "RTM_CLOUD_SERVICES_FAILED_TO_RETRIEVE_EXTERNAL_ID" | "RTM_CLOUD_SERVICES_API_INTERNAL_ERROR" | "RTM_GENERIC_INTEGRATION_ERROR" | "RTM_ACCOUNT_API_PAT_NOT_FOUND_ERROR" | "RTM_ACCOUNT_API_FORBIDDEN" | "RTM_ACCOUNT_API_UNHANDLED_ERROR" | "RTM_ACCOUNT_API_INTERNAL_ERROR" | "RTM_S3_UNHANDLED_ERROR" | "RTM_INTERNAL_SERVER_ERROR" | "RTM_CREATING_CONN_INTERFACE_WORKER_ERROR" | "RTM_SECURITY_KEY_ALREADY_REGISTERED_IN_BLOCK_LIST" | "RTM_SECURITY_BLOCK_LIST_ERROR" | "RTM_RUN_TYPE_NOT_CORRECT" | "RTM_IAC_PATH_NOT_PRESENT";
61
+ status: number;
62
+ details: string;
63
+ validationDetails?: ValidationDetails[];
64
+ };
65
+ export type RunSelfHostedTaskIacCompletedRequest = {
66
+ /** The schema version */
67
+ schemaVersion: string;
68
+ /** The Run ULID */
69
+ runId: string;
70
+ /** The Task ULID */
71
+ runTaskId: string;
72
+ /** Whether this task completed successfully or not */
73
+ status: "SUCCESS" | "INTERNAL_ERROR";
74
+ /** The error message, if it exists */
75
+ messageError?: string;
76
+ /** Metadata */
77
+ metadata?: {
78
+ [key: string]: object;
79
+ };
80
+ };
81
+ export type TaskDestroyDataResponse = {
82
+ schemaVersion: string;
83
+ runId: string;
84
+ runTaskId: string;
85
+ iacBackend: TaskDataS3BackendResponse;
86
+ tfBackend: TaskDataS3BackendResponse;
87
+ metadata?: {
88
+ [key: string]: object;
89
+ };
90
+ runEnvironment: string[];
91
+ };
92
+ export type RunSelfHostedTaskDestroyCompletedRequest = {
93
+ /** The schema version */
94
+ schemaVersion: string;
95
+ /** The Run ULID */
96
+ runId: string;
97
+ /** The Task ULID */
98
+ runTaskId: string;
99
+ /** Whether this task completed successfully or not */
100
+ status: "SUCCESS" | "INTERNAL_ERROR" | "FAILED";
101
+ /** The error message, if it exists */
102
+ messageError?: string;
103
+ /** The deploy output, to be used to generate the connection interfaces */
104
+ output?: {
105
+ [key: string]: object;
106
+ };
107
+ /** Metadata */
108
+ metadata?: {
109
+ [key: string]: object;
110
+ };
111
+ /** partialResources */
112
+ partialResources?: string[];
113
+ };
114
+ export type TaskDeployDataResponse = {
115
+ schemaVersion: string;
116
+ runId: string;
117
+ runTaskId: string;
118
+ iacBackend: TaskDataS3BackendResponse;
119
+ tfBackend: TaskDataS3BackendResponse;
120
+ metadata?: {
121
+ [key: string]: object;
122
+ };
123
+ runEnvironment: string[];
124
+ };
125
+ export type RunSelfHostedTaskDeployCompletedRequest = {
126
+ /** The schema version */
127
+ schemaVersion: string;
128
+ /** The Run ULID */
129
+ runId: string;
130
+ /** The Task ULID */
131
+ runTaskId: string;
132
+ /** Whether this task completed successfully or not */
133
+ status: "SUCCESS" | "INTERNAL_ERROR" | "FAILED";
134
+ /** The error message, if it exists */
135
+ messageError?: string;
136
+ /** The deploy output, to be used to generate the connection interfaces */
137
+ output?: {
138
+ [key: string]: object;
139
+ };
140
+ /** Metadata */
141
+ metadata?: {
142
+ [key: string]: object;
143
+ };
144
+ partialResources?: string[];
145
+ };
146
+ export type ConfigTerraform = {
147
+ /** name of the bucket to save state files */
148
+ bucket: string;
149
+ /** name of the region of the bucket */
150
+ region: string;
151
+ };
152
+ export type Config = {
153
+ tfstate: ConfigTerraform;
154
+ iac: ConfigTerraform;
155
+ };
156
+ export type RunSelfHostedRollbackRequest = {
157
+ /** Application Id */
158
+ appId?: string;
159
+ /** Shared Infra Id */
160
+ infraId?: string;
161
+ /** Environment Id */
162
+ envId: string;
163
+ /** Current version tag to rollback */
164
+ tag: string;
165
+ config: Config;
166
+ /** Url of pipeline currently running */
167
+ pipelineUrl: string;
168
+ };
169
+ export type RunSelfHostedTaskResponse = {
170
+ order: number;
171
+ runTaskId: string;
172
+ taskType: string;
173
+ pluginAppliedAlias: string;
174
+ };
175
+ export type RunSelfHostedResponse = {
176
+ runId: string;
177
+ runType: string;
178
+ tasks: RunSelfHostedTaskResponse[];
179
+ };
180
+ export type RunSelfHostedDestroyRequest = {
181
+ /** Application Id */
182
+ appId?: string;
183
+ /** Shared Infra Id */
184
+ infraId?: string;
185
+ /** Workspace Id */
186
+ workspaceId: string;
187
+ /** Environment Id */
188
+ envId: string;
189
+ config: Config;
190
+ /** Url of pipeline currently running */
191
+ pipelineUrl: string;
192
+ };
193
+ export type ManifestoMetadata = {
194
+ /** Name */
195
+ name: string;
196
+ isTest?: string;
197
+ };
198
+ export type Connection = {
199
+ /** Required connector name */
200
+ selected: string;
201
+ /** Required connector type */
202
+ "type": string;
203
+ /** Required connector label reference */
204
+ alias: string;
205
+ };
206
+ export type ManifestoConnection = {
207
+ requires?: Connection[];
208
+ generates?: Connection[];
209
+ };
210
+ export type Link = {
211
+ /** Required link name */
212
+ name: string;
213
+ /** Required link url */
214
+ url: string;
215
+ /** Required link type */
216
+ "type": string;
217
+ /** Link picture path */
218
+ picture: string;
219
+ };
220
+ export type ManifestoLink = {
221
+ generates?: Link[];
222
+ };
223
+ export type AppliedPlugin = {
224
+ /** Plugin Alias */
225
+ alias: string;
226
+ /** Plugin Name */
227
+ name: string;
228
+ /** Plugin Version Id */
229
+ pluginVersionId: string;
230
+ /** Stack Version Id */
231
+ stackVersionId: string;
232
+ /** Plugin Type */
233
+ "type": string;
234
+ inputs: {
235
+ [key: string]: object;
236
+ };
237
+ connections: ManifestoConnection;
238
+ links?: ManifestoLink;
239
+ };
240
+ export type ManifestoSpec = {
241
+ /** Application Or Infra Id ( */
242
+ id: string;
243
+ /** Repository */
244
+ repository?: string;
245
+ appliedPlugins: AppliedPlugin[];
246
+ };
247
+ export type Manifesto = {
248
+ /** Schema Version */
249
+ schemaVersion: string;
250
+ /** Manifesto Kind */
251
+ kind: string;
252
+ metadata: ManifestoMetadata;
253
+ spec: ManifestoSpec;
254
+ };
255
+ export type RunSelfHostedDeployRequest = {
256
+ /** Environment Id */
257
+ envId: string;
258
+ /** Workspace Id */
259
+ workspaceId: string;
260
+ /** Version tag that will be generated by the deploy run if successful */
261
+ versionTag: string;
262
+ /** Run Configuration */
263
+ runConfig?: {
264
+ [key: string]: object;
265
+ };
266
+ manifesto: Manifesto;
267
+ /** Whether this application exposes an API or not */
268
+ isApi?: boolean;
269
+ /** Path (in the repository) of the API contract file in open api format */
270
+ apiContractPath?: string;
271
+ config: Config;
272
+ /** Url of pipeline currently running */
273
+ pipelineUrl: string;
274
+ };
275
+ export type RunDestroyRequest = {
276
+ /** Application Id */
277
+ appId?: string;
278
+ /** Shared Infra Id */
279
+ infraId?: string;
280
+ /** Workspace Id */
281
+ workspaceId: string;
282
+ /** Environment Id */
283
+ envId: string;
284
+ };
285
+ export type RunCreatedResponse = {
286
+ runId: string;
287
+ };
288
+ export type WorkerResponse = {
289
+ allowed: boolean;
290
+ reason?: string;
291
+ };
292
+ export type RunRollbackRequest = {
293
+ /** Application Id */
294
+ appId?: string;
295
+ /** Shared Infra Id */
296
+ infraId?: string;
297
+ /** Environment Id */
298
+ envId: string;
299
+ /** Current version tag to rollback */
300
+ tag: string;
301
+ };
302
+ export type RunDeployRequest = {
303
+ /** Environment Id */
304
+ envId: string;
305
+ /** Workspace Id */
306
+ workspaceId: string;
307
+ /** Version tag that will be generated by the deploy run if successful */
308
+ versionTag: string;
309
+ /** Run Configuration */
310
+ runConfig?: {
311
+ [key: string]: object;
312
+ };
313
+ manifesto: Manifesto;
314
+ /** Whether this application exposes an API or not */
315
+ isApi?: boolean;
316
+ /** Path (in the repository) of the API contract file in open api format */
317
+ apiContractPath?: string;
318
+ };
319
+ export type Unit = object;
320
+ export type FinishWorkerIacSchema = {
321
+ schemaVersion: string;
322
+ runTaskId: string;
323
+ runId?: string;
324
+ status: "SUCCESS" | "INTERNAL_ERROR";
325
+ messageError: string;
326
+ metadata?: {
327
+ [key: string]: object;
328
+ };
329
+ };
330
+ export type FinishWorkerDestroySchema = {
331
+ schemaVersion: string;
332
+ runTaskId: string;
333
+ runId?: string;
334
+ status: "SUCCESS" | "INTERNAL_ERROR" | "FAILED";
335
+ messageError: string;
336
+ tfstatePath?: string;
337
+ metadata?: {
338
+ [key: string]: object;
339
+ };
340
+ partialResources?: string[];
341
+ };
342
+ export type FinishWorkerDeploySchema = {
343
+ schemaVersion: string;
344
+ runTaskId: string;
345
+ runId?: string;
346
+ status: "SUCCESS" | "INTERNAL_ERROR" | "FAILED";
347
+ messageError: string;
348
+ metadata?: {
349
+ [key: string]: object;
350
+ };
351
+ output?: {
352
+ [key: string]: object;
353
+ };
354
+ partialResources?: string[];
355
+ };
356
+ export type TagResponse = {
357
+ name: string;
358
+ createdAt: string;
359
+ head: boolean;
360
+ };
361
+ export type EnvironmentResponse = {
362
+ name?: string;
363
+ };
364
+ export type RunTaskResponse = {
365
+ id?: string;
366
+ "type": "IAC" | "DEPLOY" | "DESTROY" | "IAC_SELF_HOSTED" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED";
367
+ status: "PENDING" | "READY_TO_RUN" | "RUNNING" | "SUCCEEDED" | "FAILED" | "INTERNAL_ERROR" | "EXTERNAL_ERROR" | "ABORTED";
368
+ errorDetails?: string;
369
+ logs?: string;
370
+ };
371
+ export type RunPluginResponse = {
372
+ pluginAppliedAlias: string;
373
+ tasks: RunTaskResponse[];
374
+ };
375
+ export type RunResponse = {
376
+ runId: string;
377
+ appId?: string;
378
+ infraId?: string;
379
+ envId: string;
380
+ deploymentId?: string;
381
+ "type": "DEPLOY" | "DESTROY" | "ROLLBACK" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED" | "ROLLBACK_SELF_HOSTED";
382
+ status: "RUNNING" | "SUCCEEDED" | "USER_ERROR" | "RUNTIME_ERROR" | "EXTERNAL_ERROR" | "ABORTING" | "ABORTED";
383
+ createdAt: string;
384
+ updatedAt?: string;
385
+ appliedPlugins?: RunPluginResponse[];
386
+ };
387
+ export type RunLightResponse = {
388
+ runId: string;
389
+ appId?: string;
390
+ infraId?: string;
391
+ envId: string;
392
+ deploymentId?: string;
393
+ author?: string;
394
+ "type": "DEPLOY" | "DESTROY" | "ROLLBACK" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED" | "ROLLBACK_SELF_HOSTED";
395
+ status: "RUNNING" | "SUCCEEDED" | "USER_ERROR" | "RUNTIME_ERROR" | "EXTERNAL_ERROR" | "ABORTING" | "ABORTED";
396
+ createdAt: string;
397
+ updatedAt?: string;
398
+ };
399
+ export type ConnectionInterfaceResponse = {
400
+ name: string;
401
+ "type": string;
402
+ outputs: {
403
+ [key: string]: object;
404
+ };
405
+ };
406
+ export type PluginDeploymentResponse = {
407
+ pluginAppliedAlias: string;
408
+ pluginVersionId: string;
409
+ stackVersionId: string;
410
+ inputs: {
411
+ [key: string]: object;
412
+ };
413
+ connectors: ConnectionInterfaceResponse[];
414
+ };
415
+ export type DeploymentResponse = {
416
+ deploymentId: string;
417
+ appId?: string;
418
+ infraId?: string;
419
+ envId: string;
420
+ head: boolean;
421
+ tag?: string;
422
+ createdAt?: string;
423
+ plugins: PluginDeploymentResponse[];
424
+ };
425
+ export type DeploymentStatusModel = {
426
+ status: "RUNNING" | "SUCCEEDED" | "USER_ERROR" | "RUNTIME_ERROR" | "EXTERNAL_ERROR" | "ABORTING" | "ABORTED";
427
+ };
428
+ export type DiffPluginResponse = {
429
+ appManifesto: {
430
+ [key: string]: object;
431
+ };
432
+ };
433
+ export type Pageable = {
434
+ page?: number;
435
+ size?: number;
436
+ sort?: string[];
437
+ };
438
+ export type SortObject = {
439
+ unsorted?: boolean;
440
+ sorted?: boolean;
441
+ empty?: boolean;
442
+ };
443
+ export type PageableObject = {
444
+ paged?: boolean;
445
+ unpaged?: boolean;
446
+ pageNumber?: number;
447
+ pageSize?: number;
448
+ offset?: number;
449
+ sort?: SortObject;
450
+ };
451
+ export type AdminRunTaskResponse = {
452
+ id?: string;
453
+ "type": "IAC" | "DEPLOY" | "DESTROY" | "IAC_SELF_HOSTED" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED";
454
+ status: "PENDING" | "READY_TO_RUN" | "RUNNING" | "SUCCEEDED" | "FAILED" | "INTERNAL_ERROR" | "EXTERNAL_ERROR" | "ABORTED";
455
+ errorDetails?: string;
456
+ logs?: string;
457
+ iac?: string;
458
+ };
459
+ export type AdminRunPluginResponse = {
460
+ pluginAppliedAlias: string;
461
+ tasks: AdminRunTaskResponse[];
462
+ };
463
+ export type AdminRunResponse = {
464
+ runId: string;
465
+ appId?: string;
466
+ infraId?: string;
467
+ envId: string;
468
+ deploymentId?: string;
469
+ manifesto: {
470
+ [key: string]: object;
471
+ };
472
+ "type": "DEPLOY" | "DESTROY" | "ROLLBACK" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED" | "ROLLBACK_SELF_HOSTED";
473
+ status: "RUNNING" | "SUCCEEDED" | "USER_ERROR" | "RUNTIME_ERROR" | "EXTERNAL_ERROR" | "ABORTING" | "ABORTED";
474
+ createdAt: string;
475
+ updatedAt?: string;
476
+ appliedPlugins?: AdminRunPluginResponse[];
477
+ };
478
+ export type PageAdminRunResponse = {
479
+ totalPages?: number;
480
+ totalElements?: number;
481
+ pageable?: PageableObject;
482
+ numberOfElements?: number;
483
+ size?: number;
484
+ content?: AdminRunResponse[];
485
+ "number"?: number;
486
+ sort?: SortObject;
487
+ first?: boolean;
488
+ last?: boolean;
489
+ empty?: boolean;
490
+ };
491
+ export type SelfHostedConfigModel = {
492
+ terraformBucket: string;
493
+ terraformRegion: string;
494
+ iacBucket: string;
495
+ iacRegion: string;
496
+ };
497
+ export type AdminRunTaskDetailResponse = {
498
+ runTaskId: string;
499
+ runId: string;
500
+ deploymentId: string;
501
+ userRef?: string;
502
+ workspaceId: string;
503
+ workspaceName: string;
504
+ accountId: string;
505
+ envId: string;
506
+ appId?: string;
507
+ infraId?: string;
508
+ realm: string;
509
+ pluginAppliedAlias: string;
510
+ pluginManifesto: {
511
+ [key: string]: object;
512
+ };
513
+ pluginFQDN: string;
514
+ runTaskType: "IAC" | "DEPLOY" | "DESTROY" | "IAC_SELF_HOSTED" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED";
515
+ runTasksStatus: "PENDING" | "READY_TO_RUN" | "RUNNING" | "SUCCEEDED" | "FAILED" | "INTERNAL_ERROR" | "EXTERNAL_ERROR" | "ABORTED";
516
+ errorDetails?: string;
517
+ iacPath?: string;
518
+ workerUrl?: string;
519
+ runTaskData: {
520
+ [key: string]: object;
521
+ };
522
+ requiredRunTasks: string[];
523
+ order: number;
524
+ selfHostedConfig?: SelfHostedConfigModel;
525
+ exception?: string;
526
+ iacDownloadUrl?: string;
527
+ logsDownloadUrl?: string;
528
+ };
529
+ /**
530
+ * Endpoint to get the necessary data to perform an IAC Task
531
+ */
532
+ export function getIacTask({ taskId }: {
533
+ taskId: string;
534
+ }, opts?: Oazapfts.RequestOpts) {
535
+ return oazapfts.ok(oazapfts.fetchJson<{
536
+ status: 200;
537
+ data: TaskIacDataResponse;
538
+ } | {
539
+ status: 404;
540
+ data: ErrorResponse;
541
+ } | {
542
+ status: 422;
543
+ data: ErrorResponse;
544
+ } | {
545
+ status: 500;
546
+ data: ErrorResponse;
547
+ }>(`/v2/run/self-hosted/task/iac/${encodeURIComponent(taskId)}`, {
548
+ ...opts
549
+ }));
550
+ }
551
+ /**
552
+ * Endpoint to inform the completion of an IAC Task
553
+ */
554
+ export function putIacTaskResponse({ taskId, runSelfHostedTaskIacCompletedRequest }: {
555
+ taskId: string;
556
+ runSelfHostedTaskIacCompletedRequest: RunSelfHostedTaskIacCompletedRequest;
557
+ }, opts?: Oazapfts.RequestOpts) {
558
+ return oazapfts.ok(oazapfts.fetchJson<{
559
+ status: 204;
560
+ } | {
561
+ status: 403;
562
+ data: ErrorResponse;
563
+ } | {
564
+ status: 404;
565
+ data: ErrorResponse;
566
+ } | {
567
+ status: 422;
568
+ data: ErrorResponse;
569
+ } | {
570
+ status: 500;
571
+ data: ErrorResponse;
572
+ } | {
573
+ status: 503;
574
+ data: ErrorResponse;
575
+ }>(`/v2/run/self-hosted/task/iac/${encodeURIComponent(taskId)}`, oazapfts.json({
576
+ ...opts,
577
+ method: "PUT",
578
+ body: runSelfHostedTaskIacCompletedRequest
579
+ })));
580
+ }
581
+ /**
582
+ * Endpoint to get the necessary data to perform an Destroy Task
583
+ */
584
+ export function getDestroyTask({ taskId }: {
585
+ taskId: string;
586
+ }, opts?: Oazapfts.RequestOpts) {
587
+ return oazapfts.ok(oazapfts.fetchJson<{
588
+ status: 200;
589
+ data: TaskDestroyDataResponse;
590
+ } | {
591
+ status: 404;
592
+ data: ErrorResponse;
593
+ } | {
594
+ status: 422;
595
+ data: ErrorResponse;
596
+ } | {
597
+ status: 500;
598
+ data: ErrorResponse;
599
+ }>(`/v2/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, {
600
+ ...opts
601
+ }));
602
+ }
603
+ /**
604
+ * Endpoint to inform the completion of a Destroy Task
605
+ */
606
+ export function putDestroyTaskResponse({ taskId, runSelfHostedTaskDestroyCompletedRequest }: {
607
+ taskId: string;
608
+ runSelfHostedTaskDestroyCompletedRequest: RunSelfHostedTaskDestroyCompletedRequest;
609
+ }, opts?: Oazapfts.RequestOpts) {
610
+ return oazapfts.ok(oazapfts.fetchJson<{
611
+ status: 204;
612
+ } | {
613
+ status: 403;
614
+ data: ErrorResponse;
615
+ } | {
616
+ status: 404;
617
+ data: ErrorResponse;
618
+ } | {
619
+ status: 422;
620
+ data: ErrorResponse;
621
+ } | {
622
+ status: 500;
623
+ data: ErrorResponse;
624
+ } | {
625
+ status: 503;
626
+ data: ErrorResponse;
627
+ }>(`/v2/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, oazapfts.json({
628
+ ...opts,
629
+ method: "PUT",
630
+ body: runSelfHostedTaskDestroyCompletedRequest
631
+ })));
632
+ }
633
+ /**
634
+ * Endpoint to get the necessary data to perform a Deploy Task
635
+ */
636
+ export function getDeployTask({ taskId }: {
637
+ taskId: string;
638
+ }, opts?: Oazapfts.RequestOpts) {
639
+ return oazapfts.ok(oazapfts.fetchJson<{
640
+ status: 200;
641
+ data: TaskDeployDataResponse;
642
+ } | {
643
+ status: 404;
644
+ data: ErrorResponse;
645
+ } | {
646
+ status: 422;
647
+ data: ErrorResponse;
648
+ } | {
649
+ status: 500;
650
+ data: ErrorResponse;
651
+ }>(`/v2/run/self-hosted/task/deploy/${encodeURIComponent(taskId)}`, {
652
+ ...opts
653
+ }));
654
+ }
655
+ /**
656
+ * Endpoint to inform the completion of a Deploy Task
657
+ */
658
+ export function putDeployTaskResponse({ taskId, runSelfHostedTaskDeployCompletedRequest }: {
659
+ taskId: string;
660
+ runSelfHostedTaskDeployCompletedRequest: RunSelfHostedTaskDeployCompletedRequest;
661
+ }, opts?: Oazapfts.RequestOpts) {
662
+ return oazapfts.ok(oazapfts.fetchJson<{
663
+ status: 204;
664
+ } | {
665
+ status: 403;
666
+ data: ErrorResponse;
667
+ } | {
668
+ status: 404;
669
+ data: ErrorResponse;
670
+ } | {
671
+ status: 422;
672
+ data: ErrorResponse;
673
+ } | {
674
+ status: 500;
675
+ data: ErrorResponse;
676
+ } | {
677
+ status: 503;
678
+ data: ErrorResponse;
679
+ }>(`/v2/run/self-hosted/task/deploy/${encodeURIComponent(taskId)}`, oazapfts.json({
680
+ ...opts,
681
+ method: "PUT",
682
+ body: runSelfHostedTaskDeployCompletedRequest
683
+ })));
684
+ }
685
+ /**
686
+ * Endpoint to get the necessary data to perform an IAC Task
687
+ */
688
+ export function getIacTask1({ taskId }: {
689
+ taskId: string;
690
+ }, opts?: Oazapfts.RequestOpts) {
691
+ return oazapfts.ok(oazapfts.fetchJson<{
692
+ status: 200;
693
+ data: TaskIacDataResponse;
694
+ } | {
695
+ status: 404;
696
+ data: ErrorResponse;
697
+ } | {
698
+ status: 422;
699
+ data: ErrorResponse;
700
+ } | {
701
+ status: 500;
702
+ data: ErrorResponse;
703
+ }>(`/v1/run/self-hosted/task/iac/${encodeURIComponent(taskId)}`, {
704
+ ...opts
705
+ }));
706
+ }
707
+ /**
708
+ * Endpoint to inform the completion of an IAC Task
709
+ */
710
+ export function putIacTaskResponse1({ taskId, runSelfHostedTaskIacCompletedRequest }: {
711
+ taskId: string;
712
+ runSelfHostedTaskIacCompletedRequest: RunSelfHostedTaskIacCompletedRequest;
713
+ }, opts?: Oazapfts.RequestOpts) {
714
+ return oazapfts.ok(oazapfts.fetchJson<{
715
+ status: 204;
716
+ } | {
717
+ status: 403;
718
+ data: ErrorResponse;
719
+ } | {
720
+ status: 404;
721
+ data: ErrorResponse;
722
+ } | {
723
+ status: 422;
724
+ data: ErrorResponse;
725
+ } | {
726
+ status: 500;
727
+ data: ErrorResponse;
728
+ } | {
729
+ status: 503;
730
+ data: ErrorResponse;
731
+ }>(`/v1/run/self-hosted/task/iac/${encodeURIComponent(taskId)}`, oazapfts.json({
732
+ ...opts,
733
+ method: "PUT",
734
+ body: runSelfHostedTaskIacCompletedRequest
735
+ })));
736
+ }
737
+ /**
738
+ * Endpoint to get the necessary data to perform an Destroy Task
739
+ */
740
+ export function getDestroyTask1({ taskId }: {
741
+ taskId: string;
742
+ }, opts?: Oazapfts.RequestOpts) {
743
+ return oazapfts.ok(oazapfts.fetchJson<{
744
+ status: 200;
745
+ data: TaskDestroyDataResponse;
746
+ } | {
747
+ status: 404;
748
+ data: ErrorResponse;
749
+ } | {
750
+ status: 422;
751
+ data: ErrorResponse;
752
+ } | {
753
+ status: 500;
754
+ data: ErrorResponse;
755
+ }>(`/v1/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, {
756
+ ...opts
757
+ }));
758
+ }
759
+ /**
760
+ * Endpoint to inform the completion of a Destroy Task
761
+ */
762
+ export function putDestroyTaskResponse1({ taskId, runSelfHostedTaskDestroyCompletedRequest }: {
763
+ taskId: string;
764
+ runSelfHostedTaskDestroyCompletedRequest: RunSelfHostedTaskDestroyCompletedRequest;
765
+ }, opts?: Oazapfts.RequestOpts) {
766
+ return oazapfts.ok(oazapfts.fetchJson<{
767
+ status: 204;
768
+ } | {
769
+ status: 403;
770
+ data: ErrorResponse;
771
+ } | {
772
+ status: 404;
773
+ data: ErrorResponse;
774
+ } | {
775
+ status: 422;
776
+ data: ErrorResponse;
777
+ } | {
778
+ status: 500;
779
+ data: ErrorResponse;
780
+ } | {
781
+ status: 503;
782
+ data: ErrorResponse;
783
+ }>(`/v1/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, oazapfts.json({
784
+ ...opts,
785
+ method: "PUT",
786
+ body: runSelfHostedTaskDestroyCompletedRequest
787
+ })));
788
+ }
789
+ /**
790
+ * Endpoint to get the necessary data to perform a Deploy Task
791
+ */
792
+ export function getDeployTask1({ taskId }: {
793
+ taskId: string;
794
+ }, opts?: Oazapfts.RequestOpts) {
795
+ return oazapfts.ok(oazapfts.fetchJson<{
796
+ status: 200;
797
+ data: TaskDeployDataResponse;
798
+ } | {
799
+ status: 404;
800
+ data: ErrorResponse;
801
+ } | {
802
+ status: 422;
803
+ data: ErrorResponse;
804
+ } | {
805
+ status: 500;
806
+ data: ErrorResponse;
807
+ }>(`/v1/run/self-hosted/task/deploy/${encodeURIComponent(taskId)}`, {
808
+ ...opts
809
+ }));
810
+ }
811
+ /**
812
+ * Endpoint to inform the completion of a Deploy Task
813
+ */
814
+ export function putDeployTaskResponse1({ taskId, runSelfHostedTaskDeployCompletedRequest }: {
815
+ taskId: string;
816
+ runSelfHostedTaskDeployCompletedRequest: RunSelfHostedTaskDeployCompletedRequest;
817
+ }, opts?: Oazapfts.RequestOpts) {
818
+ return oazapfts.ok(oazapfts.fetchJson<{
819
+ status: 204;
820
+ } | {
821
+ status: 403;
822
+ data: ErrorResponse;
823
+ } | {
824
+ status: 404;
825
+ data: ErrorResponse;
826
+ } | {
827
+ status: 422;
828
+ data: ErrorResponse;
829
+ } | {
830
+ status: 500;
831
+ data: ErrorResponse;
832
+ } | {
833
+ status: 503;
834
+ data: ErrorResponse;
835
+ }>(`/v1/run/self-hosted/task/deploy/${encodeURIComponent(taskId)}`, oazapfts.json({
836
+ ...opts,
837
+ method: "PUT",
838
+ body: runSelfHostedTaskDeployCompletedRequest
839
+ })));
840
+ }
841
+ /**
842
+ * Endpoint to run Infra Rollback
843
+ */
844
+ export function runRollbackInfra({ runSelfHostedRollbackRequest }: {
845
+ runSelfHostedRollbackRequest: RunSelfHostedRollbackRequest;
846
+ }, opts?: Oazapfts.RequestOpts) {
847
+ return oazapfts.ok(oazapfts.fetchJson<{
848
+ status: 201;
849
+ data: RunSelfHostedResponse;
850
+ } | {
851
+ status: 304;
852
+ data: ErrorResponse;
853
+ } | {
854
+ status: 403;
855
+ data: ErrorResponse;
856
+ } | {
857
+ status: 404;
858
+ data: ErrorResponse;
859
+ } | {
860
+ status: 409;
861
+ data: ErrorResponse;
862
+ } | {
863
+ status: 422;
864
+ data: ErrorResponse;
865
+ } | {
866
+ status: 500;
867
+ data: ErrorResponse;
868
+ } | {
869
+ status: 503;
870
+ data: ErrorResponse;
871
+ }>("/v2/run/self-hosted/rollback/infra", oazapfts.json({
872
+ ...opts,
873
+ method: "POST",
874
+ body: runSelfHostedRollbackRequest
875
+ })));
876
+ }
877
+ /**
878
+ * Endpoint to run App Rollback
879
+ */
880
+ export function runRollbackApp({ runSelfHostedRollbackRequest }: {
881
+ runSelfHostedRollbackRequest: RunSelfHostedRollbackRequest;
882
+ }, opts?: Oazapfts.RequestOpts) {
883
+ return oazapfts.ok(oazapfts.fetchJson<{
884
+ status: 201;
885
+ data: RunSelfHostedResponse;
886
+ } | {
887
+ status: 304;
888
+ data: ErrorResponse;
889
+ } | {
890
+ status: 403;
891
+ data: ErrorResponse;
892
+ } | {
893
+ status: 404;
894
+ data: ErrorResponse;
895
+ } | {
896
+ status: 409;
897
+ data: ErrorResponse;
898
+ } | {
899
+ status: 422;
900
+ data: ErrorResponse;
901
+ } | {
902
+ status: 500;
903
+ data: ErrorResponse;
904
+ } | {
905
+ status: 503;
906
+ data: ErrorResponse;
907
+ }>("/v2/run/self-hosted/rollback/app", oazapfts.json({
908
+ ...opts,
909
+ method: "POST",
910
+ body: runSelfHostedRollbackRequest
911
+ })));
912
+ }
913
+ /**
914
+ * Endpoint to run Destroy SelfHosted
915
+ */
916
+ export function runDestroyInfra({ runSelfHostedDestroyRequest }: {
917
+ runSelfHostedDestroyRequest: RunSelfHostedDestroyRequest;
918
+ }, opts?: Oazapfts.RequestOpts) {
919
+ return oazapfts.ok(oazapfts.fetchJson<{
920
+ status: 422;
921
+ data: ErrorResponse;
922
+ }>("/v2/run/self-hosted/destroy/infra", oazapfts.json({
923
+ ...opts,
924
+ method: "POST",
925
+ body: runSelfHostedDestroyRequest
926
+ })));
927
+ }
928
+ /**
929
+ * Endpoint to run Destroy SelfHosted
930
+ */
931
+ export function runDestroyApp({ runSelfHostedDestroyRequest }: {
932
+ runSelfHostedDestroyRequest: RunSelfHostedDestroyRequest;
933
+ }, opts?: Oazapfts.RequestOpts) {
934
+ return oazapfts.ok(oazapfts.fetchJson<{
935
+ status: 422;
936
+ data: ErrorResponse;
937
+ }>("/v2/run/self-hosted/destroy/app", oazapfts.json({
938
+ ...opts,
939
+ method: "POST",
940
+ body: runSelfHostedDestroyRequest
941
+ })));
942
+ }
943
+ /**
944
+ * Endpoint to run Infra Deploy
945
+ */
946
+ export function runDeployInfra({ runSelfHostedDeployRequest }: {
947
+ runSelfHostedDeployRequest: RunSelfHostedDeployRequest;
948
+ }, opts?: Oazapfts.RequestOpts) {
949
+ return oazapfts.ok(oazapfts.fetchJson<{
950
+ status: 201;
951
+ data: RunSelfHostedResponse;
952
+ } | {
953
+ status: 304;
954
+ data: ErrorResponse;
955
+ } | {
956
+ status: 403;
957
+ data: ErrorResponse;
958
+ } | {
959
+ status: 404;
960
+ data: ErrorResponse;
961
+ } | {
962
+ status: 409;
963
+ data: ErrorResponse;
964
+ } | {
965
+ status: 422;
966
+ data: ErrorResponse;
967
+ } | {
968
+ status: 500;
969
+ data: ErrorResponse;
970
+ } | {
971
+ status: 503;
972
+ data: ErrorResponse;
973
+ }>("/v2/run/self-hosted/deploy/infra", oazapfts.json({
974
+ ...opts,
975
+ method: "POST",
976
+ body: runSelfHostedDeployRequest
977
+ })));
978
+ }
979
+ /**
980
+ * Endpoint to run App Deploy
981
+ */
982
+ export function runDeployApp({ runSelfHostedDeployRequest }: {
983
+ runSelfHostedDeployRequest: RunSelfHostedDeployRequest;
984
+ }, opts?: Oazapfts.RequestOpts) {
985
+ return oazapfts.ok(oazapfts.fetchJson<{
986
+ status: 201;
987
+ data: RunSelfHostedResponse;
988
+ } | {
989
+ status: 304;
990
+ data: ErrorResponse;
991
+ } | {
992
+ status: 403;
993
+ data: ErrorResponse;
994
+ } | {
995
+ status: 404;
996
+ data: ErrorResponse;
997
+ } | {
998
+ status: 409;
999
+ data: ErrorResponse;
1000
+ } | {
1001
+ status: 422;
1002
+ data: ErrorResponse;
1003
+ } | {
1004
+ status: 500;
1005
+ data: ErrorResponse;
1006
+ } | {
1007
+ status: 503;
1008
+ data: ErrorResponse;
1009
+ }>("/v2/run/self-hosted/deploy/app", oazapfts.json({
1010
+ ...opts,
1011
+ method: "POST",
1012
+ body: runSelfHostedDeployRequest
1013
+ })));
1014
+ }
1015
+ /**
1016
+ * Endpoint to run Infra Deploy
1017
+ */
1018
+ export function runDestroyInfra1({ runDestroyRequest }: {
1019
+ runDestroyRequest: RunDestroyRequest;
1020
+ }, opts?: Oazapfts.RequestOpts) {
1021
+ return oazapfts.ok(oazapfts.fetchJson<{
1022
+ status: 201;
1023
+ data: RunCreatedResponse;
1024
+ } | {
1025
+ status: 304;
1026
+ data: ErrorResponse;
1027
+ } | {
1028
+ status: 403;
1029
+ data: ErrorResponse;
1030
+ } | {
1031
+ status: 404;
1032
+ data: ErrorResponse;
1033
+ } | {
1034
+ status: 409;
1035
+ data: ErrorResponse;
1036
+ } | {
1037
+ status: 422;
1038
+ data: ErrorResponse;
1039
+ } | {
1040
+ status: 500;
1041
+ data: ErrorResponse;
1042
+ } | {
1043
+ status: 503;
1044
+ data: ErrorResponse;
1045
+ }>("/v2/run/destroy/infra", oazapfts.json({
1046
+ ...opts,
1047
+ method: "POST",
1048
+ body: runDestroyRequest
1049
+ })));
1050
+ }
1051
+ /**
1052
+ * Endpoint to run App Deploy
1053
+ */
1054
+ export function runDestroyApp1({ runDestroyRequest }: {
1055
+ runDestroyRequest: RunDestroyRequest;
1056
+ }, opts?: Oazapfts.RequestOpts) {
1057
+ return oazapfts.ok(oazapfts.fetchJson<{
1058
+ status: 201;
1059
+ data: RunCreatedResponse;
1060
+ } | {
1061
+ status: 304;
1062
+ data: ErrorResponse;
1063
+ } | {
1064
+ status: 403;
1065
+ data: ErrorResponse;
1066
+ } | {
1067
+ status: 404;
1068
+ data: ErrorResponse;
1069
+ } | {
1070
+ status: 409;
1071
+ data: ErrorResponse;
1072
+ } | {
1073
+ status: 422;
1074
+ data: ErrorResponse;
1075
+ } | {
1076
+ status: 500;
1077
+ data: ErrorResponse;
1078
+ } | {
1079
+ status: 503;
1080
+ data: ErrorResponse;
1081
+ }>("/v2/run/destroy/app", oazapfts.json({
1082
+ ...opts,
1083
+ method: "POST",
1084
+ body: runDestroyRequest
1085
+ })));
1086
+ }
1087
+ /**
1088
+ * Endpoint to identify the worker that got this tasks to process
1089
+ */
1090
+ export function getRunTaskById({ taskId, workerUrl }: {
1091
+ taskId: string;
1092
+ workerUrl: string;
1093
+ }, opts?: Oazapfts.RequestOpts) {
1094
+ return oazapfts.ok(oazapfts.fetchJson<{
1095
+ status: 200;
1096
+ data: WorkerResponse;
1097
+ } | {
1098
+ status: 404;
1099
+ data: ErrorResponse;
1100
+ } | {
1101
+ status: 422;
1102
+ data: ErrorResponse;
1103
+ } | {
1104
+ status: 500;
1105
+ data: ErrorResponse;
1106
+ }>(`/v1/run/task/${encodeURIComponent(taskId)}/worker${QS.query(QS.explode({
1107
+ workerUrl
1108
+ }))}`, {
1109
+ ...opts,
1110
+ method: "POST"
1111
+ }));
1112
+ }
1113
+ /**
1114
+ * Endpoint to run Infra Rollback
1115
+ */
1116
+ export function runRollbackInfra1({ runSelfHostedRollbackRequest }: {
1117
+ runSelfHostedRollbackRequest: RunSelfHostedRollbackRequest;
1118
+ }, opts?: Oazapfts.RequestOpts) {
1119
+ return oazapfts.ok(oazapfts.fetchJson<{
1120
+ status: 201;
1121
+ data: RunSelfHostedResponse;
1122
+ } | {
1123
+ status: 304;
1124
+ data: ErrorResponse;
1125
+ } | {
1126
+ status: 403;
1127
+ data: ErrorResponse;
1128
+ } | {
1129
+ status: 404;
1130
+ data: ErrorResponse;
1131
+ } | {
1132
+ status: 409;
1133
+ data: ErrorResponse;
1134
+ } | {
1135
+ status: 422;
1136
+ data: ErrorResponse;
1137
+ } | {
1138
+ status: 500;
1139
+ data: ErrorResponse;
1140
+ } | {
1141
+ status: 503;
1142
+ data: ErrorResponse;
1143
+ }>("/v1/run/self-hosted/rollback/infra", oazapfts.json({
1144
+ ...opts,
1145
+ method: "POST",
1146
+ body: runSelfHostedRollbackRequest
1147
+ })));
1148
+ }
1149
+ /**
1150
+ * Endpoint to run App Rollback
1151
+ */
1152
+ export function runRollbackApp1({ runSelfHostedRollbackRequest }: {
1153
+ runSelfHostedRollbackRequest: RunSelfHostedRollbackRequest;
1154
+ }, opts?: Oazapfts.RequestOpts) {
1155
+ return oazapfts.ok(oazapfts.fetchJson<{
1156
+ status: 201;
1157
+ data: RunSelfHostedResponse;
1158
+ } | {
1159
+ status: 304;
1160
+ data: ErrorResponse;
1161
+ } | {
1162
+ status: 403;
1163
+ data: ErrorResponse;
1164
+ } | {
1165
+ status: 404;
1166
+ data: ErrorResponse;
1167
+ } | {
1168
+ status: 409;
1169
+ data: ErrorResponse;
1170
+ } | {
1171
+ status: 422;
1172
+ data: ErrorResponse;
1173
+ } | {
1174
+ status: 500;
1175
+ data: ErrorResponse;
1176
+ } | {
1177
+ status: 503;
1178
+ data: ErrorResponse;
1179
+ }>("/v1/run/self-hosted/rollback/app", oazapfts.json({
1180
+ ...opts,
1181
+ method: "POST",
1182
+ body: runSelfHostedRollbackRequest
1183
+ })));
1184
+ }
1185
+ /**
1186
+ * Endpoint to run Destroy SelfHosted
1187
+ */
1188
+ export function runDestroyInfra2({ runSelfHostedDestroyRequest }: {
1189
+ runSelfHostedDestroyRequest: RunSelfHostedDestroyRequest;
1190
+ }, opts?: Oazapfts.RequestOpts) {
1191
+ return oazapfts.ok(oazapfts.fetchJson<{
1192
+ status: 422;
1193
+ data: ErrorResponse;
1194
+ }>("/v1/run/self-hosted/destroy/infra", oazapfts.json({
1195
+ ...opts,
1196
+ method: "POST",
1197
+ body: runSelfHostedDestroyRequest
1198
+ })));
1199
+ }
1200
+ /**
1201
+ * Endpoint to run Destroy SelfHosted
1202
+ */
1203
+ export function runDestroyApp2({ runSelfHostedDestroyRequest }: {
1204
+ runSelfHostedDestroyRequest: RunSelfHostedDestroyRequest;
1205
+ }, opts?: Oazapfts.RequestOpts) {
1206
+ return oazapfts.ok(oazapfts.fetchJson<{
1207
+ status: 422;
1208
+ data: ErrorResponse;
1209
+ }>("/v1/run/self-hosted/destroy/app", oazapfts.json({
1210
+ ...opts,
1211
+ method: "POST",
1212
+ body: runSelfHostedDestroyRequest
1213
+ })));
1214
+ }
1215
+ /**
1216
+ * Endpoint to run Infra Deploy
1217
+ */
1218
+ export function runDeployInfra1({ runSelfHostedDeployRequest }: {
1219
+ runSelfHostedDeployRequest: RunSelfHostedDeployRequest;
1220
+ }, opts?: Oazapfts.RequestOpts) {
1221
+ return oazapfts.ok(oazapfts.fetchJson<{
1222
+ status: 201;
1223
+ data: RunSelfHostedResponse;
1224
+ } | {
1225
+ status: 304;
1226
+ data: ErrorResponse;
1227
+ } | {
1228
+ status: 403;
1229
+ data: ErrorResponse;
1230
+ } | {
1231
+ status: 404;
1232
+ data: ErrorResponse;
1233
+ } | {
1234
+ status: 409;
1235
+ data: ErrorResponse;
1236
+ } | {
1237
+ status: 422;
1238
+ data: ErrorResponse;
1239
+ } | {
1240
+ status: 500;
1241
+ data: ErrorResponse;
1242
+ } | {
1243
+ status: 503;
1244
+ data: ErrorResponse;
1245
+ }>("/v1/run/self-hosted/deploy/infra", oazapfts.json({
1246
+ ...opts,
1247
+ method: "POST",
1248
+ body: runSelfHostedDeployRequest
1249
+ })));
1250
+ }
1251
+ /**
1252
+ * Endpoint to run App Deploy
1253
+ */
1254
+ export function runDeployApp1({ runSelfHostedDeployRequest }: {
1255
+ runSelfHostedDeployRequest: RunSelfHostedDeployRequest;
1256
+ }, opts?: Oazapfts.RequestOpts) {
1257
+ return oazapfts.ok(oazapfts.fetchJson<{
1258
+ status: 201;
1259
+ data: RunSelfHostedResponse;
1260
+ } | {
1261
+ status: 304;
1262
+ data: ErrorResponse;
1263
+ } | {
1264
+ status: 403;
1265
+ data: ErrorResponse;
1266
+ } | {
1267
+ status: 404;
1268
+ data: ErrorResponse;
1269
+ } | {
1270
+ status: 409;
1271
+ data: ErrorResponse;
1272
+ } | {
1273
+ status: 422;
1274
+ data: ErrorResponse;
1275
+ } | {
1276
+ status: 500;
1277
+ data: ErrorResponse;
1278
+ } | {
1279
+ status: 503;
1280
+ data: ErrorResponse;
1281
+ }>("/v1/run/self-hosted/deploy/app", oazapfts.json({
1282
+ ...opts,
1283
+ method: "POST",
1284
+ body: runSelfHostedDeployRequest
1285
+ })));
1286
+ }
1287
+ /**
1288
+ * Endpoint to run Infra Rollback
1289
+ */
1290
+ export function runRollbackInfra2({ runRollbackRequest }: {
1291
+ runRollbackRequest: RunRollbackRequest;
1292
+ }, opts?: Oazapfts.RequestOpts) {
1293
+ return oazapfts.ok(oazapfts.fetchJson<{
1294
+ status: 201;
1295
+ data: RunCreatedResponse;
1296
+ } | {
1297
+ status: 304;
1298
+ data: ErrorResponse;
1299
+ } | {
1300
+ status: 403;
1301
+ data: ErrorResponse;
1302
+ } | {
1303
+ status: 404;
1304
+ data: ErrorResponse;
1305
+ } | {
1306
+ status: 409;
1307
+ data: ErrorResponse;
1308
+ } | {
1309
+ status: 422;
1310
+ data: ErrorResponse;
1311
+ } | {
1312
+ status: 500;
1313
+ data: ErrorResponse;
1314
+ } | {
1315
+ status: 503;
1316
+ data: ErrorResponse;
1317
+ }>("/v1/run/rollback/infra", oazapfts.json({
1318
+ ...opts,
1319
+ method: "POST",
1320
+ body: runRollbackRequest
1321
+ })));
1322
+ }
1323
+ /**
1324
+ * Endpoint to run App Rollback
1325
+ */
1326
+ export function runRollbackApp2({ runRollbackRequest }: {
1327
+ runRollbackRequest: RunRollbackRequest;
1328
+ }, opts?: Oazapfts.RequestOpts) {
1329
+ return oazapfts.ok(oazapfts.fetchJson<{
1330
+ status: 201;
1331
+ data: RunCreatedResponse;
1332
+ } | {
1333
+ status: 304;
1334
+ data: ErrorResponse;
1335
+ } | {
1336
+ status: 403;
1337
+ data: ErrorResponse;
1338
+ } | {
1339
+ status: 404;
1340
+ data: ErrorResponse;
1341
+ } | {
1342
+ status: 409;
1343
+ data: ErrorResponse;
1344
+ } | {
1345
+ status: 422;
1346
+ data: ErrorResponse;
1347
+ } | {
1348
+ status: 500;
1349
+ data: ErrorResponse;
1350
+ } | {
1351
+ status: 503;
1352
+ data: ErrorResponse;
1353
+ }>("/v1/run/rollback/app", oazapfts.json({
1354
+ ...opts,
1355
+ method: "POST",
1356
+ body: runRollbackRequest
1357
+ })));
1358
+ }
1359
+ /**
1360
+ * Endpoint to run Destroy
1361
+ */
1362
+ export function runDestroyInfra3({ runDestroyRequest }: {
1363
+ runDestroyRequest: RunDestroyRequest;
1364
+ }, opts?: Oazapfts.RequestOpts) {
1365
+ return oazapfts.ok(oazapfts.fetchJson<{
1366
+ status: 422;
1367
+ data: ErrorResponse;
1368
+ }>("/v1/run/destroy/infra", oazapfts.json({
1369
+ ...opts,
1370
+ method: "POST",
1371
+ body: runDestroyRequest
1372
+ })));
1373
+ }
1374
+ /**
1375
+ * Endpoint to run Destroy
1376
+ */
1377
+ export function runDestroyApp3({ runDestroyRequest }: {
1378
+ runDestroyRequest: RunDestroyRequest;
1379
+ }, opts?: Oazapfts.RequestOpts) {
1380
+ return oazapfts.ok(oazapfts.fetchJson<{
1381
+ status: 422;
1382
+ data: ErrorResponse;
1383
+ }>("/v1/run/destroy/app", oazapfts.json({
1384
+ ...opts,
1385
+ method: "POST",
1386
+ body: runDestroyRequest
1387
+ })));
1388
+ }
1389
+ /**
1390
+ * Endpoint to run Infra Deploy
1391
+ */
1392
+ export function runDeployInfra2({ runDeployRequest }: {
1393
+ runDeployRequest: RunDeployRequest;
1394
+ }, opts?: Oazapfts.RequestOpts) {
1395
+ return oazapfts.ok(oazapfts.fetchJson<{
1396
+ status: 201;
1397
+ data: RunCreatedResponse;
1398
+ } | {
1399
+ status: 304;
1400
+ data: ErrorResponse;
1401
+ } | {
1402
+ status: 403;
1403
+ data: ErrorResponse;
1404
+ } | {
1405
+ status: 404;
1406
+ data: ErrorResponse;
1407
+ } | {
1408
+ status: 409;
1409
+ data: ErrorResponse;
1410
+ } | {
1411
+ status: 422;
1412
+ data: ErrorResponse;
1413
+ } | {
1414
+ status: 500;
1415
+ data: ErrorResponse;
1416
+ } | {
1417
+ status: 503;
1418
+ data: ErrorResponse;
1419
+ }>("/v1/run/deploy/infra", oazapfts.json({
1420
+ ...opts,
1421
+ method: "POST",
1422
+ body: runDeployRequest
1423
+ })));
1424
+ }
1425
+ /**
1426
+ * Endpoint to run App Deploy
1427
+ */
1428
+ export function runDeployApp2({ runDeployRequest }: {
1429
+ runDeployRequest: RunDeployRequest;
1430
+ }, opts?: Oazapfts.RequestOpts) {
1431
+ return oazapfts.ok(oazapfts.fetchJson<{
1432
+ status: 201;
1433
+ data: RunCreatedResponse;
1434
+ } | {
1435
+ status: 304;
1436
+ data: ErrorResponse;
1437
+ } | {
1438
+ status: 403;
1439
+ data: ErrorResponse;
1440
+ } | {
1441
+ status: 404;
1442
+ data: ErrorResponse;
1443
+ } | {
1444
+ status: 409;
1445
+ data: ErrorResponse;
1446
+ } | {
1447
+ status: 422;
1448
+ data: ErrorResponse;
1449
+ } | {
1450
+ status: 500;
1451
+ data: ErrorResponse;
1452
+ } | {
1453
+ status: 503;
1454
+ data: ErrorResponse;
1455
+ }>("/v1/run/deploy/app", oazapfts.json({
1456
+ ...opts,
1457
+ method: "POST",
1458
+ body: runDeployRequest
1459
+ })));
1460
+ }
1461
+ /**
1462
+ * Endpoint to cancel a run that's currently running
1463
+ */
1464
+ export function cancelAppRunByRunId({ runId, force }: {
1465
+ runId: string;
1466
+ force?: boolean;
1467
+ }, opts?: Oazapfts.RequestOpts) {
1468
+ return oazapfts.ok(oazapfts.fetchJson<{
1469
+ status: 202;
1470
+ data: Unit;
1471
+ } | {
1472
+ status: 404;
1473
+ data: ErrorResponse;
1474
+ } | {
1475
+ status: 422;
1476
+ data: ErrorResponse;
1477
+ }>(`/v1/run/cancel/${encodeURIComponent(runId)}${QS.query(QS.explode({
1478
+ force
1479
+ }))}`, {
1480
+ ...opts,
1481
+ method: "POST"
1482
+ }));
1483
+ }
1484
+ /**
1485
+ * Simulate a response from deploy worker
1486
+ */
1487
+ export function simulateIacWorkerResponse({ finishWorkerIacSchema }: {
1488
+ finishWorkerIacSchema: FinishWorkerIacSchema;
1489
+ }, opts?: Oazapfts.RequestOpts) {
1490
+ return oazapfts.ok(oazapfts.fetchJson<{
1491
+ status: 200;
1492
+ data: boolean;
1493
+ }>("/admin/simulate/worker-response/iac", oazapfts.json({
1494
+ ...opts,
1495
+ method: "POST",
1496
+ body: finishWorkerIacSchema
1497
+ })));
1498
+ }
1499
+ /**
1500
+ * Endpoint to cancel a run that's currently running
1501
+ */
1502
+ export function simulateIacWorkerResponseForAllTasks({ runId }: {
1503
+ runId: string;
1504
+ }, opts?: Oazapfts.RequestOpts) {
1505
+ return oazapfts.ok(oazapfts.fetchJson<{
1506
+ status: 202;
1507
+ data: boolean;
1508
+ } | {
1509
+ status: 404;
1510
+ data: ErrorResponse;
1511
+ } | {
1512
+ status: 422;
1513
+ data: ErrorResponse;
1514
+ }>(`/admin/simulate/worker-response/iac/${encodeURIComponent(runId)}`, {
1515
+ ...opts,
1516
+ method: "POST"
1517
+ }));
1518
+ }
1519
+ /**
1520
+ * Simulate a response from deploy worker
1521
+ */
1522
+ export function simulateDestroyWorkerResponse({ finishWorkerDestroySchema }: {
1523
+ finishWorkerDestroySchema: FinishWorkerDestroySchema;
1524
+ }, opts?: Oazapfts.RequestOpts) {
1525
+ return oazapfts.ok(oazapfts.fetchJson<{
1526
+ status: 200;
1527
+ data: boolean;
1528
+ }>("/admin/simulate/worker-response/destroy", oazapfts.json({
1529
+ ...opts,
1530
+ method: "POST",
1531
+ body: finishWorkerDestroySchema
1532
+ })));
1533
+ }
1534
+ /**
1535
+ * Simulate a response from deploy worker
1536
+ */
1537
+ export function simulateDeployWorkerResponse({ finishWorkerDeploySchema }: {
1538
+ finishWorkerDeploySchema: FinishWorkerDeploySchema;
1539
+ }, opts?: Oazapfts.RequestOpts) {
1540
+ return oazapfts.ok(oazapfts.fetchJson<{
1541
+ status: 200;
1542
+ data: boolean;
1543
+ }>("/admin/simulate/worker-response/deploy", oazapfts.json({
1544
+ ...opts,
1545
+ method: "POST",
1546
+ body: finishWorkerDeploySchema
1547
+ })));
1548
+ }
1549
+ /**
1550
+ * Endpoint to force to resend all "ready to run" tasks by runId
1551
+ */
1552
+ export function resendTasks({ runId }: {
1553
+ runId: string;
1554
+ }, opts?: Oazapfts.RequestOpts) {
1555
+ return oazapfts.ok(oazapfts.fetchJson<{
1556
+ status: 200;
1557
+ data: boolean;
1558
+ } | {
1559
+ status: 422;
1560
+ data: ErrorResponse;
1561
+ } | {
1562
+ status: 500;
1563
+ data: ErrorResponse;
1564
+ }>(`/admin/run/${encodeURIComponent(runId)}/tasks/resend`, {
1565
+ ...opts,
1566
+ method: "POST"
1567
+ }));
1568
+ }
1569
+ /**
1570
+ * Endpoint to force status RUNTIME_ERROR to a run by runId
1571
+ */
1572
+ export function setRunAsFailed({ runId }: {
1573
+ runId: string;
1574
+ }, opts?: Oazapfts.RequestOpts) {
1575
+ return oazapfts.ok(oazapfts.fetchJson<{
1576
+ status: 200;
1577
+ data: boolean;
1578
+ } | {
1579
+ status: 404;
1580
+ data: ErrorResponse;
1581
+ } | {
1582
+ status: 422;
1583
+ data: ErrorResponse;
1584
+ } | {
1585
+ status: 500;
1586
+ data: ErrorResponse;
1587
+ }>(`/admin/run/${encodeURIComponent(runId)}/set-as-error`, {
1588
+ ...opts,
1589
+ method: "POST"
1590
+ }));
1591
+ }
1592
+ /**
1593
+ * Endpoint to block a StackSpot Workspace to perform Runtime operations
1594
+ */
1595
+ export function blockWorkspace({ workspaceId }: {
1596
+ workspaceId: string;
1597
+ }, opts?: Oazapfts.RequestOpts) {
1598
+ return oazapfts.ok(oazapfts.fetchJson<{
1599
+ status: 200;
1600
+ } | {
1601
+ status: 422;
1602
+ data: ErrorResponse;
1603
+ } | {
1604
+ status: 500;
1605
+ data: ErrorResponse;
1606
+ }>(`/admin/block/workspace/${encodeURIComponent(workspaceId)}`, {
1607
+ ...opts,
1608
+ method: "POST"
1609
+ }));
1610
+ }
1611
+ /**
1612
+ * Endpoint to block a StackSpot Account to perform Runtime operations
1613
+ */
1614
+ export function blockAccount({ accountId }: {
1615
+ accountId: string;
1616
+ }, opts?: Oazapfts.RequestOpts) {
1617
+ return oazapfts.ok(oazapfts.fetchJson<{
1618
+ status: 200;
1619
+ } | {
1620
+ status: 422;
1621
+ data: ErrorResponse;
1622
+ } | {
1623
+ status: 500;
1624
+ data: ErrorResponse;
1625
+ }>(`/admin/block/account/${encodeURIComponent(accountId)}`, {
1626
+ ...opts,
1627
+ method: "POST"
1628
+ }));
1629
+ }
1630
+ /**
1631
+ * Endpoint to get tag data
1632
+ */
1633
+ export function getTagsByInfraIdAndEnvId({ infraId, envId }: {
1634
+ infraId: string;
1635
+ envId: string;
1636
+ }, opts?: Oazapfts.RequestOpts) {
1637
+ return oazapfts.ok(oazapfts.fetchJson<{
1638
+ status: 200;
1639
+ data: TagResponse[];
1640
+ } | {
1641
+ status: 404;
1642
+ data: ErrorResponse;
1643
+ } | {
1644
+ status: 422;
1645
+ data: ErrorResponse;
1646
+ } | {
1647
+ status: 500;
1648
+ data: ErrorResponse;
1649
+ }>(`/v1/tag/infra/${encodeURIComponent(infraId)}/env/${encodeURIComponent(envId)}`, {
1650
+ ...opts
1651
+ }));
1652
+ }
1653
+ /**
1654
+ * Endpoint to get tag data
1655
+ */
1656
+ export function getTagsByAppIdAndEnvId({ appId, envId }: {
1657
+ appId: string;
1658
+ envId: string;
1659
+ }, opts?: Oazapfts.RequestOpts) {
1660
+ return oazapfts.ok(oazapfts.fetchJson<{
1661
+ status: 200;
1662
+ data: TagResponse[];
1663
+ } | {
1664
+ status: 404;
1665
+ data: ErrorResponse;
1666
+ } | {
1667
+ status: 422;
1668
+ data: ErrorResponse;
1669
+ } | {
1670
+ status: 500;
1671
+ data: ErrorResponse;
1672
+ }>(`/v1/tag/app/${encodeURIComponent(appId)}/env/${encodeURIComponent(envId)}`, {
1673
+ ...opts
1674
+ }));
1675
+ }
1676
+ /**
1677
+ * Endpoint to get environment
1678
+ */
1679
+ export function getAllEnvironmentConfiguration(opts?: Oazapfts.RequestOpts) {
1680
+ return oazapfts.ok(oazapfts.fetchJson<{
1681
+ status: 200;
1682
+ data: EnvironmentResponse[];
1683
+ } | {
1684
+ status: 500;
1685
+ data: ErrorResponse;
1686
+ }>("/v1/runtime-environment", {
1687
+ ...opts
1688
+ }));
1689
+ }
1690
+ /**
1691
+ * Endpoint to get run data by runId
1692
+ */
1693
+ export function getRunById({ runId }: {
1694
+ runId: string;
1695
+ }, opts?: Oazapfts.RequestOpts) {
1696
+ return oazapfts.ok(oazapfts.fetchJson<{
1697
+ status: 200;
1698
+ data: RunResponse;
1699
+ } | {
1700
+ status: 404;
1701
+ data: ErrorResponse;
1702
+ } | {
1703
+ status: 500;
1704
+ data: ErrorResponse;
1705
+ }>(`/v1/run/${encodeURIComponent(runId)}`, {
1706
+ ...opts
1707
+ }));
1708
+ }
1709
+ /**
1710
+ * Endpoint to get runs data by infraId and envId, sorted by createdAt descending
1711
+ */
1712
+ export function getRunsByInfraIdAndEnvId({ size, page, infraId, envId, status }: {
1713
+ size?: number;
1714
+ page?: number;
1715
+ infraId: string;
1716
+ envId: string;
1717
+ status?: "RUNNING" | "SUCCEEDED" | "USER_ERROR" | "RUNTIME_ERROR" | "EXTERNAL_ERROR" | "ABORTING" | "ABORTED";
1718
+ }, opts?: Oazapfts.RequestOpts) {
1719
+ return oazapfts.ok(oazapfts.fetchJson<{
1720
+ status: 200;
1721
+ data: RunLightResponse[];
1722
+ } | {
1723
+ status: 500;
1724
+ data: ErrorResponse;
1725
+ }>(`/v1/run/infra/${encodeURIComponent(infraId)}/env/${encodeURIComponent(envId)}${QS.query(QS.explode({
1726
+ size,
1727
+ page,
1728
+ status
1729
+ }))}`, {
1730
+ ...opts
1731
+ }));
1732
+ }
1733
+ /**
1734
+ * Endpoint to get runs data by appId and envId, sorted by createdAt descending
1735
+ */
1736
+ export function getRunsByAppIdAndEnvId({ size, page, appId, envId, status }: {
1737
+ size?: number;
1738
+ page?: number;
1739
+ appId: string;
1740
+ envId: string;
1741
+ status?: "RUNNING" | "SUCCEEDED" | "USER_ERROR" | "RUNTIME_ERROR" | "EXTERNAL_ERROR" | "ABORTING" | "ABORTED";
1742
+ }, opts?: Oazapfts.RequestOpts) {
1743
+ return oazapfts.ok(oazapfts.fetchJson<{
1744
+ status: 200;
1745
+ data: RunLightResponse[];
1746
+ } | {
1747
+ status: 500;
1748
+ data: ErrorResponse;
1749
+ }>(`/v1/run/app/${encodeURIComponent(appId)}/env/${encodeURIComponent(envId)}${QS.query(QS.explode({
1750
+ size,
1751
+ page,
1752
+ status
1753
+ }))}`, {
1754
+ ...opts
1755
+ }));
1756
+ }
1757
+ /**
1758
+ * Endpoint to get deployment data by deploymentId
1759
+ */
1760
+ export function getDeploymentById({ deploymentId }: {
1761
+ deploymentId: string;
1762
+ }, opts?: Oazapfts.RequestOpts) {
1763
+ return oazapfts.ok(oazapfts.fetchJson<{
1764
+ status: 200;
1765
+ data: DeploymentResponse;
1766
+ } | {
1767
+ status: 404;
1768
+ data: ErrorResponse;
1769
+ } | {
1770
+ status: 500;
1771
+ data: ErrorResponse;
1772
+ }>(`/v1/deployment/${encodeURIComponent(deploymentId)}`, {
1773
+ ...opts
1774
+ }));
1775
+ }
1776
+ /**
1777
+ * Endpoint to get deployment data by infraId and envId, sorted by creation date descending
1778
+ */
1779
+ export function getDeploymentByInfraIdAndEnvId({ size, page, infraId, envId }: {
1780
+ size?: number;
1781
+ page?: number;
1782
+ infraId: string;
1783
+ envId: string;
1784
+ }, opts?: Oazapfts.RequestOpts) {
1785
+ return oazapfts.ok(oazapfts.fetchJson<{
1786
+ status: 200;
1787
+ data: DeploymentResponse[];
1788
+ } | {
1789
+ status: 500;
1790
+ data: ErrorResponse;
1791
+ }>(`/v1/deployment/infra/${encodeURIComponent(infraId)}/env/${encodeURIComponent(envId)}${QS.query(QS.explode({
1792
+ size,
1793
+ page
1794
+ }))}`, {
1795
+ ...opts
1796
+ }));
1797
+ }
1798
+ /**
1799
+ * Endpoint to get deployment head data by appId and envId
1800
+ */
1801
+ export function getDeploymentHeadByInfraIdAndEnvId({ infraId, envId }: {
1802
+ infraId: string;
1803
+ envId: string;
1804
+ }, opts?: Oazapfts.RequestOpts) {
1805
+ return oazapfts.ok(oazapfts.fetchJson<{
1806
+ status: 200;
1807
+ data: DeploymentResponse;
1808
+ } | {
1809
+ status: 404;
1810
+ data: ErrorResponse;
1811
+ } | {
1812
+ status: 500;
1813
+ data: ErrorResponse;
1814
+ }>(`/v1/deployment/infra/${encodeURIComponent(infraId)}/env/${encodeURIComponent(envId)}/head`, {
1815
+ ...opts
1816
+ }));
1817
+ }
1818
+ /**
1819
+ * Endpoint to get last deployment status
1820
+ */
1821
+ export function getDeploymentStatus({ appId, envId }: {
1822
+ appId?: string;
1823
+ envId: string;
1824
+ }, opts?: Oazapfts.RequestOpts) {
1825
+ return oazapfts.ok(oazapfts.fetchJson<{
1826
+ status: 200;
1827
+ data: DeploymentStatusModel;
1828
+ } | {
1829
+ status: 404;
1830
+ data: ErrorResponse;
1831
+ } | {
1832
+ status: 500;
1833
+ data: ErrorResponse;
1834
+ }>(`/v1/deployment/app/status/${encodeURIComponent(appId)}/env/${encodeURIComponent(envId)}`, {
1835
+ ...opts
1836
+ }));
1837
+ }
1838
+ /**
1839
+ * Endpoint to get last deployment status
1840
+ */
1841
+ export function getDeploymentStatus1({ infraId, envId }: {
1842
+ infraId?: string;
1843
+ envId: string;
1844
+ }, opts?: Oazapfts.RequestOpts) {
1845
+ return oazapfts.ok(oazapfts.fetchJson<{
1846
+ status: 200;
1847
+ data: DeploymentStatusModel;
1848
+ } | {
1849
+ status: 404;
1850
+ data: ErrorResponse;
1851
+ } | {
1852
+ status: 500;
1853
+ data: ErrorResponse;
1854
+ }>(`/v1/deployment/infra/status/${encodeURIComponent(infraId)}/env/${encodeURIComponent(envId)}`, {
1855
+ ...opts
1856
+ }));
1857
+ }
1858
+ export function getDiffByInfra({ infraId, envId }: {
1859
+ infraId?: string;
1860
+ envId: string;
1861
+ }, opts?: Oazapfts.RequestOpts) {
1862
+ return oazapfts.ok(oazapfts.fetchJson<{
1863
+ status: 200;
1864
+ data: DiffPluginResponse;
1865
+ }>(`/v1/deployment/diff/env/${encodeURIComponent(envId)}/infra/${encodeURIComponent(infraId)}`, {
1866
+ ...opts
1867
+ }));
1868
+ }
1869
+ export function getDiffByApp({ appId, envId }: {
1870
+ appId: string;
1871
+ envId: string;
1872
+ }, opts?: Oazapfts.RequestOpts) {
1873
+ return oazapfts.ok(oazapfts.fetchJson<{
1874
+ status: 200;
1875
+ data: DiffPluginResponse;
1876
+ }>(`/v1/deployment/diff/env/${encodeURIComponent(envId)}/app/${encodeURIComponent(appId)}`, {
1877
+ ...opts
1878
+ }));
1879
+ }
1880
+ /**
1881
+ * Endpoint to get deployment data by appId and envId, sorted by creation date descending
1882
+ */
1883
+ export function getDeploymentByAppIdAndEnvId({ size, page, appId, envId }: {
1884
+ size?: number;
1885
+ page?: number;
1886
+ appId: string;
1887
+ envId: string;
1888
+ }, opts?: Oazapfts.RequestOpts) {
1889
+ return oazapfts.ok(oazapfts.fetchJson<{
1890
+ status: 200;
1891
+ data: DeploymentResponse[];
1892
+ } | {
1893
+ status: 500;
1894
+ data: ErrorResponse;
1895
+ }>(`/v1/deployment/app/${encodeURIComponent(appId)}/env/${encodeURIComponent(envId)}${QS.query(QS.explode({
1896
+ size,
1897
+ page
1898
+ }))}`, {
1899
+ ...opts
1900
+ }));
1901
+ }
1902
+ /**
1903
+ * Endpoint to get deployment head data by appId and envId
1904
+ */
1905
+ export function getDeploymentHeadByAppIdAndEnvId({ appId, envId }: {
1906
+ appId: string;
1907
+ envId: string;
1908
+ }, opts?: Oazapfts.RequestOpts) {
1909
+ return oazapfts.ok(oazapfts.fetchJson<{
1910
+ status: 200;
1911
+ data: DeploymentResponse;
1912
+ } | {
1913
+ status: 404;
1914
+ data: ErrorResponse;
1915
+ } | {
1916
+ status: 500;
1917
+ data: ErrorResponse;
1918
+ }>(`/v1/deployment/app/${encodeURIComponent(appId)}/env/${encodeURIComponent(envId)}/head`, {
1919
+ ...opts
1920
+ }));
1921
+ }
1922
+ /**
1923
+ * Get task with workspaceName, appId or InfraId that have status RUNNING
1924
+ */
1925
+ export function getAdminRunStatusRunningDetails({ workspaceName, pageable }: {
1926
+ workspaceName: string;
1927
+ pageable: Pageable;
1928
+ }, opts?: Oazapfts.RequestOpts) {
1929
+ return oazapfts.ok(oazapfts.fetchJson<{
1930
+ status: 200;
1931
+ data: PageAdminRunResponse;
1932
+ } | {
1933
+ status: 404;
1934
+ data: ErrorResponse;
1935
+ } | {
1936
+ status: 500;
1937
+ data: ErrorResponse;
1938
+ }>(`/admin/run/running/workspace/${encodeURIComponent(workspaceName)}${QS.query(QS.explode({
1939
+ pageable
1940
+ }))}`, {
1941
+ ...opts
1942
+ }));
1943
+ }
1944
+ /**
1945
+ * Get task with workspaceName, appId or InfraId that have status RUNNING
1946
+ */
1947
+ export function getAdminRunStatusRunningDetails1({ infraId, pageable }: {
1948
+ infraId?: string;
1949
+ pageable: Pageable;
1950
+ }, opts?: Oazapfts.RequestOpts) {
1951
+ return oazapfts.ok(oazapfts.fetchJson<{
1952
+ status: 200;
1953
+ data: PageAdminRunResponse;
1954
+ } | {
1955
+ status: 404;
1956
+ data: ErrorResponse;
1957
+ } | {
1958
+ status: 500;
1959
+ data: ErrorResponse;
1960
+ }>(`/admin/run/running/infra/${encodeURIComponent(infraId)}${QS.query(QS.explode({
1961
+ pageable
1962
+ }))}`, {
1963
+ ...opts
1964
+ }));
1965
+ }
1966
+ /**
1967
+ * Get task with workspaceName, appId or InfraId that have status RUNNING
1968
+ */
1969
+ export function getAdminRunStatusRunningDetails2({ appId, pageable }: {
1970
+ appId?: string;
1971
+ pageable: Pageable;
1972
+ }, opts?: Oazapfts.RequestOpts) {
1973
+ return oazapfts.ok(oazapfts.fetchJson<{
1974
+ status: 200;
1975
+ data: PageAdminRunResponse;
1976
+ } | {
1977
+ status: 404;
1978
+ data: ErrorResponse;
1979
+ } | {
1980
+ status: 500;
1981
+ data: ErrorResponse;
1982
+ }>(`/admin/run/running/app/${encodeURIComponent(appId)}${QS.query(QS.explode({
1983
+ pageable
1984
+ }))}`, {
1985
+ ...opts
1986
+ }));
1987
+ }
1988
+ /**
1989
+ * Get task details from run task id
1990
+ */
1991
+ export function getAdminRunTaskDetails({ runTaskId }: {
1992
+ runTaskId: string;
1993
+ }, opts?: Oazapfts.RequestOpts) {
1994
+ return oazapfts.ok(oazapfts.fetchJson<{
1995
+ status: 200;
1996
+ data: AdminRunTaskDetailResponse;
1997
+ } | {
1998
+ status: 404;
1999
+ data: ErrorResponse;
2000
+ } | {
2001
+ status: 500;
2002
+ data: ErrorResponse;
2003
+ }>(`/admin/get/task/${encodeURIComponent(runTaskId)}/details`, {
2004
+ ...opts
2005
+ }));
2006
+ }
2007
+ /**
2008
+ * Get a run from run or run task id
2009
+ */
2010
+ export function getAdminRun({ runId, runTaskId }: {
2011
+ runId?: string;
2012
+ runTaskId?: string;
2013
+ }, opts?: Oazapfts.RequestOpts) {
2014
+ return oazapfts.ok(oazapfts.fetchJson<{
2015
+ status: 200;
2016
+ data: AdminRunResponse;
2017
+ } | {
2018
+ status: 404;
2019
+ data: ErrorResponse;
2020
+ } | {
2021
+ status: 500;
2022
+ data: ErrorResponse;
2023
+ }>(`/admin/get/run${QS.query(QS.explode({
2024
+ runId,
2025
+ runTaskId
2026
+ }))}`, {
2027
+ ...opts
2028
+ }));
2029
+ }