bely-api 2026.3.dev3__tar.gz → 2026.3.dev5__tar.gz
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.
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/BelyApiFactory.py +1 -1
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/PKG-INFO +1 -1
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/__init__.py +2 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/logbook_api.py +618 -2
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/__init__.py +1 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/api_exception_message_exception_cause_stack_trace_inner.py +4 -4
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_element.py +7 -7
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_element_history.py +4 -4
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_element_relationship.py +7 -7
- bely_api-2026.3.dev5/belyApi/models/log_entry_attachment.py +94 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/notification_configuration.py +5 -5
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/search_result.py +6 -6
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/user_info.py +11 -11
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/bely_api.egg-info/PKG-INFO +1 -1
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/bely_api.egg-info/SOURCES.txt +1 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/setup.py +1 -1
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/__init__.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/authentication_api.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/domain_api.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/downloads_api.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/notification_configuration_api.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/property_value_api.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/search_api.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/system_log_api.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/test_api.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api/users_api.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api_client.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/api_response.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/configuration.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/exceptions.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/allowed_property_value.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/api_exception_message.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/api_exception_message_exception.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/api_exception_message_exception_cause.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/api_exception_message_exception_cause_suppressed_inner.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/connector.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/connector_type.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/domain.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/entity_info.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/entity_type.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_category.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_connector.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_domain_logbook.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_element_relationship_history.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_project.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_resource.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_source.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/item_type.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/list_tbl.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/log.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/log_document_options.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/log_document_section.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/log_entry.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/log_reaction.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/logbook_search_results.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/notification_configuration_handler_setting.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/notification_configuration_setting.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/notification_handler_config_key.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/notification_provider.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/notification_provider_config_key.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/property_metadata.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/property_type.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/property_value.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/property_value_history.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/reaction.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/relationship_type.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/relationship_type_handler.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/resource_type.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/resource_type_category.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/role_type.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/search_entities_options.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/search_entities_results.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/source.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/user_group.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/models/user_role.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/belyApi/rest.py +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/bely_api.egg-info/dependency_links.txt +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/bely_api.egg-info/entry_points.txt +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/bely_api.egg-info/requires.txt +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/bely_api.egg-info/top_level.txt +0 -0
- {bely_api-2026.3.dev3 → bely_api-2026.3.dev5}/setup.cfg +0 -0
|
@@ -66,6 +66,7 @@ __all__ = [
|
|
|
66
66
|
"LogDocumentOptions",
|
|
67
67
|
"LogDocumentSection",
|
|
68
68
|
"LogEntry",
|
|
69
|
+
"LogEntryAttachment",
|
|
69
70
|
"LogReaction",
|
|
70
71
|
"LogbookSearchResults",
|
|
71
72
|
"NotificationConfiguration",
|
|
@@ -145,6 +146,7 @@ from belyApi.models.log import Log as Log
|
|
|
145
146
|
from belyApi.models.log_document_options import LogDocumentOptions as LogDocumentOptions
|
|
146
147
|
from belyApi.models.log_document_section import LogDocumentSection as LogDocumentSection
|
|
147
148
|
from belyApi.models.log_entry import LogEntry as LogEntry
|
|
149
|
+
from belyApi.models.log_entry_attachment import LogEntryAttachment as LogEntryAttachment
|
|
148
150
|
from belyApi.models.log_reaction import LogReaction as LogReaction
|
|
149
151
|
from belyApi.models.logbook_search_results import LogbookSearchResults as LogbookSearchResults
|
|
150
152
|
from belyApi.models.notification_configuration import NotificationConfiguration as NotificationConfiguration
|
|
@@ -16,8 +16,8 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
|
-
from pydantic import Field, StrictBool, StrictInt, StrictStr
|
|
20
|
-
from typing import List, Optional
|
|
19
|
+
from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr
|
|
20
|
+
from typing import List, Optional, Tuple, Union
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from belyApi.models.entity_type import EntityType
|
|
23
23
|
from belyApi.models.item_domain_logbook import ItemDomainLogbook
|
|
@@ -25,6 +25,7 @@ from belyApi.models.item_type import ItemType
|
|
|
25
25
|
from belyApi.models.log_document_options import LogDocumentOptions
|
|
26
26
|
from belyApi.models.log_document_section import LogDocumentSection
|
|
27
27
|
from belyApi.models.log_entry import LogEntry
|
|
28
|
+
from belyApi.models.log_entry_attachment import LogEntryAttachment
|
|
28
29
|
|
|
29
30
|
from belyApi.api_client import ApiClient, RequestSerialized
|
|
30
31
|
from belyApi.api_response import ApiResponse
|
|
@@ -1422,6 +1423,278 @@ class LogbookApi:
|
|
|
1422
1423
|
|
|
1423
1424
|
|
|
1424
1425
|
|
|
1426
|
+
@validate_call
|
|
1427
|
+
def get_log_entry_attachments(
|
|
1428
|
+
self,
|
|
1429
|
+
log_document_id: StrictInt,
|
|
1430
|
+
log_id: StrictInt,
|
|
1431
|
+
_request_timeout: Union[
|
|
1432
|
+
None,
|
|
1433
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1434
|
+
Tuple[
|
|
1435
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1436
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1437
|
+
]
|
|
1438
|
+
] = None,
|
|
1439
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1440
|
+
_content_type: Optional[StrictStr] = None,
|
|
1441
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1442
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1443
|
+
) -> List[LogEntryAttachment]:
|
|
1444
|
+
"""Fetch attachments for a log entry.
|
|
1445
|
+
|
|
1446
|
+
|
|
1447
|
+
:param log_document_id: (required)
|
|
1448
|
+
:type log_document_id: int
|
|
1449
|
+
:param log_id: (required)
|
|
1450
|
+
:type log_id: int
|
|
1451
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1452
|
+
number provided, it will be total request
|
|
1453
|
+
timeout. It can also be a pair (tuple) of
|
|
1454
|
+
(connection, read) timeouts.
|
|
1455
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1456
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1457
|
+
request; this effectively ignores the
|
|
1458
|
+
authentication in the spec for a single request.
|
|
1459
|
+
:type _request_auth: dict, optional
|
|
1460
|
+
:param _content_type: force content-type for the request.
|
|
1461
|
+
:type _content_type: str, Optional
|
|
1462
|
+
:param _headers: set to override the headers for a single
|
|
1463
|
+
request; this effectively ignores the headers
|
|
1464
|
+
in the spec for a single request.
|
|
1465
|
+
:type _headers: dict, optional
|
|
1466
|
+
:param _host_index: set to override the host_index for a single
|
|
1467
|
+
request; this effectively ignores the host_index
|
|
1468
|
+
in the spec for a single request.
|
|
1469
|
+
:type _host_index: int, optional
|
|
1470
|
+
:return: Returns the result object.
|
|
1471
|
+
""" # noqa: E501
|
|
1472
|
+
|
|
1473
|
+
_param = self._get_log_entry_attachments_serialize(
|
|
1474
|
+
log_document_id=log_document_id,
|
|
1475
|
+
log_id=log_id,
|
|
1476
|
+
_request_auth=_request_auth,
|
|
1477
|
+
_content_type=_content_type,
|
|
1478
|
+
_headers=_headers,
|
|
1479
|
+
_host_index=_host_index
|
|
1480
|
+
)
|
|
1481
|
+
|
|
1482
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1483
|
+
'200': "List[LogEntryAttachment]",
|
|
1484
|
+
}
|
|
1485
|
+
response_data = self.api_client.call_api(
|
|
1486
|
+
*_param,
|
|
1487
|
+
_request_timeout=_request_timeout
|
|
1488
|
+
)
|
|
1489
|
+
response_data.read()
|
|
1490
|
+
return self.api_client.response_deserialize(
|
|
1491
|
+
response_data=response_data,
|
|
1492
|
+
response_types_map=_response_types_map,
|
|
1493
|
+
).data
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
@validate_call
|
|
1497
|
+
def get_log_entry_attachments_with_http_info(
|
|
1498
|
+
self,
|
|
1499
|
+
log_document_id: StrictInt,
|
|
1500
|
+
log_id: StrictInt,
|
|
1501
|
+
_request_timeout: Union[
|
|
1502
|
+
None,
|
|
1503
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1504
|
+
Tuple[
|
|
1505
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1506
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1507
|
+
]
|
|
1508
|
+
] = None,
|
|
1509
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1510
|
+
_content_type: Optional[StrictStr] = None,
|
|
1511
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1512
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1513
|
+
) -> ApiResponse[List[LogEntryAttachment]]:
|
|
1514
|
+
"""Fetch attachments for a log entry.
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
:param log_document_id: (required)
|
|
1518
|
+
:type log_document_id: int
|
|
1519
|
+
:param log_id: (required)
|
|
1520
|
+
:type log_id: int
|
|
1521
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1522
|
+
number provided, it will be total request
|
|
1523
|
+
timeout. It can also be a pair (tuple) of
|
|
1524
|
+
(connection, read) timeouts.
|
|
1525
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1526
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1527
|
+
request; this effectively ignores the
|
|
1528
|
+
authentication in the spec for a single request.
|
|
1529
|
+
:type _request_auth: dict, optional
|
|
1530
|
+
:param _content_type: force content-type for the request.
|
|
1531
|
+
:type _content_type: str, Optional
|
|
1532
|
+
:param _headers: set to override the headers for a single
|
|
1533
|
+
request; this effectively ignores the headers
|
|
1534
|
+
in the spec for a single request.
|
|
1535
|
+
:type _headers: dict, optional
|
|
1536
|
+
:param _host_index: set to override the host_index for a single
|
|
1537
|
+
request; this effectively ignores the host_index
|
|
1538
|
+
in the spec for a single request.
|
|
1539
|
+
:type _host_index: int, optional
|
|
1540
|
+
:return: Returns the result object.
|
|
1541
|
+
""" # noqa: E501
|
|
1542
|
+
|
|
1543
|
+
_param = self._get_log_entry_attachments_serialize(
|
|
1544
|
+
log_document_id=log_document_id,
|
|
1545
|
+
log_id=log_id,
|
|
1546
|
+
_request_auth=_request_auth,
|
|
1547
|
+
_content_type=_content_type,
|
|
1548
|
+
_headers=_headers,
|
|
1549
|
+
_host_index=_host_index
|
|
1550
|
+
)
|
|
1551
|
+
|
|
1552
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1553
|
+
'200': "List[LogEntryAttachment]",
|
|
1554
|
+
}
|
|
1555
|
+
response_data = self.api_client.call_api(
|
|
1556
|
+
*_param,
|
|
1557
|
+
_request_timeout=_request_timeout
|
|
1558
|
+
)
|
|
1559
|
+
response_data.read()
|
|
1560
|
+
return self.api_client.response_deserialize(
|
|
1561
|
+
response_data=response_data,
|
|
1562
|
+
response_types_map=_response_types_map,
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
@validate_call
|
|
1567
|
+
def get_log_entry_attachments_without_preload_content(
|
|
1568
|
+
self,
|
|
1569
|
+
log_document_id: StrictInt,
|
|
1570
|
+
log_id: StrictInt,
|
|
1571
|
+
_request_timeout: Union[
|
|
1572
|
+
None,
|
|
1573
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1574
|
+
Tuple[
|
|
1575
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1576
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1577
|
+
]
|
|
1578
|
+
] = None,
|
|
1579
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1580
|
+
_content_type: Optional[StrictStr] = None,
|
|
1581
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1582
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1583
|
+
) -> RESTResponseType:
|
|
1584
|
+
"""Fetch attachments for a log entry.
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
:param log_document_id: (required)
|
|
1588
|
+
:type log_document_id: int
|
|
1589
|
+
:param log_id: (required)
|
|
1590
|
+
:type log_id: int
|
|
1591
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1592
|
+
number provided, it will be total request
|
|
1593
|
+
timeout. It can also be a pair (tuple) of
|
|
1594
|
+
(connection, read) timeouts.
|
|
1595
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1596
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1597
|
+
request; this effectively ignores the
|
|
1598
|
+
authentication in the spec for a single request.
|
|
1599
|
+
:type _request_auth: dict, optional
|
|
1600
|
+
:param _content_type: force content-type for the request.
|
|
1601
|
+
:type _content_type: str, Optional
|
|
1602
|
+
:param _headers: set to override the headers for a single
|
|
1603
|
+
request; this effectively ignores the headers
|
|
1604
|
+
in the spec for a single request.
|
|
1605
|
+
:type _headers: dict, optional
|
|
1606
|
+
:param _host_index: set to override the host_index for a single
|
|
1607
|
+
request; this effectively ignores the host_index
|
|
1608
|
+
in the spec for a single request.
|
|
1609
|
+
:type _host_index: int, optional
|
|
1610
|
+
:return: Returns the result object.
|
|
1611
|
+
""" # noqa: E501
|
|
1612
|
+
|
|
1613
|
+
_param = self._get_log_entry_attachments_serialize(
|
|
1614
|
+
log_document_id=log_document_id,
|
|
1615
|
+
log_id=log_id,
|
|
1616
|
+
_request_auth=_request_auth,
|
|
1617
|
+
_content_type=_content_type,
|
|
1618
|
+
_headers=_headers,
|
|
1619
|
+
_host_index=_host_index
|
|
1620
|
+
)
|
|
1621
|
+
|
|
1622
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1623
|
+
'200': "List[LogEntryAttachment]",
|
|
1624
|
+
}
|
|
1625
|
+
response_data = self.api_client.call_api(
|
|
1626
|
+
*_param,
|
|
1627
|
+
_request_timeout=_request_timeout
|
|
1628
|
+
)
|
|
1629
|
+
return response_data.response
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
def _get_log_entry_attachments_serialize(
|
|
1633
|
+
self,
|
|
1634
|
+
log_document_id,
|
|
1635
|
+
log_id,
|
|
1636
|
+
_request_auth,
|
|
1637
|
+
_content_type,
|
|
1638
|
+
_headers,
|
|
1639
|
+
_host_index,
|
|
1640
|
+
) -> RequestSerialized:
|
|
1641
|
+
|
|
1642
|
+
_host = None
|
|
1643
|
+
|
|
1644
|
+
_collection_formats: Dict[str, str] = {
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
_path_params: Dict[str, str] = {}
|
|
1648
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1649
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1650
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1651
|
+
_files: Dict[
|
|
1652
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1653
|
+
] = {}
|
|
1654
|
+
_body_params: Optional[bytes] = None
|
|
1655
|
+
|
|
1656
|
+
# process the path parameters
|
|
1657
|
+
if log_document_id is not None:
|
|
1658
|
+
_path_params['logDocumentId'] = log_document_id
|
|
1659
|
+
if log_id is not None:
|
|
1660
|
+
_path_params['logId'] = log_id
|
|
1661
|
+
# process the query parameters
|
|
1662
|
+
# process the header parameters
|
|
1663
|
+
# process the form parameters
|
|
1664
|
+
# process the body parameter
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
# set the HTTP header `Accept`
|
|
1668
|
+
if 'Accept' not in _header_params:
|
|
1669
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1670
|
+
[
|
|
1671
|
+
'application/json'
|
|
1672
|
+
]
|
|
1673
|
+
)
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
# authentication setting
|
|
1677
|
+
_auth_settings: List[str] = [
|
|
1678
|
+
]
|
|
1679
|
+
|
|
1680
|
+
return self.api_client.param_serialize(
|
|
1681
|
+
method='GET',
|
|
1682
|
+
resource_path='/api/Logbook/LogEntryAttachments/{logDocumentId}/{logId}',
|
|
1683
|
+
path_params=_path_params,
|
|
1684
|
+
query_params=_query_params,
|
|
1685
|
+
header_params=_header_params,
|
|
1686
|
+
body=_body_params,
|
|
1687
|
+
post_params=_form_params,
|
|
1688
|
+
files=_files,
|
|
1689
|
+
auth_settings=_auth_settings,
|
|
1690
|
+
collection_formats=_collection_formats,
|
|
1691
|
+
_host=_host,
|
|
1692
|
+
_request_auth=_request_auth
|
|
1693
|
+
)
|
|
1694
|
+
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
|
|
1425
1698
|
@validate_call
|
|
1426
1699
|
def get_log_entry_template(
|
|
1427
1700
|
self,
|
|
@@ -2661,3 +2934,346 @@ class LogbookApi:
|
|
|
2661
2934
|
)
|
|
2662
2935
|
|
|
2663
2936
|
|
|
2937
|
+
|
|
2938
|
+
|
|
2939
|
+
@validate_call
|
|
2940
|
+
def upload_attachment(
|
|
2941
|
+
self,
|
|
2942
|
+
log_document_id: StrictInt,
|
|
2943
|
+
log_id: StrictInt,
|
|
2944
|
+
body: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="File content")],
|
|
2945
|
+
append_reference: Optional[StrictBool] = None,
|
|
2946
|
+
file_name: Optional[StrictStr] = None,
|
|
2947
|
+
_request_timeout: Union[
|
|
2948
|
+
None,
|
|
2949
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2950
|
+
Tuple[
|
|
2951
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2952
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2953
|
+
]
|
|
2954
|
+
] = None,
|
|
2955
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2956
|
+
_content_type: Optional[StrictStr] = None,
|
|
2957
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2958
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2959
|
+
) -> LogEntryAttachment:
|
|
2960
|
+
"""Upload an attachment to a log entry.
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
:param log_document_id: (required)
|
|
2964
|
+
:type log_document_id: int
|
|
2965
|
+
:param log_id: (required)
|
|
2966
|
+
:type log_id: int
|
|
2967
|
+
:param body: File content (required)
|
|
2968
|
+
:type body: bytearray
|
|
2969
|
+
:param append_reference:
|
|
2970
|
+
:type append_reference: bool
|
|
2971
|
+
:param file_name:
|
|
2972
|
+
:type file_name: str
|
|
2973
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2974
|
+
number provided, it will be total request
|
|
2975
|
+
timeout. It can also be a pair (tuple) of
|
|
2976
|
+
(connection, read) timeouts.
|
|
2977
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2978
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2979
|
+
request; this effectively ignores the
|
|
2980
|
+
authentication in the spec for a single request.
|
|
2981
|
+
:type _request_auth: dict, optional
|
|
2982
|
+
:param _content_type: force content-type for the request.
|
|
2983
|
+
:type _content_type: str, Optional
|
|
2984
|
+
:param _headers: set to override the headers for a single
|
|
2985
|
+
request; this effectively ignores the headers
|
|
2986
|
+
in the spec for a single request.
|
|
2987
|
+
:type _headers: dict, optional
|
|
2988
|
+
:param _host_index: set to override the host_index for a single
|
|
2989
|
+
request; this effectively ignores the host_index
|
|
2990
|
+
in the spec for a single request.
|
|
2991
|
+
:type _host_index: int, optional
|
|
2992
|
+
:return: Returns the result object.
|
|
2993
|
+
""" # noqa: E501
|
|
2994
|
+
|
|
2995
|
+
_param = self._upload_attachment_serialize(
|
|
2996
|
+
log_document_id=log_document_id,
|
|
2997
|
+
log_id=log_id,
|
|
2998
|
+
body=body,
|
|
2999
|
+
append_reference=append_reference,
|
|
3000
|
+
file_name=file_name,
|
|
3001
|
+
_request_auth=_request_auth,
|
|
3002
|
+
_content_type=_content_type,
|
|
3003
|
+
_headers=_headers,
|
|
3004
|
+
_host_index=_host_index
|
|
3005
|
+
)
|
|
3006
|
+
|
|
3007
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3008
|
+
'200': "LogEntryAttachment",
|
|
3009
|
+
}
|
|
3010
|
+
response_data = self.api_client.call_api(
|
|
3011
|
+
*_param,
|
|
3012
|
+
_request_timeout=_request_timeout
|
|
3013
|
+
)
|
|
3014
|
+
response_data.read()
|
|
3015
|
+
return self.api_client.response_deserialize(
|
|
3016
|
+
response_data=response_data,
|
|
3017
|
+
response_types_map=_response_types_map,
|
|
3018
|
+
).data
|
|
3019
|
+
|
|
3020
|
+
|
|
3021
|
+
@validate_call
|
|
3022
|
+
def upload_attachment_with_http_info(
|
|
3023
|
+
self,
|
|
3024
|
+
log_document_id: StrictInt,
|
|
3025
|
+
log_id: StrictInt,
|
|
3026
|
+
body: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="File content")],
|
|
3027
|
+
append_reference: Optional[StrictBool] = None,
|
|
3028
|
+
file_name: Optional[StrictStr] = None,
|
|
3029
|
+
_request_timeout: Union[
|
|
3030
|
+
None,
|
|
3031
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3032
|
+
Tuple[
|
|
3033
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3034
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3035
|
+
]
|
|
3036
|
+
] = None,
|
|
3037
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3038
|
+
_content_type: Optional[StrictStr] = None,
|
|
3039
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3040
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3041
|
+
) -> ApiResponse[LogEntryAttachment]:
|
|
3042
|
+
"""Upload an attachment to a log entry.
|
|
3043
|
+
|
|
3044
|
+
|
|
3045
|
+
:param log_document_id: (required)
|
|
3046
|
+
:type log_document_id: int
|
|
3047
|
+
:param log_id: (required)
|
|
3048
|
+
:type log_id: int
|
|
3049
|
+
:param body: File content (required)
|
|
3050
|
+
:type body: bytearray
|
|
3051
|
+
:param append_reference:
|
|
3052
|
+
:type append_reference: bool
|
|
3053
|
+
:param file_name:
|
|
3054
|
+
:type file_name: str
|
|
3055
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3056
|
+
number provided, it will be total request
|
|
3057
|
+
timeout. It can also be a pair (tuple) of
|
|
3058
|
+
(connection, read) timeouts.
|
|
3059
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3060
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3061
|
+
request; this effectively ignores the
|
|
3062
|
+
authentication in the spec for a single request.
|
|
3063
|
+
:type _request_auth: dict, optional
|
|
3064
|
+
:param _content_type: force content-type for the request.
|
|
3065
|
+
:type _content_type: str, Optional
|
|
3066
|
+
:param _headers: set to override the headers for a single
|
|
3067
|
+
request; this effectively ignores the headers
|
|
3068
|
+
in the spec for a single request.
|
|
3069
|
+
:type _headers: dict, optional
|
|
3070
|
+
:param _host_index: set to override the host_index for a single
|
|
3071
|
+
request; this effectively ignores the host_index
|
|
3072
|
+
in the spec for a single request.
|
|
3073
|
+
:type _host_index: int, optional
|
|
3074
|
+
:return: Returns the result object.
|
|
3075
|
+
""" # noqa: E501
|
|
3076
|
+
|
|
3077
|
+
_param = self._upload_attachment_serialize(
|
|
3078
|
+
log_document_id=log_document_id,
|
|
3079
|
+
log_id=log_id,
|
|
3080
|
+
body=body,
|
|
3081
|
+
append_reference=append_reference,
|
|
3082
|
+
file_name=file_name,
|
|
3083
|
+
_request_auth=_request_auth,
|
|
3084
|
+
_content_type=_content_type,
|
|
3085
|
+
_headers=_headers,
|
|
3086
|
+
_host_index=_host_index
|
|
3087
|
+
)
|
|
3088
|
+
|
|
3089
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3090
|
+
'200': "LogEntryAttachment",
|
|
3091
|
+
}
|
|
3092
|
+
response_data = self.api_client.call_api(
|
|
3093
|
+
*_param,
|
|
3094
|
+
_request_timeout=_request_timeout
|
|
3095
|
+
)
|
|
3096
|
+
response_data.read()
|
|
3097
|
+
return self.api_client.response_deserialize(
|
|
3098
|
+
response_data=response_data,
|
|
3099
|
+
response_types_map=_response_types_map,
|
|
3100
|
+
)
|
|
3101
|
+
|
|
3102
|
+
|
|
3103
|
+
@validate_call
|
|
3104
|
+
def upload_attachment_without_preload_content(
|
|
3105
|
+
self,
|
|
3106
|
+
log_document_id: StrictInt,
|
|
3107
|
+
log_id: StrictInt,
|
|
3108
|
+
body: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="File content")],
|
|
3109
|
+
append_reference: Optional[StrictBool] = None,
|
|
3110
|
+
file_name: Optional[StrictStr] = None,
|
|
3111
|
+
_request_timeout: Union[
|
|
3112
|
+
None,
|
|
3113
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3114
|
+
Tuple[
|
|
3115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
3116
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
3117
|
+
]
|
|
3118
|
+
] = None,
|
|
3119
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3120
|
+
_content_type: Optional[StrictStr] = None,
|
|
3121
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3122
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3123
|
+
) -> RESTResponseType:
|
|
3124
|
+
"""Upload an attachment to a log entry.
|
|
3125
|
+
|
|
3126
|
+
|
|
3127
|
+
:param log_document_id: (required)
|
|
3128
|
+
:type log_document_id: int
|
|
3129
|
+
:param log_id: (required)
|
|
3130
|
+
:type log_id: int
|
|
3131
|
+
:param body: File content (required)
|
|
3132
|
+
:type body: bytearray
|
|
3133
|
+
:param append_reference:
|
|
3134
|
+
:type append_reference: bool
|
|
3135
|
+
:param file_name:
|
|
3136
|
+
:type file_name: str
|
|
3137
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
3138
|
+
number provided, it will be total request
|
|
3139
|
+
timeout. It can also be a pair (tuple) of
|
|
3140
|
+
(connection, read) timeouts.
|
|
3141
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
3142
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
3143
|
+
request; this effectively ignores the
|
|
3144
|
+
authentication in the spec for a single request.
|
|
3145
|
+
:type _request_auth: dict, optional
|
|
3146
|
+
:param _content_type: force content-type for the request.
|
|
3147
|
+
:type _content_type: str, Optional
|
|
3148
|
+
:param _headers: set to override the headers for a single
|
|
3149
|
+
request; this effectively ignores the headers
|
|
3150
|
+
in the spec for a single request.
|
|
3151
|
+
:type _headers: dict, optional
|
|
3152
|
+
:param _host_index: set to override the host_index for a single
|
|
3153
|
+
request; this effectively ignores the host_index
|
|
3154
|
+
in the spec for a single request.
|
|
3155
|
+
:type _host_index: int, optional
|
|
3156
|
+
:return: Returns the result object.
|
|
3157
|
+
""" # noqa: E501
|
|
3158
|
+
|
|
3159
|
+
_param = self._upload_attachment_serialize(
|
|
3160
|
+
log_document_id=log_document_id,
|
|
3161
|
+
log_id=log_id,
|
|
3162
|
+
body=body,
|
|
3163
|
+
append_reference=append_reference,
|
|
3164
|
+
file_name=file_name,
|
|
3165
|
+
_request_auth=_request_auth,
|
|
3166
|
+
_content_type=_content_type,
|
|
3167
|
+
_headers=_headers,
|
|
3168
|
+
_host_index=_host_index
|
|
3169
|
+
)
|
|
3170
|
+
|
|
3171
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
3172
|
+
'200': "LogEntryAttachment",
|
|
3173
|
+
}
|
|
3174
|
+
response_data = self.api_client.call_api(
|
|
3175
|
+
*_param,
|
|
3176
|
+
_request_timeout=_request_timeout
|
|
3177
|
+
)
|
|
3178
|
+
return response_data.response
|
|
3179
|
+
|
|
3180
|
+
|
|
3181
|
+
def _upload_attachment_serialize(
|
|
3182
|
+
self,
|
|
3183
|
+
log_document_id,
|
|
3184
|
+
log_id,
|
|
3185
|
+
body,
|
|
3186
|
+
append_reference,
|
|
3187
|
+
file_name,
|
|
3188
|
+
_request_auth,
|
|
3189
|
+
_content_type,
|
|
3190
|
+
_headers,
|
|
3191
|
+
_host_index,
|
|
3192
|
+
) -> RequestSerialized:
|
|
3193
|
+
|
|
3194
|
+
_host = None
|
|
3195
|
+
|
|
3196
|
+
_collection_formats: Dict[str, str] = {
|
|
3197
|
+
}
|
|
3198
|
+
|
|
3199
|
+
_path_params: Dict[str, str] = {}
|
|
3200
|
+
_query_params: List[Tuple[str, str]] = []
|
|
3201
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
3202
|
+
_form_params: List[Tuple[str, str]] = []
|
|
3203
|
+
_files: Dict[
|
|
3204
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
3205
|
+
] = {}
|
|
3206
|
+
_body_params: Optional[bytes] = None
|
|
3207
|
+
|
|
3208
|
+
# process the path parameters
|
|
3209
|
+
if log_document_id is not None:
|
|
3210
|
+
_path_params['logDocumentId'] = log_document_id
|
|
3211
|
+
if log_id is not None:
|
|
3212
|
+
_path_params['logId'] = log_id
|
|
3213
|
+
# process the query parameters
|
|
3214
|
+
if append_reference is not None:
|
|
3215
|
+
|
|
3216
|
+
_query_params.append(('appendReference', append_reference))
|
|
3217
|
+
|
|
3218
|
+
if file_name is not None:
|
|
3219
|
+
|
|
3220
|
+
_query_params.append(('fileName', file_name))
|
|
3221
|
+
|
|
3222
|
+
# process the header parameters
|
|
3223
|
+
# process the form parameters
|
|
3224
|
+
# process the body parameter
|
|
3225
|
+
if body is not None:
|
|
3226
|
+
# convert to byte array if the input is a file name (str)
|
|
3227
|
+
if isinstance(body, str):
|
|
3228
|
+
with open(body, "rb") as _fp:
|
|
3229
|
+
_body_params = _fp.read()
|
|
3230
|
+
elif isinstance(body, tuple):
|
|
3231
|
+
# drop the filename from the tuple
|
|
3232
|
+
_body_params = body[1]
|
|
3233
|
+
else:
|
|
3234
|
+
_body_params = body
|
|
3235
|
+
|
|
3236
|
+
|
|
3237
|
+
# set the HTTP header `Accept`
|
|
3238
|
+
if 'Accept' not in _header_params:
|
|
3239
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
3240
|
+
[
|
|
3241
|
+
'application/json'
|
|
3242
|
+
]
|
|
3243
|
+
)
|
|
3244
|
+
|
|
3245
|
+
# set the HTTP header `Content-Type`
|
|
3246
|
+
if _content_type:
|
|
3247
|
+
_header_params['Content-Type'] = _content_type
|
|
3248
|
+
else:
|
|
3249
|
+
_default_content_type = (
|
|
3250
|
+
self.api_client.select_header_content_type(
|
|
3251
|
+
[
|
|
3252
|
+
'application/octet-stream'
|
|
3253
|
+
]
|
|
3254
|
+
)
|
|
3255
|
+
)
|
|
3256
|
+
if _default_content_type is not None:
|
|
3257
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3258
|
+
|
|
3259
|
+
# authentication setting
|
|
3260
|
+
_auth_settings: List[str] = [
|
|
3261
|
+
'belyAuth'
|
|
3262
|
+
]
|
|
3263
|
+
|
|
3264
|
+
return self.api_client.param_serialize(
|
|
3265
|
+
method='PUT',
|
|
3266
|
+
resource_path='/api/Logbook/UploadAttachment/{logDocumentId}/{logId}',
|
|
3267
|
+
path_params=_path_params,
|
|
3268
|
+
query_params=_query_params,
|
|
3269
|
+
header_params=_header_params,
|
|
3270
|
+
body=_body_params,
|
|
3271
|
+
post_params=_form_params,
|
|
3272
|
+
files=_files,
|
|
3273
|
+
auth_settings=_auth_settings,
|
|
3274
|
+
collection_formats=_collection_formats,
|
|
3275
|
+
_host=_host,
|
|
3276
|
+
_request_auth=_request_auth
|
|
3277
|
+
)
|
|
3278
|
+
|
|
3279
|
+
|
|
@@ -42,6 +42,7 @@ from belyApi.models.log import Log
|
|
|
42
42
|
from belyApi.models.log_document_options import LogDocumentOptions
|
|
43
43
|
from belyApi.models.log_document_section import LogDocumentSection
|
|
44
44
|
from belyApi.models.log_entry import LogEntry
|
|
45
|
+
from belyApi.models.log_entry_attachment import LogEntryAttachment
|
|
45
46
|
from belyApi.models.log_reaction import LogReaction
|
|
46
47
|
from belyApi.models.logbook_search_results import LogbookSearchResults
|
|
47
48
|
from belyApi.models.notification_configuration import NotificationConfiguration
|