diff --git a/.changeset/hip-squids-rhyme.md b/.changeset/hip-squids-rhyme.md new file mode 100644 index 0000000..d7d6046 --- /dev/null +++ b/.changeset/hip-squids-rhyme.md @@ -0,0 +1,5 @@ +--- +"@coinbasejs/commerce": patch +--- + +fix(commerce): export Checkout types diff --git a/packages/commerce/src/checkout.ts b/packages/commerce/src/checkout.ts index 5de2f45..909c2b9 100644 --- a/packages/commerce/src/checkout.ts +++ b/packages/commerce/src/checkout.ts @@ -2,7 +2,7 @@ import * as http from "@coinbasejs/utils/http"; import type { RequestConfig } from "./client"; import { BASE_URL } from "./constants"; -type GetCheckoutResponse = { +export type GetCheckoutResponse = { data: Checkout; warning: string[]; }; @@ -19,7 +19,7 @@ export async function getCheckout( }); } -type GetCheckoutsResponse = { +export type GetCheckoutsResponse = { data: Checkout[]; warning: string[]; }; @@ -35,7 +35,7 @@ export async function getCheckouts( }); } -type CheckoutRequestInfo = +export type CheckoutRequestInfo = | "name" | "email" | "address" diff --git a/packages/commerce/src/index.ts b/packages/commerce/src/index.ts index 88e1830..0a0e461 100644 --- a/packages/commerce/src/index.ts +++ b/packages/commerce/src/index.ts @@ -14,8 +14,11 @@ export type { export { createCheckout, getCheckout, getCheckouts } from "./checkout"; export type { CheckoutPricingType, + CheckoutRequestInfo, CreateCheckoutParameters, CreateCheckoutResponse, + GetCheckoutResponse, + GetCheckoutsResponse, } from "./checkout"; export { getEvent, getEvents } from "./events"; export type { Event, GetEventResponse, GetEventsResponse } from "./events";