dart-tools 0.6.11__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 dart-tools might be problematic. Click here for more details.
- dart/__init__.py +20 -0
- dart/dart.py +1144 -0
- dart/exception.py +6 -0
- dart/generated/__init__.py +8 -0
- dart/generated/api/__init__.py +1 -0
- dart/generated/api/attachments/__init__.py +0 -0
- dart/generated/api/attachments/attachments_list.py +169 -0
- dart/generated/api/comments/__init__.py +0 -0
- dart/generated/api/comments/comments_list.py +278 -0
- dart/generated/api/dartboards/__init__.py +0 -0
- dart/generated/api/dartboards/dartboards_list.py +271 -0
- dart/generated/api/dashboards/__init__.py +0 -0
- dart/generated/api/dashboards/dashboards_list.py +184 -0
- dart/generated/api/docs/__init__.py +0 -0
- dart/generated/api/docs/docs_list.py +372 -0
- dart/generated/api/folders/__init__.py +0 -0
- dart/generated/api/folders/folders_list.py +234 -0
- dart/generated/api/form_fields/__init__.py +0 -0
- dart/generated/api/form_fields/form_fields_list.py +169 -0
- dart/generated/api/forms/__init__.py +0 -0
- dart/generated/api/forms/forms_list.py +169 -0
- dart/generated/api/layouts/__init__.py +0 -0
- dart/generated/api/layouts/layouts_list.py +169 -0
- dart/generated/api/links/__init__.py +0 -0
- dart/generated/api/links/links_list.py +169 -0
- dart/generated/api/options/__init__.py +0 -0
- dart/generated/api/options/options_list.py +229 -0
- dart/generated/api/properties/__init__.py +0 -0
- dart/generated/api/properties/properties_list.py +204 -0
- dart/generated/api/reactions/__init__.py +0 -0
- dart/generated/api/reactions/reactions_list.py +169 -0
- dart/generated/api/relationship_kinds/__init__.py +0 -0
- dart/generated/api/relationship_kinds/relationship_kinds_list.py +169 -0
- dart/generated/api/relationships/__init__.py +0 -0
- dart/generated/api/relationships/relationships_list.py +169 -0
- dart/generated/api/spaces/__init__.py +0 -0
- dart/generated/api/spaces/spaces_list.py +214 -0
- dart/generated/api/statuses/__init__.py +0 -0
- dart/generated/api/statuses/statuses_list.py +249 -0
- dart/generated/api/task_doc_relationships/__init__.py +0 -0
- dart/generated/api/task_doc_relationships/task_doc_relationships_list.py +169 -0
- dart/generated/api/task_kinds/__init__.py +0 -0
- dart/generated/api/task_kinds/task_kinds_list.py +204 -0
- dart/generated/api/tasks/__init__.py +0 -0
- dart/generated/api/tasks/tasks_list.py +446 -0
- dart/generated/api/tenants/__init__.py +0 -0
- dart/generated/api/tenants/tenants_list.py +169 -0
- dart/generated/api/transactions/__init__.py +0 -0
- dart/generated/api/transactions/transactions_create.py +176 -0
- dart/generated/api/user_dartboard_layouts/__init__.py +0 -0
- dart/generated/api/user_dartboard_layouts/user_dartboard_layouts_list.py +169 -0
- dart/generated/api/user_data/__init__.py +0 -0
- dart/generated/api/user_data/user_data_entity_retrieve.py +580 -0
- dart/generated/api/users/__init__.py +0 -0
- dart/generated/api/users/users_list.py +214 -0
- dart/generated/api/views/__init__.py +0 -0
- dart/generated/api/views/views_list.py +184 -0
- dart/generated/api/webhooks/__init__.py +0 -0
- dart/generated/api/webhooks/webhooks_list.py +169 -0
- dart/generated/client.py +268 -0
- dart/generated/errors.py +16 -0
- dart/generated/models/__init__.py +373 -0
- dart/generated/models/attachment.py +112 -0
- dart/generated/models/attachment_create.py +121 -0
- dart/generated/models/attachment_update.py +125 -0
- dart/generated/models/bar_chart_adtl.py +72 -0
- dart/generated/models/brainstorm.py +149 -0
- dart/generated/models/brainstorm_create.py +134 -0
- dart/generated/models/brainstorm_state.py +10 -0
- dart/generated/models/brainstorm_update.py +153 -0
- dart/generated/models/burn_up_chart_adtl.py +103 -0
- dart/generated/models/chart.py +208 -0
- dart/generated/models/chart_aggregation.py +10 -0
- dart/generated/models/chart_type.py +14 -0
- dart/generated/models/comment.py +207 -0
- dart/generated/models/comment_create.py +146 -0
- dart/generated/models/comment_reaction.py +84 -0
- dart/generated/models/comment_reaction_create.py +82 -0
- dart/generated/models/comment_reaction_update.py +87 -0
- dart/generated/models/comment_update.py +148 -0
- dart/generated/models/dartboard.py +280 -0
- dart/generated/models/dartboard_create.py +285 -0
- dart/generated/models/dartboard_kind.py +12 -0
- dart/generated/models/dartboard_update.py +287 -0
- dart/generated/models/dartboards_list_kind.py +12 -0
- dart/generated/models/dashboard.py +185 -0
- dart/generated/models/dashboard_create.py +171 -0
- dart/generated/models/dashboard_update.py +173 -0
- dart/generated/models/discord_integration.py +72 -0
- dart/generated/models/doc.py +243 -0
- dart/generated/models/doc_create.py +295 -0
- dart/generated/models/doc_source_type.py +13 -0
- dart/generated/models/doc_update.py +295 -0
- dart/generated/models/docs_list_o_item.py +11 -0
- dart/generated/models/entity_name.py +22 -0
- dart/generated/models/event.py +420 -0
- dart/generated/models/event_actor.py +19 -0
- dart/generated/models/event_create.py +158 -0
- dart/generated/models/event_kind.py +88 -0
- dart/generated/models/event_subscription.py +74 -0
- dart/generated/models/event_subscription_update.py +173 -0
- dart/generated/models/filter_applicability.py +22 -0
- dart/generated/models/filter_assignee.py +116 -0
- dart/generated/models/filter_connector.py +9 -0
- dart/generated/models/filter_group.py +112 -0
- dart/generated/models/filter_search.py +82 -0
- dart/generated/models/filter_set.py +116 -0
- dart/generated/models/folder.py +150 -0
- dart/generated/models/folder_create.py +150 -0
- dart/generated/models/folder_kind.py +10 -0
- dart/generated/models/folder_update.py +152 -0
- dart/generated/models/folders_list_kind.py +10 -0
- dart/generated/models/form.py +147 -0
- dart/generated/models/form_create.py +141 -0
- dart/generated/models/form_field.py +144 -0
- dart/generated/models/form_field_create.py +129 -0
- dart/generated/models/form_field_update.py +132 -0
- dart/generated/models/form_update.py +142 -0
- dart/generated/models/github_integration.py +163 -0
- dart/generated/models/github_integration_tenant_extension_status.py +11 -0
- dart/generated/models/google_data.py +94 -0
- dart/generated/models/icon_kind.py +10 -0
- dart/generated/models/layout.py +167 -0
- dart/generated/models/layout_config.py +70 -0
- dart/generated/models/layout_create.py +130 -0
- dart/generated/models/layout_kind.py +11 -0
- dart/generated/models/layout_kind_config_map.py +56 -0
- dart/generated/models/layout_update.py +130 -0
- dart/generated/models/line_chart_adtl.py +72 -0
- dart/generated/models/models_response.py +671 -0
- dart/generated/models/notification.py +120 -0
- dart/generated/models/notification_update.py +100 -0
- dart/generated/models/notion_integration.py +90 -0
- dart/generated/models/notion_integration_tenant_extension_status.py +10 -0
- dart/generated/models/number_chart_adtl.py +77 -0
- dart/generated/models/operation.py +874 -0
- dart/generated/models/operation_kind.py +12 -0
- dart/generated/models/operation_model_kind.py +36 -0
- dart/generated/models/option.py +118 -0
- dart/generated/models/option_create.py +105 -0
- dart/generated/models/option_update.py +107 -0
- dart/generated/models/paginated_attachment_list.py +122 -0
- dart/generated/models/paginated_comment_list.py +122 -0
- dart/generated/models/paginated_comment_reaction_list.py +122 -0
- dart/generated/models/paginated_dartboard_list.py +122 -0
- dart/generated/models/paginated_dashboard_list.py +122 -0
- dart/generated/models/paginated_doc_list.py +122 -0
- dart/generated/models/paginated_folder_list.py +122 -0
- dart/generated/models/paginated_form_field_list.py +122 -0
- dart/generated/models/paginated_form_list.py +122 -0
- dart/generated/models/paginated_layout_list.py +122 -0
- dart/generated/models/paginated_option_list.py +122 -0
- dart/generated/models/paginated_property_list.py +122 -0
- dart/generated/models/paginated_relationship_kind_list.py +122 -0
- dart/generated/models/paginated_relationship_list.py +122 -0
- dart/generated/models/paginated_space_list.py +122 -0
- dart/generated/models/paginated_status_list.py +122 -0
- dart/generated/models/paginated_task_doc_relationship_list.py +122 -0
- dart/generated/models/paginated_task_kind_list.py +122 -0
- dart/generated/models/paginated_task_link_list.py +122 -0
- dart/generated/models/paginated_task_list.py +122 -0
- dart/generated/models/paginated_tenant_list.py +122 -0
- dart/generated/models/paginated_user_dartboard_layout_list.py +122 -0
- dart/generated/models/paginated_user_list.py +122 -0
- dart/generated/models/paginated_view_list.py +122 -0
- dart/generated/models/paginated_webhook_list.py +122 -0
- dart/generated/models/pie_chart_adtl.py +69 -0
- dart/generated/models/pie_chart_display_metric.py +9 -0
- dart/generated/models/priority.py +11 -0
- dart/generated/models/properties_list_kind.py +32 -0
- dart/generated/models/property_.py +153 -0
- dart/generated/models/property_create.py +137 -0
- dart/generated/models/property_kind.py +32 -0
- dart/generated/models/property_update.py +146 -0
- dart/generated/models/relationship.py +74 -0
- dart/generated/models/relationship_create.py +93 -0
- dart/generated/models/relationship_kind.py +123 -0
- dart/generated/models/relationship_kind_create.py +117 -0
- dart/generated/models/relationship_kind_kind.py +12 -0
- dart/generated/models/relationship_kind_update.py +119 -0
- dart/generated/models/report_kind.py +9 -0
- dart/generated/models/request_body.py +80 -0
- dart/generated/models/response_body.py +72 -0
- dart/generated/models/saml_config.py +77 -0
- dart/generated/models/saml_config_tenant_extension_status.py +9 -0
- dart/generated/models/slack_integration.py +90 -0
- dart/generated/models/slack_integration_tenant_extension_status.py +10 -0
- dart/generated/models/sort.py +66 -0
- dart/generated/models/space.py +325 -0
- dart/generated/models/space_create.py +360 -0
- dart/generated/models/space_kind.py +10 -0
- dart/generated/models/space_update.py +361 -0
- dart/generated/models/sprint_mode.py +9 -0
- dart/generated/models/status.py +141 -0
- dart/generated/models/status_create.py +125 -0
- dart/generated/models/status_kind.py +12 -0
- dart/generated/models/status_update.py +135 -0
- dart/generated/models/statuses_list_kind.py +12 -0
- dart/generated/models/subscription.py +9 -0
- dart/generated/models/subtask_display_mode.py +10 -0
- dart/generated/models/summary_statistic_kind.py +14 -0
- dart/generated/models/table_chart_adtl.py +98 -0
- dart/generated/models/task.py +531 -0
- dart/generated/models/task_create.py +585 -0
- dart/generated/models/task_detail_mode.py +10 -0
- dart/generated/models/task_doc_relationship.py +96 -0
- dart/generated/models/task_doc_relationship_create.py +74 -0
- dart/generated/models/task_kind.py +149 -0
- dart/generated/models/task_kind_create.py +144 -0
- dart/generated/models/task_kind_kind.py +9 -0
- dart/generated/models/task_kind_update.py +153 -0
- dart/generated/models/task_kinds_list_kind.py +9 -0
- dart/generated/models/task_link.py +131 -0
- dart/generated/models/task_link_create.py +152 -0
- dart/generated/models/task_link_kind.py +19 -0
- dart/generated/models/task_link_update.py +155 -0
- dart/generated/models/task_notion_document.py +196 -0
- dart/generated/models/task_notion_document_block_children_map_type_0.py +43 -0
- dart/generated/models/task_notion_document_block_map_type_0.py +43 -0
- dart/generated/models/task_notion_document_page_map_type_0.py +43 -0
- dart/generated/models/task_properties.py +43 -0
- dart/generated/models/task_source_type.py +31 -0
- dart/generated/models/task_update.py +585 -0
- dart/generated/models/tenant.py +378 -0
- dart/generated/models/tenant_update.py +157 -0
- dart/generated/models/theme.py +10 -0
- dart/generated/models/transaction.py +156 -0
- dart/generated/models/transaction_kind.py +74 -0
- dart/generated/models/transaction_response.py +96 -0
- dart/generated/models/user.py +245 -0
- dart/generated/models/user_dartboard_layout.py +66 -0
- dart/generated/models/user_dartboard_layout_create.py +74 -0
- dart/generated/models/user_data_entity_retrieve_entity_kind.py +32 -0
- dart/generated/models/user_role.py +12 -0
- dart/generated/models/user_status.py +12 -0
- dart/generated/models/user_update.py +210 -0
- dart/generated/models/validation_error_response.py +64 -0
- dart/generated/models/validation_error_response_items.py +43 -0
- dart/generated/models/view.py +215 -0
- dart/generated/models/view_create.py +213 -0
- dart/generated/models/view_kind.py +11 -0
- dart/generated/models/view_update.py +215 -0
- dart/generated/models/webhook.py +96 -0
- dart/generated/models/webhook_create.py +77 -0
- dart/generated/models/webhook_update.py +78 -0
- dart/generated/models/zapier_integration.py +66 -0
- dart/generated/py.typed +1 -0
- dart/generated/types.py +45 -0
- dart/order_manager.py +62 -0
- dart/webhook.py +21 -0
- dart_tools-0.6.11.dist-info/LICENSE +21 -0
- dart_tools-0.6.11.dist-info/METADATA +221 -0
- dart_tools-0.6.11.dist-info/RECORD +257 -0
- dart_tools-0.6.11.dist-info/WHEEL +5 -0
- dart_tools-0.6.11.dist-info/dist/dart-tools-0.3.3.tar.gz +0 -0
- dart_tools-0.6.11.dist-info/entry_points.txt +2 -0
- dart_tools-0.6.11.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..models.doc_source_type import DocSourceType
|
|
7
|
+
from ..models.icon_kind import IconKind
|
|
8
|
+
from ..models.report_kind import ReportKind
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="DocCreate")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class DocCreate:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
duid (str):
|
|
19
|
+
source_user (Union[None, Unset, str]):
|
|
20
|
+
source_type (Union[Unset, DocSourceType]): * `Unknown` - UNKNOWN
|
|
21
|
+
* `Onboarding` - ONBOARDING
|
|
22
|
+
* `Recommendation` - RECOMMENDATION
|
|
23
|
+
* `GeneratedReport` - GENERATED_REPORT
|
|
24
|
+
* `ChatGPT` - CHAT_GPT
|
|
25
|
+
* `Application` - APPLICATION Default: DocSourceType.UNKNOWN.
|
|
26
|
+
drafter_duid (Union[None, Unset, str]):
|
|
27
|
+
in_trash (Union[Unset, bool]):
|
|
28
|
+
folder_duid (Union[Unset, str]):
|
|
29
|
+
report_kind (Union[None, ReportKind, Unset]):
|
|
30
|
+
order (Union[Unset, str]):
|
|
31
|
+
title (Union[Unset, str]):
|
|
32
|
+
text (Union[Unset, Any]):
|
|
33
|
+
text_markdown (Union[Unset, str]):
|
|
34
|
+
edited_by_ai (Union[Unset, bool]):
|
|
35
|
+
recommendation_duid (Union[None, Unset, str]):
|
|
36
|
+
editor_duids (Union[Unset, List[str]]):
|
|
37
|
+
subscriber_duids (Union[Unset, List[str]]):
|
|
38
|
+
icon_kind (Union[Unset, IconKind]): * `None` - NONE
|
|
39
|
+
* `Icon` - ICON
|
|
40
|
+
* `Emoji` - EMOJI
|
|
41
|
+
icon_name_or_emoji (Union[Unset, str]):
|
|
42
|
+
color_hex (Union[Unset, str]):
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
duid: str
|
|
46
|
+
source_user: Union[None, Unset, str] = UNSET
|
|
47
|
+
source_type: Union[Unset, DocSourceType] = DocSourceType.UNKNOWN
|
|
48
|
+
drafter_duid: Union[None, Unset, str] = UNSET
|
|
49
|
+
in_trash: Union[Unset, bool] = UNSET
|
|
50
|
+
folder_duid: Union[Unset, str] = UNSET
|
|
51
|
+
report_kind: Union[None, ReportKind, Unset] = UNSET
|
|
52
|
+
order: Union[Unset, str] = UNSET
|
|
53
|
+
title: Union[Unset, str] = UNSET
|
|
54
|
+
text: Union[Unset, Any] = UNSET
|
|
55
|
+
text_markdown: Union[Unset, str] = UNSET
|
|
56
|
+
edited_by_ai: Union[Unset, bool] = UNSET
|
|
57
|
+
recommendation_duid: Union[None, Unset, str] = UNSET
|
|
58
|
+
editor_duids: Union[Unset, List[str]] = UNSET
|
|
59
|
+
subscriber_duids: Union[Unset, List[str]] = UNSET
|
|
60
|
+
icon_kind: Union[Unset, IconKind] = UNSET
|
|
61
|
+
icon_name_or_emoji: Union[Unset, str] = UNSET
|
|
62
|
+
color_hex: Union[Unset, str] = UNSET
|
|
63
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
duid = self.duid
|
|
67
|
+
|
|
68
|
+
source_user: Union[None, Unset, str]
|
|
69
|
+
if isinstance(self.source_user, Unset):
|
|
70
|
+
source_user = UNSET
|
|
71
|
+
else:
|
|
72
|
+
source_user = self.source_user
|
|
73
|
+
|
|
74
|
+
source_type: Union[Unset, str] = UNSET
|
|
75
|
+
if not isinstance(self.source_type, Unset):
|
|
76
|
+
source_type = self.source_type.value
|
|
77
|
+
|
|
78
|
+
drafter_duid: Union[None, Unset, str]
|
|
79
|
+
if isinstance(self.drafter_duid, Unset):
|
|
80
|
+
drafter_duid = UNSET
|
|
81
|
+
else:
|
|
82
|
+
drafter_duid = self.drafter_duid
|
|
83
|
+
|
|
84
|
+
in_trash = self.in_trash
|
|
85
|
+
|
|
86
|
+
folder_duid = self.folder_duid
|
|
87
|
+
|
|
88
|
+
report_kind: Union[None, Unset, str]
|
|
89
|
+
if isinstance(self.report_kind, Unset):
|
|
90
|
+
report_kind = UNSET
|
|
91
|
+
elif isinstance(self.report_kind, ReportKind):
|
|
92
|
+
report_kind = self.report_kind.value
|
|
93
|
+
else:
|
|
94
|
+
report_kind = self.report_kind
|
|
95
|
+
|
|
96
|
+
order = self.order
|
|
97
|
+
|
|
98
|
+
title = self.title
|
|
99
|
+
|
|
100
|
+
text = self.text
|
|
101
|
+
|
|
102
|
+
text_markdown = self.text_markdown
|
|
103
|
+
|
|
104
|
+
edited_by_ai = self.edited_by_ai
|
|
105
|
+
|
|
106
|
+
recommendation_duid: Union[None, Unset, str]
|
|
107
|
+
if isinstance(self.recommendation_duid, Unset):
|
|
108
|
+
recommendation_duid = UNSET
|
|
109
|
+
else:
|
|
110
|
+
recommendation_duid = self.recommendation_duid
|
|
111
|
+
|
|
112
|
+
editor_duids: Union[Unset, List[str]] = UNSET
|
|
113
|
+
if not isinstance(self.editor_duids, Unset):
|
|
114
|
+
editor_duids = self.editor_duids
|
|
115
|
+
|
|
116
|
+
subscriber_duids: Union[Unset, List[str]] = UNSET
|
|
117
|
+
if not isinstance(self.subscriber_duids, Unset):
|
|
118
|
+
subscriber_duids = self.subscriber_duids
|
|
119
|
+
|
|
120
|
+
icon_kind: Union[Unset, str] = UNSET
|
|
121
|
+
if not isinstance(self.icon_kind, Unset):
|
|
122
|
+
icon_kind = self.icon_kind.value
|
|
123
|
+
|
|
124
|
+
icon_name_or_emoji = self.icon_name_or_emoji
|
|
125
|
+
|
|
126
|
+
color_hex = self.color_hex
|
|
127
|
+
|
|
128
|
+
field_dict: Dict[str, Any] = {}
|
|
129
|
+
field_dict.update(self.additional_properties)
|
|
130
|
+
field_dict.update(
|
|
131
|
+
{
|
|
132
|
+
"duid": duid,
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
if source_user is not UNSET:
|
|
136
|
+
field_dict["sourceUser"] = source_user
|
|
137
|
+
if source_type is not UNSET:
|
|
138
|
+
field_dict["sourceType"] = source_type
|
|
139
|
+
if drafter_duid is not UNSET:
|
|
140
|
+
field_dict["drafterDuid"] = drafter_duid
|
|
141
|
+
if in_trash is not UNSET:
|
|
142
|
+
field_dict["inTrash"] = in_trash
|
|
143
|
+
if folder_duid is not UNSET:
|
|
144
|
+
field_dict["folderDuid"] = folder_duid
|
|
145
|
+
if report_kind is not UNSET:
|
|
146
|
+
field_dict["reportKind"] = report_kind
|
|
147
|
+
if order is not UNSET:
|
|
148
|
+
field_dict["order"] = order
|
|
149
|
+
if title is not UNSET:
|
|
150
|
+
field_dict["title"] = title
|
|
151
|
+
if text is not UNSET:
|
|
152
|
+
field_dict["text"] = text
|
|
153
|
+
if text_markdown is not UNSET:
|
|
154
|
+
field_dict["textMarkdown"] = text_markdown
|
|
155
|
+
if edited_by_ai is not UNSET:
|
|
156
|
+
field_dict["editedByAi"] = edited_by_ai
|
|
157
|
+
if recommendation_duid is not UNSET:
|
|
158
|
+
field_dict["recommendationDuid"] = recommendation_duid
|
|
159
|
+
if editor_duids is not UNSET:
|
|
160
|
+
field_dict["editorDuids"] = editor_duids
|
|
161
|
+
if subscriber_duids is not UNSET:
|
|
162
|
+
field_dict["subscriberDuids"] = subscriber_duids
|
|
163
|
+
if icon_kind is not UNSET:
|
|
164
|
+
field_dict["iconKind"] = icon_kind
|
|
165
|
+
if icon_name_or_emoji is not UNSET:
|
|
166
|
+
field_dict["iconNameOrEmoji"] = icon_name_or_emoji
|
|
167
|
+
if color_hex is not UNSET:
|
|
168
|
+
field_dict["colorHex"] = color_hex
|
|
169
|
+
|
|
170
|
+
return field_dict
|
|
171
|
+
|
|
172
|
+
@classmethod
|
|
173
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
174
|
+
d = src_dict.copy()
|
|
175
|
+
duid = d.pop("duid")
|
|
176
|
+
|
|
177
|
+
def _parse_source_user(data: object) -> Union[None, Unset, str]:
|
|
178
|
+
if data is None:
|
|
179
|
+
return data
|
|
180
|
+
if isinstance(data, Unset):
|
|
181
|
+
return data
|
|
182
|
+
return cast(Union[None, Unset, str], data)
|
|
183
|
+
|
|
184
|
+
source_user = _parse_source_user(d.pop("sourceUser", UNSET))
|
|
185
|
+
|
|
186
|
+
_source_type = d.pop("sourceType", UNSET)
|
|
187
|
+
source_type: Union[Unset, DocSourceType]
|
|
188
|
+
if isinstance(_source_type, Unset):
|
|
189
|
+
source_type = UNSET
|
|
190
|
+
else:
|
|
191
|
+
source_type = DocSourceType(_source_type)
|
|
192
|
+
|
|
193
|
+
def _parse_drafter_duid(data: object) -> Union[None, Unset, str]:
|
|
194
|
+
if data is None:
|
|
195
|
+
return data
|
|
196
|
+
if isinstance(data, Unset):
|
|
197
|
+
return data
|
|
198
|
+
return cast(Union[None, Unset, str], data)
|
|
199
|
+
|
|
200
|
+
drafter_duid = _parse_drafter_duid(d.pop("drafterDuid", UNSET))
|
|
201
|
+
|
|
202
|
+
in_trash = d.pop("inTrash", UNSET)
|
|
203
|
+
|
|
204
|
+
folder_duid = d.pop("folderDuid", UNSET)
|
|
205
|
+
|
|
206
|
+
def _parse_report_kind(data: object) -> Union[None, ReportKind, Unset]:
|
|
207
|
+
if data is None:
|
|
208
|
+
return data
|
|
209
|
+
if isinstance(data, Unset):
|
|
210
|
+
return data
|
|
211
|
+
try:
|
|
212
|
+
if not isinstance(data, str):
|
|
213
|
+
raise TypeError()
|
|
214
|
+
report_kind_type_0 = ReportKind(data)
|
|
215
|
+
|
|
216
|
+
return report_kind_type_0
|
|
217
|
+
except: # noqa: E722
|
|
218
|
+
pass
|
|
219
|
+
return cast(Union[None, ReportKind, Unset], data)
|
|
220
|
+
|
|
221
|
+
report_kind = _parse_report_kind(d.pop("reportKind", UNSET))
|
|
222
|
+
|
|
223
|
+
order = d.pop("order", UNSET)
|
|
224
|
+
|
|
225
|
+
title = d.pop("title", UNSET)
|
|
226
|
+
|
|
227
|
+
text = d.pop("text", UNSET)
|
|
228
|
+
|
|
229
|
+
text_markdown = d.pop("textMarkdown", UNSET)
|
|
230
|
+
|
|
231
|
+
edited_by_ai = d.pop("editedByAi", UNSET)
|
|
232
|
+
|
|
233
|
+
def _parse_recommendation_duid(data: object) -> Union[None, Unset, str]:
|
|
234
|
+
if data is None:
|
|
235
|
+
return data
|
|
236
|
+
if isinstance(data, Unset):
|
|
237
|
+
return data
|
|
238
|
+
return cast(Union[None, Unset, str], data)
|
|
239
|
+
|
|
240
|
+
recommendation_duid = _parse_recommendation_duid(d.pop("recommendationDuid", UNSET))
|
|
241
|
+
|
|
242
|
+
editor_duids = cast(List[str], d.pop("editorDuids", UNSET))
|
|
243
|
+
|
|
244
|
+
subscriber_duids = cast(List[str], d.pop("subscriberDuids", UNSET))
|
|
245
|
+
|
|
246
|
+
_icon_kind = d.pop("iconKind", UNSET)
|
|
247
|
+
icon_kind: Union[Unset, IconKind]
|
|
248
|
+
if isinstance(_icon_kind, Unset):
|
|
249
|
+
icon_kind = UNSET
|
|
250
|
+
else:
|
|
251
|
+
icon_kind = IconKind(_icon_kind)
|
|
252
|
+
|
|
253
|
+
icon_name_or_emoji = d.pop("iconNameOrEmoji", UNSET)
|
|
254
|
+
|
|
255
|
+
color_hex = d.pop("colorHex", UNSET)
|
|
256
|
+
|
|
257
|
+
doc_create = cls(
|
|
258
|
+
duid=duid,
|
|
259
|
+
source_user=source_user,
|
|
260
|
+
source_type=source_type,
|
|
261
|
+
drafter_duid=drafter_duid,
|
|
262
|
+
in_trash=in_trash,
|
|
263
|
+
folder_duid=folder_duid,
|
|
264
|
+
report_kind=report_kind,
|
|
265
|
+
order=order,
|
|
266
|
+
title=title,
|
|
267
|
+
text=text,
|
|
268
|
+
text_markdown=text_markdown,
|
|
269
|
+
edited_by_ai=edited_by_ai,
|
|
270
|
+
recommendation_duid=recommendation_duid,
|
|
271
|
+
editor_duids=editor_duids,
|
|
272
|
+
subscriber_duids=subscriber_duids,
|
|
273
|
+
icon_kind=icon_kind,
|
|
274
|
+
icon_name_or_emoji=icon_name_or_emoji,
|
|
275
|
+
color_hex=color_hex,
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
doc_create.additional_properties = d
|
|
279
|
+
return doc_create
|
|
280
|
+
|
|
281
|
+
@property
|
|
282
|
+
def additional_keys(self) -> List[str]:
|
|
283
|
+
return list(self.additional_properties.keys())
|
|
284
|
+
|
|
285
|
+
def __getitem__(self, key: str) -> Any:
|
|
286
|
+
return self.additional_properties[key]
|
|
287
|
+
|
|
288
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
289
|
+
self.additional_properties[key] = value
|
|
290
|
+
|
|
291
|
+
def __delitem__(self, key: str) -> None:
|
|
292
|
+
del self.additional_properties[key]
|
|
293
|
+
|
|
294
|
+
def __contains__(self, key: str) -> bool:
|
|
295
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class DocSourceType(str, Enum):
|
|
5
|
+
APPLICATION = "Application"
|
|
6
|
+
CHATGPT = "ChatGPT"
|
|
7
|
+
GENERATEDREPORT = "GeneratedReport"
|
|
8
|
+
ONBOARDING = "Onboarding"
|
|
9
|
+
RECOMMENDATION = "Recommendation"
|
|
10
|
+
UNKNOWN = "Unknown"
|
|
11
|
+
|
|
12
|
+
def __str__(self) -> str:
|
|
13
|
+
return str(self.value)
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..models.doc_source_type import DocSourceType
|
|
7
|
+
from ..models.icon_kind import IconKind
|
|
8
|
+
from ..models.report_kind import ReportKind
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="DocUpdate")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class DocUpdate:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
duid (str):
|
|
19
|
+
source_user (Union[None, Unset, str]):
|
|
20
|
+
source_type (Union[Unset, DocSourceType]): * `Unknown` - UNKNOWN
|
|
21
|
+
* `Onboarding` - ONBOARDING
|
|
22
|
+
* `Recommendation` - RECOMMENDATION
|
|
23
|
+
* `GeneratedReport` - GENERATED_REPORT
|
|
24
|
+
* `ChatGPT` - CHAT_GPT
|
|
25
|
+
* `Application` - APPLICATION Default: DocSourceType.UNKNOWN.
|
|
26
|
+
drafter_duid (Union[None, Unset, str]):
|
|
27
|
+
in_trash (Union[Unset, bool]):
|
|
28
|
+
folder_duid (Union[Unset, str]):
|
|
29
|
+
report_kind (Union[None, ReportKind, Unset]):
|
|
30
|
+
order (Union[Unset, str]):
|
|
31
|
+
title (Union[Unset, str]):
|
|
32
|
+
text (Union[Unset, Any]):
|
|
33
|
+
text_markdown (Union[Unset, str]):
|
|
34
|
+
edited_by_ai (Union[Unset, bool]):
|
|
35
|
+
recommendation_duid (Union[None, Unset, str]):
|
|
36
|
+
editor_duids (Union[Unset, List[str]]):
|
|
37
|
+
subscriber_duids (Union[Unset, List[str]]):
|
|
38
|
+
icon_kind (Union[Unset, IconKind]): * `None` - NONE
|
|
39
|
+
* `Icon` - ICON
|
|
40
|
+
* `Emoji` - EMOJI
|
|
41
|
+
icon_name_or_emoji (Union[Unset, str]):
|
|
42
|
+
color_hex (Union[Unset, str]):
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
duid: str
|
|
46
|
+
source_user: Union[None, Unset, str] = UNSET
|
|
47
|
+
source_type: Union[Unset, DocSourceType] = DocSourceType.UNKNOWN
|
|
48
|
+
drafter_duid: Union[None, Unset, str] = UNSET
|
|
49
|
+
in_trash: Union[Unset, bool] = UNSET
|
|
50
|
+
folder_duid: Union[Unset, str] = UNSET
|
|
51
|
+
report_kind: Union[None, ReportKind, Unset] = UNSET
|
|
52
|
+
order: Union[Unset, str] = UNSET
|
|
53
|
+
title: Union[Unset, str] = UNSET
|
|
54
|
+
text: Union[Unset, Any] = UNSET
|
|
55
|
+
text_markdown: Union[Unset, str] = UNSET
|
|
56
|
+
edited_by_ai: Union[Unset, bool] = UNSET
|
|
57
|
+
recommendation_duid: Union[None, Unset, str] = UNSET
|
|
58
|
+
editor_duids: Union[Unset, List[str]] = UNSET
|
|
59
|
+
subscriber_duids: Union[Unset, List[str]] = UNSET
|
|
60
|
+
icon_kind: Union[Unset, IconKind] = UNSET
|
|
61
|
+
icon_name_or_emoji: Union[Unset, str] = UNSET
|
|
62
|
+
color_hex: Union[Unset, str] = UNSET
|
|
63
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
duid = self.duid
|
|
67
|
+
|
|
68
|
+
source_user: Union[None, Unset, str]
|
|
69
|
+
if isinstance(self.source_user, Unset):
|
|
70
|
+
source_user = UNSET
|
|
71
|
+
else:
|
|
72
|
+
source_user = self.source_user
|
|
73
|
+
|
|
74
|
+
source_type: Union[Unset, str] = UNSET
|
|
75
|
+
if not isinstance(self.source_type, Unset):
|
|
76
|
+
source_type = self.source_type.value
|
|
77
|
+
|
|
78
|
+
drafter_duid: Union[None, Unset, str]
|
|
79
|
+
if isinstance(self.drafter_duid, Unset):
|
|
80
|
+
drafter_duid = UNSET
|
|
81
|
+
else:
|
|
82
|
+
drafter_duid = self.drafter_duid
|
|
83
|
+
|
|
84
|
+
in_trash = self.in_trash
|
|
85
|
+
|
|
86
|
+
folder_duid = self.folder_duid
|
|
87
|
+
|
|
88
|
+
report_kind: Union[None, Unset, str]
|
|
89
|
+
if isinstance(self.report_kind, Unset):
|
|
90
|
+
report_kind = UNSET
|
|
91
|
+
elif isinstance(self.report_kind, ReportKind):
|
|
92
|
+
report_kind = self.report_kind.value
|
|
93
|
+
else:
|
|
94
|
+
report_kind = self.report_kind
|
|
95
|
+
|
|
96
|
+
order = self.order
|
|
97
|
+
|
|
98
|
+
title = self.title
|
|
99
|
+
|
|
100
|
+
text = self.text
|
|
101
|
+
|
|
102
|
+
text_markdown = self.text_markdown
|
|
103
|
+
|
|
104
|
+
edited_by_ai = self.edited_by_ai
|
|
105
|
+
|
|
106
|
+
recommendation_duid: Union[None, Unset, str]
|
|
107
|
+
if isinstance(self.recommendation_duid, Unset):
|
|
108
|
+
recommendation_duid = UNSET
|
|
109
|
+
else:
|
|
110
|
+
recommendation_duid = self.recommendation_duid
|
|
111
|
+
|
|
112
|
+
editor_duids: Union[Unset, List[str]] = UNSET
|
|
113
|
+
if not isinstance(self.editor_duids, Unset):
|
|
114
|
+
editor_duids = self.editor_duids
|
|
115
|
+
|
|
116
|
+
subscriber_duids: Union[Unset, List[str]] = UNSET
|
|
117
|
+
if not isinstance(self.subscriber_duids, Unset):
|
|
118
|
+
subscriber_duids = self.subscriber_duids
|
|
119
|
+
|
|
120
|
+
icon_kind: Union[Unset, str] = UNSET
|
|
121
|
+
if not isinstance(self.icon_kind, Unset):
|
|
122
|
+
icon_kind = self.icon_kind.value
|
|
123
|
+
|
|
124
|
+
icon_name_or_emoji = self.icon_name_or_emoji
|
|
125
|
+
|
|
126
|
+
color_hex = self.color_hex
|
|
127
|
+
|
|
128
|
+
field_dict: Dict[str, Any] = {}
|
|
129
|
+
field_dict.update(self.additional_properties)
|
|
130
|
+
field_dict.update(
|
|
131
|
+
{
|
|
132
|
+
"duid": duid,
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
if source_user is not UNSET:
|
|
136
|
+
field_dict["sourceUser"] = source_user
|
|
137
|
+
if source_type is not UNSET:
|
|
138
|
+
field_dict["sourceType"] = source_type
|
|
139
|
+
if drafter_duid is not UNSET:
|
|
140
|
+
field_dict["drafterDuid"] = drafter_duid
|
|
141
|
+
if in_trash is not UNSET:
|
|
142
|
+
field_dict["inTrash"] = in_trash
|
|
143
|
+
if folder_duid is not UNSET:
|
|
144
|
+
field_dict["folderDuid"] = folder_duid
|
|
145
|
+
if report_kind is not UNSET:
|
|
146
|
+
field_dict["reportKind"] = report_kind
|
|
147
|
+
if order is not UNSET:
|
|
148
|
+
field_dict["order"] = order
|
|
149
|
+
if title is not UNSET:
|
|
150
|
+
field_dict["title"] = title
|
|
151
|
+
if text is not UNSET:
|
|
152
|
+
field_dict["text"] = text
|
|
153
|
+
if text_markdown is not UNSET:
|
|
154
|
+
field_dict["textMarkdown"] = text_markdown
|
|
155
|
+
if edited_by_ai is not UNSET:
|
|
156
|
+
field_dict["editedByAi"] = edited_by_ai
|
|
157
|
+
if recommendation_duid is not UNSET:
|
|
158
|
+
field_dict["recommendationDuid"] = recommendation_duid
|
|
159
|
+
if editor_duids is not UNSET:
|
|
160
|
+
field_dict["editorDuids"] = editor_duids
|
|
161
|
+
if subscriber_duids is not UNSET:
|
|
162
|
+
field_dict["subscriberDuids"] = subscriber_duids
|
|
163
|
+
if icon_kind is not UNSET:
|
|
164
|
+
field_dict["iconKind"] = icon_kind
|
|
165
|
+
if icon_name_or_emoji is not UNSET:
|
|
166
|
+
field_dict["iconNameOrEmoji"] = icon_name_or_emoji
|
|
167
|
+
if color_hex is not UNSET:
|
|
168
|
+
field_dict["colorHex"] = color_hex
|
|
169
|
+
|
|
170
|
+
return field_dict
|
|
171
|
+
|
|
172
|
+
@classmethod
|
|
173
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
174
|
+
d = src_dict.copy()
|
|
175
|
+
duid = d.pop("duid")
|
|
176
|
+
|
|
177
|
+
def _parse_source_user(data: object) -> Union[None, Unset, str]:
|
|
178
|
+
if data is None:
|
|
179
|
+
return data
|
|
180
|
+
if isinstance(data, Unset):
|
|
181
|
+
return data
|
|
182
|
+
return cast(Union[None, Unset, str], data)
|
|
183
|
+
|
|
184
|
+
source_user = _parse_source_user(d.pop("sourceUser", UNSET))
|
|
185
|
+
|
|
186
|
+
_source_type = d.pop("sourceType", UNSET)
|
|
187
|
+
source_type: Union[Unset, DocSourceType]
|
|
188
|
+
if isinstance(_source_type, Unset):
|
|
189
|
+
source_type = UNSET
|
|
190
|
+
else:
|
|
191
|
+
source_type = DocSourceType(_source_type)
|
|
192
|
+
|
|
193
|
+
def _parse_drafter_duid(data: object) -> Union[None, Unset, str]:
|
|
194
|
+
if data is None:
|
|
195
|
+
return data
|
|
196
|
+
if isinstance(data, Unset):
|
|
197
|
+
return data
|
|
198
|
+
return cast(Union[None, Unset, str], data)
|
|
199
|
+
|
|
200
|
+
drafter_duid = _parse_drafter_duid(d.pop("drafterDuid", UNSET))
|
|
201
|
+
|
|
202
|
+
in_trash = d.pop("inTrash", UNSET)
|
|
203
|
+
|
|
204
|
+
folder_duid = d.pop("folderDuid", UNSET)
|
|
205
|
+
|
|
206
|
+
def _parse_report_kind(data: object) -> Union[None, ReportKind, Unset]:
|
|
207
|
+
if data is None:
|
|
208
|
+
return data
|
|
209
|
+
if isinstance(data, Unset):
|
|
210
|
+
return data
|
|
211
|
+
try:
|
|
212
|
+
if not isinstance(data, str):
|
|
213
|
+
raise TypeError()
|
|
214
|
+
report_kind_type_0 = ReportKind(data)
|
|
215
|
+
|
|
216
|
+
return report_kind_type_0
|
|
217
|
+
except: # noqa: E722
|
|
218
|
+
pass
|
|
219
|
+
return cast(Union[None, ReportKind, Unset], data)
|
|
220
|
+
|
|
221
|
+
report_kind = _parse_report_kind(d.pop("reportKind", UNSET))
|
|
222
|
+
|
|
223
|
+
order = d.pop("order", UNSET)
|
|
224
|
+
|
|
225
|
+
title = d.pop("title", UNSET)
|
|
226
|
+
|
|
227
|
+
text = d.pop("text", UNSET)
|
|
228
|
+
|
|
229
|
+
text_markdown = d.pop("textMarkdown", UNSET)
|
|
230
|
+
|
|
231
|
+
edited_by_ai = d.pop("editedByAi", UNSET)
|
|
232
|
+
|
|
233
|
+
def _parse_recommendation_duid(data: object) -> Union[None, Unset, str]:
|
|
234
|
+
if data is None:
|
|
235
|
+
return data
|
|
236
|
+
if isinstance(data, Unset):
|
|
237
|
+
return data
|
|
238
|
+
return cast(Union[None, Unset, str], data)
|
|
239
|
+
|
|
240
|
+
recommendation_duid = _parse_recommendation_duid(d.pop("recommendationDuid", UNSET))
|
|
241
|
+
|
|
242
|
+
editor_duids = cast(List[str], d.pop("editorDuids", UNSET))
|
|
243
|
+
|
|
244
|
+
subscriber_duids = cast(List[str], d.pop("subscriberDuids", UNSET))
|
|
245
|
+
|
|
246
|
+
_icon_kind = d.pop("iconKind", UNSET)
|
|
247
|
+
icon_kind: Union[Unset, IconKind]
|
|
248
|
+
if isinstance(_icon_kind, Unset):
|
|
249
|
+
icon_kind = UNSET
|
|
250
|
+
else:
|
|
251
|
+
icon_kind = IconKind(_icon_kind)
|
|
252
|
+
|
|
253
|
+
icon_name_or_emoji = d.pop("iconNameOrEmoji", UNSET)
|
|
254
|
+
|
|
255
|
+
color_hex = d.pop("colorHex", UNSET)
|
|
256
|
+
|
|
257
|
+
doc_update = cls(
|
|
258
|
+
duid=duid,
|
|
259
|
+
source_user=source_user,
|
|
260
|
+
source_type=source_type,
|
|
261
|
+
drafter_duid=drafter_duid,
|
|
262
|
+
in_trash=in_trash,
|
|
263
|
+
folder_duid=folder_duid,
|
|
264
|
+
report_kind=report_kind,
|
|
265
|
+
order=order,
|
|
266
|
+
title=title,
|
|
267
|
+
text=text,
|
|
268
|
+
text_markdown=text_markdown,
|
|
269
|
+
edited_by_ai=edited_by_ai,
|
|
270
|
+
recommendation_duid=recommendation_duid,
|
|
271
|
+
editor_duids=editor_duids,
|
|
272
|
+
subscriber_duids=subscriber_duids,
|
|
273
|
+
icon_kind=icon_kind,
|
|
274
|
+
icon_name_or_emoji=icon_name_or_emoji,
|
|
275
|
+
color_hex=color_hex,
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
doc_update.additional_properties = d
|
|
279
|
+
return doc_update
|
|
280
|
+
|
|
281
|
+
@property
|
|
282
|
+
def additional_keys(self) -> List[str]:
|
|
283
|
+
return list(self.additional_properties.keys())
|
|
284
|
+
|
|
285
|
+
def __getitem__(self, key: str) -> Any:
|
|
286
|
+
return self.additional_properties[key]
|
|
287
|
+
|
|
288
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
289
|
+
self.additional_properties[key] = value
|
|
290
|
+
|
|
291
|
+
def __delitem__(self, key: str) -> None:
|
|
292
|
+
del self.additional_properties[key]
|
|
293
|
+
|
|
294
|
+
def __contains__(self, key: str) -> bool:
|
|
295
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class EntityName(str, Enum):
|
|
5
|
+
BRAINSTORM = "brainstorm"
|
|
6
|
+
COMMENT = "comment"
|
|
7
|
+
DARTBOARD = "dartboard"
|
|
8
|
+
DASHBOARD = "dashboard"
|
|
9
|
+
DOC = "doc"
|
|
10
|
+
FOLDER = "folder"
|
|
11
|
+
FORM = "form"
|
|
12
|
+
PROPERTY = "property"
|
|
13
|
+
SPACE = "space"
|
|
14
|
+
STATUS = "status"
|
|
15
|
+
TASK = "task"
|
|
16
|
+
TENANT = "tenant"
|
|
17
|
+
UNKNOWN = "UNKNOWN"
|
|
18
|
+
USER = "user"
|
|
19
|
+
VIEW = "view"
|
|
20
|
+
|
|
21
|
+
def __str__(self) -> str:
|
|
22
|
+
return str(self.value)
|