@cosmotech/api-ts 5.0.1 → 5.1.0-rc1
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/.openapi-generator/FILES +1 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +3 -2
- package/api.ts +369 -411
- package/base.ts +1 -1
- package/common.ts +17 -3
- package/configuration.ts +3 -3
- package/dist/api.d.ts +10 -1
- package/dist/api.js +352 -262
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +7 -1
- package/dist/common.js +19 -4
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/Runner.md +2 -0
- package/docs/RunnerStatus.md +11 -0
- package/docs/WorkspaceWebApp.md +3 -3
- package/index.ts +1 -1
- package/package.json +2 -2
package/base.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Cosmo Tech Platform API
|
|
5
5
|
* Cosmo Tech Platform API
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 5.0
|
|
7
|
+
* The version of the OpenAPI document: 5.1.0-rc1
|
|
8
8
|
* Contact: platform@cosmotech.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/common.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Cosmo Tech Platform API
|
|
5
5
|
* Cosmo Tech Platform API
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 5.0
|
|
7
|
+
* The version of the OpenAPI document: 5.1.0-rc1
|
|
8
8
|
* Contact: platform@cosmotech.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -66,7 +66,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|
|
66
66
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
67
67
|
if (parameter == null) return;
|
|
68
68
|
if (typeof parameter === "object") {
|
|
69
|
-
if (Array.isArray(parameter)) {
|
|
69
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
70
70
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
71
71
|
}
|
|
72
72
|
else {
|
|
@@ -91,13 +91,27 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
|
91
91
|
url.search = searchParams.toString();
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
96
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
97
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
98
|
+
*/
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
|
|
101
|
+
if (value instanceof Set) {
|
|
102
|
+
return Array.from(value);
|
|
103
|
+
} else {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
94
108
|
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
95
109
|
const nonString = typeof value !== 'string';
|
|
96
110
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
97
111
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
98
112
|
: nonString;
|
|
99
113
|
return needsSerialization
|
|
100
|
-
? JSON.stringify(value !== undefined ? value : {})
|
|
114
|
+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
101
115
|
: (value || "");
|
|
102
116
|
}
|
|
103
117
|
|
package/configuration.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Cosmo Tech Platform API
|
|
4
4
|
* Cosmo Tech Platform API
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 5.0
|
|
6
|
+
* The version of the OpenAPI document: 5.1.0-rc1
|
|
7
7
|
* Contact: platform@cosmotech.com
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -115,7 +115,7 @@ export class Configuration {
|
|
|
115
115
|
* @return True if the given MIME is JSON, false otherwise.
|
|
116
116
|
*/
|
|
117
117
|
public isJsonMime(mime: string): boolean {
|
|
118
|
-
const jsonMime: RegExp =
|
|
119
|
-
return mime !== null &&
|
|
118
|
+
const jsonMime: RegExp = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
119
|
+
return mime !== null && jsonMime.test(mime);
|
|
120
120
|
}
|
|
121
121
|
}
|
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Cosmo Tech Platform API
|
|
3
3
|
* Cosmo Tech Platform API
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 5.0
|
|
5
|
+
* The version of the OpenAPI document: 5.1.0-rc1
|
|
6
6
|
* Contact: platform@cosmotech.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -1100,6 +1100,7 @@ export interface Runner {
|
|
|
1100
1100
|
* last run info from current runner
|
|
1101
1101
|
*/
|
|
1102
1102
|
'lastRunInfo': LastRunInfo;
|
|
1103
|
+
'status': RunnerStatus;
|
|
1103
1104
|
'validationStatus': RunnerValidationStatus;
|
|
1104
1105
|
'security': RunnerSecurity;
|
|
1105
1106
|
}
|
|
@@ -1246,6 +1247,14 @@ export interface RunnerSecurity {
|
|
|
1246
1247
|
*/
|
|
1247
1248
|
'accessControlList': Array<RunnerAccessControl>;
|
|
1248
1249
|
}
|
|
1250
|
+
/**
|
|
1251
|
+
* the status of the runner
|
|
1252
|
+
*/
|
|
1253
|
+
export declare const RunnerStatus: {
|
|
1254
|
+
readonly Ok: "Ok";
|
|
1255
|
+
readonly Archived: "Archived";
|
|
1256
|
+
};
|
|
1257
|
+
export type RunnerStatus = typeof RunnerStatus[keyof typeof RunnerStatus];
|
|
1249
1258
|
/**
|
|
1250
1259
|
* Request object for updating a runner
|
|
1251
1260
|
*/
|