mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
fixed to use hooks
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user