UNPKG

@namcaodev/postman-codegen

Version:

Auto generate all file typescript, query options, mutation options of tanstack query from postman json

32 lines (31 loc) 840 B
import { GenerateTypeEnum } from "./schema"; export declare const enum CONFIG_ARGS_NAME { PLOP_ACTION = "generate-queries", GENERATE_ZOD_SCHEMA = "generate-zod-schema" } export interface PostmanFormData { key: string; type: string; value: string; } export interface APIData { method: string; formdata: PostmanFormData[] | null; rawBodyRequest: unknown | null; queryParams: PostmanFormData[] | null; response: unknown | null; url: string; } export interface PlopActionDataParams { generateType: GenerateTypeEnum; name: string; queryParamsType?: string; responseType: string; apiPath: string; infiniteQueryName?: string; hasItems?: boolean; method: string; isGenerateZod?: boolean; fetcher: string; template?: 'query' | 'queryWithParams' | 'mutation'; }