@naiv/codegen-axios-client 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,6 +26,7 @@ function createAPIClientNamespace(list_api) {
26
26
  ].join('\n');
27
27
  });
28
28
  return [
29
+ `import axios from 'axios';`,
29
30
  list_api_import.join('\n'),
30
31
  '',
31
32
  'export namespace AxiosClient {',
@@ -38,10 +39,10 @@ function createAPIParams(api) {
38
39
  var _a, _b, _c, _d;
39
40
  let result = '{';
40
41
  if (((_b = (_a = api.data.headers) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0) {
41
- result = `${result} headers: req.headers,`;
42
+ result = `${result} headers: req.headers as any,`;
42
43
  }
43
44
  if (((_d = (_c = api.data.query) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0) {
44
- result = `${result} params: req.query,`;
45
+ result = `${result} params: req.query as any,`;
45
46
  }
46
47
  result = `${result} }`;
47
48
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naiv/codegen-axios-client",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "main": "dist/index.js",
5
5
  "publishConfig": {
6
6
  "access": "public"