diff --git a/package.json b/package.json index 252a0fb..414a82c 100644 --- a/package.json +++ b/package.json @@ -43,5 +43,5 @@ "peerDependencies": { "typescript": "^5.6.2" }, - "version": "0.1.24" + "version": "0.1.25" } \ No newline at end of file diff --git a/src/lib/buy/index.tsx b/src/lib/buy/index.tsx index 4d62f8a..d03ce93 100644 --- a/src/lib/buy/index.tsx +++ b/src/lib/buy/index.tsx @@ -660,7 +660,17 @@ export async function getQuote(options: QuoteOptions) { ); } - return data.quote; + if (!data.quote) { + return null; + } + + return { + ...data.quote, + price: Number(data.quote.price), + quantity: Number(data.quote.quantity), + start_at: data.quote.start_at, + end_at: data.quote.end_at, + } } export async function getOrder(orderId: string) { diff --git a/src/lib/clusters/clusters.tsx b/src/lib/clusters/clusters.tsx index 81a2690..ab5a837 100644 --- a/src/lib/clusters/clusters.tsx +++ b/src/lib/clusters/clusters.tsx @@ -364,7 +364,7 @@ async function removeClusterUserAction({ }) { const api = await apiClient(token); - const { data, error, response } = await api.DELETE("/v0/credentials/{id}", { + const { data, error, response } = await api.DELETE("/v0/credentials/{id}" as any, { params: { path: { id, diff --git a/src/lib/updown.tsx b/src/lib/updown.tsx index 513bc48..a0da3a6 100644 --- a/src/lib/updown.tsx +++ b/src/lib/updown.tsx @@ -406,8 +406,10 @@ async function getDefaultProcurementOptions(props: { const quote = await getQuote({ instanceType: type, quantity: nodesRequired, - startsAt: new Date(), - durationSeconds: durationHours * 3600, + minStartTime: new Date(), + maxStartTime: new Date(), + minDurationSeconds: durationHours * 3600, + maxDurationSeconds: durationHours * 3600 + 3600, }); let quotePricePerNodeHourInCents: number;