Skip to content

feat(contacts): dryRun and onConflict on contacts.import and importCsv - #79

Merged
thedogwiththedataonit merged 5 commits into
mainfrom
claude/contact-import-dry-run
Oct 24, 2026
Merged

thedogwiththedataonit merged 5 commits into
mainfrom
claude/contact-import-dry-run

Conversation

@thedogwiththedataonit

@thedogwiththedataonit thedogwiththedataonit commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #76 (base claude/contact-imports). App PR: GetBrew/brew-v2#2220.

  • contacts.import() and contacts.importCsv() take dryRun (the response the import would return, nothing written; carries dryRun: true and no importId) and onConflict: 'upsert' | 'skip' (skip leaves existing contacts unchanged, counted in summary.skipped with a CONTACT_EXISTS_SKIPPED warning).
  • ContactsImportResponse.importId is now optional (absent on a dry run). CHANGELOG notes it.
  • Spec and src/generated/openapi-types.ts synced from brew-v2#2220; JSDoc, docs/contacts.md, tests for both options.

Checks: bun run test 750/750 (two new tests: dryRun forwarded and a dry-run envelope with no importId; onConflict forwarded and CONTACT_EXISTS_SKIPPED read), tsc --noEmit clean, prettier clean. Base claude/contact-imports merged through 25f8e1e. Needs the matching API deployment.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge with the matching API deployment.

Summary

Adds dryRun and onConflict to contact imports and makes importId optional for previews.

  • Contact imports can preview changes or leave existing contacts alone.
  • Flow lookups turn a domain-and-kind slug into the right request.
  • Email and notification types include the new language and alert fields.

Reviews (4) · Last reviewed commit: "feat(contacts): sync dryRun/onConflict w..." · Reviewed by Greptile

Both imports take `dryRun` (the response the import would return, nothing
written; no `importId`, which is now optional on ContactsImportResponse)
and `onConflict` (`skip` creates missing contacts and leaves existing ones
unchanged, counted in `summary.skipped` with a CONTACT_EXISTS_SKIPPED
warning). Spec and generated types synced from GetBrew/brew-v2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/resources/contacts/import.ts Resolved
thedogwiththedataonit and others added 2 commits October 21, 2026 17:31
Keeps the base's validation-billing wording and adds the dryRun and
onConflict notes. Spec and generated types re-synced from brew-v2#2220.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedogwiththedataonit
thedogwiththedataonit changed the base branch from claude/contact-imports to main October 24, 2026 13:17
thedogwiththedataonit and others added 2 commits October 24, 2026 22:50
… reads stream slugs

- Re-vendor the spec from brew-v2 main 87ac2c6242 (#2220 merged), types
  regenerated: imports' dryRun / onConflict, email lang, flow kind.
- flows.get splits a <domain>/<kind> slug into the domain path plus ?kind=
  and takes a kind option; an encoded / named no flow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedogwiththedataonit
thedogwiththedataonit merged commit d356b8d into main Oct 24, 2026
3 checks passed
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