minikai 0.1.2__py3-none-any.whl → 0.1.3__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.

Files changed (91) hide show
  1. minikai/__init__.py +1 -1
  2. minikai/api/__init__.py +1 -1
  3. minikai/api/groups/__init__.py +1 -1
  4. minikai/api/groups/add_minis_to_group.py +53 -33
  5. minikai/api/groups/add_users_to_group.py +53 -33
  6. minikai/api/groups/create_group.py +45 -27
  7. minikai/api/groups/delete_group.py +29 -9
  8. minikai/api/groups/get_group.py +47 -28
  9. minikai/api/groups/get_group_minis.py +52 -33
  10. minikai/api/groups/get_group_users.py +52 -33
  11. minikai/api/groups/get_groups.py +56 -34
  12. minikai/api/groups/remove_minis_from_group.py +53 -33
  13. minikai/api/groups/remove_users_from_group.py +53 -33
  14. minikai/api/groups/update_group.py +51 -33
  15. minikai/api/minis/__init__.py +1 -1
  16. minikai/api/minis/create_mini.py +45 -27
  17. minikai/api/minis/delete_mini.py +29 -9
  18. minikai/api/minis/get_external_mini.py +52 -33
  19. minikai/api/minis/get_minis.py +56 -34
  20. minikai/api/minis/patch_mini.py +51 -33
  21. minikai/api/minis/update_mini.py +51 -33
  22. minikai/api/records/__init__.py +1 -1
  23. minikai/api/records/add_attachments.py +59 -38
  24. minikai/api/records/add_relations.py +65 -43
  25. minikai/api/records/create_record.py +48 -28
  26. minikai/api/records/delete_record.py +29 -9
  27. minikai/api/records/download_attachment.py +119 -0
  28. minikai/api/records/get_records_by_external.py +68 -45
  29. minikai/api/records/remove_attachments.py +33 -11
  30. minikai/api/records/remove_relations.py +33 -11
  31. minikai/api/records/update_attachments.py +59 -38
  32. minikai/api/records/update_record.py +53 -33
  33. minikai/api/records/update_relations.py +65 -43
  34. minikai/api/users/__init__.py +1 -1
  35. minikai/api/users/delete_api_users_minis.py +31 -11
  36. minikai/api/users/get_api_users_minis.py +52 -33
  37. minikai/api/users/get_users.py +56 -34
  38. minikai/api/users/post_api_users_minis.py +52 -33
  39. minikai/client.py +6 -3
  40. minikai/errors.py +1 -3
  41. minikai/models/__init__.py +5 -1
  42. minikai/models/add_attachments_body.py +45 -13
  43. minikai/models/create_group_command.py +35 -10
  44. minikai/models/create_mini_command.py +34 -10
  45. minikai/models/create_record_command.py +87 -41
  46. minikai/models/create_record_command_tags.py +22 -3
  47. minikai/models/cursor_paginated_list_of_record_dto.py +122 -0
  48. minikai/models/document_file_dto.py +37 -13
  49. minikai/models/document_file_metadata_dto.py +27 -7
  50. minikai/models/form_field.py +38 -12
  51. minikai/models/form_field_dto.py +48 -16
  52. minikai/models/form_field_type.py +2 -8
  53. minikai/models/group_dto.py +50 -19
  54. minikai/models/http_validation_problem_details.py +41 -16
  55. minikai/models/http_validation_problem_details_errors.py +26 -3
  56. minikai/models/json_node.py +49 -24
  57. minikai/models/json_node_options.py +26 -7
  58. minikai/models/mini_dto.py +62 -27
  59. minikai/models/mini_template_dto.py +50 -18
  60. minikai/models/paginated_list_of_record_dto.py +39 -16
  61. minikai/models/patch_mini_command.py +30 -8
  62. minikai/models/problem_details.py +34 -11
  63. minikai/models/record.py +134 -55
  64. minikai/models/record_attachment.py +56 -27
  65. minikai/models/record_attachment_dto.py +56 -27
  66. minikai/models/record_attachment_dto_metadata_type_0.py +22 -3
  67. minikai/models/record_attachment_metadata_type_0.py +22 -3
  68. minikai/models/record_authorization.py +41 -9
  69. minikai/models/record_authorization_dto.py +41 -9
  70. minikai/models/record_dto.py +113 -54
  71. minikai/models/record_dto_tags.py +22 -3
  72. minikai/models/record_relation.py +35 -11
  73. minikai/models/record_relation_dto.py +35 -11
  74. minikai/models/record_tag.py +40 -13
  75. minikai/models/record_tag_dto.py +68 -0
  76. minikai/models/slim_mini_dto.py +51 -22
  77. minikai/models/tool_dto.py +29 -10
  78. minikai/models/update_attachments_body.py +45 -13
  79. minikai/models/update_group_command.py +37 -11
  80. minikai/models/update_mini_command.py +35 -11
  81. minikai/models/update_mini_template_workspaces_command.py +30 -7
  82. minikai/models/update_record_command.py +87 -42
  83. minikai/models/update_record_command_tags.py +22 -3
  84. minikai/models/user_dto.py +50 -17
  85. minikai/models/user_to_mini_dto.py +30 -9
  86. minikai/models/workspace_dto.py +30 -9
  87. minikai/types.py +5 -6
  88. {minikai-0.1.2.dist-info → minikai-0.1.3.dist-info}/METADATA +1 -1
  89. minikai-0.1.3.dist-info/RECORD +91 -0
  90. minikai-0.1.2.dist-info/RECORD +0 -88
  91. {minikai-0.1.2.dist-info → minikai-0.1.3.dist-info}/WHEEL +0 -0
@@ -1,10 +1,11 @@
1
- """Contains all the data models used in inputs/outputs"""
1
+ """ Contains all the data models used in inputs/outputs """
2
2
 
3
3
  from .add_attachments_body import AddAttachmentsBody
4
4
  from .create_group_command import CreateGroupCommand
5
5
  from .create_mini_command import CreateMiniCommand
6
6
  from .create_record_command import CreateRecordCommand
7
7
  from .create_record_command_tags import CreateRecordCommandTags
8
+ from .cursor_paginated_list_of_record_dto import CursorPaginatedListOfRecordDto
8
9
  from .document_file_dto import DocumentFileDto
9
10
  from .document_file_metadata_dto import DocumentFileMetadataDto
10
11
  from .form_field import FormField
@@ -32,6 +33,7 @@ from .record_dto_tags import RecordDtoTags
32
33
  from .record_relation import RecordRelation
33
34
  from .record_relation_dto import RecordRelationDto
34
35
  from .record_tag import RecordTag
36
+ from .record_tag_dto import RecordTagDto
35
37
  from .slim_mini_dto import SlimMiniDto
36
38
  from .tool_dto import ToolDto
37
39
  from .update_attachments_body import UpdateAttachmentsBody
@@ -50,6 +52,7 @@ __all__ = (
50
52
  "CreateMiniCommand",
51
53
  "CreateRecordCommand",
52
54
  "CreateRecordCommandTags",
55
+ "CursorPaginatedListOfRecordDto",
53
56
  "DocumentFileDto",
54
57
  "DocumentFileMetadataDto",
55
58
  "FormField",
@@ -77,6 +80,7 @@ __all__ = (
77
80
  "RecordRelation",
78
81
  "RecordRelationDto",
79
82
  "RecordTag",
83
+ "RecordTagDto",
80
84
  "SlimMiniDto",
81
85
  "ToolDto",
82
86
  "UpdateAttachmentsBody",
@@ -1,26 +1,43 @@
1
1
  from collections.abc import Mapping
2
- from io import BytesIO
3
- from typing import Any, TypeVar, Union, cast
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
4
3
 
5
4
  from attrs import define as _attrs_define
6
5
  from attrs import field as _attrs_field
7
-
6
+ import json
8
7
  from .. import types
9
- from ..types import UNSET, File, FileTypes, Unset
8
+
9
+ from ..types import UNSET, Unset
10
+
11
+ from ..types import File, FileTypes
12
+ from ..types import UNSET, Unset
13
+ from io import BytesIO
14
+ from typing import cast
15
+ from typing import cast, Union
16
+ from typing import Union
17
+
18
+
19
+
20
+
21
+
10
22
 
11
23
  T = TypeVar("T", bound="AddAttachmentsBody")
12
24
 
13
25
 
26
+
14
27
  @_attrs_define
15
28
  class AddAttachmentsBody:
16
- """
17
- Attributes:
18
- files (Union[None, Unset, list[File]]):
19
- """
29
+ """
30
+ Attributes:
31
+ files (Union[None, Unset, list[File]]):
32
+ """
20
33
 
21
34
  files: Union[None, Unset, list[File]] = UNSET
22
35
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
23
36
 
37
+
38
+
39
+
40
+
24
41
  def to_dict(self) -> dict[str, Any]:
25
42
  files: Union[None, Unset, list[FileTypes]]
26
43
  if isinstance(self.files, Unset):
@@ -32,36 +49,45 @@ class AddAttachmentsBody:
32
49
 
33
50
  files.append(files_type_0_item)
34
51
 
52
+
35
53
  else:
36
54
  files = self.files
37
55
 
56
+
38
57
  field_dict: dict[str, Any] = {}
39
58
  field_dict.update(self.additional_properties)
40
- field_dict.update({})
59
+ field_dict.update({
60
+ })
41
61
  if files is not UNSET:
42
62
  field_dict["files"] = files
43
63
 
44
64
  return field_dict
45
65
 
66
+
46
67
  def to_multipart(self) -> types.RequestFiles:
47
68
  files: types.RequestFiles = []
48
69
 
49
70
  if not isinstance(self.files, Unset):
50
71
  if isinstance(self.files, list):
72
+
51
73
  for files_type_0_item_element in self.files:
52
74
  files.append(("files", files_type_0_item_element.to_tuple()))
53
75
  else:
54
76
  files.append(("files", (None, str(self.files).encode(), "text/plain")))
55
77
 
78
+
79
+
56
80
  for prop_name, prop in self.additional_properties.items():
57
81
  files.append((prop_name, (None, str(prop).encode(), "text/plain")))
58
82
 
83
+
84
+
59
85
  return files
60
86
 
87
+
61
88
  @classmethod
62
89
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
63
90
  d = dict(src_dict)
64
-
65
91
  def _parse_files(data: object) -> Union[None, Unset, list[File]]:
66
92
  if data is None:
67
93
  return data
@@ -72,22 +98,28 @@ class AddAttachmentsBody:
72
98
  raise TypeError()
73
99
  files_type_0 = []
74
100
  _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))
101
+ for files_type_0_item_data in (_files_type_0):
102
+ files_type_0_item = File(
103
+ payload = BytesIO(files_type_0_item_data)
104
+ )
105
+
106
+
77
107
 
78
108
  files_type_0.append(files_type_0_item)
79
109
 
80
110
  return files_type_0
81
- except: # noqa: E722
111
+ except: # noqa: E722
82
112
  pass
83
113
  return cast(Union[None, Unset, list[File]], data)
84
114
 
85
115
  files = _parse_files(d.pop("files", UNSET))
86
116
 
117
+
87
118
  add_attachments_body = cls(
88
119
  files=files,
89
120
  )
90
121
 
122
+
91
123
  add_attachments_body.additional_properties = d
92
124
  return add_attachments_body
93
125
 
@@ -1,26 +1,42 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Union, cast
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
3
3
 
4
4
  from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
5
6
 
6
7
  from ..types import UNSET, Unset
7
8
 
9
+ from ..types import UNSET, Unset
10
+ from typing import cast
11
+ from typing import cast, Union
12
+ from typing import Union
13
+
14
+
15
+
16
+
17
+
18
+
8
19
  T = TypeVar("T", bound="CreateGroupCommand")
9
20
 
10
21
 
22
+
11
23
  @_attrs_define
12
24
  class CreateGroupCommand:
13
- """
14
- Attributes:
15
- name (Union[Unset, str]):
16
- user_ids (Union[None, Unset, list[str]]):
17
- mini_ids (Union[None, Unset, list[int]]):
18
- """
25
+ """
26
+ Attributes:
27
+ name (Union[Unset, str]):
28
+ user_ids (Union[None, Unset, list[str]]):
29
+ mini_ids (Union[None, Unset, list[int]]):
30
+ """
19
31
 
20
32
  name: Union[Unset, str] = UNSET
21
33
  user_ids: Union[None, Unset, list[str]] = UNSET
22
34
  mini_ids: Union[None, Unset, list[int]] = UNSET
23
35
 
36
+
37
+
38
+
39
+
24
40
  def to_dict(self) -> dict[str, Any]:
25
41
  name = self.name
26
42
 
@@ -30,6 +46,7 @@ class CreateGroupCommand:
30
46
  elif isinstance(self.user_ids, list):
31
47
  user_ids = self.user_ids
32
48
 
49
+
33
50
  else:
34
51
  user_ids = self.user_ids
35
52
 
@@ -39,12 +56,15 @@ class CreateGroupCommand:
39
56
  elif isinstance(self.mini_ids, list):
40
57
  mini_ids = self.mini_ids
41
58
 
59
+
42
60
  else:
43
61
  mini_ids = self.mini_ids
44
62
 
63
+
45
64
  field_dict: dict[str, Any] = {}
46
65
 
47
- field_dict.update({})
66
+ field_dict.update({
67
+ })
48
68
  if name is not UNSET:
49
69
  field_dict["name"] = name
50
70
  if user_ids is not UNSET:
@@ -54,6 +74,8 @@ class CreateGroupCommand:
54
74
 
55
75
  return field_dict
56
76
 
77
+
78
+
57
79
  @classmethod
58
80
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
59
81
  d = dict(src_dict)
@@ -70,12 +92,13 @@ class CreateGroupCommand:
70
92
  user_ids_type_0 = cast(list[str], data)
71
93
 
72
94
  return user_ids_type_0
73
- except: # noqa: E722
95
+ except: # noqa: E722
74
96
  pass
75
97
  return cast(Union[None, Unset, list[str]], data)
76
98
 
77
99
  user_ids = _parse_user_ids(d.pop("userIds", UNSET))
78
100
 
101
+
79
102
  def _parse_mini_ids(data: object) -> Union[None, Unset, list[int]]:
80
103
  if data is None:
81
104
  return data
@@ -87,12 +110,13 @@ class CreateGroupCommand:
87
110
  mini_ids_type_0 = cast(list[int], data)
88
111
 
89
112
  return mini_ids_type_0
90
- except: # noqa: E722
113
+ except: # noqa: E722
91
114
  pass
92
115
  return cast(Union[None, Unset, list[int]], data)
93
116
 
94
117
  mini_ids = _parse_mini_ids(d.pop("miniIds", UNSET))
95
118
 
119
+
96
120
  create_group_command = cls(
97
121
  name=name,
98
122
  user_ids=user_ids,
@@ -100,3 +124,4 @@ class CreateGroupCommand:
100
124
  )
101
125
 
102
126
  return create_group_command
127
+
@@ -1,23 +1,34 @@
1
1
  from collections.abc import Mapping
2
- from typing import Any, TypeVar, Union, cast
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
3
3
 
4
4
  from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
5
6
 
6
7
  from ..types import UNSET, Unset
7
8
 
9
+ from ..types import UNSET, Unset
10
+ from typing import cast, Union
11
+ from typing import Union
12
+
13
+
14
+
15
+
16
+
17
+
8
18
  T = TypeVar("T", bound="CreateMiniCommand")
9
19
 
10
20
 
21
+
11
22
  @_attrs_define
12
23
  class CreateMiniCommand:
13
- """
14
- Attributes:
15
- name (Union[Unset, str]):
16
- description (Union[None, Unset, str]):
17
- template_id (Union[None, Unset, str]):
18
- external_id (Union[None, Unset, str]):
19
- external_source (Union[None, Unset, str]):
20
- """
24
+ """
25
+ Attributes:
26
+ name (Union[Unset, str]):
27
+ description (Union[None, Unset, str]):
28
+ template_id (Union[None, Unset, str]):
29
+ external_id (Union[None, Unset, str]):
30
+ external_source (Union[None, Unset, str]):
31
+ """
21
32
 
22
33
  name: Union[Unset, str] = UNSET
23
34
  description: Union[None, Unset, str] = UNSET
@@ -25,6 +36,10 @@ class CreateMiniCommand:
25
36
  external_id: Union[None, Unset, str] = UNSET
26
37
  external_source: Union[None, Unset, str] = UNSET
27
38
 
39
+
40
+
41
+
42
+
28
43
  def to_dict(self) -> dict[str, Any]:
29
44
  name = self.name
30
45
 
@@ -52,9 +67,11 @@ class CreateMiniCommand:
52
67
  else:
53
68
  external_source = self.external_source
54
69
 
70
+
55
71
  field_dict: dict[str, Any] = {}
56
72
 
57
- field_dict.update({})
73
+ field_dict.update({
74
+ })
58
75
  if name is not UNSET:
59
76
  field_dict["name"] = name
60
77
  if description is not UNSET:
@@ -68,6 +85,8 @@ class CreateMiniCommand:
68
85
 
69
86
  return field_dict
70
87
 
88
+
89
+
71
90
  @classmethod
72
91
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
73
92
  d = dict(src_dict)
@@ -82,6 +101,7 @@ class CreateMiniCommand:
82
101
 
83
102
  description = _parse_description(d.pop("description", UNSET))
84
103
 
104
+
85
105
  def _parse_template_id(data: object) -> Union[None, Unset, str]:
86
106
  if data is None:
87
107
  return data
@@ -91,6 +111,7 @@ class CreateMiniCommand:
91
111
 
92
112
  template_id = _parse_template_id(d.pop("templateId", UNSET))
93
113
 
114
+
94
115
  def _parse_external_id(data: object) -> Union[None, Unset, str]:
95
116
  if data is None:
96
117
  return data
@@ -100,6 +121,7 @@ class CreateMiniCommand:
100
121
 
101
122
  external_id = _parse_external_id(d.pop("externalId", UNSET))
102
123
 
124
+
103
125
  def _parse_external_source(data: object) -> Union[None, Unset, str]:
104
126
  if data is None:
105
127
  return data
@@ -109,6 +131,7 @@ class CreateMiniCommand:
109
131
 
110
132
  external_source = _parse_external_source(d.pop("externalSource", UNSET))
111
133
 
134
+
112
135
  create_mini_command = cls(
113
136
  name=name,
114
137
  description=description,
@@ -118,3 +141,4 @@ class CreateMiniCommand:
118
141
  )
119
142
 
120
143
  return create_mini_command
144
+
@@ -1,54 +1,70 @@
1
- import datetime
2
1
  from collections.abc import Mapping
3
- from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
2
+ from typing import Any, TypeVar, Optional, BinaryIO, TextIO, TYPE_CHECKING, Generator
4
3
 
5
4
  from attrs import define as _attrs_define
6
- from dateutil.parser import isoparse
5
+ from attrs import field as _attrs_field
7
6
 
8
7
  from ..types import UNSET, Unset
9
8
 
9
+ from ..types import UNSET, Unset
10
+ from dateutil.parser import isoparse
11
+ from typing import cast
12
+ from typing import cast, Union
13
+ from typing import Union
14
+ import datetime
15
+
10
16
  if TYPE_CHECKING:
11
- from ..models.create_record_command_tags import CreateRecordCommandTags
12
- from ..models.json_node import JsonNode
13
- from ..models.record_authorization_dto import RecordAuthorizationDto
14
- from ..models.record_relation_dto import RecordRelationDto
17
+ from ..models.record_relation_dto import RecordRelationDto
18
+ from ..models.json_node import JsonNode
19
+ from ..models.create_record_command_tags import CreateRecordCommandTags
20
+ from ..models.record_authorization_dto import RecordAuthorizationDto
21
+
22
+
23
+
15
24
 
16
25
 
17
26
  T = TypeVar("T", bound="CreateRecordCommand")
18
27
 
19
28
 
29
+
20
30
  @_attrs_define
21
31
  class CreateRecordCommand:
22
- """
23
- Attributes:
24
- title (Union[Unset, str]):
25
- description (Union[None, Unset, str]):
26
- mini_id (Union[None, Unset, str]):
27
- event_date (Union[None, Unset, datetime.datetime]):
28
- schema (Union['JsonNode', None, Unset]):
29
- content (Union['JsonNode', None, Unset]):
30
- relations (Union[Unset, list['RecordRelationDto']]):
31
- external_uri (Union[None, Unset, str]):
32
- labels (Union[Unset, list[str]]):
33
- tags (Union[Unset, CreateRecordCommandTags]):
34
- authorization (Union[Unset, RecordAuthorizationDto]):
35
- """
32
+ """
33
+ Attributes:
34
+ title (Union[Unset, str]):
35
+ description (Union[None, Unset, str]):
36
+ mini_id (Union[None, Unset, str]):
37
+ event_date (Union[None, Unset, datetime.datetime]):
38
+ schema (Union['JsonNode', None, Unset]):
39
+ content (Union['JsonNode', None, Unset]):
40
+ relations (Union[Unset, list['RecordRelationDto']]):
41
+ external_uri (Union[None, Unset, str]):
42
+ labels (Union[Unset, list[str]]):
43
+ tags (Union[Unset, CreateRecordCommandTags]):
44
+ authorization (Union[Unset, RecordAuthorizationDto]):
45
+ """
36
46
 
37
47
  title: Union[Unset, str] = UNSET
38
48
  description: Union[None, Unset, str] = UNSET
39
49
  mini_id: Union[None, Unset, str] = UNSET
40
50
  event_date: Union[None, Unset, datetime.datetime] = UNSET
41
- schema: Union["JsonNode", None, Unset] = UNSET
42
- content: Union["JsonNode", None, Unset] = UNSET
43
- relations: Union[Unset, list["RecordRelationDto"]] = UNSET
51
+ schema: Union['JsonNode', None, Unset] = UNSET
52
+ content: Union['JsonNode', None, Unset] = UNSET
53
+ relations: Union[Unset, list['RecordRelationDto']] = UNSET
44
54
  external_uri: Union[None, Unset, str] = UNSET
45
55
  labels: Union[Unset, list[str]] = UNSET
46
- tags: Union[Unset, "CreateRecordCommandTags"] = UNSET
47
- authorization: Union[Unset, "RecordAuthorizationDto"] = UNSET
56
+ tags: Union[Unset, 'CreateRecordCommandTags'] = UNSET
57
+ authorization: Union[Unset, 'RecordAuthorizationDto'] = UNSET
58
+
59
+
60
+
61
+
48
62
 
49
63
  def to_dict(self) -> dict[str, Any]:
64
+ from ..models.record_relation_dto import RecordRelationDto
50
65
  from ..models.json_node import JsonNode
51
-
66
+ from ..models.create_record_command_tags import CreateRecordCommandTags
67
+ from ..models.record_authorization_dto import RecordAuthorizationDto
52
68
  title = self.title
53
69
 
54
70
  description: Union[None, Unset, str]
@@ -94,6 +110,8 @@ class CreateRecordCommand:
94
110
  relations_item = relations_item_data.to_dict()
95
111
  relations.append(relations_item)
96
112
 
113
+
114
+
97
115
  external_uri: Union[None, Unset, str]
98
116
  if isinstance(self.external_uri, Unset):
99
117
  external_uri = UNSET
@@ -104,6 +122,8 @@ class CreateRecordCommand:
104
122
  if not isinstance(self.labels, Unset):
105
123
  labels = self.labels
106
124
 
125
+
126
+
107
127
  tags: Union[Unset, dict[str, Any]] = UNSET
108
128
  if not isinstance(self.tags, Unset):
109
129
  tags = self.tags.to_dict()
@@ -112,9 +132,11 @@ class CreateRecordCommand:
112
132
  if not isinstance(self.authorization, Unset):
113
133
  authorization = self.authorization.to_dict()
114
134
 
135
+
115
136
  field_dict: dict[str, Any] = {}
116
137
 
117
- field_dict.update({})
138
+ field_dict.update({
139
+ })
118
140
  if title is not UNSET:
119
141
  field_dict["title"] = title
120
142
  if description is not UNSET:
@@ -140,13 +162,14 @@ class CreateRecordCommand:
140
162
 
141
163
  return field_dict
142
164
 
165
+
166
+
143
167
  @classmethod
144
168
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
145
- from ..models.create_record_command_tags import CreateRecordCommandTags
169
+ from ..models.record_relation_dto import RecordRelationDto
146
170
  from ..models.json_node import JsonNode
171
+ from ..models.create_record_command_tags import CreateRecordCommandTags
147
172
  from ..models.record_authorization_dto import RecordAuthorizationDto
148
- from ..models.record_relation_dto import RecordRelationDto
149
-
150
173
  d = dict(src_dict)
151
174
  title = d.pop("title", UNSET)
152
175
 
@@ -159,6 +182,7 @@ class CreateRecordCommand:
159
182
 
160
183
  description = _parse_description(d.pop("description", UNSET))
161
184
 
185
+
162
186
  def _parse_mini_id(data: object) -> Union[None, Unset, str]:
163
187
  if data is None:
164
188
  return data
@@ -168,6 +192,7 @@ class CreateRecordCommand:
168
192
 
169
193
  mini_id = _parse_mini_id(d.pop("miniId", UNSET))
170
194
 
195
+
171
196
  def _parse_event_date(data: object) -> Union[None, Unset, datetime.datetime]:
172
197
  if data is None:
173
198
  return data
@@ -178,14 +203,17 @@ class CreateRecordCommand:
178
203
  raise TypeError()
179
204
  event_date_type_0 = isoparse(data)
180
205
 
206
+
207
+
181
208
  return event_date_type_0
182
- except: # noqa: E722
209
+ except: # noqa: E722
183
210
  pass
184
211
  return cast(Union[None, Unset, datetime.datetime], data)
185
212
 
186
213
  event_date = _parse_event_date(d.pop("eventDate", UNSET))
187
214
 
188
- def _parse_schema(data: object) -> Union["JsonNode", None, Unset]:
215
+
216
+ def _parse_schema(data: object) -> Union['JsonNode', None, Unset]:
189
217
  if data is None:
190
218
  return data
191
219
  if isinstance(data, Unset):
@@ -195,14 +223,17 @@ class CreateRecordCommand:
195
223
  raise TypeError()
196
224
  schema_type_0 = JsonNode.from_dict(data)
197
225
 
226
+
227
+
198
228
  return schema_type_0
199
- except: # noqa: E722
229
+ except: # noqa: E722
200
230
  pass
201
- return cast(Union["JsonNode", None, Unset], data)
231
+ return cast(Union['JsonNode', None, Unset], data)
202
232
 
203
233
  schema = _parse_schema(d.pop("schema", UNSET))
204
234
 
205
- def _parse_content(data: object) -> Union["JsonNode", None, Unset]:
235
+
236
+ def _parse_content(data: object) -> Union['JsonNode', None, Unset]:
206
237
  if data is None:
207
238
  return data
208
239
  if isinstance(data, Unset):
@@ -212,20 +243,26 @@ class CreateRecordCommand:
212
243
  raise TypeError()
213
244
  content_type_0 = JsonNode.from_dict(data)
214
245
 
246
+
247
+
215
248
  return content_type_0
216
- except: # noqa: E722
249
+ except: # noqa: E722
217
250
  pass
218
- return cast(Union["JsonNode", None, Unset], data)
251
+ return cast(Union['JsonNode', None, Unset], data)
219
252
 
220
253
  content = _parse_content(d.pop("content", UNSET))
221
254
 
255
+
222
256
  relations = []
223
257
  _relations = d.pop("relations", UNSET)
224
- for relations_item_data in _relations or []:
258
+ for relations_item_data in (_relations or []):
225
259
  relations_item = RecordRelationDto.from_dict(relations_item_data)
226
260
 
261
+
262
+
227
263
  relations.append(relations_item)
228
264
 
265
+
229
266
  def _parse_external_uri(data: object) -> Union[None, Unset, str]:
230
267
  if data is None:
231
268
  return data
@@ -235,22 +272,30 @@ class CreateRecordCommand:
235
272
 
236
273
  external_uri = _parse_external_uri(d.pop("externalUri", UNSET))
237
274
 
275
+
238
276
  labels = cast(list[str], d.pop("labels", UNSET))
239
277
 
278
+
240
279
  _tags = d.pop("tags", UNSET)
241
280
  tags: Union[Unset, CreateRecordCommandTags]
242
- if isinstance(_tags, Unset):
281
+ if isinstance(_tags, Unset):
243
282
  tags = UNSET
244
283
  else:
245
284
  tags = CreateRecordCommandTags.from_dict(_tags)
246
285
 
286
+
287
+
288
+
247
289
  _authorization = d.pop("authorization", UNSET)
248
290
  authorization: Union[Unset, RecordAuthorizationDto]
249
- if isinstance(_authorization, Unset):
291
+ if isinstance(_authorization, Unset):
250
292
  authorization = UNSET
251
293
  else:
252
294
  authorization = RecordAuthorizationDto.from_dict(_authorization)
253
295
 
296
+
297
+
298
+
254
299
  create_record_command = cls(
255
300
  title=title,
256
301
  description=description,
@@ -266,3 +311,4 @@ class CreateRecordCommand:
266
311
  )
267
312
 
268
313
  return create_record_command
314
+