import { z } from 'zod'; import { API } from '../structures/api'; import type { RouteMethod } from './common'; import type { GetSchemaType } from './schema'; /** * Check if a response schema exists for a given method */ type HasResponseSchema = V extends { [K in M]: { response: z.ZodTypeAny; }; } ? true : false; /** * API type with deprecated send method (when sendTyped is available) */ type APIDeprecatedSend = Omit, 'send'> & { /** * @deprecated Use sendTyped instead for type-safe responses when a response schema is defined */ send(data?: any, options?: { error?: boolean; status?: number; code?: string; message?: string; }): never; }; /** * Conditional API type that includes sendTyped only when response schema exists */ export type ConditionalAPI = HasResponseSchema extends true ? APIDeprecatedSend, GetSchemaType, GetSchemaType, GetSchemaType, TAuth, TServices, GetSchemaType> : Omit, GetSchemaType, GetSchemaType, GetSchemaType, TAuth, TServices, GetSchemaType>, 'sendTyped'>; export {}; //# sourceMappingURL=api.d.ts.map