import { z } from 'zod'; /* v8 ignore start */ export type SpecifyAuthenticationStrategy = 'personalAccessToken' | 'none'; export type PublicHttpRouteDefinition< ResponseBodySchema extends z.ZodObject | z.ZodArray, AuthenticationStrategy extends SpecifyAuthenticationStrategy, ParamsSchema extends z.ZodObject | undefined, ReqBodySchema extends z.ZodObject | undefined, > = { authenticationStrategy: AuthenticationStrategy; httpMethod: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; makeRoute: (options?: ParamsSchema extends z.ZodType ? z.infer : never) => string; responsePayloadSchema: ResponseBodySchema; paramsSchema?: ParamsSchema; requestBodySchema?: ReqBodySchema; }; export function createPublicHttpRouteDefinition< ResponseBodySchema extends z.ZodObject | z.ZodArray, AuthenticationStrategy extends SpecifyAuthenticationStrategy, ParamsSchema extends z.ZodObject | undefined = undefined, ReqBodySchema extends z.ZodObject | undefined = undefined, >(options: { authenticationStrategy: AuthenticationStrategy; httpMethod: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; makeRoute: (options?: ParamsSchema extends z.ZodType ? z.infer : never) => string; responsePayloadSchema: ResponseBodySchema; paramsSchema?: ParamsSchema; requestBodySchema?: ReqBodySchema; }): PublicHttpRouteDefinition< ResponseBodySchema, AuthenticationStrategy, ParamsSchema, ReqBodySchema > { return { authenticationStrategy: options.authenticationStrategy, httpMethod: options.httpMethod, makeRoute: options.makeRoute, responsePayloadSchema: options.responsePayloadSchema, paramsSchema: options.paramsSchema, requestBodySchema: options.requestBodySchema, }; } /* v8 ignore stop */