From ab61a1789acdbc3dbc23c9a0432f9e36c1f31b9e Mon Sep 17 00:00:00 2001 From: roushou Date: Mon, 8 Jul 2024 23:04:25 +0700 Subject: [PATCH] fix(ui): export Checkout types --- .changeset/hip-squids-rhyme.md | 5 +++++ packages/commerce/src/checkout.ts | 6 +++--- packages/commerce/src/index.ts | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changeset/hip-squids-rhyme.md 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";