Repository navigation
feat(mailboxes, domains): read and answer mailbox mail, and manage the sender logo - #9
Merged
Conversation
…e sender logo
Implements the eight operations the last spec re-sync listed in
NOT_YET_IMPLEMENTED, which is empty again (in step with sendly-js#18):
mailboxes.list_conversations / iter_list_conversations,
get_conversation, reply_to_conversation and download_attachment, under
the opt-in mailbox-conversations scopes; and domains.get_logo_v1,
upload_logo_v1, delete_logo_v1 and get_logo_readiness_v1.
download_attachment needs the body as bytes, so the HTTP call is split
out of request() and shared with a new request_bytes(), which still
raises the same typed errors. The contract suite now reads request_bytes
call sites too, and recognises the legacy cursor page
({items, nextCursor}) by shape, so the iterator is checked rather than
flagged as stray.
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.
This is the Python half of DevinoSolutions/sendly-js#18, tracked as T-6107. It implements the 8 operations listed in
NOT_YET_IMPLEMENTEDsince #8, and the list is empty again.Mailbox mail. These sit under the opt-in
mailbox-conversations:readandmailbox-conversations:replyscopes, which no existing key carries:mailboxes.list_conversations(id, query)anditer_list_conversations(followsnextCursorascursor, and stops on a repeated cursor)get_conversation(id, conversation_id)reply_to_conversation(id, conversation_id, body): there is no recipient or sender to namedownload_attachment(id, attachment_id)→SendlyFile(data: bytes, content_type, content_disposition), exported fromsendlySender logo (BIMI):
domains.get_logo_v1,upload_logo_v1,delete_logo_v1andget_logo_readiness_v1.Client change. The HTTP call moved into a private
_send(), shared byrequest()(unchanged) and a newrequest_bytes(). On a failure,request_bytes()raises the same typed errors.Contract suite
request_bytescall sites as well asrequestones.data: {items, nextCursor}) by shape, soiter_list_conversationsis checked against a real cursor list instead of being flagged as a stray iterator.Tests
test_mailbox_conversations.py: the filters, the multi-page walk, the stuck-cursor stop, the reply body, bytes that are not valid UTF-8 surviving intact, and a 403 surfacing asSendlyPermissionError.test_domain_logo.py: the four calls, plus a 422 rebuild refusal.Checks:
pytest(289), ruff check and format, andmypy srcare clean. README and CHANGELOG are updated. Not released.