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AAA3D,EAAA,KACzC,gBAAA4D,GAAA,OAAAhE,EAAAiE,MAAA,KAAAC,UAAA,EA3DA,IA8DL,M,uECtGad,EAAY,SAACjE,EAAmB5C,GAAiB,OAC1DmB,EAAAA,EAAAA,GAAM,CACFnB,MAAAA,EACAqB,WAAW,EACXC,OAAQ,MACRC,IAAK,gDACLqB,KAAMA,GACP,C","sources":["_tools/types/log.ts","_tools/axios/cars/getAllFacets.ts","_tools/axios/index.ts","_tools/axios/createLog.ts"],"sourcesContent":["export enum DBLogLevel {\n Error = 3,\n Info = 0,\n Success = 1,\n Warning = 2,\n}\n\nexport enum DBLogSource {\n HPT = 2,\n AHDWEB = 1,\n UNKNOWN = 0,\n}\n\nexport type DBLog = {\n /**\n * @name Created At.\n * @description Describes the creation date.\n * @example 2023-07-21T09:08:27.636Z\n */\n createdAt: Date;\n /**\n * @name ID.\n * @description Describes the ID.\n * @example 1\n */\n id: number;\n /**\n * @name Project ID.\n * @description Describes the assigned project IDs.\n * @example 13\n */\n idProject: number;\n /**\n * @name Level.\n * @description Describes the severity and design of the message.\n * @example \"info\"\n */\n level: DBLogLevel;\n /**\n * @name Message.\n * @description Contains the message of the global message.\n * @example \"Hello World!\"\n */\n message: string;\n /**\n * @name Source.\n * @description Describes the origin.\n * @example 'sr'\n */\n origin: DBLogSource;\n /**\n * @name RawData.\n * @description Describes the raw data.\n * @example {}\n */\n raw: unknown;\n /**\n * @name Title.\n * @description Contains the title of the global message.\n * @example \"Hello World!\"\n */\n title: string;\n /**\n * @name Updated At.\n * @description Describes the last update date.\n * @example 2023-07-21T09:08:27.636Z\n */\n updatedAt: Date;\n};\n\nexport type DBLogCreate = Omit;\n","import axios, { urlSRelease } from '..';\nimport { type ConfigObject, type DebugLevel, type Language } from '../../../_configs/types';\nimport { type CarList } from '../../../_types/Car';\nimport checkUndefinedNullOrEmpty from '../../../utils/tools/checkUndefinedNullOrEmpty';\n\nexport default function getAllFacets(idFirma: ConfigObject['general']['idFirma'], currentLang: Language['value'], signal: AbortController['signal'], debug: DebugLevel) {\n const dataPathString = [];\n const dataPath: any = { firma: idFirma, nfzHersteller: 1, fiza: 1, leas: 1, lang: currentLang?.split('-')?.[0] || 'de', onlyFacetten: 1 };\n\n for (let i = 0; i < Object.keys(dataPath).length; i++) {\n const key = Object.keys(dataPath)[i];\n const value = dataPath[key];\n if (!checkUndefinedNullOrEmpty(value) && value !== -100 && value !== '-100') dataPathString.push(key + '=' + value);\n }\n\n return axios({\n debug,\n title: 'Abrufen der Facetten',\n noLogging: false,\n idFirma,\n method: 'get',\n signal,\n url: `${urlSRelease}/search/glist?${dataPathString.join('&')}`,\n });\n}\n","/* eslint-disable @typescript-eslint/prefer-promise-reject-errors */\nimport axios, { type AxiosError, type AxiosResponse } from 'axios';\nimport checkUndefinedNullOrEmpty from '../../utils/tools/checkUndefinedNullOrEmpty';\nimport { DEV, LOCALSERVER, NEXT, PRE_RELEASE, TEST } from '../../vars';\nimport { DBLogLevel, DBLogSource } from '../types/log';\nimport { createLog } from './createLog';\nimport { DebugLevel } from '../../_configs/types';\n\nexport const sUrlCarsTs = LOCALSERVER\n ? 'http://localhost:61101' /* `http://localhost:${SERVLETPORT}` */\n : DEV\n ? 'https://cars-ts-dev.autohaus-digital.de'\n : NEXT || PRE_RELEASE || TEST\n ? 'https://cars-ts-next.autohaus-digital.de'\n : 'https://cars-ts.autohaus-digital.de';\n\nconst GBASE_URL = 'https://cars.autohaus-digital.de';\nexport const urlSRelease = 'https://s.autohaus-digital.de';\nexport const urlServicesRelease = GBASE_URL + '/r_services';\n\ndeclare module 'axios' {\n interface AxiosRequestConfig {\n debug: DebugLevel;\n idFirma?: number;\n noLogging?: boolean;\n title?: string;\n }\n}\n\nconst axiosInstance = axios.create({\n debug: DebugLevel.NONE,\n timeout: 15000,\n});\n\naxiosInstance.interceptors.response.use(\n function (serviceResponse: AxiosResponse): Promise {\n if (serviceResponse.data instanceof Blob) {\n const contentDisposition = serviceResponse.headers['content-disposition'] || '';\n const filename = contentDisposition.replace('attachment; filename=\"', '').replace('\"', '');\n const file = new File([serviceResponse.data], filename, { type: serviceResponse.headers['content-type'] });\n return Promise.resolve({ ...serviceResponse, data: URL.createObjectURL(file), file: file });\n } else {\n return Promise.resolve(serviceResponse);\n }\n },\n async function (serviceError: AxiosError): Promise {\n if (serviceError.code === 'ERR_CANCELED') return Promise.reject({ aborted: true, message: 'Request aborted' });\n\n const newServiceError = Object.assign({}, serviceError);\n if (newServiceError?.code === 'ERR_CANCELED') {\n newServiceError.message = 'Die Anfrage wurde abgebrochen!';\n }\n if (newServiceError?.code === 'ECONNABORTED') {\n newServiceError.message = 'Die Anfrage hat zu lange gebraucht, um eine Antwort zu senden! Bitte versuchen Sie es später erneut!';\n }\n\n if (!checkUndefinedNullOrEmpty(newServiceError?.response?.data)) {\n if (newServiceError?.response?.data instanceof Blob) {\n const blobText = await newServiceError?.response?.data?.text();\n newServiceError.response.data = blobText;\n } else if (typeof newServiceError?.response?.data === 'string') {\n newServiceError.message = newServiceError?.response.data;\n } else if (!checkUndefinedNullOrEmpty((newServiceError?.response?.data as any)?.message)) {\n newServiceError.message = (newServiceError?.response?.data as any)?.message;\n } else {\n newServiceError.message = JSON.stringify(newServiceError?.response?.data);\n }\n }\n if (newServiceError?.code !== 'ERR_CANCELED') {\n console.error(newServiceError);\n }\n if (newServiceError?.code !== 'ERR_CANCELED' && !newServiceError?.config?.noLogging) {\n await createLog({\n idProject: newServiceError?.config?.idFirma,\n level:\n newServiceError?.response?.status === 204 || newServiceError?.response?.status === 401 || newServiceError?.response?.status === 403 || newServiceError?.response?.status === 404\n ? DBLogLevel.Warning\n : DBLogLevel.Error,\n message: newServiceError?.message,\n raw: {\n code: newServiceError?.code,\n config: {\n data: newServiceError?.config?.data,\n headers: newServiceError?.config?.headers,\n method: newServiceError?.config?.method,\n timeout: newServiceError?.config?.timeout,\n url: newServiceError?.config?.url,\n },\n message: newServiceError?.message,\n name: newServiceError?.name,\n response: {\n data: newServiceError?.response?.data,\n headers: newServiceError?.response?.headers,\n status: newServiceError?.response?.status,\n statusText: newServiceError?.response?.statusText,\n },\n },\n origin: DBLogSource.HPT,\n title: newServiceError?.config?.title || newServiceError?.name || newServiceError?.code,\n }, newServiceError?.config?.debug);\n }\n\n return Promise.reject(newServiceError);\n }\n);\n\nexport default axiosInstance;\n","import axios from 'axios';\nimport { type DBLogCreate } from '../types/log';\nimport type { DebugLevel } from '../../_configs/types';\n\nexport const createLog = (data: DBLogCreate, debug: DebugLevel) =>\n axios({\n debug,\n noLogging: true,\n method: 'put',\n url: 'https://web-servlets.autohaus-digital.de/logs',\n data: data,\n });\n"],"names":["DBLogLevel","DBLogSource","getAllFacets","idFirma","currentLang","signal","debug","_currentLang$split","dataPathString","dataPath","firma","nfzHersteller","fiza","leas","lang","split","onlyFacetten","i","Object","keys","length","key","value","checkUndefinedNullOrEmpty","push","axios","title","noLogging","method","url","concat","urlSRelease","join","sUrlCarsTs","LOCALSERVER","DEV","NEXT","PRE_RELEASE","TEST","urlServicesRelease","GBASE_URL","axiosInstance","create","DebugLevel","NONE","timeout","interceptors","response","use","serviceResponse","data","Blob","filename","headers","replace","file","File","type","Promise","resolve","_objectSpread","URL","createObjectURL","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","serviceError","_newServiceError$resp","_newServiceError$conf","newServiceError","_newServiceError$resp2","_newServiceError$resp5","_newServiceError$resp6","_newServiceError$resp7","_newServiceError$resp3","_newServiceError$resp4","blobText","_newServiceError$resp8","_newServiceError$resp9","_newServiceError$resp10","_newServiceError$conf2","_newServiceError$resp11","_newServiceError$resp12","_newServiceError$resp13","_newServiceError$resp14","_newServiceError$conf3","_newServiceError$conf4","_newServiceError$conf5","_newServiceError$conf6","_newServiceError$conf7","_newServiceError$resp15","_newServiceError$resp16","_newServiceError$resp17","_newServiceError$resp18","_newServiceError$conf8","_newServiceError$conf9","wrap","_context","prev","next","code","abrupt","reject","aborted","message","assign","text","sent","JSON","stringify","console","error","config","createLog","idProject","level","status","Warning","Error","raw","name","statusText","origin","HPT","stop","_x","apply","arguments"],"sourceRoot":""}