b24api 1.0.0__tar.gz → 1.0.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: b24api
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Bitrix24 API
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -69,9 +69,11 @@ class Bitrix24:
69
69
  raise ValueError("webhook_url must have a host")
70
70
  return host
71
71
 
72
- async def call(self, request: Request | dict[str, Any]) -> ApiTypes:
73
- """Call any method (with retries) and return `result` from response."""
72
+ async def call(self, request: Request | dict[str, Any], *, raw: bool = False) -> ApiTypes | Response:
73
+ """Call any method (with retries) and return `result` from response by default or raw response (raw=True)."""
74
74
  response: Response = await self._retry(self._call, request)
75
+ if raw:
76
+ return response
75
77
  return response.result
76
78
 
77
79
  async def batch(
@@ -2,7 +2,7 @@ import logging
2
2
  from datetime import datetime
3
3
  from typing import Any
4
4
 
5
- from pydantic import BaseModel, Field, field_validator
5
+ from pydantic import BaseModel, ConfigDict, Field, field_validator
6
6
 
7
7
  from b24api.error import ApiResponseError, RetryApiResponseError
8
8
  from b24api.query import build_query
@@ -32,6 +32,8 @@ class Request(BaseModel):
32
32
  class ListRequestParameters(BaseModel):
33
33
  """Parameters of `*.list` requests."""
34
34
 
35
+ model_config = ConfigDict(extra="allow") # some methods (notably `crm.item.*`) accept additional parameters
36
+
35
37
  select: list[str] = []
36
38
  filter: dict[str, ApiTypes] = {}
37
39
  order: dict[str, str] = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: b24api
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Bitrix24 API
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes