@stack-spot/portal-network 0.79.0 → 0.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,23 +14,48 @@ const oazapfts = Oazapfts.runtime(defaults);
14
14
  export const servers = {
15
15
  generatedServerUrl: "https://runtime-manager.dev.stackspot.com"
16
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
+ };
17
41
  export type TaskDataS3BackendResponse = {
18
42
  bucket: string;
19
43
  region: string;
20
44
  key: string;
21
45
  };
22
46
  export type TaskIacDataResponsePlugin = {
23
- pluginAppliedAlias: string;
24
- name: string;
47
+ pluginAppliedAlias?: string;
48
+ name?: string;
25
49
  inputs: {
26
50
  [key: string]: object;
27
51
  };
52
+ fork: boolean;
28
53
  };
29
54
  export type TaskIacDataResponseConnector = {
30
55
  connector: string;
31
56
  alias: string;
32
57
  "type": string;
33
- pluginName: string;
58
+ pluginName?: string;
34
59
  attributes: {
35
60
  [key: string]: object;
36
61
  };
@@ -49,6 +74,7 @@ export type TaskIacDataResponse = {
49
74
  [key: string]: object;
50
75
  };
51
76
  runEnvironment: string[];
77
+ appId: string;
52
78
  };
53
79
  export type ValidationDetails = {
54
80
  code: string;
@@ -57,7 +83,7 @@ export type ValidationDetails = {
57
83
  values?: string[];
58
84
  };
59
85
  export type ErrorResponse = {
60
- code: "RTM_ACCESS_TOKEN_NOT_RECEIVED_FROM_IDM" | "RTM_EVENTS_NOT_SENT" | "RTM_BAD_REQUEST_ERROR" | "RTM_MANDATORY_PARAM_NOT_INFORMED" | "RTM_MANDATORY_ATTR_NOT_INFORMED" | "RTM_ATTR_INVALID" | "RTM_ATTR_INVALID_FORMAT" | "RTM_ATTR_INVALID_EVALUATED_FROM_VALIDATIONS_LENGTH" | "RTM_ATTR_INVALID_EVALUATED_FROM_VALIDATIONS_EMAIL" | "RTM_ATTR_INVALID_EVALUATED_FROM_VALIDATIONS_PATTERN" | "RTM_UNABLE_TO_PARSE_REQUEST" | "RTM_CANNOT_DESTROY" | "RTM_ALREADY_DESTROYED" | "RTM_CONNECTION_INTERFACE_IN_USE" | "RTM_CANNOT_IDENTIFY_USER" | "RTM_TASK_TYPE_NOT_CORRECT" | "RTM_GENERIC_BUSINESS_ERROR" | "RTM_TASK_NOT_READY_TO_RUN" | "RTM_TASK_NOT_RUNNING" | "RTM_DEPLOYMENT_WITHOUT_INFRA_OR_APP_ID" | "RTM_CREATING_CONN_INTERFACE_ERROR" | "RTM_CREATING_CONN_INTERFACE_MISSING_ATTRIBUTES" | "RTM_IMPERSONATE_TOKEN_ERROR" | "RTM_UNEXPECTED_RUNTIME_ENVIRONMENT_CONFIG" | "RTM_RUN_WITH_NO_TASKS_ERROR" | "RTM_TASK_TYPE_NOT_SUPPORTED" | "RTM_SELF_HOSTED_BACKEND_NOT_CONFIGURED" | "RTM_DEPENDENCIES_HAS_CYCLE" | "RTM_UNAVAILABLE_DESTROY_PROCESS" | "RTM_DEPLOYMENT_WITH_INFRA_AND_APP" | "RTM_DEPLOYMENT_JUST_ONE_RUN_NOT_FINISHED" | "RTM_GENERIC_CONFLICT_ERROR" | "RTM_DEPLOYMENT_APP_ALREADY_RUNNING_CONFLICT_ERROR" | "RTM_DEPLOYMENT_INFRA_ALREADY_RUNNING_CONFLICT_ERROR" | "RTM_DEPLOYMENT_TAG_ALREADY_EXISTS" | "RTM_NOT_FOUND" | "RTM_PROVIDER_NOT_FOUND" | "RTM_STATE_NOT_FOUND" | "RTM_ENVIRONMENT_NOT_FOUND_ERROR" | "RTM_DEPLOYMENT_NOT_FOUND_ERROR" | "RTM_PLUGIN_DEPLOYMENT_NOT_FOUND_ERROR" | "RTM_WORKSPACE_NOT_FOUND" | "RTM_APPLICATION_NOT_FOUND" | "RTM_INFRA_LINK_NOT_FOUND" | "RTM_RUN_NOT_FOUND" | "RTM_RUN_TASK_NOT_FOUND" | "RTM_CONNECTION_INTERFACE_NOT_FOUND" | "RTM_PLUGIN_MANIFESTO_NOT_FOUND" | "RTM_PLUGIN_DATA_NOT_FOUND" | "RTM_DEPLOYMENT_TAG_NOT_FOUND" | "RTM_RUN_WITH_TOO_MANY_PLUGINS" | "RTM_TOO_MANY_RUNS" | "RTM_FORBIDDEN" | "RTM_MISSING_ACCOUNT" | "RTM_MISSING_AUTHENTICATION" | "RTM_WORKSPACE_API_FORBIDDEN" | "RTM_WORKSPACE_API_UNHANDLED_ERROR" | "RTM_WORKSPACE_API_UNPROCESSABLE_ENTITY" | "RTM_WORKSPACE_API_INTERNAL_ERROR" | "RTM_WORKSPACE_API_BAD_GATEWAY" | "RTM_CONTENT_API_FORBIDDEN" | "RTM_CONTENT_API_UNHANDLED_ERROR" | "RTM_CONTENT_API_INTERNAL_ERROR" | "RTM_CLOUD_SERVICES_API_FORBIDDEN" | "RTM_CLOUD_SERVICES_API_UNHANDLED_ERROR" | "RTM_CLOUD_SERVICES_FAILED_TO_RETRIEVE_EXTERNAL_ID" | "RTM_CLOUD_SERVICES_API_INTERNAL_ERROR" | "RTM_GENERIC_INTEGRATION_ERROR" | "RTM_ACCOUNT_API_PAT_NOT_FOUND_ERROR" | "RTM_ACCOUNT_API_FORBIDDEN" | "RTM_ACCOUNT_API_UNHANDLED_ERROR" | "RTM_ACCOUNT_API_INTERNAL_ERROR" | "RTM_S3_UNHANDLED_ERROR" | "RTM_INTERNAL_SERVER_ERROR" | "RTM_CREATING_CONN_INTERFACE_WORKER_ERROR" | "RTM_SECURITY_KEY_ALREADY_REGISTERED_IN_BLOCK_LIST" | "RTM_SECURITY_BLOCK_LIST_ERROR" | "RTM_RUN_TYPE_NOT_CORRECT" | "RTM_IAC_PATH_NOT_PRESENT";
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";
61
87
  status: number;
62
88
  details: string;
63
89
  validationDetails?: ValidationDetails[];
@@ -65,8 +91,6 @@ export type ErrorResponse = {
65
91
  export type RunSelfHostedTaskIacCompletedRequest = {
66
92
  /** The schema version */
67
93
  schemaVersion: string;
68
- /** The Run ULID */
69
- runId: string;
70
94
  /** The Task ULID */
71
95
  runTaskId: string;
72
96
  /** Whether this task completed successfully or not */
@@ -92,8 +116,6 @@ export type TaskDestroyDataResponse = {
92
116
  export type RunSelfHostedTaskDestroyCompletedRequest = {
93
117
  /** The schema version */
94
118
  schemaVersion: string;
95
- /** The Run ULID */
96
- runId: string;
97
119
  /** The Task ULID */
98
120
  runTaskId: string;
99
121
  /** Whether this task completed successfully or not */
@@ -117,6 +139,8 @@ export type TaskDeployDataResponse = {
117
139
  runTaskId: string;
118
140
  iacBackend: TaskDataS3BackendResponse;
119
141
  tfBackend: TaskDataS3BackendResponse;
142
+ fork: boolean;
143
+ allowedResources?: string[];
120
144
  metadata?: {
121
145
  [key: string]: object;
122
146
  };
@@ -125,8 +149,6 @@ export type TaskDeployDataResponse = {
125
149
  export type RunSelfHostedTaskDeployCompletedRequest = {
126
150
  /** The schema version */
127
151
  schemaVersion: string;
128
- /** The Run ULID */
129
- runId: string;
130
152
  /** The Task ULID */
131
153
  runTaskId: string;
132
154
  /** Whether this task completed successfully or not */
@@ -143,6 +165,30 @@ export type RunSelfHostedTaskDeployCompletedRequest = {
143
165
  };
144
166
  partialResources?: string[];
145
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
+ };
146
192
  export type ConfigTerraform = {
147
193
  /** name of the bucket to save state files */
148
194
  bucket: string;
@@ -150,7 +196,9 @@ export type ConfigTerraform = {
150
196
  region: string;
151
197
  };
152
198
  export type Config = {
199
+ /** The terraform backend configuration */
153
200
  tfstate: ConfigTerraform;
201
+ /** The terraform backend configuration */
154
202
  iac: ConfigTerraform;
155
203
  };
156
204
  export type RunSelfHostedRollbackRequest = {
@@ -162,15 +210,18 @@ export type RunSelfHostedRollbackRequest = {
162
210
  envId: string;
163
211
  /** Current version tag to rollback */
164
212
  tag: string;
213
+ /** Backend configuration */
165
214
  config: Config;
166
215
  /** Url of pipeline currently running */
167
216
  pipelineUrl: string;
217
+ /** Stackspot Workflow Execution Identifier */
218
+ workflowExecutionId?: string;
168
219
  };
169
220
  export type RunSelfHostedTaskResponse = {
170
221
  order: number;
171
222
  runTaskId: string;
172
223
  taskType: string;
173
- pluginAppliedAlias: string;
224
+ pluginAppliedAlias?: string;
174
225
  };
175
226
  export type RunSelfHostedResponse = {
176
227
  runId: string;
@@ -186,9 +237,12 @@ export type RunSelfHostedDestroyRequest = {
186
237
  workspaceId: string;
187
238
  /** Environment Id */
188
239
  envId: string;
240
+ /** Backend configuration */
189
241
  config: Config;
190
242
  /** Url of pipeline currently running */
191
243
  pipelineUrl: string;
244
+ /** Stackspot Workflow Execution Identifier */
245
+ workflowExecutionId?: string;
192
246
  };
193
247
  export type ManifestoMetadata = {
194
248
  /** Name */
@@ -236,6 +290,7 @@ export type AppliedPlugin = {
236
290
  };
237
291
  connections: ManifestoConnection;
238
292
  links?: ManifestoLink;
293
+ fork?: boolean;
239
294
  };
240
295
  export type ManifestoSpec = {
241
296
  /** Application Or Infra Id ( */
@@ -249,7 +304,9 @@ export type Manifesto = {
249
304
  schemaVersion: string;
250
305
  /** Manifesto Kind */
251
306
  kind: string;
307
+ /** Manifesto Kind */
252
308
  metadata: ManifestoMetadata;
309
+ /** Manifesto Spec */
253
310
  spec: ManifestoSpec;
254
311
  };
255
312
  export type RunSelfHostedDeployRequest = {
@@ -263,31 +320,18 @@ export type RunSelfHostedDeployRequest = {
263
320
  runConfig?: {
264
321
  [key: string]: object;
265
322
  };
323
+ /** Manifesto Data */
266
324
  manifesto: Manifesto;
267
325
  /** Whether this application exposes an API or not */
268
326
  isApi?: boolean;
269
327
  /** Path (in the repository) of the API contract file in open api format */
270
328
  apiContractPath?: string;
329
+ /** Backend configuration */
271
330
  config: Config;
272
331
  /** Url of pipeline currently running */
273
332
  pipelineUrl: string;
274
- };
275
- export type RunDestroyRequest = {
276
- /** Application Id */
277
- appId?: string;
278
- /** Shared Infra Id */
279
- infraId?: string;
280
- /** Workspace Id */
281
- workspaceId: string;
282
- /** Environment Id */
283
- envId: string;
284
- };
285
- export type RunCreatedResponse = {
286
- runId: string;
287
- };
288
- export type WorkerResponse = {
289
- allowed: boolean;
290
- reason?: string;
333
+ /** Stackspot Workflow Execution Identifier */
334
+ workflowExecutionId?: string;
291
335
  };
292
336
  export type RunRollbackRequest = {
293
337
  /** Application Id */
@@ -310,13 +354,36 @@ export type RunDeployRequest = {
310
354
  runConfig?: {
311
355
  [key: string]: object;
312
356
  };
357
+ /** Manifesto Data */
313
358
  manifesto: Manifesto;
314
359
  /** Whether this application exposes an API or not */
315
360
  isApi?: boolean;
316
361
  /** Path (in the repository) of the API contract file in open api format */
317
362
  apiContractPath?: string;
318
363
  };
319
- export type Unit = object;
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
+ };
320
387
  export type FinishWorkerIacSchema = {
321
388
  schemaVersion: string;
322
389
  runTaskId: string;
@@ -353,6 +420,68 @@ export type FinishWorkerDeploySchema = {
353
420
  };
354
421
  partialResources?: string[];
355
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
+ };
356
485
  export type TagResponse = {
357
486
  name: string;
358
487
  createdAt: string;
@@ -363,13 +492,13 @@ export type EnvironmentResponse = {
363
492
  };
364
493
  export type RunTaskResponse = {
365
494
  id?: string;
366
- "type": "IAC" | "DEPLOY" | "DESTROY" | "IAC_SELF_HOSTED" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED";
495
+ "type": "IAC" | "DEPLOY" | "DESTROY" | "IAC_SELF_HOSTED" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED" | "UNIFIED_IAC" | "UNIFIED_DEPLOY" | "UNIFIED_DESTROY" | "PLAN";
367
496
  status: "PENDING" | "READY_TO_RUN" | "RUNNING" | "SUCCEEDED" | "FAILED" | "INTERNAL_ERROR" | "EXTERNAL_ERROR" | "ABORTED";
368
497
  errorDetails?: string;
369
498
  logs?: string;
370
499
  };
371
500
  export type RunPluginResponse = {
372
- pluginAppliedAlias: string;
501
+ pluginAppliedAlias?: string;
373
502
  tasks: RunTaskResponse[];
374
503
  };
375
504
  export type RunResponse = {
@@ -383,6 +512,9 @@ export type RunResponse = {
383
512
  createdAt: string;
384
513
  updatedAt?: string;
385
514
  appliedPlugins?: RunPluginResponse[];
515
+ workspaceId: string;
516
+ accountId: string;
517
+ version: "V1" | "V2";
386
518
  };
387
519
  export type RunLightResponse = {
388
520
  runId: string;
@@ -430,27 +562,46 @@ export type DiffPluginResponse = {
430
562
  [key: string]: object;
431
563
  };
432
564
  };
433
- export type Pageable = {
434
- page?: number;
435
- size?: number;
436
- sort?: string[];
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;
437
588
  };
438
589
  export type SortObject = {
439
- unsorted?: boolean;
440
590
  sorted?: boolean;
591
+ unsorted?: boolean;
441
592
  empty?: boolean;
442
593
  };
443
594
  export type PageableObject = {
444
- paged?: boolean;
445
- unpaged?: boolean;
446
595
  pageNumber?: number;
596
+ paged?: boolean;
447
597
  pageSize?: number;
598
+ unpaged?: boolean;
448
599
  offset?: number;
449
600
  sort?: SortObject;
450
601
  };
451
602
  export type AdminRunTaskResponse = {
452
603
  id?: string;
453
- "type": "IAC" | "DEPLOY" | "DESTROY" | "IAC_SELF_HOSTED" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED";
604
+ "type": "IAC" | "DEPLOY" | "DESTROY" | "IAC_SELF_HOSTED" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED" | "UNIFIED_IAC" | "UNIFIED_DEPLOY" | "UNIFIED_DESTROY" | "PLAN";
454
605
  status: "PENDING" | "READY_TO_RUN" | "RUNNING" | "SUCCEEDED" | "FAILED" | "INTERNAL_ERROR" | "EXTERNAL_ERROR" | "ABORTED";
455
606
  errorDetails?: string;
456
607
  logs?: string;
@@ -480,14 +631,54 @@ export type PageAdminRunResponse = {
480
631
  totalElements?: number;
481
632
  pageable?: PageableObject;
482
633
  numberOfElements?: number;
634
+ first?: boolean;
635
+ last?: boolean;
483
636
  size?: number;
484
637
  content?: AdminRunResponse[];
485
638
  "number"?: number;
486
639
  sort?: SortObject;
487
- first?: boolean;
488
- last?: boolean;
489
640
  empty?: boolean;
490
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
+ };
491
682
  export type SelfHostedConfigModel = {
492
683
  terraformBucket: string;
493
684
  terraformRegion: string;
@@ -506,12 +697,12 @@ export type AdminRunTaskDetailResponse = {
506
697
  appId?: string;
507
698
  infraId?: string;
508
699
  realm: string;
509
- pluginAppliedAlias: string;
700
+ pluginAppliedAlias?: string;
510
701
  pluginManifesto: {
511
702
  [key: string]: object;
512
703
  };
513
- pluginFQDN: string;
514
- runTaskType: "IAC" | "DEPLOY" | "DESTROY" | "IAC_SELF_HOSTED" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED";
704
+ pluginFQDN?: string;
705
+ runTaskType: "IAC" | "DEPLOY" | "DESTROY" | "IAC_SELF_HOSTED" | "DEPLOY_SELF_HOSTED" | "DESTROY_SELF_HOSTED" | "UNIFIED_IAC" | "UNIFIED_DEPLOY" | "UNIFIED_DESTROY" | "PLAN";
515
706
  runTasksStatus: "PENDING" | "READY_TO_RUN" | "RUNNING" | "SUCCEEDED" | "FAILED" | "INTERNAL_ERROR" | "EXTERNAL_ERROR" | "ABORTED";
516
707
  errorDetails?: string;
517
708
  iacPath?: string;
@@ -526,166 +717,49 @@ export type AdminRunTaskDetailResponse = {
526
717
  iacDownloadUrl?: string;
527
718
  logsDownloadUrl?: string;
528
719
  };
529
- /**
530
- * Endpoint to get the necessary data to perform an IAC Task
531
- */
532
- export function getIacTask({ taskId }: {
533
- taskId: string;
534
- }, opts?: Oazapfts.RequestOpts) {
535
- return oazapfts.ok(oazapfts.fetchJson<{
536
- status: 200;
537
- data: TaskIacDataResponse;
538
- } | {
539
- status: 404;
540
- data: ErrorResponse;
541
- } | {
542
- status: 422;
543
- data: ErrorResponse;
544
- } | {
545
- status: 500;
546
- data: ErrorResponse;
547
- }>(`/v2/run/self-hosted/task/iac/${encodeURIComponent(taskId)}`, {
548
- ...opts
549
- }));
550
- }
551
- /**
552
- * Endpoint to inform the completion of an IAC Task
553
- */
554
- export function putIacTaskResponse({ taskId, runSelfHostedTaskIacCompletedRequest }: {
555
- taskId: string;
556
- runSelfHostedTaskIacCompletedRequest: RunSelfHostedTaskIacCompletedRequest;
557
- }, opts?: Oazapfts.RequestOpts) {
558
- return oazapfts.ok(oazapfts.fetchJson<{
559
- status: 204;
560
- } | {
561
- status: 403;
562
- data: ErrorResponse;
563
- } | {
564
- status: 404;
565
- data: ErrorResponse;
566
- } | {
567
- status: 422;
568
- data: ErrorResponse;
569
- } | {
570
- status: 500;
571
- data: ErrorResponse;
572
- } | {
573
- status: 503;
574
- data: ErrorResponse;
575
- }>(`/v2/run/self-hosted/task/iac/${encodeURIComponent(taskId)}`, oazapfts.json({
576
- ...opts,
577
- method: "PUT",
578
- body: runSelfHostedTaskIacCompletedRequest
579
- })));
580
- }
581
- /**
582
- * Endpoint to get the necessary data to perform an Destroy Task
583
- */
584
- export function getDestroyTask({ taskId }: {
585
- taskId: string;
586
- }, opts?: Oazapfts.RequestOpts) {
587
- return oazapfts.ok(oazapfts.fetchJson<{
588
- status: 200;
589
- data: TaskDestroyDataResponse;
590
- } | {
591
- status: 404;
592
- data: ErrorResponse;
593
- } | {
594
- status: 422;
595
- data: ErrorResponse;
596
- } | {
597
- status: 500;
598
- data: ErrorResponse;
599
- }>(`/v2/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, {
600
- ...opts
601
- }));
602
- }
603
- /**
604
- * Endpoint to inform the completion of a Destroy Task
605
- */
606
- export function putDestroyTaskResponse({ taskId, runSelfHostedTaskDestroyCompletedRequest }: {
607
- taskId: string;
608
- runSelfHostedTaskDestroyCompletedRequest: RunSelfHostedTaskDestroyCompletedRequest;
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;
609
742
  }, opts?: Oazapfts.RequestOpts) {
610
- return oazapfts.ok(oazapfts.fetchJson<{
611
- status: 204;
612
- } | {
613
- status: 403;
614
- data: ErrorResponse;
615
- } | {
616
- status: 404;
617
- data: ErrorResponse;
618
- } | {
619
- status: 422;
620
- data: ErrorResponse;
621
- } | {
622
- status: 500;
623
- data: ErrorResponse;
624
- } | {
625
- status: 503;
626
- data: ErrorResponse;
627
- }>(`/v2/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, oazapfts.json({
743
+ return oazapfts.ok(oazapfts.fetchText(`/v2/run/set-as-error/${encodeURIComponent(runId)}`, oazapfts.json({
628
744
  ...opts,
629
745
  method: "PUT",
630
- body: runSelfHostedTaskDestroyCompletedRequest
746
+ body: setRunAsErrorRequest
631
747
  })));
632
748
  }
633
- /**
634
- * Endpoint to get the necessary data to perform a Deploy Task
635
- */
636
- export function getDeployTask({ taskId }: {
637
- taskId: string;
638
- }, opts?: Oazapfts.RequestOpts) {
639
- return oazapfts.ok(oazapfts.fetchJson<{
640
- status: 200;
641
- data: TaskDeployDataResponse;
642
- } | {
643
- status: 404;
644
- data: ErrorResponse;
645
- } | {
646
- status: 422;
647
- data: ErrorResponse;
648
- } | {
649
- status: 500;
650
- data: ErrorResponse;
651
- }>(`/v2/run/self-hosted/task/deploy/${encodeURIComponent(taskId)}`, {
652
- ...opts
653
- }));
654
- }
655
- /**
656
- * Endpoint to inform the completion of a Deploy Task
657
- */
658
- export function putDeployTaskResponse({ taskId, runSelfHostedTaskDeployCompletedRequest }: {
659
- taskId: string;
660
- runSelfHostedTaskDeployCompletedRequest: RunSelfHostedTaskDeployCompletedRequest;
749
+ export function finishV2Task({ runId, finishIntegratedWorkerSchema }: {
750
+ runId: string;
751
+ finishIntegratedWorkerSchema: FinishIntegratedWorkerSchema;
661
752
  }, opts?: Oazapfts.RequestOpts) {
662
- return oazapfts.ok(oazapfts.fetchJson<{
663
- status: 204;
664
- } | {
665
- status: 403;
666
- data: ErrorResponse;
667
- } | {
668
- status: 404;
669
- data: ErrorResponse;
670
- } | {
671
- status: 422;
672
- data: ErrorResponse;
673
- } | {
674
- status: 500;
675
- data: ErrorResponse;
676
- } | {
677
- status: 503;
678
- data: ErrorResponse;
679
- }>(`/v2/run/self-hosted/task/deploy/${encodeURIComponent(taskId)}`, oazapfts.json({
753
+ return oazapfts.ok(oazapfts.fetchText(`/v2/run/self-hosted/end-task/${encodeURIComponent(runId)}`, oazapfts.json({
680
754
  ...opts,
681
755
  method: "PUT",
682
- body: runSelfHostedTaskDeployCompletedRequest
756
+ body: finishIntegratedWorkerSchema
683
757
  })));
684
758
  }
685
759
  /**
686
760
  * Endpoint to get the necessary data to perform an IAC Task
687
761
  */
688
- export function getIacTask1({ taskId }: {
762
+ export function getIacTask({ taskId }: {
689
763
  taskId: string;
690
764
  }, opts?: Oazapfts.RequestOpts) {
691
765
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -707,7 +781,7 @@ export function getIacTask1({ taskId }: {
707
781
  /**
708
782
  * Endpoint to inform the completion of an IAC Task
709
783
  */
710
- export function putIacTaskResponse1({ taskId, runSelfHostedTaskIacCompletedRequest }: {
784
+ export function putIacTaskResponse({ taskId, runSelfHostedTaskIacCompletedRequest }: {
711
785
  taskId: string;
712
786
  runSelfHostedTaskIacCompletedRequest: RunSelfHostedTaskIacCompletedRequest;
713
787
  }, opts?: Oazapfts.RequestOpts) {
@@ -718,249 +792,59 @@ export function putIacTaskResponse1({ taskId, runSelfHostedTaskIacCompletedReque
718
792
  data: ErrorResponse;
719
793
  } | {
720
794
  status: 404;
721
- data: ErrorResponse;
722
- } | {
723
- status: 422;
724
- data: ErrorResponse;
725
- } | {
726
- status: 500;
727
- data: ErrorResponse;
728
- } | {
729
- status: 503;
730
- data: ErrorResponse;
731
- }>(`/v1/run/self-hosted/task/iac/${encodeURIComponent(taskId)}`, oazapfts.json({
732
- ...opts,
733
- method: "PUT",
734
- body: runSelfHostedTaskIacCompletedRequest
735
- })));
736
- }
737
- /**
738
- * Endpoint to get the necessary data to perform an Destroy Task
739
- */
740
- export function getDestroyTask1({ taskId }: {
741
- taskId: string;
742
- }, opts?: Oazapfts.RequestOpts) {
743
- return oazapfts.ok(oazapfts.fetchJson<{
744
- status: 200;
745
- data: TaskDestroyDataResponse;
746
- } | {
747
- status: 404;
748
- data: ErrorResponse;
749
- } | {
750
- status: 422;
751
- data: ErrorResponse;
752
- } | {
753
- status: 500;
754
- data: ErrorResponse;
755
- }>(`/v1/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, {
756
- ...opts
757
- }));
758
- }
759
- /**
760
- * Endpoint to inform the completion of a Destroy Task
761
- */
762
- export function putDestroyTaskResponse1({ taskId, runSelfHostedTaskDestroyCompletedRequest }: {
763
- taskId: string;
764
- runSelfHostedTaskDestroyCompletedRequest: RunSelfHostedTaskDestroyCompletedRequest;
765
- }, opts?: Oazapfts.RequestOpts) {
766
- return oazapfts.ok(oazapfts.fetchJson<{
767
- status: 204;
768
- } | {
769
- status: 403;
770
- data: ErrorResponse;
771
- } | {
772
- status: 404;
773
- data: ErrorResponse;
774
- } | {
775
- status: 422;
776
- data: ErrorResponse;
777
- } | {
778
- status: 500;
779
- data: ErrorResponse;
780
- } | {
781
- status: 503;
782
- data: ErrorResponse;
783
- }>(`/v1/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, oazapfts.json({
784
- ...opts,
785
- method: "PUT",
786
- body: runSelfHostedTaskDestroyCompletedRequest
787
- })));
788
- }
789
- /**
790
- * Endpoint to get the necessary data to perform a Deploy Task
791
- */
792
- export function getDeployTask1({ taskId }: {
793
- taskId: string;
794
- }, opts?: Oazapfts.RequestOpts) {
795
- return oazapfts.ok(oazapfts.fetchJson<{
796
- status: 200;
797
- data: TaskDeployDataResponse;
798
- } | {
799
- status: 404;
800
- data: ErrorResponse;
801
- } | {
802
- status: 422;
803
- data: ErrorResponse;
804
- } | {
805
- status: 500;
806
- data: ErrorResponse;
807
- }>(`/v1/run/self-hosted/task/deploy/${encodeURIComponent(taskId)}`, {
808
- ...opts
809
- }));
810
- }
811
- /**
812
- * Endpoint to inform the completion of a Deploy Task
813
- */
814
- export function putDeployTaskResponse1({ taskId, runSelfHostedTaskDeployCompletedRequest }: {
815
- taskId: string;
816
- runSelfHostedTaskDeployCompletedRequest: RunSelfHostedTaskDeployCompletedRequest;
817
- }, opts?: Oazapfts.RequestOpts) {
818
- return oazapfts.ok(oazapfts.fetchJson<{
819
- status: 204;
820
- } | {
821
- status: 403;
822
- data: ErrorResponse;
823
- } | {
824
- status: 404;
825
- data: ErrorResponse;
826
- } | {
827
- status: 422;
828
- data: ErrorResponse;
829
- } | {
830
- status: 500;
831
- data: ErrorResponse;
832
- } | {
833
- status: 503;
834
- data: ErrorResponse;
835
- }>(`/v1/run/self-hosted/task/deploy/${encodeURIComponent(taskId)}`, oazapfts.json({
836
- ...opts,
837
- method: "PUT",
838
- body: runSelfHostedTaskDeployCompletedRequest
839
- })));
840
- }
841
- /**
842
- * Endpoint to run Infra Rollback
843
- */
844
- export function runRollbackInfra({ runSelfHostedRollbackRequest }: {
845
- runSelfHostedRollbackRequest: RunSelfHostedRollbackRequest;
846
- }, opts?: Oazapfts.RequestOpts) {
847
- return oazapfts.ok(oazapfts.fetchJson<{
848
- status: 201;
849
- data: RunSelfHostedResponse;
850
- } | {
851
- status: 304;
852
- data: ErrorResponse;
853
- } | {
854
- status: 403;
855
- data: ErrorResponse;
856
- } | {
857
- status: 404;
858
- data: ErrorResponse;
859
- } | {
860
- status: 409;
861
- data: ErrorResponse;
862
- } | {
863
- status: 422;
864
- data: ErrorResponse;
865
- } | {
866
- status: 500;
867
- data: ErrorResponse;
868
- } | {
869
- status: 503;
870
- data: ErrorResponse;
871
- }>("/v2/run/self-hosted/rollback/infra", oazapfts.json({
872
- ...opts,
873
- method: "POST",
874
- body: runSelfHostedRollbackRequest
875
- })));
876
- }
877
- /**
878
- * Endpoint to run App Rollback
879
- */
880
- export function runRollbackApp({ runSelfHostedRollbackRequest }: {
881
- runSelfHostedRollbackRequest: RunSelfHostedRollbackRequest;
882
- }, opts?: Oazapfts.RequestOpts) {
883
- return oazapfts.ok(oazapfts.fetchJson<{
884
- status: 201;
885
- data: RunSelfHostedResponse;
886
- } | {
887
- status: 304;
888
- data: ErrorResponse;
889
- } | {
890
- status: 403;
891
- data: ErrorResponse;
892
- } | {
893
- status: 404;
894
- data: ErrorResponse;
895
- } | {
896
- status: 409;
897
- data: ErrorResponse;
898
- } | {
899
- status: 422;
900
- data: ErrorResponse;
901
- } | {
902
- status: 500;
903
- data: ErrorResponse;
904
- } | {
905
- status: 503;
906
- data: ErrorResponse;
907
- }>("/v2/run/self-hosted/rollback/app", oazapfts.json({
908
- ...opts,
909
- method: "POST",
910
- body: runSelfHostedRollbackRequest
911
- })));
912
- }
913
- /**
914
- * Endpoint to run Destroy SelfHosted
915
- */
916
- export function runDestroyInfra({ runSelfHostedDestroyRequest }: {
917
- runSelfHostedDestroyRequest: RunSelfHostedDestroyRequest;
918
- }, opts?: Oazapfts.RequestOpts) {
919
- return oazapfts.ok(oazapfts.fetchJson<{
795
+ data: ErrorResponse;
796
+ } | {
920
797
  status: 422;
921
798
  data: ErrorResponse;
922
- }>("/v2/run/self-hosted/destroy/infra", oazapfts.json({
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({
923
806
  ...opts,
924
- method: "POST",
925
- body: runSelfHostedDestroyRequest
807
+ method: "PUT",
808
+ body: runSelfHostedTaskIacCompletedRequest
926
809
  })));
927
810
  }
928
811
  /**
929
- * Endpoint to run Destroy SelfHosted
812
+ * Endpoint to get the necessary data to perform an Destroy Task
930
813
  */
931
- export function runDestroyApp({ runSelfHostedDestroyRequest }: {
932
- runSelfHostedDestroyRequest: RunSelfHostedDestroyRequest;
814
+ export function getDestroyTask({ taskId }: {
815
+ taskId: string;
933
816
  }, opts?: Oazapfts.RequestOpts) {
934
817
  return oazapfts.ok(oazapfts.fetchJson<{
818
+ status: 200;
819
+ data: TaskDestroyDataResponse;
820
+ } | {
821
+ status: 404;
822
+ data: ErrorResponse;
823
+ } | {
935
824
  status: 422;
936
825
  data: ErrorResponse;
937
- }>("/v2/run/self-hosted/destroy/app", oazapfts.json({
938
- ...opts,
939
- method: "POST",
940
- body: runSelfHostedDestroyRequest
941
- })));
826
+ } | {
827
+ status: 500;
828
+ data: ErrorResponse;
829
+ }>(`/v1/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, {
830
+ ...opts
831
+ }));
942
832
  }
943
833
  /**
944
- * Endpoint to run Infra Deploy
834
+ * Endpoint to inform the completion of a Destroy Task
945
835
  */
946
- export function runDeployInfra({ runSelfHostedDeployRequest }: {
947
- runSelfHostedDeployRequest: RunSelfHostedDeployRequest;
836
+ export function putDestroyTaskResponse({ taskId, runSelfHostedTaskDestroyCompletedRequest }: {
837
+ taskId: string;
838
+ runSelfHostedTaskDestroyCompletedRequest: RunSelfHostedTaskDestroyCompletedRequest;
948
839
  }, opts?: Oazapfts.RequestOpts) {
949
840
  return oazapfts.ok(oazapfts.fetchJson<{
950
- status: 201;
951
- data: RunSelfHostedResponse;
952
- } | {
953
- status: 304;
954
- data: ErrorResponse;
841
+ status: 204;
955
842
  } | {
956
843
  status: 403;
957
844
  data: ErrorResponse;
958
845
  } | {
959
846
  status: 404;
960
847
  data: ErrorResponse;
961
- } | {
962
- status: 409;
963
- data: ErrorResponse;
964
848
  } | {
965
849
  status: 422;
966
850
  data: ErrorResponse;
@@ -970,32 +854,48 @@ export function runDeployInfra({ runSelfHostedDeployRequest }: {
970
854
  } | {
971
855
  status: 503;
972
856
  data: ErrorResponse;
973
- }>("/v2/run/self-hosted/deploy/infra", oazapfts.json({
857
+ }>(`/v1/run/self-hosted/task/destroy/${encodeURIComponent(taskId)}`, oazapfts.json({
974
858
  ...opts,
975
- method: "POST",
976
- body: runSelfHostedDeployRequest
859
+ method: "PUT",
860
+ body: runSelfHostedTaskDestroyCompletedRequest
977
861
  })));
978
862
  }
979
863
  /**
980
- * Endpoint to run App Deploy
864
+ * Endpoint to get the necessary data to perform a Deploy Task
981
865
  */
982
- export function runDeployApp({ runSelfHostedDeployRequest }: {
983
- runSelfHostedDeployRequest: RunSelfHostedDeployRequest;
866
+ export function getDeployTask({ taskId }: {
867
+ taskId: string;
984
868
  }, opts?: Oazapfts.RequestOpts) {
985
869
  return oazapfts.ok(oazapfts.fetchJson<{
986
- status: 201;
987
- data: RunSelfHostedResponse;
870
+ status: 200;
871
+ data: TaskDeployDataResponse;
988
872
  } | {
989
- status: 304;
873
+ status: 404;
990
874
  data: ErrorResponse;
991
875
  } | {
992
- status: 403;
876
+ status: 422;
993
877
  data: ErrorResponse;
994
878
  } | {
995
- status: 404;
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;
996
896
  data: ErrorResponse;
997
897
  } | {
998
- status: 409;
898
+ status: 404;
999
899
  data: ErrorResponse;
1000
900
  } | {
1001
901
  status: 422;
@@ -1006,16 +906,34 @@ export function runDeployApp({ runSelfHostedDeployRequest }: {
1006
906
  } | {
1007
907
  status: 503;
1008
908
  data: ErrorResponse;
1009
- }>("/v2/run/self-hosted/deploy/app", oazapfts.json({
909
+ }>(`/v1/run/self-hosted/task/deploy/${encodeURIComponent(taskId)}`, oazapfts.json({
1010
910
  ...opts,
1011
- method: "POST",
1012
- body: runSelfHostedDeployRequest
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
1013
923
  })));
1014
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
+ }
1015
933
  /**
1016
934
  * Endpoint to run Infra Deploy
1017
935
  */
1018
- export function runDestroyInfra1({ runDestroyRequest }: {
936
+ export function runDestroyInfra({ runDestroyRequest }: {
1019
937
  runDestroyRequest: RunDestroyRequest;
1020
938
  }, opts?: Oazapfts.RequestOpts) {
1021
939
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1051,7 +969,7 @@ export function runDestroyInfra1({ runDestroyRequest }: {
1051
969
  /**
1052
970
  * Endpoint to run App Deploy
1053
971
  */
1054
- export function runDestroyApp1({ runDestroyRequest }: {
972
+ export function runDestroyApp({ runDestroyRequest }: {
1055
973
  runDestroyRequest: RunDestroyRequest;
1056
974
  }, opts?: Oazapfts.RequestOpts) {
1057
975
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1113,7 +1031,7 @@ export function getRunTaskById({ taskId, workerUrl }: {
1113
1031
  /**
1114
1032
  * Endpoint to run Infra Rollback
1115
1033
  */
1116
- export function runRollbackInfra1({ runSelfHostedRollbackRequest }: {
1034
+ export function runRollbackInfra({ runSelfHostedRollbackRequest }: {
1117
1035
  runSelfHostedRollbackRequest: RunSelfHostedRollbackRequest;
1118
1036
  }, opts?: Oazapfts.RequestOpts) {
1119
1037
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1149,7 +1067,7 @@ export function runRollbackInfra1({ runSelfHostedRollbackRequest }: {
1149
1067
  /**
1150
1068
  * Endpoint to run App Rollback
1151
1069
  */
1152
- export function runRollbackApp1({ runSelfHostedRollbackRequest }: {
1070
+ export function runRollbackApp({ runSelfHostedRollbackRequest }: {
1153
1071
  runSelfHostedRollbackRequest: RunSelfHostedRollbackRequest;
1154
1072
  }, opts?: Oazapfts.RequestOpts) {
1155
1073
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1185,7 +1103,7 @@ export function runRollbackApp1({ runSelfHostedRollbackRequest }: {
1185
1103
  /**
1186
1104
  * Endpoint to run Destroy SelfHosted
1187
1105
  */
1188
- export function runDestroyInfra2({ runSelfHostedDestroyRequest }: {
1106
+ export function runDestroyInfra1({ runSelfHostedDestroyRequest }: {
1189
1107
  runSelfHostedDestroyRequest: RunSelfHostedDestroyRequest;
1190
1108
  }, opts?: Oazapfts.RequestOpts) {
1191
1109
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1200,7 +1118,7 @@ export function runDestroyInfra2({ runSelfHostedDestroyRequest }: {
1200
1118
  /**
1201
1119
  * Endpoint to run Destroy SelfHosted
1202
1120
  */
1203
- export function runDestroyApp2({ runSelfHostedDestroyRequest }: {
1121
+ export function runDestroyApp1({ runSelfHostedDestroyRequest }: {
1204
1122
  runSelfHostedDestroyRequest: RunSelfHostedDestroyRequest;
1205
1123
  }, opts?: Oazapfts.RequestOpts) {
1206
1124
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1215,7 +1133,7 @@ export function runDestroyApp2({ runSelfHostedDestroyRequest }: {
1215
1133
  /**
1216
1134
  * Endpoint to run Infra Deploy
1217
1135
  */
1218
- export function runDeployInfra1({ runSelfHostedDeployRequest }: {
1136
+ export function runDeployInfra({ runSelfHostedDeployRequest }: {
1219
1137
  runSelfHostedDeployRequest: RunSelfHostedDeployRequest;
1220
1138
  }, opts?: Oazapfts.RequestOpts) {
1221
1139
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1251,7 +1169,7 @@ export function runDeployInfra1({ runSelfHostedDeployRequest }: {
1251
1169
  /**
1252
1170
  * Endpoint to run App Deploy
1253
1171
  */
1254
- export function runDeployApp1({ runSelfHostedDeployRequest }: {
1172
+ export function runDeployApp({ runSelfHostedDeployRequest }: {
1255
1173
  runSelfHostedDeployRequest: RunSelfHostedDeployRequest;
1256
1174
  }, opts?: Oazapfts.RequestOpts) {
1257
1175
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1284,10 +1202,33 @@ export function runDeployApp1({ runSelfHostedDeployRequest }: {
1284
1202
  body: runSelfHostedDeployRequest
1285
1203
  })));
1286
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
+ }
1287
1228
  /**
1288
1229
  * Endpoint to run Infra Rollback
1289
1230
  */
1290
- export function runRollbackInfra2({ runRollbackRequest }: {
1231
+ export function runRollbackInfra1({ runRollbackRequest }: {
1291
1232
  runRollbackRequest: RunRollbackRequest;
1292
1233
  }, opts?: Oazapfts.RequestOpts) {
1293
1234
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1323,7 +1264,7 @@ export function runRollbackInfra2({ runRollbackRequest }: {
1323
1264
  /**
1324
1265
  * Endpoint to run App Rollback
1325
1266
  */
1326
- export function runRollbackApp2({ runRollbackRequest }: {
1267
+ export function runRollbackApp1({ runRollbackRequest }: {
1327
1268
  runRollbackRequest: RunRollbackRequest;
1328
1269
  }, opts?: Oazapfts.RequestOpts) {
1329
1270
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1359,7 +1300,7 @@ export function runRollbackApp2({ runRollbackRequest }: {
1359
1300
  /**
1360
1301
  * Endpoint to run Destroy
1361
1302
  */
1362
- export function runDestroyInfra3({ runDestroyRequest }: {
1303
+ export function runDestroyInfra2({ runDestroyRequest }: {
1363
1304
  runDestroyRequest: RunDestroyRequest;
1364
1305
  }, opts?: Oazapfts.RequestOpts) {
1365
1306
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1374,7 +1315,7 @@ export function runDestroyInfra3({ runDestroyRequest }: {
1374
1315
  /**
1375
1316
  * Endpoint to run Destroy
1376
1317
  */
1377
- export function runDestroyApp3({ runDestroyRequest }: {
1318
+ export function runDestroyApp2({ runDestroyRequest }: {
1378
1319
  runDestroyRequest: RunDestroyRequest;
1379
1320
  }, opts?: Oazapfts.RequestOpts) {
1380
1321
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1389,7 +1330,7 @@ export function runDestroyApp3({ runDestroyRequest }: {
1389
1330
  /**
1390
1331
  * Endpoint to run Infra Deploy
1391
1332
  */
1392
- export function runDeployInfra2({ runDeployRequest }: {
1333
+ export function runDeployInfra1({ runDeployRequest }: {
1393
1334
  runDeployRequest: RunDeployRequest;
1394
1335
  }, opts?: Oazapfts.RequestOpts) {
1395
1336
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1425,7 +1366,7 @@ export function runDeployInfra2({ runDeployRequest }: {
1425
1366
  /**
1426
1367
  * Endpoint to run App Deploy
1427
1368
  */
1428
- export function runDeployApp2({ runDeployRequest }: {
1369
+ export function runDeployApp1({ runDeployRequest }: {
1429
1370
  runDeployRequest: RunDeployRequest;
1430
1371
  }, opts?: Oazapfts.RequestOpts) {
1431
1372
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -1467,7 +1408,7 @@ export function cancelAppRunByRunId({ runId, force }: {
1467
1408
  }, opts?: Oazapfts.RequestOpts) {
1468
1409
  return oazapfts.ok(oazapfts.fetchJson<{
1469
1410
  status: 202;
1470
- data: Unit;
1411
+ data: string;
1471
1412
  } | {
1472
1413
  status: 404;
1473
1414
  data: ErrorResponse;
@@ -1481,6 +1422,30 @@ export function cancelAppRunByRunId({ runId, force }: {
1481
1422
  method: "POST"
1482
1423
  }));
1483
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
+ }
1484
1449
  /**
1485
1450
  * Simulate a response from deploy worker
1486
1451
  */
@@ -1566,29 +1531,6 @@ export function resendTasks({ runId }: {
1566
1531
  method: "POST"
1567
1532
  }));
1568
1533
  }
1569
- /**
1570
- * Endpoint to force status RUNTIME_ERROR to a run by runId
1571
- */
1572
- export function setRunAsFailed({ runId }: {
1573
- runId: string;
1574
- }, opts?: Oazapfts.RequestOpts) {
1575
- return oazapfts.ok(oazapfts.fetchJson<{
1576
- status: 200;
1577
- data: boolean;
1578
- } | {
1579
- status: 404;
1580
- data: ErrorResponse;
1581
- } | {
1582
- status: 422;
1583
- data: ErrorResponse;
1584
- } | {
1585
- status: 500;
1586
- data: ErrorResponse;
1587
- }>(`/admin/run/${encodeURIComponent(runId)}/set-as-error`, {
1588
- ...opts,
1589
- method: "POST"
1590
- }));
1591
- }
1592
1534
  /**
1593
1535
  * Endpoint to block a StackSpot Workspace to perform Runtime operations
1594
1536
  */
@@ -1627,6 +1569,28 @@ export function blockAccount({ accountId }: {
1627
1569
  method: "POST"
1628
1570
  }));
1629
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
+ }
1630
1594
  /**
1631
1595
  * Endpoint to get tag data
1632
1596
  */
@@ -1919,6 +1883,61 @@ export function getDeploymentHeadByAppIdAndEnvId({ appId, envId }: {
1919
1883
  ...opts
1920
1884
  }));
1921
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
+ }
1922
1941
  /**
1923
1942
  * Get task with workspaceName, appId or InfraId that have status RUNNING
1924
1943
  */
@@ -1985,6 +2004,36 @@ export function getAdminRunStatusRunningDetails2({ appId, pageable }: {
1985
2004
  ...opts
1986
2005
  }));
1987
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
+ }
1988
2037
  /**
1989
2038
  * Get task details from run task id
1990
2039
  */
@@ -2027,3 +2076,28 @@ export function getAdminRun({ runId, runTaskId }: {
2027
2076
  ...opts
2028
2077
  }));
2029
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
+ }