@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.
Files changed (154) hide show
  1. package/.github/workflows/publish.yaml +13 -12
  2. package/.github/workflows/track_dependencies.yml +31 -0
  3. package/.openapi-generator/FILES +98 -0
  4. package/.openapi-generator/VERSION +1 -1
  5. package/README.md +210 -2
  6. package/api.ts +4650 -11656
  7. package/base.ts +2 -2
  8. package/common.ts +22 -44
  9. package/configuration.ts +7 -2
  10. package/dist/api.d.ts +2165 -6422
  11. package/dist/api.js +726 -7302
  12. package/dist/base.d.ts +1 -1
  13. package/dist/base.js +2 -2
  14. package/dist/common.d.ts +5 -36
  15. package/dist/common.js +17 -39
  16. package/dist/configuration.d.ts +1 -1
  17. package/dist/configuration.js +14 -2
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +1 -1
  20. package/docs/AboutInfo.md +21 -0
  21. package/docs/AboutInfoVersion.md +33 -0
  22. package/docs/ComponentRolePermissions.md +23 -0
  23. package/docs/Connector.md +41 -0
  24. package/docs/ConnectorApi.md +218 -0
  25. package/docs/ConnectorParameter.md +31 -0
  26. package/docs/ConnectorParameterGroup.md +25 -0
  27. package/docs/ContainerResourceSizeInfo.md +23 -0
  28. package/docs/ContainerResourceSizing.md +23 -0
  29. package/docs/CreateInfo.md +24 -0
  30. package/docs/CreatedRun.md +21 -0
  31. package/docs/Dataset.md +65 -0
  32. package/docs/DatasetAccessControl.md +23 -0
  33. package/docs/DatasetApi.md +1809 -0
  34. package/docs/DatasetCompatibility.md +25 -0
  35. package/docs/DatasetConnector.md +27 -0
  36. package/docs/DatasetCopyParameters.md +25 -0
  37. package/docs/DatasetCreateInfo.md +24 -0
  38. package/docs/DatasetCreateRequest.md +31 -0
  39. package/docs/DatasetEditInfo.md +22 -0
  40. package/docs/DatasetMemberGroup.md +25 -0
  41. package/docs/DatasetMemberUser.md +23 -0
  42. package/docs/DatasetMembers.md +23 -0
  43. package/docs/DatasetPart.md +43 -0
  44. package/docs/DatasetPartCreateRequest.md +31 -0
  45. package/docs/DatasetPartTypeEnum.md +11 -0
  46. package/docs/DatasetPartUpdateRequest.md +27 -0
  47. package/docs/DatasetRole.md +21 -0
  48. package/docs/DatasetSearch.md +21 -0
  49. package/docs/DatasetSecurity.md +23 -0
  50. package/docs/DatasetSourceType.md +19 -0
  51. package/docs/DatasetTwinGraphHash.md +21 -0
  52. package/docs/DatasetTwinGraphInfo.md +25 -0
  53. package/docs/DatasetTwinGraphQuery.md +21 -0
  54. package/docs/DatasetUpdateRequest.md +29 -0
  55. package/docs/DeleteHistoricalData.md +25 -0
  56. package/docs/EditInfo.md +22 -0
  57. package/docs/FileUploadMetadata.md +22 -0
  58. package/docs/FileUploadValidation.md +23 -0
  59. package/docs/GraphProperties.md +28 -0
  60. package/docs/IAMInfoApi.md +95 -0
  61. package/docs/IngestionStatusEnum.md +15 -0
  62. package/docs/IoTypesEnum.md +11 -0
  63. package/docs/LastRunInfo.md +23 -0
  64. package/docs/MemberGroup.md +25 -0
  65. package/docs/MemberUser.md +23 -0
  66. package/docs/Members.md +23 -0
  67. package/docs/MetaApi.md +52 -0
  68. package/docs/Organization.md +27 -0
  69. package/docs/OrganizationAccessControl.md +23 -0
  70. package/docs/OrganizationApi.md +758 -0
  71. package/docs/OrganizationCreateRequest.md +23 -0
  72. package/docs/OrganizationEditInfo.md +22 -0
  73. package/docs/OrganizationMemberGroup.md +25 -0
  74. package/docs/OrganizationMemberUser.md +23 -0
  75. package/docs/OrganizationMembers.md +23 -0
  76. package/docs/OrganizationRole.md +21 -0
  77. package/docs/OrganizationSecurity.md +23 -0
  78. package/docs/OrganizationUpdateRequest.md +21 -0
  79. package/docs/QueryResult.md +21 -0
  80. package/docs/ResourceSizeInfo.md +23 -0
  81. package/docs/Run.md +57 -0
  82. package/docs/RunApi.md +442 -0
  83. package/docs/RunContainer.md +41 -0
  84. package/docs/RunData.md +25 -0
  85. package/docs/RunDataQuery.md +21 -0
  86. package/docs/RunEditInfo.md +22 -0
  87. package/docs/RunLogs.md +23 -0
  88. package/docs/RunLogsEntry.md +21 -0
  89. package/docs/RunResourceRequested.md +23 -0
  90. package/docs/RunState.md +15 -0
  91. package/docs/RunStatus.md +47 -0
  92. package/docs/RunStatusNode.md +43 -0
  93. package/docs/RunTemplate.md +87 -0
  94. package/docs/RunTemplateCreateRequest.md +37 -0
  95. package/docs/RunTemplateOrchestrator.md +11 -0
  96. package/docs/RunTemplateParameter.md +35 -0
  97. package/docs/RunTemplateParameterCreateRequest.md +35 -0
  98. package/docs/RunTemplateParameterGroup.md +31 -0
  99. package/docs/RunTemplateParameterGroupCreateRequest.md +29 -0
  100. package/docs/RunTemplateParameterGroupUpdateRequest.md +27 -0
  101. package/docs/RunTemplateParameterUpdateRequest.md +33 -0
  102. package/docs/RunTemplateParameterValue.md +25 -0
  103. package/docs/RunTemplateResourceSizing.md +23 -0
  104. package/docs/RunTemplateStepSource.md +15 -0
  105. package/docs/RunTemplateUpdateRequest.md +35 -0
  106. package/docs/Runner.md +63 -0
  107. package/docs/RunnerAccessControl.md +23 -0
  108. package/docs/RunnerApi.md +908 -0
  109. package/docs/RunnerCreateRequest.md +45 -0
  110. package/docs/RunnerDatasets.md +24 -0
  111. package/docs/RunnerEditInfo.md +22 -0
  112. package/docs/RunnerMemberGroup.md +25 -0
  113. package/docs/RunnerMemberUser.md +23 -0
  114. package/docs/RunnerMembers.md +23 -0
  115. package/docs/RunnerResourceSizing.md +23 -0
  116. package/docs/RunnerRole.md +21 -0
  117. package/docs/RunnerRunTemplateParameterValue.md +27 -0
  118. package/docs/RunnerSecurity.md +23 -0
  119. package/docs/RunnerStatus.md +11 -0
  120. package/docs/RunnerUpdateRequest.md +41 -0
  121. package/docs/RunnerValidationStatus.md +15 -0
  122. package/docs/SendRunDataRequest.md +22 -0
  123. package/docs/Solution.md +53 -0
  124. package/docs/SolutionAccessControl.md +23 -0
  125. package/docs/SolutionApi.md +1159 -0
  126. package/docs/SolutionCreateRequest.md +43 -0
  127. package/docs/SolutionEditInfo.md +22 -0
  128. package/docs/SolutionFile.md +21 -0
  129. package/docs/SolutionMemberGroup.md +25 -0
  130. package/docs/SolutionMemberUser.md +23 -0
  131. package/docs/SolutionMembers.md +23 -0
  132. package/docs/SolutionRole.md +21 -0
  133. package/docs/SolutionSecurity.md +23 -0
  134. package/docs/SolutionUpdateRequest.md +41 -0
  135. package/docs/SourceInfo.md +27 -0
  136. package/docs/SubDatasetGraphQuery.md +27 -0
  137. package/docs/TwinGraphBatchResult.md +25 -0
  138. package/docs/TwincacheStatusEnum.md +11 -0
  139. package/docs/Workspace.md +57 -0
  140. package/docs/WorkspaceAccessControl.md +23 -0
  141. package/docs/WorkspaceApi.md +1162 -0
  142. package/docs/WorkspaceCreateRequest.md +35 -0
  143. package/docs/WorkspaceEditInfo.md +22 -0
  144. package/docs/WorkspaceFile.md +21 -0
  145. package/docs/WorkspaceMemberGroup.md +25 -0
  146. package/docs/WorkspaceMemberUser.md +23 -0
  147. package/docs/WorkspaceMembers.md +23 -0
  148. package/docs/WorkspaceRole.md +21 -0
  149. package/docs/WorkspaceSecurity.md +23 -0
  150. package/docs/WorkspaceSolution.md +25 -0
  151. package/docs/WorkspaceUpdateRequest.md +31 -0
  152. package/docs/WorkspaceWebApp.md +25 -0
  153. package/index.ts +1 -1
  154. 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: 3.3.4
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 = "https://dev.api.cosmotech.com".replace(/\/+$/, "");
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: 3.3.4
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
- * @export
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: 3.3.4
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 = param.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