@flipagent/types
v1.3.0
Published
TypeBox schemas for flipagent — `/v1/*` API surface at the root (one file per resource: items, evaluate, ship, listings, locations, purchases, bids, sales, payouts, money, messages, feedback, offers, disputes, recommendations, forwarder, notifications, we
Downloads
621
Readme
@flipagent/types
TypeBox schemas for the flipagent hosted API. Two subpaths:
@flipagent/types— schemas for flipagent's own/v1/*surface, one file per resource (items,evaluate,ship,purchases,bids,listings,locations,policies,media,sales,labels,payouts,money,messages,feedback,offers,disputes,recommendations,forwarder,notifications,webhooks,bridge,browser,categories,products,seller,me-account,me-ebay,agent,legal,flipagenterrors + tiers, pluscompute-jobs/bridge-jobsenvelopes).@flipagent/types/ebay— schemas mirroring eBay REST shapes —/buy(Browse + Marketplace Insights) and/sell(Inventory, Fulfillment, Finance, Account).
npm install @flipagent/typesimport { Value } from "@sinclair/typebox/value";
import { EvaluateRequest } from "@flipagent/types";
import type { ItemSummary, BrowseSearchResponse } from "@flipagent/types/ebay";
// Validate a request body before posting
const errors = [...Value.Errors(EvaluateRequest, body)];
if (errors.length) throw new Error("invalid evaluate body");
// Use the eBay shapes as your wire types
const json: BrowseSearchResponse = await fetch(...).then(r => r.json());Most users will reach for @flipagent/sdk
instead, which wraps these schemas in a typed client. Use this package
directly when you're building a non-TypeScript-SDK surface (a Hono server
that validates inbound requests, a code-generator, etc.).
License
MIT
