Skip to content

feat: add guest access code management - #19

Open
alex4108 wants to merge 3 commits into
ZacheryThomas:mainfrom
alex4108:fix/ha-preloaded-ssl-context
Open

feat: add guest access code management#19
alex4108 wants to merge 3 commits into
ZacheryThomas:mainfrom
alex4108:fix/ha-preloaded-ssl-context

Conversation

@alex4108

Copy link
Copy Markdown

Summary

  • add typed guest-access policy and credential models
  • list unit access data without exposing resident credentials through guest-only helpers
  • create, update, and delete permanent, temporary, and recurring guest codes
  • enforce SmartRent policy limits before sending mutations
  • accept a caller-provided SSL context for WebSocket connections
  • omit the ssl argument when no context is supplied, fixing current websockets behavior for wss:// connections

API contract

The guest-code endpoints and payloads were cross-checked against SmartRent's current Resident clients. Create uses the unit guest-access endpoint; update and delete use the credential endpoint returned by the unit access response.

Safety

  • validation rejects malformed schedules and unsupported policy combinations before a write
  • guest helpers operate only on guests[].pin_codes
  • diagnostics and exceptions avoid logging plaintext PINs or access payloads
  • resident, mobile, and fob credentials are not accepted by guest mutation helpers

Verification

  • 29 tests pass
  • coverage includes policy validation, temporary and recurring payloads, response parsing, credential mutation paths, redaction, SSL context injection, and the secure-WebSocket ssl=None regression

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.

1 participant