Skip to content

feat: [#1] type full api surface and add delivery-areas & marketplace#3

Merged
xedosystems merged 1 commit into
mainfrom
feat/1-part2
Jun 12, 2026
Merged

feat: [#1] type full api surface and add delivery-areas & marketplace#3
xedosystems merged 1 commit into
mainfrom
feat/1-part2

Conversation

@xedosystems

Copy link
Copy Markdown
Contributor

Summary

Regenerate the SDK types from the updated Developer API v1 spec — every entity is
now precisely typed instead of an open JsonObject — and expose the two new
read endpoints (delivery-areas, marketplace).

Changes

  • Refreshed the vendored openapi.json and regenerated src/types/generated.ts
  • Rewrote src/types/public.ts to derive all entity, enum and input types from
    generated.ts (stays in sync on every npm run generate)
  • Added named enums: OrderStatus, CartStatus, FulfillmentStatus,
    DeliveryType, PaymentStatus, OrderPaymentMethod, PriceAdjustmentType,
    MediaType
  • Split list vs detail shapes: list()/listAll() now return OrderListItem /
    CartListItem, retrieve() returns the full Order / Cart
  • Overrode meta back to JsonObject (openapi-typescript emits the useless
    Record<string, never>)
  • Added Carts.pay() return type CheckoutRetryResult; createAndPay() now
    returns CheckoutResult | CheckoutRetryResult
  • Added DeliveryAreas and Marketplace resources, wired into the Xedo client
  • Updated exports in src/index.ts, the README resource table and the example

API

Endpoint: GET /v1/delivery-areas

Returns DeliveryArea[]{ id, name, deliveryCost }. Use id as
delivery.deliveryAreaId when creating a cart.

Endpoint: GET /v1/marketplace

Returns the MarketplaceProfile (payment config, split-payment settings,
business category, …).

Access: Bearer xdk_… developer API key

@xedosystems xedosystems merged commit 9707f09 into main Jun 12, 2026
4 checks passed
@xedosystems xedosystems deleted the feat/1-part2 branch June 12, 2026 20:54
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.

2 participants