You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***Does not extend `BaseApiService<T>`** — The AI endpoints are not CRUD endpoints. A focused service with four methods is self-documenting.
154
163
***Four methods, four endpoints** — `chat`, `hrInsight`, `nlEmployeeSearch`, `semanticPositionSearch`. Each article in this series introduces one method; the full service is shown here for reference.
164
+
***`hrInsight` unwraps `ApiResult<T>`** — The `POST /ai/hr-insight` endpoint returns the standard `Result<HrInsightDto>` envelope (`{ isSuccess, value, errors }`) used by all MediatR-dispatched endpoints. The private `ApiResult<T>` interface models this shape, and `.pipe(map(r => r.value))` unwraps it so components receive a plain `HrInsightResponse`. The `chat` and `nlEmployeeSearch` endpoints return their payloads directly (no envelope), so no unwrapping is needed for those.
155
165
***`inject()` not constructor injection** — Consistent with every other service in this codebase.
156
166
157
167
**Add to the barrel export** in `src/app/services/api/index.ts`:
0 commit comments