Skip to content

Guest Memberships via Sites API#5205

Merged
aerosol merged 12 commits intomasterfrom
sites-api-guests
Mar 20, 2025
Merged

Guest Memberships via Sites API#5205
aerosol merged 12 commits intomasterfrom
sites-api-guests

Conversation

@aerosol
Copy link
Member

@aerosol aerosol commented Mar 17, 2025

Changes

This PR adds Create/List/Delete operations for "guests" via the Sites API.
Implementation follows existing conventions.
accepted boolean payload attribute indicates difference between invitation and a membership. email is used as a universal identifier for either guest invitation or a guest membership.

Docs: plausible/docs#591

Tests

  • Automated tests have been added
  • This PR does not require tests

Changelog

  • Entry has been added to changelog
  • This PR does not make a user-facing change

Documentation

Dark mode

  • The UI has been tested both in dark and light mode
  • This PR does not change the UI

@aerosol aerosol changed the title List site guests via Sites API Guest Memberships via Sites API Mar 18, 2025
@aerosol aerosol force-pushed the sites-api-guests branch 2 times, most recently from 66358ac to 7aba976 Compare March 18, 2025 08:25
@aerosol aerosol marked this pull request as ready for review March 18, 2025 08:52
@aerosol aerosol requested review from ukutaht and zoldar March 18, 2025 08:52
aerosol and others added 4 commits March 18, 2025 11:05
…ler.ex

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
Copy link
Contributor

@zoldar zoldar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aerosol
Copy link
Member Author

aerosol commented Mar 20, 2025

@ukutaht awaiting your ack on that one 👐

Copy link
Contributor

@ukutaht ukutaht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only looked at the tests to check the API contract. Looks good to me overall 👍

nit: I prefer enums over booleans in public APIs. So like {status: "accepted"} | {status: "invited"} over {accepted: true} for extensibility.

@aerosol
Copy link
Member Author

aerosol commented Mar 20, 2025

I prefer enums over booleans in public APIs

6d86f20

@aerosol aerosol enabled auto-merge March 20, 2025 10:52
@aerosol aerosol added this pull request to the merge queue Mar 20, 2025
Merged via the queue into master with commit 8d9461d Mar 20, 2025
8 checks passed
@zoldar zoldar deleted the sites-api-guests branch March 20, 2025 13:18
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.

3 participants