@cosmotech/api-ts 0.0.1 → 0.1.14

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.
package/base.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Cosmo Tech Plaform API
5
5
  * Cosmo Tech Platform API
6
6
  *
7
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
7
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
8
8
  * Contact: platform@cosmotech.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -16,7 +16,7 @@
16
16
  import { Configuration } from "./configuration";
17
17
  // Some imports not used depending on template conditions
18
18
  // @ts-ignore
19
- import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
19
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
20
20
 
21
21
  export const BASE_PATH = "https://dev.api.cosmotech.com".replace(/\/+$/, "");
22
22
 
@@ -38,7 +38,7 @@ export const COLLECTION_FORMATS = {
38
38
  */
39
39
  export interface RequestArgs {
40
40
  url: string;
41
- options: any;
41
+ options: AxiosRequestConfig;
42
42
  }
43
43
 
44
44
  /**
package/common.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Cosmo Tech Plaform API
5
5
  * Cosmo Tech Platform API
6
6
  *
7
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
7
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
8
8
  * Contact: platform@cosmotech.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -14,8 +14,8 @@
14
14
 
15
15
 
16
16
  import { Configuration } from "./configuration";
17
- import { RequiredError, RequestArgs } from "./base";
18
- import { AxiosInstance } from 'axios';
17
+ import { RequiredError, RequestArgs } from "./base";
18
+ import { AxiosInstance, AxiosResponse } from 'axios';
19
19
 
20
20
  /**
21
21
  *
@@ -131,8 +131,8 @@ export const toPathString = function (url: URL) {
131
131
  * @export
132
132
  */
133
133
  export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
134
- return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
134
+ return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
135
135
  const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
136
- return axios.request(axiosRequestArgs);
136
+ return axios.request<T, R>(axiosRequestArgs);
137
137
  };
138
138
  }
package/configuration.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Cosmo Tech Plaform API
5
5
  * Cosmo Tech Platform API
6
6
  *
7
- * The version of the OpenAPI document: 0.0.8-SNAPSHOT
7
+ * The version of the OpenAPI document: 0.0.13-SNAPSHOT
8
8
  * Contact: platform@cosmotech.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).