@cosmotech/api-ts 3.3.4 → 4.2.5-onprem
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 +13 -12
- package/.github/workflows/track_dependencies.yml +31 -0
- package/.openapi-generator/FILES +98 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +210 -2
- package/api.ts +4650 -11656
- package/base.ts +2 -2
- package/common.ts +22 -44
- package/configuration.ts +7 -2
- package/dist/api.d.ts +2165 -6422
- package/dist/api.js +726 -7302
- package/dist/base.d.ts +1 -1
- package/dist/base.js +2 -2
- package/dist/common.d.ts +5 -36
- package/dist/common.js +17 -39
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +14 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AboutInfo.md +21 -0
- package/docs/AboutInfoVersion.md +33 -0
- package/docs/ComponentRolePermissions.md +23 -0
- package/docs/Connector.md +41 -0
- package/docs/ConnectorApi.md +218 -0
- package/docs/ConnectorParameter.md +31 -0
- package/docs/ConnectorParameterGroup.md +25 -0
- package/docs/ContainerResourceSizeInfo.md +23 -0
- package/docs/ContainerResourceSizing.md +23 -0
- package/docs/CreateInfo.md +24 -0
- package/docs/CreatedRun.md +21 -0
- package/docs/Dataset.md +65 -0
- package/docs/DatasetAccessControl.md +23 -0
- package/docs/DatasetApi.md +1809 -0
- package/docs/DatasetCompatibility.md +25 -0
- package/docs/DatasetConnector.md +27 -0
- package/docs/DatasetCopyParameters.md +25 -0
- package/docs/DatasetCreateInfo.md +24 -0
- package/docs/DatasetCreateRequest.md +31 -0
- package/docs/DatasetEditInfo.md +22 -0
- package/docs/DatasetMemberGroup.md +25 -0
- package/docs/DatasetMemberUser.md +23 -0
- package/docs/DatasetMembers.md +23 -0
- package/docs/DatasetPart.md +43 -0
- package/docs/DatasetPartCreateRequest.md +31 -0
- package/docs/DatasetPartTypeEnum.md +11 -0
- package/docs/DatasetPartUpdateRequest.md +27 -0
- package/docs/DatasetRole.md +21 -0
- package/docs/DatasetSearch.md +21 -0
- package/docs/DatasetSecurity.md +23 -0
- package/docs/DatasetSourceType.md +19 -0
- package/docs/DatasetTwinGraphHash.md +21 -0
- package/docs/DatasetTwinGraphInfo.md +25 -0
- package/docs/DatasetTwinGraphQuery.md +21 -0
- package/docs/DatasetUpdateRequest.md +29 -0
- package/docs/DeleteHistoricalData.md +25 -0
- package/docs/EditInfo.md +22 -0
- package/docs/FileUploadMetadata.md +22 -0
- package/docs/FileUploadValidation.md +23 -0
- package/docs/GraphProperties.md +28 -0
- package/docs/IAMInfoApi.md +95 -0
- package/docs/IngestionStatusEnum.md +15 -0
- package/docs/IoTypesEnum.md +11 -0
- package/docs/LastRunInfo.md +23 -0
- package/docs/MemberGroup.md +25 -0
- package/docs/MemberUser.md +23 -0
- package/docs/Members.md +23 -0
- package/docs/MetaApi.md +52 -0
- package/docs/Organization.md +27 -0
- package/docs/OrganizationAccessControl.md +23 -0
- package/docs/OrganizationApi.md +758 -0
- package/docs/OrganizationCreateRequest.md +23 -0
- package/docs/OrganizationEditInfo.md +22 -0
- package/docs/OrganizationMemberGroup.md +25 -0
- package/docs/OrganizationMemberUser.md +23 -0
- package/docs/OrganizationMembers.md +23 -0
- package/docs/OrganizationRole.md +21 -0
- package/docs/OrganizationSecurity.md +23 -0
- package/docs/OrganizationUpdateRequest.md +21 -0
- package/docs/QueryResult.md +21 -0
- package/docs/ResourceSizeInfo.md +23 -0
- package/docs/Run.md +57 -0
- package/docs/RunApi.md +442 -0
- package/docs/RunContainer.md +41 -0
- package/docs/RunData.md +25 -0
- package/docs/RunDataQuery.md +21 -0
- package/docs/RunEditInfo.md +22 -0
- package/docs/RunLogs.md +23 -0
- package/docs/RunLogsEntry.md +21 -0
- package/docs/RunResourceRequested.md +23 -0
- package/docs/RunState.md +15 -0
- package/docs/RunStatus.md +47 -0
- package/docs/RunStatusNode.md +43 -0
- package/docs/RunTemplate.md +87 -0
- package/docs/RunTemplateCreateRequest.md +37 -0
- package/docs/RunTemplateOrchestrator.md +11 -0
- package/docs/RunTemplateParameter.md +35 -0
- package/docs/RunTemplateParameterCreateRequest.md +35 -0
- package/docs/RunTemplateParameterGroup.md +31 -0
- package/docs/RunTemplateParameterGroupCreateRequest.md +29 -0
- package/docs/RunTemplateParameterGroupUpdateRequest.md +27 -0
- package/docs/RunTemplateParameterUpdateRequest.md +33 -0
- package/docs/RunTemplateParameterValue.md +25 -0
- package/docs/RunTemplateResourceSizing.md +23 -0
- package/docs/RunTemplateStepSource.md +15 -0
- package/docs/RunTemplateUpdateRequest.md +35 -0
- package/docs/Runner.md +63 -0
- package/docs/RunnerAccessControl.md +23 -0
- package/docs/RunnerApi.md +908 -0
- package/docs/RunnerCreateRequest.md +45 -0
- package/docs/RunnerDatasets.md +24 -0
- package/docs/RunnerEditInfo.md +22 -0
- package/docs/RunnerMemberGroup.md +25 -0
- package/docs/RunnerMemberUser.md +23 -0
- package/docs/RunnerMembers.md +23 -0
- package/docs/RunnerResourceSizing.md +23 -0
- package/docs/RunnerRole.md +21 -0
- package/docs/RunnerRunTemplateParameterValue.md +27 -0
- package/docs/RunnerSecurity.md +23 -0
- package/docs/RunnerStatus.md +11 -0
- package/docs/RunnerUpdateRequest.md +41 -0
- package/docs/RunnerValidationStatus.md +15 -0
- package/docs/SendRunDataRequest.md +22 -0
- package/docs/Solution.md +53 -0
- package/docs/SolutionAccessControl.md +23 -0
- package/docs/SolutionApi.md +1159 -0
- package/docs/SolutionCreateRequest.md +43 -0
- package/docs/SolutionEditInfo.md +22 -0
- package/docs/SolutionFile.md +21 -0
- package/docs/SolutionMemberGroup.md +25 -0
- package/docs/SolutionMemberUser.md +23 -0
- package/docs/SolutionMembers.md +23 -0
- package/docs/SolutionRole.md +21 -0
- package/docs/SolutionSecurity.md +23 -0
- package/docs/SolutionUpdateRequest.md +41 -0
- package/docs/SourceInfo.md +27 -0
- package/docs/SubDatasetGraphQuery.md +27 -0
- package/docs/TwinGraphBatchResult.md +25 -0
- package/docs/TwincacheStatusEnum.md +11 -0
- package/docs/Workspace.md +57 -0
- package/docs/WorkspaceAccessControl.md +23 -0
- package/docs/WorkspaceApi.md +1162 -0
- package/docs/WorkspaceCreateRequest.md +35 -0
- package/docs/WorkspaceEditInfo.md +22 -0
- package/docs/WorkspaceFile.md +21 -0
- package/docs/WorkspaceMemberGroup.md +25 -0
- package/docs/WorkspaceMemberUser.md +23 -0
- package/docs/WorkspaceMembers.md +23 -0
- package/docs/WorkspaceRole.md +21 -0
- package/docs/WorkspaceSecurity.md +23 -0
- package/docs/WorkspaceSolution.md +25 -0
- package/docs/WorkspaceUpdateRequest.md +31 -0
- package/docs/WorkspaceWebApp.md +25 -0
- 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:
|
|
7
|
+
* The version of the OpenAPI document: 4.2.5-onprem
|
|
8
8
|
* Contact: platform@cosmotech.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -19,7 +19,7 @@ import type { Configuration } from './configuration';
|
|
|
19
19
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
20
20
|
import globalAxios from 'axios';
|
|
21
21
|
|
|
22
|
-
export const BASE_PATH = "
|
|
22
|
+
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
*
|
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:
|
|
7
|
+
* The version of the OpenAPI document: 4.2.5-onprem
|
|
8
8
|
* Contact: platform@cosmotech.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -18,16 +18,11 @@ import type { RequestArgs } from "./base";
|
|
|
18
18
|
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
19
19
|
import { RequiredError } from "./base";
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @export
|
|
24
|
-
*/
|
|
25
21
|
export const DUMMY_BASE_URL = 'https://example.com'
|
|
26
22
|
|
|
27
23
|
/**
|
|
28
24
|
*
|
|
29
25
|
* @throws {RequiredError}
|
|
30
|
-
* @export
|
|
31
26
|
*/
|
|
32
27
|
export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {
|
|
33
28
|
if (paramValue === null || paramValue === undefined) {
|
|
@@ -35,10 +30,6 @@ export const assertParamExists = function (functionName: string, paramName: stri
|
|
|
35
30
|
}
|
|
36
31
|
}
|
|
37
32
|
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @export
|
|
41
|
-
*/
|
|
42
33
|
export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {
|
|
43
34
|
if (configuration && configuration.apiKey) {
|
|
44
35
|
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
@@ -48,20 +39,12 @@ export const setApiKeyToObject = async function (object: any, keyParamName: stri
|
|
|
48
39
|
}
|
|
49
40
|
}
|
|
50
41
|
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @export
|
|
54
|
-
*/
|
|
55
42
|
export const setBasicAuthToObject = function (object: any, configuration?: Configuration) {
|
|
56
43
|
if (configuration && (configuration.username || configuration.password)) {
|
|
57
44
|
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
58
45
|
}
|
|
59
46
|
}
|
|
60
47
|
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @export
|
|
64
|
-
*/
|
|
65
48
|
export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {
|
|
66
49
|
if (configuration && configuration.accessToken) {
|
|
67
50
|
const accessToken = typeof configuration.accessToken === 'function'
|
|
@@ -71,10 +54,6 @@ export const setBearerAuthToObject = async function (object: any, configuration?
|
|
|
71
54
|
}
|
|
72
55
|
}
|
|
73
56
|
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* @export
|
|
77
|
-
*/
|
|
78
57
|
export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {
|
|
79
58
|
if (configuration && configuration.accessToken) {
|
|
80
59
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
@@ -84,32 +63,29 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|
|
84
63
|
}
|
|
85
64
|
}
|
|
86
65
|
|
|
66
|
+
|
|
87
67
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
88
68
|
if (parameter == null) return;
|
|
89
69
|
if (typeof parameter === "object") {
|
|
90
|
-
if (Array.isArray(parameter)) {
|
|
70
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
91
71
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
92
|
-
}
|
|
72
|
+
}
|
|
93
73
|
else {
|
|
94
|
-
Object.keys(parameter).forEach(currentKey =>
|
|
74
|
+
Object.keys(parameter).forEach(currentKey =>
|
|
95
75
|
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
|
|
96
76
|
);
|
|
97
77
|
}
|
|
98
|
-
}
|
|
78
|
+
}
|
|
99
79
|
else {
|
|
100
80
|
if (urlSearchParams.has(key)) {
|
|
101
81
|
urlSearchParams.append(key, parameter);
|
|
102
|
-
}
|
|
82
|
+
}
|
|
103
83
|
else {
|
|
104
84
|
urlSearchParams.set(key, parameter);
|
|
105
85
|
}
|
|
106
86
|
}
|
|
107
87
|
}
|
|
108
88
|
|
|
109
|
-
/**
|
|
110
|
-
*
|
|
111
|
-
* @export
|
|
112
|
-
*/
|
|
113
89
|
export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
114
90
|
const searchParams = new URLSearchParams(url.search);
|
|
115
91
|
setFlattenedQueryParams(searchParams, objects);
|
|
@@ -117,34 +93,36 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
|
117
93
|
}
|
|
118
94
|
|
|
119
95
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
96
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
97
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
98
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
122
99
|
*/
|
|
100
|
+
// @ts-ignore
|
|
101
|
+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
|
|
102
|
+
if (value instanceof Set) {
|
|
103
|
+
return Array.from(value);
|
|
104
|
+
} else {
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
123
109
|
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
124
110
|
const nonString = typeof value !== 'string';
|
|
125
111
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
126
112
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
127
113
|
: nonString;
|
|
128
114
|
return needsSerialization
|
|
129
|
-
? JSON.stringify(value !== undefined ? value : {})
|
|
115
|
+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
130
116
|
: (value || "");
|
|
131
117
|
}
|
|
132
118
|
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
* @export
|
|
136
|
-
*/
|
|
137
119
|
export const toPathString = function (url: URL) {
|
|
138
120
|
return url.pathname + url.search + url.hash
|
|
139
121
|
}
|
|
140
122
|
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
* @export
|
|
144
|
-
*/
|
|
145
123
|
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
146
|
-
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
124
|
+
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH): Promise<R> => {
|
|
147
125
|
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
|
|
148
|
-
return axios.request<T, R>(axiosRequestArgs)
|
|
126
|
+
return axios.request<T, R>(axiosRequestArgs) as Promise<R>;
|
|
149
127
|
};
|
|
150
128
|
}
|
package/configuration.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:
|
|
7
|
+
* The version of the OpenAPI document: 4.2.5-onprem
|
|
8
8
|
* Contact: platform@cosmotech.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -89,7 +89,12 @@ export class Configuration {
|
|
|
89
89
|
this.accessToken = param.accessToken;
|
|
90
90
|
this.basePath = param.basePath;
|
|
91
91
|
this.serverIndex = param.serverIndex;
|
|
92
|
-
this.baseOptions =
|
|
92
|
+
this.baseOptions = {
|
|
93
|
+
...param.baseOptions,
|
|
94
|
+
headers: {
|
|
95
|
+
...param.baseOptions?.headers,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
93
98
|
this.formDataCtor = param.formDataCtor;
|
|
94
99
|
}
|
|
95
100
|
|