fix: actions v2beta with api design for GA (#10303)

# Which Problems Are Solved

Actions v2beta API does not adhere to the [API
design](https://github.com/zitadel/zitadel/blob/main/API_DESIGN.md)
fully.

# How the Problems Are Solved

- Correct body usage for ListExecutions
- Correct REST path for ListTargets and ListExecutions
- Correct attribute names for ListTargetsResponse and
ListExecutionsResponse

# Additional Changes

- Remove unused object import.

# Additional Context

Closes #10138

---------

Co-authored-by: Marco A. <marco@zitadel.com>
This commit is contained in:
Stefan Benz
2025-07-25 18:20:58 +02:00
committed by GitHub
parent c46fd01947
commit f0fa89747d
8 changed files with 73 additions and 71 deletions

View File

@@ -45,7 +45,7 @@ export class ActionsTwoActionsComponent {
switchMap(() => {
return this.actionService.listExecutions({ sortingColumn: ExecutionFieldName.ID, pagination: { asc: true } });
}),
map(({ result }) => result.map(correctlyTypeExecution)),
map(({ executions }) => executions.map(correctlyTypeExecution)),
catchError((err) => {
this.toast.showError(err);
return of([]);
@@ -59,7 +59,7 @@ export class ActionsTwoActionsComponent {
switchMap(() => {
return this.actionService.listTargets({});
}),
map(({ result }) => result),
map(({ targets }) => targets),
catchError((err) => {
this.toast.showError(err);
return of([]);

View File

@@ -115,13 +115,13 @@ export class ActionsTwoAddActionTargetComponent {
this.actionService
.listTargets({})
.then(({ result }) => {
const targets = result.reduce((acc, target) => {
.then(({ targets }) => {
const result = targets.reduce((acc, target) => {
acc.set(target.id, target);
return acc;
}, new Map<string, Target>());
targetsSignal.set({ state: 'loaded', targets });
targetsSignal.set({ state: 'loaded', targets: result });
})
.catch((error) => {
this.toast.showError(error);

View File

@@ -39,7 +39,7 @@ export class ActionsTwoTargetsComponent {
switchMap(() => {
return this.actionService.listTargets({});
}),
map(({ result }) => result),
map(({ targets }) => targets),
catchError((err) => {
this.toast.showError(err);
return of([]);