minikai 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of minikai might be problematic. Click here for more details.

@@ -6,6 +6,7 @@ from .create_mini_command import CreateMiniCommand
6
6
  from .create_record_command import CreateRecordCommand
7
7
  from .create_record_command_tags import CreateRecordCommandTags
8
8
  from .document_file_dto import DocumentFileDto
9
+ from .document_file_metadata_dto import DocumentFileMetadataDto
9
10
  from .form_field import FormField
10
11
  from .form_field_dto import FormFieldDto
11
12
  from .form_field_type import FormFieldType
@@ -50,6 +51,7 @@ __all__ = (
50
51
  "CreateRecordCommand",
51
52
  "CreateRecordCommandTags",
52
53
  "DocumentFileDto",
54
+ "DocumentFileMetadataDto",
53
55
  "FormField",
54
56
  "FormFieldDto",
55
57
  "FormFieldType",
@@ -1,11 +1,12 @@
1
1
  from collections.abc import Mapping
2
+ from io import BytesIO
2
3
  from typing import Any, TypeVar, Union, cast
3
4
 
4
5
  from attrs import define as _attrs_define
5
6
  from attrs import field as _attrs_field
6
7
 
7
8
  from .. import types
8
- from ..types import UNSET, Unset
9
+ from ..types import UNSET, File, FileTypes, Unset
9
10
 
10
11
  T = TypeVar("T", bound="AddAttachmentsBody")
11
12
 
@@ -14,18 +15,22 @@ T = TypeVar("T", bound="AddAttachmentsBody")
14
15
  class AddAttachmentsBody:
15
16
  """
16
17
  Attributes:
17
- files (Union[None, Unset, list[Any]]):
18
+ files (Union[None, Unset, list[File]]):
18
19
  """
19
20
 
20
- files: Union[None, Unset, list[Any]] = UNSET
21
+ files: Union[None, Unset, list[File]] = UNSET
21
22
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
22
23
 
23
24
  def to_dict(self) -> dict[str, Any]:
24
- files: Union[None, Unset, list[Any]]
25
+ files: Union[None, Unset, list[FileTypes]]
25
26
  if isinstance(self.files, Unset):
26
27
  files = UNSET
27
28
  elif isinstance(self.files, list):
28
- files = self.files
29
+ files = []
30
+ for files_type_0_item_data in self.files:
31
+ files_type_0_item = files_type_0_item_data.to_tuple()
32
+
33
+ files.append(files_type_0_item)
29
34
 
30
35
  else:
31
36
  files = self.files
@@ -44,7 +49,7 @@ class AddAttachmentsBody:
44
49
  if not isinstance(self.files, Unset):
45
50
  if isinstance(self.files, list):
46
51
  for files_type_0_item_element in self.files:
47
- files.append(("files", (None, str(files_type_0_item_element).encode(), "text/plain")))
52
+ files.append(("files", files_type_0_item_element.to_tuple()))
48
53
  else:
49
54
  files.append(("files", (None, str(self.files).encode(), "text/plain")))
50
55
 
@@ -57,7 +62,7 @@ class AddAttachmentsBody:
57
62
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
58
63
  d = dict(src_dict)
59
64
 
60
- def _parse_files(data: object) -> Union[None, Unset, list[Any]]:
65
+ def _parse_files(data: object) -> Union[None, Unset, list[File]]:
61
66
  if data is None:
62
67
  return data
63
68
  if isinstance(data, Unset):
@@ -65,12 +70,17 @@ class AddAttachmentsBody:
65
70
  try:
66
71
  if not isinstance(data, list):
67
72
  raise TypeError()
68
- files_type_0 = cast(list[Any], data)
73
+ files_type_0 = []
74
+ _files_type_0 = data
75
+ for files_type_0_item_data in _files_type_0:
76
+ files_type_0_item = File(payload=BytesIO(files_type_0_item_data))
77
+
78
+ files_type_0.append(files_type_0_item)
69
79
 
70
80
  return files_type_0
71
81
  except: # noqa: E722
72
82
  pass
73
- return cast(Union[None, Unset, list[Any]], data)
83
+ return cast(Union[None, Unset, list[File]], data)
74
84
 
75
85
  files = _parse_files(d.pop("files", UNSET))
76
86
 
@@ -0,0 +1,52 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+
4
+ from attrs import define as _attrs_define
5
+
6
+ from ..types import UNSET, Unset
7
+
8
+ T = TypeVar("T", bound="DocumentFileMetadataDto")
9
+
10
+
11
+ @_attrs_define
12
+ class DocumentFileMetadataDto:
13
+ """
14
+ Attributes:
15
+ content_hash (Union[None, Unset, str]):
16
+ """
17
+
18
+ content_hash: Union[None, Unset, str] = UNSET
19
+
20
+ def to_dict(self) -> dict[str, Any]:
21
+ content_hash: Union[None, Unset, str]
22
+ if isinstance(self.content_hash, Unset):
23
+ content_hash = UNSET
24
+ else:
25
+ content_hash = self.content_hash
26
+
27
+ field_dict: dict[str, Any] = {}
28
+
29
+ field_dict.update({})
30
+ if content_hash is not UNSET:
31
+ field_dict["contentHash"] = content_hash
32
+
33
+ return field_dict
34
+
35
+ @classmethod
36
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
37
+ d = dict(src_dict)
38
+
39
+ def _parse_content_hash(data: object) -> Union[None, Unset, str]:
40
+ if data is None:
41
+ return data
42
+ if isinstance(data, Unset):
43
+ return data
44
+ return cast(Union[None, Unset, str], data)
45
+
46
+ content_hash = _parse_content_hash(d.pop("contentHash", UNSET))
47
+
48
+ document_file_metadata_dto = cls(
49
+ content_hash=content_hash,
50
+ )
51
+
52
+ return document_file_metadata_dto
@@ -1,11 +1,12 @@
1
1
  from collections.abc import Mapping
2
+ from io import BytesIO
2
3
  from typing import Any, TypeVar, Union, cast
3
4
 
4
5
  from attrs import define as _attrs_define
5
6
  from attrs import field as _attrs_field
6
7
 
7
8
  from .. import types
8
- from ..types import UNSET, Unset
9
+ from ..types import UNSET, File, FileTypes, Unset
9
10
 
10
11
  T = TypeVar("T", bound="UpdateAttachmentsBody")
11
12
 
@@ -14,18 +15,22 @@ T = TypeVar("T", bound="UpdateAttachmentsBody")
14
15
  class UpdateAttachmentsBody:
15
16
  """
16
17
  Attributes:
17
- files (Union[None, Unset, list[Any]]):
18
+ files (Union[None, Unset, list[File]]):
18
19
  """
19
20
 
20
- files: Union[None, Unset, list[Any]] = UNSET
21
+ files: Union[None, Unset, list[File]] = UNSET
21
22
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
22
23
 
23
24
  def to_dict(self) -> dict[str, Any]:
24
- files: Union[None, Unset, list[Any]]
25
+ files: Union[None, Unset, list[FileTypes]]
25
26
  if isinstance(self.files, Unset):
26
27
  files = UNSET
27
28
  elif isinstance(self.files, list):
28
- files = self.files
29
+ files = []
30
+ for files_type_0_item_data in self.files:
31
+ files_type_0_item = files_type_0_item_data.to_tuple()
32
+
33
+ files.append(files_type_0_item)
29
34
 
30
35
  else:
31
36
  files = self.files
@@ -44,7 +49,7 @@ class UpdateAttachmentsBody:
44
49
  if not isinstance(self.files, Unset):
45
50
  if isinstance(self.files, list):
46
51
  for files_type_0_item_element in self.files:
47
- files.append(("files", (None, str(files_type_0_item_element).encode(), "text/plain")))
52
+ files.append(("files", files_type_0_item_element.to_tuple()))
48
53
  else:
49
54
  files.append(("files", (None, str(self.files).encode(), "text/plain")))
50
55
 
@@ -57,7 +62,7 @@ class UpdateAttachmentsBody:
57
62
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
58
63
  d = dict(src_dict)
59
64
 
60
- def _parse_files(data: object) -> Union[None, Unset, list[Any]]:
65
+ def _parse_files(data: object) -> Union[None, Unset, list[File]]:
61
66
  if data is None:
62
67
  return data
63
68
  if isinstance(data, Unset):
@@ -65,12 +70,17 @@ class UpdateAttachmentsBody:
65
70
  try:
66
71
  if not isinstance(data, list):
67
72
  raise TypeError()
68
- files_type_0 = cast(list[Any], data)
73
+ files_type_0 = []
74
+ _files_type_0 = data
75
+ for files_type_0_item_data in _files_type_0:
76
+ files_type_0_item = File(payload=BytesIO(files_type_0_item_data))
77
+
78
+ files_type_0.append(files_type_0_item)
69
79
 
70
80
  return files_type_0
71
81
  except: # noqa: E722
72
82
  pass
73
- return cast(Union[None, Unset, list[Any]], data)
83
+ return cast(Union[None, Unset, list[File]], data)
74
84
 
75
85
  files = _parse_files(d.pop("files", UNSET))
76
86
 
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: minikai
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A client library for accessing Minikai API
5
5
  Requires-Dist: httpx>=0.23.0,<0.29.0
6
6
  Requires-Dist: attrs>=22.2.0
7
7
  Requires-Dist: python-dateutil>=2.8.0,<3
8
- Requires-Python: >=3.11
8
+ Requires-Python: >=3.9, <4.0
9
9
  Description-Content-Type: text/markdown
10
10
 
11
11
  # minikai
@@ -37,13 +37,14 @@ minikai/api/users/get_users.py,sha256=ExChMQsAkGZtNwqcbXB_qfED2Jsd5jvjzK3I_ePvP5
37
37
  minikai/api/users/post_api_users_minis.py,sha256=4eVgu3YUkQgccnLZF6gbF2Ww84mw69Fl360SJWVRdz4,4357
38
38
  minikai/client.py,sha256=o_mdLqyBCQstu5tS1WZFwqIEbGwkvWQ7eQjuCJw_5VY,12419
39
39
  minikai/errors.py,sha256=gO8GBmKqmSNgAg-E5oT-oOyxztvp7V_6XG7OUTT15q0,546
40
- minikai/models/__init__.py,sha256=zMnN_mbmJOrkw5W5Mfu-DZkBl91UbNG_OBd7XiXkK1Q,3230
41
- minikai/models/add_attachments_body.py,sha256=np36SL3_Py5sUVlCOf2jJHJF6FmqidJGe-vteFjt1V0,2978
40
+ minikai/models/__init__.py,sha256=O593V_ftPyxUkK0Ifb32JC09b1PPCvaQ5OAkQmt2NL0,3325
41
+ minikai/models/add_attachments_body.py,sha256=hA63P0s93SXxF4KHScefznrk6wI3sYXuU1x8MpiV4H8,3393
42
42
  minikai/models/create_group_command.py,sha256=WfXciuwR85Y0kqh5F0iROYlcwPOgBHnz4sq0UHtZLho,2933
43
43
  minikai/models/create_mini_command.py,sha256=fKmwk0Wp3YdP1BTLi1si4AnIdF-S7_NA9oEir3tylMA,3813
44
44
  minikai/models/create_record_command.py,sha256=WQv-XDLrrc7vzUl5rBn8EyoPkAm4XluNoDFJ1bTiKM8,9331
45
45
  minikai/models/create_record_command_tags.py,sha256=qy-p7rbmO10tpGhuvZ9d7AWeEK0s3cqtHR6GYDG4xLM,1266
46
46
  minikai/models/document_file_dto.py,sha256=WA2aPEU-3QaiaoZY517U0yBT8ILk2JR7V5oFpzZuNgE,4463
47
+ minikai/models/document_file_metadata_dto.py,sha256=NnU05H51_39JJYqO5a9_dU4n0RAZoslpgviaru698-k,1382
47
48
  minikai/models/form_field.py,sha256=brytoYNq4PuOIGVVACog_5WEnn3jqwM6eNCXd069ogE,3472
48
49
  minikai/models/form_field_dto.py,sha256=hqBxSf8DKRNmGzQn3V3nrKZsBxDag-v0Mi4DFsmHEvg,4710
49
50
  minikai/models/form_field_type.py,sha256=OMo319xc6XGsaoE_tuGnQi6Qp9s0KupuqZkicGINLIY,441
@@ -71,7 +72,7 @@ minikai/models/record_relation_dto.py,sha256=7YPZY01nB62zhfBnrBqi5U-exFm2-65zkpw
71
72
  minikai/models/record_tags.py,sha256=Z-tysoLNxu8ZQP7uxAsbF6B_6wDPr9hcVs7vj7AbQE8,1195
72
73
  minikai/models/slim_mini_dto.py,sha256=8gZLJj57sYeAhTVwyaKbc5nExpKDPIIsRNWlgD2LLpI,5468
73
74
  minikai/models/tool_dto.py,sha256=uZhnmNApq0cnLqaiRI3OXAos0APyvT2s3CqlFtmLEUg,1804
74
- minikai/models/update_attachments_body.py,sha256=BM4ture7dH39-tECpzAPQ-_QI4Jp4x52Wrv1KRSIOjk,2993
75
+ minikai/models/update_attachments_body.py,sha256=I7-X-lGxIPXpaLCKgTNnObyFOWWJ-eI69UEQ_PPtCwI,3408
75
76
  minikai/models/update_group_command.py,sha256=S1AhY90_5ocb0DFL9cgP9OMN6W2whJ4y0IKylrkUFec,3593
76
77
  minikai/models/update_mini_command.py,sha256=d3Z_PSO1wcIYryWJkqEcvlPRQx9TaEWf1vQqq5zmIMc,4015
77
78
  minikai/models/update_mini_template_workspaces_command.py,sha256=2y-VtUbuaRCs6HgwLLMOd1Pzrfz_xBIfx0x_jrXqVIk,1502
@@ -82,6 +83,6 @@ minikai/models/user_to_mini_dto.py,sha256=bgoXYiideROMOl9xMXW6iLmCQcRqKYnsdpkypk
82
83
  minikai/models/workspace_dto.py,sha256=GR-B1mSyBg-C2OflGN3iZEJ8Fy-DZGfSbO4m8JzdTy8,2117
83
84
  minikai/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
84
85
  minikai/types.py,sha256=AX4orxQZQJat3vZrgjJ-TYb2sNBL8kNo9yqYDT-n8y8,1391
85
- minikai-0.1.0.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
86
- minikai-0.1.0.dist-info/METADATA,sha256=IP6tqJqXThPV80YT15kCgDuWRqJiuTGb9nWb-GJETw4,5087
87
- minikai-0.1.0.dist-info/RECORD,,
86
+ minikai-0.1.1.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
87
+ minikai-0.1.1.dist-info/METADATA,sha256=_CZf7ldKxQecW2XsMwSmgWr5qnMWFwL_qqPahTeTNqA,5092
88
+ minikai-0.1.1.dist-info/RECORD,,