Skip to content

Add contacts.import and Import History naming for contact imports - #76

Merged
thedogwiththedataonit merged 21 commits into
mainfrom
claude/contact-imports
Oct 24, 2026
Merged

thedogwiththedataonit merged 21 commits into
mainfrom
claude/contact-imports

Conversation

@thedogwiththedataonit

@thedogwiththedataonit thedogwiththedataonit commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Adds contacts.import for named JSON batches and aligns CSV imports with the shared Import History response from app #2194. Both return importId and required summary.total = inserted + updated + failed + skipped. Errors and warnings accept optional positive, 1-based row positions. CSV skip warnings identify the first 100 skipped rows, then summarize any remainder without a row index. Completed validation and persistence outcomes are preserved.

Refreshed against SDK main 5fc74b7254070387a603df89e1799829a3c4bfbe, preserving merged category/group #78 and SDK 13 features. Canonical generation from app source e87215e3c09418b1c43300b4f343b290a28a8f94 corrects the CSV validate description: at most 100 submitted data rows use inline submitted-row charges; larger imports use background charges per address and return a job ID only when queued. No fields or runtime behavior changed. App and all three consumer YAML files match byte-for-byte: raw SHA-256 89f71c3eaaee5ed17ce090d0488815d41250a86c13a357cf10d3b14d46f9a763. Generated SDK types include that description. Version 13.0.0 and its published changelog remain unchanged; additions remain under Unreleased.

The resource guide now covers JSON imports, CSV batch names, totals, row details and bounded skip warnings. Guide and JSDoc clarify the 100-submitted-contact/CSV-row inline cutoff, inline submitted-row charges, background charges per address, and validation counts or a job ID only when checks run or work is queued. Deleting an import preserves contacts subsequently updated by another import.

Validation: six final API parity tests, TypeScript, ESLint, generated-type checks, owner openapi:check:all and diff checks pass. The 26 focused import/validation/template tests passed before this description-only update; runtime and field shapes are unchanged. Strict compilation of all three guide examples and formatting pass. No live API calls, imports or package publications were performed.

Keep this draft through app #2194's strict cache/cost evaluation and signed-in acceptance gates, then its merge and API deployment. Release this SDK next. CLI #65 validates against reviewed immutable source and must replace its temporary Git pin with the actual published SDK artifact and regenerate its lockfile before CLI release. Publish docs #326 after its API/SDK/CLI examples are available.

Final app owner #2194 head c2ed746b3558f2a849f4410fa21228646563b0d8 contains these same contract descriptions and artifacts. Owner OpenAPI, contract-audit and generated-reference freshness checks pass against the refreshed consumers.

RetriggerView in GreptileConfidence Score: 5/5

The reviewed changes appear safe to merge, subject to the stated API deployment and release gates.

Summary

Adds contacts.import for named JSON batches and shares the response shape with CSV imports.

  • JSON contact batches can be sent as one named import.
  • JSON and CSV imports return the same batch details.
  • Validation results distinguish completed checks from provider outages.

Reviews (12) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

`brew.contacts.import()` calls the new `POST /v1/contacts/import`: the JSON
twin of `importCsv`, recorded as one Import History batch. Both imports take
`fileName` (the batch's name in Import History, also stamped on each contact
as `csvFileName`) and return the batch's `importId`.

Re-vendors the app's OpenAPI spec and regenerates the types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread CHANGELOG.md Outdated
- One `ContactsImportResponse` component backs both imports (the app now
  registers a single schema); `ImportCsvContactsResponse` keeps its name.
- `ImportContactsSummary` / `ImportContactsError` / `ImportContactsWarning`
  helper types, like the CSV import's.
- Changelog + JSDoc: `contacts.validate` results are discriminated by
  `checkOutcome` (re-vendored spec), with a narrowing example; CSV
  validation is metered per row; `importId` stays on a contact until a later
  import touches it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread src/resources/contacts/import-csv.ts Outdated
thedogwiththedataonit and others added 2 commits October 20, 2026 21:41
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedogwiththedataonit

Copy link
Copy Markdown
Contributor Author

Re the changelog note on contacts.validate (Greptile P2): added under Unreleased → Changed with a narrowing example (07b8a6f); ContactValidationResult JSDoc describes the checkOutcome union.

Comment thread openapi/public-api-v1.yaml Outdated
thedogwiththedataonit and others added 3 commits October 20, 2026 22:08
# Conflicts:
#	openapi/public-api-v1.yaml
#	src/generated/openapi-types.ts
#	src/resources/contacts/validate.ts
…rows, like the spec

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…IL_RESULT_UNAVAILABLE

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thedogwiththedataonit and others added 4 commits October 21, 2026 02:01
Re-vendors the spec from brew-v2#2194: summary.total (always inserted +
updated + failed + skipped), a 1-based row on every batch/import error and
per-row warning, CSV_ROW_SKIPPED warnings, and main's template groupBy
'group' token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread openapi/public-api-v1.yaml
@thedogwiththedataonit
thedogwiththedataonit marked this pull request as draft October 21, 2026 02:15
Regenerate the vendored OpenAPI contract and SDK types from brew-v2 app source 8ad6c3f235f873d5f070bb498c94f7c616dd77cc. Preserve merged companion history while removing unsupported summary.total, row index and CSV_ROW_SKIPPED promises.
Consume the owner-generated contract from brew-v2 source 29459adcb94ece3c49b3f258e9010fa45917be98. Type JSON and CSV fixtures against the shared response and verify total, row metadata, partial success, and bounded skipped-row warnings remain intact. Keep SDK 13.0 and all published changelog entries unchanged.
@thedogwiththedataonit
thedogwiththedataonit marked this pull request as ready for review October 21, 2026 08:09
Comment thread openapi/public-api-v1.yaml Outdated
…ering

Re-vendored from brew-v2#2194: imports of at most 100 submitted contacts
validate inline at 2 credits per submitted contact (failed rows count);
larger imports bill per address in the background workflow, and
validationJobId comes back only when a job is queued.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thedogwiththedataonit and others added 2 commits October 21, 2026 19:52
Re-vendored from brew-v2#2194: a CSV row is the parsed data row, so the
header and blank lines are not counted. FIELD_TYPE_COERCED is reported
once per field, and a validation failure after an import names the saved
importId.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thedogwiththedataonit
thedogwiththedataonit merged commit fe26778 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