Hard deletes a program.
- Internal invocation through dependency injection (Inversify).
| Name | Required | Type | Description |
|---|---|---|---|
id |
Yes | string |
Input field consumed by the use case. |
session |
Yes | { |
Input field consumed by the use case. |
userId |
Yes | string |
Input field consumed by the use case. |
role |
Yes | Role |
Input field consumed by the use case. |
- Input DTO must respect constraints enforced by the implementation.
- Caller context/authorization must satisfy business checks implemented in the use case.
- Validates input/access constraints defined in
executeand helper guards. - Uses
bddServicedependency to read/write required domain data. - Uses
loggerServicedependency to read/write required domain data.
- Returns the use case result (entity/model/list or boolean depending on implementation).
- May persist domain state changes through repository/service dependencies.
- Logs execution errors through the logger service before normalization/rethrow.
- Throws
'PROGRAM_NOT_FOUND'when the corresponding guard/validation fails. - Normalizes or references error code
ERRORS.HARD_DELETE_PROGRAM_USECASE.
bddServiceloggerService
api/src/usecases/sport/program/hard-delete.program.usecase.ts
{
"id": "example",
"session": {},
"userId": "example",
"role": {}
}- This document is generated from code and should be updated whenever behavior changes in implementation.
- If helper modules define additional rules, they are authoritative over this summary.