Repository navigation
Add contacts.import and Import History naming for contact imports - #76
Merged
Merged
Conversation
`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>
- 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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Re the changelog note on |
# 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>
…mports-sdk76-20261021
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>
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
marked this pull request as ready for review
October 21, 2026 08:09
…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>
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>
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.
Adds
contacts.importfor named JSON batches and aligns CSV imports with the shared Import History response from app #2194. Both returnimportIdand requiredsummary.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 sourcee87215e3c09418b1c43300b4f343b290a28a8f94corrects 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-25689f71c3eaaee5ed17ce090d0488815d41250a86c13a357cf10d3b14d46f9a763. 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:alland 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
c2ed746b3558f2a849f4410fa21228646563b0d8contains these same contract descriptions and artifacts. Owner OpenAPI, contract-audit and generated-reference freshness checks pass against the refreshed consumers.

Confidence Score: 5/5
The reviewed changes appear safe to merge, subject to the stated API deployment and release gates.Summary
Adds
contacts.importfor named JSON batches and shares the response shape with CSV imports.Reviews (12) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile