Skip to content

feat(profile-family): add D2 employee profile resources#106

Open
sgerrand wants to merge 5 commits into
mainfrom
feat/profile-family
Open

feat(profile-family): add D2 employee profile resources#106
sgerrand wants to merge 5 commits into
mainfrom
feat/profile-family

Conversation

@sgerrand
Copy link
Copy Markdown
Owner

@sgerrand sgerrand commented May 4, 2026

💁 These changes round out the employee-profile API surface with 9 resources from Group D2.

Summary

Full CRUD:

  • `Humaans.IdentityDocuments` — `/api/identity-documents`
  • `Humaans.EmergencyContacts` — `/api/emergency-contacts`
  • `Humaans.Equipment` — `/api/equipment`

Limited operations:

  • `Humaans.PublicHolidayCalendarDays` — `/api/public-holiday-calendar-days` (list, retrieve, create, update; no delete)

Read-only (list):

  • `Humaans.IdentityDocumentTypes` — `/api/identity-document-types`
  • `Humaans.EquipmentTypes` — `/api/equipment-types`
  • `Humaans.EquipmentNames` — `/api/equipment-names`
  • `Humaans.PublicHolidayCalendars` — `/api/public-holiday-calendars`
  • `Humaans.PublicHolidays` — `/api/public-holidays`

Each resource ships as struct + module + tests using `Humaans.Resource`. Modules with restricted action sets declare `actions: [...]` explicitly and include guard tests confirming non-exported functions stay unexported.

Module access helpers and README updated.

Addresses Group D2 of the API coverage review (`~/.claude/plans/review-the-api-documentation-swirling-scroll.md`).

Test plan

  • `mix test` passes (~37 new tests)
  • `mix credo` clean
  • `mix format --check-formatted` clean

sgerrand added 5 commits May 4, 2026 16:49
…t Types

Adds Humaans.IdentityDocuments (full CRUD) covering /api/identity-documents
and Humaans.IdentityDocumentTypes (list-only) covering
/api/identity-document-types. The list-only module declares actions [:list]
and a guard test asserts the other CRUD functions are not exported.
Adds Humaans.EmergencyContacts covering /api/emergency-contacts. Each
contact records the person, name, relationship, phone number, and
email.
Adds Humaans.Equipment (full CRUD) plus the read-only catalog
resources Humaans.EquipmentTypes and Humaans.EquipmentNames covering
the corresponding /api/equipment* endpoints.
Adds the three Public Holiday API resources:

- Humaans.PublicHolidays (list-only)
- Humaans.PublicHolidayCalendars (list-only)
- Humaans.PublicHolidayCalendarDays (list, retrieve, create, update —
  the API does not expose DELETE)

The PublicHolidayCalendarDays module declares actions [:list, :retrieve,
:create, :update] explicitly and a guard test asserts delete/2 is not
exported.
Copilot AI review requested due to automatic review settings May 4, 2026 15:52
@coveralls
Copy link
Copy Markdown

coveralls commented May 4, 2026

Coverage Report for CI Build 25328859990

Coverage decreased (-3.9%) to 96.087%

Details

  • Coverage decreased (-3.9%) from the base build.
  • Patch coverage: 9 uncovered changes across 1 file (9 of 18 lines covered, 50.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
lib/humaans.ex 9 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 230
Covered Lines: 221
Line Coverage: 96.09%
Coverage Strength: 24.07 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants