cosmotech-api 4.0.0.dev8__py3-none-any.whl → 5.0.0b3__py3-none-any.whl

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.

Potentially problematic release.


This version of cosmotech-api might be problematic. Click here for more details.

Files changed (280) hide show
  1. cosmotech_api/__init__.py +32 -27
  2. cosmotech_api/api/__init__.py +1 -1
  3. cosmotech_api/api/connector_api.py +19 -8
  4. cosmotech_api/api/dataset_api.py +1496 -4126
  5. cosmotech_api/api/meta_api.py +281 -0
  6. cosmotech_api/api/organization_api.py +605 -562
  7. cosmotech_api/api/run_api.py +42 -22
  8. cosmotech_api/api/runner_api.py +512 -467
  9. cosmotech_api/api/scenario_api.py +141 -121
  10. cosmotech_api/api/scenariorun_api.py +76 -66
  11. cosmotech_api/api/scenariorunresult_api.py +1 -1
  12. cosmotech_api/api/solution_api.py +2980 -795
  13. cosmotech_api/api/twingraph_api.py +83 -72
  14. cosmotech_api/api/validator_api.py +1 -1
  15. cosmotech_api/api/workspace_api.py +795 -1331
  16. cosmotech_api/api_client.py +14 -5
  17. cosmotech_api/configuration.py +167 -40
  18. cosmotech_api/exceptions.py +18 -1
  19. cosmotech_api/model/component_role_permissions.py +1 -1
  20. cosmotech_api/model/connector.py +1 -1
  21. cosmotech_api/model/connector_parameter.py +1 -1
  22. cosmotech_api/model/connector_parameter_group.py +1 -1
  23. cosmotech_api/model/container_resource_size_info.py +1 -1
  24. cosmotech_api/model/container_resource_sizing.py +1 -1
  25. cosmotech_api/model/dataset.py +1 -1
  26. cosmotech_api/model/dataset_access_control.py +1 -1
  27. cosmotech_api/model/dataset_compatibility.py +1 -1
  28. cosmotech_api/model/dataset_connector.py +1 -1
  29. cosmotech_api/model/dataset_copy_parameters.py +1 -1
  30. cosmotech_api/model/dataset_role.py +1 -1
  31. cosmotech_api/model/dataset_search.py +1 -1
  32. cosmotech_api/model/dataset_security.py +1 -1
  33. cosmotech_api/model/dataset_source_type.py +1 -1
  34. cosmotech_api/model/dataset_twin_graph_hash.py +1 -1
  35. cosmotech_api/model/dataset_twin_graph_info.py +1 -1
  36. cosmotech_api/model/dataset_twin_graph_query.py +1 -1
  37. cosmotech_api/model/delete_historical_data.py +1 -1
  38. cosmotech_api/model/file_upload_metadata.py +1 -1
  39. cosmotech_api/model/file_upload_validation.py +1 -1
  40. cosmotech_api/model/graph_properties.py +1 -1
  41. cosmotech_api/model/organization.py +1 -1
  42. cosmotech_api/model/organization_access_control.py +1 -1
  43. cosmotech_api/model/organization_role.py +1 -1
  44. cosmotech_api/model/organization_security.py +1 -1
  45. cosmotech_api/model/organization_service.py +1 -1
  46. cosmotech_api/model/organization_services.py +1 -1
  47. cosmotech_api/model/resource_size_info.py +1 -1
  48. cosmotech_api/model/run.py +1 -1
  49. cosmotech_api/model/run_container.py +1 -1
  50. cosmotech_api/model/run_container_artifact.py +1 -1
  51. cosmotech_api/model/run_container_logs.py +1 -1
  52. cosmotech_api/model/run_logs.py +1 -1
  53. cosmotech_api/model/run_resource_requested.py +1 -1
  54. cosmotech_api/model/run_search.py +1 -1
  55. cosmotech_api/model/run_start_containers.py +1 -1
  56. cosmotech_api/model/run_state.py +1 -1
  57. cosmotech_api/model/run_status.py +1 -1
  58. cosmotech_api/model/run_status_node.py +1 -1
  59. cosmotech_api/model/run_template.py +1 -1
  60. cosmotech_api/model/run_template_handler_id.py +1 -1
  61. cosmotech_api/model/run_template_orchestrator.py +1 -1
  62. cosmotech_api/model/run_template_parameter.py +1 -1
  63. cosmotech_api/model/run_template_parameter_group.py +1 -1
  64. cosmotech_api/model/run_template_parameter_value.py +1 -1
  65. cosmotech_api/model/run_template_resource_sizing.py +1 -1
  66. cosmotech_api/model/run_template_step_source.py +1 -1
  67. cosmotech_api/model/runner.py +1 -1
  68. cosmotech_api/model/runner_access_control.py +1 -1
  69. cosmotech_api/model/runner_changed_parameter_value.py +1 -1
  70. cosmotech_api/model/runner_comparison_result.py +1 -1
  71. cosmotech_api/model/runner_data_download_info.py +1 -1
  72. cosmotech_api/model/runner_data_download_job.py +1 -1
  73. cosmotech_api/model/runner_job_state.py +1 -1
  74. cosmotech_api/model/runner_last_run.py +1 -1
  75. cosmotech_api/model/runner_resource_sizing.py +1 -1
  76. cosmotech_api/model/runner_role.py +1 -1
  77. cosmotech_api/model/runner_run_template_parameter_value.py +1 -1
  78. cosmotech_api/model/runner_security.py +1 -1
  79. cosmotech_api/model/runner_validation_status.py +1 -1
  80. cosmotech_api/model/scenario.py +1 -1
  81. cosmotech_api/model/scenario_access_control.py +1 -1
  82. cosmotech_api/model/scenario_changed_parameter_value.py +1 -1
  83. cosmotech_api/model/scenario_comparison_result.py +1 -1
  84. cosmotech_api/model/scenario_data_download_info.py +1 -1
  85. cosmotech_api/model/scenario_data_download_job.py +1 -1
  86. cosmotech_api/model/scenario_job_state.py +1 -1
  87. cosmotech_api/model/scenario_last_run.py +1 -1
  88. cosmotech_api/model/scenario_resource_sizing.py +1 -1
  89. cosmotech_api/model/scenario_role.py +1 -1
  90. cosmotech_api/model/scenario_run.py +1 -1
  91. cosmotech_api/model/scenario_run_container.py +1 -1
  92. cosmotech_api/model/scenario_run_container_artifact.py +1 -1
  93. cosmotech_api/model/scenario_run_container_logs.py +1 -1
  94. cosmotech_api/model/scenario_run_logs.py +1 -1
  95. cosmotech_api/model/scenario_run_resource_requested.py +1 -1
  96. cosmotech_api/model/scenario_run_result.py +1 -1
  97. cosmotech_api/model/scenario_run_search.py +1 -1
  98. cosmotech_api/model/scenario_run_start_containers.py +1 -1
  99. cosmotech_api/model/scenario_run_state.py +1 -1
  100. cosmotech_api/model/scenario_run_status.py +1 -1
  101. cosmotech_api/model/scenario_run_status_node.py +1 -1
  102. cosmotech_api/model/scenario_run_template_parameter_value.py +1 -1
  103. cosmotech_api/model/scenario_security.py +1 -1
  104. cosmotech_api/model/scenario_validation_status.py +1 -1
  105. cosmotech_api/model/solution.py +1 -1
  106. cosmotech_api/model/solution_access_control.py +1 -1
  107. cosmotech_api/model/solution_role.py +1 -1
  108. cosmotech_api/model/solution_security.py +1 -1
  109. cosmotech_api/model/source_info.py +1 -1
  110. cosmotech_api/model/sub_dataset_graph_query.py +1 -1
  111. cosmotech_api/model/translated_labels.py +1 -1
  112. cosmotech_api/model/twin_graph_batch_result.py +1 -1
  113. cosmotech_api/model/twin_graph_hash.py +1 -1
  114. cosmotech_api/model/twin_graph_query.py +1 -1
  115. cosmotech_api/model/validator.py +1 -1
  116. cosmotech_api/model/validator_run.py +1 -1
  117. cosmotech_api/model/workspace.py +1 -1
  118. cosmotech_api/model/workspace_access_control.py +1 -1
  119. cosmotech_api/model/workspace_file.py +1 -1
  120. cosmotech_api/model/workspace_role.py +1 -1
  121. cosmotech_api/model/workspace_secret.py +1 -1
  122. cosmotech_api/model/workspace_security.py +1 -1
  123. cosmotech_api/model/workspace_solution.py +1 -1
  124. cosmotech_api/model/workspace_web_app.py +1 -1
  125. cosmotech_api/model_utils.py +1 -1
  126. cosmotech_api/models/__init__.py +31 -26
  127. cosmotech_api/models/about_info.py +92 -0
  128. cosmotech_api/models/about_info_version.py +100 -0
  129. cosmotech_api/models/component_role_permissions.py +5 -5
  130. cosmotech_api/models/connector.py +1 -1
  131. cosmotech_api/models/connector_parameter.py +1 -1
  132. cosmotech_api/models/connector_parameter_group.py +1 -1
  133. cosmotech_api/models/container_resource_size_info.py +1 -1
  134. cosmotech_api/models/container_resource_sizing.py +1 -1
  135. cosmotech_api/models/create_info.py +103 -0
  136. cosmotech_api/models/created_run.py +2 -2
  137. cosmotech_api/models/dataset.py +42 -81
  138. cosmotech_api/models/dataset_access_control.py +1 -1
  139. cosmotech_api/models/dataset_compatibility.py +1 -1
  140. cosmotech_api/models/dataset_connector.py +1 -1
  141. cosmotech_api/models/dataset_copy_parameters.py +1 -1
  142. cosmotech_api/models/dataset_create_request.py +121 -0
  143. cosmotech_api/models/dataset_part.py +130 -0
  144. cosmotech_api/models/dataset_part_create_request.py +98 -0
  145. cosmotech_api/models/dataset_part_type_enum.py +38 -0
  146. cosmotech_api/models/dataset_part_update_request.py +90 -0
  147. cosmotech_api/models/dataset_role.py +1 -1
  148. cosmotech_api/models/dataset_search.py +1 -1
  149. cosmotech_api/models/dataset_security.py +1 -1
  150. cosmotech_api/models/dataset_source_type.py +1 -1
  151. cosmotech_api/models/dataset_twin_graph_hash.py +1 -1
  152. cosmotech_api/models/dataset_twin_graph_info.py +1 -1
  153. cosmotech_api/models/dataset_twin_graph_query.py +1 -1
  154. cosmotech_api/models/dataset_update_request.py +109 -0
  155. cosmotech_api/models/delete_historical_data.py +1 -1
  156. cosmotech_api/models/edit_info.py +90 -0
  157. cosmotech_api/models/file_upload_metadata.py +1 -1
  158. cosmotech_api/models/file_upload_validation.py +1 -1
  159. cosmotech_api/models/graph_properties.py +1 -1
  160. cosmotech_api/models/ingestion_status_enum.py +1 -1
  161. cosmotech_api/models/io_types_enum.py +1 -1
  162. cosmotech_api/models/last_run_info.py +100 -0
  163. cosmotech_api/models/organization.py +18 -11
  164. cosmotech_api/models/organization_access_control.py +4 -4
  165. cosmotech_api/models/organization_create_request.py +95 -0
  166. cosmotech_api/models/organization_edit_info.py +90 -0
  167. cosmotech_api/models/organization_role.py +3 -3
  168. cosmotech_api/models/organization_security.py +4 -4
  169. cosmotech_api/models/organization_service.py +7 -7
  170. cosmotech_api/models/organization_services.py +7 -7
  171. cosmotech_api/models/organization_update_request.py +89 -0
  172. cosmotech_api/models/query_result.py +1 -1
  173. cosmotech_api/models/resource_size_info.py +1 -1
  174. cosmotech_api/models/run.py +8 -10
  175. cosmotech_api/models/run_container.py +1 -1
  176. cosmotech_api/models/run_container_artifact.py +7 -7
  177. cosmotech_api/models/run_container_logs.py +7 -7
  178. cosmotech_api/models/run_data.py +2 -2
  179. cosmotech_api/models/run_data_query.py +1 -1
  180. cosmotech_api/models/run_edit_info.py +90 -0
  181. cosmotech_api/models/run_logs.py +1 -1
  182. cosmotech_api/models/run_logs_entry.py +1 -1
  183. cosmotech_api/models/run_resource_requested.py +1 -1
  184. cosmotech_api/models/run_search.py +7 -7
  185. cosmotech_api/models/run_search_state.py +1 -1
  186. cosmotech_api/models/run_start_containers.py +10 -10
  187. cosmotech_api/models/run_state.py +2 -1
  188. cosmotech_api/models/run_status.py +8 -2
  189. cosmotech_api/models/run_status_node.py +1 -1
  190. cosmotech_api/models/run_template.py +14 -69
  191. cosmotech_api/models/run_template_create_request.py +109 -0
  192. cosmotech_api/models/run_template_handler_id.py +1 -1
  193. cosmotech_api/models/run_template_orchestrator.py +1 -1
  194. cosmotech_api/models/run_template_parameter.py +14 -11
  195. cosmotech_api/models/run_template_parameter_create_request.py +105 -0
  196. cosmotech_api/models/run_template_parameter_group.py +12 -9
  197. cosmotech_api/models/run_template_parameter_group_create_request.py +101 -0
  198. cosmotech_api/models/run_template_parameter_group_update_request.py +98 -0
  199. cosmotech_api/models/run_template_parameter_update_request.py +103 -0
  200. cosmotech_api/models/run_template_parameter_value.py +1 -1
  201. cosmotech_api/models/run_template_resource_sizing.py +2 -2
  202. cosmotech_api/models/run_template_step_source.py +1 -1
  203. cosmotech_api/models/run_template_update_request.py +107 -0
  204. cosmotech_api/models/runner.py +31 -28
  205. cosmotech_api/models/runner_access_control.py +1 -1
  206. cosmotech_api/models/runner_changed_parameter_value.py +7 -7
  207. cosmotech_api/models/runner_comparison_result.py +10 -10
  208. cosmotech_api/models/runner_create_request.py +154 -0
  209. cosmotech_api/models/runner_data_download_info.py +12 -9
  210. cosmotech_api/models/runner_data_download_job.py +7 -7
  211. cosmotech_api/models/runner_edit_info.py +90 -0
  212. cosmotech_api/models/runner_job_state.py +1 -1
  213. cosmotech_api/models/runner_last_run.py +7 -7
  214. cosmotech_api/models/runner_parent_last_run.py +7 -7
  215. cosmotech_api/models/runner_resource_sizing.py +1 -1
  216. cosmotech_api/models/runner_role.py +1 -1
  217. cosmotech_api/models/runner_root_last_run.py +7 -7
  218. cosmotech_api/models/runner_run_template_parameter_value.py +1 -1
  219. cosmotech_api/models/runner_security.py +1 -1
  220. cosmotech_api/models/runner_update_request.py +123 -0
  221. cosmotech_api/models/runner_validation_status.py +1 -1
  222. cosmotech_api/models/scenario.py +10 -10
  223. cosmotech_api/models/scenario_access_control.py +7 -7
  224. cosmotech_api/models/scenario_changed_parameter_value.py +7 -7
  225. cosmotech_api/models/scenario_comparison_result.py +10 -10
  226. cosmotech_api/models/scenario_data_download_info.py +7 -7
  227. cosmotech_api/models/scenario_data_download_job.py +7 -7
  228. cosmotech_api/models/scenario_job_state.py +1 -1
  229. cosmotech_api/models/scenario_last_run.py +7 -7
  230. cosmotech_api/models/scenario_resource_sizing.py +7 -7
  231. cosmotech_api/models/scenario_role.py +7 -7
  232. cosmotech_api/models/scenario_run.py +13 -13
  233. cosmotech_api/models/scenario_run_container.py +10 -10
  234. cosmotech_api/models/scenario_run_container_artifact.py +7 -7
  235. cosmotech_api/models/scenario_run_container_logs.py +7 -7
  236. cosmotech_api/models/scenario_run_logs.py +10 -10
  237. cosmotech_api/models/scenario_run_resource_requested.py +7 -7
  238. cosmotech_api/models/scenario_run_search.py +7 -7
  239. cosmotech_api/models/scenario_run_search_state.py +1 -1
  240. cosmotech_api/models/scenario_run_start_containers.py +10 -10
  241. cosmotech_api/models/scenario_run_state.py +1 -1
  242. cosmotech_api/models/scenario_run_status.py +10 -10
  243. cosmotech_api/models/scenario_run_status_node.py +7 -7
  244. cosmotech_api/models/scenario_run_template_parameter_value.py +7 -7
  245. cosmotech_api/models/scenario_security.py +10 -10
  246. cosmotech_api/models/scenario_validation_status.py +1 -1
  247. cosmotech_api/models/send_run_data_request.py +5 -5
  248. cosmotech_api/models/solution.py +45 -29
  249. cosmotech_api/models/solution_access_control.py +4 -4
  250. cosmotech_api/models/solution_create_request.py +139 -0
  251. cosmotech_api/models/solution_edit_info.py +90 -0
  252. cosmotech_api/models/solution_role.py +3 -3
  253. cosmotech_api/models/solution_security.py +4 -4
  254. cosmotech_api/models/solution_update_request.py +133 -0
  255. cosmotech_api/models/source_info.py +1 -1
  256. cosmotech_api/models/sub_dataset_graph_query.py +1 -1
  257. cosmotech_api/models/twin_graph_batch_result.py +1 -1
  258. cosmotech_api/models/twin_graph_hash.py +7 -7
  259. cosmotech_api/models/twin_graph_query.py +7 -7
  260. cosmotech_api/models/twincache_status_enum.py +1 -1
  261. cosmotech_api/models/validator.py +7 -7
  262. cosmotech_api/models/workspace.py +38 -30
  263. cosmotech_api/models/workspace_access_control.py +4 -4
  264. cosmotech_api/models/workspace_create_request.py +117 -0
  265. cosmotech_api/models/workspace_edit_info.py +90 -0
  266. cosmotech_api/models/workspace_file.py +4 -4
  267. cosmotech_api/models/workspace_role.py +3 -3
  268. cosmotech_api/models/workspace_secret.py +7 -7
  269. cosmotech_api/models/workspace_security.py +4 -4
  270. cosmotech_api/models/workspace_solution.py +14 -6
  271. cosmotech_api/models/workspace_update_request.py +109 -0
  272. cosmotech_api/models/workspace_web_app.py +4 -4
  273. cosmotech_api/rest.py +3 -2
  274. cosmotech_api-5.0.0b3.dist-info/METADATA +27 -0
  275. cosmotech_api-5.0.0b3.dist-info/RECORD +293 -0
  276. {cosmotech_api-4.0.0.dev8.dist-info → cosmotech_api-5.0.0b3.dist-info}/WHEEL +1 -1
  277. {cosmotech_api-4.0.0.dev8.dist-info → cosmotech_api-5.0.0b3.dist-info/licenses}/LICENSE +1 -1
  278. cosmotech_api-4.0.0.dev8.dist-info/METADATA +0 -18
  279. cosmotech_api-4.0.0.dev8.dist-info/RECORD +0 -262
  280. {cosmotech_api-4.0.0.dev8.dist-info → cosmotech_api-5.0.0b3.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
  Cosmo Tech Platform API
7
7
 
8
- The version of the OpenAPI document: 4.0.0-onprem.8
8
+ The version of the OpenAPI document: 5.0.0-beta3
9
9
  Contact: platform@cosmotech.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -405,12 +405,12 @@ class ApiClient:
405
405
  data = json.loads(response_text)
406
406
  except ValueError:
407
407
  data = response_text
408
- elif content_type.startswith("application/json"):
408
+ elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
409
409
  if response_text == "":
410
410
  data = ""
411
411
  else:
412
412
  data = json.loads(response_text)
413
- elif content_type.startswith("text/plain"):
413
+ elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
414
414
  data = response_text
415
415
  else:
416
416
  raise ApiException(
@@ -518,7 +518,7 @@ class ApiClient:
518
518
  if k in collection_formats:
519
519
  collection_format = collection_formats[k]
520
520
  if collection_format == 'multi':
521
- new_params.extend((k, str(value)) for value in v)
521
+ new_params.extend((k, quote(str(value))) for value in v)
522
522
  else:
523
523
  if collection_format == 'ssv':
524
524
  delimiter = ' '
@@ -536,7 +536,10 @@ class ApiClient:
536
536
 
537
537
  return "&".join(["=".join(map(str, item)) for item in new_params])
538
538
 
539
- def files_parameters(self, files: Dict[str, Union[str, bytes]]):
539
+ def files_parameters(
540
+ self,
541
+ files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
542
+ ):
540
543
  """Builds form parameters.
541
544
 
542
545
  :param files: File parameters.
@@ -551,6 +554,12 @@ class ApiClient:
551
554
  elif isinstance(v, bytes):
552
555
  filename = k
553
556
  filedata = v
557
+ elif isinstance(v, tuple):
558
+ filename, filedata = v
559
+ elif isinstance(v, list):
560
+ for file_param in v:
561
+ params.extend(self.files_parameters({k: file_param}))
562
+ continue
554
563
  else:
555
564
  raise ValueError("Unsupported file value")
556
565
  mimetype = (
@@ -5,7 +5,7 @@
5
5
 
6
6
  Cosmo Tech Platform API
7
7
 
8
- The version of the OpenAPI document: 4.0.0-onprem.8
8
+ The version of the OpenAPI document: 5.0.0-beta3
9
9
  Contact: platform@cosmotech.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -14,14 +14,16 @@
14
14
 
15
15
 
16
16
  import copy
17
+ import http.client as httplib
17
18
  import logging
18
19
  from logging import FileHandler
19
20
  import multiprocessing
20
21
  import sys
21
- from typing import Optional
22
+ from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
23
+ from typing_extensions import NotRequired, Self
24
+
22
25
  import urllib3
23
26
 
24
- import http.client as httplib
25
27
 
26
28
  JSON_SCHEMA_VALIDATION_KEYWORDS = {
27
29
  'multipleOf', 'maximum', 'exclusiveMaximum',
@@ -29,6 +31,107 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
29
31
  'minLength', 'pattern', 'maxItems', 'minItems'
30
32
  }
31
33
 
34
+ ServerVariablesT = Dict[str, str]
35
+
36
+ GenericAuthSetting = TypedDict(
37
+ "GenericAuthSetting",
38
+ {
39
+ "type": str,
40
+ "in": str,
41
+ "key": str,
42
+ "value": str,
43
+ },
44
+ )
45
+
46
+
47
+ OAuth2AuthSetting = TypedDict(
48
+ "OAuth2AuthSetting",
49
+ {
50
+ "type": Literal["oauth2"],
51
+ "in": Literal["header"],
52
+ "key": Literal["Authorization"],
53
+ "value": str,
54
+ },
55
+ )
56
+
57
+
58
+ APIKeyAuthSetting = TypedDict(
59
+ "APIKeyAuthSetting",
60
+ {
61
+ "type": Literal["api_key"],
62
+ "in": str,
63
+ "key": str,
64
+ "value": Optional[str],
65
+ },
66
+ )
67
+
68
+
69
+ BasicAuthSetting = TypedDict(
70
+ "BasicAuthSetting",
71
+ {
72
+ "type": Literal["basic"],
73
+ "in": Literal["header"],
74
+ "key": Literal["Authorization"],
75
+ "value": Optional[str],
76
+ },
77
+ )
78
+
79
+
80
+ BearerFormatAuthSetting = TypedDict(
81
+ "BearerFormatAuthSetting",
82
+ {
83
+ "type": Literal["bearer"],
84
+ "in": Literal["header"],
85
+ "format": Literal["JWT"],
86
+ "key": Literal["Authorization"],
87
+ "value": str,
88
+ },
89
+ )
90
+
91
+
92
+ BearerAuthSetting = TypedDict(
93
+ "BearerAuthSetting",
94
+ {
95
+ "type": Literal["bearer"],
96
+ "in": Literal["header"],
97
+ "key": Literal["Authorization"],
98
+ "value": str,
99
+ },
100
+ )
101
+
102
+
103
+ HTTPSignatureAuthSetting = TypedDict(
104
+ "HTTPSignatureAuthSetting",
105
+ {
106
+ "type": Literal["http-signature"],
107
+ "in": Literal["header"],
108
+ "key": Literal["Authorization"],
109
+ "value": None,
110
+ },
111
+ )
112
+
113
+
114
+ AuthSettings = TypedDict(
115
+ "AuthSettings",
116
+ {
117
+ "oAuth2AuthCode": OAuth2AuthSetting,
118
+ },
119
+ total=False,
120
+ )
121
+
122
+
123
+ class HostSettingVariable(TypedDict):
124
+ description: str
125
+ default_value: str
126
+ enum_values: List[str]
127
+
128
+
129
+ class HostSetting(TypedDict):
130
+ url: str
131
+ description: str
132
+ variables: NotRequired[Dict[str, HostSettingVariable]]
133
+
134
+
32
135
  class Configuration:
33
136
  """This class contains various settings of the API client.
34
137
 
@@ -59,27 +162,36 @@ class Configuration:
59
162
  :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
60
163
  in PEM format.
61
164
  :param retries: Number of retries for API requests.
165
+ :param ca_cert_data: verify the peer using concatenated CA certificate data
166
+ in PEM (str) or DER (bytes) format.
62
167
 
63
168
  :Example:
64
169
  """
65
170
 
66
- _default = None
67
-
68
- def __init__(self, host=None,
69
- api_key=None, api_key_prefix=None,
70
- username=None, password=None,
71
- access_token=None,
72
- server_index=None, server_variables=None,
73
- server_operation_index=None, server_operation_variables=None,
74
- ignore_operation_servers=False,
75
- ssl_ca_cert=None,
76
- retries=None,
77
- *,
78
- debug: Optional[bool] = None
79
- ) -> None:
171
+ _default: ClassVar[Optional[Self]] = None
172
+
173
+ def __init__(
174
+ self,
175
+ host: Optional[str]=None,
176
+ api_key: Optional[Dict[str, str]]=None,
177
+ api_key_prefix: Optional[Dict[str, str]]=None,
178
+ username: Optional[str]=None,
179
+ password: Optional[str]=None,
180
+ access_token: Optional[str]=None,
181
+ server_index: Optional[int]=None,
182
+ server_variables: Optional[ServerVariablesT]=None,
183
+ server_operation_index: Optional[Dict[int, int]]=None,
184
+ server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
185
+ ignore_operation_servers: bool=False,
186
+ ssl_ca_cert: Optional[str]=None,
187
+ retries: Optional[int] = None,
188
+ ca_cert_data: Optional[Union[str, bytes]] = None,
189
+ *,
190
+ debug: Optional[bool] = None,
191
+ ) -> None:
80
192
  """Constructor
81
193
  """
82
- self._base_path = "http://localhost" if host is None else host
194
+ self._base_path = "http://localhost:8080" if host is None else host
83
195
  """Default Base url
84
196
  """
85
197
  self.server_index = 0 if server_index is None and host is None else server_index
@@ -151,6 +263,10 @@ class Configuration:
151
263
  self.ssl_ca_cert = ssl_ca_cert
152
264
  """Set this to customize the certificate file to verify the peer.
153
265
  """
266
+ self.ca_cert_data = ca_cert_data
267
+ """Set this to verify the peer using PEM (str) or DER (bytes)
268
+ certificate data.
269
+ """
154
270
  self.cert_file = None
155
271
  """client certificate file
156
272
  """
@@ -200,7 +316,7 @@ class Configuration:
200
316
  """date format
201
317
  """
202
318
 
203
- def __deepcopy__(self, memo):
319
+ def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
204
320
  cls = self.__class__
205
321
  result = cls.__new__(cls)
206
322
  memo[id(self)] = result
@@ -214,11 +330,11 @@ class Configuration:
214
330
  result.debug = self.debug
215
331
  return result
216
332
 
217
- def __setattr__(self, name, value):
333
+ def __setattr__(self, name: str, value: Any) -> None:
218
334
  object.__setattr__(self, name, value)
219
335
 
220
336
  @classmethod
221
- def set_default(cls, default):
337
+ def set_default(cls, default: Optional[Self]) -> None:
222
338
  """Set default instance of configuration.
223
339
 
224
340
  It stores default configuration, which can be
@@ -229,7 +345,7 @@ class Configuration:
229
345
  cls._default = default
230
346
 
231
347
  @classmethod
232
- def get_default_copy(cls):
348
+ def get_default_copy(cls) -> Self:
233
349
  """Deprecated. Please use `get_default` instead.
234
350
 
235
351
  Deprecated. Please use `get_default` instead.
@@ -239,7 +355,7 @@ class Configuration:
239
355
  return cls.get_default()
240
356
 
241
357
  @classmethod
242
- def get_default(cls):
358
+ def get_default(cls) -> Self:
243
359
  """Return the default configuration.
244
360
 
245
361
  This method returns newly created, based on default constructor,
@@ -249,11 +365,11 @@ class Configuration:
249
365
  :return: The configuration object.
250
366
  """
251
367
  if cls._default is None:
252
- cls._default = Configuration()
368
+ cls._default = cls()
253
369
  return cls._default
254
370
 
255
371
  @property
256
- def logger_file(self):
372
+ def logger_file(self) -> Optional[str]:
257
373
  """The logger file.
258
374
 
259
375
  If the logger_file is None, then add stream handler and remove file
@@ -265,7 +381,7 @@ class Configuration:
265
381
  return self.__logger_file
266
382
 
267
383
  @logger_file.setter
268
- def logger_file(self, value):
384
+ def logger_file(self, value: Optional[str]) -> None:
269
385
  """The logger file.
270
386
 
271
387
  If the logger_file is None, then add stream handler and remove file
@@ -284,7 +400,7 @@ class Configuration:
284
400
  logger.addHandler(self.logger_file_handler)
285
401
 
286
402
  @property
287
- def debug(self):
403
+ def debug(self) -> bool:
288
404
  """Debug status
289
405
 
290
406
  :param value: The debug status, True or False.
@@ -293,7 +409,7 @@ class Configuration:
293
409
  return self.__debug
294
410
 
295
411
  @debug.setter
296
- def debug(self, value):
412
+ def debug(self, value: bool) -> None:
297
413
  """Debug status
298
414
 
299
415
  :param value: The debug status, True or False.
@@ -315,7 +431,7 @@ class Configuration:
315
431
  httplib.HTTPConnection.debuglevel = 0
316
432
 
317
433
  @property
318
- def logger_format(self):
434
+ def logger_format(self) -> str:
319
435
  """The logger format.
320
436
 
321
437
  The logger_formatter will be updated when sets logger_format.
@@ -326,7 +442,7 @@ class Configuration:
326
442
  return self.__logger_format
327
443
 
328
444
  @logger_format.setter
329
- def logger_format(self, value):
445
+ def logger_format(self, value: str) -> None:
330
446
  """The logger format.
331
447
 
332
448
  The logger_formatter will be updated when sets logger_format.
@@ -337,7 +453,7 @@ class Configuration:
337
453
  self.__logger_format = value
338
454
  self.logger_formatter = logging.Formatter(self.__logger_format)
339
455
 
340
- def get_api_key_with_prefix(self, identifier, alias=None):
456
+ def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
341
457
  """Gets API key (with prefix if set).
342
458
 
343
459
  :param identifier: The identifier of apiKey.
@@ -354,7 +470,9 @@ class Configuration:
354
470
  else:
355
471
  return key
356
472
 
357
- def get_basic_auth_token(self):
473
+ return None
474
+
475
+ def get_basic_auth_token(self) -> Optional[str]:
358
476
  """Gets HTTP basic authentication header (string).
359
477
 
360
478
  :return: The token for basic HTTP authentication.
@@ -369,12 +487,12 @@ class Configuration:
369
487
  basic_auth=username + ':' + password
370
488
  ).get('authorization')
371
489
 
372
- def auth_settings(self):
490
+ def auth_settings(self)-> AuthSettings:
373
491
  """Gets Auth Settings dict for api client.
374
492
 
375
493
  :return: The Auth Settings information dict.
376
494
  """
377
- auth = {}
495
+ auth: AuthSettings = {}
378
496
  if self.access_token is not None:
379
497
  auth['oAuth2AuthCode'] = {
380
498
  'type': 'oauth2',
@@ -384,7 +502,7 @@ class Configuration:
384
502
  }
385
503
  return auth
386
504
 
387
- def to_debug_report(self):
505
+ def to_debug_report(self) -> str:
388
506
  """Gets the essential information for debugging.
389
507
 
390
508
  :return: The report for debugging.
@@ -392,23 +510,32 @@ class Configuration:
392
510
  return "Python SDK Debug Report:\n"\
393
511
  "OS: {env}\n"\
394
512
  "Python Version: {pyversion}\n"\
395
- "Version of the API: 4.0.0-onprem.8\n"\
513
+ "Version of the API: 5.0.0-beta3\n"\
396
514
  "SDK Package Version: 1.0.0".\
397
515
  format(env=sys.platform, pyversion=sys.version)
398
516
 
399
- def get_host_settings(self):
517
+ def get_host_settings(self) -> List[HostSetting]:
400
518
  """Gets an array of host settings
401
519
 
402
520
  :return: An array of host settings
403
521
  """
404
522
  return [
523
+ {
524
+ 'url': "http://localhost:8080",
525
+ 'description': "No description provided",
526
+ },
405
527
  {
406
528
  'url': "",
407
529
  'description': "No description provided",
408
530
  }
409
531
  ]
410
532
 
411
- def get_host_from_settings(self, index, variables=None, servers=None):
533
+ def get_host_from_settings(
534
+ self,
535
+ index: Optional[int],
536
+ variables: Optional[ServerVariablesT]=None,
537
+ servers: Optional[List[HostSetting]]=None,
538
+ ) -> str:
412
539
  """Gets host URL based on the index and variables
413
540
  :param index: array index of the host settings
414
541
  :param variables: hash of variable and the corresponding value
@@ -448,12 +575,12 @@ class Configuration:
448
575
  return url
449
576
 
450
577
  @property
451
- def host(self):
578
+ def host(self) -> str:
452
579
  """Return generated host."""
453
580
  return self.get_host_from_settings(self.server_index, variables=self.server_variables)
454
581
 
455
582
  @host.setter
456
- def host(self, value):
583
+ def host(self, value: str) -> None:
457
584
  """Fix base path."""
458
585
  self._base_path = value
459
586
  self.server_index = None
@@ -5,7 +5,7 @@
5
5
 
6
6
  Cosmo Tech Platform API
7
7
 
8
- The version of the OpenAPI document: 4.0.0-onprem.8
8
+ The version of the OpenAPI document: 5.0.0-beta3
9
9
  Contact: platform@cosmotech.com
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
@@ -151,6 +151,13 @@ class ApiException(OpenApiException):
151
151
  if http_resp.status == 404:
152
152
  raise NotFoundException(http_resp=http_resp, body=body, data=data)
153
153
 
154
+ # Added new conditions for 409 and 422
155
+ if http_resp.status == 409:
156
+ raise ConflictException(http_resp=http_resp, body=body, data=data)
157
+
158
+ if http_resp.status == 422:
159
+ raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
160
+
154
161
  if 500 <= http_resp.status <= 599:
155
162
  raise ServiceException(http_resp=http_resp, body=body, data=data)
156
163
  raise ApiException(http_resp=http_resp, body=body, data=data)
@@ -189,6 +196,16 @@ class ServiceException(ApiException):
189
196
  pass
190
197
 
191
198
 
199
+ class ConflictException(ApiException):
200
+ """Exception for HTTP 409 Conflict."""
201
+ pass
202
+
203
+
204
+ class UnprocessableEntityException(ApiException):
205
+ """Exception for HTTP 422 Unprocessable Entity."""
206
+ pass
207
+
208
+
192
209
  def render_path(path_to_item):
193
210
  """Returns a string representation of a path"""
194
211
  result = ""
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """
@@ -3,7 +3,7 @@
3
3
 
4
4
  Cosmo Tech Platform API # noqa: E501
5
5
 
6
- The version of the OpenAPI document: 3.1.10
6
+ The version of the OpenAPI document: 3.1.13
7
7
  Contact: platform@cosmotech.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  """