feat: add Barcode and PackingList API client#6
Merged
Conversation
Expose Barcoding v3 and PackingList v1 lookups on DigiKeyClient with generated types.
There was a problem hiding this comment.
Pull request overview
Adds a new BarcodingClient to the SDK to expose Digi-Key Barcoding v3 barcode lookup endpoints and PackingList v1 lookup endpoints, and wires it into DigiKeyClient with generated OpenAPI-based types plus coverage to ensure paths/query mapping are correct.
Changes:
- Introduce
BarcodingClientwith product/packlist barcode lookups and PackingList invoice/sales-order/PO lookups. - Attach the client on
DigiKeyClientasclient.barcodingand export the new client/types from the package entrypoint. - Add Bun tests verifying request path/query construction and OAuth-flow configuration enforcement.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/barcoding.test.ts | Adds tests asserting endpoint-to-path/query mapping and OAuth-flow configuration validation. |
| src/index.ts | Re-exports Barcoding/PackingList client and related generated types from the public entrypoint. |
| src/constants.ts | Adds base path constants for Barcoding v3 and PackingList routing. |
| src/client.ts | Instantiates and exposes BarcodingClient via DigiKeyClient.barcoding. |
| src/barcoding.ts | Implements BarcodingClient methods and type aliases for Barcoding v3 + PackingList v1 operations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
BarcodingClientfor product and pack list barcode lookups.Test plan
bun run check