Repository navigation
Releases
Release 0.1.0
First release that is not a pre-release. The client covers what HR-Sync needs to create users and employees in weclapp: users (with licenses, roles, custom attributes, mobile phone number and the invitation mail), employee records with work schedule profiles, custom attribute definitions with their list values, and FakeWeclapp for tests without a tenant. Reads and dry runs have been checked against a real weclapp tenant.
uv add "weclapp-client>=0.1.0,<0.2"Until 1.0, a minor version (0.2) may contain breaking changes, so keep the upper bound.
Some points can only be checked with real writes and come with HR-Sync's first run: whether creating a user sends a mail, how weclapp sets username, the minimal permissions of the API token and the details of the invitation. They are tracked in #9. If weclapp behaves differently from what the client and the fake assume, a patch release follows.
New since 0.1.0a3
client.users.invite(user_id)sends the user weclapp's invitation mail (POST user/id/{id}/invite) and returns the user. weclapp has no dry run for this action, so every call really sends a mail. Like otherPOSTrequests, the call is not repeated if its outcome is unclear (#36).FakeWeclappaccepts invitations for every known user and records them ininvitations. An unknown id gets 404 like the other endpoints (#36).
Integration tests
Tier 1 invites a user id that does not exist, after checking that it does not: weclapp answers with 404, so no mail can go out (P14). The open points of the invitation are described as a manual check in docs/integrationstests.md (German) (#36).
All changes since the first pre-release: v0.1.0a2, v0.1.0a3.
Alpha release 3
Third pre-release. It adds the last two things HR-Sync needs to create employees the way the weclapp admin's guide does (#33). Creating records has still not been tested against a tenant, so this is still a pre-release.
uv add "weclapp-client>=0.1.0a3,<0.2"New
mobile_phone_numberinUser,UserCreateandUserUpdate, at most 100 characters. weclapp stores the number as sent, without checking or normalising the format (#34).CustomAttributeDefinition.selectable_values: the values of aLISTattribute asCustomAttributeListValuewithid,value(the label),active,default_valueandposition_number(#34).FakeWeclapp:add_custom_attribute_definition(selectable_values=[...])adds a list attribute with values. Like weclapp, the fake rejects aselectedValueIdthat does not belong to the definition (400,detail"invalid selectable value id: …", novalidationErrors) (#34).
Integration tests
Tier 1 checks the format of mobile phone numbers and the values of list attributes against a real tenant with reads and dry runs (P12, P13). It reports phone numbers only in masked form (#34).
Alpha release 2
Second pre-release. The client now covers what HR-Sync needs to create users and employees the way the weclapp admin's guide does, and it has been checked against a real weclapp tenant with reads and dry runs. Creating records has not been tested against a tenant yet, so this is still a pre-release.
uv add "weclapp-client>=0.1.0a2,<0.2"New
Employee.entry_dateandEmployeeCreate.entry_date(#31).UserCreate.licensesandUserCreate.user_roles(IdReference);Userreads them as well (#32).- Number and list values of custom attributes:
CustomAttribute.of_number()andCustomAttribute.of_selection()(#32). - Work schedule profiles:
work_schedule_profile_assignmentsinEmployeeCreateandEmployee, andclient.work_schedule_profilesto read the profiles (#32). FakeWeclapp: work schedule profiles (#32); like weclapp, it accepts duplicate e-mail addresses (#31) and leavesattributeEntityTypeempty unless an attribute is of typeENTITY(#32).- Python 3.15 support (#25).
Changed
- Date-only fields are written as midnight German time (Europe/Berlin) instead of midnight UTC, like the weclapp user interface stores them. weclapp rejects anything else as the start date of a work schedule profile. Reading still accepts both forms (#32).
- Date filters match both forms:
Filter.eq()andFilter.ne()with adatebecomeinandnotinwith both timestamps, and comparisons include or exclude the whole day.Filter.custom_attribute_eq()rejects dates (#32). - New runtime dependency
tzdata, the time zone data that Windows does not ship (#32).
Integration tests
Tests against a real weclapp tenant: tier 1 only reads and sends dry runs; tier 2 creates one test user with an employee record, and a separate cleanup removes it (#31). See docs/integrationstests.md (German).
Alpha release
Merge pull request #3 from Hochfrequenz/feature/weclapp-employee-sync weclapp-client: API-Client für die Mitarbeiter-Stammdaten-Sync (AP 0–5, AP 6 vorbereitet)