dart-tools 0.8.5__tar.gz → 0.8.7__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.

Potentially problematic release.


This version of dart-tools might be problematic. Click here for more details.

Files changed (113) hide show
  1. {dart_tools-0.8.5 → dart_tools-0.8.7}/PKG-INFO +2 -46
  2. {dart_tools-0.8.5 → dart_tools-0.8.7}/README.md +1 -45
  3. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/dart.py +4 -1
  4. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/__init__.py +1 -1
  5. dart_tools-0.8.7/dart/generated/api/task/add_task_time_tracking.py +190 -0
  6. dart_tools-0.8.7/dart/generated/api/task/move_task.py +190 -0
  7. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/__init__.py +22 -0
  8. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/paginated_comment_list.py +42 -0
  9. dart_tools-0.8.7/dart/generated/models/paginated_comment_list_meta_type_0.py +109 -0
  10. dart_tools-0.8.7/dart/generated/models/paginated_comment_list_meta_type_0_applied_default_filters.py +44 -0
  11. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/paginated_concise_doc_list.py +42 -0
  12. dart_tools-0.8.7/dart/generated/models/paginated_concise_doc_list_meta_type_0.py +109 -0
  13. dart_tools-0.8.7/dart/generated/models/paginated_concise_doc_list_meta_type_0_applied_default_filters.py +44 -0
  14. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/paginated_concise_task_list.py +42 -0
  15. dart_tools-0.8.7/dart/generated/models/paginated_concise_task_list_meta_type_0.py +109 -0
  16. dart_tools-0.8.7/dart/generated/models/paginated_concise_task_list_meta_type_0_applied_default_filters.py +44 -0
  17. dart_tools-0.8.7/dart/generated/models/task_move.py +94 -0
  18. dart_tools-0.8.7/dart/generated/models/task_time_tracking_create.py +84 -0
  19. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart_tools.egg-info/PKG-INFO +2 -46
  20. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart_tools.egg-info/SOURCES.txt +10 -0
  21. {dart_tools-0.8.5 → dart_tools-0.8.7}/pyproject.toml +1 -1
  22. {dart_tools-0.8.5 → dart_tools-0.8.7}/LICENSE +0 -0
  23. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/__init__.py +0 -0
  24. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/exception.py +0 -0
  25. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/__init__.py +0 -0
  26. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/attachment/__init__.py +0 -0
  27. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/attachment/add_task_attachment_from_url.py +0 -0
  28. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/comment/__init__.py +0 -0
  29. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/comment/add_task_comment.py +0 -0
  30. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/comment/list_comments.py +0 -0
  31. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/config/__init__.py +0 -0
  32. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/config/get_config.py +0 -0
  33. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/dartboard/__init__.py +0 -0
  34. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/dartboard/get_dartboard.py +0 -0
  35. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/doc/__init__.py +0 -0
  36. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/doc/create_doc.py +0 -0
  37. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/doc/delete_doc.py +0 -0
  38. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/doc/get_doc.py +0 -0
  39. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/doc/list_docs.py +0 -0
  40. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/doc/update_doc.py +0 -0
  41. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/folder/__init__.py +0 -0
  42. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/folder/get_folder.py +0 -0
  43. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/help_center_article/__init__.py +0 -0
  44. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/help_center_article/list_help_center_articles.py +0 -0
  45. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/skill/__init__.py +0 -0
  46. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/skill/retrieve_skill_by_title.py +0 -0
  47. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/task/__init__.py +0 -0
  48. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/task/create_task.py +0 -0
  49. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/task/delete_task.py +0 -0
  50. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/task/get_task.py +0 -0
  51. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/task/list_tasks.py +0 -0
  52. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/task/update_task.py +0 -0
  53. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/view/__init__.py +0 -0
  54. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/api/view/get_view.py +0 -0
  55. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/client.py +0 -0
  56. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/errors.py +0 -0
  57. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/attachment.py +0 -0
  58. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/attachment_create_from_url.py +0 -0
  59. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/comment.py +0 -0
  60. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/comment_create.py +0 -0
  61. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/concise_doc.py +0 -0
  62. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/concise_task.py +0 -0
  63. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/custom_properties.py +0 -0
  64. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/dartboard.py +0 -0
  65. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/doc.py +0 -0
  66. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/doc_create.py +0 -0
  67. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/doc_update.py +0 -0
  68. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/folder.py +0 -0
  69. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/list_comments_o_item.py +0 -0
  70. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/list_docs_o_item.py +0 -0
  71. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/list_tasks_o_item.py +0 -0
  72. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/priority.py +0 -0
  73. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/skill.py +0 -0
  74. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/task.py +0 -0
  75. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/task_create.py +0 -0
  76. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/task_relationships_type_0.py +0 -0
  77. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/task_update.py +0 -0
  78. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/time_tracking_entry.py +0 -0
  79. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user.py +0 -0
  80. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration.py +0 -0
  81. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_checkbox_type_def.py +0 -0
  82. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_dates_type_def.py +0 -0
  83. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_multiselect_type_def.py +0 -0
  84. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_number_type_def.py +0 -0
  85. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_number_type_def_custom_property_number_format_type_def.py +0 -0
  86. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_select_type_def.py +0 -0
  87. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_status_type_def.py +0 -0
  88. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_text_type_def.py +0 -0
  89. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_time_tracking_type_def.py +0 -0
  90. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/user_space_configuration_custom_property_user_type_def.py +0 -0
  91. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/view.py +0 -0
  92. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_comment.py +0 -0
  93. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_comment_create.py +0 -0
  94. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_dartboard.py +0 -0
  95. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_doc.py +0 -0
  96. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_doc_create.py +0 -0
  97. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_doc_update.py +0 -0
  98. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_folder.py +0 -0
  99. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_help_center_articles.py +0 -0
  100. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_skill.py +0 -0
  101. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_task.py +0 -0
  102. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_task_create.py +0 -0
  103. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_task_update.py +0 -0
  104. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/models/wrapped_view.py +0 -0
  105. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/generated/types.py +0 -0
  106. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/old.py +0 -0
  107. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/order_manager.py +0 -0
  108. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart/webhook.py +0 -0
  109. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart_tools.egg-info/dependency_links.txt +0 -0
  110. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart_tools.egg-info/entry_points.txt +0 -0
  111. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart_tools.egg-info/requires.txt +0 -0
  112. {dart_tools-0.8.5 → dart_tools-0.8.7}/dart_tools.egg-info/top_level.txt +0 -0
  113. {dart_tools-0.8.5 → dart_tools-0.8.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dart-tools
3
- Version: 0.8.5
3
+ Version: 0.8.7
4
4
  Summary: The Dart CLI and Python Library
5
5
  Author-email: Dart <software@dartai.com>
6
6
  License: MIT License
@@ -72,17 +72,12 @@ Dynamic: license-file
72
72
 
73
73
  [Dart](https://dartai.com?nr=1) is Project Management powered by AI.
74
74
 
75
- `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.
75
+ `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python. It implements client functions to the [Dart Public API](https://app.dartai.com/api/v0/public/docs/).
76
76
 
77
77
  - [Installation](#installation)
78
78
  - [Naming conflicts](#naming-conflicts)
79
79
  - [Using the CLI](#using-the-cli)
80
80
  - [Using the Python Library](#using-the-python-library)
81
- - [Using the Python Library in AWS Lambda Functions](#using-the-python-library-in-aws-lambda-functions)
82
- - [Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.](#navigate-to-the-directory-containing-your-lambda_functionpy-source-file-in-this-example-the-directory-is-named-my_function)
83
- - [Create a Deployment Package](#create-a-deployment-package)
84
- - [Zip the contents of the `package` directory along with your `lambda_function.py`](#zip-the-contents-of-the-package-directory-along-with-your-lambda_functionpy)
85
- - [Deploy the Lambda function](#deploy-the-lambda-function)
86
81
  - [Help and Resources](#help-and-resources)
87
82
  - [Contributing](#contributing)
88
83
  - [License](#license)
@@ -147,43 +142,6 @@ new_task = create_task(
147
142
  update_task(new_task.id, status_title="Done")
148
143
  ```
149
144
 
150
- ## Using the Python Library in AWS Lambda Functions
151
-
152
- To use the `dart-tools` Python library in an AWS Lambda function, you need to package the library with your Lambda deployment package (see more details at [Working with .zip file archives for Python Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/python-package.html)). Follow these steps:
153
-
154
- ### Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.
155
-
156
- ```sh
157
- cd my_function
158
- ```
159
-
160
- ### Create a Deployment Package
161
-
162
- Use Docker to create a deployment package that includes the `dart-tools` library. Run the following commands in your terminal, ensuring that the `RUNTIME_PYTHON_VERSION` and `RUNTIME_ARCHITECTURE` environment variables match the runtime settings of your Lambda function:
163
-
164
- ```sh
165
- export RUNTIME_PYTHON_VERSION=3.12
166
- export RUNTIME_ARCHITECTURE=x86_64
167
- docker run --rm --volume ${PWD}:/app --entrypoint /bin/bash public.ecr.aws/lambda/python:${RUNTIME_PYTHON_VERSION}-${RUNTIME_ARCHITECTURE} -c "pip install --target /app/package dart-tools"
168
- ```
169
-
170
- This command installs the `dart-tools` library into a directory named `package` in your current working directory.
171
-
172
- ### Zip the contents of the `package` directory along with your `lambda_function.py`
173
-
174
- ```sh
175
- cd package
176
- zip -r ../my_deployment_package.zip .
177
- cd ..
178
- zip -r my_deployment_package.zip lambda_function.py
179
- ```
180
-
181
- ### Deploy the Lambda function
182
-
183
- Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.
184
-
185
- By following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.
186
-
187
145
  ## Help and Resources
188
146
 
189
147
  - [Homepage](https://dartai.com/?nr=1)
@@ -194,12 +152,10 @@ By following these steps, you can use the `dart-tools` Python library within you
194
152
  - [Chat on Discord](https://discord.gg/RExv8jEkSh)
195
153
  - Email us at [support@dartai.com](mailto:support@dartai.com)
196
154
 
197
-
198
155
  ## Contributing
199
156
 
200
157
  Contributions are welcome! Please open an issue or submit a pull request.
201
158
 
202
-
203
159
  ## License
204
160
 
205
161
  This project is licensed under [the MIT License](LICENSE).
@@ -9,17 +9,12 @@
9
9
 
10
10
  [Dart](https://dartai.com?nr=1) is Project Management powered by AI.
11
11
 
12
- `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python.
12
+ `dart-tools` is the Dart CLI and Python Library. It enables direct integration with Dart through a terminal CLI or through Python. It implements client functions to the [Dart Public API](https://app.dartai.com/api/v0/public/docs/).
13
13
 
14
14
  - [Installation](#installation)
15
15
  - [Naming conflicts](#naming-conflicts)
16
16
  - [Using the CLI](#using-the-cli)
17
17
  - [Using the Python Library](#using-the-python-library)
18
- - [Using the Python Library in AWS Lambda Functions](#using-the-python-library-in-aws-lambda-functions)
19
- - [Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.](#navigate-to-the-directory-containing-your-lambda_functionpy-source-file-in-this-example-the-directory-is-named-my_function)
20
- - [Create a Deployment Package](#create-a-deployment-package)
21
- - [Zip the contents of the `package` directory along with your `lambda_function.py`](#zip-the-contents-of-the-package-directory-along-with-your-lambda_functionpy)
22
- - [Deploy the Lambda function](#deploy-the-lambda-function)
23
18
  - [Help and Resources](#help-and-resources)
24
19
  - [Contributing](#contributing)
25
20
  - [License](#license)
@@ -84,43 +79,6 @@ new_task = create_task(
84
79
  update_task(new_task.id, status_title="Done")
85
80
  ```
86
81
 
87
- ## Using the Python Library in AWS Lambda Functions
88
-
89
- To use the `dart-tools` Python library in an AWS Lambda function, you need to package the library with your Lambda deployment package (see more details at [Working with .zip file archives for Python Lambda functions](https://docs.aws.amazon.com/lambda/latest/dg/python-package.html)). Follow these steps:
90
-
91
- ### Navigate to the directory containing your `lambda_function.py` source file. In this example, the directory is named `my_function`.
92
-
93
- ```sh
94
- cd my_function
95
- ```
96
-
97
- ### Create a Deployment Package
98
-
99
- Use Docker to create a deployment package that includes the `dart-tools` library. Run the following commands in your terminal, ensuring that the `RUNTIME_PYTHON_VERSION` and `RUNTIME_ARCHITECTURE` environment variables match the runtime settings of your Lambda function:
100
-
101
- ```sh
102
- export RUNTIME_PYTHON_VERSION=3.12
103
- export RUNTIME_ARCHITECTURE=x86_64
104
- docker run --rm --volume ${PWD}:/app --entrypoint /bin/bash public.ecr.aws/lambda/python:${RUNTIME_PYTHON_VERSION}-${RUNTIME_ARCHITECTURE} -c "pip install --target /app/package dart-tools"
105
- ```
106
-
107
- This command installs the `dart-tools` library into a directory named `package` in your current working directory.
108
-
109
- ### Zip the contents of the `package` directory along with your `lambda_function.py`
110
-
111
- ```sh
112
- cd package
113
- zip -r ../my_deployment_package.zip .
114
- cd ..
115
- zip -r my_deployment_package.zip lambda_function.py
116
- ```
117
-
118
- ### Deploy the Lambda function
119
-
120
- Upload the `my_deployment_package.zip` file to AWS Lambda using the AWS Management Console or the AWS CLI.
121
-
122
- By following these steps, you can use the `dart-tools` Python library within your AWS Lambda functions.
123
-
124
82
  ## Help and Resources
125
83
 
126
84
  - [Homepage](https://dartai.com/?nr=1)
@@ -131,12 +89,10 @@ By following these steps, you can use the `dart-tools` Python library within you
131
89
  - [Chat on Discord](https://discord.gg/RExv8jEkSh)
132
90
  - Email us at [support@dartai.com](mailto:support@dartai.com)
133
91
 
134
-
135
92
  ## Contributing
136
93
 
137
94
  Contributions are welcome! Please open an issue or submit a pull request.
138
95
 
139
-
140
96
  ## License
141
97
 
142
98
  This project is licensed under [the MIT License](LICENSE).
@@ -85,6 +85,7 @@ _ROOT_PUBLIC_API_URL_FRAG = f"{_ROOT_PRIVATE_API_URL_FRAG}/public"
85
85
  _COPY_BRANCH_URL_FRAG = "/vcs/copy-branch-link"
86
86
 
87
87
  _AUTH_TOKEN_ENVVAR_KEY = "DART_TOKEN"
88
+ _HOST_ENVVAR_KEY = "DART_HOST"
88
89
  _CONFIG_FPATH = platformdirs.user_config_path(_APP)
89
90
  _CLIENT_ID_KEY = "clientId"
90
91
  _HOST_KEY = "host"
@@ -105,6 +106,8 @@ _DEFAULT_DARTBOARD = "General/Active"
105
106
 
106
107
  _VERSION = version(_APP)
107
108
  _AUTH_TOKEN_ENVVAR = os.environ.get(_AUTH_TOKEN_ENVVAR_KEY)
109
+ _HOST_ENVVAR = os.environ.get(_HOST_ENVVAR_KEY)
110
+ _DEFAULT_HOST = _HOST_ENVVAR or _PROD_HOST
108
111
 
109
112
 
110
113
  def _get_help_text(fn: Callable) -> str:
@@ -221,7 +224,7 @@ class _Config:
221
224
  pass
222
225
  self._content = {
223
226
  _CLIENT_ID_KEY: _make_id(),
224
- _HOST_KEY: _PROD_HOST,
227
+ _HOST_KEY: _DEFAULT_HOST,
225
228
  _HOSTS_KEY: {},
226
229
  } | self._content
227
230
  self._content[_HOSTS_KEY] = defaultdict(dict, self._content[_HOSTS_KEY])
@@ -8,5 +8,5 @@ from .doc import create_doc, delete_doc, get_doc, list_docs, update_doc
8
8
  from .folder import get_folder
9
9
  from .help_center_article import list_help_center_articles
10
10
  from .skill import retrieve_skill_by_title
11
- from .task import create_task, delete_task, get_task, list_tasks, update_task
11
+ from .task import add_task_time_tracking, create_task, delete_task, get_task, list_tasks, move_task, update_task
12
12
  from .view import get_view
@@ -0,0 +1,190 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union, cast
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.task_time_tracking_create import TaskTimeTrackingCreate
9
+ from ...models.wrapped_task import WrappedTask
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ id: str,
15
+ *,
16
+ body: TaskTimeTrackingCreate,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/tasks/{id}/time-tracking".format(
23
+ id=id,
24
+ ),
25
+ }
26
+
27
+ _body = body.to_dict()
28
+
29
+ _kwargs["json"] = _body
30
+ headers["Content-Type"] = "application/json"
31
+
32
+ _kwargs["headers"] = headers
33
+ return _kwargs
34
+
35
+
36
+ def _parse_response(
37
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
38
+ ) -> Optional[Union[Any, WrappedTask]]:
39
+ if response.status_code == 200:
40
+ response_200 = WrappedTask.from_dict(response.json())
41
+
42
+ return response_200
43
+ if response.status_code == 400:
44
+ response_400 = cast(Any, None)
45
+ return response_400
46
+ if client.raise_on_unexpected_status:
47
+ raise errors.UnexpectedStatus(response.status_code, response.content)
48
+ else:
49
+ return None
50
+
51
+
52
+ def _build_response(
53
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
54
+ ) -> Response[Union[Any, WrappedTask]]:
55
+ return Response(
56
+ status_code=HTTPStatus(response.status_code),
57
+ content=response.content,
58
+ headers=response.headers,
59
+ parsed=_parse_response(client=client, response=response),
60
+ )
61
+
62
+
63
+ def sync_detailed(
64
+ id: str,
65
+ *,
66
+ client: Union[AuthenticatedClient, Client],
67
+ body: TaskTimeTrackingCreate,
68
+ ) -> Response[Union[Any, WrappedTask]]:
69
+ """Add a time tracking entry to a task
70
+
71
+ Record an additional time tracking entry on a task and return the updated task with refreshed time
72
+ tracking.
73
+
74
+ Args:
75
+ id (str):
76
+ body (TaskTimeTrackingCreate):
77
+
78
+ Raises:
79
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
80
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
81
+
82
+ Returns:
83
+ Response[Union[Any, WrappedTask]]
84
+ """
85
+
86
+ kwargs = _get_kwargs(
87
+ id=id,
88
+ body=body,
89
+ )
90
+
91
+ response = client.get_httpx_client().request(
92
+ **kwargs,
93
+ )
94
+
95
+ return _build_response(client=client, response=response)
96
+
97
+
98
+ def sync(
99
+ id: str,
100
+ *,
101
+ client: Union[AuthenticatedClient, Client],
102
+ body: TaskTimeTrackingCreate,
103
+ ) -> Optional[Union[Any, WrappedTask]]:
104
+ """Add a time tracking entry to a task
105
+
106
+ Record an additional time tracking entry on a task and return the updated task with refreshed time
107
+ tracking.
108
+
109
+ Args:
110
+ id (str):
111
+ body (TaskTimeTrackingCreate):
112
+
113
+ Raises:
114
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
115
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
116
+
117
+ Returns:
118
+ Union[Any, WrappedTask]
119
+ """
120
+
121
+ return sync_detailed(
122
+ id=id,
123
+ client=client,
124
+ body=body,
125
+ ).parsed
126
+
127
+
128
+ async def asyncio_detailed(
129
+ id: str,
130
+ *,
131
+ client: Union[AuthenticatedClient, Client],
132
+ body: TaskTimeTrackingCreate,
133
+ ) -> Response[Union[Any, WrappedTask]]:
134
+ """Add a time tracking entry to a task
135
+
136
+ Record an additional time tracking entry on a task and return the updated task with refreshed time
137
+ tracking.
138
+
139
+ Args:
140
+ id (str):
141
+ body (TaskTimeTrackingCreate):
142
+
143
+ Raises:
144
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
145
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
146
+
147
+ Returns:
148
+ Response[Union[Any, WrappedTask]]
149
+ """
150
+
151
+ kwargs = _get_kwargs(
152
+ id=id,
153
+ body=body,
154
+ )
155
+
156
+ response = await client.get_async_httpx_client().request(**kwargs)
157
+
158
+ return _build_response(client=client, response=response)
159
+
160
+
161
+ async def asyncio(
162
+ id: str,
163
+ *,
164
+ client: Union[AuthenticatedClient, Client],
165
+ body: TaskTimeTrackingCreate,
166
+ ) -> Optional[Union[Any, WrappedTask]]:
167
+ """Add a time tracking entry to a task
168
+
169
+ Record an additional time tracking entry on a task and return the updated task with refreshed time
170
+ tracking.
171
+
172
+ Args:
173
+ id (str):
174
+ body (TaskTimeTrackingCreate):
175
+
176
+ Raises:
177
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
178
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
179
+
180
+ Returns:
181
+ Union[Any, WrappedTask]
182
+ """
183
+
184
+ return (
185
+ await asyncio_detailed(
186
+ id=id,
187
+ client=client,
188
+ body=body,
189
+ )
190
+ ).parsed
@@ -0,0 +1,190 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Optional, Union, cast
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.task_move import TaskMove
9
+ from ...models.wrapped_task import WrappedTask
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ id: str,
15
+ *,
16
+ body: TaskMove,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/tasks/{id}/move".format(
23
+ id=id,
24
+ ),
25
+ }
26
+
27
+ _body = body.to_dict()
28
+
29
+ _kwargs["json"] = _body
30
+ headers["Content-Type"] = "application/json"
31
+
32
+ _kwargs["headers"] = headers
33
+ return _kwargs
34
+
35
+
36
+ def _parse_response(
37
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
38
+ ) -> Optional[Union[Any, WrappedTask]]:
39
+ if response.status_code == 200:
40
+ response_200 = WrappedTask.from_dict(response.json())
41
+
42
+ return response_200
43
+ if response.status_code == 400:
44
+ response_400 = cast(Any, None)
45
+ return response_400
46
+ if client.raise_on_unexpected_status:
47
+ raise errors.UnexpectedStatus(response.status_code, response.content)
48
+ else:
49
+ return None
50
+
51
+
52
+ def _build_response(
53
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
54
+ ) -> Response[Union[Any, WrappedTask]]:
55
+ return Response(
56
+ status_code=HTTPStatus(response.status_code),
57
+ content=response.content,
58
+ headers=response.headers,
59
+ parsed=_parse_response(client=client, response=response),
60
+ )
61
+
62
+
63
+ def sync_detailed(
64
+ id: str,
65
+ *,
66
+ client: Union[AuthenticatedClient, Client],
67
+ body: TaskMove,
68
+ ) -> Response[Union[Any, WrappedTask]]:
69
+ """Move a task within its dartboard
70
+
71
+ Move a task to a specific position within results sorted by the order field. Use afterTaskId to
72
+ place the task after a specific task, or beforeTaskId to place it before one.
73
+
74
+ Args:
75
+ id (str):
76
+ body (TaskMove):
77
+
78
+ Raises:
79
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
80
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
81
+
82
+ Returns:
83
+ Response[Union[Any, WrappedTask]]
84
+ """
85
+
86
+ kwargs = _get_kwargs(
87
+ id=id,
88
+ body=body,
89
+ )
90
+
91
+ response = client.get_httpx_client().request(
92
+ **kwargs,
93
+ )
94
+
95
+ return _build_response(client=client, response=response)
96
+
97
+
98
+ def sync(
99
+ id: str,
100
+ *,
101
+ client: Union[AuthenticatedClient, Client],
102
+ body: TaskMove,
103
+ ) -> Optional[Union[Any, WrappedTask]]:
104
+ """Move a task within its dartboard
105
+
106
+ Move a task to a specific position within results sorted by the order field. Use afterTaskId to
107
+ place the task after a specific task, or beforeTaskId to place it before one.
108
+
109
+ Args:
110
+ id (str):
111
+ body (TaskMove):
112
+
113
+ Raises:
114
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
115
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
116
+
117
+ Returns:
118
+ Union[Any, WrappedTask]
119
+ """
120
+
121
+ return sync_detailed(
122
+ id=id,
123
+ client=client,
124
+ body=body,
125
+ ).parsed
126
+
127
+
128
+ async def asyncio_detailed(
129
+ id: str,
130
+ *,
131
+ client: Union[AuthenticatedClient, Client],
132
+ body: TaskMove,
133
+ ) -> Response[Union[Any, WrappedTask]]:
134
+ """Move a task within its dartboard
135
+
136
+ Move a task to a specific position within results sorted by the order field. Use afterTaskId to
137
+ place the task after a specific task, or beforeTaskId to place it before one.
138
+
139
+ Args:
140
+ id (str):
141
+ body (TaskMove):
142
+
143
+ Raises:
144
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
145
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
146
+
147
+ Returns:
148
+ Response[Union[Any, WrappedTask]]
149
+ """
150
+
151
+ kwargs = _get_kwargs(
152
+ id=id,
153
+ body=body,
154
+ )
155
+
156
+ response = await client.get_async_httpx_client().request(**kwargs)
157
+
158
+ return _build_response(client=client, response=response)
159
+
160
+
161
+ async def asyncio(
162
+ id: str,
163
+ *,
164
+ client: Union[AuthenticatedClient, Client],
165
+ body: TaskMove,
166
+ ) -> Optional[Union[Any, WrappedTask]]:
167
+ """Move a task within its dartboard
168
+
169
+ Move a task to a specific position within results sorted by the order field. Use afterTaskId to
170
+ place the task after a specific task, or beforeTaskId to place it before one.
171
+
172
+ Args:
173
+ id (str):
174
+ body (TaskMove):
175
+
176
+ Raises:
177
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
178
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
179
+
180
+ Returns:
181
+ Union[Any, WrappedTask]
182
+ """
183
+
184
+ return (
185
+ await asyncio_detailed(
186
+ id=id,
187
+ client=client,
188
+ body=body,
189
+ )
190
+ ).parsed
@@ -16,13 +16,27 @@ from .list_comments_o_item import ListCommentsOItem
16
16
  from .list_docs_o_item import ListDocsOItem
17
17
  from .list_tasks_o_item import ListTasksOItem
18
18
  from .paginated_comment_list import PaginatedCommentList
19
+ from .paginated_comment_list_meta_type_0 import PaginatedCommentListMetaType0
20
+ from .paginated_comment_list_meta_type_0_applied_default_filters import (
21
+ PaginatedCommentListMetaType0AppliedDefaultFilters,
22
+ )
19
23
  from .paginated_concise_doc_list import PaginatedConciseDocList
24
+ from .paginated_concise_doc_list_meta_type_0 import PaginatedConciseDocListMetaType0
25
+ from .paginated_concise_doc_list_meta_type_0_applied_default_filters import (
26
+ PaginatedConciseDocListMetaType0AppliedDefaultFilters,
27
+ )
20
28
  from .paginated_concise_task_list import PaginatedConciseTaskList
29
+ from .paginated_concise_task_list_meta_type_0 import PaginatedConciseTaskListMetaType0
30
+ from .paginated_concise_task_list_meta_type_0_applied_default_filters import (
31
+ PaginatedConciseTaskListMetaType0AppliedDefaultFilters,
32
+ )
21
33
  from .priority import Priority
22
34
  from .skill import Skill
23
35
  from .task import Task
24
36
  from .task_create import TaskCreate
37
+ from .task_move import TaskMove
25
38
  from .task_relationships_type_0 import TaskRelationshipsType0
39
+ from .task_time_tracking_create import TaskTimeTrackingCreate
26
40
  from .task_update import TaskUpdate
27
41
  from .time_tracking_entry import TimeTrackingEntry
28
42
  from .user import User
@@ -89,13 +103,21 @@ __all__ = (
89
103
  "ListDocsOItem",
90
104
  "ListTasksOItem",
91
105
  "PaginatedCommentList",
106
+ "PaginatedCommentListMetaType0",
107
+ "PaginatedCommentListMetaType0AppliedDefaultFilters",
92
108
  "PaginatedConciseDocList",
109
+ "PaginatedConciseDocListMetaType0",
110
+ "PaginatedConciseDocListMetaType0AppliedDefaultFilters",
93
111
  "PaginatedConciseTaskList",
112
+ "PaginatedConciseTaskListMetaType0",
113
+ "PaginatedConciseTaskListMetaType0AppliedDefaultFilters",
94
114
  "Priority",
95
115
  "Skill",
96
116
  "Task",
97
117
  "TaskCreate",
118
+ "TaskMove",
98
119
  "TaskRelationshipsType0",
120
+ "TaskTimeTrackingCreate",
99
121
  "TaskUpdate",
100
122
  "TimeTrackingEntry",
101
123
  "User",