service = $service; } public function postActionProcess(Request $request): stdClass { $body = $request->getParsedBody(); $entityType = $body->entityType ?? null; $id = $body->id ?? null; $action = $body->action ?? null; $data = $body->data ?? (object) []; if (!$entityType || !$action || !$id) { throw new BadRequest(); } $entity = $this->service->process($entityType, $action, $id, $data); return $entity->getValueMap(); } }