@eleven-am/nestjs-storage
Version:
A NestJS module for uploading files to cloud storage providers
18 lines (17 loc) • 673 B
TypeScript
import { ZodType } from 'zod';
export type Method = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
type PrimitiveType = string | number | boolean | null | undefined | unknown;
type Headers = Record<string, string>;
type Body = Record<string, any> | string | null;
type Query = Record<string, PrimitiveType | PrimitiveType[]>;
export type FetchType = typeof fetch;
export interface MakeRequest {
method: Method;
headers?: Headers;
body?: Body;
query?: Query;
address: string;
abortSignal?: AbortSignal;
}
export declare function makeRequest<DataType>(params: MakeRequest, schema?: ZodType<DataType>): Promise<DataType>;
export {};