Skip to content

feat(adapters): add read-only Faire adapter (#1408) - #1563

Merged
helpcodeai merged 4 commits into
HelpCode-ai:mainfrom
aj-codespy:feat/faire-adapter
Nov 8, 2026
Merged

helpcodeai merged 4 commits into
HelpCode-ai:mainfrom
aj-codespy:feat/faire-adapter

Conversation

@aj-codespy

@aj-codespy aj-codespy commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Read-only Faire adapter for brands, from #1408. It's a draft so you can comment on the tool list and the auth choice before it's marked ready.

Auth: one question for you

The issue says X-FAIRE-ACCESS-TOKEN. The current brand-side docs (developers.faire.com, where faire.github.io/external-api-v2-docs now redirects) list only OAuth as the security scheme. Every request sends two headers:

  • X-FAIRE-OAUTH-ACCESS-TOKEN: the OAuth access token
  • X-FAIRE-APP-CREDENTIALS: applicationId:applicationSecret, Base64-encoded

The docs say OAuth tokens differ from "the access tokens used for V1 and V2". They still suggest single brands generate a token in the Brand Portal, but no longer name the header for it.

So the adapter uses the documented OAuth pair: authType: API_KEY with headerName plus extraHeaders, the same pattern as de/clockodo.json and be/falco.json. Both values are {{FAIRE_OAUTH_ACCESS_TOKEN}} and {{FAIRE_APP_CREDENTIALS}} variable references.

Would you also like support for the Brand Portal token (X-FAIRE-ACCESS-TOKEN)? If so, should it be a second adapter variant, or should I switch to it entirely?

Tools (all GET, read-only)

Tool Endpoint Notes
faire_get_brand_profile GET /brands/profile Install probe; returns brand ID, name, currency
faire_list_orders GET /orders cursor, limit, updated_at_min, created_at_min, excluded_states, ship_after_max; mapping keeps state, dates, retailer, items, shipments, payout total (drops street address and phone)
faire_get_order GET /orders/{order_id} Full order, unmapped
faire_list_products GET /products cursor, limit, sku, updated_at_min, include_deleted; mapping keeps variants with SKU, options, stock, prices
faire_get_product GET /products/{product_id} Full product, unmapped
faire_get_inventory_by_skus GET /product-inventory/by-skus on hand, committed, available
faire_get_inventory_by_variant_ids GET /product-inventory/by-product-variant-ids same, by variant ID

The issue's "inventory levels" now maps to /product-inventory/by-*: Faire removed the old /products/variants/inventory-levels-by-* endpoints on 2026-06-01.

Changes

  • packages/backend/src/adapters/intl/faire.json and the regenerated catalog.ts
  • packages/backend/src/adapters/intl/faire.live.spec.ts: static tests always run; live tests run only with RUN_FAIRE_LIVE=1
  • Quoted counts bumped from 713 to 714, plus regenerated llms.txt and llms-full.txt
  • packages/frontend/public/logos/connectors/faire.svg: a simple monogram placeholder; happy to swap in the official mark if you prefer

Testing

Run from the repository root:

$ node scripts/validate-adapters.mjs --warn
Validated 730 adapters: 730 passed, 0 failed, 1440 total warnings.

None of the 1,440 warnings is in intl/faire.json; all of them existed before.

$ node scripts/regenerate-catalog.mjs
✓ Regenerated packages/backend/src/adapters/catalog.ts: 730 adapters across 15 regions.
$ node scripts/adapter-count.mjs --check
OK: every quoted count equals 714 adapters (35 keyless, 12900 tools).
$ node scripts/generate-llms-txt.mjs --check
(passes)

Run in packages/backend:

$ npx jest src/adapters/intl/faire.live.spec.ts
Tests:       3 skipped, 21 passed, 24 total
$ npx eslint src/adapters/intl/faire.live.spec.ts
(no output, exit 0)

I didn't run the full backend suite or tsc locally; I'm relying on CI for those.

Live calls: none. I don't have a Faire brand account with an authorized app, so this is built from the docs. The live tests run only when RUN_FAIRE_LIVE=1 is set.

Type

  • New feature

Related Issues

Closes #1408

🤖 Generated with Claude Code

@helpcodeai

Copy link
Copy Markdown
Contributor

Thanks @aj-codespy, this looks good. We checked it: GET only, fixed base URL, credentials only as variable references, CI green.

On the auth question: keep the documented OAuth pair as it is. No second variant for the Brand Portal token for now. If a user asks for it later, we can add it then.

When you're happy with it, mark the PR as ready for review. We'll update the branch and merge it.

@aj-codespy
aj-codespy marked this pull request as ready for review November 7, 2026 08:05
@helpcodeai
helpcodeai enabled auto-merge (squash) November 8, 2026 08:02
@helpcodeai
helpcodeai merged commit 36c2eae into HelpCode-ai:main Nov 8, 2026
16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 8, 2026
@helpcodeai

Copy link
Copy Markdown
Contributor

Merged, thanks @aj-codespy! After updating the branch, main already had one more adapter, so we bumped the quoted counts to 715 on your branch before merging. Faire will be on Cloud with the next deploy, today.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapter: Faire (brands)

2 participants