fixed to use hooks

This commit is contained in:
2026-01-28 20:06:39 +00:00
parent 260d0558ef
commit 99987e35bb
16 changed files with 270 additions and 175 deletions

View File

@@ -3,6 +3,10 @@ import { z } from "zod";
import {
ApiErrorSchema,
AuthResponseSchema,
CreateCheckoutSessionRequestSchema,
CreateCheckoutSessionResponseSchema,
CreatePortalSessionResponseSchema,
GetSubscriptionResponseSchema,
IssueByIdQuerySchema,
IssueCommentCreateRequestSchema,
IssueCommentDeleteRequestSchema,
@@ -600,6 +604,38 @@ export const apiContract = c.router({
200: z.array(timerListItemResponseSchema),
},
},
subscriptionCreateCheckoutSession: {
method: "POST",
path: "/subscription/create-checkout-session",
body: CreateCheckoutSessionRequestSchema,
responses: {
200: CreateCheckoutSessionResponseSchema,
400: ApiErrorSchema,
404: ApiErrorSchema,
500: ApiErrorSchema,
},
headers: csrfHeaderSchema,
},
subscriptionCreatePortalSession: {
method: "POST",
path: "/subscription/create-portal-session",
body: emptyBodySchema,
responses: {
200: CreatePortalSessionResponseSchema,
404: ApiErrorSchema,
500: ApiErrorSchema,
},
headers: csrfHeaderSchema,
},
subscriptionGet: {
method: "GET",
path: "/subscription/get",
responses: {
200: GetSubscriptionResponseSchema,
500: ApiErrorSchema,
},
},
});
export type ApiContract = typeof apiContract;