Repository navigation
feat(device-client): check an invite, re-export the settings names - #135
Merged
Merged
Conversation
check_invite wraps POST /v1/invites/check: Ok when the code can start a sign-up, InviteInvalid for an unknown, used or expired one, RateLimited after too many wrong tries. It spends nothing.
The app no longer spells the zone, record id and record type by hand: ZONE_SETTINGS, PERSON_RECORD_ID, PERSON_SETTINGS, Settings and the types its methods expose come from orbyn-engineering through this crate. This adds the edge orbyn-device-client -> orbyn-engineering to the ownership map; orbyn-engineering does not depend on the device client.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DeviceClient::check_invite(code)wrapsPOST /v1/invites/check({invite}-> 204):Okwhen the code can start a sign-up,InviteInvalidfor an unknown, used or expired one (the server gives one answer for all),RateLimitedafter too many wrong tries; a server that asks for no invites says yes. It spends nothing and sends the code as typed. NoInviteRequiredvariant exists, so the existingInviteInvalidis used.orbyn-engineeringthroughorbyn-device-client:ZONE_SETTINGS,PERSON_SETTINGS,PERSON_RECORD_ID,Settings, and the types its methods expose (SettingsError,Rule,Accepted,Rejected), so the app does not spell the names by hand. New dependency edgeorbyn-device-client -> orbyn-engineering, approved by the lead, added toALLOWEDinscripts/check_structure.py;orbyn-engineeringdoes not depend on the device client (no cycle). Tested bytests/reexports.rs;single_crateand the D6 scan stay green. Noted in docs/device-client.md.Testing
Co-authors
none
AI usage
Checklist
docs/architecture.mdwith any rule change; generated wire types with any contract change