@stack-spot/portal-network 0.184.0 → 0.185.0-beta.1

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