@cosmotech/api-ts 0.1.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/.github/workflows/publish.yaml +3 -3
- package/LICENSE +12 -4
- package/README.md +2 -2
- package/api.ts +1272 -741
- package/base.ts +3 -3
- package/common.ts +5 -5
- package/configuration.ts +1 -1
- package/dist/api.d.ts +938 -647
- package/dist/api.js +671 -193
- package/dist/base.d.ts +3 -3
- package/dist/base.js +1 -1
- package/dist/common.d.ts +3 -3
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/git_push.sh +3 -4
- package/index.ts +1 -1
- package/package-lock.json +33 -0
- package/package.json +3 -3
- package/scripts/git_push.sh +24 -20
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.
|
|
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:
|
|
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.
|
|
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,
|
|
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.
|
|
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).
|