Files
floci/docs
Kenshin Okinaka 10f799a2b7 feat(ses): implement Contact CRUD for SES v2 (#1723)
* feat(ses): implement Contact CRUD for SES v2

Add the SES v2 Contact APIs under /v2/email/contact-lists/{name}/contacts:
CreateContact, GetContact, ListContacts (POST .../contacts/list),
UpdateContact, DeleteContact. Contacts carry per-topic subscription
preferences, an unsubscribe-all flag, and free-form attributes;
TopicDefaultPreferences is derived at read time from the list's topics.

Behaviour is verified against real AWS: validation order (Smithy enum ->
EmailAddress format -> list existence -> topic existence), AlreadyExists /
NotFound / invalid-topic / invalid-email error shapes, and the UpdateContact
semantics (TopicPreferences merge by topic name; AttributesData and
UnsubscribeAll replaced). Covered by a RestAssured integration test and an
AWS Java SDK v2 compatibility test.

* refactor(ses): resolve contact list once for reads and delete under lock

Address review consistency findings on the Contact CRUD read/delete paths:

- getContact/listContacts returned only the contact(s), so the controller
  fetched the ContactList a second time to render TopicDefaultPreferences.
  Between the two calls a concurrent delete could turn a successful read into a
  misleading "List not found". The service now returns the resolved list
  alongside the contact(s) (ContactWithList / ContactsWithList), so the read is
  a single, consistent lookup.
- deleteContact re-checked list existence before acquiring contactMutationLock,
  unlike createContact/updateContact which re-check inside it. Move the
  getContactList check inside the lock so a concurrent deleteContactList
  surfaces "list not found" rather than "contact not found".
2026-07-10 23:15:59 -05:00
..
2026-03-15 17:43:56 -05:00