hindsight-client 0.3.0__py3-none-any.whl → 0.4.1__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.
- hindsight_client/__init__.py +9 -8
- hindsight_client/hindsight_client.py +394 -59
- {hindsight_client-0.3.0.dist-info → hindsight_client-0.4.1.dist-info}/METADATA +1 -1
- hindsight_client-0.4.1.dist-info/RECORD +89 -0
- hindsight_client_api/__init__.py +26 -2
- hindsight_client_api/api/__init__.py +2 -0
- hindsight_client_api/api/banks_api.py +998 -132
- hindsight_client_api/api/directives_api.py +1619 -0
- hindsight_client_api/api/documents_api.py +1 -1
- hindsight_client_api/api/entities_api.py +10 -7
- hindsight_client_api/api/memory_api.py +1 -1
- hindsight_client_api/api/mental_models_api.py +1897 -0
- hindsight_client_api/api/monitoring_api.py +247 -1
- hindsight_client_api/api/operations_api.py +351 -5
- hindsight_client_api/api_client.py +1 -1
- hindsight_client_api/configuration.py +2 -2
- hindsight_client_api/exceptions.py +1 -1
- hindsight_client_api/models/__init__.py +23 -1
- hindsight_client_api/models/add_background_request.py +3 -3
- hindsight_client_api/models/async_operation_submit_response.py +89 -0
- hindsight_client_api/models/background_response.py +11 -4
- hindsight_client_api/models/bank_list_item.py +7 -7
- hindsight_client_api/models/bank_list_response.py +1 -1
- hindsight_client_api/models/bank_profile_response.py +12 -5
- hindsight_client_api/models/bank_stats_response.py +16 -5
- hindsight_client_api/models/budget.py +1 -1
- hindsight_client_api/models/cancel_operation_response.py +1 -1
- hindsight_client_api/models/chunk_data.py +1 -1
- hindsight_client_api/models/chunk_include_options.py +1 -1
- hindsight_client_api/models/chunk_response.py +1 -1
- hindsight_client_api/models/consolidation_response.py +89 -0
- hindsight_client_api/models/create_bank_request.py +9 -2
- hindsight_client_api/models/create_directive_request.py +95 -0
- hindsight_client_api/models/create_mental_model_request.py +100 -0
- hindsight_client_api/models/create_mental_model_response.py +87 -0
- hindsight_client_api/models/delete_document_response.py +1 -1
- hindsight_client_api/models/delete_response.py +1 -1
- hindsight_client_api/models/directive_list_response.py +95 -0
- hindsight_client_api/models/directive_response.py +113 -0
- hindsight_client_api/models/disposition_traits.py +1 -1
- hindsight_client_api/models/document_response.py +1 -1
- hindsight_client_api/models/entity_detail_response.py +1 -1
- hindsight_client_api/models/entity_include_options.py +1 -1
- hindsight_client_api/models/entity_input.py +1 -1
- hindsight_client_api/models/entity_list_item.py +1 -1
- hindsight_client_api/models/entity_list_response.py +1 -1
- hindsight_client_api/models/entity_observation_response.py +1 -1
- hindsight_client_api/models/entity_state_response.py +1 -1
- hindsight_client_api/models/features_info.py +91 -0
- hindsight_client_api/models/graph_data_response.py +1 -1
- hindsight_client_api/models/http_validation_error.py +1 -1
- hindsight_client_api/models/include_options.py +1 -1
- hindsight_client_api/models/list_documents_response.py +1 -1
- hindsight_client_api/models/list_memory_units_response.py +1 -1
- hindsight_client_api/models/list_tags_response.py +1 -1
- hindsight_client_api/models/memory_item.py +1 -1
- hindsight_client_api/models/mental_model_list_response.py +95 -0
- hindsight_client_api/models/mental_model_response.py +126 -0
- hindsight_client_api/models/mental_model_trigger.py +87 -0
- hindsight_client_api/models/operation_response.py +2 -2
- hindsight_client_api/models/operation_status_response.py +131 -0
- hindsight_client_api/models/operations_list_response.py +9 -3
- hindsight_client_api/models/recall_request.py +1 -1
- hindsight_client_api/models/recall_response.py +1 -1
- hindsight_client_api/models/recall_result.py +1 -1
- hindsight_client_api/models/reflect_based_on.py +115 -0
- hindsight_client_api/models/reflect_directive.py +91 -0
- hindsight_client_api/models/reflect_fact.py +1 -1
- hindsight_client_api/models/reflect_include_options.py +14 -3
- hindsight_client_api/models/reflect_llm_call.py +89 -0
- hindsight_client_api/models/reflect_mental_model.py +96 -0
- hindsight_client_api/models/reflect_request.py +1 -1
- hindsight_client_api/models/reflect_response.py +24 -12
- hindsight_client_api/models/reflect_tool_call.py +100 -0
- hindsight_client_api/models/reflect_trace.py +105 -0
- hindsight_client_api/models/retain_request.py +1 -1
- hindsight_client_api/models/retain_response.py +1 -1
- hindsight_client_api/models/tag_item.py +1 -1
- hindsight_client_api/models/token_usage.py +1 -1
- hindsight_client_api/models/tool_calls_include_options.py +87 -0
- hindsight_client_api/models/update_directive_request.py +120 -0
- hindsight_client_api/models/update_disposition_request.py +1 -1
- hindsight_client_api/models/update_mental_model_request.py +125 -0
- hindsight_client_api/models/validation_error.py +1 -1
- hindsight_client_api/models/validation_error_loc_inner.py +1 -1
- hindsight_client_api/models/version_response.py +93 -0
- hindsight_client_api/rest.py +1 -1
- hindsight_client-0.3.0.dist-info/RECORD +0 -65
- {hindsight_client-0.3.0.dist-info → hindsight_client-0.4.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,1897 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hindsight HTTP API
|
|
5
|
+
|
|
6
|
+
HTTP API for Hindsight
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.4.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from hindsight_client_api.models.async_operation_submit_response import AsyncOperationSubmitResponse
|
|
23
|
+
from hindsight_client_api.models.create_mental_model_request import CreateMentalModelRequest
|
|
24
|
+
from hindsight_client_api.models.create_mental_model_response import CreateMentalModelResponse
|
|
25
|
+
from hindsight_client_api.models.mental_model_list_response import MentalModelListResponse
|
|
26
|
+
from hindsight_client_api.models.mental_model_response import MentalModelResponse
|
|
27
|
+
from hindsight_client_api.models.update_mental_model_request import UpdateMentalModelRequest
|
|
28
|
+
|
|
29
|
+
from hindsight_client_api.api_client import ApiClient, RequestSerialized
|
|
30
|
+
from hindsight_client_api.api_response import ApiResponse
|
|
31
|
+
from hindsight_client_api.rest import RESTResponseType
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class MentalModelsApi:
|
|
35
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
36
|
+
Ref: https://openapi-generator.tech
|
|
37
|
+
|
|
38
|
+
Do not edit the class manually.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
def __init__(self, api_client=None) -> None:
|
|
42
|
+
if api_client is None:
|
|
43
|
+
api_client = ApiClient.get_default()
|
|
44
|
+
self.api_client = api_client
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@validate_call
|
|
48
|
+
async def create_mental_model(
|
|
49
|
+
self,
|
|
50
|
+
bank_id: StrictStr,
|
|
51
|
+
create_mental_model_request: CreateMentalModelRequest,
|
|
52
|
+
authorization: Optional[StrictStr] = None,
|
|
53
|
+
_request_timeout: Union[
|
|
54
|
+
None,
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Tuple[
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
59
|
+
]
|
|
60
|
+
] = None,
|
|
61
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_content_type: Optional[StrictStr] = None,
|
|
63
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
+
) -> CreateMentalModelResponse:
|
|
66
|
+
"""Create mental model
|
|
67
|
+
|
|
68
|
+
Create a mental model by running reflect with the source query in the background. Returns an operation ID to track progress. The content is auto-generated by the reflect endpoint. Use the operations endpoint to check completion status.
|
|
69
|
+
|
|
70
|
+
:param bank_id: (required)
|
|
71
|
+
:type bank_id: str
|
|
72
|
+
:param create_mental_model_request: (required)
|
|
73
|
+
:type create_mental_model_request: CreateMentalModelRequest
|
|
74
|
+
:param authorization:
|
|
75
|
+
:type authorization: str
|
|
76
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
77
|
+
number provided, it will be total request
|
|
78
|
+
timeout. It can also be a pair (tuple) of
|
|
79
|
+
(connection, read) timeouts.
|
|
80
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
81
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
82
|
+
request; this effectively ignores the
|
|
83
|
+
authentication in the spec for a single request.
|
|
84
|
+
:type _request_auth: dict, optional
|
|
85
|
+
:param _content_type: force content-type for the request.
|
|
86
|
+
:type _content_type: str, Optional
|
|
87
|
+
:param _headers: set to override the headers for a single
|
|
88
|
+
request; this effectively ignores the headers
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _headers: dict, optional
|
|
91
|
+
:param _host_index: set to override the host_index for a single
|
|
92
|
+
request; this effectively ignores the host_index
|
|
93
|
+
in the spec for a single request.
|
|
94
|
+
:type _host_index: int, optional
|
|
95
|
+
:return: Returns the result object.
|
|
96
|
+
""" # noqa: E501
|
|
97
|
+
|
|
98
|
+
_param = self._create_mental_model_serialize(
|
|
99
|
+
bank_id=bank_id,
|
|
100
|
+
create_mental_model_request=create_mental_model_request,
|
|
101
|
+
authorization=authorization,
|
|
102
|
+
_request_auth=_request_auth,
|
|
103
|
+
_content_type=_content_type,
|
|
104
|
+
_headers=_headers,
|
|
105
|
+
_host_index=_host_index
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
109
|
+
'200': "CreateMentalModelResponse",
|
|
110
|
+
'422': "HTTPValidationError",
|
|
111
|
+
}
|
|
112
|
+
response_data = await self.api_client.call_api(
|
|
113
|
+
*_param,
|
|
114
|
+
_request_timeout=_request_timeout
|
|
115
|
+
)
|
|
116
|
+
await response_data.read()
|
|
117
|
+
return self.api_client.response_deserialize(
|
|
118
|
+
response_data=response_data,
|
|
119
|
+
response_types_map=_response_types_map,
|
|
120
|
+
).data
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
@validate_call
|
|
124
|
+
async def create_mental_model_with_http_info(
|
|
125
|
+
self,
|
|
126
|
+
bank_id: StrictStr,
|
|
127
|
+
create_mental_model_request: CreateMentalModelRequest,
|
|
128
|
+
authorization: Optional[StrictStr] = None,
|
|
129
|
+
_request_timeout: Union[
|
|
130
|
+
None,
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
132
|
+
Tuple[
|
|
133
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
134
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
135
|
+
]
|
|
136
|
+
] = None,
|
|
137
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
138
|
+
_content_type: Optional[StrictStr] = None,
|
|
139
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
140
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
141
|
+
) -> ApiResponse[CreateMentalModelResponse]:
|
|
142
|
+
"""Create mental model
|
|
143
|
+
|
|
144
|
+
Create a mental model by running reflect with the source query in the background. Returns an operation ID to track progress. The content is auto-generated by the reflect endpoint. Use the operations endpoint to check completion status.
|
|
145
|
+
|
|
146
|
+
:param bank_id: (required)
|
|
147
|
+
:type bank_id: str
|
|
148
|
+
:param create_mental_model_request: (required)
|
|
149
|
+
:type create_mental_model_request: CreateMentalModelRequest
|
|
150
|
+
:param authorization:
|
|
151
|
+
:type authorization: str
|
|
152
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
153
|
+
number provided, it will be total request
|
|
154
|
+
timeout. It can also be a pair (tuple) of
|
|
155
|
+
(connection, read) timeouts.
|
|
156
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
157
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
158
|
+
request; this effectively ignores the
|
|
159
|
+
authentication in the spec for a single request.
|
|
160
|
+
:type _request_auth: dict, optional
|
|
161
|
+
:param _content_type: force content-type for the request.
|
|
162
|
+
:type _content_type: str, Optional
|
|
163
|
+
:param _headers: set to override the headers for a single
|
|
164
|
+
request; this effectively ignores the headers
|
|
165
|
+
in the spec for a single request.
|
|
166
|
+
:type _headers: dict, optional
|
|
167
|
+
:param _host_index: set to override the host_index for a single
|
|
168
|
+
request; this effectively ignores the host_index
|
|
169
|
+
in the spec for a single request.
|
|
170
|
+
:type _host_index: int, optional
|
|
171
|
+
:return: Returns the result object.
|
|
172
|
+
""" # noqa: E501
|
|
173
|
+
|
|
174
|
+
_param = self._create_mental_model_serialize(
|
|
175
|
+
bank_id=bank_id,
|
|
176
|
+
create_mental_model_request=create_mental_model_request,
|
|
177
|
+
authorization=authorization,
|
|
178
|
+
_request_auth=_request_auth,
|
|
179
|
+
_content_type=_content_type,
|
|
180
|
+
_headers=_headers,
|
|
181
|
+
_host_index=_host_index
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
185
|
+
'200': "CreateMentalModelResponse",
|
|
186
|
+
'422': "HTTPValidationError",
|
|
187
|
+
}
|
|
188
|
+
response_data = await self.api_client.call_api(
|
|
189
|
+
*_param,
|
|
190
|
+
_request_timeout=_request_timeout
|
|
191
|
+
)
|
|
192
|
+
await response_data.read()
|
|
193
|
+
return self.api_client.response_deserialize(
|
|
194
|
+
response_data=response_data,
|
|
195
|
+
response_types_map=_response_types_map,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
@validate_call
|
|
200
|
+
async def create_mental_model_without_preload_content(
|
|
201
|
+
self,
|
|
202
|
+
bank_id: StrictStr,
|
|
203
|
+
create_mental_model_request: CreateMentalModelRequest,
|
|
204
|
+
authorization: Optional[StrictStr] = None,
|
|
205
|
+
_request_timeout: Union[
|
|
206
|
+
None,
|
|
207
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
208
|
+
Tuple[
|
|
209
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
210
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
211
|
+
]
|
|
212
|
+
] = None,
|
|
213
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
214
|
+
_content_type: Optional[StrictStr] = None,
|
|
215
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
216
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
217
|
+
) -> RESTResponseType:
|
|
218
|
+
"""Create mental model
|
|
219
|
+
|
|
220
|
+
Create a mental model by running reflect with the source query in the background. Returns an operation ID to track progress. The content is auto-generated by the reflect endpoint. Use the operations endpoint to check completion status.
|
|
221
|
+
|
|
222
|
+
:param bank_id: (required)
|
|
223
|
+
:type bank_id: str
|
|
224
|
+
:param create_mental_model_request: (required)
|
|
225
|
+
:type create_mental_model_request: CreateMentalModelRequest
|
|
226
|
+
:param authorization:
|
|
227
|
+
:type authorization: str
|
|
228
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
229
|
+
number provided, it will be total request
|
|
230
|
+
timeout. It can also be a pair (tuple) of
|
|
231
|
+
(connection, read) timeouts.
|
|
232
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
233
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
234
|
+
request; this effectively ignores the
|
|
235
|
+
authentication in the spec for a single request.
|
|
236
|
+
:type _request_auth: dict, optional
|
|
237
|
+
:param _content_type: force content-type for the request.
|
|
238
|
+
:type _content_type: str, Optional
|
|
239
|
+
:param _headers: set to override the headers for a single
|
|
240
|
+
request; this effectively ignores the headers
|
|
241
|
+
in the spec for a single request.
|
|
242
|
+
:type _headers: dict, optional
|
|
243
|
+
:param _host_index: set to override the host_index for a single
|
|
244
|
+
request; this effectively ignores the host_index
|
|
245
|
+
in the spec for a single request.
|
|
246
|
+
:type _host_index: int, optional
|
|
247
|
+
:return: Returns the result object.
|
|
248
|
+
""" # noqa: E501
|
|
249
|
+
|
|
250
|
+
_param = self._create_mental_model_serialize(
|
|
251
|
+
bank_id=bank_id,
|
|
252
|
+
create_mental_model_request=create_mental_model_request,
|
|
253
|
+
authorization=authorization,
|
|
254
|
+
_request_auth=_request_auth,
|
|
255
|
+
_content_type=_content_type,
|
|
256
|
+
_headers=_headers,
|
|
257
|
+
_host_index=_host_index
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
261
|
+
'200': "CreateMentalModelResponse",
|
|
262
|
+
'422': "HTTPValidationError",
|
|
263
|
+
}
|
|
264
|
+
response_data = await self.api_client.call_api(
|
|
265
|
+
*_param,
|
|
266
|
+
_request_timeout=_request_timeout
|
|
267
|
+
)
|
|
268
|
+
return response_data.response
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def _create_mental_model_serialize(
|
|
272
|
+
self,
|
|
273
|
+
bank_id,
|
|
274
|
+
create_mental_model_request,
|
|
275
|
+
authorization,
|
|
276
|
+
_request_auth,
|
|
277
|
+
_content_type,
|
|
278
|
+
_headers,
|
|
279
|
+
_host_index,
|
|
280
|
+
) -> RequestSerialized:
|
|
281
|
+
|
|
282
|
+
_host = None
|
|
283
|
+
|
|
284
|
+
_collection_formats: Dict[str, str] = {
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
_path_params: Dict[str, str] = {}
|
|
288
|
+
_query_params: List[Tuple[str, str]] = []
|
|
289
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
290
|
+
_form_params: List[Tuple[str, str]] = []
|
|
291
|
+
_files: Dict[
|
|
292
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
293
|
+
] = {}
|
|
294
|
+
_body_params: Optional[bytes] = None
|
|
295
|
+
|
|
296
|
+
# process the path parameters
|
|
297
|
+
if bank_id is not None:
|
|
298
|
+
_path_params['bank_id'] = bank_id
|
|
299
|
+
# process the query parameters
|
|
300
|
+
# process the header parameters
|
|
301
|
+
if authorization is not None:
|
|
302
|
+
_header_params['authorization'] = authorization
|
|
303
|
+
# process the form parameters
|
|
304
|
+
# process the body parameter
|
|
305
|
+
if create_mental_model_request is not None:
|
|
306
|
+
_body_params = create_mental_model_request
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
# set the HTTP header `Accept`
|
|
310
|
+
if 'Accept' not in _header_params:
|
|
311
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
312
|
+
[
|
|
313
|
+
'application/json'
|
|
314
|
+
]
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
# set the HTTP header `Content-Type`
|
|
318
|
+
if _content_type:
|
|
319
|
+
_header_params['Content-Type'] = _content_type
|
|
320
|
+
else:
|
|
321
|
+
_default_content_type = (
|
|
322
|
+
self.api_client.select_header_content_type(
|
|
323
|
+
[
|
|
324
|
+
'application/json'
|
|
325
|
+
]
|
|
326
|
+
)
|
|
327
|
+
)
|
|
328
|
+
if _default_content_type is not None:
|
|
329
|
+
_header_params['Content-Type'] = _default_content_type
|
|
330
|
+
|
|
331
|
+
# authentication setting
|
|
332
|
+
_auth_settings: List[str] = [
|
|
333
|
+
]
|
|
334
|
+
|
|
335
|
+
return self.api_client.param_serialize(
|
|
336
|
+
method='POST',
|
|
337
|
+
resource_path='/v1/default/banks/{bank_id}/mental-models',
|
|
338
|
+
path_params=_path_params,
|
|
339
|
+
query_params=_query_params,
|
|
340
|
+
header_params=_header_params,
|
|
341
|
+
body=_body_params,
|
|
342
|
+
post_params=_form_params,
|
|
343
|
+
files=_files,
|
|
344
|
+
auth_settings=_auth_settings,
|
|
345
|
+
collection_formats=_collection_formats,
|
|
346
|
+
_host=_host,
|
|
347
|
+
_request_auth=_request_auth
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
@validate_call
|
|
354
|
+
async def delete_mental_model(
|
|
355
|
+
self,
|
|
356
|
+
bank_id: StrictStr,
|
|
357
|
+
mental_model_id: StrictStr,
|
|
358
|
+
authorization: Optional[StrictStr] = None,
|
|
359
|
+
_request_timeout: Union[
|
|
360
|
+
None,
|
|
361
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
362
|
+
Tuple[
|
|
363
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
364
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
365
|
+
]
|
|
366
|
+
] = None,
|
|
367
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
368
|
+
_content_type: Optional[StrictStr] = None,
|
|
369
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
370
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
371
|
+
) -> object:
|
|
372
|
+
"""Delete mental model
|
|
373
|
+
|
|
374
|
+
Delete a mental model.
|
|
375
|
+
|
|
376
|
+
:param bank_id: (required)
|
|
377
|
+
:type bank_id: str
|
|
378
|
+
:param mental_model_id: (required)
|
|
379
|
+
:type mental_model_id: str
|
|
380
|
+
:param authorization:
|
|
381
|
+
:type authorization: str
|
|
382
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
383
|
+
number provided, it will be total request
|
|
384
|
+
timeout. It can also be a pair (tuple) of
|
|
385
|
+
(connection, read) timeouts.
|
|
386
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
387
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
388
|
+
request; this effectively ignores the
|
|
389
|
+
authentication in the spec for a single request.
|
|
390
|
+
:type _request_auth: dict, optional
|
|
391
|
+
:param _content_type: force content-type for the request.
|
|
392
|
+
:type _content_type: str, Optional
|
|
393
|
+
:param _headers: set to override the headers for a single
|
|
394
|
+
request; this effectively ignores the headers
|
|
395
|
+
in the spec for a single request.
|
|
396
|
+
:type _headers: dict, optional
|
|
397
|
+
:param _host_index: set to override the host_index for a single
|
|
398
|
+
request; this effectively ignores the host_index
|
|
399
|
+
in the spec for a single request.
|
|
400
|
+
:type _host_index: int, optional
|
|
401
|
+
:return: Returns the result object.
|
|
402
|
+
""" # noqa: E501
|
|
403
|
+
|
|
404
|
+
_param = self._delete_mental_model_serialize(
|
|
405
|
+
bank_id=bank_id,
|
|
406
|
+
mental_model_id=mental_model_id,
|
|
407
|
+
authorization=authorization,
|
|
408
|
+
_request_auth=_request_auth,
|
|
409
|
+
_content_type=_content_type,
|
|
410
|
+
_headers=_headers,
|
|
411
|
+
_host_index=_host_index
|
|
412
|
+
)
|
|
413
|
+
|
|
414
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
415
|
+
'200': "object",
|
|
416
|
+
'422': "HTTPValidationError",
|
|
417
|
+
}
|
|
418
|
+
response_data = await self.api_client.call_api(
|
|
419
|
+
*_param,
|
|
420
|
+
_request_timeout=_request_timeout
|
|
421
|
+
)
|
|
422
|
+
await response_data.read()
|
|
423
|
+
return self.api_client.response_deserialize(
|
|
424
|
+
response_data=response_data,
|
|
425
|
+
response_types_map=_response_types_map,
|
|
426
|
+
).data
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
@validate_call
|
|
430
|
+
async def delete_mental_model_with_http_info(
|
|
431
|
+
self,
|
|
432
|
+
bank_id: StrictStr,
|
|
433
|
+
mental_model_id: StrictStr,
|
|
434
|
+
authorization: Optional[StrictStr] = None,
|
|
435
|
+
_request_timeout: Union[
|
|
436
|
+
None,
|
|
437
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
438
|
+
Tuple[
|
|
439
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
440
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
441
|
+
]
|
|
442
|
+
] = None,
|
|
443
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
444
|
+
_content_type: Optional[StrictStr] = None,
|
|
445
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
446
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
447
|
+
) -> ApiResponse[object]:
|
|
448
|
+
"""Delete mental model
|
|
449
|
+
|
|
450
|
+
Delete a mental model.
|
|
451
|
+
|
|
452
|
+
:param bank_id: (required)
|
|
453
|
+
:type bank_id: str
|
|
454
|
+
:param mental_model_id: (required)
|
|
455
|
+
:type mental_model_id: str
|
|
456
|
+
:param authorization:
|
|
457
|
+
:type authorization: str
|
|
458
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
459
|
+
number provided, it will be total request
|
|
460
|
+
timeout. It can also be a pair (tuple) of
|
|
461
|
+
(connection, read) timeouts.
|
|
462
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
463
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
464
|
+
request; this effectively ignores the
|
|
465
|
+
authentication in the spec for a single request.
|
|
466
|
+
:type _request_auth: dict, optional
|
|
467
|
+
:param _content_type: force content-type for the request.
|
|
468
|
+
:type _content_type: str, Optional
|
|
469
|
+
:param _headers: set to override the headers for a single
|
|
470
|
+
request; this effectively ignores the headers
|
|
471
|
+
in the spec for a single request.
|
|
472
|
+
:type _headers: dict, optional
|
|
473
|
+
:param _host_index: set to override the host_index for a single
|
|
474
|
+
request; this effectively ignores the host_index
|
|
475
|
+
in the spec for a single request.
|
|
476
|
+
:type _host_index: int, optional
|
|
477
|
+
:return: Returns the result object.
|
|
478
|
+
""" # noqa: E501
|
|
479
|
+
|
|
480
|
+
_param = self._delete_mental_model_serialize(
|
|
481
|
+
bank_id=bank_id,
|
|
482
|
+
mental_model_id=mental_model_id,
|
|
483
|
+
authorization=authorization,
|
|
484
|
+
_request_auth=_request_auth,
|
|
485
|
+
_content_type=_content_type,
|
|
486
|
+
_headers=_headers,
|
|
487
|
+
_host_index=_host_index
|
|
488
|
+
)
|
|
489
|
+
|
|
490
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
491
|
+
'200': "object",
|
|
492
|
+
'422': "HTTPValidationError",
|
|
493
|
+
}
|
|
494
|
+
response_data = await self.api_client.call_api(
|
|
495
|
+
*_param,
|
|
496
|
+
_request_timeout=_request_timeout
|
|
497
|
+
)
|
|
498
|
+
await response_data.read()
|
|
499
|
+
return self.api_client.response_deserialize(
|
|
500
|
+
response_data=response_data,
|
|
501
|
+
response_types_map=_response_types_map,
|
|
502
|
+
)
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
@validate_call
|
|
506
|
+
async def delete_mental_model_without_preload_content(
|
|
507
|
+
self,
|
|
508
|
+
bank_id: StrictStr,
|
|
509
|
+
mental_model_id: StrictStr,
|
|
510
|
+
authorization: Optional[StrictStr] = None,
|
|
511
|
+
_request_timeout: Union[
|
|
512
|
+
None,
|
|
513
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
514
|
+
Tuple[
|
|
515
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
516
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
517
|
+
]
|
|
518
|
+
] = None,
|
|
519
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
520
|
+
_content_type: Optional[StrictStr] = None,
|
|
521
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
522
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
523
|
+
) -> RESTResponseType:
|
|
524
|
+
"""Delete mental model
|
|
525
|
+
|
|
526
|
+
Delete a mental model.
|
|
527
|
+
|
|
528
|
+
:param bank_id: (required)
|
|
529
|
+
:type bank_id: str
|
|
530
|
+
:param mental_model_id: (required)
|
|
531
|
+
:type mental_model_id: str
|
|
532
|
+
:param authorization:
|
|
533
|
+
:type authorization: str
|
|
534
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
535
|
+
number provided, it will be total request
|
|
536
|
+
timeout. It can also be a pair (tuple) of
|
|
537
|
+
(connection, read) timeouts.
|
|
538
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
539
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
540
|
+
request; this effectively ignores the
|
|
541
|
+
authentication in the spec for a single request.
|
|
542
|
+
:type _request_auth: dict, optional
|
|
543
|
+
:param _content_type: force content-type for the request.
|
|
544
|
+
:type _content_type: str, Optional
|
|
545
|
+
:param _headers: set to override the headers for a single
|
|
546
|
+
request; this effectively ignores the headers
|
|
547
|
+
in the spec for a single request.
|
|
548
|
+
:type _headers: dict, optional
|
|
549
|
+
:param _host_index: set to override the host_index for a single
|
|
550
|
+
request; this effectively ignores the host_index
|
|
551
|
+
in the spec for a single request.
|
|
552
|
+
:type _host_index: int, optional
|
|
553
|
+
:return: Returns the result object.
|
|
554
|
+
""" # noqa: E501
|
|
555
|
+
|
|
556
|
+
_param = self._delete_mental_model_serialize(
|
|
557
|
+
bank_id=bank_id,
|
|
558
|
+
mental_model_id=mental_model_id,
|
|
559
|
+
authorization=authorization,
|
|
560
|
+
_request_auth=_request_auth,
|
|
561
|
+
_content_type=_content_type,
|
|
562
|
+
_headers=_headers,
|
|
563
|
+
_host_index=_host_index
|
|
564
|
+
)
|
|
565
|
+
|
|
566
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
567
|
+
'200': "object",
|
|
568
|
+
'422': "HTTPValidationError",
|
|
569
|
+
}
|
|
570
|
+
response_data = await self.api_client.call_api(
|
|
571
|
+
*_param,
|
|
572
|
+
_request_timeout=_request_timeout
|
|
573
|
+
)
|
|
574
|
+
return response_data.response
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
def _delete_mental_model_serialize(
|
|
578
|
+
self,
|
|
579
|
+
bank_id,
|
|
580
|
+
mental_model_id,
|
|
581
|
+
authorization,
|
|
582
|
+
_request_auth,
|
|
583
|
+
_content_type,
|
|
584
|
+
_headers,
|
|
585
|
+
_host_index,
|
|
586
|
+
) -> RequestSerialized:
|
|
587
|
+
|
|
588
|
+
_host = None
|
|
589
|
+
|
|
590
|
+
_collection_formats: Dict[str, str] = {
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
_path_params: Dict[str, str] = {}
|
|
594
|
+
_query_params: List[Tuple[str, str]] = []
|
|
595
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
596
|
+
_form_params: List[Tuple[str, str]] = []
|
|
597
|
+
_files: Dict[
|
|
598
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
599
|
+
] = {}
|
|
600
|
+
_body_params: Optional[bytes] = None
|
|
601
|
+
|
|
602
|
+
# process the path parameters
|
|
603
|
+
if bank_id is not None:
|
|
604
|
+
_path_params['bank_id'] = bank_id
|
|
605
|
+
if mental_model_id is not None:
|
|
606
|
+
_path_params['mental_model_id'] = mental_model_id
|
|
607
|
+
# process the query parameters
|
|
608
|
+
# process the header parameters
|
|
609
|
+
if authorization is not None:
|
|
610
|
+
_header_params['authorization'] = authorization
|
|
611
|
+
# process the form parameters
|
|
612
|
+
# process the body parameter
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
# set the HTTP header `Accept`
|
|
616
|
+
if 'Accept' not in _header_params:
|
|
617
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
618
|
+
[
|
|
619
|
+
'application/json'
|
|
620
|
+
]
|
|
621
|
+
)
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
# authentication setting
|
|
625
|
+
_auth_settings: List[str] = [
|
|
626
|
+
]
|
|
627
|
+
|
|
628
|
+
return self.api_client.param_serialize(
|
|
629
|
+
method='DELETE',
|
|
630
|
+
resource_path='/v1/default/banks/{bank_id}/mental-models/{mental_model_id}',
|
|
631
|
+
path_params=_path_params,
|
|
632
|
+
query_params=_query_params,
|
|
633
|
+
header_params=_header_params,
|
|
634
|
+
body=_body_params,
|
|
635
|
+
post_params=_form_params,
|
|
636
|
+
files=_files,
|
|
637
|
+
auth_settings=_auth_settings,
|
|
638
|
+
collection_formats=_collection_formats,
|
|
639
|
+
_host=_host,
|
|
640
|
+
_request_auth=_request_auth
|
|
641
|
+
)
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
@validate_call
|
|
647
|
+
async def get_mental_model(
|
|
648
|
+
self,
|
|
649
|
+
bank_id: StrictStr,
|
|
650
|
+
mental_model_id: StrictStr,
|
|
651
|
+
authorization: Optional[StrictStr] = None,
|
|
652
|
+
_request_timeout: Union[
|
|
653
|
+
None,
|
|
654
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
655
|
+
Tuple[
|
|
656
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
657
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
658
|
+
]
|
|
659
|
+
] = None,
|
|
660
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
661
|
+
_content_type: Optional[StrictStr] = None,
|
|
662
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
663
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
664
|
+
) -> MentalModelResponse:
|
|
665
|
+
"""Get mental model
|
|
666
|
+
|
|
667
|
+
Get a specific mental model by ID.
|
|
668
|
+
|
|
669
|
+
:param bank_id: (required)
|
|
670
|
+
:type bank_id: str
|
|
671
|
+
:param mental_model_id: (required)
|
|
672
|
+
:type mental_model_id: str
|
|
673
|
+
:param authorization:
|
|
674
|
+
:type authorization: str
|
|
675
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
676
|
+
number provided, it will be total request
|
|
677
|
+
timeout. It can also be a pair (tuple) of
|
|
678
|
+
(connection, read) timeouts.
|
|
679
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
680
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
681
|
+
request; this effectively ignores the
|
|
682
|
+
authentication in the spec for a single request.
|
|
683
|
+
:type _request_auth: dict, optional
|
|
684
|
+
:param _content_type: force content-type for the request.
|
|
685
|
+
:type _content_type: str, Optional
|
|
686
|
+
:param _headers: set to override the headers for a single
|
|
687
|
+
request; this effectively ignores the headers
|
|
688
|
+
in the spec for a single request.
|
|
689
|
+
:type _headers: dict, optional
|
|
690
|
+
:param _host_index: set to override the host_index for a single
|
|
691
|
+
request; this effectively ignores the host_index
|
|
692
|
+
in the spec for a single request.
|
|
693
|
+
:type _host_index: int, optional
|
|
694
|
+
:return: Returns the result object.
|
|
695
|
+
""" # noqa: E501
|
|
696
|
+
|
|
697
|
+
_param = self._get_mental_model_serialize(
|
|
698
|
+
bank_id=bank_id,
|
|
699
|
+
mental_model_id=mental_model_id,
|
|
700
|
+
authorization=authorization,
|
|
701
|
+
_request_auth=_request_auth,
|
|
702
|
+
_content_type=_content_type,
|
|
703
|
+
_headers=_headers,
|
|
704
|
+
_host_index=_host_index
|
|
705
|
+
)
|
|
706
|
+
|
|
707
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
708
|
+
'200': "MentalModelResponse",
|
|
709
|
+
'422': "HTTPValidationError",
|
|
710
|
+
}
|
|
711
|
+
response_data = await self.api_client.call_api(
|
|
712
|
+
*_param,
|
|
713
|
+
_request_timeout=_request_timeout
|
|
714
|
+
)
|
|
715
|
+
await response_data.read()
|
|
716
|
+
return self.api_client.response_deserialize(
|
|
717
|
+
response_data=response_data,
|
|
718
|
+
response_types_map=_response_types_map,
|
|
719
|
+
).data
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
@validate_call
|
|
723
|
+
async def get_mental_model_with_http_info(
|
|
724
|
+
self,
|
|
725
|
+
bank_id: StrictStr,
|
|
726
|
+
mental_model_id: StrictStr,
|
|
727
|
+
authorization: Optional[StrictStr] = None,
|
|
728
|
+
_request_timeout: Union[
|
|
729
|
+
None,
|
|
730
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
731
|
+
Tuple[
|
|
732
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
733
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
734
|
+
]
|
|
735
|
+
] = None,
|
|
736
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
737
|
+
_content_type: Optional[StrictStr] = None,
|
|
738
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
739
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
740
|
+
) -> ApiResponse[MentalModelResponse]:
|
|
741
|
+
"""Get mental model
|
|
742
|
+
|
|
743
|
+
Get a specific mental model by ID.
|
|
744
|
+
|
|
745
|
+
:param bank_id: (required)
|
|
746
|
+
:type bank_id: str
|
|
747
|
+
:param mental_model_id: (required)
|
|
748
|
+
:type mental_model_id: str
|
|
749
|
+
:param authorization:
|
|
750
|
+
:type authorization: str
|
|
751
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
752
|
+
number provided, it will be total request
|
|
753
|
+
timeout. It can also be a pair (tuple) of
|
|
754
|
+
(connection, read) timeouts.
|
|
755
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
756
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
757
|
+
request; this effectively ignores the
|
|
758
|
+
authentication in the spec for a single request.
|
|
759
|
+
:type _request_auth: dict, optional
|
|
760
|
+
:param _content_type: force content-type for the request.
|
|
761
|
+
:type _content_type: str, Optional
|
|
762
|
+
:param _headers: set to override the headers for a single
|
|
763
|
+
request; this effectively ignores the headers
|
|
764
|
+
in the spec for a single request.
|
|
765
|
+
:type _headers: dict, optional
|
|
766
|
+
:param _host_index: set to override the host_index for a single
|
|
767
|
+
request; this effectively ignores the host_index
|
|
768
|
+
in the spec for a single request.
|
|
769
|
+
:type _host_index: int, optional
|
|
770
|
+
:return: Returns the result object.
|
|
771
|
+
""" # noqa: E501
|
|
772
|
+
|
|
773
|
+
_param = self._get_mental_model_serialize(
|
|
774
|
+
bank_id=bank_id,
|
|
775
|
+
mental_model_id=mental_model_id,
|
|
776
|
+
authorization=authorization,
|
|
777
|
+
_request_auth=_request_auth,
|
|
778
|
+
_content_type=_content_type,
|
|
779
|
+
_headers=_headers,
|
|
780
|
+
_host_index=_host_index
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
784
|
+
'200': "MentalModelResponse",
|
|
785
|
+
'422': "HTTPValidationError",
|
|
786
|
+
}
|
|
787
|
+
response_data = await self.api_client.call_api(
|
|
788
|
+
*_param,
|
|
789
|
+
_request_timeout=_request_timeout
|
|
790
|
+
)
|
|
791
|
+
await response_data.read()
|
|
792
|
+
return self.api_client.response_deserialize(
|
|
793
|
+
response_data=response_data,
|
|
794
|
+
response_types_map=_response_types_map,
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
@validate_call
|
|
799
|
+
async def get_mental_model_without_preload_content(
|
|
800
|
+
self,
|
|
801
|
+
bank_id: StrictStr,
|
|
802
|
+
mental_model_id: StrictStr,
|
|
803
|
+
authorization: Optional[StrictStr] = None,
|
|
804
|
+
_request_timeout: Union[
|
|
805
|
+
None,
|
|
806
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
807
|
+
Tuple[
|
|
808
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
809
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
810
|
+
]
|
|
811
|
+
] = None,
|
|
812
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
813
|
+
_content_type: Optional[StrictStr] = None,
|
|
814
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
815
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
816
|
+
) -> RESTResponseType:
|
|
817
|
+
"""Get mental model
|
|
818
|
+
|
|
819
|
+
Get a specific mental model by ID.
|
|
820
|
+
|
|
821
|
+
:param bank_id: (required)
|
|
822
|
+
:type bank_id: str
|
|
823
|
+
:param mental_model_id: (required)
|
|
824
|
+
:type mental_model_id: str
|
|
825
|
+
:param authorization:
|
|
826
|
+
:type authorization: str
|
|
827
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
828
|
+
number provided, it will be total request
|
|
829
|
+
timeout. It can also be a pair (tuple) of
|
|
830
|
+
(connection, read) timeouts.
|
|
831
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
832
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
833
|
+
request; this effectively ignores the
|
|
834
|
+
authentication in the spec for a single request.
|
|
835
|
+
:type _request_auth: dict, optional
|
|
836
|
+
:param _content_type: force content-type for the request.
|
|
837
|
+
:type _content_type: str, Optional
|
|
838
|
+
:param _headers: set to override the headers for a single
|
|
839
|
+
request; this effectively ignores the headers
|
|
840
|
+
in the spec for a single request.
|
|
841
|
+
:type _headers: dict, optional
|
|
842
|
+
:param _host_index: set to override the host_index for a single
|
|
843
|
+
request; this effectively ignores the host_index
|
|
844
|
+
in the spec for a single request.
|
|
845
|
+
:type _host_index: int, optional
|
|
846
|
+
:return: Returns the result object.
|
|
847
|
+
""" # noqa: E501
|
|
848
|
+
|
|
849
|
+
_param = self._get_mental_model_serialize(
|
|
850
|
+
bank_id=bank_id,
|
|
851
|
+
mental_model_id=mental_model_id,
|
|
852
|
+
authorization=authorization,
|
|
853
|
+
_request_auth=_request_auth,
|
|
854
|
+
_content_type=_content_type,
|
|
855
|
+
_headers=_headers,
|
|
856
|
+
_host_index=_host_index
|
|
857
|
+
)
|
|
858
|
+
|
|
859
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
860
|
+
'200': "MentalModelResponse",
|
|
861
|
+
'422': "HTTPValidationError",
|
|
862
|
+
}
|
|
863
|
+
response_data = await self.api_client.call_api(
|
|
864
|
+
*_param,
|
|
865
|
+
_request_timeout=_request_timeout
|
|
866
|
+
)
|
|
867
|
+
return response_data.response
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
def _get_mental_model_serialize(
|
|
871
|
+
self,
|
|
872
|
+
bank_id,
|
|
873
|
+
mental_model_id,
|
|
874
|
+
authorization,
|
|
875
|
+
_request_auth,
|
|
876
|
+
_content_type,
|
|
877
|
+
_headers,
|
|
878
|
+
_host_index,
|
|
879
|
+
) -> RequestSerialized:
|
|
880
|
+
|
|
881
|
+
_host = None
|
|
882
|
+
|
|
883
|
+
_collection_formats: Dict[str, str] = {
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
_path_params: Dict[str, str] = {}
|
|
887
|
+
_query_params: List[Tuple[str, str]] = []
|
|
888
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
889
|
+
_form_params: List[Tuple[str, str]] = []
|
|
890
|
+
_files: Dict[
|
|
891
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
892
|
+
] = {}
|
|
893
|
+
_body_params: Optional[bytes] = None
|
|
894
|
+
|
|
895
|
+
# process the path parameters
|
|
896
|
+
if bank_id is not None:
|
|
897
|
+
_path_params['bank_id'] = bank_id
|
|
898
|
+
if mental_model_id is not None:
|
|
899
|
+
_path_params['mental_model_id'] = mental_model_id
|
|
900
|
+
# process the query parameters
|
|
901
|
+
# process the header parameters
|
|
902
|
+
if authorization is not None:
|
|
903
|
+
_header_params['authorization'] = authorization
|
|
904
|
+
# process the form parameters
|
|
905
|
+
# process the body parameter
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
# set the HTTP header `Accept`
|
|
909
|
+
if 'Accept' not in _header_params:
|
|
910
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
911
|
+
[
|
|
912
|
+
'application/json'
|
|
913
|
+
]
|
|
914
|
+
)
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
# authentication setting
|
|
918
|
+
_auth_settings: List[str] = [
|
|
919
|
+
]
|
|
920
|
+
|
|
921
|
+
return self.api_client.param_serialize(
|
|
922
|
+
method='GET',
|
|
923
|
+
resource_path='/v1/default/banks/{bank_id}/mental-models/{mental_model_id}',
|
|
924
|
+
path_params=_path_params,
|
|
925
|
+
query_params=_query_params,
|
|
926
|
+
header_params=_header_params,
|
|
927
|
+
body=_body_params,
|
|
928
|
+
post_params=_form_params,
|
|
929
|
+
files=_files,
|
|
930
|
+
auth_settings=_auth_settings,
|
|
931
|
+
collection_formats=_collection_formats,
|
|
932
|
+
_host=_host,
|
|
933
|
+
_request_auth=_request_auth
|
|
934
|
+
)
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
@validate_call
|
|
940
|
+
async def list_mental_models(
|
|
941
|
+
self,
|
|
942
|
+
bank_id: StrictStr,
|
|
943
|
+
tags: Annotated[Optional[List[StrictStr]], Field(description="Filter by tags")] = None,
|
|
944
|
+
tags_match: Annotated[Optional[StrictStr], Field(description="How to match tags")] = None,
|
|
945
|
+
limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
|
|
946
|
+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
|
947
|
+
authorization: Optional[StrictStr] = None,
|
|
948
|
+
_request_timeout: Union[
|
|
949
|
+
None,
|
|
950
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
951
|
+
Tuple[
|
|
952
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
953
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
954
|
+
]
|
|
955
|
+
] = None,
|
|
956
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
957
|
+
_content_type: Optional[StrictStr] = None,
|
|
958
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
959
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
960
|
+
) -> MentalModelListResponse:
|
|
961
|
+
"""List mental models
|
|
962
|
+
|
|
963
|
+
List user-curated living documents that stay current.
|
|
964
|
+
|
|
965
|
+
:param bank_id: (required)
|
|
966
|
+
:type bank_id: str
|
|
967
|
+
:param tags: Filter by tags
|
|
968
|
+
:type tags: List[str]
|
|
969
|
+
:param tags_match: How to match tags
|
|
970
|
+
:type tags_match: str
|
|
971
|
+
:param limit:
|
|
972
|
+
:type limit: int
|
|
973
|
+
:param offset:
|
|
974
|
+
:type offset: int
|
|
975
|
+
:param authorization:
|
|
976
|
+
:type authorization: str
|
|
977
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
978
|
+
number provided, it will be total request
|
|
979
|
+
timeout. It can also be a pair (tuple) of
|
|
980
|
+
(connection, read) timeouts.
|
|
981
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
982
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
983
|
+
request; this effectively ignores the
|
|
984
|
+
authentication in the spec for a single request.
|
|
985
|
+
:type _request_auth: dict, optional
|
|
986
|
+
:param _content_type: force content-type for the request.
|
|
987
|
+
:type _content_type: str, Optional
|
|
988
|
+
:param _headers: set to override the headers for a single
|
|
989
|
+
request; this effectively ignores the headers
|
|
990
|
+
in the spec for a single request.
|
|
991
|
+
:type _headers: dict, optional
|
|
992
|
+
:param _host_index: set to override the host_index for a single
|
|
993
|
+
request; this effectively ignores the host_index
|
|
994
|
+
in the spec for a single request.
|
|
995
|
+
:type _host_index: int, optional
|
|
996
|
+
:return: Returns the result object.
|
|
997
|
+
""" # noqa: E501
|
|
998
|
+
|
|
999
|
+
_param = self._list_mental_models_serialize(
|
|
1000
|
+
bank_id=bank_id,
|
|
1001
|
+
tags=tags,
|
|
1002
|
+
tags_match=tags_match,
|
|
1003
|
+
limit=limit,
|
|
1004
|
+
offset=offset,
|
|
1005
|
+
authorization=authorization,
|
|
1006
|
+
_request_auth=_request_auth,
|
|
1007
|
+
_content_type=_content_type,
|
|
1008
|
+
_headers=_headers,
|
|
1009
|
+
_host_index=_host_index
|
|
1010
|
+
)
|
|
1011
|
+
|
|
1012
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1013
|
+
'200': "MentalModelListResponse",
|
|
1014
|
+
'422': "HTTPValidationError",
|
|
1015
|
+
}
|
|
1016
|
+
response_data = await self.api_client.call_api(
|
|
1017
|
+
*_param,
|
|
1018
|
+
_request_timeout=_request_timeout
|
|
1019
|
+
)
|
|
1020
|
+
await response_data.read()
|
|
1021
|
+
return self.api_client.response_deserialize(
|
|
1022
|
+
response_data=response_data,
|
|
1023
|
+
response_types_map=_response_types_map,
|
|
1024
|
+
).data
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
@validate_call
|
|
1028
|
+
async def list_mental_models_with_http_info(
|
|
1029
|
+
self,
|
|
1030
|
+
bank_id: StrictStr,
|
|
1031
|
+
tags: Annotated[Optional[List[StrictStr]], Field(description="Filter by tags")] = None,
|
|
1032
|
+
tags_match: Annotated[Optional[StrictStr], Field(description="How to match tags")] = None,
|
|
1033
|
+
limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
|
|
1034
|
+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
|
1035
|
+
authorization: Optional[StrictStr] = None,
|
|
1036
|
+
_request_timeout: Union[
|
|
1037
|
+
None,
|
|
1038
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1039
|
+
Tuple[
|
|
1040
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1041
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1042
|
+
]
|
|
1043
|
+
] = None,
|
|
1044
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1045
|
+
_content_type: Optional[StrictStr] = None,
|
|
1046
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1047
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1048
|
+
) -> ApiResponse[MentalModelListResponse]:
|
|
1049
|
+
"""List mental models
|
|
1050
|
+
|
|
1051
|
+
List user-curated living documents that stay current.
|
|
1052
|
+
|
|
1053
|
+
:param bank_id: (required)
|
|
1054
|
+
:type bank_id: str
|
|
1055
|
+
:param tags: Filter by tags
|
|
1056
|
+
:type tags: List[str]
|
|
1057
|
+
:param tags_match: How to match tags
|
|
1058
|
+
:type tags_match: str
|
|
1059
|
+
:param limit:
|
|
1060
|
+
:type limit: int
|
|
1061
|
+
:param offset:
|
|
1062
|
+
:type offset: int
|
|
1063
|
+
:param authorization:
|
|
1064
|
+
:type authorization: str
|
|
1065
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1066
|
+
number provided, it will be total request
|
|
1067
|
+
timeout. It can also be a pair (tuple) of
|
|
1068
|
+
(connection, read) timeouts.
|
|
1069
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1070
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1071
|
+
request; this effectively ignores the
|
|
1072
|
+
authentication in the spec for a single request.
|
|
1073
|
+
:type _request_auth: dict, optional
|
|
1074
|
+
:param _content_type: force content-type for the request.
|
|
1075
|
+
:type _content_type: str, Optional
|
|
1076
|
+
:param _headers: set to override the headers for a single
|
|
1077
|
+
request; this effectively ignores the headers
|
|
1078
|
+
in the spec for a single request.
|
|
1079
|
+
:type _headers: dict, optional
|
|
1080
|
+
:param _host_index: set to override the host_index for a single
|
|
1081
|
+
request; this effectively ignores the host_index
|
|
1082
|
+
in the spec for a single request.
|
|
1083
|
+
:type _host_index: int, optional
|
|
1084
|
+
:return: Returns the result object.
|
|
1085
|
+
""" # noqa: E501
|
|
1086
|
+
|
|
1087
|
+
_param = self._list_mental_models_serialize(
|
|
1088
|
+
bank_id=bank_id,
|
|
1089
|
+
tags=tags,
|
|
1090
|
+
tags_match=tags_match,
|
|
1091
|
+
limit=limit,
|
|
1092
|
+
offset=offset,
|
|
1093
|
+
authorization=authorization,
|
|
1094
|
+
_request_auth=_request_auth,
|
|
1095
|
+
_content_type=_content_type,
|
|
1096
|
+
_headers=_headers,
|
|
1097
|
+
_host_index=_host_index
|
|
1098
|
+
)
|
|
1099
|
+
|
|
1100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1101
|
+
'200': "MentalModelListResponse",
|
|
1102
|
+
'422': "HTTPValidationError",
|
|
1103
|
+
}
|
|
1104
|
+
response_data = await self.api_client.call_api(
|
|
1105
|
+
*_param,
|
|
1106
|
+
_request_timeout=_request_timeout
|
|
1107
|
+
)
|
|
1108
|
+
await response_data.read()
|
|
1109
|
+
return self.api_client.response_deserialize(
|
|
1110
|
+
response_data=response_data,
|
|
1111
|
+
response_types_map=_response_types_map,
|
|
1112
|
+
)
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
@validate_call
|
|
1116
|
+
async def list_mental_models_without_preload_content(
|
|
1117
|
+
self,
|
|
1118
|
+
bank_id: StrictStr,
|
|
1119
|
+
tags: Annotated[Optional[List[StrictStr]], Field(description="Filter by tags")] = None,
|
|
1120
|
+
tags_match: Annotated[Optional[StrictStr], Field(description="How to match tags")] = None,
|
|
1121
|
+
limit: Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]] = None,
|
|
1122
|
+
offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
|
|
1123
|
+
authorization: Optional[StrictStr] = None,
|
|
1124
|
+
_request_timeout: Union[
|
|
1125
|
+
None,
|
|
1126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1127
|
+
Tuple[
|
|
1128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1130
|
+
]
|
|
1131
|
+
] = None,
|
|
1132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1133
|
+
_content_type: Optional[StrictStr] = None,
|
|
1134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1136
|
+
) -> RESTResponseType:
|
|
1137
|
+
"""List mental models
|
|
1138
|
+
|
|
1139
|
+
List user-curated living documents that stay current.
|
|
1140
|
+
|
|
1141
|
+
:param bank_id: (required)
|
|
1142
|
+
:type bank_id: str
|
|
1143
|
+
:param tags: Filter by tags
|
|
1144
|
+
:type tags: List[str]
|
|
1145
|
+
:param tags_match: How to match tags
|
|
1146
|
+
:type tags_match: str
|
|
1147
|
+
:param limit:
|
|
1148
|
+
:type limit: int
|
|
1149
|
+
:param offset:
|
|
1150
|
+
:type offset: int
|
|
1151
|
+
:param authorization:
|
|
1152
|
+
:type authorization: str
|
|
1153
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1154
|
+
number provided, it will be total request
|
|
1155
|
+
timeout. It can also be a pair (tuple) of
|
|
1156
|
+
(connection, read) timeouts.
|
|
1157
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1158
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1159
|
+
request; this effectively ignores the
|
|
1160
|
+
authentication in the spec for a single request.
|
|
1161
|
+
:type _request_auth: dict, optional
|
|
1162
|
+
:param _content_type: force content-type for the request.
|
|
1163
|
+
:type _content_type: str, Optional
|
|
1164
|
+
:param _headers: set to override the headers for a single
|
|
1165
|
+
request; this effectively ignores the headers
|
|
1166
|
+
in the spec for a single request.
|
|
1167
|
+
:type _headers: dict, optional
|
|
1168
|
+
:param _host_index: set to override the host_index for a single
|
|
1169
|
+
request; this effectively ignores the host_index
|
|
1170
|
+
in the spec for a single request.
|
|
1171
|
+
:type _host_index: int, optional
|
|
1172
|
+
:return: Returns the result object.
|
|
1173
|
+
""" # noqa: E501
|
|
1174
|
+
|
|
1175
|
+
_param = self._list_mental_models_serialize(
|
|
1176
|
+
bank_id=bank_id,
|
|
1177
|
+
tags=tags,
|
|
1178
|
+
tags_match=tags_match,
|
|
1179
|
+
limit=limit,
|
|
1180
|
+
offset=offset,
|
|
1181
|
+
authorization=authorization,
|
|
1182
|
+
_request_auth=_request_auth,
|
|
1183
|
+
_content_type=_content_type,
|
|
1184
|
+
_headers=_headers,
|
|
1185
|
+
_host_index=_host_index
|
|
1186
|
+
)
|
|
1187
|
+
|
|
1188
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1189
|
+
'200': "MentalModelListResponse",
|
|
1190
|
+
'422': "HTTPValidationError",
|
|
1191
|
+
}
|
|
1192
|
+
response_data = await self.api_client.call_api(
|
|
1193
|
+
*_param,
|
|
1194
|
+
_request_timeout=_request_timeout
|
|
1195
|
+
)
|
|
1196
|
+
return response_data.response
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
def _list_mental_models_serialize(
|
|
1200
|
+
self,
|
|
1201
|
+
bank_id,
|
|
1202
|
+
tags,
|
|
1203
|
+
tags_match,
|
|
1204
|
+
limit,
|
|
1205
|
+
offset,
|
|
1206
|
+
authorization,
|
|
1207
|
+
_request_auth,
|
|
1208
|
+
_content_type,
|
|
1209
|
+
_headers,
|
|
1210
|
+
_host_index,
|
|
1211
|
+
) -> RequestSerialized:
|
|
1212
|
+
|
|
1213
|
+
_host = None
|
|
1214
|
+
|
|
1215
|
+
_collection_formats: Dict[str, str] = {
|
|
1216
|
+
'tags': 'multi',
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
_path_params: Dict[str, str] = {}
|
|
1220
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1221
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1222
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1223
|
+
_files: Dict[
|
|
1224
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1225
|
+
] = {}
|
|
1226
|
+
_body_params: Optional[bytes] = None
|
|
1227
|
+
|
|
1228
|
+
# process the path parameters
|
|
1229
|
+
if bank_id is not None:
|
|
1230
|
+
_path_params['bank_id'] = bank_id
|
|
1231
|
+
# process the query parameters
|
|
1232
|
+
if tags is not None:
|
|
1233
|
+
|
|
1234
|
+
_query_params.append(('tags', tags))
|
|
1235
|
+
|
|
1236
|
+
if tags_match is not None:
|
|
1237
|
+
|
|
1238
|
+
_query_params.append(('tags_match', tags_match))
|
|
1239
|
+
|
|
1240
|
+
if limit is not None:
|
|
1241
|
+
|
|
1242
|
+
_query_params.append(('limit', limit))
|
|
1243
|
+
|
|
1244
|
+
if offset is not None:
|
|
1245
|
+
|
|
1246
|
+
_query_params.append(('offset', offset))
|
|
1247
|
+
|
|
1248
|
+
# process the header parameters
|
|
1249
|
+
if authorization is not None:
|
|
1250
|
+
_header_params['authorization'] = authorization
|
|
1251
|
+
# process the form parameters
|
|
1252
|
+
# process the body parameter
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
# set the HTTP header `Accept`
|
|
1256
|
+
if 'Accept' not in _header_params:
|
|
1257
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1258
|
+
[
|
|
1259
|
+
'application/json'
|
|
1260
|
+
]
|
|
1261
|
+
)
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
# authentication setting
|
|
1265
|
+
_auth_settings: List[str] = [
|
|
1266
|
+
]
|
|
1267
|
+
|
|
1268
|
+
return self.api_client.param_serialize(
|
|
1269
|
+
method='GET',
|
|
1270
|
+
resource_path='/v1/default/banks/{bank_id}/mental-models',
|
|
1271
|
+
path_params=_path_params,
|
|
1272
|
+
query_params=_query_params,
|
|
1273
|
+
header_params=_header_params,
|
|
1274
|
+
body=_body_params,
|
|
1275
|
+
post_params=_form_params,
|
|
1276
|
+
files=_files,
|
|
1277
|
+
auth_settings=_auth_settings,
|
|
1278
|
+
collection_formats=_collection_formats,
|
|
1279
|
+
_host=_host,
|
|
1280
|
+
_request_auth=_request_auth
|
|
1281
|
+
)
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
@validate_call
|
|
1287
|
+
async def refresh_mental_model(
|
|
1288
|
+
self,
|
|
1289
|
+
bank_id: StrictStr,
|
|
1290
|
+
mental_model_id: StrictStr,
|
|
1291
|
+
authorization: Optional[StrictStr] = None,
|
|
1292
|
+
_request_timeout: Union[
|
|
1293
|
+
None,
|
|
1294
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1295
|
+
Tuple[
|
|
1296
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1297
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1298
|
+
]
|
|
1299
|
+
] = None,
|
|
1300
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1301
|
+
_content_type: Optional[StrictStr] = None,
|
|
1302
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1303
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1304
|
+
) -> AsyncOperationSubmitResponse:
|
|
1305
|
+
"""Refresh mental model
|
|
1306
|
+
|
|
1307
|
+
Submit an async task to re-run the source query through reflect and update the content.
|
|
1308
|
+
|
|
1309
|
+
:param bank_id: (required)
|
|
1310
|
+
:type bank_id: str
|
|
1311
|
+
:param mental_model_id: (required)
|
|
1312
|
+
:type mental_model_id: str
|
|
1313
|
+
:param authorization:
|
|
1314
|
+
:type authorization: str
|
|
1315
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1316
|
+
number provided, it will be total request
|
|
1317
|
+
timeout. It can also be a pair (tuple) of
|
|
1318
|
+
(connection, read) timeouts.
|
|
1319
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1320
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1321
|
+
request; this effectively ignores the
|
|
1322
|
+
authentication in the spec for a single request.
|
|
1323
|
+
:type _request_auth: dict, optional
|
|
1324
|
+
:param _content_type: force content-type for the request.
|
|
1325
|
+
:type _content_type: str, Optional
|
|
1326
|
+
:param _headers: set to override the headers for a single
|
|
1327
|
+
request; this effectively ignores the headers
|
|
1328
|
+
in the spec for a single request.
|
|
1329
|
+
:type _headers: dict, optional
|
|
1330
|
+
:param _host_index: set to override the host_index for a single
|
|
1331
|
+
request; this effectively ignores the host_index
|
|
1332
|
+
in the spec for a single request.
|
|
1333
|
+
:type _host_index: int, optional
|
|
1334
|
+
:return: Returns the result object.
|
|
1335
|
+
""" # noqa: E501
|
|
1336
|
+
|
|
1337
|
+
_param = self._refresh_mental_model_serialize(
|
|
1338
|
+
bank_id=bank_id,
|
|
1339
|
+
mental_model_id=mental_model_id,
|
|
1340
|
+
authorization=authorization,
|
|
1341
|
+
_request_auth=_request_auth,
|
|
1342
|
+
_content_type=_content_type,
|
|
1343
|
+
_headers=_headers,
|
|
1344
|
+
_host_index=_host_index
|
|
1345
|
+
)
|
|
1346
|
+
|
|
1347
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1348
|
+
'200': "AsyncOperationSubmitResponse",
|
|
1349
|
+
'422': "HTTPValidationError",
|
|
1350
|
+
}
|
|
1351
|
+
response_data = await self.api_client.call_api(
|
|
1352
|
+
*_param,
|
|
1353
|
+
_request_timeout=_request_timeout
|
|
1354
|
+
)
|
|
1355
|
+
await response_data.read()
|
|
1356
|
+
return self.api_client.response_deserialize(
|
|
1357
|
+
response_data=response_data,
|
|
1358
|
+
response_types_map=_response_types_map,
|
|
1359
|
+
).data
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
@validate_call
|
|
1363
|
+
async def refresh_mental_model_with_http_info(
|
|
1364
|
+
self,
|
|
1365
|
+
bank_id: StrictStr,
|
|
1366
|
+
mental_model_id: StrictStr,
|
|
1367
|
+
authorization: Optional[StrictStr] = None,
|
|
1368
|
+
_request_timeout: Union[
|
|
1369
|
+
None,
|
|
1370
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1371
|
+
Tuple[
|
|
1372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1373
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1374
|
+
]
|
|
1375
|
+
] = None,
|
|
1376
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1377
|
+
_content_type: Optional[StrictStr] = None,
|
|
1378
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1379
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1380
|
+
) -> ApiResponse[AsyncOperationSubmitResponse]:
|
|
1381
|
+
"""Refresh mental model
|
|
1382
|
+
|
|
1383
|
+
Submit an async task to re-run the source query through reflect and update the content.
|
|
1384
|
+
|
|
1385
|
+
:param bank_id: (required)
|
|
1386
|
+
:type bank_id: str
|
|
1387
|
+
:param mental_model_id: (required)
|
|
1388
|
+
:type mental_model_id: str
|
|
1389
|
+
:param authorization:
|
|
1390
|
+
:type authorization: str
|
|
1391
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1392
|
+
number provided, it will be total request
|
|
1393
|
+
timeout. It can also be a pair (tuple) of
|
|
1394
|
+
(connection, read) timeouts.
|
|
1395
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1396
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1397
|
+
request; this effectively ignores the
|
|
1398
|
+
authentication in the spec for a single request.
|
|
1399
|
+
:type _request_auth: dict, optional
|
|
1400
|
+
:param _content_type: force content-type for the request.
|
|
1401
|
+
:type _content_type: str, Optional
|
|
1402
|
+
:param _headers: set to override the headers for a single
|
|
1403
|
+
request; this effectively ignores the headers
|
|
1404
|
+
in the spec for a single request.
|
|
1405
|
+
:type _headers: dict, optional
|
|
1406
|
+
:param _host_index: set to override the host_index for a single
|
|
1407
|
+
request; this effectively ignores the host_index
|
|
1408
|
+
in the spec for a single request.
|
|
1409
|
+
:type _host_index: int, optional
|
|
1410
|
+
:return: Returns the result object.
|
|
1411
|
+
""" # noqa: E501
|
|
1412
|
+
|
|
1413
|
+
_param = self._refresh_mental_model_serialize(
|
|
1414
|
+
bank_id=bank_id,
|
|
1415
|
+
mental_model_id=mental_model_id,
|
|
1416
|
+
authorization=authorization,
|
|
1417
|
+
_request_auth=_request_auth,
|
|
1418
|
+
_content_type=_content_type,
|
|
1419
|
+
_headers=_headers,
|
|
1420
|
+
_host_index=_host_index
|
|
1421
|
+
)
|
|
1422
|
+
|
|
1423
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1424
|
+
'200': "AsyncOperationSubmitResponse",
|
|
1425
|
+
'422': "HTTPValidationError",
|
|
1426
|
+
}
|
|
1427
|
+
response_data = await self.api_client.call_api(
|
|
1428
|
+
*_param,
|
|
1429
|
+
_request_timeout=_request_timeout
|
|
1430
|
+
)
|
|
1431
|
+
await response_data.read()
|
|
1432
|
+
return self.api_client.response_deserialize(
|
|
1433
|
+
response_data=response_data,
|
|
1434
|
+
response_types_map=_response_types_map,
|
|
1435
|
+
)
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
@validate_call
|
|
1439
|
+
async def refresh_mental_model_without_preload_content(
|
|
1440
|
+
self,
|
|
1441
|
+
bank_id: StrictStr,
|
|
1442
|
+
mental_model_id: StrictStr,
|
|
1443
|
+
authorization: Optional[StrictStr] = None,
|
|
1444
|
+
_request_timeout: Union[
|
|
1445
|
+
None,
|
|
1446
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1447
|
+
Tuple[
|
|
1448
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1449
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1450
|
+
]
|
|
1451
|
+
] = None,
|
|
1452
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1453
|
+
_content_type: Optional[StrictStr] = None,
|
|
1454
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1455
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1456
|
+
) -> RESTResponseType:
|
|
1457
|
+
"""Refresh mental model
|
|
1458
|
+
|
|
1459
|
+
Submit an async task to re-run the source query through reflect and update the content.
|
|
1460
|
+
|
|
1461
|
+
:param bank_id: (required)
|
|
1462
|
+
:type bank_id: str
|
|
1463
|
+
:param mental_model_id: (required)
|
|
1464
|
+
:type mental_model_id: str
|
|
1465
|
+
:param authorization:
|
|
1466
|
+
:type authorization: str
|
|
1467
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1468
|
+
number provided, it will be total request
|
|
1469
|
+
timeout. It can also be a pair (tuple) of
|
|
1470
|
+
(connection, read) timeouts.
|
|
1471
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1472
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1473
|
+
request; this effectively ignores the
|
|
1474
|
+
authentication in the spec for a single request.
|
|
1475
|
+
:type _request_auth: dict, optional
|
|
1476
|
+
:param _content_type: force content-type for the request.
|
|
1477
|
+
:type _content_type: str, Optional
|
|
1478
|
+
:param _headers: set to override the headers for a single
|
|
1479
|
+
request; this effectively ignores the headers
|
|
1480
|
+
in the spec for a single request.
|
|
1481
|
+
:type _headers: dict, optional
|
|
1482
|
+
:param _host_index: set to override the host_index for a single
|
|
1483
|
+
request; this effectively ignores the host_index
|
|
1484
|
+
in the spec for a single request.
|
|
1485
|
+
:type _host_index: int, optional
|
|
1486
|
+
:return: Returns the result object.
|
|
1487
|
+
""" # noqa: E501
|
|
1488
|
+
|
|
1489
|
+
_param = self._refresh_mental_model_serialize(
|
|
1490
|
+
bank_id=bank_id,
|
|
1491
|
+
mental_model_id=mental_model_id,
|
|
1492
|
+
authorization=authorization,
|
|
1493
|
+
_request_auth=_request_auth,
|
|
1494
|
+
_content_type=_content_type,
|
|
1495
|
+
_headers=_headers,
|
|
1496
|
+
_host_index=_host_index
|
|
1497
|
+
)
|
|
1498
|
+
|
|
1499
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1500
|
+
'200': "AsyncOperationSubmitResponse",
|
|
1501
|
+
'422': "HTTPValidationError",
|
|
1502
|
+
}
|
|
1503
|
+
response_data = await self.api_client.call_api(
|
|
1504
|
+
*_param,
|
|
1505
|
+
_request_timeout=_request_timeout
|
|
1506
|
+
)
|
|
1507
|
+
return response_data.response
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
def _refresh_mental_model_serialize(
|
|
1511
|
+
self,
|
|
1512
|
+
bank_id,
|
|
1513
|
+
mental_model_id,
|
|
1514
|
+
authorization,
|
|
1515
|
+
_request_auth,
|
|
1516
|
+
_content_type,
|
|
1517
|
+
_headers,
|
|
1518
|
+
_host_index,
|
|
1519
|
+
) -> RequestSerialized:
|
|
1520
|
+
|
|
1521
|
+
_host = None
|
|
1522
|
+
|
|
1523
|
+
_collection_formats: Dict[str, str] = {
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
_path_params: Dict[str, str] = {}
|
|
1527
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1528
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1529
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1530
|
+
_files: Dict[
|
|
1531
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1532
|
+
] = {}
|
|
1533
|
+
_body_params: Optional[bytes] = None
|
|
1534
|
+
|
|
1535
|
+
# process the path parameters
|
|
1536
|
+
if bank_id is not None:
|
|
1537
|
+
_path_params['bank_id'] = bank_id
|
|
1538
|
+
if mental_model_id is not None:
|
|
1539
|
+
_path_params['mental_model_id'] = mental_model_id
|
|
1540
|
+
# process the query parameters
|
|
1541
|
+
# process the header parameters
|
|
1542
|
+
if authorization is not None:
|
|
1543
|
+
_header_params['authorization'] = authorization
|
|
1544
|
+
# process the form parameters
|
|
1545
|
+
# process the body parameter
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
# set the HTTP header `Accept`
|
|
1549
|
+
if 'Accept' not in _header_params:
|
|
1550
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1551
|
+
[
|
|
1552
|
+
'application/json'
|
|
1553
|
+
]
|
|
1554
|
+
)
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
# authentication setting
|
|
1558
|
+
_auth_settings: List[str] = [
|
|
1559
|
+
]
|
|
1560
|
+
|
|
1561
|
+
return self.api_client.param_serialize(
|
|
1562
|
+
method='POST',
|
|
1563
|
+
resource_path='/v1/default/banks/{bank_id}/mental-models/{mental_model_id}/refresh',
|
|
1564
|
+
path_params=_path_params,
|
|
1565
|
+
query_params=_query_params,
|
|
1566
|
+
header_params=_header_params,
|
|
1567
|
+
body=_body_params,
|
|
1568
|
+
post_params=_form_params,
|
|
1569
|
+
files=_files,
|
|
1570
|
+
auth_settings=_auth_settings,
|
|
1571
|
+
collection_formats=_collection_formats,
|
|
1572
|
+
_host=_host,
|
|
1573
|
+
_request_auth=_request_auth
|
|
1574
|
+
)
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
@validate_call
|
|
1580
|
+
async def update_mental_model(
|
|
1581
|
+
self,
|
|
1582
|
+
bank_id: StrictStr,
|
|
1583
|
+
mental_model_id: StrictStr,
|
|
1584
|
+
update_mental_model_request: UpdateMentalModelRequest,
|
|
1585
|
+
authorization: Optional[StrictStr] = None,
|
|
1586
|
+
_request_timeout: Union[
|
|
1587
|
+
None,
|
|
1588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1589
|
+
Tuple[
|
|
1590
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1591
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1592
|
+
]
|
|
1593
|
+
] = None,
|
|
1594
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1595
|
+
_content_type: Optional[StrictStr] = None,
|
|
1596
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1597
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1598
|
+
) -> MentalModelResponse:
|
|
1599
|
+
"""Update mental model
|
|
1600
|
+
|
|
1601
|
+
Update a mental model's name and/or source query.
|
|
1602
|
+
|
|
1603
|
+
:param bank_id: (required)
|
|
1604
|
+
:type bank_id: str
|
|
1605
|
+
:param mental_model_id: (required)
|
|
1606
|
+
:type mental_model_id: str
|
|
1607
|
+
:param update_mental_model_request: (required)
|
|
1608
|
+
:type update_mental_model_request: UpdateMentalModelRequest
|
|
1609
|
+
:param authorization:
|
|
1610
|
+
:type authorization: str
|
|
1611
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1612
|
+
number provided, it will be total request
|
|
1613
|
+
timeout. It can also be a pair (tuple) of
|
|
1614
|
+
(connection, read) timeouts.
|
|
1615
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1616
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1617
|
+
request; this effectively ignores the
|
|
1618
|
+
authentication in the spec for a single request.
|
|
1619
|
+
:type _request_auth: dict, optional
|
|
1620
|
+
:param _content_type: force content-type for the request.
|
|
1621
|
+
:type _content_type: str, Optional
|
|
1622
|
+
:param _headers: set to override the headers for a single
|
|
1623
|
+
request; this effectively ignores the headers
|
|
1624
|
+
in the spec for a single request.
|
|
1625
|
+
:type _headers: dict, optional
|
|
1626
|
+
:param _host_index: set to override the host_index for a single
|
|
1627
|
+
request; this effectively ignores the host_index
|
|
1628
|
+
in the spec for a single request.
|
|
1629
|
+
:type _host_index: int, optional
|
|
1630
|
+
:return: Returns the result object.
|
|
1631
|
+
""" # noqa: E501
|
|
1632
|
+
|
|
1633
|
+
_param = self._update_mental_model_serialize(
|
|
1634
|
+
bank_id=bank_id,
|
|
1635
|
+
mental_model_id=mental_model_id,
|
|
1636
|
+
update_mental_model_request=update_mental_model_request,
|
|
1637
|
+
authorization=authorization,
|
|
1638
|
+
_request_auth=_request_auth,
|
|
1639
|
+
_content_type=_content_type,
|
|
1640
|
+
_headers=_headers,
|
|
1641
|
+
_host_index=_host_index
|
|
1642
|
+
)
|
|
1643
|
+
|
|
1644
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1645
|
+
'200': "MentalModelResponse",
|
|
1646
|
+
'422': "HTTPValidationError",
|
|
1647
|
+
}
|
|
1648
|
+
response_data = await self.api_client.call_api(
|
|
1649
|
+
*_param,
|
|
1650
|
+
_request_timeout=_request_timeout
|
|
1651
|
+
)
|
|
1652
|
+
await response_data.read()
|
|
1653
|
+
return self.api_client.response_deserialize(
|
|
1654
|
+
response_data=response_data,
|
|
1655
|
+
response_types_map=_response_types_map,
|
|
1656
|
+
).data
|
|
1657
|
+
|
|
1658
|
+
|
|
1659
|
+
@validate_call
|
|
1660
|
+
async def update_mental_model_with_http_info(
|
|
1661
|
+
self,
|
|
1662
|
+
bank_id: StrictStr,
|
|
1663
|
+
mental_model_id: StrictStr,
|
|
1664
|
+
update_mental_model_request: UpdateMentalModelRequest,
|
|
1665
|
+
authorization: Optional[StrictStr] = None,
|
|
1666
|
+
_request_timeout: Union[
|
|
1667
|
+
None,
|
|
1668
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1669
|
+
Tuple[
|
|
1670
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1671
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1672
|
+
]
|
|
1673
|
+
] = None,
|
|
1674
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1675
|
+
_content_type: Optional[StrictStr] = None,
|
|
1676
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1677
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1678
|
+
) -> ApiResponse[MentalModelResponse]:
|
|
1679
|
+
"""Update mental model
|
|
1680
|
+
|
|
1681
|
+
Update a mental model's name and/or source query.
|
|
1682
|
+
|
|
1683
|
+
:param bank_id: (required)
|
|
1684
|
+
:type bank_id: str
|
|
1685
|
+
:param mental_model_id: (required)
|
|
1686
|
+
:type mental_model_id: str
|
|
1687
|
+
:param update_mental_model_request: (required)
|
|
1688
|
+
:type update_mental_model_request: UpdateMentalModelRequest
|
|
1689
|
+
:param authorization:
|
|
1690
|
+
:type authorization: str
|
|
1691
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1692
|
+
number provided, it will be total request
|
|
1693
|
+
timeout. It can also be a pair (tuple) of
|
|
1694
|
+
(connection, read) timeouts.
|
|
1695
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1696
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1697
|
+
request; this effectively ignores the
|
|
1698
|
+
authentication in the spec for a single request.
|
|
1699
|
+
:type _request_auth: dict, optional
|
|
1700
|
+
:param _content_type: force content-type for the request.
|
|
1701
|
+
:type _content_type: str, Optional
|
|
1702
|
+
:param _headers: set to override the headers for a single
|
|
1703
|
+
request; this effectively ignores the headers
|
|
1704
|
+
in the spec for a single request.
|
|
1705
|
+
:type _headers: dict, optional
|
|
1706
|
+
:param _host_index: set to override the host_index for a single
|
|
1707
|
+
request; this effectively ignores the host_index
|
|
1708
|
+
in the spec for a single request.
|
|
1709
|
+
:type _host_index: int, optional
|
|
1710
|
+
:return: Returns the result object.
|
|
1711
|
+
""" # noqa: E501
|
|
1712
|
+
|
|
1713
|
+
_param = self._update_mental_model_serialize(
|
|
1714
|
+
bank_id=bank_id,
|
|
1715
|
+
mental_model_id=mental_model_id,
|
|
1716
|
+
update_mental_model_request=update_mental_model_request,
|
|
1717
|
+
authorization=authorization,
|
|
1718
|
+
_request_auth=_request_auth,
|
|
1719
|
+
_content_type=_content_type,
|
|
1720
|
+
_headers=_headers,
|
|
1721
|
+
_host_index=_host_index
|
|
1722
|
+
)
|
|
1723
|
+
|
|
1724
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1725
|
+
'200': "MentalModelResponse",
|
|
1726
|
+
'422': "HTTPValidationError",
|
|
1727
|
+
}
|
|
1728
|
+
response_data = await self.api_client.call_api(
|
|
1729
|
+
*_param,
|
|
1730
|
+
_request_timeout=_request_timeout
|
|
1731
|
+
)
|
|
1732
|
+
await response_data.read()
|
|
1733
|
+
return self.api_client.response_deserialize(
|
|
1734
|
+
response_data=response_data,
|
|
1735
|
+
response_types_map=_response_types_map,
|
|
1736
|
+
)
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
@validate_call
|
|
1740
|
+
async def update_mental_model_without_preload_content(
|
|
1741
|
+
self,
|
|
1742
|
+
bank_id: StrictStr,
|
|
1743
|
+
mental_model_id: StrictStr,
|
|
1744
|
+
update_mental_model_request: UpdateMentalModelRequest,
|
|
1745
|
+
authorization: Optional[StrictStr] = None,
|
|
1746
|
+
_request_timeout: Union[
|
|
1747
|
+
None,
|
|
1748
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1749
|
+
Tuple[
|
|
1750
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1751
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1752
|
+
]
|
|
1753
|
+
] = None,
|
|
1754
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1755
|
+
_content_type: Optional[StrictStr] = None,
|
|
1756
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1757
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1758
|
+
) -> RESTResponseType:
|
|
1759
|
+
"""Update mental model
|
|
1760
|
+
|
|
1761
|
+
Update a mental model's name and/or source query.
|
|
1762
|
+
|
|
1763
|
+
:param bank_id: (required)
|
|
1764
|
+
:type bank_id: str
|
|
1765
|
+
:param mental_model_id: (required)
|
|
1766
|
+
:type mental_model_id: str
|
|
1767
|
+
:param update_mental_model_request: (required)
|
|
1768
|
+
:type update_mental_model_request: UpdateMentalModelRequest
|
|
1769
|
+
:param authorization:
|
|
1770
|
+
:type authorization: str
|
|
1771
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1772
|
+
number provided, it will be total request
|
|
1773
|
+
timeout. It can also be a pair (tuple) of
|
|
1774
|
+
(connection, read) timeouts.
|
|
1775
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1776
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1777
|
+
request; this effectively ignores the
|
|
1778
|
+
authentication in the spec for a single request.
|
|
1779
|
+
:type _request_auth: dict, optional
|
|
1780
|
+
:param _content_type: force content-type for the request.
|
|
1781
|
+
:type _content_type: str, Optional
|
|
1782
|
+
:param _headers: set to override the headers for a single
|
|
1783
|
+
request; this effectively ignores the headers
|
|
1784
|
+
in the spec for a single request.
|
|
1785
|
+
:type _headers: dict, optional
|
|
1786
|
+
:param _host_index: set to override the host_index for a single
|
|
1787
|
+
request; this effectively ignores the host_index
|
|
1788
|
+
in the spec for a single request.
|
|
1789
|
+
:type _host_index: int, optional
|
|
1790
|
+
:return: Returns the result object.
|
|
1791
|
+
""" # noqa: E501
|
|
1792
|
+
|
|
1793
|
+
_param = self._update_mental_model_serialize(
|
|
1794
|
+
bank_id=bank_id,
|
|
1795
|
+
mental_model_id=mental_model_id,
|
|
1796
|
+
update_mental_model_request=update_mental_model_request,
|
|
1797
|
+
authorization=authorization,
|
|
1798
|
+
_request_auth=_request_auth,
|
|
1799
|
+
_content_type=_content_type,
|
|
1800
|
+
_headers=_headers,
|
|
1801
|
+
_host_index=_host_index
|
|
1802
|
+
)
|
|
1803
|
+
|
|
1804
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1805
|
+
'200': "MentalModelResponse",
|
|
1806
|
+
'422': "HTTPValidationError",
|
|
1807
|
+
}
|
|
1808
|
+
response_data = await self.api_client.call_api(
|
|
1809
|
+
*_param,
|
|
1810
|
+
_request_timeout=_request_timeout
|
|
1811
|
+
)
|
|
1812
|
+
return response_data.response
|
|
1813
|
+
|
|
1814
|
+
|
|
1815
|
+
def _update_mental_model_serialize(
|
|
1816
|
+
self,
|
|
1817
|
+
bank_id,
|
|
1818
|
+
mental_model_id,
|
|
1819
|
+
update_mental_model_request,
|
|
1820
|
+
authorization,
|
|
1821
|
+
_request_auth,
|
|
1822
|
+
_content_type,
|
|
1823
|
+
_headers,
|
|
1824
|
+
_host_index,
|
|
1825
|
+
) -> RequestSerialized:
|
|
1826
|
+
|
|
1827
|
+
_host = None
|
|
1828
|
+
|
|
1829
|
+
_collection_formats: Dict[str, str] = {
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
_path_params: Dict[str, str] = {}
|
|
1833
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1834
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1835
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1836
|
+
_files: Dict[
|
|
1837
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1838
|
+
] = {}
|
|
1839
|
+
_body_params: Optional[bytes] = None
|
|
1840
|
+
|
|
1841
|
+
# process the path parameters
|
|
1842
|
+
if bank_id is not None:
|
|
1843
|
+
_path_params['bank_id'] = bank_id
|
|
1844
|
+
if mental_model_id is not None:
|
|
1845
|
+
_path_params['mental_model_id'] = mental_model_id
|
|
1846
|
+
# process the query parameters
|
|
1847
|
+
# process the header parameters
|
|
1848
|
+
if authorization is not None:
|
|
1849
|
+
_header_params['authorization'] = authorization
|
|
1850
|
+
# process the form parameters
|
|
1851
|
+
# process the body parameter
|
|
1852
|
+
if update_mental_model_request is not None:
|
|
1853
|
+
_body_params = update_mental_model_request
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
# set the HTTP header `Accept`
|
|
1857
|
+
if 'Accept' not in _header_params:
|
|
1858
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1859
|
+
[
|
|
1860
|
+
'application/json'
|
|
1861
|
+
]
|
|
1862
|
+
)
|
|
1863
|
+
|
|
1864
|
+
# set the HTTP header `Content-Type`
|
|
1865
|
+
if _content_type:
|
|
1866
|
+
_header_params['Content-Type'] = _content_type
|
|
1867
|
+
else:
|
|
1868
|
+
_default_content_type = (
|
|
1869
|
+
self.api_client.select_header_content_type(
|
|
1870
|
+
[
|
|
1871
|
+
'application/json'
|
|
1872
|
+
]
|
|
1873
|
+
)
|
|
1874
|
+
)
|
|
1875
|
+
if _default_content_type is not None:
|
|
1876
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1877
|
+
|
|
1878
|
+
# authentication setting
|
|
1879
|
+
_auth_settings: List[str] = [
|
|
1880
|
+
]
|
|
1881
|
+
|
|
1882
|
+
return self.api_client.param_serialize(
|
|
1883
|
+
method='PATCH',
|
|
1884
|
+
resource_path='/v1/default/banks/{bank_id}/mental-models/{mental_model_id}',
|
|
1885
|
+
path_params=_path_params,
|
|
1886
|
+
query_params=_query_params,
|
|
1887
|
+
header_params=_header_params,
|
|
1888
|
+
body=_body_params,
|
|
1889
|
+
post_params=_form_params,
|
|
1890
|
+
files=_files,
|
|
1891
|
+
auth_settings=_auth_settings,
|
|
1892
|
+
collection_formats=_collection_formats,
|
|
1893
|
+
_host=_host,
|
|
1894
|
+
_request_auth=_request_auth
|
|
1895
|
+
)
|
|
1896
|
+
|
|
1897
|
+
|