neurograph-core 1.202508221357__py3-none-any.whl → 1.202509071925__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.
Files changed (39) hide show
  1. neurograph/v1/__init__.py +58 -0
  2. neurograph/v1/api/__init__.py +1 -0
  3. neurograph/v1/api/dagster_api.py +271 -2
  4. neurograph/v1/api/knowledge_api.py +2269 -0
  5. neurograph/v1/api/persona_api.py +263 -2
  6. neurograph/v1/models/__init__.py +28 -0
  7. neurograph/v1/models/client_client_info.py +99 -0
  8. neurograph/v1/models/client_client_metadata_response.py +14 -2
  9. neurograph/v1/models/client_organization_brand.py +107 -0
  10. neurograph/v1/models/client_organization_detail.py +115 -0
  11. neurograph/v1/models/client_workbench_config.py +99 -0
  12. neurograph/v1/models/dagster_dagster_info.py +95 -0
  13. neurograph/v1/models/dagster_dagster_log_get_response.py +97 -0
  14. neurograph/v1/models/knowledge_err_entity_row.py +89 -0
  15. neurograph/v1/models/knowledge_ingest_raw_row.py +97 -0
  16. neurograph/v1/models/knowledge_knowledge_entity.py +115 -0
  17. neurograph/v1/models/knowledge_knowledge_entity_create_request.py +97 -0
  18. neurograph/v1/models/knowledge_knowledge_entity_create_response.py +99 -0
  19. neurograph/v1/models/knowledge_knowledge_entity_extra.py +91 -0
  20. neurograph/v1/models/knowledge_knowledge_entity_get_many_response.py +103 -0
  21. neurograph/v1/models/knowledge_knowledge_entity_in_db.py +117 -0
  22. neurograph/v1/models/knowledge_knowledge_entity_relations.py +91 -0
  23. neurograph/v1/models/knowledge_knowledge_entity_schema.py +89 -0
  24. neurograph/v1/models/knowledge_knowledge_entity_schema_row.py +99 -0
  25. neurograph/v1/models/knowledge_knowledge_entity_schema_upsert_request.py +97 -0
  26. neurograph/v1/models/knowledge_knowledge_entity_schemas_response.py +97 -0
  27. neurograph/v1/models/knowledge_knowledge_entity_schemas_upsert_response.py +95 -0
  28. neurograph/v1/models/knowledge_knowledge_entity_type_row.py +97 -0
  29. neurograph/v1/models/knowledge_knowledge_entity_upsert_request.py +95 -0
  30. neurograph/v1/models/knowledge_knowledge_entity_upsert_row.py +93 -0
  31. neurograph/v1/models/knowledge_knowledge_ingest_raw_request.py +95 -0
  32. neurograph/v1/models/knowledge_knowledge_ingest_raw_response.py +101 -0
  33. neurograph/v1/models/knowledge_knowledge_kind_response.py +89 -0
  34. neurograph/v1/models/knowledge_knowledge_type_response.py +97 -0
  35. neurograph/v1/models/knowledge_query.py +95 -0
  36. {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509071925.dist-info}/METADATA +1 -1
  37. {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509071925.dist-info}/RECORD +39 -10
  38. {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509071925.dist-info}/WHEEL +0 -0
  39. {neurograph_core-1.202508221357.dist-info → neurograph_core-1.202509071925.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,2269 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Neurograph Core
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 1.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, StrictInt, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from neurograph.v1.models.knowledge_knowledge_entity_create_request import KnowledgeKnowledgeEntityCreateRequest
23
+ from neurograph.v1.models.knowledge_knowledge_entity_create_response import KnowledgeKnowledgeEntityCreateResponse
24
+ from neurograph.v1.models.knowledge_knowledge_entity_get_many_response import KnowledgeKnowledgeEntityGetManyResponse
25
+ from neurograph.v1.models.knowledge_knowledge_entity_schema_upsert_request import KnowledgeKnowledgeEntitySchemaUpsertRequest
26
+ from neurograph.v1.models.knowledge_knowledge_entity_schemas_response import KnowledgeKnowledgeEntitySchemasResponse
27
+ from neurograph.v1.models.knowledge_knowledge_entity_schemas_upsert_response import KnowledgeKnowledgeEntitySchemasUpsertResponse
28
+ from neurograph.v1.models.knowledge_knowledge_entity_upsert_request import KnowledgeKnowledgeEntityUpsertRequest
29
+ from neurograph.v1.models.knowledge_knowledge_ingest_raw_request import KnowledgeKnowledgeIngestRawRequest
30
+ from neurograph.v1.models.knowledge_knowledge_ingest_raw_response import KnowledgeKnowledgeIngestRawResponse
31
+ from neurograph.v1.models.knowledge_knowledge_kind_response import KnowledgeKnowledgeKindResponse
32
+ from neurograph.v1.models.knowledge_knowledge_type_response import KnowledgeKnowledgeTypeResponse
33
+
34
+ from neurograph.v1.api_client import ApiClient, RequestSerialized
35
+ from neurograph.v1.api_response import ApiResponse
36
+ from neurograph.v1.rest import RESTResponseType
37
+
38
+
39
+ class KnowledgeApi:
40
+ """NOTE: This class is auto generated by OpenAPI Generator
41
+ Ref: https://openapi-generator.tech
42
+
43
+ Do not edit the class manually.
44
+ """
45
+
46
+ def __init__(self, api_client=None) -> None:
47
+ if api_client is None:
48
+ api_client = ApiClient.get_default()
49
+ self.api_client = api_client
50
+
51
+
52
+ @validate_call
53
+ def api_v1_knowledge_entity_get(
54
+ self,
55
+ client_id: Optional[StrictStr] = None,
56
+ kind: Optional[StrictStr] = None,
57
+ limit: Optional[StrictInt] = None,
58
+ offset: Optional[StrictInt] = None,
59
+ schema_id: Optional[StrictStr] = None,
60
+ _request_timeout: Union[
61
+ None,
62
+ Annotated[StrictFloat, Field(gt=0)],
63
+ Tuple[
64
+ Annotated[StrictFloat, Field(gt=0)],
65
+ Annotated[StrictFloat, Field(gt=0)]
66
+ ]
67
+ ] = None,
68
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
69
+ _content_type: Optional[StrictStr] = None,
70
+ _headers: Optional[Dict[StrictStr, Any]] = None,
71
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
72
+ ) -> KnowledgeKnowledgeEntityGetManyResponse:
73
+ """Get Knowledge Entities
74
+
75
+ Get one or many knowledge Entities, up to 10mb per request
76
+
77
+ :param client_id:
78
+ :type client_id: str
79
+ :param kind:
80
+ :type kind: str
81
+ :param limit:
82
+ :type limit: int
83
+ :param offset:
84
+ :type offset: int
85
+ :param schema_id:
86
+ :type schema_id: str
87
+ :param _request_timeout: timeout setting for this request. If one
88
+ number provided, it will be total request
89
+ timeout. It can also be a pair (tuple) of
90
+ (connection, read) timeouts.
91
+ :type _request_timeout: int, tuple(int, int), optional
92
+ :param _request_auth: set to override the auth_settings for an a single
93
+ request; this effectively ignores the
94
+ authentication in the spec for a single request.
95
+ :type _request_auth: dict, optional
96
+ :param _content_type: force content-type for the request.
97
+ :type _content_type: str, Optional
98
+ :param _headers: set to override the headers for a single
99
+ request; this effectively ignores the headers
100
+ in the spec for a single request.
101
+ :type _headers: dict, optional
102
+ :param _host_index: set to override the host_index for a single
103
+ request; this effectively ignores the host_index
104
+ in the spec for a single request.
105
+ :type _host_index: int, optional
106
+ :return: Returns the result object.
107
+ """ # noqa: E501
108
+
109
+ _param = self._api_v1_knowledge_entity_get_serialize(
110
+ client_id=client_id,
111
+ kind=kind,
112
+ limit=limit,
113
+ offset=offset,
114
+ schema_id=schema_id,
115
+ _request_auth=_request_auth,
116
+ _content_type=_content_type,
117
+ _headers=_headers,
118
+ _host_index=_host_index
119
+ )
120
+
121
+ _response_types_map: Dict[str, Optional[str]] = {
122
+ '200': "KnowledgeKnowledgeEntityGetManyResponse",
123
+ '400': "KnowledgeKnowledgeEntityGetManyResponse",
124
+ '503': "KnowledgeKnowledgeEntityGetManyResponse",
125
+ }
126
+ response_data = self.api_client.call_api(
127
+ *_param,
128
+ _request_timeout=_request_timeout
129
+ )
130
+ response_data.read()
131
+ return self.api_client.response_deserialize(
132
+ response_data=response_data,
133
+ response_types_map=_response_types_map,
134
+ ).data
135
+
136
+
137
+ @validate_call
138
+ def api_v1_knowledge_entity_get_with_http_info(
139
+ self,
140
+ client_id: Optional[StrictStr] = None,
141
+ kind: Optional[StrictStr] = None,
142
+ limit: Optional[StrictInt] = None,
143
+ offset: Optional[StrictInt] = None,
144
+ schema_id: Optional[StrictStr] = None,
145
+ _request_timeout: Union[
146
+ None,
147
+ Annotated[StrictFloat, Field(gt=0)],
148
+ Tuple[
149
+ Annotated[StrictFloat, Field(gt=0)],
150
+ Annotated[StrictFloat, Field(gt=0)]
151
+ ]
152
+ ] = None,
153
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
154
+ _content_type: Optional[StrictStr] = None,
155
+ _headers: Optional[Dict[StrictStr, Any]] = None,
156
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
157
+ ) -> ApiResponse[KnowledgeKnowledgeEntityGetManyResponse]:
158
+ """Get Knowledge Entities
159
+
160
+ Get one or many knowledge Entities, up to 10mb per request
161
+
162
+ :param client_id:
163
+ :type client_id: str
164
+ :param kind:
165
+ :type kind: str
166
+ :param limit:
167
+ :type limit: int
168
+ :param offset:
169
+ :type offset: int
170
+ :param schema_id:
171
+ :type schema_id: str
172
+ :param _request_timeout: timeout setting for this request. If one
173
+ number provided, it will be total request
174
+ timeout. It can also be a pair (tuple) of
175
+ (connection, read) timeouts.
176
+ :type _request_timeout: int, tuple(int, int), optional
177
+ :param _request_auth: set to override the auth_settings for an a single
178
+ request; this effectively ignores the
179
+ authentication in the spec for a single request.
180
+ :type _request_auth: dict, optional
181
+ :param _content_type: force content-type for the request.
182
+ :type _content_type: str, Optional
183
+ :param _headers: set to override the headers for a single
184
+ request; this effectively ignores the headers
185
+ in the spec for a single request.
186
+ :type _headers: dict, optional
187
+ :param _host_index: set to override the host_index for a single
188
+ request; this effectively ignores the host_index
189
+ in the spec for a single request.
190
+ :type _host_index: int, optional
191
+ :return: Returns the result object.
192
+ """ # noqa: E501
193
+
194
+ _param = self._api_v1_knowledge_entity_get_serialize(
195
+ client_id=client_id,
196
+ kind=kind,
197
+ limit=limit,
198
+ offset=offset,
199
+ schema_id=schema_id,
200
+ _request_auth=_request_auth,
201
+ _content_type=_content_type,
202
+ _headers=_headers,
203
+ _host_index=_host_index
204
+ )
205
+
206
+ _response_types_map: Dict[str, Optional[str]] = {
207
+ '200': "KnowledgeKnowledgeEntityGetManyResponse",
208
+ '400': "KnowledgeKnowledgeEntityGetManyResponse",
209
+ '503': "KnowledgeKnowledgeEntityGetManyResponse",
210
+ }
211
+ response_data = self.api_client.call_api(
212
+ *_param,
213
+ _request_timeout=_request_timeout
214
+ )
215
+ response_data.read()
216
+ return self.api_client.response_deserialize(
217
+ response_data=response_data,
218
+ response_types_map=_response_types_map,
219
+ )
220
+
221
+
222
+ @validate_call
223
+ def api_v1_knowledge_entity_get_without_preload_content(
224
+ self,
225
+ client_id: Optional[StrictStr] = None,
226
+ kind: Optional[StrictStr] = None,
227
+ limit: Optional[StrictInt] = None,
228
+ offset: Optional[StrictInt] = None,
229
+ schema_id: Optional[StrictStr] = None,
230
+ _request_timeout: Union[
231
+ None,
232
+ Annotated[StrictFloat, Field(gt=0)],
233
+ Tuple[
234
+ Annotated[StrictFloat, Field(gt=0)],
235
+ Annotated[StrictFloat, Field(gt=0)]
236
+ ]
237
+ ] = None,
238
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
239
+ _content_type: Optional[StrictStr] = None,
240
+ _headers: Optional[Dict[StrictStr, Any]] = None,
241
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
242
+ ) -> RESTResponseType:
243
+ """Get Knowledge Entities
244
+
245
+ Get one or many knowledge Entities, up to 10mb per request
246
+
247
+ :param client_id:
248
+ :type client_id: str
249
+ :param kind:
250
+ :type kind: str
251
+ :param limit:
252
+ :type limit: int
253
+ :param offset:
254
+ :type offset: int
255
+ :param schema_id:
256
+ :type schema_id: str
257
+ :param _request_timeout: timeout setting for this request. If one
258
+ number provided, it will be total request
259
+ timeout. It can also be a pair (tuple) of
260
+ (connection, read) timeouts.
261
+ :type _request_timeout: int, tuple(int, int), optional
262
+ :param _request_auth: set to override the auth_settings for an a single
263
+ request; this effectively ignores the
264
+ authentication in the spec for a single request.
265
+ :type _request_auth: dict, optional
266
+ :param _content_type: force content-type for the request.
267
+ :type _content_type: str, Optional
268
+ :param _headers: set to override the headers for a single
269
+ request; this effectively ignores the headers
270
+ in the spec for a single request.
271
+ :type _headers: dict, optional
272
+ :param _host_index: set to override the host_index for a single
273
+ request; this effectively ignores the host_index
274
+ in the spec for a single request.
275
+ :type _host_index: int, optional
276
+ :return: Returns the result object.
277
+ """ # noqa: E501
278
+
279
+ _param = self._api_v1_knowledge_entity_get_serialize(
280
+ client_id=client_id,
281
+ kind=kind,
282
+ limit=limit,
283
+ offset=offset,
284
+ schema_id=schema_id,
285
+ _request_auth=_request_auth,
286
+ _content_type=_content_type,
287
+ _headers=_headers,
288
+ _host_index=_host_index
289
+ )
290
+
291
+ _response_types_map: Dict[str, Optional[str]] = {
292
+ '200': "KnowledgeKnowledgeEntityGetManyResponse",
293
+ '400': "KnowledgeKnowledgeEntityGetManyResponse",
294
+ '503': "KnowledgeKnowledgeEntityGetManyResponse",
295
+ }
296
+ response_data = self.api_client.call_api(
297
+ *_param,
298
+ _request_timeout=_request_timeout
299
+ )
300
+ return response_data.response
301
+
302
+
303
+ def _api_v1_knowledge_entity_get_serialize(
304
+ self,
305
+ client_id,
306
+ kind,
307
+ limit,
308
+ offset,
309
+ schema_id,
310
+ _request_auth,
311
+ _content_type,
312
+ _headers,
313
+ _host_index,
314
+ ) -> RequestSerialized:
315
+
316
+ _host = None
317
+
318
+ _collection_formats: Dict[str, str] = {
319
+ }
320
+
321
+ _path_params: Dict[str, str] = {}
322
+ _query_params: List[Tuple[str, str]] = []
323
+ _header_params: Dict[str, Optional[str]] = _headers or {}
324
+ _form_params: List[Tuple[str, str]] = []
325
+ _files: Dict[
326
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
327
+ ] = {}
328
+ _body_params: Optional[bytes] = None
329
+
330
+ # process the path parameters
331
+ # process the query parameters
332
+ if client_id is not None:
333
+
334
+ _query_params.append(('clientId', client_id))
335
+
336
+ if kind is not None:
337
+
338
+ _query_params.append(('kind', kind))
339
+
340
+ if limit is not None:
341
+
342
+ _query_params.append(('limit', limit))
343
+
344
+ if offset is not None:
345
+
346
+ _query_params.append(('offset', offset))
347
+
348
+ if schema_id is not None:
349
+
350
+ _query_params.append(('schemaId', schema_id))
351
+
352
+ # process the header parameters
353
+ # process the form parameters
354
+ # process the body parameter
355
+
356
+
357
+ # set the HTTP header `Accept`
358
+ if 'Accept' not in _header_params:
359
+ _header_params['Accept'] = self.api_client.select_header_accept(
360
+ [
361
+ 'application/json'
362
+ ]
363
+ )
364
+
365
+
366
+ # authentication setting
367
+ _auth_settings: List[str] = [
368
+ 'TokenAuth'
369
+ ]
370
+
371
+ return self.api_client.param_serialize(
372
+ method='GET',
373
+ resource_path='/api/v1/knowledge/entity/',
374
+ path_params=_path_params,
375
+ query_params=_query_params,
376
+ header_params=_header_params,
377
+ body=_body_params,
378
+ post_params=_form_params,
379
+ files=_files,
380
+ auth_settings=_auth_settings,
381
+ collection_formats=_collection_formats,
382
+ _host=_host,
383
+ _request_auth=_request_auth
384
+ )
385
+
386
+
387
+
388
+
389
+ @validate_call
390
+ def api_v1_knowledge_entity_post(
391
+ self,
392
+ request: Annotated[KnowledgeKnowledgeEntityCreateRequest, Field(description="Body")],
393
+ _request_timeout: Union[
394
+ None,
395
+ Annotated[StrictFloat, Field(gt=0)],
396
+ Tuple[
397
+ Annotated[StrictFloat, Field(gt=0)],
398
+ Annotated[StrictFloat, Field(gt=0)]
399
+ ]
400
+ ] = None,
401
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
402
+ _content_type: Optional[StrictStr] = None,
403
+ _headers: Optional[Dict[StrictStr, Any]] = None,
404
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
405
+ ) -> KnowledgeKnowledgeEntityCreateResponse:
406
+ """Create Knowledge Entities
407
+
408
+ Create one or many knowledge Entities, up to 10mb per request
409
+
410
+ :param request: Body (required)
411
+ :type request: KnowledgeKnowledgeEntityCreateRequest
412
+ :param _request_timeout: timeout setting for this request. If one
413
+ number provided, it will be total request
414
+ timeout. It can also be a pair (tuple) of
415
+ (connection, read) timeouts.
416
+ :type _request_timeout: int, tuple(int, int), optional
417
+ :param _request_auth: set to override the auth_settings for an a single
418
+ request; this effectively ignores the
419
+ authentication in the spec for a single request.
420
+ :type _request_auth: dict, optional
421
+ :param _content_type: force content-type for the request.
422
+ :type _content_type: str, Optional
423
+ :param _headers: set to override the headers for a single
424
+ request; this effectively ignores the headers
425
+ in the spec for a single request.
426
+ :type _headers: dict, optional
427
+ :param _host_index: set to override the host_index for a single
428
+ request; this effectively ignores the host_index
429
+ in the spec for a single request.
430
+ :type _host_index: int, optional
431
+ :return: Returns the result object.
432
+ """ # noqa: E501
433
+
434
+ _param = self._api_v1_knowledge_entity_post_serialize(
435
+ request=request,
436
+ _request_auth=_request_auth,
437
+ _content_type=_content_type,
438
+ _headers=_headers,
439
+ _host_index=_host_index
440
+ )
441
+
442
+ _response_types_map: Dict[str, Optional[str]] = {
443
+ '200': "KnowledgeKnowledgeEntityCreateResponse",
444
+ '400': "KnowledgeKnowledgeEntityCreateResponse",
445
+ '503': "KnowledgeKnowledgeEntityCreateResponse",
446
+ }
447
+ response_data = self.api_client.call_api(
448
+ *_param,
449
+ _request_timeout=_request_timeout
450
+ )
451
+ response_data.read()
452
+ return self.api_client.response_deserialize(
453
+ response_data=response_data,
454
+ response_types_map=_response_types_map,
455
+ ).data
456
+
457
+
458
+ @validate_call
459
+ def api_v1_knowledge_entity_post_with_http_info(
460
+ self,
461
+ request: Annotated[KnowledgeKnowledgeEntityCreateRequest, Field(description="Body")],
462
+ _request_timeout: Union[
463
+ None,
464
+ Annotated[StrictFloat, Field(gt=0)],
465
+ Tuple[
466
+ Annotated[StrictFloat, Field(gt=0)],
467
+ Annotated[StrictFloat, Field(gt=0)]
468
+ ]
469
+ ] = None,
470
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
471
+ _content_type: Optional[StrictStr] = None,
472
+ _headers: Optional[Dict[StrictStr, Any]] = None,
473
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
474
+ ) -> ApiResponse[KnowledgeKnowledgeEntityCreateResponse]:
475
+ """Create Knowledge Entities
476
+
477
+ Create one or many knowledge Entities, up to 10mb per request
478
+
479
+ :param request: Body (required)
480
+ :type request: KnowledgeKnowledgeEntityCreateRequest
481
+ :param _request_timeout: timeout setting for this request. If one
482
+ number provided, it will be total request
483
+ timeout. It can also be a pair (tuple) of
484
+ (connection, read) timeouts.
485
+ :type _request_timeout: int, tuple(int, int), optional
486
+ :param _request_auth: set to override the auth_settings for an a single
487
+ request; this effectively ignores the
488
+ authentication in the spec for a single request.
489
+ :type _request_auth: dict, optional
490
+ :param _content_type: force content-type for the request.
491
+ :type _content_type: str, Optional
492
+ :param _headers: set to override the headers for a single
493
+ request; this effectively ignores the headers
494
+ in the spec for a single request.
495
+ :type _headers: dict, optional
496
+ :param _host_index: set to override the host_index for a single
497
+ request; this effectively ignores the host_index
498
+ in the spec for a single request.
499
+ :type _host_index: int, optional
500
+ :return: Returns the result object.
501
+ """ # noqa: E501
502
+
503
+ _param = self._api_v1_knowledge_entity_post_serialize(
504
+ request=request,
505
+ _request_auth=_request_auth,
506
+ _content_type=_content_type,
507
+ _headers=_headers,
508
+ _host_index=_host_index
509
+ )
510
+
511
+ _response_types_map: Dict[str, Optional[str]] = {
512
+ '200': "KnowledgeKnowledgeEntityCreateResponse",
513
+ '400': "KnowledgeKnowledgeEntityCreateResponse",
514
+ '503': "KnowledgeKnowledgeEntityCreateResponse",
515
+ }
516
+ response_data = self.api_client.call_api(
517
+ *_param,
518
+ _request_timeout=_request_timeout
519
+ )
520
+ response_data.read()
521
+ return self.api_client.response_deserialize(
522
+ response_data=response_data,
523
+ response_types_map=_response_types_map,
524
+ )
525
+
526
+
527
+ @validate_call
528
+ def api_v1_knowledge_entity_post_without_preload_content(
529
+ self,
530
+ request: Annotated[KnowledgeKnowledgeEntityCreateRequest, Field(description="Body")],
531
+ _request_timeout: Union[
532
+ None,
533
+ Annotated[StrictFloat, Field(gt=0)],
534
+ Tuple[
535
+ Annotated[StrictFloat, Field(gt=0)],
536
+ Annotated[StrictFloat, Field(gt=0)]
537
+ ]
538
+ ] = None,
539
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
540
+ _content_type: Optional[StrictStr] = None,
541
+ _headers: Optional[Dict[StrictStr, Any]] = None,
542
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
543
+ ) -> RESTResponseType:
544
+ """Create Knowledge Entities
545
+
546
+ Create one or many knowledge Entities, up to 10mb per request
547
+
548
+ :param request: Body (required)
549
+ :type request: KnowledgeKnowledgeEntityCreateRequest
550
+ :param _request_timeout: timeout setting for this request. If one
551
+ number provided, it will be total request
552
+ timeout. It can also be a pair (tuple) of
553
+ (connection, read) timeouts.
554
+ :type _request_timeout: int, tuple(int, int), optional
555
+ :param _request_auth: set to override the auth_settings for an a single
556
+ request; this effectively ignores the
557
+ authentication in the spec for a single request.
558
+ :type _request_auth: dict, optional
559
+ :param _content_type: force content-type for the request.
560
+ :type _content_type: str, Optional
561
+ :param _headers: set to override the headers for a single
562
+ request; this effectively ignores the headers
563
+ in the spec for a single request.
564
+ :type _headers: dict, optional
565
+ :param _host_index: set to override the host_index for a single
566
+ request; this effectively ignores the host_index
567
+ in the spec for a single request.
568
+ :type _host_index: int, optional
569
+ :return: Returns the result object.
570
+ """ # noqa: E501
571
+
572
+ _param = self._api_v1_knowledge_entity_post_serialize(
573
+ request=request,
574
+ _request_auth=_request_auth,
575
+ _content_type=_content_type,
576
+ _headers=_headers,
577
+ _host_index=_host_index
578
+ )
579
+
580
+ _response_types_map: Dict[str, Optional[str]] = {
581
+ '200': "KnowledgeKnowledgeEntityCreateResponse",
582
+ '400': "KnowledgeKnowledgeEntityCreateResponse",
583
+ '503': "KnowledgeKnowledgeEntityCreateResponse",
584
+ }
585
+ response_data = self.api_client.call_api(
586
+ *_param,
587
+ _request_timeout=_request_timeout
588
+ )
589
+ return response_data.response
590
+
591
+
592
+ def _api_v1_knowledge_entity_post_serialize(
593
+ self,
594
+ request,
595
+ _request_auth,
596
+ _content_type,
597
+ _headers,
598
+ _host_index,
599
+ ) -> RequestSerialized:
600
+
601
+ _host = None
602
+
603
+ _collection_formats: Dict[str, str] = {
604
+ }
605
+
606
+ _path_params: Dict[str, str] = {}
607
+ _query_params: List[Tuple[str, str]] = []
608
+ _header_params: Dict[str, Optional[str]] = _headers or {}
609
+ _form_params: List[Tuple[str, str]] = []
610
+ _files: Dict[
611
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
612
+ ] = {}
613
+ _body_params: Optional[bytes] = None
614
+
615
+ # process the path parameters
616
+ # process the query parameters
617
+ # process the header parameters
618
+ # process the form parameters
619
+ # process the body parameter
620
+ if request is not None:
621
+ _body_params = request
622
+
623
+
624
+ # set the HTTP header `Accept`
625
+ if 'Accept' not in _header_params:
626
+ _header_params['Accept'] = self.api_client.select_header_accept(
627
+ [
628
+ 'application/json'
629
+ ]
630
+ )
631
+
632
+ # set the HTTP header `Content-Type`
633
+ if _content_type:
634
+ _header_params['Content-Type'] = _content_type
635
+ else:
636
+ _default_content_type = (
637
+ self.api_client.select_header_content_type(
638
+ [
639
+ 'application/json'
640
+ ]
641
+ )
642
+ )
643
+ if _default_content_type is not None:
644
+ _header_params['Content-Type'] = _default_content_type
645
+
646
+ # authentication setting
647
+ _auth_settings: List[str] = [
648
+ 'TokenAuth'
649
+ ]
650
+
651
+ return self.api_client.param_serialize(
652
+ method='POST',
653
+ resource_path='/api/v1/knowledge/entity/',
654
+ path_params=_path_params,
655
+ query_params=_query_params,
656
+ header_params=_header_params,
657
+ body=_body_params,
658
+ post_params=_form_params,
659
+ files=_files,
660
+ auth_settings=_auth_settings,
661
+ collection_formats=_collection_formats,
662
+ _host=_host,
663
+ _request_auth=_request_auth
664
+ )
665
+
666
+
667
+
668
+
669
+ @validate_call
670
+ def api_v1_knowledge_ingest_raw_post(
671
+ self,
672
+ request: Annotated[KnowledgeKnowledgeIngestRawRequest, Field(description="Body")],
673
+ _request_timeout: Union[
674
+ None,
675
+ Annotated[StrictFloat, Field(gt=0)],
676
+ Tuple[
677
+ Annotated[StrictFloat, Field(gt=0)],
678
+ Annotated[StrictFloat, Field(gt=0)]
679
+ ]
680
+ ] = None,
681
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
682
+ _content_type: Optional[StrictStr] = None,
683
+ _headers: Optional[Dict[StrictStr, Any]] = None,
684
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
685
+ ) -> KnowledgeKnowledgeIngestRawResponse:
686
+ """Ingest raw source payloads
687
+
688
+ Append raw payloads into knowledge.ingest_raw (deduped by conflict key)
689
+
690
+ :param request: Body (required)
691
+ :type request: KnowledgeKnowledgeIngestRawRequest
692
+ :param _request_timeout: timeout setting for this request. If one
693
+ number provided, it will be total request
694
+ timeout. It can also be a pair (tuple) of
695
+ (connection, read) timeouts.
696
+ :type _request_timeout: int, tuple(int, int), optional
697
+ :param _request_auth: set to override the auth_settings for an a single
698
+ request; this effectively ignores the
699
+ authentication in the spec for a single request.
700
+ :type _request_auth: dict, optional
701
+ :param _content_type: force content-type for the request.
702
+ :type _content_type: str, Optional
703
+ :param _headers: set to override the headers for a single
704
+ request; this effectively ignores the headers
705
+ in the spec for a single request.
706
+ :type _headers: dict, optional
707
+ :param _host_index: set to override the host_index for a single
708
+ request; this effectively ignores the host_index
709
+ in the spec for a single request.
710
+ :type _host_index: int, optional
711
+ :return: Returns the result object.
712
+ """ # noqa: E501
713
+
714
+ _param = self._api_v1_knowledge_ingest_raw_post_serialize(
715
+ request=request,
716
+ _request_auth=_request_auth,
717
+ _content_type=_content_type,
718
+ _headers=_headers,
719
+ _host_index=_host_index
720
+ )
721
+
722
+ _response_types_map: Dict[str, Optional[str]] = {
723
+ '200': "KnowledgeKnowledgeIngestRawResponse",
724
+ '400': "KnowledgeKnowledgeIngestRawResponse",
725
+ '503': "KnowledgeKnowledgeIngestRawResponse",
726
+ }
727
+ response_data = self.api_client.call_api(
728
+ *_param,
729
+ _request_timeout=_request_timeout
730
+ )
731
+ response_data.read()
732
+ return self.api_client.response_deserialize(
733
+ response_data=response_data,
734
+ response_types_map=_response_types_map,
735
+ ).data
736
+
737
+
738
+ @validate_call
739
+ def api_v1_knowledge_ingest_raw_post_with_http_info(
740
+ self,
741
+ request: Annotated[KnowledgeKnowledgeIngestRawRequest, Field(description="Body")],
742
+ _request_timeout: Union[
743
+ None,
744
+ Annotated[StrictFloat, Field(gt=0)],
745
+ Tuple[
746
+ Annotated[StrictFloat, Field(gt=0)],
747
+ Annotated[StrictFloat, Field(gt=0)]
748
+ ]
749
+ ] = None,
750
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
751
+ _content_type: Optional[StrictStr] = None,
752
+ _headers: Optional[Dict[StrictStr, Any]] = None,
753
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
754
+ ) -> ApiResponse[KnowledgeKnowledgeIngestRawResponse]:
755
+ """Ingest raw source payloads
756
+
757
+ Append raw payloads into knowledge.ingest_raw (deduped by conflict key)
758
+
759
+ :param request: Body (required)
760
+ :type request: KnowledgeKnowledgeIngestRawRequest
761
+ :param _request_timeout: timeout setting for this request. If one
762
+ number provided, it will be total request
763
+ timeout. It can also be a pair (tuple) of
764
+ (connection, read) timeouts.
765
+ :type _request_timeout: int, tuple(int, int), optional
766
+ :param _request_auth: set to override the auth_settings for an a single
767
+ request; this effectively ignores the
768
+ authentication in the spec for a single request.
769
+ :type _request_auth: dict, optional
770
+ :param _content_type: force content-type for the request.
771
+ :type _content_type: str, Optional
772
+ :param _headers: set to override the headers for a single
773
+ request; this effectively ignores the headers
774
+ in the spec for a single request.
775
+ :type _headers: dict, optional
776
+ :param _host_index: set to override the host_index for a single
777
+ request; this effectively ignores the host_index
778
+ in the spec for a single request.
779
+ :type _host_index: int, optional
780
+ :return: Returns the result object.
781
+ """ # noqa: E501
782
+
783
+ _param = self._api_v1_knowledge_ingest_raw_post_serialize(
784
+ request=request,
785
+ _request_auth=_request_auth,
786
+ _content_type=_content_type,
787
+ _headers=_headers,
788
+ _host_index=_host_index
789
+ )
790
+
791
+ _response_types_map: Dict[str, Optional[str]] = {
792
+ '200': "KnowledgeKnowledgeIngestRawResponse",
793
+ '400': "KnowledgeKnowledgeIngestRawResponse",
794
+ '503': "KnowledgeKnowledgeIngestRawResponse",
795
+ }
796
+ response_data = self.api_client.call_api(
797
+ *_param,
798
+ _request_timeout=_request_timeout
799
+ )
800
+ response_data.read()
801
+ return self.api_client.response_deserialize(
802
+ response_data=response_data,
803
+ response_types_map=_response_types_map,
804
+ )
805
+
806
+
807
+ @validate_call
808
+ def api_v1_knowledge_ingest_raw_post_without_preload_content(
809
+ self,
810
+ request: Annotated[KnowledgeKnowledgeIngestRawRequest, Field(description="Body")],
811
+ _request_timeout: Union[
812
+ None,
813
+ Annotated[StrictFloat, Field(gt=0)],
814
+ Tuple[
815
+ Annotated[StrictFloat, Field(gt=0)],
816
+ Annotated[StrictFloat, Field(gt=0)]
817
+ ]
818
+ ] = None,
819
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
820
+ _content_type: Optional[StrictStr] = None,
821
+ _headers: Optional[Dict[StrictStr, Any]] = None,
822
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
823
+ ) -> RESTResponseType:
824
+ """Ingest raw source payloads
825
+
826
+ Append raw payloads into knowledge.ingest_raw (deduped by conflict key)
827
+
828
+ :param request: Body (required)
829
+ :type request: KnowledgeKnowledgeIngestRawRequest
830
+ :param _request_timeout: timeout setting for this request. If one
831
+ number provided, it will be total request
832
+ timeout. It can also be a pair (tuple) of
833
+ (connection, read) timeouts.
834
+ :type _request_timeout: int, tuple(int, int), optional
835
+ :param _request_auth: set to override the auth_settings for an a single
836
+ request; this effectively ignores the
837
+ authentication in the spec for a single request.
838
+ :type _request_auth: dict, optional
839
+ :param _content_type: force content-type for the request.
840
+ :type _content_type: str, Optional
841
+ :param _headers: set to override the headers for a single
842
+ request; this effectively ignores the headers
843
+ in the spec for a single request.
844
+ :type _headers: dict, optional
845
+ :param _host_index: set to override the host_index for a single
846
+ request; this effectively ignores the host_index
847
+ in the spec for a single request.
848
+ :type _host_index: int, optional
849
+ :return: Returns the result object.
850
+ """ # noqa: E501
851
+
852
+ _param = self._api_v1_knowledge_ingest_raw_post_serialize(
853
+ request=request,
854
+ _request_auth=_request_auth,
855
+ _content_type=_content_type,
856
+ _headers=_headers,
857
+ _host_index=_host_index
858
+ )
859
+
860
+ _response_types_map: Dict[str, Optional[str]] = {
861
+ '200': "KnowledgeKnowledgeIngestRawResponse",
862
+ '400': "KnowledgeKnowledgeIngestRawResponse",
863
+ '503': "KnowledgeKnowledgeIngestRawResponse",
864
+ }
865
+ response_data = self.api_client.call_api(
866
+ *_param,
867
+ _request_timeout=_request_timeout
868
+ )
869
+ return response_data.response
870
+
871
+
872
+ def _api_v1_knowledge_ingest_raw_post_serialize(
873
+ self,
874
+ request,
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
+ # process the query parameters
897
+ # process the header parameters
898
+ # process the form parameters
899
+ # process the body parameter
900
+ if request is not None:
901
+ _body_params = request
902
+
903
+
904
+ # set the HTTP header `Accept`
905
+ if 'Accept' not in _header_params:
906
+ _header_params['Accept'] = self.api_client.select_header_accept(
907
+ [
908
+ 'application/json'
909
+ ]
910
+ )
911
+
912
+ # set the HTTP header `Content-Type`
913
+ if _content_type:
914
+ _header_params['Content-Type'] = _content_type
915
+ else:
916
+ _default_content_type = (
917
+ self.api_client.select_header_content_type(
918
+ [
919
+ 'application/json'
920
+ ]
921
+ )
922
+ )
923
+ if _default_content_type is not None:
924
+ _header_params['Content-Type'] = _default_content_type
925
+
926
+ # authentication setting
927
+ _auth_settings: List[str] = [
928
+ 'TokenAuth'
929
+ ]
930
+
931
+ return self.api_client.param_serialize(
932
+ method='POST',
933
+ resource_path='/api/v1/knowledge/ingest-raw/',
934
+ path_params=_path_params,
935
+ query_params=_query_params,
936
+ header_params=_header_params,
937
+ body=_body_params,
938
+ post_params=_form_params,
939
+ files=_files,
940
+ auth_settings=_auth_settings,
941
+ collection_formats=_collection_formats,
942
+ _host=_host,
943
+ _request_auth=_request_auth
944
+ )
945
+
946
+
947
+
948
+
949
+ @validate_call
950
+ def api_v1_knowledge_kind_get(
951
+ self,
952
+ _request_timeout: Union[
953
+ None,
954
+ Annotated[StrictFloat, Field(gt=0)],
955
+ Tuple[
956
+ Annotated[StrictFloat, Field(gt=0)],
957
+ Annotated[StrictFloat, Field(gt=0)]
958
+ ]
959
+ ] = None,
960
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
961
+ _content_type: Optional[StrictStr] = None,
962
+ _headers: Optional[Dict[StrictStr, Any]] = None,
963
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
964
+ ) -> KnowledgeKnowledgeKindResponse:
965
+ """Get Knowledge Kinds
966
+
967
+ Knowledge kinds are an enum of the valid knowledg entity 'kind' field
968
+
969
+ :param _request_timeout: timeout setting for this request. If one
970
+ number provided, it will be total request
971
+ timeout. It can also be a pair (tuple) of
972
+ (connection, read) timeouts.
973
+ :type _request_timeout: int, tuple(int, int), optional
974
+ :param _request_auth: set to override the auth_settings for an a single
975
+ request; this effectively ignores the
976
+ authentication in the spec for a single request.
977
+ :type _request_auth: dict, optional
978
+ :param _content_type: force content-type for the request.
979
+ :type _content_type: str, Optional
980
+ :param _headers: set to override the headers for a single
981
+ request; this effectively ignores the headers
982
+ in the spec for a single request.
983
+ :type _headers: dict, optional
984
+ :param _host_index: set to override the host_index for a single
985
+ request; this effectively ignores the host_index
986
+ in the spec for a single request.
987
+ :type _host_index: int, optional
988
+ :return: Returns the result object.
989
+ """ # noqa: E501
990
+
991
+ _param = self._api_v1_knowledge_kind_get_serialize(
992
+ _request_auth=_request_auth,
993
+ _content_type=_content_type,
994
+ _headers=_headers,
995
+ _host_index=_host_index
996
+ )
997
+
998
+ _response_types_map: Dict[str, Optional[str]] = {
999
+ '200': "KnowledgeKnowledgeKindResponse",
1000
+ '400': "KnowledgeKnowledgeKindResponse",
1001
+ '503': "KnowledgeKnowledgeKindResponse",
1002
+ }
1003
+ response_data = self.api_client.call_api(
1004
+ *_param,
1005
+ _request_timeout=_request_timeout
1006
+ )
1007
+ response_data.read()
1008
+ return self.api_client.response_deserialize(
1009
+ response_data=response_data,
1010
+ response_types_map=_response_types_map,
1011
+ ).data
1012
+
1013
+
1014
+ @validate_call
1015
+ def api_v1_knowledge_kind_get_with_http_info(
1016
+ self,
1017
+ _request_timeout: Union[
1018
+ None,
1019
+ Annotated[StrictFloat, Field(gt=0)],
1020
+ Tuple[
1021
+ Annotated[StrictFloat, Field(gt=0)],
1022
+ Annotated[StrictFloat, Field(gt=0)]
1023
+ ]
1024
+ ] = None,
1025
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1026
+ _content_type: Optional[StrictStr] = None,
1027
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1028
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1029
+ ) -> ApiResponse[KnowledgeKnowledgeKindResponse]:
1030
+ """Get Knowledge Kinds
1031
+
1032
+ Knowledge kinds are an enum of the valid knowledg entity 'kind' field
1033
+
1034
+ :param _request_timeout: timeout setting for this request. If one
1035
+ number provided, it will be total request
1036
+ timeout. It can also be a pair (tuple) of
1037
+ (connection, read) timeouts.
1038
+ :type _request_timeout: int, tuple(int, int), optional
1039
+ :param _request_auth: set to override the auth_settings for an a single
1040
+ request; this effectively ignores the
1041
+ authentication in the spec for a single request.
1042
+ :type _request_auth: dict, optional
1043
+ :param _content_type: force content-type for the request.
1044
+ :type _content_type: str, Optional
1045
+ :param _headers: set to override the headers for a single
1046
+ request; this effectively ignores the headers
1047
+ in the spec for a single request.
1048
+ :type _headers: dict, optional
1049
+ :param _host_index: set to override the host_index for a single
1050
+ request; this effectively ignores the host_index
1051
+ in the spec for a single request.
1052
+ :type _host_index: int, optional
1053
+ :return: Returns the result object.
1054
+ """ # noqa: E501
1055
+
1056
+ _param = self._api_v1_knowledge_kind_get_serialize(
1057
+ _request_auth=_request_auth,
1058
+ _content_type=_content_type,
1059
+ _headers=_headers,
1060
+ _host_index=_host_index
1061
+ )
1062
+
1063
+ _response_types_map: Dict[str, Optional[str]] = {
1064
+ '200': "KnowledgeKnowledgeKindResponse",
1065
+ '400': "KnowledgeKnowledgeKindResponse",
1066
+ '503': "KnowledgeKnowledgeKindResponse",
1067
+ }
1068
+ response_data = self.api_client.call_api(
1069
+ *_param,
1070
+ _request_timeout=_request_timeout
1071
+ )
1072
+ response_data.read()
1073
+ return self.api_client.response_deserialize(
1074
+ response_data=response_data,
1075
+ response_types_map=_response_types_map,
1076
+ )
1077
+
1078
+
1079
+ @validate_call
1080
+ def api_v1_knowledge_kind_get_without_preload_content(
1081
+ self,
1082
+ _request_timeout: Union[
1083
+ None,
1084
+ Annotated[StrictFloat, Field(gt=0)],
1085
+ Tuple[
1086
+ Annotated[StrictFloat, Field(gt=0)],
1087
+ Annotated[StrictFloat, Field(gt=0)]
1088
+ ]
1089
+ ] = None,
1090
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1091
+ _content_type: Optional[StrictStr] = None,
1092
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1093
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1094
+ ) -> RESTResponseType:
1095
+ """Get Knowledge Kinds
1096
+
1097
+ Knowledge kinds are an enum of the valid knowledg entity 'kind' field
1098
+
1099
+ :param _request_timeout: timeout setting for this request. If one
1100
+ number provided, it will be total request
1101
+ timeout. It can also be a pair (tuple) of
1102
+ (connection, read) timeouts.
1103
+ :type _request_timeout: int, tuple(int, int), optional
1104
+ :param _request_auth: set to override the auth_settings for an a single
1105
+ request; this effectively ignores the
1106
+ authentication in the spec for a single request.
1107
+ :type _request_auth: dict, optional
1108
+ :param _content_type: force content-type for the request.
1109
+ :type _content_type: str, Optional
1110
+ :param _headers: set to override the headers for a single
1111
+ request; this effectively ignores the headers
1112
+ in the spec for a single request.
1113
+ :type _headers: dict, optional
1114
+ :param _host_index: set to override the host_index for a single
1115
+ request; this effectively ignores the host_index
1116
+ in the spec for a single request.
1117
+ :type _host_index: int, optional
1118
+ :return: Returns the result object.
1119
+ """ # noqa: E501
1120
+
1121
+ _param = self._api_v1_knowledge_kind_get_serialize(
1122
+ _request_auth=_request_auth,
1123
+ _content_type=_content_type,
1124
+ _headers=_headers,
1125
+ _host_index=_host_index
1126
+ )
1127
+
1128
+ _response_types_map: Dict[str, Optional[str]] = {
1129
+ '200': "KnowledgeKnowledgeKindResponse",
1130
+ '400': "KnowledgeKnowledgeKindResponse",
1131
+ '503': "KnowledgeKnowledgeKindResponse",
1132
+ }
1133
+ response_data = self.api_client.call_api(
1134
+ *_param,
1135
+ _request_timeout=_request_timeout
1136
+ )
1137
+ return response_data.response
1138
+
1139
+
1140
+ def _api_v1_knowledge_kind_get_serialize(
1141
+ self,
1142
+ _request_auth,
1143
+ _content_type,
1144
+ _headers,
1145
+ _host_index,
1146
+ ) -> RequestSerialized:
1147
+
1148
+ _host = None
1149
+
1150
+ _collection_formats: Dict[str, str] = {
1151
+ }
1152
+
1153
+ _path_params: Dict[str, str] = {}
1154
+ _query_params: List[Tuple[str, str]] = []
1155
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1156
+ _form_params: List[Tuple[str, str]] = []
1157
+ _files: Dict[
1158
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1159
+ ] = {}
1160
+ _body_params: Optional[bytes] = None
1161
+
1162
+ # process the path parameters
1163
+ # process the query parameters
1164
+ # process the header parameters
1165
+ # process the form parameters
1166
+ # process the body parameter
1167
+
1168
+
1169
+ # set the HTTP header `Accept`
1170
+ if 'Accept' not in _header_params:
1171
+ _header_params['Accept'] = self.api_client.select_header_accept(
1172
+ [
1173
+ 'application/json'
1174
+ ]
1175
+ )
1176
+
1177
+
1178
+ # authentication setting
1179
+ _auth_settings: List[str] = [
1180
+ 'TokenAuth',
1181
+ 'ApiKeyAuth'
1182
+ ]
1183
+
1184
+ return self.api_client.param_serialize(
1185
+ method='GET',
1186
+ resource_path='/api/v1/knowledge/kind/',
1187
+ path_params=_path_params,
1188
+ query_params=_query_params,
1189
+ header_params=_header_params,
1190
+ body=_body_params,
1191
+ post_params=_form_params,
1192
+ files=_files,
1193
+ auth_settings=_auth_settings,
1194
+ collection_formats=_collection_formats,
1195
+ _host=_host,
1196
+ _request_auth=_request_auth
1197
+ )
1198
+
1199
+
1200
+
1201
+
1202
+ @validate_call
1203
+ def api_v1_knowledge_schema_get(
1204
+ self,
1205
+ limit: Annotated[Optional[StrictInt], Field(description="Maximum number of records")] = None,
1206
+ offset: Annotated[Optional[StrictInt], Field(description="Record offset")] = None,
1207
+ _request_timeout: Union[
1208
+ None,
1209
+ Annotated[StrictFloat, Field(gt=0)],
1210
+ Tuple[
1211
+ Annotated[StrictFloat, Field(gt=0)],
1212
+ Annotated[StrictFloat, Field(gt=0)]
1213
+ ]
1214
+ ] = None,
1215
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1216
+ _content_type: Optional[StrictStr] = None,
1217
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1218
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1219
+ ) -> KnowledgeKnowledgeEntitySchemasResponse:
1220
+ """Get Knowledge Entity Schemas
1221
+
1222
+
1223
+ :param limit: Maximum number of records
1224
+ :type limit: int
1225
+ :param offset: Record offset
1226
+ :type offset: int
1227
+ :param _request_timeout: timeout setting for this request. If one
1228
+ number provided, it will be total request
1229
+ timeout. It can also be a pair (tuple) of
1230
+ (connection, read) timeouts.
1231
+ :type _request_timeout: int, tuple(int, int), optional
1232
+ :param _request_auth: set to override the auth_settings for an a single
1233
+ request; this effectively ignores the
1234
+ authentication in the spec for a single request.
1235
+ :type _request_auth: dict, optional
1236
+ :param _content_type: force content-type for the request.
1237
+ :type _content_type: str, Optional
1238
+ :param _headers: set to override the headers for a single
1239
+ request; this effectively ignores the headers
1240
+ in the spec for a single request.
1241
+ :type _headers: dict, optional
1242
+ :param _host_index: set to override the host_index for a single
1243
+ request; this effectively ignores the host_index
1244
+ in the spec for a single request.
1245
+ :type _host_index: int, optional
1246
+ :return: Returns the result object.
1247
+ """ # noqa: E501
1248
+
1249
+ _param = self._api_v1_knowledge_schema_get_serialize(
1250
+ limit=limit,
1251
+ offset=offset,
1252
+ _request_auth=_request_auth,
1253
+ _content_type=_content_type,
1254
+ _headers=_headers,
1255
+ _host_index=_host_index
1256
+ )
1257
+
1258
+ _response_types_map: Dict[str, Optional[str]] = {
1259
+ '200': "KnowledgeKnowledgeEntitySchemasResponse",
1260
+ '400': "KnowledgeKnowledgeEntitySchemasResponse",
1261
+ '503': "KnowledgeKnowledgeEntitySchemasResponse",
1262
+ }
1263
+ response_data = self.api_client.call_api(
1264
+ *_param,
1265
+ _request_timeout=_request_timeout
1266
+ )
1267
+ response_data.read()
1268
+ return self.api_client.response_deserialize(
1269
+ response_data=response_data,
1270
+ response_types_map=_response_types_map,
1271
+ ).data
1272
+
1273
+
1274
+ @validate_call
1275
+ def api_v1_knowledge_schema_get_with_http_info(
1276
+ self,
1277
+ limit: Annotated[Optional[StrictInt], Field(description="Maximum number of records")] = None,
1278
+ offset: Annotated[Optional[StrictInt], Field(description="Record offset")] = None,
1279
+ _request_timeout: Union[
1280
+ None,
1281
+ Annotated[StrictFloat, Field(gt=0)],
1282
+ Tuple[
1283
+ Annotated[StrictFloat, Field(gt=0)],
1284
+ Annotated[StrictFloat, Field(gt=0)]
1285
+ ]
1286
+ ] = None,
1287
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1288
+ _content_type: Optional[StrictStr] = None,
1289
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1290
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1291
+ ) -> ApiResponse[KnowledgeKnowledgeEntitySchemasResponse]:
1292
+ """Get Knowledge Entity Schemas
1293
+
1294
+
1295
+ :param limit: Maximum number of records
1296
+ :type limit: int
1297
+ :param offset: Record offset
1298
+ :type offset: int
1299
+ :param _request_timeout: timeout setting for this request. If one
1300
+ number provided, it will be total request
1301
+ timeout. It can also be a pair (tuple) of
1302
+ (connection, read) timeouts.
1303
+ :type _request_timeout: int, tuple(int, int), optional
1304
+ :param _request_auth: set to override the auth_settings for an a single
1305
+ request; this effectively ignores the
1306
+ authentication in the spec for a single request.
1307
+ :type _request_auth: dict, optional
1308
+ :param _content_type: force content-type for the request.
1309
+ :type _content_type: str, Optional
1310
+ :param _headers: set to override the headers for a single
1311
+ request; this effectively ignores the headers
1312
+ in the spec for a single request.
1313
+ :type _headers: dict, optional
1314
+ :param _host_index: set to override the host_index for a single
1315
+ request; this effectively ignores the host_index
1316
+ in the spec for a single request.
1317
+ :type _host_index: int, optional
1318
+ :return: Returns the result object.
1319
+ """ # noqa: E501
1320
+
1321
+ _param = self._api_v1_knowledge_schema_get_serialize(
1322
+ limit=limit,
1323
+ offset=offset,
1324
+ _request_auth=_request_auth,
1325
+ _content_type=_content_type,
1326
+ _headers=_headers,
1327
+ _host_index=_host_index
1328
+ )
1329
+
1330
+ _response_types_map: Dict[str, Optional[str]] = {
1331
+ '200': "KnowledgeKnowledgeEntitySchemasResponse",
1332
+ '400': "KnowledgeKnowledgeEntitySchemasResponse",
1333
+ '503': "KnowledgeKnowledgeEntitySchemasResponse",
1334
+ }
1335
+ response_data = self.api_client.call_api(
1336
+ *_param,
1337
+ _request_timeout=_request_timeout
1338
+ )
1339
+ response_data.read()
1340
+ return self.api_client.response_deserialize(
1341
+ response_data=response_data,
1342
+ response_types_map=_response_types_map,
1343
+ )
1344
+
1345
+
1346
+ @validate_call
1347
+ def api_v1_knowledge_schema_get_without_preload_content(
1348
+ self,
1349
+ limit: Annotated[Optional[StrictInt], Field(description="Maximum number of records")] = None,
1350
+ offset: Annotated[Optional[StrictInt], Field(description="Record offset")] = None,
1351
+ _request_timeout: Union[
1352
+ None,
1353
+ Annotated[StrictFloat, Field(gt=0)],
1354
+ Tuple[
1355
+ Annotated[StrictFloat, Field(gt=0)],
1356
+ Annotated[StrictFloat, Field(gt=0)]
1357
+ ]
1358
+ ] = None,
1359
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1360
+ _content_type: Optional[StrictStr] = None,
1361
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1362
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1363
+ ) -> RESTResponseType:
1364
+ """Get Knowledge Entity Schemas
1365
+
1366
+
1367
+ :param limit: Maximum number of records
1368
+ :type limit: int
1369
+ :param offset: Record offset
1370
+ :type offset: int
1371
+ :param _request_timeout: timeout setting for this request. If one
1372
+ number provided, it will be total request
1373
+ timeout. It can also be a pair (tuple) of
1374
+ (connection, read) timeouts.
1375
+ :type _request_timeout: int, tuple(int, int), optional
1376
+ :param _request_auth: set to override the auth_settings for an a single
1377
+ request; this effectively ignores the
1378
+ authentication in the spec for a single request.
1379
+ :type _request_auth: dict, optional
1380
+ :param _content_type: force content-type for the request.
1381
+ :type _content_type: str, Optional
1382
+ :param _headers: set to override the headers for a single
1383
+ request; this effectively ignores the headers
1384
+ in the spec for a single request.
1385
+ :type _headers: dict, optional
1386
+ :param _host_index: set to override the host_index for a single
1387
+ request; this effectively ignores the host_index
1388
+ in the spec for a single request.
1389
+ :type _host_index: int, optional
1390
+ :return: Returns the result object.
1391
+ """ # noqa: E501
1392
+
1393
+ _param = self._api_v1_knowledge_schema_get_serialize(
1394
+ limit=limit,
1395
+ offset=offset,
1396
+ _request_auth=_request_auth,
1397
+ _content_type=_content_type,
1398
+ _headers=_headers,
1399
+ _host_index=_host_index
1400
+ )
1401
+
1402
+ _response_types_map: Dict[str, Optional[str]] = {
1403
+ '200': "KnowledgeKnowledgeEntitySchemasResponse",
1404
+ '400': "KnowledgeKnowledgeEntitySchemasResponse",
1405
+ '503': "KnowledgeKnowledgeEntitySchemasResponse",
1406
+ }
1407
+ response_data = self.api_client.call_api(
1408
+ *_param,
1409
+ _request_timeout=_request_timeout
1410
+ )
1411
+ return response_data.response
1412
+
1413
+
1414
+ def _api_v1_knowledge_schema_get_serialize(
1415
+ self,
1416
+ limit,
1417
+ offset,
1418
+ _request_auth,
1419
+ _content_type,
1420
+ _headers,
1421
+ _host_index,
1422
+ ) -> RequestSerialized:
1423
+
1424
+ _host = None
1425
+
1426
+ _collection_formats: Dict[str, str] = {
1427
+ }
1428
+
1429
+ _path_params: Dict[str, str] = {}
1430
+ _query_params: List[Tuple[str, str]] = []
1431
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1432
+ _form_params: List[Tuple[str, str]] = []
1433
+ _files: Dict[
1434
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1435
+ ] = {}
1436
+ _body_params: Optional[bytes] = None
1437
+
1438
+ # process the path parameters
1439
+ # process the query parameters
1440
+ if limit is not None:
1441
+
1442
+ _query_params.append(('limit', limit))
1443
+
1444
+ if offset is not None:
1445
+
1446
+ _query_params.append(('offset', offset))
1447
+
1448
+ # process the header parameters
1449
+ # process the form parameters
1450
+ # process the body parameter
1451
+
1452
+
1453
+ # set the HTTP header `Accept`
1454
+ if 'Accept' not in _header_params:
1455
+ _header_params['Accept'] = self.api_client.select_header_accept(
1456
+ [
1457
+ 'application/json'
1458
+ ]
1459
+ )
1460
+
1461
+
1462
+ # authentication setting
1463
+ _auth_settings: List[str] = [
1464
+ 'TokenAuth',
1465
+ 'ApiKeyAuth'
1466
+ ]
1467
+
1468
+ return self.api_client.param_serialize(
1469
+ method='GET',
1470
+ resource_path='/api/v1/knowledge/schema/',
1471
+ path_params=_path_params,
1472
+ query_params=_query_params,
1473
+ header_params=_header_params,
1474
+ body=_body_params,
1475
+ post_params=_form_params,
1476
+ files=_files,
1477
+ auth_settings=_auth_settings,
1478
+ collection_formats=_collection_formats,
1479
+ _host=_host,
1480
+ _request_auth=_request_auth
1481
+ )
1482
+
1483
+
1484
+
1485
+
1486
+ @validate_call
1487
+ def api_v1_knowledge_schema_post(
1488
+ self,
1489
+ request: Annotated[KnowledgeKnowledgeEntitySchemaUpsertRequest, Field(description="Body")],
1490
+ _request_timeout: Union[
1491
+ None,
1492
+ Annotated[StrictFloat, Field(gt=0)],
1493
+ Tuple[
1494
+ Annotated[StrictFloat, Field(gt=0)],
1495
+ Annotated[StrictFloat, Field(gt=0)]
1496
+ ]
1497
+ ] = None,
1498
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1499
+ _content_type: Optional[StrictStr] = None,
1500
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1501
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1502
+ ) -> KnowledgeKnowledgeEntitySchemasUpsertResponse:
1503
+ """Upsert a Knowledge Entity Schema
1504
+
1505
+
1506
+ :param request: Body (required)
1507
+ :type request: KnowledgeKnowledgeEntitySchemaUpsertRequest
1508
+ :param _request_timeout: timeout setting for this request. If one
1509
+ number provided, it will be total request
1510
+ timeout. It can also be a pair (tuple) of
1511
+ (connection, read) timeouts.
1512
+ :type _request_timeout: int, tuple(int, int), optional
1513
+ :param _request_auth: set to override the auth_settings for an a single
1514
+ request; this effectively ignores the
1515
+ authentication in the spec for a single request.
1516
+ :type _request_auth: dict, optional
1517
+ :param _content_type: force content-type for the request.
1518
+ :type _content_type: str, Optional
1519
+ :param _headers: set to override the headers for a single
1520
+ request; this effectively ignores the headers
1521
+ in the spec for a single request.
1522
+ :type _headers: dict, optional
1523
+ :param _host_index: set to override the host_index for a single
1524
+ request; this effectively ignores the host_index
1525
+ in the spec for a single request.
1526
+ :type _host_index: int, optional
1527
+ :return: Returns the result object.
1528
+ """ # noqa: E501
1529
+
1530
+ _param = self._api_v1_knowledge_schema_post_serialize(
1531
+ request=request,
1532
+ _request_auth=_request_auth,
1533
+ _content_type=_content_type,
1534
+ _headers=_headers,
1535
+ _host_index=_host_index
1536
+ )
1537
+
1538
+ _response_types_map: Dict[str, Optional[str]] = {
1539
+ '200': "KnowledgeKnowledgeEntitySchemasUpsertResponse",
1540
+ '400': "KnowledgeKnowledgeEntitySchemasUpsertResponse",
1541
+ '503': "KnowledgeKnowledgeEntitySchemasUpsertResponse",
1542
+ }
1543
+ response_data = self.api_client.call_api(
1544
+ *_param,
1545
+ _request_timeout=_request_timeout
1546
+ )
1547
+ response_data.read()
1548
+ return self.api_client.response_deserialize(
1549
+ response_data=response_data,
1550
+ response_types_map=_response_types_map,
1551
+ ).data
1552
+
1553
+
1554
+ @validate_call
1555
+ def api_v1_knowledge_schema_post_with_http_info(
1556
+ self,
1557
+ request: Annotated[KnowledgeKnowledgeEntitySchemaUpsertRequest, Field(description="Body")],
1558
+ _request_timeout: Union[
1559
+ None,
1560
+ Annotated[StrictFloat, Field(gt=0)],
1561
+ Tuple[
1562
+ Annotated[StrictFloat, Field(gt=0)],
1563
+ Annotated[StrictFloat, Field(gt=0)]
1564
+ ]
1565
+ ] = None,
1566
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1567
+ _content_type: Optional[StrictStr] = None,
1568
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1569
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1570
+ ) -> ApiResponse[KnowledgeKnowledgeEntitySchemasUpsertResponse]:
1571
+ """Upsert a Knowledge Entity Schema
1572
+
1573
+
1574
+ :param request: Body (required)
1575
+ :type request: KnowledgeKnowledgeEntitySchemaUpsertRequest
1576
+ :param _request_timeout: timeout setting for this request. If one
1577
+ number provided, it will be total request
1578
+ timeout. It can also be a pair (tuple) of
1579
+ (connection, read) timeouts.
1580
+ :type _request_timeout: int, tuple(int, int), optional
1581
+ :param _request_auth: set to override the auth_settings for an a single
1582
+ request; this effectively ignores the
1583
+ authentication in the spec for a single request.
1584
+ :type _request_auth: dict, optional
1585
+ :param _content_type: force content-type for the request.
1586
+ :type _content_type: str, Optional
1587
+ :param _headers: set to override the headers for a single
1588
+ request; this effectively ignores the headers
1589
+ in the spec for a single request.
1590
+ :type _headers: dict, optional
1591
+ :param _host_index: set to override the host_index for a single
1592
+ request; this effectively ignores the host_index
1593
+ in the spec for a single request.
1594
+ :type _host_index: int, optional
1595
+ :return: Returns the result object.
1596
+ """ # noqa: E501
1597
+
1598
+ _param = self._api_v1_knowledge_schema_post_serialize(
1599
+ request=request,
1600
+ _request_auth=_request_auth,
1601
+ _content_type=_content_type,
1602
+ _headers=_headers,
1603
+ _host_index=_host_index
1604
+ )
1605
+
1606
+ _response_types_map: Dict[str, Optional[str]] = {
1607
+ '200': "KnowledgeKnowledgeEntitySchemasUpsertResponse",
1608
+ '400': "KnowledgeKnowledgeEntitySchemasUpsertResponse",
1609
+ '503': "KnowledgeKnowledgeEntitySchemasUpsertResponse",
1610
+ }
1611
+ response_data = self.api_client.call_api(
1612
+ *_param,
1613
+ _request_timeout=_request_timeout
1614
+ )
1615
+ response_data.read()
1616
+ return self.api_client.response_deserialize(
1617
+ response_data=response_data,
1618
+ response_types_map=_response_types_map,
1619
+ )
1620
+
1621
+
1622
+ @validate_call
1623
+ def api_v1_knowledge_schema_post_without_preload_content(
1624
+ self,
1625
+ request: Annotated[KnowledgeKnowledgeEntitySchemaUpsertRequest, Field(description="Body")],
1626
+ _request_timeout: Union[
1627
+ None,
1628
+ Annotated[StrictFloat, Field(gt=0)],
1629
+ Tuple[
1630
+ Annotated[StrictFloat, Field(gt=0)],
1631
+ Annotated[StrictFloat, Field(gt=0)]
1632
+ ]
1633
+ ] = None,
1634
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1635
+ _content_type: Optional[StrictStr] = None,
1636
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1637
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1638
+ ) -> RESTResponseType:
1639
+ """Upsert a Knowledge Entity Schema
1640
+
1641
+
1642
+ :param request: Body (required)
1643
+ :type request: KnowledgeKnowledgeEntitySchemaUpsertRequest
1644
+ :param _request_timeout: timeout setting for this request. If one
1645
+ number provided, it will be total request
1646
+ timeout. It can also be a pair (tuple) of
1647
+ (connection, read) timeouts.
1648
+ :type _request_timeout: int, tuple(int, int), optional
1649
+ :param _request_auth: set to override the auth_settings for an a single
1650
+ request; this effectively ignores the
1651
+ authentication in the spec for a single request.
1652
+ :type _request_auth: dict, optional
1653
+ :param _content_type: force content-type for the request.
1654
+ :type _content_type: str, Optional
1655
+ :param _headers: set to override the headers for a single
1656
+ request; this effectively ignores the headers
1657
+ in the spec for a single request.
1658
+ :type _headers: dict, optional
1659
+ :param _host_index: set to override the host_index for a single
1660
+ request; this effectively ignores the host_index
1661
+ in the spec for a single request.
1662
+ :type _host_index: int, optional
1663
+ :return: Returns the result object.
1664
+ """ # noqa: E501
1665
+
1666
+ _param = self._api_v1_knowledge_schema_post_serialize(
1667
+ request=request,
1668
+ _request_auth=_request_auth,
1669
+ _content_type=_content_type,
1670
+ _headers=_headers,
1671
+ _host_index=_host_index
1672
+ )
1673
+
1674
+ _response_types_map: Dict[str, Optional[str]] = {
1675
+ '200': "KnowledgeKnowledgeEntitySchemasUpsertResponse",
1676
+ '400': "KnowledgeKnowledgeEntitySchemasUpsertResponse",
1677
+ '503': "KnowledgeKnowledgeEntitySchemasUpsertResponse",
1678
+ }
1679
+ response_data = self.api_client.call_api(
1680
+ *_param,
1681
+ _request_timeout=_request_timeout
1682
+ )
1683
+ return response_data.response
1684
+
1685
+
1686
+ def _api_v1_knowledge_schema_post_serialize(
1687
+ self,
1688
+ request,
1689
+ _request_auth,
1690
+ _content_type,
1691
+ _headers,
1692
+ _host_index,
1693
+ ) -> RequestSerialized:
1694
+
1695
+ _host = None
1696
+
1697
+ _collection_formats: Dict[str, str] = {
1698
+ }
1699
+
1700
+ _path_params: Dict[str, str] = {}
1701
+ _query_params: List[Tuple[str, str]] = []
1702
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1703
+ _form_params: List[Tuple[str, str]] = []
1704
+ _files: Dict[
1705
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1706
+ ] = {}
1707
+ _body_params: Optional[bytes] = None
1708
+
1709
+ # process the path parameters
1710
+ # process the query parameters
1711
+ # process the header parameters
1712
+ # process the form parameters
1713
+ # process the body parameter
1714
+ if request is not None:
1715
+ _body_params = request
1716
+
1717
+
1718
+ # set the HTTP header `Accept`
1719
+ if 'Accept' not in _header_params:
1720
+ _header_params['Accept'] = self.api_client.select_header_accept(
1721
+ [
1722
+ 'application/json'
1723
+ ]
1724
+ )
1725
+
1726
+
1727
+ # authentication setting
1728
+ _auth_settings: List[str] = [
1729
+ 'TokenAuth',
1730
+ 'ApiKeyAuth'
1731
+ ]
1732
+
1733
+ return self.api_client.param_serialize(
1734
+ method='POST',
1735
+ resource_path='/api/v1/knowledge/schema/',
1736
+ path_params=_path_params,
1737
+ query_params=_query_params,
1738
+ header_params=_header_params,
1739
+ body=_body_params,
1740
+ post_params=_form_params,
1741
+ files=_files,
1742
+ auth_settings=_auth_settings,
1743
+ collection_formats=_collection_formats,
1744
+ _host=_host,
1745
+ _request_auth=_request_auth
1746
+ )
1747
+
1748
+
1749
+
1750
+
1751
+ @validate_call
1752
+ def api_v1_knowledge_type_get(
1753
+ self,
1754
+ _request_timeout: Union[
1755
+ None,
1756
+ Annotated[StrictFloat, Field(gt=0)],
1757
+ Tuple[
1758
+ Annotated[StrictFloat, Field(gt=0)],
1759
+ Annotated[StrictFloat, Field(gt=0)]
1760
+ ]
1761
+ ] = None,
1762
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1763
+ _content_type: Optional[StrictStr] = None,
1764
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1765
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1766
+ ) -> KnowledgeKnowledgeTypeResponse:
1767
+ """Get Knowledge Types
1768
+
1769
+ Knowledge Types are a sub-classification under kind.
1770
+
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._api_v1_knowledge_type_get_serialize(
1794
+ _request_auth=_request_auth,
1795
+ _content_type=_content_type,
1796
+ _headers=_headers,
1797
+ _host_index=_host_index
1798
+ )
1799
+
1800
+ _response_types_map: Dict[str, Optional[str]] = {
1801
+ '200': "KnowledgeKnowledgeTypeResponse",
1802
+ '400': "KnowledgeKnowledgeTypeResponse",
1803
+ '503': "KnowledgeKnowledgeTypeResponse",
1804
+ }
1805
+ response_data = self.api_client.call_api(
1806
+ *_param,
1807
+ _request_timeout=_request_timeout
1808
+ )
1809
+ response_data.read()
1810
+ return self.api_client.response_deserialize(
1811
+ response_data=response_data,
1812
+ response_types_map=_response_types_map,
1813
+ ).data
1814
+
1815
+
1816
+ @validate_call
1817
+ def api_v1_knowledge_type_get_with_http_info(
1818
+ self,
1819
+ _request_timeout: Union[
1820
+ None,
1821
+ Annotated[StrictFloat, Field(gt=0)],
1822
+ Tuple[
1823
+ Annotated[StrictFloat, Field(gt=0)],
1824
+ Annotated[StrictFloat, Field(gt=0)]
1825
+ ]
1826
+ ] = None,
1827
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1828
+ _content_type: Optional[StrictStr] = None,
1829
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1830
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1831
+ ) -> ApiResponse[KnowledgeKnowledgeTypeResponse]:
1832
+ """Get Knowledge Types
1833
+
1834
+ Knowledge Types are a sub-classification under kind.
1835
+
1836
+ :param _request_timeout: timeout setting for this request. If one
1837
+ number provided, it will be total request
1838
+ timeout. It can also be a pair (tuple) of
1839
+ (connection, read) timeouts.
1840
+ :type _request_timeout: int, tuple(int, int), optional
1841
+ :param _request_auth: set to override the auth_settings for an a single
1842
+ request; this effectively ignores the
1843
+ authentication in the spec for a single request.
1844
+ :type _request_auth: dict, optional
1845
+ :param _content_type: force content-type for the request.
1846
+ :type _content_type: str, Optional
1847
+ :param _headers: set to override the headers for a single
1848
+ request; this effectively ignores the headers
1849
+ in the spec for a single request.
1850
+ :type _headers: dict, optional
1851
+ :param _host_index: set to override the host_index for a single
1852
+ request; this effectively ignores the host_index
1853
+ in the spec for a single request.
1854
+ :type _host_index: int, optional
1855
+ :return: Returns the result object.
1856
+ """ # noqa: E501
1857
+
1858
+ _param = self._api_v1_knowledge_type_get_serialize(
1859
+ _request_auth=_request_auth,
1860
+ _content_type=_content_type,
1861
+ _headers=_headers,
1862
+ _host_index=_host_index
1863
+ )
1864
+
1865
+ _response_types_map: Dict[str, Optional[str]] = {
1866
+ '200': "KnowledgeKnowledgeTypeResponse",
1867
+ '400': "KnowledgeKnowledgeTypeResponse",
1868
+ '503': "KnowledgeKnowledgeTypeResponse",
1869
+ }
1870
+ response_data = self.api_client.call_api(
1871
+ *_param,
1872
+ _request_timeout=_request_timeout
1873
+ )
1874
+ response_data.read()
1875
+ return self.api_client.response_deserialize(
1876
+ response_data=response_data,
1877
+ response_types_map=_response_types_map,
1878
+ )
1879
+
1880
+
1881
+ @validate_call
1882
+ def api_v1_knowledge_type_get_without_preload_content(
1883
+ self,
1884
+ _request_timeout: Union[
1885
+ None,
1886
+ Annotated[StrictFloat, Field(gt=0)],
1887
+ Tuple[
1888
+ Annotated[StrictFloat, Field(gt=0)],
1889
+ Annotated[StrictFloat, Field(gt=0)]
1890
+ ]
1891
+ ] = None,
1892
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1893
+ _content_type: Optional[StrictStr] = None,
1894
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1895
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1896
+ ) -> RESTResponseType:
1897
+ """Get Knowledge Types
1898
+
1899
+ Knowledge Types are a sub-classification under kind.
1900
+
1901
+ :param _request_timeout: timeout setting for this request. If one
1902
+ number provided, it will be total request
1903
+ timeout. It can also be a pair (tuple) of
1904
+ (connection, read) timeouts.
1905
+ :type _request_timeout: int, tuple(int, int), optional
1906
+ :param _request_auth: set to override the auth_settings for an a single
1907
+ request; this effectively ignores the
1908
+ authentication in the spec for a single request.
1909
+ :type _request_auth: dict, optional
1910
+ :param _content_type: force content-type for the request.
1911
+ :type _content_type: str, Optional
1912
+ :param _headers: set to override the headers for a single
1913
+ request; this effectively ignores the headers
1914
+ in the spec for a single request.
1915
+ :type _headers: dict, optional
1916
+ :param _host_index: set to override the host_index for a single
1917
+ request; this effectively ignores the host_index
1918
+ in the spec for a single request.
1919
+ :type _host_index: int, optional
1920
+ :return: Returns the result object.
1921
+ """ # noqa: E501
1922
+
1923
+ _param = self._api_v1_knowledge_type_get_serialize(
1924
+ _request_auth=_request_auth,
1925
+ _content_type=_content_type,
1926
+ _headers=_headers,
1927
+ _host_index=_host_index
1928
+ )
1929
+
1930
+ _response_types_map: Dict[str, Optional[str]] = {
1931
+ '200': "KnowledgeKnowledgeTypeResponse",
1932
+ '400': "KnowledgeKnowledgeTypeResponse",
1933
+ '503': "KnowledgeKnowledgeTypeResponse",
1934
+ }
1935
+ response_data = self.api_client.call_api(
1936
+ *_param,
1937
+ _request_timeout=_request_timeout
1938
+ )
1939
+ return response_data.response
1940
+
1941
+
1942
+ def _api_v1_knowledge_type_get_serialize(
1943
+ self,
1944
+ _request_auth,
1945
+ _content_type,
1946
+ _headers,
1947
+ _host_index,
1948
+ ) -> RequestSerialized:
1949
+
1950
+ _host = None
1951
+
1952
+ _collection_formats: Dict[str, str] = {
1953
+ }
1954
+
1955
+ _path_params: Dict[str, str] = {}
1956
+ _query_params: List[Tuple[str, str]] = []
1957
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1958
+ _form_params: List[Tuple[str, str]] = []
1959
+ _files: Dict[
1960
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1961
+ ] = {}
1962
+ _body_params: Optional[bytes] = None
1963
+
1964
+ # process the path parameters
1965
+ # process the query parameters
1966
+ # process the header parameters
1967
+ # process the form parameters
1968
+ # process the body parameter
1969
+
1970
+
1971
+ # set the HTTP header `Accept`
1972
+ if 'Accept' not in _header_params:
1973
+ _header_params['Accept'] = self.api_client.select_header_accept(
1974
+ [
1975
+ 'application/json'
1976
+ ]
1977
+ )
1978
+
1979
+
1980
+ # authentication setting
1981
+ _auth_settings: List[str] = [
1982
+ 'TokenAuth',
1983
+ 'ApiKeyAuth'
1984
+ ]
1985
+
1986
+ return self.api_client.param_serialize(
1987
+ method='GET',
1988
+ resource_path='/api/v1/knowledge/type/',
1989
+ path_params=_path_params,
1990
+ query_params=_query_params,
1991
+ header_params=_header_params,
1992
+ body=_body_params,
1993
+ post_params=_form_params,
1994
+ files=_files,
1995
+ auth_settings=_auth_settings,
1996
+ collection_formats=_collection_formats,
1997
+ _host=_host,
1998
+ _request_auth=_request_auth
1999
+ )
2000
+
2001
+
2002
+
2003
+
2004
+ @validate_call
2005
+ def api_v1_knowledge_type_post(
2006
+ self,
2007
+ request: Annotated[KnowledgeKnowledgeEntityUpsertRequest, Field(description="Body")],
2008
+ _request_timeout: Union[
2009
+ None,
2010
+ Annotated[StrictFloat, Field(gt=0)],
2011
+ Tuple[
2012
+ Annotated[StrictFloat, Field(gt=0)],
2013
+ Annotated[StrictFloat, Field(gt=0)]
2014
+ ]
2015
+ ] = None,
2016
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2017
+ _content_type: Optional[StrictStr] = None,
2018
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2019
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2020
+ ) -> KnowledgeKnowledgeTypeResponse:
2021
+ """Get Knowledge Types
2022
+
2023
+ Knowledge Types are a sub-classification under kind.
2024
+
2025
+ :param request: Body (required)
2026
+ :type request: KnowledgeKnowledgeEntityUpsertRequest
2027
+ :param _request_timeout: timeout setting for this request. If one
2028
+ number provided, it will be total request
2029
+ timeout. It can also be a pair (tuple) of
2030
+ (connection, read) timeouts.
2031
+ :type _request_timeout: int, tuple(int, int), optional
2032
+ :param _request_auth: set to override the auth_settings for an a single
2033
+ request; this effectively ignores the
2034
+ authentication in the spec for a single request.
2035
+ :type _request_auth: dict, optional
2036
+ :param _content_type: force content-type for the request.
2037
+ :type _content_type: str, Optional
2038
+ :param _headers: set to override the headers for a single
2039
+ request; this effectively ignores the headers
2040
+ in the spec for a single request.
2041
+ :type _headers: dict, optional
2042
+ :param _host_index: set to override the host_index for a single
2043
+ request; this effectively ignores the host_index
2044
+ in the spec for a single request.
2045
+ :type _host_index: int, optional
2046
+ :return: Returns the result object.
2047
+ """ # noqa: E501
2048
+
2049
+ _param = self._api_v1_knowledge_type_post_serialize(
2050
+ request=request,
2051
+ _request_auth=_request_auth,
2052
+ _content_type=_content_type,
2053
+ _headers=_headers,
2054
+ _host_index=_host_index
2055
+ )
2056
+
2057
+ _response_types_map: Dict[str, Optional[str]] = {
2058
+ '200': "KnowledgeKnowledgeTypeResponse",
2059
+ '400': "KnowledgeKnowledgeTypeResponse",
2060
+ '503': "KnowledgeKnowledgeTypeResponse",
2061
+ }
2062
+ response_data = self.api_client.call_api(
2063
+ *_param,
2064
+ _request_timeout=_request_timeout
2065
+ )
2066
+ response_data.read()
2067
+ return self.api_client.response_deserialize(
2068
+ response_data=response_data,
2069
+ response_types_map=_response_types_map,
2070
+ ).data
2071
+
2072
+
2073
+ @validate_call
2074
+ def api_v1_knowledge_type_post_with_http_info(
2075
+ self,
2076
+ request: Annotated[KnowledgeKnowledgeEntityUpsertRequest, Field(description="Body")],
2077
+ _request_timeout: Union[
2078
+ None,
2079
+ Annotated[StrictFloat, Field(gt=0)],
2080
+ Tuple[
2081
+ Annotated[StrictFloat, Field(gt=0)],
2082
+ Annotated[StrictFloat, Field(gt=0)]
2083
+ ]
2084
+ ] = None,
2085
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2086
+ _content_type: Optional[StrictStr] = None,
2087
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2088
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2089
+ ) -> ApiResponse[KnowledgeKnowledgeTypeResponse]:
2090
+ """Get Knowledge Types
2091
+
2092
+ Knowledge Types are a sub-classification under kind.
2093
+
2094
+ :param request: Body (required)
2095
+ :type request: KnowledgeKnowledgeEntityUpsertRequest
2096
+ :param _request_timeout: timeout setting for this request. If one
2097
+ number provided, it will be total request
2098
+ timeout. It can also be a pair (tuple) of
2099
+ (connection, read) timeouts.
2100
+ :type _request_timeout: int, tuple(int, int), optional
2101
+ :param _request_auth: set to override the auth_settings for an a single
2102
+ request; this effectively ignores the
2103
+ authentication in the spec for a single request.
2104
+ :type _request_auth: dict, optional
2105
+ :param _content_type: force content-type for the request.
2106
+ :type _content_type: str, Optional
2107
+ :param _headers: set to override the headers for a single
2108
+ request; this effectively ignores the headers
2109
+ in the spec for a single request.
2110
+ :type _headers: dict, optional
2111
+ :param _host_index: set to override the host_index for a single
2112
+ request; this effectively ignores the host_index
2113
+ in the spec for a single request.
2114
+ :type _host_index: int, optional
2115
+ :return: Returns the result object.
2116
+ """ # noqa: E501
2117
+
2118
+ _param = self._api_v1_knowledge_type_post_serialize(
2119
+ request=request,
2120
+ _request_auth=_request_auth,
2121
+ _content_type=_content_type,
2122
+ _headers=_headers,
2123
+ _host_index=_host_index
2124
+ )
2125
+
2126
+ _response_types_map: Dict[str, Optional[str]] = {
2127
+ '200': "KnowledgeKnowledgeTypeResponse",
2128
+ '400': "KnowledgeKnowledgeTypeResponse",
2129
+ '503': "KnowledgeKnowledgeTypeResponse",
2130
+ }
2131
+ response_data = self.api_client.call_api(
2132
+ *_param,
2133
+ _request_timeout=_request_timeout
2134
+ )
2135
+ response_data.read()
2136
+ return self.api_client.response_deserialize(
2137
+ response_data=response_data,
2138
+ response_types_map=_response_types_map,
2139
+ )
2140
+
2141
+
2142
+ @validate_call
2143
+ def api_v1_knowledge_type_post_without_preload_content(
2144
+ self,
2145
+ request: Annotated[KnowledgeKnowledgeEntityUpsertRequest, Field(description="Body")],
2146
+ _request_timeout: Union[
2147
+ None,
2148
+ Annotated[StrictFloat, Field(gt=0)],
2149
+ Tuple[
2150
+ Annotated[StrictFloat, Field(gt=0)],
2151
+ Annotated[StrictFloat, Field(gt=0)]
2152
+ ]
2153
+ ] = None,
2154
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2155
+ _content_type: Optional[StrictStr] = None,
2156
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2157
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2158
+ ) -> RESTResponseType:
2159
+ """Get Knowledge Types
2160
+
2161
+ Knowledge Types are a sub-classification under kind.
2162
+
2163
+ :param request: Body (required)
2164
+ :type request: KnowledgeKnowledgeEntityUpsertRequest
2165
+ :param _request_timeout: timeout setting for this request. If one
2166
+ number provided, it will be total request
2167
+ timeout. It can also be a pair (tuple) of
2168
+ (connection, read) timeouts.
2169
+ :type _request_timeout: int, tuple(int, int), optional
2170
+ :param _request_auth: set to override the auth_settings for an a single
2171
+ request; this effectively ignores the
2172
+ authentication in the spec for a single request.
2173
+ :type _request_auth: dict, optional
2174
+ :param _content_type: force content-type for the request.
2175
+ :type _content_type: str, Optional
2176
+ :param _headers: set to override the headers for a single
2177
+ request; this effectively ignores the headers
2178
+ in the spec for a single request.
2179
+ :type _headers: dict, optional
2180
+ :param _host_index: set to override the host_index for a single
2181
+ request; this effectively ignores the host_index
2182
+ in the spec for a single request.
2183
+ :type _host_index: int, optional
2184
+ :return: Returns the result object.
2185
+ """ # noqa: E501
2186
+
2187
+ _param = self._api_v1_knowledge_type_post_serialize(
2188
+ request=request,
2189
+ _request_auth=_request_auth,
2190
+ _content_type=_content_type,
2191
+ _headers=_headers,
2192
+ _host_index=_host_index
2193
+ )
2194
+
2195
+ _response_types_map: Dict[str, Optional[str]] = {
2196
+ '200': "KnowledgeKnowledgeTypeResponse",
2197
+ '400': "KnowledgeKnowledgeTypeResponse",
2198
+ '503': "KnowledgeKnowledgeTypeResponse",
2199
+ }
2200
+ response_data = self.api_client.call_api(
2201
+ *_param,
2202
+ _request_timeout=_request_timeout
2203
+ )
2204
+ return response_data.response
2205
+
2206
+
2207
+ def _api_v1_knowledge_type_post_serialize(
2208
+ self,
2209
+ request,
2210
+ _request_auth,
2211
+ _content_type,
2212
+ _headers,
2213
+ _host_index,
2214
+ ) -> RequestSerialized:
2215
+
2216
+ _host = None
2217
+
2218
+ _collection_formats: Dict[str, str] = {
2219
+ }
2220
+
2221
+ _path_params: Dict[str, str] = {}
2222
+ _query_params: List[Tuple[str, str]] = []
2223
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2224
+ _form_params: List[Tuple[str, str]] = []
2225
+ _files: Dict[
2226
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2227
+ ] = {}
2228
+ _body_params: Optional[bytes] = None
2229
+
2230
+ # process the path parameters
2231
+ # process the query parameters
2232
+ # process the header parameters
2233
+ # process the form parameters
2234
+ # process the body parameter
2235
+ if request is not None:
2236
+ _body_params = request
2237
+
2238
+
2239
+ # set the HTTP header `Accept`
2240
+ if 'Accept' not in _header_params:
2241
+ _header_params['Accept'] = self.api_client.select_header_accept(
2242
+ [
2243
+ 'application/json'
2244
+ ]
2245
+ )
2246
+
2247
+
2248
+ # authentication setting
2249
+ _auth_settings: List[str] = [
2250
+ 'TokenAuth',
2251
+ 'ApiKeyAuth'
2252
+ ]
2253
+
2254
+ return self.api_client.param_serialize(
2255
+ method='POST',
2256
+ resource_path='/api/v1/knowledge/type/',
2257
+ path_params=_path_params,
2258
+ query_params=_query_params,
2259
+ header_params=_header_params,
2260
+ body=_body_params,
2261
+ post_params=_form_params,
2262
+ files=_files,
2263
+ auth_settings=_auth_settings,
2264
+ collection_formats=_collection_formats,
2265
+ _host=_host,
2266
+ _request_auth=_request_auth
2267
+ )
2268
+
2269
+