feat(intercom): intercom resolver for contact profile and conversation metadata#142
Open
jaylann wants to merge 1 commit into
Open
feat(intercom): intercom resolver for contact profile and conversation metadata#142jaylann wants to merge 1 commit into
jaylann wants to merge 1 commit into
Conversation
…n metadata
Adds effaced-intercom, a first-party httpx resolver mirroring the
effaced-resend shape (fresh client per call, sync wrapped in
asyncio.to_thread, faked at the transport boundary in tests).
- Refs are kind="intercom", value=<Intercom internal contact id>;
get/delete address the contact by id directly (no email search).
- Export (Art. 15): contact email/name/phone plus per-conversation
created_at/updated_at/state, paged through POST /conversations/search
filtered by contact_ids. Message bodies and the caller-defined
custom_attributes blob are never exported.
- Erase (Art. 17): DELETE /contacts/{id}; a 404 on get/delete is success
(already_absent=True). Idempotent by construction.
- AttestingResolver: covered_surface built from the exporter's field
tuples so declaration and implementation cannot drift.
- Error taxonomy is status-code-only: 4xx except 404/429 raise
ResolverError (carrying neither id nor token); 429/5xx/connection
faults propagate for saga retry. No rectify_subject in this first cut.
Additive (new package, no change to existing exports) — MINOR. Wires the
package into the ruff/mypy/coverage lists, the generated API reference,
PROOFS.md, and flips the roadmap entry to shipped.
Closes #61
Signed-off-by: Justin Lanfermann <Justin@Lanfermann.dev>
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
effaced-intercom(IntercomResolver) — exports a data subject's Intercom contact profile + conversation metadata (Art. 15) and erases the contact (Art. 17), mirroring theeffaced-resendshape (httpx, fresh client per call, faked at the transport boundary,AttestingResolver, norectify).kind="intercom",value=<Intercom internal contact id>; get/delete address the contact by id directly (no email search). Conversation metadata is paged throughPOST /conversations/searchfiltered bycontact_ids.PROOFS.md, and flips the roadmap entry to shipped.Closes #61
Erasure/export semantics
New surface, additive — not a change to what gets deleted or exported for any existing resolver, so MINOR (not
breaking).email/phone(CONTACT),name(IDENTITY); per-conversationcreated_at/updated_at/state(BEHAVIORAL), keyedconversation.{id}.{field}. Never exported: message bodies (conversation_parts,source.body) and the caller-definedcustom_attributesblob — declared as covered-surface exclusions.DELETE /contacts/{id}. A 404 on get/delete is success (already_absent=True); idempotent by construction. Erasure deletes the contact only — conversation retention is Intercom's, documented in the README and the covered-surface notes.Risk
DELETE /contacts/{id}archives vs. hard-deletes) and the conversation-searchcontact_idsfield are pinned against current Intercom docs; the resolver is robust to either via the 404-idempotency contract and records what it did inResolverErasure.detail.release-please-config.json/manifest yet — matching the existingeffaced-djangoprecedent onstage(release wiring added deliberately when publishing is intended). Easy follow-up when this package is slated to publish.Checklist
stage(nevermain)type(scope)?: lowercase subject)git commit -s)just checkandjust testgreen locallytest_intercom_properties.py)type:*and relevantarea:*labels set