UNPKG

2.52 kBTypeScriptView Raw
1declare const HTTP_REQUEST: string;
2declare const CONFIG: string;
3declare const FILE_HOOKS_CONFIG: string;
4declare const AUTOGENERATED_COMMENT = "\n/**\n* AUTO_GENERATED Do not change this file directly, use config.ts file instead\n*\n* @version 5\n*/\n";
5declare const SERVICE_BEGINNING: string;
6declare const SERVICE_NEEDED_FUNCTIONS = "\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst __DEV__ = process.env.NODE_ENV !== \"production\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction overrideConfig(\n config?: AxiosRequestConfig,\n configOverride?: AxiosRequestConfig,\n): AxiosRequestConfig {\n return {\n ...config,\n ...configOverride,\n headers: {\n ...config?.headers,\n ...configOverride?.headers,\n },\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function template(path: string, obj: { [x: string]: any } = {}) {\n Object.keys(obj).forEach((key) => {\n const re = new RegExp(`{${key}}`, \"i\");\n path = path.replace(re, obj[key]);\n });\n\n return path;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction objToForm(requestBody: object) {\n const formData = new FormData();\n\n Object.entries(requestBody).forEach(([key, value]) => {\n value && formData.append(key, value);\n });\n\n return formData;\n}\n";
7declare const getHooksImports: ({ hasInfinity, }: {
8 hasInfinity?: boolean | undefined;
9}) => string;
10declare const getHooksFunctions: ({ hasInfinity }: {
11 hasInfinity?: boolean | undefined;
12}) => "" | "\nconst useHasMore = (\n pages: Array<SwaggerResponse<any>> | undefined,\n list: any,\n queryParams: any,\n) =>\n useMemo(() => {\n if (!pages || (pages && pages.length < 1)) {\n return false;\n }\n\n const total = getTotal(pages);\n\n if (total !== undefined) {\n if (list && list.length < total) {\n return true;\n }\n return false;\n }\n if (\n paginationFlattenData([pages[pages.length - 1]])?.length === getPageSize(queryParams as any)\n ) {\n return true;\n }\n\n return false;\n }, [pages, list, queryParams]);\n\n";
13declare const DEPRECATED_WARM_MESSAGE = "This endpoint deprecated and will be remove. Please use an alternative";
14export { AUTOGENERATED_COMMENT, SERVICE_NEEDED_FUNCTIONS, HTTP_REQUEST, SERVICE_BEGINNING, getHooksFunctions, getHooksImports, CONFIG, DEPRECATED_WARM_MESSAGE, FILE_HOOKS_CONFIG, };
15//# sourceMappingURL=strings.d.ts.map
\No newline at end of file