{"version":3,"sources":["../src/cli.ts","../src/config/index.ts","../src/config/store/store.ts","../src/func/Save/save.ts","../src/ssl/get.ts","../src/utils/axios/index.ts","../src/scripts/GetDefinationsAndSave/index.ts","../src/scripts/CreateFolderStructure/index.ts","../src/scripts/CreateTypes/index.ts","../src/func/MethodIterator/index.ts","../src/func/PathMapper/index.ts","../src/types.ts","../src/helper/index.ts","../src/func/Typescript/TypeNameMaker/index.ts","../src/scripts/CreateTypes/Declaration/declaration.ts","../src/func/Typescript/InterfaceMaker/index.ts","../src/func/Typescript/peer/index.ts","../src/func/SchemaMapper/index.ts","../src/func/EnumMapper/index.ts","../src/scripts/CreateTypes/CreateAsyncComponentType/getEnumAsyncType.mts","../src/scripts/CreateTypes/CreateAsyncComponentType/getPremitiveAsyncType.mts","../src/scripts/CreateTypes/CreateAsyncComponentType/refrenceTreatAsync.mts","../src/scripts/CreateTypes/CreateAsyncComponentType/warnComponent.mts","../src/data/collections.ts","../src/func/Typescript/TypeMaker/index.ts","../src/scripts/CreateTypes/CreateAsyncComponentType/componentMediaOrRef.mts","../src/scripts/CreateTypes/CreateAsyncComponentType/AsyncRecursiveComponent.mts","../src/scripts/CreateTypes/CreateAsyncGlobalType/Method/Request/params/createAsyncHeaderType.ts","../src/scripts/CreateTypes/CreateAsyncGlobalType/Method/Request/params/createAsyncParameterType.ts","../src/func/contentMapper/index.ts","../src/scripts/CreateTypes/CreateAsyncGlobalType/Method/Request/body/createAsyncRequestBodyType.ts","../src/scripts/CreateTypes/CreateAsyncGlobalType/Method/Request/CreateAsyncTypeRequest.ts","../src/scripts/CreateTypes/CreateAsyncGlobalType/Method/Response/createAsyncResponseModel.ts","../src/func/responsesMapper/index.ts","../src/scripts/CreateTypes/CreateAsyncGlobalType/Method/Errors/methodHasErrorOrResAsync.mts","../src/scripts/CreateTypes/CreateAsyncGlobalType/Method/Errors/CreateAsyncTypeError.mts","../src/scripts/CreateTypes/CreateAsyncGlobalType/Method/Response/CreateAsyncTypeResponse.ts","../src/scripts/CreateTypes/CreateAsyncGlobalType/Method/CreateAsyncTypeMethod.ts","../src/scripts/CreateTypes/CreateAsyncGlobalType/index.ts","../src/scripts/CreateTypes/CreateAsyncComponentType/index.mts","../src/scripts/CreateHttpClient/index.ts","../src/scripts/CreateHttpClient/httpClientTemplate.ts","../src/scripts/CreateFetcherClass/index.ts","../src/scripts/CreateFetcherClass/fetcherTemplate.ts","../src/scripts/CreateHooks/index.ts","../src/scripts/CreateHooks/swrTemplate.ts","../src/scripts/CreateHooks/ReactQueryTemplate.ts","../src/scripts/CreateHooks/ngTemplate.ts","../src/scripts/CreateHooks/HooksTemplate.ts"],"sourcesContent":["#! /usr/bin/env node\n/* eslint-disable node/no-unsupported-features/node-builtins */\nimport {getConfig} from './config/index.ts';\nimport ora from 'ora';\nimport {getDefinationsAndSave} from './scripts/GetDefinationsAndSave/index.ts';\nimport {createFolderStructure} from './scripts/CreateFolderStructure/index.ts';\n\nimport chalk from 'chalk';\nimport {createTypes} from './scripts/CreateTypes/index.ts';\nimport {createHttpClient} from './scripts/CreateHttpClient/index.ts';\nimport {createFetcherClass} from './scripts/CreateFetcherClass/index.ts';\nimport {createHooks} from './scripts/CreateHooks/index.ts';\nconst spinner = ora('Code Gen').info();\n\nasync function codeGen() {\n  spinner.start();\n\n  const configs = await getConfig();\n  if (configs) {\n    console.table(configs);\n    const definations = await getDefinationsAndSave();\n    await createFolderStructure(definations);\n    await createTypes(definations);\n    await createHttpClient(definations);\n    await createFetcherClass(definations);\n    await createHooks(definations);\n    spinner.succeed();\n  } else {\n    spinner.fail();\n    console.error(chalk.red(' └ No baseUrl detected!'));\n  }\n}\n\nexport default codeGen();\n","import chalk from 'chalk';\nimport ora from 'ora';\nimport {cosmiconfig} from 'cosmiconfig';\nimport {IConfig} from '../types.ts';\nimport {ConfigStore} from './store/store.ts';\nconst spinner = ora('get hookgenrc config file');\nconst explorer = () => cosmiconfig('hookgenrc');\n// eslint-disable-next-line prefer-const\nexport let configStore: ConfigStore | undefined = undefined;\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n//@ts-ignore\nexport async function getConfig(): Promise<IConfig | undefined> {\n  spinner.start();\n  try {\n    const configFile = await explorer().load('./hookgenrc.json');\n    if (configFile?.isEmpty) {\n      spinner.warn();\n      console.warn(chalk.yellow(' └ codegen file is empty!'));\n      return Promise.resolve(undefined);\n    } else {\n      spinner.succeed();\n      configStore = new ConfigStore(configFile?.config as IConfig);\n      return configFile?.config as IConfig;\n    }\n  } catch (error) {\n    spinner.fail();\n    console.error(\n      chalk.bgRedBright(error ? error : ' └ Error get config file')\n    );\n    throw new Error(\n      chalk.bgRedBright(error ? error : ' └ Error get config file')\n    );\n  }\n}\n","import {IConfig, fileTypes, fileTypesEnum} from '../../types.ts';\n\nexport class ConfigStore implements IConfig {\n  public baseUrl;\n  public hook?: 'SWR' | 'ReactQuery' | 'NG';\n  public outDir;\n  public prettier?;\n  public singleJson = false;\n  public filter?;\n  public resourcePick?: string | undefined;\n  public archive?: boolean;\n  public definition = '';\n  public fileTypes: {[key in fileTypesEnum]: fileTypes} = {\n    enums: 'ts',\n    types: 'd.ts',\n    client: 'ts',\n    api: 'ts',\n    hook: 'ts',\n  };\n  constructor({\n    baseUrl,\n    outDir,\n    prettier,\n    filter,\n    hook,\n    fileTypes,\n    resourcePick,\n    archive,\n    singleJson = false,\n  }: IConfig) {\n    this.baseUrl = baseUrl;\n    this.outDir = outDir;\n    this.outDir = outDir;\n    this.resourcePick = resourcePick;\n    this.hook = hook;\n    this.singleJson = singleJson;\n    this.archive = archive;\n    this.prettier = prettier;\n    this.fileTypes = fileTypes ? fileTypes : this.fileTypes;\n    this.filter = filter && new RegExp(filter);\n  }\n\n  setDefinition(value: string) {\n    this.definition = value;\n  }\n}\n","import {format} from 'prettier';\nimport fs from 'fs';\nimport {configStore} from '../../config/index.ts';\nimport {ISaveBatch, ISaveFile} from '../../types.ts';\nimport ora from 'ora';\nimport chalk from 'chalk';\nimport makeDir from 'make-dir';\n\nconst writeFs = async ({\n  data,\n  fileName,\n  location,\n}: ISaveFile): Promise<fs.WriteStream> => {\n  // eslint-disable-next-line no-async-promise-executor\n  return new Promise(async (resolve, reject) => {\n    const dir = await makeDir(location);\n    if (dir) {\n      const file = fs\n        .createWriteStream(location + '/' + fileName)\n        .once('open', () => {\n          file.write(data);\n          file.end();\n        })\n        .once('error', error => {\n          reject(error);\n        })\n        .once('finish', () => {\n          resolve(file);\n        });\n    }\n  });\n};\n\nconst getPrettierFileData = async (\n  data: unknown,\n  beautify = true\n): Promise<string> => {\n  if (beautify) {\n    const beauty = await format(`${data}`, configStore?.prettier);\n    return `${beauty}`;\n  }\n  return `${data}`;\n};\n\nexport async function save({\n  fileName,\n  data,\n  location,\n  beautify,\n  extention,\n  comment,\n}: ISaveFile) {\n  if (data) {\n    const spinner = ora(\n      chalk.gray(' ├ Saving :\"' + fileName + '\" in :\"' + location + '\"')\n    );\n    try {\n      const fileData = await getPrettierFileData(data, beautify);\n      const dataStr = comment ? `\\n /* ${comment} */\\n` + fileData : fileData;\n      await writeFs({\n        data: dataStr,\n        fileName: fileName + extention,\n        location: configStore?.outDir + '/' + location,\n      });\n      spinner.succeed();\n    } catch (error) {\n      spinner.fail();\n      console.error(chalk.redBright(' └ ' + error));\n    }\n  }\n}\n\nexport function saveBatch({files, location, beautify, extention}: ISaveBatch) {\n  const promisses = files.map(file => {\n    if (file.data.length) {\n      return save({\n        data: file.data,\n        fileName: file.name,\n        beautify,\n        location,\n        extention,\n        comment: file.comment,\n      });\n    } else {\n      return null;\n      // console.warn(\n      //   chalk.green(\n      //     ` └ ${file.name} in ${location} not saved duo to empty string! `\n      //   )\n      // );\n    }\n  });\n  return Promise.all(promisses);\n}\n","import {\n  IGetFromSwaggerRootHtml,\n  IGetSwaggerDefenitions,\n  ISwaggerRootHtml,\n  Spec,\n} from '../types.ts';\nimport ora from 'ora';\nimport chalk from 'chalk';\nimport Axios from '../utils/axios/index.ts';\n\nexport async function getFromSwaggerRootHtml({\n  baseUrl,\n  sslConfiguredAgent,\n}: IGetFromSwaggerRootHtml): Promise<ISwaggerRootHtml> {\n  const info = ora('get Swagger defination lists').info().start();\n\n  const {data} = await Axios.request<string>({\n    url: baseUrl,\n    method: 'get',\n    headers: {\n      'content-type': 'application/json',\n    },\n    httpsAgent: sslConfiguredAgent,\n  });\n\n  try {\n    const regex = /\"urls\":\\[.*\\]/g;\n    const listRegExpMatchArray = data.match(regex);\n    const result = '{' + listRegExpMatchArray + '}';\n    info.text = '└ get Swagger defination lists';\n    info.succeed();\n    return JSON.parse(result);\n  } catch (error) {\n    info.fail();\n    info.text = '└ get Swagger defination lists';\n    throw new Error('can not done \"get Swagger defination lists\"! ');\n  }\n}\n\nexport async function getSwaggerSchemaJsons({\n  requests,\n  sslConfiguredAgent,\n}: IGetSwaggerDefenitions) {\n  const REQ_Header = {\n    headers: {\n      'content-type': 'application/json',\n    },\n    httpsAgent: sslConfiguredAgent,\n  };\n\n  const spinner = ora('get Swagger definations Schemas').info();\n  spinner.start();\n  try {\n    const responses = await Axios.all<Spec>(\n      requests.map(endpoint =>\n        Axios.get(endpoint, REQ_Header)\n          .then(res => {\n            if (res.data.paths) {\n              return res.data;\n            } else {\n              console.warn(\n                chalk.yellow(\n                  ' └ Warning: checking endpoint:' +\n                    endpoint +\n                    ' !! is it empty?'\n                )\n              );\n              return res.data;\n            }\n          })\n          .catch(() => {\n            throw new Error('error geting json with address:' + endpoint);\n          })\n      )\n    );\n    if (responses) {\n      spinner.text = '└ get Swagger definations Schemas';\n      spinner.succeed();\n      return responses;\n    } else {\n      throw new Error('no responses');\n    }\n  } catch (error) {\n    spinner.text = '└ get Swagger definations Schemas';\n    spinner.fail();\n    throw new Error(\n      chalk.bgRedBright(\n        error ? error : 'can not done \"get Swagger definations Schemas\"! '\n      )\n    );\n  }\n}\n","import axios, {\n  AxiosError,\n  AxiosResponse,\n  InternalAxiosRequestConfig,\n} from 'axios';\nimport ora from 'ora';\nimport chalk from 'chalk';\nimport {Spec, Spins} from '../../types.ts';\n\naxios.defaults.paramsSerializer = {\n  indexes: null,\n};\n\nconst spins: Spins[] = [];\n\n/** configration for api request like header authorization  */\nconst configAxiosRequest = (\n  config: InternalAxiosRequestConfig<unknown>\n): InternalAxiosRequestConfig<unknown> => {\n  const spinner = ora('axios get');\n  spinner.text = '├ axios get :' + config.url;\n  spinner.start();\n  spins.push({id: config.url, spinner: spinner});\n  return config;\n};\n\n/** this situation happen when request does not even send to network or internet */\nconst onAxiosRequestError = (error: AxiosError): Promise<AxiosError> => {\n  const spinner = spins.find(\n    spinObj => spinObj.id === error?.config?.url\n  )?.spinner;\n  spinner?.fail();\n  return Promise.reject(error);\n};\n\n/** handle Response of api response  */\nconst onAxiosResponse = (response: AxiosResponse<Spec>): AxiosResponse => {\n  const spinner = spins.find(\n    spinObj => spinObj.id === response.config.url\n  )?.spinner;\n  spinner?.succeed();\n  return response;\n};\n\n/** handle api response errors */\nconst onAxiosResponseError = (error: AxiosError): Promise<AxiosError> => {\n  try {\n    const spinner = spins.find(\n      spinObj => spinObj.id === error?.config?.url\n    )?.spinner;\n    spinner?.fail();\n    if (error.response) {\n      console.warn(\n        chalk.redBright(\n          ' └ Error axios get with code :' + error.response.status\n        )\n      );\n      /** this situation happen when request return a response with error object that contain a status code */\n      // responseHandler(error.response.status)(error);\n    } else if (error.request) {\n      /** this situation happen when request does not return means that request fail duo to network error or sth like that */\n      console.warn(chalk.redBright(' └ check your network Connection'));\n    } else {\n      console.error(chalk.redBright(' └ Error axios get ', error.message));\n    }\n    throw new Error(error.message);\n  } catch (error) {\n    console.error(chalk.redBright(' └ Error axios get:', error));\n    return Promise.reject(error);\n  }\n};\n\n/** handle axios response for errors and etc.. */\naxios.interceptors.response.use(onAxiosResponse, onAxiosResponseError);\n/** set axios request's header configration like autorization */\naxios.interceptors.request.use(configAxiosRequest, onAxiosRequestError);\n\nexport default axios;\n","import {configStore} from '../../config/index.ts';\nimport {saveBatch} from '../../func/Save/save.ts';\nimport {getFromSwaggerRootHtml, getSwaggerSchemaJsons} from '../../ssl/get.ts';\nimport {} from '../../config/index.ts';\nimport {URL} from '../../types.ts';\n\nexport async function getDefinationsAndSave() {\n  let promisses: string[] = [];\n  function regFilter(item: URL): URL | null {\n    if (!configStore?.filter) {\n      return item;\n    }\n    const res = configStore?.filter?.test(item.url) ? null : item;\n    return res;\n  }\n  if (!configStore?.singleJson) {\n    const Swaggerlist = await getFromSwaggerRootHtml({\n      baseUrl: configStore?.baseUrl + '/swagger/index.html',\n    });\n\n    promisses = Swaggerlist.urls\n      .filter(item => regFilter(item))\n      .map(item => {\n        return configStore?.baseUrl + item.url;\n      });\n  } else {\n    promisses = [configStore?.baseUrl];\n  }\n\n  const jsonsSchemas = await getSwaggerSchemaJsons({requests: promisses});\n\n  const fileTosave = jsonsSchemas.map(data => ({\n    data: JSON.stringify(data),\n    name: data.info.title + '.' + data.info.version,\n  }));\n  configStore?.archive &&\n    (await saveBatch({\n      location: 'archive/',\n      beautify: false,\n      extention: '.json',\n      files: fileTosave,\n    }));\n\n  return jsonsSchemas;\n}\n","import makeDir from 'make-dir';\nimport {configStore} from '../../config/index.ts';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport {Spec} from '../../types.ts';\n\nexport async function createFolderStructure(schema: Spec[]) {\n  return new Promise<'done' | 'error'>(resolve => {\n    let hasError: 'done' | 'error' = 'done';\n\n    schema.forEach(defination => {\n      const spinner = ora(\n        chalk.gray(\n          ' ├ Create folder: \"' +\n            defination.info.title +\n            '_' +\n            defination.info.version +\n            '\"'\n        )\n      );\n      makeDir(\n        configStore?.outDir +\n          '/' +\n          defination.info.title +\n          '_' +\n          defination.info.version\n      )\n        .catch(error => {\n          spinner.fail();\n          console.error(chalk.redBright(' └ ' + error));\n          hasError = 'error';\n        })\n        .then(() => {\n          spinner.succeed();\n        });\n    });\n    resolve(hasError);\n  });\n}\n","/* eslint-disable no-async-promise-executor */\nimport ora from 'ora';\nimport {Spec} from '../../types.ts';\nimport chalk from 'chalk';\n// import {CreateAsyncPathes} from './createPathAsync/index.mts';\nimport {CreateAsyncGlobalType} from './CreateAsyncGlobalType/index.ts';\nimport {save} from '../../func/Save/save.ts';\nimport {definitionFullName, getDefinationComment} from '../../helper/index.ts';\n// import {CreateAsyncComponentType} from './CreateAsyncComponentType/index.mts';\nimport {CreateAsyncComponentType} from './CreateAsyncComponentType/index.mts';\nimport {configStore} from '../../config/index.ts';\nconst commonNg = `interface ICOMMNON {\n  data?: any;\n  params?: any;\n  header?: any;\n}`;\nconst commonNever = `interface ICOMMNON {\n  data?: Record<PropertyKey, never>;\n  params?: Record<PropertyKey, never>;\n  header?: Record<PropertyKey, never>;\n}`;\nexport async function createTypes(definations: Spec[]) {\n  const common = configStore?.hook === 'NG' ? commonNg : commonNever;\n  return new Promise<'done' | 'error'>(async resolve => {\n    let hasError: 'done' | 'error' = 'done';\n    const spinner = ora('Create Types').info();\n    try {\n      const definationPromisses = definations.map(defination => {\n        return new Promise<string>(async resolve => {\n          spinner.text = 'Create Types:' + defination.info.title;\n          //\n          const [component, enums] = await CreateAsyncComponentType(defination);\n          const types = await CreateAsyncGlobalType(defination);\n          await save({\n            data: common + types,\n            fileName: 'index',\n            location: definitionFullName(defination) + '/types',\n            extention: '.' + configStore?.fileTypes.types,\n            comment: getDefinationComment(defination),\n          });\n          await save({\n            data: component,\n            fileName: 'type',\n            location: definitionFullName(defination) + '/types',\n            extention: '.' + configStore?.fileTypes.types,\n            comment: getDefinationComment(defination),\n          });\n          await save({\n            data: enums,\n            fileName: 'index',\n            location: definitionFullName(defination) + '/enums',\n            extention: '.' + configStore?.fileTypes.enums,\n            comment: getDefinationComment(defination),\n          });\n\n          //\n          spinner.clear();\n          resolve(types);\n        });\n      });\n      await Promise.all(definationPromisses);\n\n      resolve(hasError);\n    } catch (error) {\n      spinner.fail();\n      hasError = 'error';\n      console.error(chalk.redBright(' └ ' + error));\n    }\n    spinner.text = 'Create Types';\n    hasError === 'done' && spinner.succeed();\n    resolve(hasError);\n  });\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport chalk from 'chalk';\n\ntype PathItemObject = OpenAPIV3.PathItemObject;\ntype IMethod = Omit<\n  PathItemObject,\n  '$ref' | 'description' | 'parameters' | 'servers' | 'summary'\n>;\n\nexport interface MethodIterator {\n  objectName: string;\n  objectMethod: OpenAPIV3.OperationObject;\n}\nexport function MethodIterator(Method: IMethod | undefined) {\n  if (!Method) {\n    console.warn(\n      chalk.yellow(\n        ' └ Path Object must be include at least one method but it is undefined!'\n      )\n    );\n    return;\n  }\n  const entries = Object.entries(Method);\n  const object = entries.map(cur => {\n    return {\n      objectName: cur[0],\n      objectMethod: cur[1] as OpenAPIV3.OperationObject,\n    };\n  });\n\n  return object;\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport chalk from 'chalk';\n\ntype PathItemObject = OpenAPIV3.PathItemObject;\nexport interface IPathIterator {\n  objectName: string;\n  objectPath: PathItemObject;\n}\nexport function PathIterator(Path: PathItemObject) {\n  if (!Path) {\n    console.warn(\n      chalk.yellow(\n        ' └ Defination Object must be include at least one Path but it is undefined!'\n      )\n    );\n    return;\n  }\n  const entries = Object.entries(Path);\n  const object = entries.map(cur => {\n    return {\n      objectName: cur[0],\n      objectPath: cur[1] as PathItemObject,\n    };\n  });\n\n  return object;\n}\n","import {Options} from 'prettier';\nimport {Agent} from 'https';\nimport {OpenAPIV3} from 'openapi-types';\nimport {Ora} from 'ora';\n\nexport type Spec = OpenAPIV3.Document;\nexport interface IGetFromSwaggerRootHtml {\n  /**\n   * Get Root url of swagger and get list of scopes jsons.\n   *\n   * @param baseUrl - YOUR_BASE_URL\n   */\n  baseUrl: string;\n  sslConfiguredAgent?: Agent;\n}\nexport interface IGetSwaggerDefenitions {\n  requests: string[];\n  sslConfiguredAgent?: Agent;\n}\n\nexport interface ISwaggerRootHtml {\n  urls: URL[];\n  deepLinking: boolean;\n  persistAuthorization: boolean;\n  displayOperationId: boolean;\n  defaultModelsExpandDepth: number;\n  defaultModelExpandDepth: number;\n  defaultModelRendering: string;\n  displayRequestDuration: boolean;\n  docExpansion: string;\n  showExtensions: boolean;\n  showCommonExtensions: boolean;\n  supportedSubmitMethods: string[];\n}\n\nexport interface URL {\n  url: string;\n  name: string;\n}\nexport type fileTypes = 'mts' | 'ts' | 'd.ts' | 'md' | 'tsx';\nexport enum fileTypesEnum {\n  enums = 'enums',\n  types = 'types',\n  client = 'client',\n  api = 'api',\n  hook = 'hook',\n}\nexport interface IConfig {\n  baseUrl: string;\n  outDir: string;\n  archive?: boolean;\n  prettier?: Options;\n  resourcePick?: string;\n  filter?: RegExp;\n  singleJson?: boolean;\n  hook?: 'SWR' | 'ReactQuery' | 'NG';\n  fileTypes?: {[key in fileTypesEnum]: fileTypes};\n}\n\nexport interface ISaveFile {\n  fileName: string;\n  location: string;\n  data: unknown;\n  extention?: string;\n  beautify?: boolean;\n  comment?: string;\n}\nexport interface ISaveBatch {\n  files: {name: string; data: string; extention?: string; comment?: string}[];\n  location: string;\n  beautify?: boolean;\n  extention?: string;\n}\nexport type IOpenApiComponent =\n  | OpenAPIV3.ReferenceObject\n  | OpenAPIV3.SchemaObject;\nexport type ComponentSchema =\n  | {\n      objectName: string;\n      objectSchema: IOpenApiComponent;\n    }[]\n  | undefined;\n\nexport interface ICreateComponentSchemas {}\n\nexport function isReference(\n  schemaObject: IOpenApiComponent\n): schemaObject is OpenAPIV3.ReferenceObject {\n  return (schemaObject as OpenAPIV3.ReferenceObject).$ref !== undefined;\n}\n\nexport function isArraySchemaObject(\n  schemaObject: OpenAPIV3.ArraySchemaObject | OpenAPIV3.NonArraySchemaObject\n): schemaObject is OpenAPIV3.ArraySchemaObject {\n  return (schemaObject as OpenAPIV3.ArraySchemaObject).items !== undefined;\n}\n\nexport interface Spins {\n  id?: string;\n  spinner: Ora;\n}\n\nexport interface IRecursiveArraySchema {\n  /*\n  *\n  * @example:  properties?: {\n            [name: string]: ReferenceObject | SchemaObject;\n        };\n  */\n  component: OpenAPIV3.SchemaObject;\n  name: string;\n}\nexport interface IRecursiveComponentSchema {\n  /*\n  *\n  * @example:  properties?: {\n            [name: string]: ReferenceObject | SchemaObject;\n        };\n  */\n  component?: IOpenApiComponent;\n  name: string;\n}\n\nexport function isReferenceOrParameter(\n  object: OpenAPIV3.ParameterObject | OpenAPIV3.ReferenceObject\n): object is OpenAPIV3.ReferenceObject {\n  return (object as OpenAPIV3.ReferenceObject).$ref !== undefined;\n}\n\nexport interface ICreateParameter {\n  parameters?: (OpenAPIV3.ReferenceObject | OpenAPIV3.ParameterObject)[];\n  pathName: string;\n  methodType: string;\n}\n\nexport function isReferenceOrRequestBody(\n  object: OpenAPIV3.RequestBodyObject | OpenAPIV3.ReferenceObject\n): object is OpenAPIV3.ReferenceObject {\n  return (object as OpenAPIV3.ReferenceObject).$ref !== undefined;\n}\nexport function isReferenceOrResponse(\n  object: OpenAPIV3.ResponseObject | OpenAPIV3.ReferenceObject\n): object is OpenAPIV3.ReferenceObject {\n  return (object as OpenAPIV3.ReferenceObject).$ref !== undefined;\n}\n\nexport interface ICreateRequestBody {\n  requestBody?: OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject;\n  pathName: string;\n  methodType: string;\n}\n\nexport interface ICreateResponse {\n  response: OpenAPIV3.ReferenceObject | OpenAPIV3.ResponseObject;\n  pathName: string;\n  methodType: string;\n  status: 'Ok' | 'Bad';\n}\n\nexport type ISchema = {[key: string]: IOpenApiComponent};\n\nexport type HttpMethodsUpperCase =\n  | 'Get'\n  | 'Put'\n  | 'Post'\n  | 'Delete'\n  | 'Options'\n  | 'Head'\n  | 'Patch';\n\nexport function isInterfaceEmpty(\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  object: {} | {[key: string]: any}\n): object is {} {\n  return Object.keys(object as {}).length === 0;\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport {typeNameMaker} from '../func/Typescript/TypeNameMaker/index.ts';\nimport {Spec, isReference} from '../types.ts';\nconst repoTypes: string[] = [''];\nexport function capitalize(string: string) {\n  return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexport function camelize(str: string) {\n  return str\n    .replace(/(?:^\\w|[A-Z]|\\b\\w)/g, (word, index) => {\n      return index === 0 ? word.toLowerCase() : word.toUpperCase();\n    })\n    .replace(/\\s+/g, '');\n}\n\nexport const primitiveJs = (\n  key: 'string' | 'number' | 'boolean' | 'integer' | undefined\n) => {\n  switch (key) {\n    case 'integer':\n      return 'number';\n    case 'number':\n      return 'number';\n    case 'boolean':\n      return 'boolean';\n    case 'string':\n      return 'string';\n\n    default:\n      return 'unknown';\n  }\n};\n\nexport const definitionFullName = (defination: Spec) => {\n  return defination.info.title + '_' + defination.info.version;\n};\n\nexport const isDuplication = (name: string, data: string[]): boolean => {\n  const iName = typeNameMaker(name);\n  const include = repoTypes.some(item => item.includes(iName));\n  const dataInclude = data.some(item => item.includes(iName));\n  if (include && dataInclude) {\n    return true;\n  }\n  repoTypes.push(iName);\n  return false;\n};\n\nexport const isNullable = (\n  schema: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject\n): boolean | undefined => {\n  if (!isReference(schema)) {\n    return schema.nullable;\n  }\n  return undefined;\n};\n\nexport const definationComment = (defination: Spec, data: string[][]) => {\n  data.forEach(fileData => {\n    fileData.push(\n      `\\n/* ${defination.info.title} - ${defination.info.version} */\\n`\n    );\n  });\n};\nexport const getDefinationComment = (defination: Spec) => {\n  return ` ${defination.info.title} - ${defination.info.version}`;\n};\n\nexport function statusString(status: string) {\n  const okReg = /2\\d\\d/g;\n  const badReg = /400/g;\n  if (okReg.test(status)) {\n    return 'Ok';\n  }\n\n  if (badReg) {\n    return 'Bad';\n  }\n\n  return;\n}\n\nexport const pathSplit = (path: string) => {\n  const reg = /\\/{\\w*}/g;\n  const regBracketsParams = /{(.*?)}/g;\n  const refinePath = path.replace(reg, '');\n\n  const bracketsParams = path\n    .match(regBracketsParams)\n    ?.map(params => {\n      const name = params.replace(/{|}/g, '');\n      return 'By' + capitalize(name);\n    })\n    .join('');\n\n  const pathScope = refinePath.split('/') as string[];\n  const definationName = pathScope[1] as string;\n  const scopeName = pathScope[3] as string;\n  const itemName =\n    (((pathScope[pathScope.length - 1] as string) +\n      capitalize(pathScope[pathScope.length - 2])) as string) +\n    (bracketsParams || '');\n\n  return {pathScope, definationName, scopeName, itemName};\n};\n","import {camelize, capitalize} from '../../../helper/index.ts';\n\nexport function typeNameMaker(name: string, extra = 'Set') {\n  return 'I' + camelCase(name) + extra;\n}\nexport function typeNameSpaceMaker(\n  name: string,\n  namespace: string,\n  extra = 'Set'\n) {\n  return (\n    namespace + '.I' + capitalize(camelize(nameRefineWithDot(name))) + extra\n  );\n}\n\nexport function nameRefine(name: string) {\n  const reg = /[^a-zA-Z0-9]/g;\n\n  return name.toString().replace(reg, '');\n}\nexport function nameRefineWithDot(name: string) {\n  const reg = /[^a-zA-Z0-9.]/g;\n\n  return name.toString().replace(reg, '');\n}\n\nexport function nameStringify(name: string) {\n  return \"'\" + name + \"'\";\n}\n\nexport function camelCase(name: string) {\n  return capitalize(camelize(nameRefine(name)));\n}\n","import {camelCase} from '../../../func/Typescript/TypeNameMaker/index.ts';\n\nexport function wrapDeclartionNameSpace(definationName: string, data: string) {\n  return (\n    `export declare namespace ${camelCase(definationName)} { ` + data + ' } '\n  );\n}\nexport function wrapNameSpace(scopeName: string, data: string) {\n  return `namespace ${camelCase(scopeName)} { ` + data + ' } ';\n}\n","export function interfaceMaker(\n  InterfaceName: string,\n  core: string,\n  extend?: string\n) {\n  if (extend)\n    return (\n      'interface ' +\n      InterfaceName +\n      (extend ? ' extends ' + extend : '') +\n      ' {' +\n      core +\n      '}'\n    );\n  return 'interface ' + InterfaceName + '{' + core + '}';\n}\n","import {nameStringify} from '../TypeNameMaker/index.ts';\n\nexport function peer(\n  name: string,\n  type: string,\n  nullable?: boolean,\n  isArray?: boolean\n) {\n  return (\n    nameStringify(name) +\n    (nullable ? '?:' : ':') +\n    type +\n    (isArray ? '[];' : ';')\n  );\n}\nexport function equal(name: string, type: string) {\n  return name + '=' + nameStringify(type) + ',';\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport chalk from 'chalk';\nimport {ISchema} from '../../types.ts';\n\nexport function schemaIterator(schema: ISchema | undefined) {\n  if (!schema) {\n    console.warn(\n      chalk.yellow(\n        ' └ Component must be include either OpenAPIV3.ReferenceObject or OpenAPIV3.SchemaObject but it is undefined!'\n      )\n    );\n    return;\n  }\n  const entries = Object.entries(schema);\n  const object = entries.map(cur => {\n    return {\n      objectName: cur[0],\n      objectSchema: cur[1] as\n        | OpenAPIV3.ReferenceObject\n        | OpenAPIV3.SchemaObject,\n    };\n  });\n\n  return object;\n}\n","import {camelCase} from '../Typescript/TypeNameMaker/index.ts';\nimport {equal} from '../Typescript/peer/index.ts';\n\nexport function enumMapper(enums: string[]) {\n  const enumsType = '\"' + enums.join('\"|\"') + '\"';\n  return enumsType;\n}\nexport function enumPeer(enums: string[]) {\n  const value = enums.map(e => equal(camelCase(e), e));\n  const enumsType = value.join('');\n  return enumsType;\n}\n","import {enumMapper, enumPeer} from '../../../func/EnumMapper/index.ts';\n\nexport async function getEnumAsyncType(enums: any[]) {\n  return new Promise<[string, string?]>(resolve => {\n    const enumType = enumMapper(enums);\n    const enumValue = enumPeer(enums);\n    resolve([enumType, enumValue]);\n  });\n}\n","import {primitiveJs} from '../../../helper/index.ts';\n\nexport async function getPremitiveAsyncType(\n  type: 'string' | 'number' | 'boolean' | 'integer' | undefined\n) {\n  return new Promise<string>(resolve => {\n    const primitiveValue = primitiveJs(type);\n    resolve(primitiveValue);\n  });\n}\n","export function refrenceTreatAsync(rawRef: string) {\n  const refPath = rawRef.split('/');\n  const ref = refPath[refPath.length - 1];\n  return ref;\n}\n","import chalk from 'chalk';\n\nexport function warnComponent(name: string) {\n  console.warn(\n    chalk.yellow(\n      ' └ \"' +\n        name +\n        '\" dose not have any type! typescript may have problem with this! we set it to \"unknown\"'\n    )\n  );\n}\n","const duplications: string[] = [];\nexport {duplications};\n\nexport function isDuplicate(key: string) {\n  const isDuplicate = duplications.includes(key);\n  if (!isDuplicate) {\n    duplications.push(key);\n  }\n  // return isDuplicate;\n  return false;\n}\n","export function typeMaker(\n  TypeName: string,\n  core: string,\n  object?: boolean,\n  hasExport?: boolean\n) {\n  if (object)\n    return (\n      `${hasExport ? 'export' : ''} type ` + TypeName + '= {' + core + '};'\n    );\n  return `${hasExport ? 'export' : ''} type ` + TypeName + '= ' + core + ';';\n}\n\nexport function enumarateMaker(enumName: string, core: string) {\n  return 'export enum ' + enumName + ' {' + core + '};';\n}\n","import {isDuplicate} from '../../../data/collections.ts';\nimport {interfaceMaker} from '../../../func/Typescript/InterfaceMaker/index.ts';\nimport {peer} from '../../../func/Typescript/peer/index.ts';\nimport {typeMaker} from '../../../func/Typescript/TypeMaker/index.ts';\nimport {typeNameMaker} from '../../../func/Typescript/TypeNameMaker/index.ts';\nimport {IAsyncRecursiveComponentResult} from './AsyncRecursiveComponent.mts';\n\nexport function componentMediaOrRef(\n  component: IAsyncRecursiveComponentResult | null\n) {\n  if (component) {\n    if (component.type === 'REF') {\n      return peer(\n        component.name || '___NoNameREF?',\n        typeNameMaker(component.data[0] || 'noNameREF_PARAM?'),\n        component.nullable,\n        component.isArray\n      );\n    }\n    if (component.type === 'PREM') {\n      return peer(\n        component.name || '___NoNamePREM?',\n        component.data[0],\n        component.nullable,\n        component.isArray\n      );\n    }\n    if (component.type === 'COM_PREM') {\n      return typeMaker(\n        typeNameMaker(component.name || '___NoNameENUM'),\n        component.data[0]\n      );\n    }\n    if (component.type === 'ENUM') {\n      const duplicate = isDuplicate(component.name as string);\n      return !duplicate\n        ? typeMaker(\n            typeNameMaker(component.name || '___NoNameENUM'),\n            component.data[0]\n          )\n        : '';\n    }\n    if (component.type === 'MEDIA') {\n      const duplicate = isDuplicate(component.name as string);\n      return !duplicate\n        ? interfaceMaker(\n            typeNameMaker(component.name || '___NoNameMEDIA'),\n            component.data[0]\n          )\n        : '';\n    }\n    if (component.type === 'MEDIA_TYPE') {\n      const duplicate = isDuplicate(component.name as string);\n      return !duplicate\n        ? typeMaker(\n            typeNameMaker(component.name || '___NoNameMEDIA'),\n            component.data[0]\n          )\n        : '';\n    }\n    if (component.type === 'RECORD') {\n      // const duplicate = isDuplicate(component.name as string);\n      // return !duplicate\n      //   ? typeMaker(\n      //       typeNameMaker(component.name || '___NoNameMEDIA'),\n      //       component.data[0]\n      //     )\n      //   : '';\n\n      if (component.data) {\n        const data = component.data[0] || 'any';\n        const type = `Record<PropertyKey,${data}>`;\n        return peer(\n          component.name || '___NoNamePREM?',\n          type,\n          component.nullable,\n          false\n        );\n      }\n    }\n  }\n  return '';\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport {\n  IOpenApiComponent,\n  isArraySchemaObject,\n  isReference,\n} from '../../../types.ts';\nimport {schemaIterator} from '../../../func/SchemaMapper/index.ts';\nimport {getEnumAsyncType} from './getEnumAsyncType.mts';\nimport {getPremitiveAsyncType} from './getPremitiveAsyncType.mts';\nimport {refrenceTreatAsync} from './refrenceTreatAsync.mts';\nimport {warnComponent} from './warnComponent.mts';\nimport {componentMediaOrRef} from './componentMediaOrRef.mts';\n\nexport interface IAsyncRecursiveComponent {\n  component: OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject | undefined;\n  name?: string;\n  firstLvl?: boolean;\n}\nexport interface IAsyncRecursiveSchema {\n  component: OpenAPIV3.SchemaObject | OpenAPIV3.ReferenceObject | undefined;\n  name: string;\n}\n\nexport type typeKey =\n  | 'REF'\n  | 'MEDIA'\n  | 'ENUM'\n  | 'PREM'\n  | 'ARRAY'\n  | 'MEDIA_TYPE'\n  | 'FORMDATA'\n  | 'COM_PREM'\n  | 'RECORD';\n\nexport interface IAsyncRecursiveComponentResult {\n  data: [string, string?];\n  name?: string;\n  type: typeKey;\n  nullable?: boolean;\n  isArray?: boolean;\n}\nexport function AsyncRecursiveComponent({\n  component,\n  name,\n  firstLvl = false,\n}: IAsyncRecursiveComponent) {\n  return new Promise<IAsyncRecursiveComponentResult | null>(async resolve => {\n    if (component) {\n      if (isReference(component)) {\n        const type = refrenceTreatAsync(component.$ref);\n        resolve({data: [type], type: 'REF', name});\n      } else {\n        if (component.type === undefined) {\n          warnComponent(name as string);\n          resolve({\n            data: ['unknown'],\n            type: 'MEDIA_TYPE',\n            name,\n            nullable: component.nullable,\n          });\n        } else {\n          const data = await recursiveSchemaAsyncType(\n            component,\n            name,\n            firstLvl\n          );\n          resolve({...(data as IAsyncRecursiveComponentResult), name});\n        }\n      }\n    } else {\n      resolve(null);\n    }\n  });\n}\n\nexport async function recursiveSchemaAsyncType(\n  component: OpenAPIV3.SchemaObject,\n  name?: string,\n  firstLvl = false\n) {\n  return new Promise<IAsyncRecursiveComponentResult | null>(\n    async (resolve, reject) => {\n      if (isArraySchemaObject(component)) {\n        const data = await AsyncRecursiveComponent({\n          component: component.items,\n          name: name,\n        });\n        resolve({\n          ...(data as IAsyncRecursiveComponentResult),\n          nullable: component.nullable,\n          isArray: true,\n        });\n      } else {\n        if (component.type === 'object') {\n          if (component.properties) {\n            const data = await ObjectSchemaAsyncComponents(\n              component.properties\n            );\n            resolve({\n              data: [data],\n              type: 'MEDIA',\n              nullable: component.nullable,\n              name: name,\n            });\n          } else if (component.additionalProperties !== undefined) {\n            const data = await ObjectSchemaAsyncComponentsAditional(\n              component.additionalProperties,\n              name\n            );\n            resolve({\n              ...(data as IAsyncRecursiveComponentResult),\n              type: 'RECORD',\n              nullable: component.nullable,\n              name: name,\n            });\n          } else {\n            warnComponent(name as string);\n            resolve({\n              data: ['unknown'],\n              type: 'MEDIA_TYPE',\n              nullable: component.nullable,\n              name: name,\n            });\n          }\n        } else {\n          if (!component.enum) {\n            const premitive = await getPremitiveAsyncType(component.type);\n\n            resolve({\n              data: [premitive],\n              type: firstLvl ? 'COM_PREM' : 'PREM',\n              name: name,\n              nullable: component.nullable,\n            });\n          } else {\n            const enums = await getEnumAsyncType(component.enum);\n            resolve({\n              data: enums,\n              type: 'ENUM',\n              nullable: component.nullable,\n              name: name,\n            });\n          }\n        }\n      }\n    }\n  );\n}\nfunction ObjectSchemaAsyncComponents(\n  properties: Pick<OpenAPIV3.BaseSchemaObject, 'properties'>['properties']\n) {\n  return new Promise<string>(async (resolve, reject) => {\n    const IteratedProperties = schemaIterator(properties);\n    const propertiesPromisses = IteratedProperties?.map(\n      async ({objectName, objectSchema}) => {\n        return await AsyncRecursiveSchema({\n          component: objectSchema,\n          name: objectName,\n        });\n      }\n    );\n\n    if (propertiesPromisses) {\n      const data = await Promise.all(propertiesPromisses);\n      resolve(data.join(''));\n    }\n  });\n}\nfunction ObjectSchemaAsyncComponentsAditional(\n  properties: Pick<\n    OpenAPIV3.BaseSchemaObject,\n    'additionalProperties'\n  >['additionalProperties'],\n  name?: string\n) {\n  return new Promise<IAsyncRecursiveComponentResult | null>(async resolve => {\n    if (properties !== undefined) {\n      if (typeof properties === 'boolean') {\n        resolve({\n          type: 'MEDIA_TYPE',\n          data: ['boolean'],\n          name: name,\n          nullable: true,\n        });\n      } else if (!isReference(properties as IOpenApiComponent)) {\n        const result = await recursiveSchemaAsyncType(\n          properties as OpenAPIV3.SchemaObject,\n          name\n        );\n        resolve(result);\n      }\n    }\n    resolve(null);\n  });\n}\n\nexport function AsyncRecursiveSchema({component, name}: IAsyncRecursiveSchema) {\n  return new Promise<string | null>(async resolve => {\n    if (component) {\n      if (isReference(component)) {\n        const type = refrenceTreatAsync(component.$ref);\n        const data = componentMediaOrRef({data: [type], type: 'REF', name});\n        resolve(data);\n      } else {\n        if (component.type === undefined) {\n          warnComponent(name);\n          const data = componentMediaOrRef({\n            data: ['unknown'],\n            type: 'PREM',\n            nullable: component.nullable,\n            name,\n          });\n          resolve(data);\n        } else {\n          const result = await recursiveSchemaAsyncType(component, name);\n          const data = componentMediaOrRef(result);\n          resolve(data);\n        }\n      }\n    } else {\n      resolve(null);\n    }\n  });\n}\n","/* eslint-disable no-async-promise-executor */\nimport {OpenAPIV3} from 'openapi-types';\nimport {isReference, isReferenceOrParameter} from '../../../../../../types.ts';\nimport {peer} from '../../../../../../func/Typescript/peer/index.ts';\nimport {recursiveSchemaAsyncType} from '../../../../CreateAsyncComponentType/AsyncRecursiveComponent.mts';\ninterface ICreateAsyncHeaderType {\n  parameters?: (OpenAPIV3.ReferenceObject | OpenAPIV3.ParameterObject)[];\n}\nexport function createAsyncHeaderType({parameters}: ICreateAsyncHeaderType) {\n  return new Promise<string>(async resolve => {\n    if (parameters) {\n      const paramPromisses = parameters.map(async parameters => {\n        return await getHeaderParamAsync(parameters);\n      });\n      const data = await Promise.all(paramPromisses);\n      resolve(data.join(''));\n    }\n    resolve('');\n  });\n}\n\nfunction getHeaderParamAsync(\n  parameters: OpenAPIV3.ReferenceObject | OpenAPIV3.ParameterObject\n): Promise<string> {\n  return new Promise<string>(async resolve => {\n    if (!isReferenceOrParameter(parameters)) {\n      if (parameters.schema && parameters.in === 'header') {\n        if (!isReference(parameters.schema)) {\n          const schemaData = await recursiveSchemaAsyncType(parameters.schema);\n          if (schemaData) {\n            const data = peer(\n              parameters.name,\n              schemaData?.data[0],\n              schemaData.nullable,\n              schemaData.isArray\n            );\n            resolve(data);\n          }\n        }\n      }\n    }\n    resolve('');\n  });\n}\n","/* eslint-disable no-async-promise-executor */\nimport {OpenAPIV3} from 'openapi-types';\nimport {isReference, isReferenceOrParameter} from '../../../../../../types.ts';\nimport {peer} from '../../../../../../func/Typescript/peer/index.ts';\nimport {\n  IAsyncRecursiveComponentResult,\n  recursiveSchemaAsyncType,\n} from '../../../../CreateAsyncComponentType/AsyncRecursiveComponent.mts';\nimport {\n  typeNameMaker,\n  typeNameSpaceMaker,\n} from '../../../../../../func/Typescript/TypeNameMaker/index.ts';\nimport {refrenceTreatAsync} from '../../../../CreateAsyncComponentType/refrenceTreatAsync.mts';\n\ninterface ICreateAsyncParameterType {\n  parameters?: (OpenAPIV3.ReferenceObject | OpenAPIV3.ParameterObject)[];\n  namespace?: string;\n}\nexport function createAsyncParameterType({\n  parameters,\n  namespace,\n}: ICreateAsyncParameterType) {\n  return new Promise<string>(async resolve => {\n    if (parameters) {\n      const paramPromisses = parameters.map(async parameter => {\n        return await getParamAsync(parameter, namespace);\n      });\n      const data = await Promise.all(paramPromisses);\n      resolve(data.join(''));\n    }\n    resolve('');\n  });\n}\n\nfunction getParamAsync(\n  parameter: OpenAPIV3.ReferenceObject | OpenAPIV3.ParameterObject,\n  namespace?: string\n): Promise<unknown> {\n  return new Promise<string>(async resolve => {\n    if (!isReferenceOrParameter(parameter)) {\n      if (parameter.schema && parameter.in !== 'header') {\n        if (!isReference(parameter.schema)) {\n          const schemaData = await recursiveSchemaAsyncType(parameter.schema);\n          const data = getRequest(schemaData, parameter.name);\n          resolve(data);\n        } else {\n          const res = refrenceTreatAsync(parameter.schema.$ref);\n          const data = getRequest(\n            {data: [res], type: 'REF'},\n            parameter.name,\n            namespace\n          );\n          resolve(data);\n        }\n      }\n    }\n    resolve('');\n  });\n}\n\nexport function getRequest(\n  req: IAsyncRecursiveComponentResult | null,\n  name: string,\n  namespace?: string\n) {\n  if (req) {\n    switch (req.type) {\n      case 'REF':\n        return peer(\n          name,\n          typeNameSpaceMaker(req?.data[0], namespace as string),\n          req.nullable,\n          req.isArray\n        );\n      case 'ARRAY':\n        return peer(\n          name,\n          typeNameMaker(req?.data[0]),\n          req.nullable,\n          req.isArray\n        );\n      case 'PREM':\n        return peer(name, req?.data[0], req.nullable, req.isArray);\n\n      default:\n        return '';\n    }\n  } else {\n    return '';\n  }\n}\n","import {OpenAPIV3} from 'openapi-types';\ntype IContent = {\n  [media: string]: OpenAPIV3.MediaTypeObject;\n};\n\nexport function contentMapper(content: IContent | undefined) {\n  if (!content) {\n    return;\n  }\n  const entries = Object.entries(content);\n  const object = entries.map(cur => {\n    return {\n      objectName: cur[0],\n      objectContent: cur[1] as OpenAPIV3.MediaTypeObject,\n    };\n  });\n\n  return object;\n}\n","/* eslint-disable no-async-promise-executor */\nimport {OpenAPIV3} from 'openapi-types';\nimport {isReferenceOrRequestBody} from '../../../../../../types.ts';\nimport {contentMapper} from '../../../../../../func/contentMapper/index.ts';\nimport {\n  AsyncRecursiveComponent,\n  typeKey,\n} from '../../../../CreateAsyncComponentType/AsyncRecursiveComponent.mts';\nimport {refrenceTreatAsync} from '../../../../CreateAsyncComponentType/refrenceTreatAsync.mts';\n\ninterface ICreateAsyncRequestBodyType {\n  requestsBody?: OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject;\n}\nexport interface ICreateAsyncRequestBodyResultType {\n  body: [string, string?];\n  type: typeKey;\n}\nexport function createAsyncRequestBodyType({\n  requestsBody,\n}: ICreateAsyncRequestBodyType) {\n  // eslint-disable-next-line no-async-promise-executor\n  return new Promise<ICreateAsyncRequestBodyResultType | null>(\n    async resolve => {\n      if (requestsBody) {\n        if (isReferenceOrRequestBody(requestsBody)) {\n          const data = refrenceTreatAsync(requestsBody.$ref);\n          resolve({body: [data], type: 'REF'});\n        } else {\n          const contentIterator = contentMapper(requestsBody.content);\n          if (contentIterator?.length) {\n            const data = await AsyncRecursiveComponent({\n              component: contentIterator[0].objectContent.schema,\n            });\n            if (data) {\n              if (\n                contentIterator.some(cType =>\n                  cType.objectName.includes('form-data')\n                )\n              ) {\n                resolve({body: data.data, type: 'FORMDATA'});\n              } else {\n                resolve({body: data.data, type: data.type});\n              }\n            }\n          }\n        }\n      }\n      resolve(null);\n    }\n  );\n}\n","/* eslint-disable no-async-promise-executor */\nimport {MethodIterator} from '../../../../../func/MethodIterator/index.ts';\nimport {interfaceMaker} from '../../../../../func/Typescript/InterfaceMaker/index.ts';\nimport {\n  camelCase,\n  typeNameSpaceMaker,\n} from '../../../../../func/Typescript/TypeNameMaker/index.ts';\nimport {wrapNameSpace} from '../../../Declaration/declaration.ts';\nimport {peer} from '../../../../../func/Typescript/peer/index.ts';\nimport {createAsyncHeaderType} from './params/createAsyncHeaderType.ts';\nimport {createAsyncParameterType} from './params/createAsyncParameterType.ts';\nimport {\n  ICreateAsyncRequestBodyResultType,\n  createAsyncRequestBodyType,\n} from './body/createAsyncRequestBodyType.ts';\n\nexport function CreateAsyncTypeRequest(\n  itemName: string,\n  method: MethodIterator,\n  namespace: string\n): Promise<string> {\n  return new Promise(async resolve => {\n    const params = await createAsyncParameterType({\n      parameters: method.objectMethod.parameters,\n      namespace,\n    });\n    const header = await createAsyncHeaderType({\n      parameters: method.objectMethod.parameters,\n    });\n    const requestBody = await createAsyncRequestBodyType({\n      requestsBody: method.objectMethod.requestBody,\n    });\n\n    const paramValue = params\n      ? peer('params', 'Partial<{' + params + '}>')\n      : '';\n    const headerValue = header ? peer('header', '{' + header + '}', true) : '';\n    const bodyValue = requestBodys(requestBody, namespace);\n    const data = interfaceMaker(\n      itemName,\n      paramValue + headerValue + bodyValue,\n      'ICOMMNON'\n    );\n    const file = wrapNameSpace(camelCase('Request'), data);\n    resolve(file);\n  });\n}\n\nfunction requestBodys(\n  requestBody: ICreateAsyncRequestBodyResultType | null,\n  namespace: string\n) {\n  if (requestBody) {\n    switch (requestBody.type) {\n      case 'REF':\n        return peer('data', typeNameSpaceMaker(requestBody.body[0], namespace)); //\n      case 'PREM':\n        return peer('data', requestBody.body[0]);\n      case 'ARRAY':\n        return peer('data', requestBody.body[0]);\n      case 'MEDIA':\n        return peer('data', '{' + requestBody.body[0] + '}');\n      case 'FORMDATA':\n        return (\n          peer('data', 'FormData') + `/* param : ${requestBody.body[0]} */`\n        );\n      default:\n        return '';\n    }\n  } else {\n    return '';\n  }\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport {isReferenceOrResponse} from '../../../../../types.ts';\nimport {contentMapper} from '../../../../../func/contentMapper/index.ts';\nimport {\n  AsyncRecursiveComponent,\n  typeKey,\n} from '../../../CreateAsyncComponentType/AsyncRecursiveComponent.mts';\n\nexport interface ICreateAsyncResponseModel {\n  response: OpenAPIV3.ResponseObject | OpenAPIV3.ReferenceObject;\n}\n\nexport interface ICreateAsyncResponseModelResult {\n  type: typeKey;\n  response: [string, string?];\n}\n\nexport function createAsyncResponseModel({\n  response,\n}: ICreateAsyncResponseModel) {\n  // eslint-disable-next-line no-async-promise-executor\n  return new Promise<ICreateAsyncResponseModelResult | null>(async resolve => {\n    if (response) {\n      if (!isReferenceOrResponse(response)) {\n        const contentIterator = contentMapper(response.content);\n        if (contentIterator?.length) {\n          const data = await AsyncRecursiveComponent({\n            component: contentIterator[0].objectContent.schema,\n          });\n          if (data) {\n            resolve({type: data.type, response: data.data});\n          }\n        }\n      }\n    }\n    resolve(null);\n  });\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport chalk from 'chalk';\n\nexport function responsesMapper(Response: OpenAPIV3.ResponsesObject) {\n  if (!Response) {\n    console.warn(\n      chalk.yellow(\n        ' └ Responses Object must be include at least one Response but it is undefined!'\n      )\n    );\n    return;\n  }\n  const entries = Object.entries(Response);\n  const object = entries.map(cur => {\n    return {\n      objectName: cur[0],\n      objectResponse: cur[1],\n    };\n  });\n\n  return object;\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport {MethodIterator} from '../../../../../func/MethodIterator/index.ts';\nimport {responsesMapper} from '../../../../../func/responsesMapper/index.ts';\nimport {statusString} from '../../../../../helper/index.ts';\n\nexport function methodHasResponseAsync(method: MethodIterator) {\n  return new Promise<\n    (OpenAPIV3.ReferenceObject | OpenAPIV3.ResponseObject) | false\n  >((resolve, reject) => {\n    const responseIterator = responsesMapper(method.objectMethod.responses);\n    const hasOk = responseIterator?.some(({objectName}) => {\n      const status = statusString(objectName);\n      return status === 'Ok' ? true : false;\n    });\n    if (hasOk) {\n      const response = responseIterator?.find(item => item.objectName === '200')\n        ?.objectResponse as\n        | OpenAPIV3.ReferenceObject\n        | OpenAPIV3.ResponseObject;\n      resolve(response);\n    }\n    resolve(false);\n  });\n}\nexport function methodHasErrorAsync(method: MethodIterator) {\n  return new Promise<\n    (OpenAPIV3.ReferenceObject | OpenAPIV3.ResponseObject) | false\n  >((resolve, reject) => {\n    const responseIterator = responsesMapper(method.objectMethod.responses);\n    const hasBad = responseIterator?.some(({objectName}) => {\n      const status = statusString(objectName);\n      return status === 'Bad' ? true : false;\n    });\n    if (hasBad) {\n      const response = responseIterator?.find(item => item.objectName === '400')\n        ?.objectResponse as\n        | OpenAPIV3.ReferenceObject\n        | OpenAPIV3.ResponseObject;\n      resolve(response);\n    }\n    resolve(false);\n  });\n}\n","import {MethodIterator} from '../../../../../func/MethodIterator/index.ts';\nimport {typeMaker} from '../../../../../func/Typescript/TypeMaker/index.ts';\nimport {\n  camelCase,\n  typeNameSpaceMaker,\n} from '../../../../../func/Typescript/TypeNameMaker/index.ts';\nimport {wrapNameSpace} from '../../../Declaration/declaration.ts';\nimport {\n  ICreateAsyncResponseModelResult,\n  createAsyncResponseModel,\n} from '../Response/createAsyncResponseModel.ts';\nimport {methodHasErrorAsync} from './methodHasErrorOrResAsync.mts';\n\nexport function CreateAsyncTypeError(\n  itemName: string,\n  method: MethodIterator,\n  namespace: string\n): Promise<string> {\n  return new Promise(async (resolve, reject) => {\n    const error = await methodHasErrorAsync(method);\n    if (error) {\n      const err = await createAsyncResponseModel({\n        response: error,\n      });\n      const data = getError(err, itemName, namespace);\n      const file = wrapNameSpace(camelCase('Error'), data);\n      resolve(file);\n    } else {\n      resolve('');\n    }\n  });\n}\n\nexport function getError(\n  res: ICreateAsyncResponseModelResult | null,\n  name: string,\n  namespace: string\n) {\n  if (res) {\n    if (res.type === 'REF') {\n      const value = typeNameSpaceMaker(res.response[0], namespace); //\n      return typeMaker(name, value);\n    } else {\n      const value = res.response[0];\n      return typeMaker(name, value);\n    }\n  } else {\n    return '';\n  }\n}\n","/* eslint-disable no-async-promise-executor */\nimport {MethodIterator} from '../../../../../func/MethodIterator/index.ts';\nimport {typeMaker} from '../../../../../func/Typescript/TypeMaker/index.ts';\nimport {\n  camelCase,\n  typeNameSpaceMaker,\n} from '../../../../../func/Typescript/TypeNameMaker/index.ts';\nimport {wrapNameSpace} from '../../../Declaration/declaration.ts';\nimport {\n  ICreateAsyncResponseModelResult,\n  createAsyncResponseModel,\n} from './createAsyncResponseModel.ts';\nimport {methodHasResponseAsync} from '../Errors/methodHasErrorOrResAsync.mts';\n\nexport function CreateAsyncTypeResponse(\n  itemName: string,\n  method: MethodIterator,\n  namespace: string\n): Promise<string> {\n  return new Promise(async resolve => {\n    const response = await methodHasResponseAsync(method);\n    if (response) {\n      const res = await createAsyncResponseModel({\n        response,\n      });\n      const data = getResponse(res, itemName, namespace);\n      const file = wrapNameSpace(camelCase('Response'), data);\n      resolve(file);\n    } else {\n      resolve('');\n    }\n  });\n}\n\nexport function getResponse(\n  res: ICreateAsyncResponseModelResult | null,\n  name: string,\n  namespace: string\n) {\n  if (res) {\n    if (res.type === 'REF') {\n      const value = typeNameSpaceMaker(res.response[0], namespace); //\n      return typeMaker(name, value);\n    } else {\n      const value = res.response[0];\n      return typeMaker(name, value);\n    }\n  } else {\n    return '';\n  }\n}\n","/* eslint-disable no-async-promise-executor */\nimport {MethodIterator} from '../../../../func/MethodIterator/index.ts';\nimport {wrapNameSpace} from '../../Declaration/declaration.ts';\nimport {CreateAsyncTypeRequest} from './Request/CreateAsyncTypeRequest.ts';\nimport {CreateAsyncTypeError} from './Errors/CreateAsyncTypeError.mts';\nimport {CreateAsyncTypeResponse} from './Response/CreateAsyncTypeResponse.ts';\n\nexport function CreateAsyncTypeMethod(\n  method: MethodIterator,\n  itemName: string,\n  namespace: string\n): Promise<string> {\n  return new Promise(async resolve => {\n    const Request = await CreateAsyncTypeRequest(itemName, method, namespace);\n    const Response = await CreateAsyncTypeResponse(itemName, method, namespace);\n    const Error = await CreateAsyncTypeError(itemName, method, namespace);\n    const data = Request + Response + Error;\n    const file = wrapNameSpace(method.objectName.toLowerCase(), data);\n    resolve(file);\n  });\n}\n","/* eslint-disable no-async-promise-executor */\nimport {MethodIterator} from '../../../func/MethodIterator/index.ts';\nimport {IPathIterator, PathIterator} from '../../../func/PathMapper/index.ts';\nimport {camelCase} from '../../../func/Typescript/TypeNameMaker/index.ts';\nimport {pathSplit} from '../../../helper/index.ts';\nimport {Spec} from '../../../types.ts';\nimport {\n  wrapDeclartionNameSpace,\n  wrapNameSpace,\n} from '../Declaration/declaration.ts';\nimport {CreateAsyncTypeMethod} from './Method/CreateAsyncTypeMethod.ts';\n\nexport async function CreateAsyncGlobalType(defination: Spec) {\n  return new Promise<string>(async resolve => {\n    const iteratedPaths = PathIterator(defination.paths);\n    const namespace = defination.info.title\n      .replaceAll('.', '')\n      .replaceAll(' ', '');\n    if (iteratedPaths?.length) {\n      const pathPromises = iteratedPaths?.map(path => {\n        return CreateAsyncTypeScope(path, namespace);\n      });\n\n      if (pathPromises?.length) {\n        const data = await Promise.all(pathPromises);\n        const {definationName} = pathSplit(iteratedPaths[0].objectName);\n        const file = wrapDeclartionNameSpace(\n          camelCase(definationName),\n          data.join('')\n        );\n        resolve(file);\n      }\n    }\n    resolve('');\n  });\n}\n\nexport function CreateAsyncTypeScope(\n  path: IPathIterator,\n  namespace: string\n): Promise<string> {\n  return new Promise(async resolve => {\n    const {scopeName, itemName} = pathSplit(path.objectName);\n    const iteratedMathods = MethodIterator(path.objectPath);\n    const tagName =\n      scopeName || iteratedMathods?.[0].objectMethod.tags?.[0] || '__NO_TAG';\n    const methodPromises = iteratedMathods?.map(async method => {\n      return await CreateAsyncTypeMethod(\n        method,\n        camelCase(itemName),\n        namespace\n      );\n    });\n\n    if (methodPromises?.length) {\n      const data = await Promise.all(methodPromises);\n      const file = wrapNameSpace(camelCase(tagName), data.join(''));\n      resolve(file);\n    }\n  });\n}\n","import {configStore} from '../../../config/index.ts';\nimport {schemaIterator} from '../../../func/SchemaMapper/index.ts';\nimport {enumarateMaker} from '../../../func/Typescript/TypeMaker/index.ts';\nimport {Spec} from '../../../types.ts';\nimport {AsyncRecursiveComponent} from './AsyncRecursiveComponent.mts';\nimport {componentMediaOrRef} from './componentMediaOrRef.mts';\n\nexport async function CreateAsyncComponentType(defination: Spec) {\n  return new Promise<[string, string]>(async resolve => {\n    const iteratedSchema = schemaIterator(defination.components?.schemas);\n    const nameSpace = defination.info.title\n      .replaceAll('.', '')\n      .replaceAll(' ', '');\n    configStore?.setDefinition(nameSpace);\n    if (iteratedSchema?.length) {\n      const componentPromisses = iteratedSchema?.map(schema => {\n        return AsyncRecursiveComponent({\n          component: schema.objectSchema,\n          name: schema.objectName,\n          firstLvl: true,\n        });\n      });\n\n      if (componentPromisses?.length) {\n        const result = await Promise.all(componentPromisses);\n        const componentRes = result\n          .map(item => {\n            const res = componentMediaOrRef(item);\n            return res;\n          })\n          .join('');\n\n        const component = `declare namespace ${nameSpace}{\n          ${componentRes}\n        }`;\n\n        const enums = result\n          .map(item => {\n            const res =\n              item?.type === 'ENUM'\n                ? enumarateMaker(\n                    item?.name || 'NoName',\n                    item?.data[1] as string\n                  )\n                : '';\n            return res;\n          })\n          .join('');\n        resolve([component, enums]);\n      }\n    }\n    resolve(['', '']);\n  });\n}\n","/* eslint-disable no-async-promise-executor */\nimport {Spec} from '../../types.ts';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport {httpClientTemplate} from './httpClientTemplate.ts';\nimport {save} from '../../func/Save/save.ts';\nimport {definitionFullName} from '../../helper/index.ts';\nimport {configStore} from '../../config/index.ts';\n\n/** */\nexport async function createHttpClient(definations: Spec[]) {\n  return new Promise<'done' | 'error'>(async resolve => {\n    let hasError: 'done' | 'error' = 'done';\n    const spinner = ora('Create definitions Client').info();\n    try {\n      const clients = definations.map(\n        defination =>\n          new Promise(async resolve => {\n            spinner.text = 'Create definitions Client:' + defination.info.title;\n            const data = httpClientTemplate();\n            await save({\n              data,\n              fileName: 'index',\n              location: definitionFullName(defination) + '/client',\n              extention: '.' + configStore?.fileTypes.client,\n            });\n            spinner.clear();\n            resolve(data);\n          })\n      );\n      await Promise.all(clients);\n    } catch (error) {\n      spinner.fail();\n      hasError = 'error';\n      console.error(chalk.redBright(' └ ' + error));\n    }\n    spinner.text = 'Create definitions Client';\n    hasError === 'done' && spinner.succeed();\n    resolve(hasError);\n  });\n}\n","import {configStore} from '../../config/index.ts';\n\nexport function httpClientTemplate() {\n  if (configStore?.hook === 'NG') {\n    return `\n    /* eslint-disable */\n    /* tslint:disable */\n    import {  HttpHeaders, HttpRequest, HttpClient as NgHttpClient } from \"@angular/common/http\";\n    import { Injectable,Inject } from \"@angular/core\";\n\n    type IMethod = 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS'\n\n    @Injectable()\n    export class HttpClient {\n      constructor(\n        private http: NgHttpClient,\n        @Inject(String) public baseUrl: string,\n      ) {\n      }\n      public request = <R, Q>(\n        data: Omit<\n          HttpRequest<Q|undefined>,\n          | 'context'\n          | 'reportProgress'\n          | 'urlWithParams'\n          | 'serializeBody'\n          | 'detectContentTypeHeader'\n          | 'clone'\n          | 'withCredentials'\n        >,\n      ) => {\n\n        return this.http.request<R>(data.method.toUpperCase() as IMethod, this.baseUrl + data.url,{\n          body: data.body ? data.body:null,\n          params:data.params,\n          headers:data.headers\n        });\n      };\n    }\n`;\n  } else\n    return `/* eslint-disable */\n/* tslint:disable */\nimport type { AxiosInstance, AxiosRequestConfig, AxiosResponse, HeadersDefaults, ResponseType } from 'axios'\nimport axios from 'axios'\n\nexport type QueryParamsType = Record<string | number, any>\n\nexport interface FullRequestParams extends Omit<AxiosRequestConfig, 'data' | 'params' | 'url' | 'responseType'> {\n  /** set parameter to \\`true\\` for call \\`securityWorker\\` for this request */\n  secure?: boolean\n  /** request path */\n  path: string\n  /** content type of request body */\n  type?: ContentType\n  /** query params */\n  query?: QueryParamsType\n  /** format of response (i.e. response.json() -> format: \"json\") */\n  format?: ResponseType\n  /** request body */\n  body?: unknown\n}\n\nexport type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>\nexport const getData = (data: undefined | unknown) => {\n  if (data) {\n    return data;\n  } else {\n    return {};\n  }\n};\nexport interface ApiConfig<SecurityDataType = unknown> extends Omit<AxiosRequestConfig, 'data' | 'cancelToken'> {\n  securityWorker?: (\n    securityData: SecurityDataType | null,\n  ) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void\n  secure?: boolean\n  format?: ResponseType\n  instance?: AxiosInstance\n}\n\nexport enum ContentType {\n  Json = 'application/json',\n  FormData = 'multipart/form-data',\n  UrlEncoded = 'application/x-www-form-urlencoded',\n  Text = 'text/plain',\n}\nexport type AxiosOpt = Omit<AxiosRequestConfig, \"data\" | \"params\" | \"url\" | \"responseType\">;\nexport class HttpClient<SecurityDataType = unknown> {\n  public instance: AxiosInstance\n  private securityData: SecurityDataType | null = null\n  private securityWorker?: ApiConfig<SecurityDataType>['securityWorker']\n  private secure?: boolean\n  private format?: ResponseType\n\n  constructor({ securityWorker, secure, format,instance, ...axiosConfig }: ApiConfig<SecurityDataType> = {}) {\n    this.instance = instance?instance:axios.create({ ...axiosConfig, baseURL: axiosConfig.baseURL || '' })\n    this.secure = secure\n    this.format = format\n    this.securityWorker = securityWorker\n  }\n\n  public setSecurityData = (data: SecurityDataType | null) => {\n    this.securityData = data\n  }\n\n  protected mergeRequestParams(params1: AxiosRequestConfig, params2?: AxiosRequestConfig): AxiosRequestConfig {\n    const method = params1.method || (params2 && params2.method)\n\n    return {\n      ...this.instance.defaults,\n      ...params1,\n      ...(params2 || {}),\n      headers: {\n        ...((method && this.instance.defaults.headers[method.toLowerCase() as keyof HeadersDefaults]) || {}),\n        ...(params1.headers || {}),\n        ...((params2 && params2.headers) || {}),\n      },\n    }\n  }\n\n  protected stringifyFormItem(formItem: unknown) {\n    if (typeof formItem === 'object' && formItem !== null) {\n      return JSON.stringify(formItem)\n    } else {\n        \n      return \\`\\${formItem}\\`\n    }\n  }\n\n  protected createFormData(input: Record<string, unknown>): FormData {\n    return Object.keys(input || {}).reduce((formData, key) => {\n      const property = input[key]\n      const propertyContent: any[] = property instanceof Array ? property : [property]\n\n      for (const formItem of propertyContent) {\n        const isFileType = formItem instanceof Blob || formItem instanceof File\n        formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem))\n      }\n\n      return formData\n    }, new FormData())\n  }\n\n  public request = async <T = any, _E = any>({\n    secure,\n    path,\n    type,\n    query,\n    format,\n    body,\n    ...params\n  }: FullRequestParams): Promise<AxiosResponse<T>> => {\n    const secureParams =\n      ((typeof secure === 'boolean' ? secure : this.secure) &&\n        this.securityWorker &&\n        (await this.securityWorker(this.securityData))) ||\n      {}\n    const requestParams = this.mergeRequestParams(params, secureParams)\n    const responseFormat = format || this.format || undefined\n\n    if (type === ContentType.FormData && body && body !== null && typeof body === 'object') {\n      body = this.createFormData(body as Record<string, unknown>)\n    }\n\n    if (type === ContentType.Text && body && body !== null && typeof body !== 'string') {\n      body = JSON.stringify(body)\n    }\n\n    return this.instance.request({\n      ...requestParams,\n      headers: {\n        ...(requestParams.headers || {}),\n        ...(type && type !== ContentType.FormData ? { 'Content-Type': type } : {}),\n      },\n      params: query,\n      responseType: responseFormat,\n      data: body,\n      url: path,\n    })\n  }\n}\n\n\n`;\n}\n","/* eslint-disable no-async-promise-executor */\nimport {Spec} from '../../types.ts';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport {save} from '../../func/Save/save.ts';\nimport {definitionFullName, pathSplit} from '../../helper/index.ts';\nimport {PathIterator} from '../../func/PathMapper/index.ts';\nimport {camelCase} from '../../func/Typescript/TypeNameMaker/index.ts';\nimport {fetcherTemplate} from './fetcherTemplate.ts';\nimport {configStore} from '../../config/index.ts';\n\n/** */\nexport async function createFetcherClass(definations: Spec[]) {\n  const header =\n    \"/* eslint-disable @typescript-eslint/no-unused-vars */\\nimport { ContentType, HttpClient, getData,AxiosOpt } from '../client'\";\n  const ngheader = `/* eslint-disable @typescript-eslint/no-unused-vars */\\n\n    import { HttpHeaders, HttpParams, HttpRequest } from \"@angular/common/http\";\n    import {  HttpClient } from \"../client\";`;\n  return new Promise<'done' | 'error'>(async resolve => {\n    let hasError: 'done' | 'error' = 'done';\n    const spinner = ora('Create definitions Fetcher').info();\n    try {\n      const fetcher = definations.map(\n        async defination =>\n          new Promise(async resolve => {\n            spinner.text =\n              'Create definitions Fetcher:' + defination.info.title;\n            //\n\n            const iteratedPaths = PathIterator(defination.paths);\n\n            const apis = iteratedPaths?.map((path, index) => {\n              return fetcherTemplate({\n                ...path,\n                index,\n                len: iteratedPaths.length,\n              });\n            });\n            const {definationName} = pathSplit(\n              iteratedPaths?.[0].objectName as string\n            );\n            const data =\n              ` ${configStore?.hook === 'NG' ? ngheader : header}\n              import { ${camelCase(definationName)} } from \"../types\";\n          export class ${camelCase(\n            defination.info.title.replace('.', '')\n          )}Apis${\n            configStore?.hook === 'NG'\n              ? ' extends HttpClient'\n              : '<SecurityDataType = unknown> extends HttpClient<SecurityDataType>'\n          } {\n\n            public Api = {\n             ` +\n              apis?.join('') +\n              `\n            };\\n}`;\n\n            await save({\n              data,\n              fileName: 'index',\n              location: definitionFullName(defination) + '/api',\n              extention: '.' + configStore?.fileTypes.api,\n            });\n            //\n            spinner.clear();\n            resolve(data);\n          })\n      );\n\n      await Promise.all(fetcher);\n    } catch (error) {\n      spinner.fail();\n      hasError = 'error';\n      console.error(chalk.redBright(' └ ' + error));\n    }\n    spinner.text = 'Create definitions Fetcher';\n    hasError === 'done' && spinner.succeed();\n    resolve(hasError);\n  });\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport {MethodIterator} from '../../func/MethodIterator/index.ts';\nimport {capitalize, pathSplit} from '../../helper/index.ts';\nimport {camelCase} from '../../func/Typescript/TypeNameMaker/index.ts';\nimport {configStore} from '../../config/index.ts';\nlet openedScope: string | undefined = undefined;\n\ninterface IApiTemplate {\n  path: string;\n  method: string;\n  media: OpenAPIV3.OperationObject;\n}\ntype PathItemObject = OpenAPIV3.PathItemObject;\nexport function fetcherTemplate({\n  objectName,\n  objectPath,\n  index,\n  len,\n}: {\n  objectName: string;\n  objectPath: PathItemObject;\n  index: number;\n  len: number;\n}) {\n  const {scopeName} = pathSplit(objectName);\n  const iteratedMathods = MethodIterator(objectPath);\n  const tagName = camelCase(\n    scopeName || iteratedMathods?.[0].objectMethod.tags?.[0] || '_NO_TAG'\n  );\n  const apis = iteratedMathods\n    ?.map(method => {\n      return apiTemplate({\n        method: method.objectName,\n        path: objectName,\n        media: method.objectMethod,\n      });\n    })\n    .join('');\n\n  if (openedScope !== tagName) {\n    const result =\n      index === 0\n        ? '_' + tagName + ':{' + apis\n        : ' \\n}, \\n _' + tagName + ':{' + apis;\n    openedScope = tagName;\n\n    return index + 1 === len ? result + '}, ' : result;\n  } else {\n    return index + 1 === len ? apis + '}, ' : apis;\n  }\n}\nexport const getContentBody = (\n  requestBody: OpenAPIV3.RequestBodyObject | undefined\n) => {\n  if (requestBody !== undefined && requestBody.content !== undefined) {\n    if (Object.keys(requestBody.content).some(item => item.includes('json'))) {\n      return 'Json';\n    } else if (\n      Object.keys(requestBody.content).some(item => item.includes('form-data'))\n    ) {\n      return 'FormData';\n    } else if (\n      Object.keys(requestBody.content).some(item => item.includes('text/plain'))\n    ) {\n      return 'Text';\n    } else if (\n      Object.keys(requestBody.content).some(item =>\n        item.includes('url-encoded')\n      )\n    ) {\n      return 'UrlEncoded';\n    }\n    return 'Json';\n  }\n  return 'Json';\n};\n\nexport function apiTemplate({\n  method,\n  path,\n  media: {description, deprecated, tags, summary},\n}: IApiTemplate) {\n  const {definationName, scopeName, itemName} = pathSplit(path);\n  if (!method) {\n    return '';\n  }\n\n  const tagName = camelCase(scopeName || tags?.[0] || '');\n  const typeRoot = `${camelCase(definationName)}.${\n    tagName ? tagName + '.' : ''\n  }${capitalize(method)}`;\n  const name = camelCase(itemName);\n  const requestType = `${typeRoot}.Request.`;\n  const responseType = `${typeRoot}.Response.`;\n\n  const axiosResponse = `\\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${capitalize(method)}:${path}\n    ${deprecated ? '' : '*/ '}\n   ${\n     camelCase(method) + name\n   } :async (args?:${requestType}${name}, options?: AxiosOpt) => {\n     const {data: axiosData} = await this.request<${responseType}${name}, ${requestType}${name}>({\n      ...options,\n      path: \\`${path.replace('{', '${args?.params?.')}\\`,\n      method: '${capitalize(method)}',\n      body: getData(args?.data),\n      format: 'json',\n      query:{...getData(args?.params),...args?.header},\n    });\n     return axiosData${\n       configStore?.resourcePick ? '.' + configStore?.resourcePick : ''\n     }; \n  },\n  ${deprecated ? '*/' : ' '}`;\n\n  const ngResponse = `\\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${capitalize(method)}:${path}\n    ${deprecated ? '' : '*/ '}\n   ${\n     camelCase(method) + name\n   } : (args?:${requestType}${name}, options?: HttpRequest<${responseType}${name}>) => {\n     return this.request<${responseType}${name}, ${requestType}${name}['data']>({\n      ...options,\n      url:\\`${path.replace('{', '${args?.params?.')}\\`,\n      method:'${capitalize(method)}',\n       body: args?.data,\n       responseType: 'json',\n       params: new HttpParams({ fromObject: args?.params }),\n       headers: new HttpHeaders({ ...args?.header }),\n    })\n     \n  },\n  ${deprecated ? '*/' : ' '}`;\n\n  return configStore?.hook === 'NG' ? ngResponse : axiosResponse;\n}\n","/* eslint-disable no-async-promise-executor */\nimport {Spec} from '../../types.ts';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport {save} from '../../func/Save/save.ts';\nimport {definitionFullName, pathSplit} from '../../helper/index.ts';\nimport {PathIterator} from '../../func/PathMapper/index.ts';\nimport {camelCase} from '../../func/Typescript/TypeNameMaker/index.ts';\nimport {hookTemplate} from './HooksTemplate.ts';\nimport {configStore} from '../../config/index.ts';\nconst importReactQuery =\n  'import { AxiosOpt } from \"../client\";import { UseInfiniteQueryOptions, UseMutationOptions, UseQueryOptions, useInfiniteQuery, useMutation, useQuery } from \"@tanstack/react-query\";';\nconst importSwr =\n  \"import { AxiosOpt } from '../client';import useSWR from 'swr';import useSWRMutation, {SWRMutationConfiguration} from 'swr/mutation';import {PublicConfiguration} from 'swr/_internal';\";\nconst importNg = `\n import { UseInfiniteQuery,UseQuery,UseMutation } from '@ngneat/query';\n import { inject } from '@angular/core';\n import { NgQueryObserverOptions } from '@ngneat/query/lib/query';\n import {  MutationObserverOptions} from '@tanstack/query-core'\n import { HttpRequest,HttpHeaders } from \"@angular/common/http\";\n import { BehaviorSubject, switchMap } from 'rxjs';\n  // \n export interface HttpErrorResponse<T>{\n    error?: T;\n    headers?: HttpHeaders;\n    status?: number;\n    statusText?: string;\n    url?: string;\n }\n\n `;\nconst injectsNg = `  \n  private useInfiniteQuery = inject(UseInfiniteQuery);\n  private useQuery = inject(UseQuery);\n  private useMutation = inject(UseMutation);\n  `;\n/** */\nexport async function createHooks(definations: Spec[]) {\n  return new Promise<'done' | 'error'>(async resolve => {\n    let hasError: 'done' | 'error' = 'done';\n    const spinner = ora('Create definitions Hooks').info();\n    try {\n      const hooks = definations.map(\n        async defination =>\n          new Promise(async resolve => {\n            spinner.text = 'Create definitions Hooks:' + defination.info.title;\n            const iteratedPaths = PathIterator(defination.paths);\n            const definationName = camelCase(\n              defination.info.title.replace('.', '')\n            );\n            const {definationName: declarationName} = pathSplit(\n              iteratedPaths?.[0].objectName as string\n            );\n\n            const hooks = iteratedPaths?.map((path, index) => {\n              return hookTemplate({...path, index, len: iteratedPaths.length});\n            });\n            const data =\n              `/* eslint-disable @typescript-eslint/no-explicit-any */\n              /* eslint-disable @typescript-eslint/no-unused-vars */\n               import { ${definationName}Apis } from '../api';\n               import { ${camelCase(declarationName)} } from \"../types\";\n              \n          ${\n            configStore?.hook === 'ReactQuery'\n              ? importReactQuery\n              : configStore?.hook === 'NG'\n                ? importNg\n                : importSwr\n          }\n          export class ${definationName} extends ${definationName}Apis {\n             ` +\n              (configStore?.hook === 'NG' ? injectsNg : '') +\n              hooks?.join('') +\n              '\\n}';\n\n            await save({\n              data,\n              fileName: 'index',\n              location: definitionFullName(defination) + '/hooks',\n              extention: '.' + configStore?.fileTypes.hook,\n            });\n            resolve(data);\n            //\n            spinner.clear();\n          })\n      );\n      await Promise.all(hooks);\n    } catch (error) {\n      spinner.fail();\n      hasError = 'error';\n      console.error(chalk.redBright(' └ ' + error));\n    }\n    spinner.text = 'Create definitions Hooks';\n    hasError === 'done' && spinner.succeed();\n    resolve(hasError);\n  });\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport {pathSplit} from '../../helper/index.ts';\nimport {camelCase} from '../../func/Typescript/TypeNameMaker/index.ts';\nimport {HttpMethodsUpperCase} from '../../types.ts';\n\ninterface SwrTemplate {\n  path: string;\n  method: string;\n  media: OpenAPIV3.OperationObject;\n}\nexport function SwrTemplate({\n  method,\n  path,\n  media: {description, deprecated, tags, summary},\n}: SwrTemplate) {\n  const {definationName, scopeName, itemName} = pathSplit(path);\n  if (!method) {\n    return '';\n  }\n  const name = camelCase(itemName);\n  const methodName = camelCase(method) as HttpMethodsUpperCase;\n  const tagName = camelCase(scopeName || tags?.[0] || '');\n\n  const typeRoot = `${camelCase(definationName)}.${\n    tagName ? tagName + '.' : ''\n  }${methodName}`;\n  const entityName = camelCase(method) + name;\n  const requestType = `${typeRoot}.Request.`;\n  const responseType = `${typeRoot}.Response.`;\n  if (methodName === 'Get') {\n    return `\\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${methodName}:${path}\n   */\n    use${entityName} :(arg: ${requestType}${name},\n        options?: Partial<PublicConfiguration<\n        ${responseType}${name},\n        unknown,\n        any\n      >>\n       )=> {\n        return useSWR(['${tagName ? tagName + '.' : ''}${entityName}'],() =>\n       this.Api._${tagName ? tagName + '.' : ''}${entityName}(arg),options\n      );\n  },`;\n  } else\n    return `\\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${methodName}:${path}\n   */\n       use${entityName} :(\n        options?: SWRMutationConfiguration<\n        ${responseType}${name},\n        unknown,\n        string[],\n        ${requestType}${name},\n        any\n      >\n       )=> {\n        return useSWRMutation<\n       ${responseType}${name},\n        unknown,\n        string[],\n        ${requestType}${name}\n      >(['${tagName ? tagName + '.' : ''}${entityName}'], (key, {arg}) =>\n       this.Api._${tagName ? tagName + '.' : ''}${entityName}(arg),options\n      );\n\n  },`;\n}\n","import {pathSplit} from '../../helper/index.ts';\nimport {camelCase} from '../../func/Typescript/TypeNameMaker/index.ts';\nimport {HttpMethodsUpperCase} from '../../types.ts';\nimport {IHooksTemplate} from './HooksTemplate.ts';\nimport {OpenAPIV3} from 'openapi-types';\nimport {configStore} from '../../config/index.ts';\nconst getResourcePicked = (value: string) => {\n  if (configStore?.resourcePick) {\n    return `Pick<${value},'${configStore?.resourcePick}'>['${configStore?.resourcePick}']`;\n  } else {\n    return value;\n  }\n};\nexport function ReactQueryTemplate({\n  method,\n  path,\n  media: {description, deprecated, tags, summary, parameters},\n}: IHooksTemplate) {\n  const {definationName, scopeName, itemName} = pathSplit(path);\n  if (!method) {\n    return '';\n  }\n\n  const isPaging = parameters?.some(param =>\n    (param as OpenAPIV3.ParameterObject).name.includes('PageNumber')\n  );\n  const name = camelCase(itemName);\n  const methodName = camelCase(method) as HttpMethodsUpperCase;\n  const tagName = camelCase(scopeName || tags?.[0] || '');\n\n  const typeRoot = `${camelCase(definationName)}.${\n    tagName ? tagName + '.' : ''\n  }${methodName}`;\n  const entityName = camelCase(method) + name;\n  const requestType = `${typeRoot}.Request.`;\n  const responseType = `${typeRoot}.Response.`;\n\n  if (methodName === 'Get') {\n    const query = getMethod(\n      deprecated,\n      description,\n      summary,\n      tags,\n      name,\n      methodName,\n      path,\n      entityName,\n      responseType,\n      requestType,\n      tagName\n    );\n    const infinit = isPaging\n      ? infiniteMethod(\n          deprecated,\n          description,\n          summary,\n          tags,\n          name,\n          methodName,\n          path,\n          entityName,\n          responseType,\n          requestType,\n          tagName\n        )\n      : '';\n    return query + infinit;\n  } else\n    return `\\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${methodName}:${path}\n   \n    ${deprecated ? '' : '*/ '}\n use${entityName} :(\n\toptions?: Omit<UseMutationOptions<${getResourcePicked(\n    `${responseType}${name}`\n  )}, unknown,${requestType}${name} | undefined, unknown>, \"mutationFn\">,\n  axiosOptions?: AxiosOpt,\n) => {\n\treturn useMutation((args)=>this.Api._${\n    tagName ? tagName + '.' : ''\n  }${entityName}(args,axiosOptions), options);\n} ,\n${deprecated ? '*/' : ' '}`;\n}\n\nfunction infiniteMethod(\n  deprecated: boolean | undefined,\n  description: string | undefined,\n  summary: string | undefined,\n  tags: string[] | undefined,\n  name: string,\n  methodName: string,\n  path: string,\n  entityName: string,\n  responseType: string,\n  requestType: string,\n  tagName: string\n) {\n  return `\n    \\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${methodName}:${path}\n   ${deprecated ? '' : '*/ '}\n   use${entityName}Infinit:<T = ${getResourcePicked(`${responseType}${name}`)}>(\n\targs: ${requestType}${name},\n\toptions?:\n\t\t| Omit<\n\t\t\t\tUseInfiniteQueryOptions<${getResourcePicked(\n          `${responseType}${name}`\n        )}, unknown, T, ${getResourcePicked(\n          `${responseType}${name}`\n        )}, (string | ${requestType}${name})[]>,\n\t\t\t\t\"queryFn\" | \"queryKey\"\n\t\t  >\n\t\t| undefined,\n  axiosOptions?: AxiosOpt,\n) => {\n\treturn useInfiniteQuery(['${\n    tagName ? tagName + '.' : ''\n  }${entityName}', args], ({ pageParam = 1 }) => this.Api._${\n    tagName ? tagName + '.' : ''\n  }${entityName}({ ...args, \n   params:{\n              ...args.params,\n              PageNumber: pageParam,\n            }\n  },  axiosOptions), options);\n},\n${deprecated ? '*/' : ' '}`;\n}\n\nfunction getMethod(\n  deprecated: boolean | undefined,\n  description: string | undefined,\n  summary: string | undefined,\n  tags: string[] | undefined,\n  name: string,\n  methodName: string,\n  path: string,\n  entityName: string,\n  responseType: string,\n  requestType: string,\n  tagName: string\n) {\n  return `\\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${methodName}:${path}\n     ${deprecated ? '' : '*/ '}\n  use${entityName} : <T =  ${getResourcePicked(`${responseType}${name}`)}>(\n\targs:  ${requestType}${name},\n\toptions?: Omit<UseQueryOptions<${getResourcePicked(\n    `${responseType}${name}`\n  )}, unknown, T, (string |${requestType}${name})[]>, \"initialData\" | \"queryFn\" | \"queryKey\">,\n  axiosOptions?: AxiosOpt,\n) => {\n\treturn useQuery(['${\n    tagName ? tagName + '.' : ''\n  }${entityName}', args], () => this.Api._${\n    tagName ? tagName + '.' : ''\n  }${entityName}(args,axiosOptions), options);\n},\n  ${deprecated ? '*/' : ' '}`;\n}\n","import {pathSplit} from '../../helper/index.ts';\nimport {camelCase} from '../../func/Typescript/TypeNameMaker/index.ts';\nimport {HttpMethodsUpperCase} from '../../types.ts';\nimport {IHooksTemplate} from './HooksTemplate.ts';\nimport {OpenAPIV3} from 'openapi-types';\nimport {configStore} from '../../config/index.ts';\nconst getResourcePicked = (value: string) => {\n  if (configStore?.resourcePick) {\n    return `${value}['${configStore?.resourcePick}']`;\n  } else {\n    return value;\n  }\n};\nexport function NGTemplate({\n  method,\n  path,\n  media: {description, deprecated, tags, summary, parameters},\n}: IHooksTemplate) {\n  const {definationName, scopeName, itemName} = pathSplit(path);\n  if (!method) {\n    return '';\n  }\n\n  const isPaging = parameters?.some(param =>\n    (param as OpenAPIV3.ParameterObject).name.includes('PageNumber')\n  );\n  const name = camelCase(itemName);\n  const methodName = camelCase(method) as HttpMethodsUpperCase;\n  const tagName = camelCase(scopeName || tags?.[0] || '');\n  const typeRoot = `${camelCase(definationName)}.${\n    tagName ? tagName + '.' : ''\n  }${methodName}`;\n  const entityName = camelCase(method) + name;\n  const requestType = `${typeRoot}.Request.`;\n  const responseType = `${typeRoot}.Response.`;\n\n  if (methodName === 'Get') {\n    const query = getMethod(\n      deprecated,\n      description,\n      summary,\n      tags,\n      name,\n      methodName,\n      path,\n      entityName,\n      responseType,\n      requestType,\n      tagName\n    );\n    const infinit = isPaging\n      ? infiniteMethod(\n          deprecated,\n          description,\n          summary,\n          tags,\n          name,\n          methodName,\n          path,\n          entityName,\n          responseType,\n          requestType,\n          tagName\n        )\n      : '';\n    return query + infinit;\n  } else\n    return `\\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${methodName}:${path}\n   \n    ${deprecated ? '' : '*/ '}\n use${entityName} :(\n\t  options?: Omit<MutationObserverOptions<${responseType}${name}, HttpErrorResponse<${responseType}${name}>, ${requestType}${name}| undefined, unknown>, \"mutationFn\"> | undefined,\n  httpOptions?:HttpRequest<${responseType}${name}>,\n) => {\n\treturn this.useMutation((args:${requestType}${name})=>{\n         return this.Api._${\n           tagName ? tagName + '.' : ''\n         }${entityName}(args,httpOptions)\n    }, options);\n} ,\n${deprecated ? '*/' : ' '}`;\n}\n\nfunction infiniteMethod(\n  deprecated: boolean | undefined,\n  description: string | undefined,\n  summary: string | undefined,\n  tags: string[] | undefined,\n  name: string,\n  methodName: string,\n  path: string,\n  entityName: string,\n  responseType: string,\n  requestType: string,\n  tagName: string\n) {\n  return `\n    \\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${methodName}:${path}\n   * options?:\n\t\t| Omit<\n\t\t\t\tUseInfiniteQueryOptions<${getResourcePicked(\n          `${responseType}${name}`\n        )}, HttpErrorResponse<${responseType}${name}>, T, ${getResourcePicked(\n          `${responseType}${name}`\n        )}, (string | ${requestType}${name})[]>,\n\t\t\t\t\"queryFn\" | \"queryKey\"\n\t\t  >\n\t\t| undefined,\n   ${deprecated ? '' : '*/ '}\n   use${entityName}Infinit:(\n\targs: BehaviorSubject<${requestType}${name}>,\n   httpOptions?:HttpRequest<${responseType}${name}>,\n) => {\n\n   args.pipe(\n        switchMap(arg => {\n          return this.useInfiniteQuery(['${\n            tagName ? tagName + '.' : ''\n          }${entityName}', arg], ({ pageParam = 1 }) => {\n\n                return this.Api._${\n                  tagName ? tagName + '.' : ''\n                }${entityName}({ ...arg, \n                  params:{\n                              ...arg.params,\n                              PageNumber: pageParam,\n                              }\n                  },  httpOptions)\n            }, {\n                  keepPreviousData: true,\n                  refetchOnMount: false,\n                  refetchOnWindowFocus: false,\n                  getNextPageParam: lastPage => {\n                    return lastPage.result.hasNextPage ? lastPage.result.pageNumber + 1 : false;\n                  },\n              }).result$;\n        }))\n        \n\t\n},\n${deprecated ? '*/' : ' '}`;\n}\n\nfunction getMethod(\n  deprecated: boolean | undefined,\n  description: string | undefined,\n  summary: string | undefined,\n  tags: string[] | undefined,\n  name: string,\n  methodName: string,\n  path: string,\n  entityName: string,\n  responseType: string,\n  requestType: string,\n  tagName: string\n) {\n  return `\\n/**\n  ${deprecated ? '* @deprecated' : '* '}\n   * ${description ? description : 'No description'}\n   * @summary  ${summary}\n   * @tags ${tags}\n   * @name ${name}\n   * @request ${methodName}:${path}\n     ${deprecated ? '' : '*/ '}\n  use${entityName} :(\n\n\targs:  BehaviorSubject<${requestType}${name}>,\n    options?: (Omit<NgQueryObserverOptions<${getResourcePicked(\n      `${responseType}${name}`\n    )}, HttpErrorResponse<${responseType}${name}>, ${getResourcePicked(\n      `${responseType}${name}`\n    )}, ${getResourcePicked(\n      `${responseType}${name}`\n    )}, (string|undefined | ${requestType}${name})[]>, \"queryFn\" | \"initialData\">) | undefined,\n  httpOptions?:HttpRequest<${responseType}${name}>,\n    extraKey?:string,\n) => {\n\treturn args.pipe(\n        switchMap(arg => {\n          return this.useQuery(['${\n            tagName ? tagName + '.' : ''\n          }${entityName}', arg,extraKey], () => {\n                  return  this.Api._${\n                    tagName ? tagName + '.' : ''\n                  }${entityName}(arg,httpOptions)\n            }, options).result$;\n\n        }))\n},\n  ${deprecated ? '*/' : ' '}`;\n}\n","import {OpenAPIV3} from 'openapi-types';\nimport {MethodIterator} from '../../func/MethodIterator/index.ts';\nimport {pathSplit} from '../../helper/index.ts';\nimport {configStore} from '../../config/index.ts';\nimport {SwrTemplate} from './swrTemplate.ts';\nimport {ReactQueryTemplate} from './ReactQueryTemplate.ts';\nimport {camelCase} from '../../func/Typescript/TypeNameMaker/index.ts';\nimport {NGTemplate} from './ngTemplate.ts';\nlet openedScope: string | undefined = undefined;\n\nexport interface IHooksTemplate {\n  path: string;\n  method: string;\n  media: OpenAPIV3.OperationObject;\n}\ntype PathItemObject = OpenAPIV3.PathItemObject;\nexport function hookTemplate({\n  objectName,\n  objectPath,\n  index,\n  len,\n}: {\n  objectName: string;\n  objectPath: PathItemObject;\n  index: number;\n  len: number;\n}) {\n  const {scopeName} = pathSplit(objectName);\n  const iteratedMathods = MethodIterator(objectPath);\n  const tagName = camelCase(\n    scopeName || iteratedMathods?.[0].objectMethod.tags?.[0] || '_NO_TAG'\n  );\n\n  let apis = '';\n  if (configStore?.hook === 'ReactQuery') {\n    apis = iteratedMathods\n      ?.map(method => {\n        return ReactQueryTemplate({\n          method: method.objectName,\n          path: objectName,\n          media: method.objectMethod,\n        });\n      })\n      .join('') as string;\n  } else if (configStore?.hook === 'SWR') {\n    apis = iteratedMathods\n      ?.map(method => {\n        return SwrTemplate({\n          method: method.objectName,\n          path: objectName,\n          media: method.objectMethod,\n        });\n      })\n      .join('') as string;\n  } else if (configStore?.hook === 'NG') {\n    apis = iteratedMathods\n      ?.map(method => {\n        return NGTemplate({\n          method: method.objectName,\n          path: objectName,\n          media: method.objectMethod,\n        });\n      })\n      .join('') as string;\n  }\n\n  if (openedScope !== tagName) {\n    const result =\n      index === 0\n        ? 'public ' + tagName + '={' + apis\n        : ' \\n}; \\n public ' + tagName + '={' + apis;\n    openedScope = tagName;\n\n    return index + 1 === len ? result + '}; ' : result;\n  } else {\n    return index + 1 === len ? apis + '}; ' : apis;\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAkB;AAClB,iBAAgB;AAChB,yBAA0B;;;ACAnB,IAAM,cAAN,MAAqC;AAAA,EAiB1C,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa;AAAA,EACf,GAAY;AAtBZ,SAAO,aAAa;AAIpB,SAAO,aAAa;AACpB,SAAO,YAAiD;AAAA,MACtD,OAAO;AAAA,MACP,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,KAAK;AAAA,MACL,MAAM;AAAA,IACR;AAYE,SAAK,UAAU;AACf,SAAK,SAAS;AACd,SAAK,SAAS;AACd,SAAK,eAAe;AACpB,SAAK,OAAO;AACZ,SAAK,aAAa;AAClB,SAAK,UAAU;AACf,SAAK,WAAW;AAChB,SAAK,YAAY,YAAY,YAAY,KAAK;AAC9C,SAAK,SAAS,UAAU,IAAI,OAAO,MAAM;AAAA,EAC3C;AAAA,EAEA,cAAc,OAAe;AAC3B,SAAK,aAAa;AAAA,EACpB;AACF;;;ADxCA,IAAM,cAAU,WAAAA,SAAI,2BAA2B;AAC/C,IAAM,WAAW,UAAM,gCAAY,WAAW;AAEvC,IAAI,cAAuC;AAGlD,SAAsB,YAA0C;AAAA;AAC9D,YAAQ,MAAM;AACd,QAAI;AACF,YAAM,aAAa,MAAM,SAAS,EAAE,KAAK,kBAAkB;AAC3D,UAAI,yCAAY,SAAS;AACvB,gBAAQ,KAAK;AACb,gBAAQ,KAAK,aAAAC,QAAM,OAAO,gCAA2B,CAAC;AACtD,eAAO,QAAQ,QAAQ,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KAAK;AACb,mBAAW;AACX,gBAAQ,MAAM,eAAAI,QAAM,UAAU,aAAQ,KAAK,CAAC;AAAA,MAC9C;AACA,MAAAJ,SAAQ,OAAO;AACf,mBAAa,UAAUA,SAAQ,QAAQ;AACvC,cAAQ,QAAQ;AAAA,IAClB,EAAC;AAAA,EACH;AAAA;;;A5CrFA,IAAMK,eAAU,aAAAC,SAAI,UAAU,EAAE,KAAK;AAErC,SAAe,UAAU;AAAA;AACvB,IAAAD,SAAQ,MAAM;AAEd,UAAM,UAAU,MAAM,UAAU;AAChC,QAAI,SAAS;AACX,cAAQ,MAAM,OAAO;AACrB,YAAM,cAAc,MAAM,sBAAsB;AAChD,YAAM,sBAAsB,WAAW;AACvC,YAAM,YAAY,WAAW;AAC7B,YAAM,iBAAiB,WAAW;AAClC,YAAM,mBAAmB,WAAW;AACpC,YAAM,YAAY,WAAW;AAC7B,MAAAA,SAAQ,QAAQ;AAAA,IAClB,OAAO;AACL,MAAAA,SAAQ,KAAK;AACb,cAAQ,MAAM,eAAAE,QAAM,IAAI,8BAAyB,CAAC;AAAA,IACpD;AAAA,EACF;AAAA;AAEA,IAAO,cAAQ,QAAQ;","names":["ora","chalk","import_ora","import_ora","import_chalk","makeDir","fs","spinner","ora","chalk","import_ora","import_chalk","import_ora","import_chalk","axios","spinner","ora","_a","chalk","error","ora","spinner","chalk","_a","_b","_c","import_make_dir","import_chalk","import_ora","spinner","ora","chalk","makeDir","import_chalk","import_ora","import_chalk","import_chalk","chalk","import_chalk","chalk","import_chalk","chalk","import_chalk","chalk","isDuplicate","parameters","import_chalk","chalk","Error","spinner","ora","resolve","_a","chalk","import_chalk","import_ora","spinner","ora","resolve","chalk","import_chalk","import_ora","spinner","ora","resolve","chalk","import_chalk","import_ora","getResourcePicked","getMethod","infiniteMethod","openedScope","spinner","ora","resolve","hooks","chalk","spinner","ora","chalk"]}